diff --git a/.github/workflows/ci-cd.yml b/.github/workflows/ci-cd.yml new file mode 100644 index 00000000..d2ac7f1c --- /dev/null +++ b/.github/workflows/ci-cd.yml @@ -0,0 +1,76 @@ +name: CI-CD + +on: [push] + +jobs: + build_and_publish: + runs-on: ubuntu-latest + permissions: + contents: read + packages: write + id-token: write + environment: + name: pypi + url: https://pypi.org/p/data-factory-testing-framework + steps: + #---------------------------------------------- + # check-out repo and set-up python + #---------------------------------------------- + - name: Check out repository + uses: actions/checkout@v3 + - name: Set up python + id: setup-python + uses: actions/setup-python@v4 + with: + python-version: '3.9' + #---------------------------------------------- + # ----- install & configure poetry ----- + #---------------------------------------------- + - name: Install Poetry + uses: snok/install-poetry@v1 + with: + virtualenvs-create: true + virtualenvs-in-project: true + installer-parallel: true + + #---------------------------------------------- + # load cached venv if cache exists + #---------------------------------------------- + - name: Load cached venv + id: cached-poetry-dependencies + uses: actions/cache@v3 + with: + path: .venv + key: venv-${{ runner.os }}-${{ steps.setup-python.outputs.python-version }}-${{ hashFiles('**/poetry.lock') }} + #---------------------------------------------- + # install dependencies if cache does not exist + #---------------------------------------------- + - name: Install dependencies + if: steps.cached-poetry-dependencies.outputs.cache-hit != 'true' + run: | + source .venv/bin/activate + poetry install --no-interaction --no-root + #---------------------------------------------- + # install your root project, if required + #---------------------------------------------- + - name: Install project + run: | + source .venv/bin/activate + poetry install --no-interaction + #---------------------------------------------- + # run test suite + #---------------------------------------------- + - name: Run tests + run: | + source .venv/bin/activate + poetry run pytest . + - name: Set build version and build package + run: | + source .venv/bin/activate + poetry version 0.0.0.alpha${{ github.run_number}} + poetry build + - name: Publish package distributions to PyPI + if: github.ref == 'refs/heads/main' + uses: pypa/gh-action-pypi-publish@release/v1 + with: + packages-dir: ./dist \ No newline at end of file diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml deleted file mode 100644 index aa0648f1..00000000 --- a/.github/workflows/ci.yml +++ /dev/null @@ -1,44 +0,0 @@ -name: CI - -on: [push] - -jobs: - build_and_publish: - runs-on: ubuntu-latest - permissions: - contents: read - packages: write - strategy: - matrix: - dotnet-version: [ '7.0.x' ] - - steps: - - uses: actions/checkout@v3 - - name: Setup .NET Core SDK ${{ matrix.dotnet-version }} - uses: actions/setup-dotnet@v3 - with: - dotnet-version: ${{ matrix.dotnet-version }} - source-url: https://nuget.pkg.github.com/arjendev/index.json - env: - NUGET_AUTH_TOKEN: ${{secrets.GITHUB_TOKEN}} - - name: Install dependencies - run: dotnet restore - working-directory: ./src/dotnet - - name: Build - run: dotnet build --configuration Release --no-restore - working-directory: ./src/dotnet - - name: Test - run: dotnet test --no-restore --verbosity normal - working-directory: ./src/dotnet - - name: Upload dotnet test results - uses: actions/upload-artifact@v3 - with: - name: dotnet-results-${{ matrix.dotnet-version }} - path: ./src/dotnet/TestResults-${{ matrix.dotnet-version }} - # Use always() to always run this step to publish test results when there are test failures - if: ${{ always() }} - - name: Create the package - run: dotnet pack --configuration Release src/dotnet/AzureDataFactory.TestingFramework - - name: Publish the package to GPR - if: github.ref == 'refs/heads/main' - run: dotnet nuget push src/dotnet/AzureDataFactory.TestingFramework/bin/Release/*.nupkg --source "https://nuget.pkg.github.com/arjendev/index.json" --api-key ${{ secrets.PUBLISH_KEY }} --skip-duplicate \ No newline at end of file diff --git a/.gitignore b/.gitignore index 45739b38..6b630e15 100644 --- a/.gitignore +++ b/.gitignore @@ -326,6 +326,7 @@ paket-files/ # Python Tools for Visual Studio (PTVS) __pycache__/ *.pyc +.pytest_cache # Cake - Uncomment if you are using it # tools/** @@ -396,4 +397,7 @@ FodyWeavers.xsd # JetBrains Rider *.sln.iml -.idea \ No newline at end of file +.idea + +# Distributions / Releases +dist diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml new file mode 100644 index 00000000..7cccaaba --- /dev/null +++ b/.pre-commit-config.yaml @@ -0,0 +1,24 @@ +repos: +- repo: https://github.com/python-poetry/poetry + rev: 1.6.1 + hooks: + - id: poetry-check + args: [] + - id: poetry-lock + args: ["--no-update"] +- repo: https://github.com/astral-sh/ruff-pre-commit + rev: v0.1.5 + hooks: + - id: ruff + args: [ --fix ] + - id: ruff-format +- repo: local + hooks: + - id: pytest + name: pytest + entry: poetry run pytest . + language: system + types: [python] + require_serial: true + pass_filenames: false + diff --git a/.vscode/settings.json b/.vscode/settings.json new file mode 100644 index 00000000..3d9fd61c --- /dev/null +++ b/.vscode/settings.json @@ -0,0 +1,12 @@ +// VSCode settings for Python +// We track these settings in the repository so that they are consistent across +// for contributors. +{ + "python.testing.pytestArgs": [ + "." + "-vv" + ], + "python.testing.cwd": "${workspaceFolder}", + "python.testing.pytestEnabled": true, + "python.testing.unittestEnabled": false, +} \ No newline at end of file diff --git a/DEVELOPMENT.md b/DEVELOPMENT.md new file mode 100644 index 00000000..38fff10f --- /dev/null +++ b/DEVELOPMENT.md @@ -0,0 +1,33 @@ +# Azure Data Factory v2 - Unit Testing Framework + +## Development + +### Prerequisites + +* poetry == 1.6.1 + +### Pre-Commit Hooks + +We use pre-commit hooks to ensure that the code is formatted correctly and that the code is linted before committing. + +To install the pre-commit hooks, run the following command: + +```bash +poetry run pre-commit install +``` + +To run the pre-commit hooks use the following command (append `--all-files` to run on all files)): + +```bash +poetry run pre-commit run +``` + +### Run Linting + +We use Ruff to lint our code as it provides similar rule sets to well-established linters into one (e.g., black, flake8, isort, and pydocstyle). + +To run linting, run the following command: + +```bash +poetry run ruff . +``` diff --git a/README.md b/README.md index 92742cdc..a937c0f0 100644 --- a/README.md +++ b/README.md @@ -1,133 +1,125 @@ -# Azure Data Factory v2 - Unit Testing Framework +# Data Factory - Testing Framework + +A test framework that allows you to write unit and functional tests for Data Factory pipelines against the git integrated json resource files. + +Supporting currently: +* [Fabric Data Factory](https://learn.microsoft.com/en-us/fabric/data-factory/) +* [Azure Data Factory v2](https://learn.microsoft.com/en-us/azure/data-factory/concepts-pipelines-activities?tabs=data-factory) + +Planned: +* [Azure Synapse Analytics](https://learn.microsoft.com/en-us/azure/data-factory/concepts-pipelines-activities?context=%2Fazure%2Fsynapse-analytics%2Fcontext%2Fcontext&tabs=data-factory/) -A unit test framework that allows you to write unit and functional tests for Azure Data Factory v2 against the git integrated json resource files. ## Disclaimer -This unit test framework is not officially supported. It is currently in experimental state and has not been tested with every single data factory resource. It should support all data factory resources, but has not been thoroughly tested, please report any issues in the issues section and include an example of the data factory pipeline that is not working as expected. +This unit test framework is not officially supported. It is currently in experimental state and has not been tested with every single data factory resource. It should support all activities out-of-the-box, but has not been thoroughly tested, please report any issues in the issues section and include an example of the pipeline that is not working as expected. -If there's a lot of interest in this framework, then I will continue to improve it and move it to a production ready state. +If there's a lot of interest in this framework, then we will continue to improve it and move it to a production ready state. ## Features -1. Evaluate the outcome of any data factory resource result given a set of input parameters. The framework will evaluate parameters, globalParameters, variables, activityOutputs and their expressions, so that the final result can be asserted. -2. Simulate a pipeline run and evaluate the execution flow and outcome of each activity. -3. Automatically parse the entire data factory folder and parse any data factory entity into the correct typed class (1500+ classes available). -4. Evaluate expressions, but not all functions are supported yet. You can always easily register your own custom functions. +Goal: Validate that the evaluated pipeline configuration with its expressions are behaving as expected on runtime. + +1. Evaluate expressions with their functions and arguments instantly by using the framework's internal expression parser. +2. Test a pipeline or activity against any state to assert expected outcome. State can be configured with pipeline parameters, global parameters, variables and activity outputs. +3. Simulate a pipeline run and evaluate the execution flow and outcome of each activity. +4. Dynamically supports all activity types with all their attributes. + +> Pipelines and activities are not executed on any Data Factory environment, but the evaluation of the pipeline configuration is validated locally. This is different from the "validation" functionality present in the UI, which only validates the syntax of the pipeline configuration. + ## Why -Azure Data Factory does not support unit testing out of the box. The only way to validate your changes is through manual testing or running e2e tests against a deployed data factory. These tests are great to have, but miss the following benefits that unit tests, like using this unit test framework, provides: +Data Factory does not support unit testing out of the box. The only way to validate your changes is through manual testing or running e2e tests against a deployed data factory. These tests are great to have, but miss the following benefits that unit tests, like using this unit test framework, provides: * Shift left with immediate feedback on changes - Evaluate any individual data factory resource (pipelines, activities, triggers, datasets, linkedServices etc..), including (complex) expressions * Allows testing individual resources (e.g. activity) for many different input values to cover more scenarios. * Less issues in production - due to the fast nature of writing and running unit tests, you will write more tests in less time and therefore have a higher test coverage. This means more confidence in new changes, less risks in breaking existing features (regression tests) and thus far less issues in production. -> Even though Azure Data Factory is a UI-driven tool and writing unit tests might not be in the nature of it. How can you be confident that your changes will work as expected, and existing pipelines will not break, without writing unit tests? +> Even though Data Factory is UI-driven and writing unit tests might not be in the nature of it. How can you be confident that your changes will work as expected, and existing pipelines will not break, without writing unit tests? ## Getting started -1. Create a .NET Unit Test project (xUnit is used in examples) -2. Navigate in terminal to the project folder -3. Add private github package nuget source: `dotnet nuget add source https://nuget.pkg.github.com/arjendev/index.json --name arjendevfeed --username --password ` -4. Add package to project: `dotnet add package AzureDataFactory.TestingFramework --prerelease` -5. Start writing tests +1. Set up an empty Python project with your favorite testing library +2. Install the package using your preferred package manager: + * Pip: `pip install data-factory-testing-framework` + * Poetry: `poetry add data-factory-testing-framework` +3. Start writing tests ## Features - Examples The samples seen below is the _only_ code that you need to write! The framework will take care of the rest. -1. Evaluate activities (e.g. a WebActivity that calls Azure Batch API), LinkedServices, Datasets and Triggers - - ```csharp - // Arrange - var pipeline = PipelineFactory.ParseFromFile("Example/example-pipeline.json"); - var activity = pipeline.GetActivityByName("Trigger Azure Batch Job") as WebHookActivity; - - _state.Parameters.Add(new RunParameter(ParameterType.Global, "BaseUrl", "https://example.com")); - _state.Parameters.Add(new RunParameter(ParameterType.Pipeline, "JobId", "123")); - _state.Variables.Add(new PipelineRunVariable("JobName", "Job-123")); - _state.AddActivityResult(new TestActivityResult("Get version", new - { - Version = "version1" - })); - - // Act - activity.Evaluate(_state); - - // Assert - Assert.Equal("https://example.com/jobs", activity.Uri); - Assert.Equal("POST", activity.Method); - Assert.Equal("{ \n \"JobId\": \"123\",\n \"JobName\": \"Job-123\",\n \"Version\": \"version1\",\n}", activity.Body); - +1. Evaluate activities (e.g. a WebActivity that calls Azure Batch API) + + ```python + # Arrange + activity: Activity = pipeline.get_activity_by_name("Trigger Azure Batch Job") + state = PipelineRunState( + parameters=[ + RunParameter(RunParameterType.Global, "BaseUrl", "https://example.com"), + RunParameter(RunParameterType.Pipeline, "JobId", "123"), + ], + variables=[ + PipelineRunVariable("JobName", "Job-123"), + ]) + state.add_activity_result("Get version", DependencyCondition.SUCCEEDED, {"Version": "version1"}) + + # Act + activity.evaluate(state) + + # Assert + assert "https://example.com/jobs" == activity.type_properties["url"].value + assert "POST" == activity.type_properties["method"].value + assert "{ \n \"JobId\": \"123\",\n \"JobName\": \"Job-123\",\n \"Version\": \"version1\",\n}" == activity.type_properties["body"].value ``` 2. Evaluate Pipelines and test the flow of activities given a specific input - ```csharp - var testFramework = new TestFramework(dataFactoryFolderPath: "BatchJob"); - var pipeline = testFramework.Repository.GetPipelineByName("batch_job"); - Assert.Equal("example-pipeline", pipeline.Name); - Assert.Equal(6, pipeline.Activities.Count); - - // Runs the pipeline with the provided parameters - var activities = testFramework.Evaluate(pipeline, new List - { - new(ParameterType.Pipeline, "JobId", "123"), - new(ParameterType.Pipeline, "ContainerName", "test-container"), - new(ParameterType.Global, "BaseUrl", "https://example.com"), - }); - - var setVariableActivity = activities.GetNext(); - Assert.NotNull(setVariableActivity); - Assert.Equal("Set JobName", setVariableActivity.Name); - Assert.Equal("JobName", setVariableActivity.VariableName); - Assert.Equal("Job-123", setVariableActivity.Value); - - var getVersionActivity = activities.GetNext(); - Assert.NotNull(getVersionActivity); - Assert.Equal("Get version", getVersionActivity.Name); - Assert.Equal("https://example.com/version", getVersionActivity.Uri); - Assert.Equal("GET", getVersionActivity.Method); - Assert.Null(getVersionActivity.Body); - getVersionActivity.SetResult(DependencyCondition.Succeeded, new { - Version = "version1" - }); - - var createBatchActivity = activities.GetNext(); - Assert.NotNull(createBatchActivity); - Assert.Equal("Trigger Azure Batch Job", createBatchActivity.Name); - Assert.Equal("https://example.com/jobs", createBatchActivity.Uri); - Assert.Equal("POST", createBatchActivity.Method); - Assert.Equal("{ \n \"JobId\": \"123\",\n \"JobName\": \"Job-123\",\n \"Version\": \"version1\",\n}", createBatchActivity.Body); - createBatchActivity.SetResult(DependencyCondition.Succeeded, "OK"); - - Assert.Throws(() => activities.GetNext()); + ```python + # Arrange + pipeline: PipelineResource = test_framework.repository.get_pipeline_by_name("batch_job") + + # Runs the pipeline with the provided parameters + activities = test_framework.evaluate_pipeline(pipeline, [ + RunParameter(RunParameterType.Pipeline, "JobId", "123"), + RunParameter(RunParameterType.Pipeline, "ContainerName", "test-container"), + RunParameter(RunParameterType.Global, "BaseUrl", "https://example.com"), + ]) + + set_variable_activity: Activity = next(activities) + assert set_variable_activity is not None + assert "Set JobName" == set_variable_activity.name + assert "JobName" == activity.type_properties["variableName"] + assert "Job-123" == activity.type_properties["value"].value + + get_version_activity = next(activities) + assert get_version_activity is not None + assert "Get version" == get_version_activity.name + assert "https://example.com/version" == get_version_activity.type_properties["url"].value + assert "GET" == get_version_activity.type_properties["method"] + get_version_activity.set_result(DependencyCondition.Succeeded,{"Version": "version1"}) + + create_batch_activity = next(activities) + assert create_batch_activity is not None + assert "Trigger Azure Batch Job" == create_batch_activity.name + assert "https://example.com/jobs" == create_batch_activity.type_properties["url"].value + assert "POST" == create_batch_activity.type_properties["method"] + assert "{ \n \"JobId\": \"123\",\n \"JobName\": \"Job-123\",\n \"Version\": \"version1\",\n}" == create_batch_activity.type_properties["body"].value + + with pytest.raises(StopIteration): + next(activities) ``` - -3. Evaluate expressions - - ```csharp - // Arrange - var expression = FunctionPart.Parse("concat('https://example.com/jobs/', '123', concat('&', 'abc'))"); - - // Act - var evaluated = expression.Evaluate(); - - // Assert - Assert.Equal("https://example.com/jobs/123&abc", evaluated); - ``` - -> See AzureDataFactory.TestingFramework.Example project for more samples +> See Examples folder for more samples ## Registering missing expression functions -As the framework is interpreting expressions containing functions, these functions need to be implemented in C#. The goal is to start supporting more and more functions, but if a function is not supported, then the following code can be used to register a missing function: +As the framework is interpreting expressions containing functions, these functions need to be implemented in Python. The goal is to start supporting more and more functions, but if a function is not supported, then the following code can be used to register a missing function: -```csharp - FunctionsRepository.Register("concat", (IEnumerable arguments) => string.Concat(arguments)); - FunctionsRepository.Register("trim", (string text, string trimArgument) => text.Trim(trimArgument[0])); +```python + FunctionsRepository.register("concat", lambda arguments: "".join(arguments)) + FunctionsRepository.register("trim", lambda text, trim_argument: text.strip(trim_argument[0])) ``` On runtime when evaluating expressions, the framework will try to find a matching function and assert the expected amount of arguments are supplied. If no matching function is found, then an exception will be thrown. @@ -138,7 +130,7 @@ On runtime when evaluating expressions, the framework will try to find a matchin 1. After parsing a data factory resource file, you can use the debugger to easily discover which classes are actually initialized so that you can cast them to the correct type. -## Recommended development workflow +## Recommended development workflow for Azure Data Factory v2 * Use ADF Git integration * Use UI to create feature branch, build initial pipeline and save to feature branch diff --git a/src/dotnet/AzureDataFactory.TestingFramework.Example/BatchJob/pipeline/batch_job.json b/examples/data_factory/batch_job/pipeline/batch_job.json similarity index 100% rename from src/dotnet/AzureDataFactory.TestingFramework.Example/BatchJob/pipeline/batch_job.json rename to examples/data_factory/batch_job/pipeline/batch_job.json diff --git a/examples/data_factory/batch_job/test_data_factory_batchjob_functional.py b/examples/data_factory/batch_job/test_data_factory_batchjob_functional.py new file mode 100644 index 00000000..c8b76343 --- /dev/null +++ b/examples/data_factory/batch_job/test_data_factory_batchjob_functional.py @@ -0,0 +1,252 @@ +import pytest +from data_factory_testing_framework.state import RunParameterType +from data_factory_testing_framework.state.run_parameter import RunParameter +from data_factory_testing_framework.test_framework import TestFramework, TestFrameworkType + + +def test_batch_job_pipeline(request: pytest.FixtureRequest) -> None: + # Arrange + test_framework = TestFramework( + framework_type=TestFrameworkType.DataFactory, root_folder_path=request.fspath.dirname + ) + pipeline = test_framework.repository.get_pipeline_by_name("batch_job") + + # Act + activities = test_framework.evaluate_pipeline( + pipeline, + [ + RunParameter(RunParameterType.Pipeline, "BatchPoolId", "batch-pool-id"), + RunParameter(RunParameterType.Pipeline, "WorkloadApplicationPackageName", "test-application"), + RunParameter(RunParameterType.Pipeline, "WorkloadApplicationPackageVersion", "1.5.0"), + RunParameter(RunParameterType.Pipeline, "ManagerApplicationPackageName", "batchmanager"), + RunParameter(RunParameterType.Pipeline, "ManagerApplicationPackageVersion", "2.0.0"), + RunParameter( + RunParameterType.Pipeline, + "ManagerTaskParameters", + "--parameter1 dummy --parameter2 another-dummy", + ), + RunParameter(RunParameterType.Pipeline, "JobId", "802100a5-ec79-4a52-be62-8d6109f3ff9a"), + RunParameter(RunParameterType.Pipeline, "TaskOutputFolderPrefix", "TASKOUTPUT_"), + RunParameter( + RunParameterType.Pipeline, + "WorkloadUserAssignedIdentityName", + "test-application-identity-name", + ), + RunParameter( + RunParameterType.Pipeline, + "WorkloadUserAssignedIdentityClientId", + "/subscriptions/SUBSCRIPTION_ID/resourcegroups/RESOURCE_GROUP/providers/Microsoft.ManagedIdentity/userAssignedIdentities/test-application-identity-name", + ), + RunParameter(RunParameterType.Pipeline, "JobAdditionalEnvironmentSettings", "[]"), + RunParameter( + RunParameterType.Pipeline, + "OutputStorageAccountName", + "test-application-output-storage-account-name", + ), + RunParameter(RunParameterType.Pipeline, "OutputContainerName", "test-application-output-container-name"), + RunParameter(RunParameterType.Pipeline, "OutputFolderName", "TEMP"), + RunParameter(RunParameterType.Pipeline, "BatchJobTimeout", "PT4H"), + RunParameter(RunParameterType.Global, "BatchStorageAccountName", "batch-account-name"), + RunParameter(RunParameterType.Global, "BatchAccountSubscription", "SUBSCRIPTION_ID"), + RunParameter(RunParameterType.Global, "BatchAccountResourceGroup", "RESOURCE_GROUP"), + RunParameter(RunParameterType.Global, "BatchURI", "https://batch-account-name.westeurope.batch.azure.com"), + RunParameter(RunParameterType.Global, "ADFSubscription", "bd19dba4-89ad-4976-b862-848bf43a4340"), + RunParameter(RunParameterType.Global, "ADFResourceGroup", "adf-rg"), + RunParameter(RunParameterType.Global, "ADFName", "adf-name"), + ], + ) + + # Assert + activity = next(activities) + assert activity.name == "Set UserAssignedIdentityReference" + assert activity.type_properties["variableName"] == "UserAssignedIdentityReference" + assert ( + activity.type_properties["value"].value + == "/subscriptions/SUBSCRIPTION_ID/resourcegroups/RESOURCE_GROUP/providers/Microsoft.ManagedIdentity/userAssignedIdentities/test-application-identity-name" # noqa: E501 + ) + + activity = next(activities) + assert activity.name == "Set ManagerApplicationPackagePath" + assert activity.type_properties["variableName"] == "ManagerApplicationPackagePath" + assert activity.type_properties["value"].value == "$AZ_BATCH_APP_PACKAGE_batchmanager_2_0_0/batchmanager.tar.gz" + + activity = next(activities) + assert activity.name == "Set WorkloadApplicationPackagePath" + assert activity.type_properties["variableName"] == "WorkloadApplicationPackagePath" + assert ( + activity.type_properties["value"].value + == "$AZ_BATCH_APP_PACKAGE_test-application_1_5_0/test-application.tar.gz" + ) + + activity = next(activities) + assert activity.name == "Set CommonEnvironmentSettings" + assert activity.type_properties["variableName"] == "CommonEnvironmentSettings" + # noqa: E501 + assert ( + activity.type_properties["value"].value + == """[ + { + "name": "WORKLOAD_APP_PACKAGE", + "value": "test-application" + }, + { + "name": "WORKLOAD_APP_PACKAGE_VERSION", + "value": "1.5.0" + }, + { + "name": "MANAGER_APP_PACKAGE", + "value": "batchmanager" + }, + { + "name": "MANAGER_APP_PACKAGE_VERSION", + "value": "2.0.0" + }, + { + "name": "BATCH_JOB_TIMEOUT", + "value": "PT4H" + }, + { + "name": "WORKLOAD_AUTO_STORAGE_ACCOUNT_NAME", + "value": "batch-account-name" + }, + { + "name": "WORKLOAD_USER_ASSIGNED_IDENTITY_RESOURCE_ID", + "value": "/subscriptions/SUBSCRIPTION_ID/resourcegroups/RESOURCE_GROUP/providers/Microsoft.ManagedIdentity/userAssignedIdentities/test-application-identity-name" + }, + { + "name": "WORKLOAD_USER_ASSIGNED_IDENTITY_CLIENT_ID", + "value": "/subscriptions/SUBSCRIPTION_ID/resourcegroups/RESOURCE_GROUP/providers/Microsoft.ManagedIdentity/userAssignedIdentities/test-application-identity-name" + } + ]""" # noqa: E501 + ) + + activity = next(activities) + assert activity.name == "Set JobContainerName" + assert activity.type_properties["variableName"] == "JobContainerName" + assert activity.type_properties["value"].value == "job-802100a5-ec79-4a52-be62-8d6109f3ff9a" + + activity = next(activities) + assert activity.name == "Set Job Container URL" + assert activity.type_properties["variableName"] == "JobContainerURL" + assert ( + activity.type_properties["value"].value + == "https://batch-account-name.blob.core.windows.net/job-802100a5-ec79-4a52-be62-8d6109f3ff9a" + ) + + activity = next(activities) + assert activity.name == "Create Job Storage Container" + assert ( + activity.type_properties["url"].value + == "https://batch-account-name.blob.core.windows.net/job-802100a5-ec79-4a52-be62-8d6109f3ff9a?restype=container" + ) + assert activity.type_properties["method"] == "PUT" + assert activity.type_properties["body"].value == "{}" + + activity = next(activities) + assert activity.name == "Start Job" + assert ( + activity.type_properties["url"].value + == "https://batch-account-name.westeurope.batch.azure.com/jobs?api-version=2022-10-01.16.0" + ) + assert activity.type_properties["method"] == "POST" + assert ( + activity.type_properties["body"].value + == """{ + "id": "802100a5-ec79-4a52-be62-8d6109f3ff9a", + "priority": 100, + "constraints": { + "maxWallClockTime":"PT4H", + "maxTaskRetryCount": 0 + }, + "jobManagerTask": { + "id": "Manager", + "displayName": "Manager", + "authenticationTokenSettings": { + "access": [ + "job" + ] + }, + "commandLine": "/bin/bash -c \\"python3 -m ensurepip --upgrade && python3 -m pip install --user $AZ_BATCH_APP_PACKAGE_batchmanager_2_0_0/batchmanager.tar.gz && python3 -m pip install --user $AZ_BATCH_APP_PACKAGE_test-application_1_5_0/test-application.tar.gz && python3 -m test-application job --parameter1 dummy --parameter2 another-dummy\\"", + "applicationPackageReferences": [ + { + "applicationId": "batchmanager", + "version": "2.0.0" + }, + { + "applicationId": "test-application", + "version": "1.5.0" + } + ], + "outputFiles": [ + { + "destination": { + "container": { + "containerUrl": "https://batch-account-name.blob.core.windows.net/job-802100a5-ec79-4a52-be62-8d6109f3ff9a", + "identityReference": { + "resourceId": "/subscriptions/SUBSCRIPTION_ID/resourcegroups/RESOURCE_GROUP/providers/Microsoft.ManagedIdentity/userAssignedIdentities/test-application-identity-name" + }, + "path": "Manager/$TaskLog" + } + }, + "filePattern": "../*.txt", + "uploadOptions": { + "uploadCondition": "taskcompletion" + } + } + ], + "environmentSettings": [], + "requiredSlots": 1, + "killJobOnCompletion": false, + "userIdentity": { + "username": null, + "autoUser": { + "scope": "pool", + "elevationLevel": "nonadmin" + } + }, + "runExclusive": true, + "allowLowPriorityNode": true + }, + "poolInfo": { + "poolId": "batch-pool-id" + }, + "onAllTasksComplete": "terminatejob", + "onTaskFailure": "noaction", + "usesTaskDependencies": true, + "commonEnvironmentSettings": [{"name": "WORKLOAD_APP_PACKAGE", "value": "test-application"}, {"name": "WORKLOAD_APP_PACKAGE_VERSION", "value": "1.5.0"}, {"name": "MANAGER_APP_PACKAGE", "value": "batchmanager"}, {"name": "MANAGER_APP_PACKAGE_VERSION", "value": "2.0.0"}, {"name": "BATCH_JOB_TIMEOUT", "value": "PT4H"}, {"name": "WORKLOAD_AUTO_STORAGE_ACCOUNT_NAME", "value": "batch-account-name"}, {"name": "WORKLOAD_USER_ASSIGNED_IDENTITY_RESOURCE_ID", "value": "/subscriptions/SUBSCRIPTION_ID/resourcegroups/RESOURCE_GROUP/providers/Microsoft.ManagedIdentity/userAssignedIdentities/test-application-identity-name"}, {"name": "WORKLOAD_USER_ASSIGNED_IDENTITY_CLIENT_ID", "value": "/subscriptions/SUBSCRIPTION_ID/resourcegroups/RESOURCE_GROUP/providers/Microsoft.ManagedIdentity/userAssignedIdentities/test-application-identity-name"}]}""" # noqa: E501 + ) + + activity = next(activities) + assert activity.name == "Monitor Batch Job" + assert activity.type_properties["pipeline"]["referenceName"] == "monitor_batch_job" + assert len(activity.type_properties["parameters"]) == 1 + assert activity.type_properties["parameters"]["JobId"].value == "802100a5-ec79-4a52-be62-8d6109f3ff9a" + + activity = next(activities) + assert activity.name == "Copy Output Files" + assert activity.type_properties["pipeline"]["referenceName"] == "copy_output_files" + assert len(activity.type_properties["parameters"]) == 5 + assert ( + activity.type_properties["parameters"]["JobContainerName"].value == "job-802100a5-ec79-4a52-be62-8d6109f3ff9a" + ) + assert activity.type_properties["parameters"]["TaskOutputFolderPrefix"].value == "TASKOUTPUT_" + assert ( + activity.type_properties["parameters"]["OutputStorageAccountName"].value + == "test-application-output-storage-account-name" + ) + assert ( + activity.type_properties["parameters"]["OutputContainerName"].value == "test-application-output-container-name" + ) + assert activity.type_properties["parameters"]["OutputFolderName"].value == "TEMP" + + activity = next(activities) + assert activity.name == "Delete Job Storage Container" + assert ( + activity.type_properties["url"].value + == "https://batch-account-name.blob.core.windows.net/job-802100a5-ec79-4a52-be62-8d6109f3ff9a?restype=container" + ) + assert activity.type_properties["method"] == "DELETE" + + # Assert that there are no more activities + with pytest.raises(StopIteration): + next(activities) diff --git a/examples/data_factory/batch_job/test_data_factory_batchjob_unit.py b/examples/data_factory/batch_job/test_data_factory_batchjob_unit.py new file mode 100644 index 00000000..61277005 --- /dev/null +++ b/examples/data_factory/batch_job/test_data_factory_batchjob_unit.py @@ -0,0 +1,460 @@ +# flake8: noqa: E501 +import pytest +from data_factory_testing_framework.models.pipeline import Pipeline +from data_factory_testing_framework.state import ( + PipelineRunState, + PipelineRunVariable, + RunParameter, + RunParameterType, +) +from data_factory_testing_framework.test_framework import TestFramework, TestFrameworkType + + +@pytest.fixture +def test_framework(request: pytest.FixtureRequest) -> TestFramework: + return TestFramework( + framework_type=TestFrameworkType.DataFactory, + root_folder_path=request.fspath.dirname, + ) + + +@pytest.fixture +def pipeline(test_framework: TestFramework) -> Pipeline: + return test_framework.repository.get_pipeline_by_name("batch_job") + + +def test_set_job_container_url(test_framework: TestFramework, pipeline: Pipeline) -> None: + # Arrange + activity = pipeline.get_activity_by_name("Set Job Container URL") + state = PipelineRunState( + variables=[ + PipelineRunVariable(name="JobContainerURL"), + PipelineRunVariable(name="JobContainerName", default_value="job-8b6b545b-c583-4a06-adf7-19ff41370aba"), + ], + parameters=[ + RunParameter[str](RunParameterType.Global, "BatchStorageAccountName", "batch-account-name"), + ], + ) + + # Act + activity.evaluate(state) + + # Assert + updated_variable = state.get_variable_by_name("JobContainerURL") + expected_url = "https://batch-account-name.blob.core.windows.net/job-8b6b545b-c583-4a06-adf7-19ff41370aba" + assert activity.type_properties["value"].value == expected_url + assert updated_variable.value == expected_url + + +def test_set_user_assigned_identity_reference(test_framework: TestFramework, pipeline: Pipeline) -> None: + # Arrange + activity = pipeline.get_activity_by_name("Set UserAssignedIdentityReference") + state = PipelineRunState( + variables=[ + PipelineRunVariable(name="UserAssignedIdentityReference"), + ], + parameters=[ + RunParameter[str](RunParameterType.Global, "BatchAccountSubscription", "batch-account-subscription"), + RunParameter[str](RunParameterType.Global, "BatchAccountResourceGroup", "batch-account-resource-group"), + RunParameter[str]( + RunParameterType.Pipeline, + "WorkloadUserAssignedIdentityName", + "workload-user-assigned-identity-name", + ), + ], + ) + + # Act + activity.evaluate(state) + + # Assert + updated_variable = state.get_variable_by_name("UserAssignedIdentityReference") + expected_reference = "/subscriptions/batch-account-subscription/resourcegroups/batch-account-resource-group/providers/Microsoft.ManagedIdentity/userAssignedIdentities/workload-user-assigned-identity-name" + assert activity.type_properties["value"].value == expected_reference + assert updated_variable.value == expected_reference + + +def test_set_manager_application_package_path(test_framework: TestFramework, pipeline: Pipeline) -> None: + # Arrange + activity = pipeline.get_activity_by_name("Set ManagerApplicationPackagePath") + state = PipelineRunState( + variables=[ + PipelineRunVariable(name="ManagerApplicationPackagePath"), + ], + parameters=[ + RunParameter[str](RunParameterType.Pipeline, "ManagerApplicationPackageName", "managerworkload"), + RunParameter[str](RunParameterType.Pipeline, "ManagerApplicationPackageVersion", "0.13.2"), + ], + ) + + # Act + activity.evaluate(state) + + # Assert + updated_variable = state.get_variable_by_name("ManagerApplicationPackagePath") + expected_path = "$AZ_BATCH_APP_PACKAGE_managerworkload_0_13_2/managerworkload.tar.gz" + assert activity.type_properties["value"].value == expected_path + assert updated_variable.value == expected_path + + +def test_set_workload_application_package_path(test_framework: TestFramework, pipeline: Pipeline) -> None: + # Arrange + activity = pipeline.get_activity_by_name("Set WorkloadApplicationPackagePath") + state = PipelineRunState( + variables=[ + PipelineRunVariable(name="WorkloadApplicationPackagePath"), + ], + parameters=[ + RunParameter[str](RunParameterType.Pipeline, "WorkloadApplicationPackageName", "workload"), + RunParameter[str](RunParameterType.Pipeline, "WorkloadApplicationPackageVersion", "0.13.2"), + ], + ) + + # Act + activity.evaluate(state) + + # Assert + updated_variable = state.get_variable_by_name("WorkloadApplicationPackagePath") + expected_path = "$AZ_BATCH_APP_PACKAGE_workload_0_13_2/workload.tar.gz" + assert activity.type_properties["value"].value == expected_path + assert updated_variable.value == expected_path + + +def test_set_common_environment_settings(test_framework: TestFramework, pipeline: Pipeline) -> None: + # Arrange + activity = pipeline.get_activity_by_name("Set CommonEnvironmentSettings") + state = PipelineRunState( + variables=[ + PipelineRunVariable(name="CommonEnvironmentSettings"), + PipelineRunVariable( + name="UserAssignedIdentityReference", + default_value="/subscriptions/batch-account-subscription/resourcegroups/batch-account-resource-group/providers/Microsoft.ManagedIdentity/userAssignedIdentities/workload-user-assigned-identity-name", + ), + ], + parameters=[ + RunParameter[str](RunParameterType.Pipeline, "WorkloadApplicationPackageName", "workload"), + RunParameter[str](RunParameterType.Pipeline, "WorkloadApplicationPackageVersion", "0.13.2"), + RunParameter[str](RunParameterType.Pipeline, "ManagerApplicationPackageName", "managerworkload"), + RunParameter[str](RunParameterType.Pipeline, "ManagerApplicationPackageVersion", "0.13.2"), + RunParameter[str](RunParameterType.Pipeline, "BatchJobTimeout", "PT4H"), + RunParameter[str](RunParameterType.Global, "BatchStorageAccountName", "batch-account-name"), + RunParameter[str]( + RunParameterType.Pipeline, + "WorkloadUserAssignedIdentityName", + "workload-user-assigned-identity-name", + ), + RunParameter[str]( + RunParameterType.Pipeline, + "WorkloadUserAssignedIdentityClientId", + "workload-user-assigned-identity-client-id", + ), + ], + ) + + # Act + activity.evaluate(state) + + # Assert + expected_settings = """[ + { + "name": "WORKLOAD_APP_PACKAGE", + "value": "workload" + }, + { + "name": "WORKLOAD_APP_PACKAGE_VERSION", + "value": "0.13.2" + }, + { + "name": "MANAGER_APP_PACKAGE", + "value": "managerworkload" + }, + { + "name": "MANAGER_APP_PACKAGE_VERSION", + "value": "0.13.2" + }, + { + "name": "BATCH_JOB_TIMEOUT", + "value": "PT4H" + }, + { + "name": "WORKLOAD_AUTO_STORAGE_ACCOUNT_NAME", + "value": "batch-account-name" + }, + { + "name": "WORKLOAD_USER_ASSIGNED_IDENTITY_RESOURCE_ID", + "value": "/subscriptions/batch-account-subscription/resourcegroups/batch-account-resource-group/providers/Microsoft.ManagedIdentity/userAssignedIdentities/workload-user-assigned-identity-name" + }, + { + "name": "WORKLOAD_USER_ASSIGNED_IDENTITY_CLIENT_ID", + "value": "workload-user-assigned-identity-client-id" + } + ]""" + assert activity.type_properties["value"].value == expected_settings + assert state.get_variable_by_name("CommonEnvironmentSettings").value == expected_settings + + +def test_create_job_storage_container(test_framework: TestFramework, pipeline: Pipeline) -> None: + # Arrange + activity = pipeline.get_activity_by_name("Create Job Storage Container") + state = PipelineRunState( + variables=[ + PipelineRunVariable( + name="JobContainerURL", + default_value="https://batchstorage.blob.core.windows.net/job-8b6b545b-c583-4a06-adf7-19ff41370aba", + ), + ], + ) + + # Act + activity.evaluate(state) + + # Assert + assert activity.name == "Create Job Storage Container" + assert ( + activity.type_properties["url"].value + == "https://batchstorage.blob.core.windows.net/job-8b6b545b-c583-4a06-adf7-19ff41370aba?restype=container" + ) + assert activity.type_properties["method"] == "PUT" + assert activity.type_properties["body"].value == "{}" + + +def test_set_job_container_name(test_framework: TestFramework, pipeline: Pipeline) -> None: + # Arrange + activity = pipeline.get_activity_by_name("Set JobContainerName") + state = PipelineRunState( + variables=[ + PipelineRunVariable(name="JobContainerName"), + ], + parameters=[RunParameter[str](RunParameterType.Pipeline, "JobId", "8b6b545b-c583-4a06-adf7-19ff41370aba")], + ) + + # Act + activity.evaluate(state) + + # Assert + job_container_name_variable = state.get_variable_by_name("JobContainerName") + assert activity.type_properties["value"].value == "job-8b6b545b-c583-4a06-adf7-19ff41370aba" + assert job_container_name_variable.value == "job-8b6b545b-c583-4a06-adf7-19ff41370aba" + + +def test_start_job_pipeline(test_framework: TestFramework, pipeline: Pipeline) -> None: + # Arrange + activity = pipeline.get_activity_by_name("Start Job") + state = PipelineRunState( + parameters=[ + RunParameter[str]( + RunParameterType.Global, + "BatchURI", + "https://batch-account-name.westeurope.batch.azure.com", + ), + RunParameter[str](RunParameterType.Global, "BatchStorageAccountName", "batchstorage"), + RunParameter[str](RunParameterType.Global, "ADFSubscription", "d9153e28-dd4e-446c-91e4-0b1331b523f1"), + RunParameter[str](RunParameterType.Global, "ADFResourceGroup", "adf-rg"), + RunParameter[str](RunParameterType.Global, "ADFName", "adf-name"), + RunParameter[str](RunParameterType.Pipeline, "JobId", "8b6b545b-c583-4a06-adf7-19ff41370aba"), + RunParameter[str](RunParameterType.Pipeline, "BatchJobTimeout", "PT4H"), + RunParameter[str](RunParameterType.Pipeline, "BatchPoolId", "test-application-batch-pool-id"), + RunParameter[str](RunParameterType.Pipeline, "WorkloadApplicationPackageName", "test-application-name"), + RunParameter[str](RunParameterType.Pipeline, "WorkloadApplicationPackageVersion", "1.5.0"), + RunParameter[str](RunParameterType.Pipeline, "ManagerApplicationPackageName", "batchmanager"), + RunParameter[str](RunParameterType.Pipeline, "ManagerApplicationPackageVersion", "2.0.0"), + RunParameter[str]( + RunParameterType.Pipeline, + "ManagerTaskParameters", + "--parameter1 dummy --parameter2 another-dummy", + ), + RunParameter[str]( + RunParameterType.Pipeline, + "WorkloadUserAssignedIdentityName", + "test-application-batch-pool-id", + ), + RunParameter[str]( + RunParameterType.Pipeline, + "WorkloadUserAssignedIdentityClientId", + "test-application-identity-client-id", + ), + RunParameter[str]( + RunParameterType.Pipeline, + "JobAdditionalEnvironmentSettings", + '[{"name": "STORAGE_ACCOUNT_NAME", "value": "teststorage"}]', + ), + ], + variables=[ + PipelineRunVariable( + name="JobContainerURL", + default_value="https://batchstorage.blob.core.windows.net/job-8b6b545b-c583-4a06-adf7-19ff41370aba", + ), + PipelineRunVariable( + name="UserAssignedIdentityReference", + default_value="/subscriptions/batch-account-subscription/resourcegroups/batch-account-resource-group/providers/Microsoft.ManagedIdentity/userAssignedIdentities/workload-user-assigned-identity-name", + ), + PipelineRunVariable( + name="ManagerApplicationPackagePath", + default_value="$AZ_BATCH_APP_PACKAGE_managerworkload_0_13_2/managerworkload.tar.gz", + ), + PipelineRunVariable( + name="WorkloadApplicationPackagePath", + default_value="$AZ_BATCH_APP_PACKAGE_workload_0_13_2/workload.tar.gz", + ), + PipelineRunVariable( + name="CommonEnvironmentSettings", default_value='[{"name":"COMMON_ENV_SETTING","value":"dummy"}]' + ), + ], + ) + + # Act + activity.evaluate(state) + + # Assert + assert "Start Job" == activity.name + assert ( + "https://batch-account-name.westeurope.batch.azure.com/jobs?api-version=2022-10-01.16.0" + == activity.type_properties["url"].value + ) + assert "POST" == activity.type_properties["method"] + + expected_body = """{ + "id": "8b6b545b-c583-4a06-adf7-19ff41370aba", + "priority": 100, + "constraints": { + "maxWallClockTime":"PT4H", + "maxTaskRetryCount": 0 + }, + "jobManagerTask": { + "id": "Manager", + "displayName": "Manager", + "authenticationTokenSettings": { + "access": [ + "job" + ] + }, + "commandLine": "/bin/bash -c \\"python3 -m ensurepip --upgrade && python3 -m pip install --user $AZ_BATCH_APP_PACKAGE_managerworkload_0_13_2/managerworkload.tar.gz && python3 -m pip install --user $AZ_BATCH_APP_PACKAGE_workload_0_13_2/workload.tar.gz && python3 -m test-application-name job --parameter1 dummy --parameter2 another-dummy\\"", + "applicationPackageReferences": [ + { + "applicationId": "batchmanager", + "version": "2.0.0" + }, + { + "applicationId": "test-application-name", + "version": "1.5.0" + } + ], + "outputFiles": [ + { + "destination": { + "container": { + "containerUrl": "https://batchstorage.blob.core.windows.net/job-8b6b545b-c583-4a06-adf7-19ff41370aba", + "identityReference": { + "resourceId": "/subscriptions/batch-account-subscription/resourcegroups/batch-account-resource-group/providers/Microsoft.ManagedIdentity/userAssignedIdentities/workload-user-assigned-identity-name" + }, + "path": "Manager/$TaskLog" + } + }, + "filePattern": "../*.txt", + "uploadOptions": { + "uploadCondition": "taskcompletion" + } + } + ], + "environmentSettings": [], + "requiredSlots": 1, + "killJobOnCompletion": false, + "userIdentity": { + "username": null, + "autoUser": { + "scope": "pool", + "elevationLevel": "nonadmin" + } + }, + "runExclusive": true, + "allowLowPriorityNode": true + }, + "poolInfo": { + "poolId": "test-application-batch-pool-id" + }, + "onAllTasksComplete": "terminatejob", + "onTaskFailure": "noaction", + "usesTaskDependencies": true, + "commonEnvironmentSettings": [{"name": "COMMON_ENV_SETTING", "value": "dummy"}, {"name": "STORAGE_ACCOUNT_NAME", "value": "teststorage"}]}""" + + assert activity.type_properties["body"].value == expected_body + + +def test_monitor_job(test_framework: TestFramework, pipeline: Pipeline) -> None: + # Arrange + activity = pipeline.get_activity_by_name("Monitor Batch Job") + state = PipelineRunState( + parameters=[ + RunParameter[str](RunParameterType.Pipeline, "JobId", "8b6b545b-c583-4a06-adf7-19ff41370aba"), + ], + ) + + # Act + activity.evaluate(state) + + # Assert + assert activity.name == "Monitor Batch Job" + assert activity.type_properties["pipeline"]["referenceName"] == "monitor_batch_job" + assert len(activity.type_properties["parameters"]) == 1 + assert activity.type_properties["parameters"]["JobId"].value == "8b6b545b-c583-4a06-adf7-19ff41370aba" + + +def test_copy_output_files(test_framework: TestFramework, pipeline: Pipeline) -> None: + # Arrange + activity = pipeline.get_activity_by_name("Copy Output Files") + state = PipelineRunState( + variables=[ + PipelineRunVariable(name="JobContainerName", default_value="job-8b6b545b-c583-4a06-adf7-19ff41370aba"), + ], + parameters=[ + RunParameter[str](RunParameterType.Pipeline, "TaskOutputFolderPrefix", "TASKOUTPUT_"), + RunParameter[str](RunParameterType.Pipeline, "OutputStorageAccountName", "teststorage"), + RunParameter[str]( + RunParameterType.Pipeline, + "OutputContainerName", + "test-application-output-container-name", + ), + RunParameter[str](RunParameterType.Pipeline, "OutputFolderName", "output"), + ], + ) + + # Act + activity.evaluate(state) + + # Assert + assert activity.name == "Copy Output Files" + assert activity.type_properties["pipeline"]["referenceName"] == "copy_output_files" + assert len(activity.type_properties["parameters"]) == 5 + assert ( + activity.type_properties["parameters"]["JobContainerName"].value == "job-8b6b545b-c583-4a06-adf7-19ff41370aba" + ) + assert activity.type_properties["parameters"]["TaskOutputFolderPrefix"].value == "TASKOUTPUT_" + assert activity.type_properties["parameters"]["OutputStorageAccountName"].value == "teststorage" + assert ( + activity.type_properties["parameters"]["OutputContainerName"].value == "test-application-output-container-name" + ) + assert activity.type_properties["parameters"]["OutputFolderName"].value == "output" + + +def test_delete_job_storage_container(test_framework: TestFramework, pipeline: Pipeline) -> None: + # Arrange + activity = pipeline.get_activity_by_name("Delete Job Storage Container") + state = PipelineRunState( + variables=[ + PipelineRunVariable(name="JobContainerName", default_value="job-8b6b545b-c583-4a06-adf7-19ff41370aba"), + ], + parameters=[ + RunParameter[str](RunParameterType.Global, "BatchStorageAccountName", "batchstorage"), + ], + ) + + # Act + activity.evaluate(state) + + # Assert + assert activity.name == "Delete Job Storage Container" + assert ( + activity.type_properties["url"].value + == "https://batchstorage.blob.core.windows.net/job-8b6b545b-c583-4a06-adf7-19ff41370aba?restype=container" + ) + assert activity.type_properties["method"] == "DELETE" diff --git a/examples/fabric/batch_job/item.metadata.json b/examples/fabric/batch_job/item.metadata.json new file mode 100644 index 00000000..4a0dd642 --- /dev/null +++ b/examples/fabric/batch_job/item.metadata.json @@ -0,0 +1,4 @@ +{ + "type": "Pipeline", + "displayName": "batch_job" +} \ No newline at end of file diff --git a/examples/fabric/batch_job/pipeline-content.json b/examples/fabric/batch_job/pipeline-content.json new file mode 100644 index 00000000..ef848f6a --- /dev/null +++ b/examples/fabric/batch_job/pipeline-content.json @@ -0,0 +1,389 @@ +{ + "properties": { + "activities": [ + { + "name": "Set Job Container URL", + "type": "SetVariable", + "dependsOn": [ + { + "activity": "Set JobContainerName", + "dependencyConditions": [ + "Succeeded" + ] + } + ], + "policy": { + "secureOutput": false, + "secureInput": false + }, + "typeProperties": { + "variableName": "JobContainerURL", + "value": { + "value": "@concat('https://',pipeline().parameters.BatchStorageAccountName,'.blob.core.windows.net/', variables('JobContainerName'))", + "type": "Expression" + } + } + }, + { + "name": "Set UserAssignedIdentityReference", + "type": "SetVariable", + "dependsOn": [], + "policy": { + "secureOutput": false, + "secureInput": false + }, + "typeProperties": { + "variableName": "UserAssignedIdentityReference", + "value": { + "value": "@concat('/subscriptions/',pipeline().parameters.BatchAccountSubscription,'/resourcegroups/',pipeline().parameters.BatchAccountResourceGroup,'/providers/Microsoft.ManagedIdentity/userAssignedIdentities/',pipeline().parameters.WorkloadUserAssignedIdentityName)", + "type": "Expression" + } + } + }, + { + "name": "Set ManagerApplicationPackagePath", + "type": "SetVariable", + "dependsOn": [], + "policy": { + "secureOutput": false, + "secureInput": false + }, + "typeProperties": { + "variableName": "ManagerApplicationPackagePath", + "value": { + "value": "@concat('$AZ_BATCH_APP_PACKAGE_',\n pipeline().parameters.ManagerApplicationPackageName,'_',replace(replace(pipeline().parameters.ManagerApplicationPackageVersion,'.','_'),'-','_'),'/',pipeline().parameters.ManagerApplicationPackageName,'.tar.gz')", + "type": "Expression" + } + } + }, + { + "name": "Set WorkloadApplicationPackagePath", + "type": "SetVariable", + "dependsOn": [], + "policy": { + "secureOutput": false, + "secureInput": false + }, + "typeProperties": { + "variableName": "WorkloadApplicationPackagePath", + "value": { + "value": "@concat('$AZ_BATCH_APP_PACKAGE_',\n pipeline().parameters.WorkloadApplicationPackageName,'_',replace(replace(pipeline().parameters.WorkloadApplicationPackageVersion,'.','_'),'-','_'),'/',pipeline().parameters.WorkloadApplicationPackageName,'.tar.gz')", + "type": "Expression" + } + } + }, + { + "name": "Set CommonEnvironmentSettings", + "type": "SetVariable", + "dependsOn": [ + { + "activity": "Set UserAssignedIdentityReference", + "dependencyConditions": [ + "Succeeded" + ] + } + ], + "policy": { + "secureOutput": false, + "secureInput": false + }, + "typeProperties": { + "variableName": "CommonEnvironmentSettings", + "value": { + "value": "@json(\n concat('[\n {\n \"name\": \"WORKLOAD_APP_PACKAGE\",\n \"value\": \"',pipeline().parameters.WorkloadApplicationPackageName,'\"\n },\n {\n \"name\": \"WORKLOAD_APP_PACKAGE_VERSION\",\n \"value\": \"',pipeline().parameters.WorkloadApplicationPackageVersion,'\"\n },\n {\n \"name\": \"MANAGER_APP_PACKAGE\",\n \"value\": \"',pipeline().parameters.ManagerApplicationPackageName,'\"\n },\n {\n \"name\": \"MANAGER_APP_PACKAGE_VERSION\",\n \"value\": \"',pipeline().parameters.ManagerApplicationPackageVersion,'\"\n },\n {\n \"name\": \"BATCH_JOB_TIMEOUT\",\n \"value\": \"',pipeline().parameters.BatchJobTimeout,'\"\n },\n {\n \"name\": \"WORKLOAD_AUTO_STORAGE_ACCOUNT_NAME\",\n \"value\": \"',pipeline().parameters.BatchStorageAccountName,'\"\n },\n {\n \"name\": \"WORKLOAD_USER_ASSIGNED_IDENTITY_RESOURCE_ID\",\n \"value\": \"',variables('UserAssignedIdentityReference'),'\"\n },\n {\n \"name\": \"WORKLOAD_USER_ASSIGNED_IDENTITY_CLIENT_ID\",\n \"value\": \"',pipeline().parameters.WorkloadUserAssignedIdentityClientId,'\"\n }\n ]')\n)", + "type": "Expression" + } + } + }, + { + "name": "Set JobContainerName", + "type": "SetVariable", + "dependsOn": [], + "policy": { + "secureOutput": false, + "secureInput": false + }, + "typeProperties": { + "variableName": "JobContainerName", + "value": { + "value": "@concat('job-', pipeline().parameters.JobId)", + "type": "Expression" + } + } + }, + { + "name": "Create Job Storage Container", + "type": "WebActivity", + "dependsOn": [ + { + "activity": "Set Job Container URL", + "dependencyConditions": [ + "Succeeded" + ] + } + ], + "policy": { + "timeout": "0.12:00:00", + "retry": 0, + "retryIntervalInSeconds": 30, + "secureOutput": false, + "secureInput": false + }, + "typeProperties": { + "relativeUrl": { + "type": "Expression", + "value": "@concat(variables('JobContainerURL'), '?restype=container')" + }, + "method": "PUT", + "headers": { + "x-ms-version": "2023-01-03" + }, + "body": { + "value": "@concat('{','}')", + "type": "Expression" + } + }, + "externalReferences": { + "connection": "6d70b649-d684-439b-a9c2-d2bb5241cd39" + } + }, + { + "name": "Delete Job Storage Container", + "type": "WebActivity", + "dependsOn": [ + { + "activity": "Copy Output Files", + "dependencyConditions": [ + "Succeeded" + ] + } + ], + "policy": { + "timeout": "0.12:00:00", + "retry": 0, + "retryIntervalInSeconds": 30, + "secureOutput": false, + "secureInput": false + }, + "typeProperties": { + "relativeUrl": { + "value": "@concat(variables('JobContainerName'),'?restype=container')", + "type": "Expression" + }, + "method": "DELETE", + "headers": { + "x-ms-version": "2023-01-03" + } + }, + "externalReferences": { + "connection": "6d70b649-d684-439b-a9c2-d2bb5241cd39" + } + }, + { + "name": "Copy Output Files", + "type": "ExecutePipeline", + "dependsOn": [ + { + "activity": "Monitor Batch Job", + "dependencyConditions": [ + "Succeeded" + ] + } + ], + "typeProperties": { + "pipeline": { + "referenceName": "4e66b9d6-d1b9-4d2b-9b89-4101def23c9a", + "type": "PipelineReference" + }, + "waitOnCompletion": true, + "parameters": { + "JobContainerName": { + "value": "@variables('JobContainerName')", + "type": "Expression" + }, + "TaskOutputFolderPrefix": { + "value": "@pipeline().parameters.TaskOutputFolderPrefix", + "type": "Expression" + }, + "OutputStorageAccountName": { + "value": "@pipeline().parameters.OutputStorageAccountName", + "type": "Expression" + }, + "OutputContainerName": { + "value": "@pipeline().parameters.OutputContainerName", + "type": "Expression" + }, + "OutputFolderName": { + "value": "@pipeline().parameters.OutputFolderName", + "type": "Expression" + } + } + } + }, + { + "name": "Monitor Batch Job", + "type": "ExecutePipeline", + "dependsOn": [ + { + "activity": "Start Job", + "dependencyConditions": [ + "Succeeded" + ] + } + ], + "typeProperties": { + "pipeline": { + "referenceName": "4e66b9d6-d1b9-4d2b-9b89-4101def23c9a", + "type": "PipelineReference" + }, + "waitOnCompletion": true, + "parameters": { + "JobId": { + "value": "@pipeline().parameters.JobId", + "type": "Expression" + } + } + } + }, + { + "name": "Start Job", + "type": "WebActivity", + "dependsOn": [ + { + "activity": "Set Job Container URL", + "dependencyConditions": [ + "Succeeded" + ] + }, + { + "activity": "Set CommonEnvironmentSettings", + "dependencyConditions": [ + "Succeeded" + ] + }, + { + "activity": "Set ManagerApplicationPackagePath", + "dependencyConditions": [ + "Succeeded" + ] + }, + { + "activity": "Set WorkloadApplicationPackagePath", + "dependencyConditions": [ + "Succeeded" + ] + }, + { + "activity": "Create Job Storage Container", + "dependencyConditions": [ + "Succeeded" + ] + } + ], + "policy": { + "timeout": "0.12:00:00", + "retry": 0, + "retryIntervalInSeconds": 30, + "secureOutput": false, + "secureInput": false + }, + "typeProperties": { + "relativeUrl": "/jobs?api-version=2022-10-01.16.0", + "method": "POST", + "headers": { + "x-ms-version": "2023-01-03", + "Content-Type": "application/json; odata=minimalmetadata" + }, + "body": { + "value": "@concat('{\n \"id\": \"', pipeline().parameters.JobId,'\",\n \"priority\": 100,\n \"constraints\": {\n \"maxWallClockTime\":\"',pipeline().parameters.BatchJobTimeout,'\",\n \"maxTaskRetryCount\": 0\n },\n \"jobManagerTask\": {\n \"id\": \"Manager\",\n \"displayName\": \"Manager\",\n \"authenticationTokenSettings\": {\n \"access\": [\n \"job\"\n ]\n },\n \"commandLine\": \"/bin/bash -c \\\"python3 -m ensurepip --upgrade && python3 -m pip install --user ',variables('ManagerApplicationPackagePath'),' && python3 -m pip install --user ',variables('WorkloadApplicationPackagePath'),' && python3 -m ',pipeline().parameters.WorkloadApplicationPackageName,' job ', pipeline().parameters.ManagerTaskParameters,'\\\"\",\n \"applicationPackageReferences\": [\n {\n \"applicationId\": \"',pipeline().parameters.ManagerApplicationPackageName,'\",\n \"version\": \"',pipeline().parameters.ManagerApplicationPackageVersion,'\"\n },\n {\n \"applicationId\": \"',pipeline().parameters.WorkloadApplicationPackageName,'\",\n \"version\": \"',pipeline().parameters.WorkloadApplicationPackageVersion,'\"\n }\n ],\n \"outputFiles\": [\n {\n \"destination\": {\n \"container\": {\n \"containerUrl\": \"',variables('JobContainerURL'),'\",\n \"identityReference\": {\n \"resourceId\": \"',variables('UserAssignedIdentityReference'),'\"\n },\n \"path\": \"Manager/$TaskLog\"\n }\n },\n \"filePattern\": \"../*.txt\",\n \"uploadOptions\": {\n \"uploadCondition\": \"taskcompletion\"\n }\n }\n ],\n \"environmentSettings\": [],\n \"requiredSlots\": 1,\n \"killJobOnCompletion\": false,\n \"userIdentity\": {\n \"username\": null,\n \"autoUser\": {\n \"scope\": \"pool\",\n \"elevationLevel\": \"nonadmin\"\n }\n },\n \"runExclusive\": true,\n \"allowLowPriorityNode\": true\n },\n \"poolInfo\": {\n \"poolId\": \"',pipeline().parameters.BatchPoolId,'\"\n },\n \"onAllTasksComplete\": \"terminatejob\",\n \"onTaskFailure\": \"noaction\",\n \"usesTaskDependencies\": true,\n \"commonEnvironmentSettings\": ', string(union(variables('CommonEnvironmentSettings'), pipeline().parameters.JobAdditionalEnvironmentSettings)),\n'}')", + "type": "Expression" + } + }, + "externalReferences": { + "connection": "6d70b649-d684-439b-a9c2-d2bb5241cd39" + } + } + ], + "parameters": { + "BatchPoolId": { + "type": "string" + }, + "WorkloadApplicationPackageName": { + "type": "string" + }, + "WorkloadApplicationPackageVersion": { + "type": "string" + }, + "ManagerApplicationPackageName": { + "type": "string" + }, + "ManagerApplicationPackageVersion": { + "type": "string" + }, + "ManagerTaskParameters": { + "type": "string" + }, + "JobId": { + "type": "string" + }, + "TaskOutputFolderPrefix": { + "type": "string" + }, + "WorkloadUserAssignedIdentityName": { + "type": "string" + }, + "WorkloadUserAssignedIdentityClientId": { + "type": "string" + }, + "JobAdditionalEnvironmentSettings": { + "type": "array" + }, + "OutputStorageAccountName": { + "type": "string" + }, + "OutputContainerName": { + "type": "string" + }, + "OutputFolderName": { + "type": "string" + }, + "BatchJobTimeout": { + "type": "string", + "defaultValue": "PT8H" + }, + "BatchStorageAccountName": { + "type": "string" + }, + "BatchURI": { + "type": "string" + }, + "BatchAccountSubscription": { + "type": "string" + }, + "BatchAccountResourceGroup": { + "type": "string" + } + }, + "variables": { + "JobContainerName": { + "type": "String" + }, + "ManagerApplicationPackagePath": { + "type": "String" + }, + "WorkloadApplicationPackagePath": { + "type": "String" + }, + "UserAssignedIdentityReference": { + "type": "String" + }, + "CommonEnvironmentSettings": { + "type": "Array" + }, + "JobContainerURL": { + "type": "String" + } + }, + "annotations": [] + } +} \ No newline at end of file diff --git a/examples/fabric/batch_job/test_fabric_batchjob_functional.py b/examples/fabric/batch_job/test_fabric_batchjob_functional.py new file mode 100644 index 00000000..1afae13b --- /dev/null +++ b/examples/fabric/batch_job/test_fabric_batchjob_functional.py @@ -0,0 +1,247 @@ +import pytest +from data_factory_testing_framework.state import RunParameterType +from data_factory_testing_framework.state.run_parameter import RunParameter +from data_factory_testing_framework.test_framework import TestFramework, TestFrameworkType + + +def test_batch_job_pipeline(request: pytest.FixtureRequest) -> None: + # Arrange + test_framework = TestFramework(framework_type=TestFrameworkType.Fabric, root_folder_path=request.fspath.dirname) + pipeline = test_framework.repository.get_pipeline_by_name("batch_job") + + # Act + activities = test_framework.evaluate_pipeline( + pipeline, + [ + RunParameter(RunParameterType.Pipeline, "BatchPoolId", "batch-pool-id"), + RunParameter(RunParameterType.Pipeline, "WorkloadApplicationPackageName", "test-application"), + RunParameter(RunParameterType.Pipeline, "WorkloadApplicationPackageVersion", "1.5.0"), + RunParameter(RunParameterType.Pipeline, "ManagerApplicationPackageName", "batchmanager"), + RunParameter(RunParameterType.Pipeline, "ManagerApplicationPackageVersion", "2.0.0"), + RunParameter( + RunParameterType.Pipeline, + "ManagerTaskParameters", + "--parameter1 dummy --parameter2 another-dummy", + ), + RunParameter(RunParameterType.Pipeline, "JobId", "802100a5-ec79-4a52-be62-8d6109f3ff9a"), + RunParameter(RunParameterType.Pipeline, "TaskOutputFolderPrefix", "TASKOUTPUT_"), + RunParameter( + RunParameterType.Pipeline, + "WorkloadUserAssignedIdentityName", + "test-application-identity-name", + ), + RunParameter( + RunParameterType.Pipeline, + "WorkloadUserAssignedIdentityClientId", + "/subscriptions/SUBSCRIPTION_ID/resourcegroups/RESOURCE_GROUP/providers/Microsoft.ManagedIdentity/userAssignedIdentities/test-application-identity-name", + ), + RunParameter(RunParameterType.Pipeline, "JobAdditionalEnvironmentSettings", "[]"), + RunParameter( + RunParameterType.Pipeline, + "OutputStorageAccountName", + "test-application-output-storage-account-name", + ), + RunParameter(RunParameterType.Pipeline, "OutputContainerName", "test-application-output-container-name"), + RunParameter(RunParameterType.Pipeline, "OutputFolderName", "TEMP"), + RunParameter(RunParameterType.Pipeline, "BatchJobTimeout", "PT4H"), + RunParameter(RunParameterType.Pipeline, "BatchStorageAccountName", "batch-account-name"), + RunParameter(RunParameterType.Pipeline, "BatchAccountSubscription", "SUBSCRIPTION_ID"), + RunParameter(RunParameterType.Pipeline, "BatchAccountResourceGroup", "RESOURCE_GROUP"), + RunParameter( + RunParameterType.Pipeline, "BatchURI", "https://batch-account-name.westeurope.batch.azure.com" + ), + RunParameter(RunParameterType.Pipeline, "ADFSubscription", "bd19dba4-89ad-4976-b862-848bf43a4340"), + RunParameter(RunParameterType.Pipeline, "ADFResourceGroup", "adf-rg"), + RunParameter(RunParameterType.Pipeline, "ADFName", "adf-name"), + ], + ) + + # Assert + activity = next(activities) + assert activity.name == "Set UserAssignedIdentityReference" + assert activity.type_properties["variableName"] == "UserAssignedIdentityReference" + assert ( + activity.type_properties["value"].value + == "/subscriptions/SUBSCRIPTION_ID/resourcegroups/RESOURCE_GROUP/providers/Microsoft.ManagedIdentity/userAssignedIdentities/test-application-identity-name" # noqa: E501 + ) + + activity = next(activities) + assert activity.name == "Set ManagerApplicationPackagePath" + assert activity.type_properties["variableName"] == "ManagerApplicationPackagePath" + assert activity.type_properties["value"].value == "$AZ_BATCH_APP_PACKAGE_batchmanager_2_0_0/batchmanager.tar.gz" + + activity = next(activities) + assert activity.name == "Set WorkloadApplicationPackagePath" + assert activity.type_properties["variableName"] == "WorkloadApplicationPackagePath" + assert ( + activity.type_properties["value"].value + == "$AZ_BATCH_APP_PACKAGE_test-application_1_5_0/test-application.tar.gz" + ) + + activity = next(activities) + assert activity.name == "Set CommonEnvironmentSettings" + assert activity.type_properties["variableName"] == "CommonEnvironmentSettings" + # noqa: E501 + assert ( + activity.type_properties["value"].value + == """[ + { + "name": "WORKLOAD_APP_PACKAGE", + "value": "test-application" + }, + { + "name": "WORKLOAD_APP_PACKAGE_VERSION", + "value": "1.5.0" + }, + { + "name": "MANAGER_APP_PACKAGE", + "value": "batchmanager" + }, + { + "name": "MANAGER_APP_PACKAGE_VERSION", + "value": "2.0.0" + }, + { + "name": "BATCH_JOB_TIMEOUT", + "value": "PT4H" + }, + { + "name": "WORKLOAD_AUTO_STORAGE_ACCOUNT_NAME", + "value": "batch-account-name" + }, + { + "name": "WORKLOAD_USER_ASSIGNED_IDENTITY_RESOURCE_ID", + "value": "/subscriptions/SUBSCRIPTION_ID/resourcegroups/RESOURCE_GROUP/providers/Microsoft.ManagedIdentity/userAssignedIdentities/test-application-identity-name" + }, + { + "name": "WORKLOAD_USER_ASSIGNED_IDENTITY_CLIENT_ID", + "value": "/subscriptions/SUBSCRIPTION_ID/resourcegroups/RESOURCE_GROUP/providers/Microsoft.ManagedIdentity/userAssignedIdentities/test-application-identity-name" + } + ]""" # noqa: E501 + ) + + activity = next(activities) + assert activity.name == "Set JobContainerName" + assert activity.type_properties["variableName"] == "JobContainerName" + assert activity.type_properties["value"].value == "job-802100a5-ec79-4a52-be62-8d6109f3ff9a" + + activity = next(activities) + assert activity.name == "Set Job Container URL" + assert activity.type_properties["variableName"] == "JobContainerURL" + assert ( + activity.type_properties["value"].value + == "https://batch-account-name.blob.core.windows.net/job-802100a5-ec79-4a52-be62-8d6109f3ff9a" + ) + + activity = next(activities) + assert activity.name == "Create Job Storage Container" + assert ( + activity.type_properties["relativeUrl"].value + == "https://batch-account-name.blob.core.windows.net/job-802100a5-ec79-4a52-be62-8d6109f3ff9a?restype=container" + ) + assert activity.type_properties["method"] == "PUT" + assert activity.type_properties["body"].value == "{}" + + activity = next(activities) + assert activity.name == "Start Job" + assert activity.type_properties["relativeUrl"] == "/jobs?api-version=2022-10-01.16.0" + assert activity.type_properties["method"] == "POST" + assert ( + activity.type_properties["body"].value + == """{ + "id": "802100a5-ec79-4a52-be62-8d6109f3ff9a", + "priority": 100, + "constraints": { + "maxWallClockTime":"PT4H", + "maxTaskRetryCount": 0 + }, + "jobManagerTask": { + "id": "Manager", + "displayName": "Manager", + "authenticationTokenSettings": { + "access": [ + "job" + ] + }, + "commandLine": "/bin/bash -c \\"python3 -m ensurepip --upgrade && python3 -m pip install --user $AZ_BATCH_APP_PACKAGE_batchmanager_2_0_0/batchmanager.tar.gz && python3 -m pip install --user $AZ_BATCH_APP_PACKAGE_test-application_1_5_0/test-application.tar.gz && python3 -m test-application job --parameter1 dummy --parameter2 another-dummy\\"", + "applicationPackageReferences": [ + { + "applicationId": "batchmanager", + "version": "2.0.0" + }, + { + "applicationId": "test-application", + "version": "1.5.0" + } + ], + "outputFiles": [ + { + "destination": { + "container": { + "containerUrl": "https://batch-account-name.blob.core.windows.net/job-802100a5-ec79-4a52-be62-8d6109f3ff9a", + "identityReference": { + "resourceId": "/subscriptions/SUBSCRIPTION_ID/resourcegroups/RESOURCE_GROUP/providers/Microsoft.ManagedIdentity/userAssignedIdentities/test-application-identity-name" + }, + "path": "Manager/$TaskLog" + } + }, + "filePattern": "../*.txt", + "uploadOptions": { + "uploadCondition": "taskcompletion" + } + } + ], + "environmentSettings": [], + "requiredSlots": 1, + "killJobOnCompletion": false, + "userIdentity": { + "username": null, + "autoUser": { + "scope": "pool", + "elevationLevel": "nonadmin" + } + }, + "runExclusive": true, + "allowLowPriorityNode": true + }, + "poolInfo": { + "poolId": "batch-pool-id" + }, + "onAllTasksComplete": "terminatejob", + "onTaskFailure": "noaction", + "usesTaskDependencies": true, + "commonEnvironmentSettings": [{"name": "WORKLOAD_APP_PACKAGE", "value": "test-application"}, {"name": "WORKLOAD_APP_PACKAGE_VERSION", "value": "1.5.0"}, {"name": "MANAGER_APP_PACKAGE", "value": "batchmanager"}, {"name": "MANAGER_APP_PACKAGE_VERSION", "value": "2.0.0"}, {"name": "BATCH_JOB_TIMEOUT", "value": "PT4H"}, {"name": "WORKLOAD_AUTO_STORAGE_ACCOUNT_NAME", "value": "batch-account-name"}, {"name": "WORKLOAD_USER_ASSIGNED_IDENTITY_RESOURCE_ID", "value": "/subscriptions/SUBSCRIPTION_ID/resourcegroups/RESOURCE_GROUP/providers/Microsoft.ManagedIdentity/userAssignedIdentities/test-application-identity-name"}, {"name": "WORKLOAD_USER_ASSIGNED_IDENTITY_CLIENT_ID", "value": "/subscriptions/SUBSCRIPTION_ID/resourcegroups/RESOURCE_GROUP/providers/Microsoft.ManagedIdentity/userAssignedIdentities/test-application-identity-name"}]}""" # noqa: E501 + ) + + activity = next(activities) + assert activity.name == "Monitor Batch Job" + assert activity.type_properties["pipeline"]["referenceName"] == "4e66b9d6-d1b9-4d2b-9b89-4101def23c9a" + assert len(activity.type_properties["parameters"]) == 1 + assert activity.type_properties["parameters"]["JobId"].value == "802100a5-ec79-4a52-be62-8d6109f3ff9a" + + activity = next(activities) + assert activity.name == "Copy Output Files" + assert activity.type_properties["pipeline"]["referenceName"] == "4e66b9d6-d1b9-4d2b-9b89-4101def23c9a" + assert len(activity.type_properties["parameters"]) == 5 + assert ( + activity.type_properties["parameters"]["JobContainerName"].value == "job-802100a5-ec79-4a52-be62-8d6109f3ff9a" + ) + assert activity.type_properties["parameters"]["TaskOutputFolderPrefix"].value == "TASKOUTPUT_" + assert ( + activity.type_properties["parameters"]["OutputStorageAccountName"].value + == "test-application-output-storage-account-name" + ) + assert ( + activity.type_properties["parameters"]["OutputContainerName"].value == "test-application-output-container-name" + ) + assert activity.type_properties["parameters"]["OutputFolderName"].value == "TEMP" + + activity = next(activities) + assert activity.name == "Delete Job Storage Container" + assert activity.type_properties["relativeUrl"].value == "job-802100a5-ec79-4a52-be62-8d6109f3ff9a?restype=container" + assert activity.type_properties["method"] == "DELETE" + assert "body" not in activity.type_properties + + # Assert that there are no more activities + with pytest.raises(StopIteration): + next(activities) diff --git a/examples/fabric/batch_job/test_fabric_batchjob_unit.py b/examples/fabric/batch_job/test_fabric_batchjob_unit.py new file mode 100644 index 00000000..6683c5dd --- /dev/null +++ b/examples/fabric/batch_job/test_fabric_batchjob_unit.py @@ -0,0 +1,450 @@ +# flake8: noqa: E501 +import pytest +from data_factory_testing_framework.models.pipeline import Pipeline +from data_factory_testing_framework.state import ( + PipelineRunState, + PipelineRunVariable, + RunParameter, + RunParameterType, +) +from data_factory_testing_framework.test_framework import TestFramework, TestFrameworkType + + +@pytest.fixture +def test_framework(request: pytest.FixtureRequest) -> TestFramework: + return TestFramework( + framework_type=TestFrameworkType.Fabric, + root_folder_path=request.fspath.dirname, + ) + + +@pytest.fixture +def pipeline(test_framework: TestFramework) -> Pipeline: + return test_framework.repository.get_pipeline_by_name("batch_job") + + +def test_set_job_container_url(test_framework: TestFramework, pipeline: Pipeline) -> None: + int(1.1) + # Arrange + activity = pipeline.get_activity_by_name("Set Job Container URL") + state = PipelineRunState( + variables=[ + PipelineRunVariable(name="JobContainerURL"), + PipelineRunVariable(name="JobContainerName", default_value="job-8b6b545b-c583-4a06-adf7-19ff41370aba"), + ], + parameters=[ + RunParameter[str](RunParameterType.Pipeline, "BatchStorageAccountName", "batch-account-name"), + ], + ) + + # Act + activity.evaluate(state) + + # Assert + updated_variable = state.get_variable_by_name("JobContainerURL") + expected_url = "https://batch-account-name.blob.core.windows.net/job-8b6b545b-c583-4a06-adf7-19ff41370aba" + assert expected_url == activity.type_properties["value"].value + assert expected_url == updated_variable.value + + +def test_set_user_assigned_identity_reference(test_framework: TestFramework, pipeline: Pipeline) -> None: + # Arrange + activity = pipeline.get_activity_by_name("Set UserAssignedIdentityReference") + state = PipelineRunState( + variables=[ + PipelineRunVariable(name="UserAssignedIdentityReference"), + ], + parameters=[ + RunParameter[str](RunParameterType.Pipeline, "BatchAccountSubscription", "batch-account-subscription"), + RunParameter[str](RunParameterType.Pipeline, "BatchAccountResourceGroup", "batch-account-resource-group"), + RunParameter[str]( + RunParameterType.Pipeline, + "WorkloadUserAssignedIdentityName", + "workload-user-assigned-identity-name", + ), + ], + ) + + # Act + activity.evaluate(state) + + # Assert + updated_variable = state.get_variable_by_name("UserAssignedIdentityReference") + expected_reference = "/subscriptions/batch-account-subscription/resourcegroups/batch-account-resource-group/providers/Microsoft.ManagedIdentity/userAssignedIdentities/workload-user-assigned-identity-name" + assert expected_reference == activity.type_properties["value"].value + assert expected_reference == updated_variable.value + + +def test_set_manager_application_package_path(test_framework: TestFramework, pipeline: Pipeline) -> None: + # Arrange + activity = pipeline.get_activity_by_name("Set ManagerApplicationPackagePath") + state = PipelineRunState( + variables=[ + PipelineRunVariable(name="ManagerApplicationPackagePath"), + ], + parameters=[ + RunParameter[str](RunParameterType.Pipeline, "ManagerApplicationPackageName", "managerworkload"), + RunParameter[str](RunParameterType.Pipeline, "ManagerApplicationPackageVersion", "0.13.2"), + ], + ) + + # Act + activity.evaluate(state) + + # Assert + updated_variable = state.get_variable_by_name("ManagerApplicationPackagePath") + expected_path = "$AZ_BATCH_APP_PACKAGE_managerworkload_0_13_2/managerworkload.tar.gz" + assert expected_path == activity.type_properties["value"].value + assert expected_path == updated_variable.value + + +def test_set_workload_application_package_path(test_framework: TestFramework, pipeline: Pipeline) -> None: + # Arrange + activity = pipeline.get_activity_by_name("Set WorkloadApplicationPackagePath") + state = PipelineRunState( + variables=[ + PipelineRunVariable(name="WorkloadApplicationPackagePath"), + ], + parameters=[ + RunParameter[str](RunParameterType.Pipeline, "WorkloadApplicationPackageName", "workload"), + RunParameter[str](RunParameterType.Pipeline, "WorkloadApplicationPackageVersion", "0.13.2"), + ], + ) + + # Act + activity.evaluate(state) + + # Assert + updated_variable = state.get_variable_by_name("WorkloadApplicationPackagePath") + expected_path = "$AZ_BATCH_APP_PACKAGE_workload_0_13_2/workload.tar.gz" + assert expected_path == activity.type_properties["value"].value + assert expected_path == updated_variable.value + + +def test_set_common_environment_settings(test_framework: TestFramework, pipeline: Pipeline) -> None: + # Arrange + activity = pipeline.get_activity_by_name("Set CommonEnvironmentSettings") + state = PipelineRunState( + variables=[ + PipelineRunVariable(name="CommonEnvironmentSettings"), + PipelineRunVariable( + name="UserAssignedIdentityReference", + default_value="/subscriptions/batch-account-subscription/resourcegroups/batch-account-resource-group/providers/Microsoft.ManagedIdentity/userAssignedIdentities/workload-user-assigned-identity-name", + ), + ], + parameters=[ + RunParameter[str](RunParameterType.Pipeline, "WorkloadApplicationPackageName", "workload"), + RunParameter[str](RunParameterType.Pipeline, "WorkloadApplicationPackageVersion", "0.13.2"), + RunParameter[str](RunParameterType.Pipeline, "ManagerApplicationPackageName", "managerworkload"), + RunParameter[str](RunParameterType.Pipeline, "ManagerApplicationPackageVersion", "0.13.2"), + RunParameter[str](RunParameterType.Pipeline, "BatchJobTimeout", "PT4H"), + RunParameter[str](RunParameterType.Pipeline, "BatchStorageAccountName", "batch-account-name"), + RunParameter[str]( + RunParameterType.Pipeline, + "WorkloadUserAssignedIdentityName", + "workload-user-assigned-identity-name", + ), + RunParameter[str]( + RunParameterType.Pipeline, + "WorkloadUserAssignedIdentityClientId", + "workload-user-assigned-identity-client-id", + ), + ], + ) + + # Act + activity.evaluate(state) + + # Assert + expected_settings = """[ + { + "name": "WORKLOAD_APP_PACKAGE", + "value": "workload" + }, + { + "name": "WORKLOAD_APP_PACKAGE_VERSION", + "value": "0.13.2" + }, + { + "name": "MANAGER_APP_PACKAGE", + "value": "managerworkload" + }, + { + "name": "MANAGER_APP_PACKAGE_VERSION", + "value": "0.13.2" + }, + { + "name": "BATCH_JOB_TIMEOUT", + "value": "PT4H" + }, + { + "name": "WORKLOAD_AUTO_STORAGE_ACCOUNT_NAME", + "value": "batch-account-name" + }, + { + "name": "WORKLOAD_USER_ASSIGNED_IDENTITY_RESOURCE_ID", + "value": "/subscriptions/batch-account-subscription/resourcegroups/batch-account-resource-group/providers/Microsoft.ManagedIdentity/userAssignedIdentities/workload-user-assigned-identity-name" + }, + { + "name": "WORKLOAD_USER_ASSIGNED_IDENTITY_CLIENT_ID", + "value": "workload-user-assigned-identity-client-id" + } + ]""" + assert expected_settings == activity.type_properties["value"].value + assert expected_settings == state.get_variable_by_name("CommonEnvironmentSettings").value + + +def test_create_job_storage_container(test_framework: TestFramework, pipeline: Pipeline) -> None: + # Arrange + activity = pipeline.get_activity_by_name("Create Job Storage Container") + state = PipelineRunState( + variables=[ + PipelineRunVariable(name="JobContainerURL", default_value="/job-8b6b545b-c583-4a06-adf7-19ff41370aba"), + ] + ) + + # Act + activity.evaluate(state) + + # Assert + assert "Create Job Storage Container" == activity.name + assert ( + "/job-8b6b545b-c583-4a06-adf7-19ff41370aba?restype=container" == activity.type_properties["relativeUrl"].value + ) + assert "PUT" == activity.type_properties["method"] + assert "{}" == activity.type_properties["body"].value + + +def test_set_job_container_name(test_framework: TestFramework, pipeline: Pipeline) -> None: + # Arrange + activity = pipeline.get_activity_by_name("Set JobContainerName") + state = PipelineRunState( + variables=[ + PipelineRunVariable(name="JobContainerName"), + ], + parameters=[RunParameter[str](RunParameterType.Pipeline, "JobId", "8b6b545b-c583-4a06-adf7-19ff41370aba")], + ) + + # Act + activity.evaluate(state) + + # Assert + job_container_name_variable = state.get_variable_by_name("JobContainerName") + assert "job-8b6b545b-c583-4a06-adf7-19ff41370aba" == activity.type_properties["value"].value + assert "job-8b6b545b-c583-4a06-adf7-19ff41370aba" == job_container_name_variable.value + + +def test_start_job_pipeline(test_framework: TestFramework, pipeline: Pipeline) -> None: + # Arrange + activity = pipeline.get_activity_by_name("Start Job") + state = PipelineRunState( + parameters=[ + RunParameter[str]( + RunParameterType.Pipeline, + "BatchURI", + "https://batch-account-name.westeurope.batch.azure.com", + ), + RunParameter[str](RunParameterType.Pipeline, "BatchStorageAccountName", "batchstorage"), + RunParameter[str](RunParameterType.Pipeline, "ADFSubscription", "d9153e28-dd4e-446c-91e4-0b1331b523f1"), + RunParameter[str](RunParameterType.Pipeline, "ADFResourceGroup", "adf-rg"), + RunParameter[str](RunParameterType.Pipeline, "ADFName", "adf-name"), + RunParameter[str](RunParameterType.Pipeline, "JobId", "8b6b545b-c583-4a06-adf7-19ff41370aba"), + RunParameter[str](RunParameterType.Pipeline, "BatchJobTimeout", "PT4H"), + RunParameter[str](RunParameterType.Pipeline, "BatchPoolId", "test-application-batch-pool-id"), + RunParameter[str](RunParameterType.Pipeline, "WorkloadApplicationPackageName", "test-application-name"), + RunParameter[str](RunParameterType.Pipeline, "WorkloadApplicationPackageVersion", "1.5.0"), + RunParameter[str](RunParameterType.Pipeline, "ManagerApplicationPackageName", "batchmanager"), + RunParameter[str](RunParameterType.Pipeline, "ManagerApplicationPackageVersion", "2.0.0"), + RunParameter[str]( + RunParameterType.Pipeline, + "ManagerTaskParameters", + "--parameter1 dummy --parameter2 another-dummy", + ), + RunParameter[str]( + RunParameterType.Pipeline, + "WorkloadUserAssignedIdentityName", + "test-application-batch-pool-id", + ), + RunParameter[str]( + RunParameterType.Pipeline, + "WorkloadUserAssignedIdentityClientId", + "test-application-identity-client-id", + ), + RunParameter[str]( + RunParameterType.Pipeline, + "JobAdditionalEnvironmentSettings", + '[{"name": "STORAGE_ACCOUNT_NAME", "value": "teststorage"}]', + ), + ], + variables=[ + PipelineRunVariable(name="JobContainerURL", default_value="/job-8b6b545b-c583-4a06-adf7-19ff41370aba"), + PipelineRunVariable( + name="UserAssignedIdentityReference", + default_value="/subscriptions/batch-account-subscription/resourcegroups/batch-account-resource-group/providers/Microsoft.ManagedIdentity/userAssignedIdentities/workload-user-assigned-identity-name", + ), + PipelineRunVariable( + name="ManagerApplicationPackagePath", + default_value="$AZ_BATCH_APP_PACKAGE_managerworkload_0_13_2/managerworkload.tar.gz", + ), + PipelineRunVariable( + name="WorkloadApplicationPackagePath", + default_value="$AZ_BATCH_APP_PACKAGE_workload_0_13_2/workload.tar.gz", + ), + PipelineRunVariable( + name="CommonEnvironmentSettings", default_value='[{"name": "COMMON_ENV_SETTING", "value": "dummy"}]' + ), + ], + ) + + # Act + activity.evaluate(state) + + # Assert + assert "Start Job" == activity.name + assert "/jobs?api-version=2022-10-01.16.0" == activity.type_properties["relativeUrl"] + assert "POST" == activity.type_properties["method"] + + expected_body = """{ + "id": "8b6b545b-c583-4a06-adf7-19ff41370aba", + "priority": 100, + "constraints": { + "maxWallClockTime":"PT4H", + "maxTaskRetryCount": 0 + }, + "jobManagerTask": { + "id": "Manager", + "displayName": "Manager", + "authenticationTokenSettings": { + "access": [ + "job" + ] + }, + "commandLine": "/bin/bash -c \\"python3 -m ensurepip --upgrade && python3 -m pip install --user $AZ_BATCH_APP_PACKAGE_managerworkload_0_13_2/managerworkload.tar.gz && python3 -m pip install --user $AZ_BATCH_APP_PACKAGE_workload_0_13_2/workload.tar.gz && python3 -m test-application-name job --parameter1 dummy --parameter2 another-dummy\\"", + "applicationPackageReferences": [ + { + "applicationId": "batchmanager", + "version": "2.0.0" + }, + { + "applicationId": "test-application-name", + "version": "1.5.0" + } + ], + "outputFiles": [ + { + "destination": { + "container": { + "containerUrl": "/job-8b6b545b-c583-4a06-adf7-19ff41370aba", + "identityReference": { + "resourceId": "/subscriptions/batch-account-subscription/resourcegroups/batch-account-resource-group/providers/Microsoft.ManagedIdentity/userAssignedIdentities/workload-user-assigned-identity-name" + }, + "path": "Manager/$TaskLog" + } + }, + "filePattern": "../*.txt", + "uploadOptions": { + "uploadCondition": "taskcompletion" + } + } + ], + "environmentSettings": [], + "requiredSlots": 1, + "killJobOnCompletion": false, + "userIdentity": { + "username": null, + "autoUser": { + "scope": "pool", + "elevationLevel": "nonadmin" + } + }, + "runExclusive": true, + "allowLowPriorityNode": true + }, + "poolInfo": { + "poolId": "test-application-batch-pool-id" + }, + "onAllTasksComplete": "terminatejob", + "onTaskFailure": "noaction", + "usesTaskDependencies": true, + "commonEnvironmentSettings": [{"name": "COMMON_ENV_SETTING", "value": "dummy"}, {"name": "STORAGE_ACCOUNT_NAME", "value": "teststorage"}]}""" + + assert expected_body == activity.type_properties["body"].value + + +def test_monitor_job(test_framework: TestFramework, pipeline: Pipeline) -> None: + # Arrange + activity = pipeline.get_activity_by_name("Monitor Batch Job") + state = PipelineRunState( + parameters=[ + RunParameter[str](RunParameterType.Pipeline, "JobId", "8b6b545b-c583-4a06-adf7-19ff41370aba"), + ], + ) + + # Act + activity.evaluate(state) + + # Assert + assert "Monitor Batch Job" == activity.name + assert "4e66b9d6-d1b9-4d2b-9b89-4101def23c9a" == activity.type_properties["pipeline"]["referenceName"] + assert 1 == len(activity.type_properties["parameters"]) + assert "8b6b545b-c583-4a06-adf7-19ff41370aba" == activity.type_properties["parameters"]["JobId"].value + + +def test_copy_output_files(test_framework: TestFramework, pipeline: Pipeline) -> None: + # Arrange + activity = pipeline.get_activity_by_name("Copy Output Files") + state = PipelineRunState( + variables=[ + PipelineRunVariable(name="JobContainerName", default_value="job-8b6b545b-c583-4a06-adf7-19ff41370aba"), + ], + parameters=[ + RunParameter[str](RunParameterType.Pipeline, "TaskOutputFolderPrefix", "TASKOUTPUT_"), + RunParameter[str](RunParameterType.Pipeline, "OutputStorageAccountName", "teststorage"), + RunParameter[str]( + RunParameterType.Pipeline, + "OutputContainerName", + "test-application-output-container-name", + ), + RunParameter[str](RunParameterType.Pipeline, "OutputFolderName", "output"), + ], + ) + + # Act + activity.evaluate(state) + + # Assert + assert "Copy Output Files" == activity.name + assert "4e66b9d6-d1b9-4d2b-9b89-4101def23c9a" == activity.type_properties["pipeline"]["referenceName"] + assert 5 == len(activity.type_properties["parameters"]) + assert ( + "job-8b6b545b-c583-4a06-adf7-19ff41370aba" == activity.type_properties["parameters"]["JobContainerName"].value + ) + assert "TASKOUTPUT_" == activity.type_properties["parameters"]["TaskOutputFolderPrefix"].value + assert "teststorage" == activity.type_properties["parameters"]["OutputStorageAccountName"].value + assert ( + "test-application-output-container-name" == activity.type_properties["parameters"]["OutputContainerName"].value + ) + assert "output" == activity.type_properties["parameters"]["OutputFolderName"].value + + +def test_delete_job_storage_container(test_framework: TestFramework, pipeline: Pipeline) -> None: + # Arrange + activity = pipeline.get_activity_by_name("Delete Job Storage Container") + state = PipelineRunState( + variables=[ + PipelineRunVariable(name="JobContainerName", default_value="/job-8b6b545b-c583-4a06-adf7-19ff41370aba"), + ], + parameters=[ + RunParameter[str](RunParameterType.Pipeline, "BatchStorageAccountName", "batchstorage"), + ], + ) + + # Act + activity.evaluate(state) + + # Assert + assert "Delete Job Storage Container" == activity.name + assert ( + "/job-8b6b545b-c583-4a06-adf7-19ff41370aba?restype=container" == activity.type_properties["relativeUrl"].value + ) + assert "DELETE" == activity.type_properties["method"] diff --git a/poetry.lock b/poetry.lock new file mode 100644 index 00000000..c92d4647 --- /dev/null +++ b/poetry.lock @@ -0,0 +1,791 @@ +# This file is automatically @generated by Poetry 1.6.1 and should not be changed by hand. + +[[package]] +name = "astor" +version = "0.8.1" +description = "Read/rewrite/write Python ASTs" +optional = false +python-versions = "!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,>=2.7" +files = [ + {file = "astor-0.8.1-py2.py3-none-any.whl", hash = "sha256:070a54e890cefb5b3739d19f30f5a5ec840ffc9c50ffa7d23cc9fc1a38ebbfc5"}, + {file = "astor-0.8.1.tar.gz", hash = "sha256:6a6effda93f4e1ce9f618779b2dd1d9d84f1e32812c23a29b3fff6fd7f63fa5e"}, +] + +[[package]] +name = "azure-core" +version = "1.29.5" +description = "Microsoft Azure Core Library for Python" +optional = false +python-versions = ">=3.7" +files = [ + {file = "azure-core-1.29.5.tar.gz", hash = "sha256:52983c89d394c6f881a121e5101c5fa67278ca3b1f339c8fb2ef39230c70e9ac"}, + {file = "azure_core-1.29.5-py3-none-any.whl", hash = "sha256:0fa04b7b1f7d44a4fb8468c4093deb2ea01fdf4faddbf802ed9205615f99d68c"}, +] + +[package.dependencies] +requests = ">=2.18.4" +six = ">=1.11.0" +typing-extensions = ">=4.6.0" + +[package.extras] +aio = ["aiohttp (>=3.0)"] + +[[package]] +name = "certifi" +version = "2023.11.17" +description = "Python package for providing Mozilla's CA Bundle." +optional = false +python-versions = ">=3.6" +files = [ + {file = "certifi-2023.11.17-py3-none-any.whl", hash = "sha256:e036ab49d5b79556f99cfc2d9320b34cfbe5be05c5871b51de9329f0603b0474"}, + {file = "certifi-2023.11.17.tar.gz", hash = "sha256:9b469f3a900bf28dc19b8cfbf8019bf47f7fdd1a65a1d4ffb98fc14166beb4d1"}, +] + +[[package]] +name = "cfgv" +version = "3.4.0" +description = "Validate configuration and produce human readable error messages." +optional = false +python-versions = ">=3.8" +files = [ + {file = "cfgv-3.4.0-py2.py3-none-any.whl", hash = "sha256:b7265b1f29fd3316bfcd2b330d63d024f2bfd8bcb8b0272f8e19a504856c48f9"}, + {file = "cfgv-3.4.0.tar.gz", hash = "sha256:e52591d4c5f5dead8e0f673fb16db7949d2cfb3f7da4582893288f0ded8fe560"}, +] + +[[package]] +name = "charset-normalizer" +version = "3.3.2" +description = "The Real First Universal Charset Detector. Open, modern and actively maintained alternative to Chardet." +optional = false +python-versions = ">=3.7.0" +files = [ + {file = "charset-normalizer-3.3.2.tar.gz", hash = "sha256:f30c3cb33b24454a82faecaf01b19c18562b1e89558fb6c56de4d9118a032fd5"}, + {file = "charset_normalizer-3.3.2-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:25baf083bf6f6b341f4121c2f3c548875ee6f5339300e08be3f2b2ba1721cdd3"}, + {file = "charset_normalizer-3.3.2-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:06435b539f889b1f6f4ac1758871aae42dc3a8c0e24ac9e60c2384973ad73027"}, + {file = "charset_normalizer-3.3.2-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:9063e24fdb1e498ab71cb7419e24622516c4a04476b17a2dab57e8baa30d6e03"}, + {file = "charset_normalizer-3.3.2-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:6897af51655e3691ff853668779c7bad41579facacf5fd7253b0133308cf000d"}, + {file = "charset_normalizer-3.3.2-cp310-cp310-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:1d3193f4a680c64b4b6a9115943538edb896edc190f0b222e73761716519268e"}, + {file = "charset_normalizer-3.3.2-cp310-cp310-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:cd70574b12bb8a4d2aaa0094515df2463cb429d8536cfb6c7ce983246983e5a6"}, + {file = "charset_normalizer-3.3.2-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:8465322196c8b4d7ab6d1e049e4c5cb460d0394da4a27d23cc242fbf0034b6b5"}, + {file = "charset_normalizer-3.3.2-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:a9a8e9031d613fd2009c182b69c7b2c1ef8239a0efb1df3f7c8da66d5dd3d537"}, + {file = "charset_normalizer-3.3.2-cp310-cp310-musllinux_1_1_aarch64.whl", hash = "sha256:beb58fe5cdb101e3a055192ac291b7a21e3b7ef4f67fa1d74e331a7f2124341c"}, + {file = "charset_normalizer-3.3.2-cp310-cp310-musllinux_1_1_i686.whl", hash = "sha256:e06ed3eb3218bc64786f7db41917d4e686cc4856944f53d5bdf83a6884432e12"}, + {file = "charset_normalizer-3.3.2-cp310-cp310-musllinux_1_1_ppc64le.whl", hash = "sha256:2e81c7b9c8979ce92ed306c249d46894776a909505d8f5a4ba55b14206e3222f"}, + {file = "charset_normalizer-3.3.2-cp310-cp310-musllinux_1_1_s390x.whl", hash = "sha256:572c3763a264ba47b3cf708a44ce965d98555f618ca42c926a9c1616d8f34269"}, + {file = "charset_normalizer-3.3.2-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:fd1abc0d89e30cc4e02e4064dc67fcc51bd941eb395c502aac3ec19fab46b519"}, + {file = "charset_normalizer-3.3.2-cp310-cp310-win32.whl", hash = "sha256:3d47fa203a7bd9c5b6cee4736ee84ca03b8ef23193c0d1ca99b5089f72645c73"}, + {file = "charset_normalizer-3.3.2-cp310-cp310-win_amd64.whl", hash = "sha256:10955842570876604d404661fbccbc9c7e684caf432c09c715ec38fbae45ae09"}, + {file = "charset_normalizer-3.3.2-cp311-cp311-macosx_10_9_universal2.whl", hash = "sha256:802fe99cca7457642125a8a88a084cef28ff0cf9407060f7b93dca5aa25480db"}, + {file = "charset_normalizer-3.3.2-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:573f6eac48f4769d667c4442081b1794f52919e7edada77495aaed9236d13a96"}, + {file = "charset_normalizer-3.3.2-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:549a3a73da901d5bc3ce8d24e0600d1fa85524c10287f6004fbab87672bf3e1e"}, + {file = "charset_normalizer-3.3.2-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:f27273b60488abe721a075bcca6d7f3964f9f6f067c8c4c605743023d7d3944f"}, + {file = "charset_normalizer-3.3.2-cp311-cp311-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:1ceae2f17a9c33cb48e3263960dc5fc8005351ee19db217e9b1bb15d28c02574"}, + {file = "charset_normalizer-3.3.2-cp311-cp311-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:65f6f63034100ead094b8744b3b97965785388f308a64cf8d7c34f2f2e5be0c4"}, + {file = "charset_normalizer-3.3.2-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:753f10e867343b4511128c6ed8c82f7bec3bd026875576dfd88483c5c73b2fd8"}, + {file = "charset_normalizer-3.3.2-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:4a78b2b446bd7c934f5dcedc588903fb2f5eec172f3d29e52a9096a43722adfc"}, + {file = "charset_normalizer-3.3.2-cp311-cp311-musllinux_1_1_aarch64.whl", hash = "sha256:e537484df0d8f426ce2afb2d0f8e1c3d0b114b83f8850e5f2fbea0e797bd82ae"}, + {file = "charset_normalizer-3.3.2-cp311-cp311-musllinux_1_1_i686.whl", hash = "sha256:eb6904c354526e758fda7167b33005998fb68c46fbc10e013ca97f21ca5c8887"}, + {file = "charset_normalizer-3.3.2-cp311-cp311-musllinux_1_1_ppc64le.whl", hash = "sha256:deb6be0ac38ece9ba87dea880e438f25ca3eddfac8b002a2ec3d9183a454e8ae"}, + {file = "charset_normalizer-3.3.2-cp311-cp311-musllinux_1_1_s390x.whl", hash = "sha256:4ab2fe47fae9e0f9dee8c04187ce5d09f48eabe611be8259444906793ab7cbce"}, + {file = "charset_normalizer-3.3.2-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:80402cd6ee291dcb72644d6eac93785fe2c8b9cb30893c1af5b8fdd753b9d40f"}, + {file = "charset_normalizer-3.3.2-cp311-cp311-win32.whl", hash = "sha256:7cd13a2e3ddeed6913a65e66e94b51d80a041145a026c27e6bb76c31a853c6ab"}, + {file = "charset_normalizer-3.3.2-cp311-cp311-win_amd64.whl", hash = "sha256:663946639d296df6a2bb2aa51b60a2454ca1cb29835324c640dafb5ff2131a77"}, + {file = "charset_normalizer-3.3.2-cp312-cp312-macosx_10_9_universal2.whl", hash = "sha256:0b2b64d2bb6d3fb9112bafa732def486049e63de9618b5843bcdd081d8144cd8"}, + {file = "charset_normalizer-3.3.2-cp312-cp312-macosx_10_9_x86_64.whl", hash = "sha256:ddbb2551d7e0102e7252db79ba445cdab71b26640817ab1e3e3648dad515003b"}, + {file = "charset_normalizer-3.3.2-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:55086ee1064215781fff39a1af09518bc9255b50d6333f2e4c74ca09fac6a8f6"}, + {file = "charset_normalizer-3.3.2-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:8f4a014bc36d3c57402e2977dada34f9c12300af536839dc38c0beab8878f38a"}, + {file = "charset_normalizer-3.3.2-cp312-cp312-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:a10af20b82360ab00827f916a6058451b723b4e65030c5a18577c8b2de5b3389"}, + {file = "charset_normalizer-3.3.2-cp312-cp312-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:8d756e44e94489e49571086ef83b2bb8ce311e730092d2c34ca8f7d925cb20aa"}, + {file = "charset_normalizer-3.3.2-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:90d558489962fd4918143277a773316e56c72da56ec7aa3dc3dbbe20fdfed15b"}, + {file = "charset_normalizer-3.3.2-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:6ac7ffc7ad6d040517be39eb591cac5ff87416c2537df6ba3cba3bae290c0fed"}, + {file = "charset_normalizer-3.3.2-cp312-cp312-musllinux_1_1_aarch64.whl", hash = "sha256:7ed9e526742851e8d5cc9e6cf41427dfc6068d4f5a3bb03659444b4cabf6bc26"}, + {file = "charset_normalizer-3.3.2-cp312-cp312-musllinux_1_1_i686.whl", hash = "sha256:8bdb58ff7ba23002a4c5808d608e4e6c687175724f54a5dade5fa8c67b604e4d"}, + {file = "charset_normalizer-3.3.2-cp312-cp312-musllinux_1_1_ppc64le.whl", hash = "sha256:6b3251890fff30ee142c44144871185dbe13b11bab478a88887a639655be1068"}, + {file = "charset_normalizer-3.3.2-cp312-cp312-musllinux_1_1_s390x.whl", hash = "sha256:b4a23f61ce87adf89be746c8a8974fe1c823c891d8f86eb218bb957c924bb143"}, + {file = "charset_normalizer-3.3.2-cp312-cp312-musllinux_1_1_x86_64.whl", hash = "sha256:efcb3f6676480691518c177e3b465bcddf57cea040302f9f4e6e191af91174d4"}, + {file = "charset_normalizer-3.3.2-cp312-cp312-win32.whl", hash = "sha256:d965bba47ddeec8cd560687584e88cf699fd28f192ceb452d1d7ee807c5597b7"}, + {file = "charset_normalizer-3.3.2-cp312-cp312-win_amd64.whl", hash = "sha256:96b02a3dc4381e5494fad39be677abcb5e6634bf7b4fa83a6dd3112607547001"}, + {file = "charset_normalizer-3.3.2-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:95f2a5796329323b8f0512e09dbb7a1860c46a39da62ecb2324f116fa8fdc85c"}, + {file = "charset_normalizer-3.3.2-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:c002b4ffc0be611f0d9da932eb0f704fe2602a9a949d1f738e4c34c75b0863d5"}, + {file = "charset_normalizer-3.3.2-cp37-cp37m-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:a981a536974bbc7a512cf44ed14938cf01030a99e9b3a06dd59578882f06f985"}, + {file = "charset_normalizer-3.3.2-cp37-cp37m-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:3287761bc4ee9e33561a7e058c72ac0938c4f57fe49a09eae428fd88aafe7bb6"}, + {file = "charset_normalizer-3.3.2-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:42cb296636fcc8b0644486d15c12376cb9fa75443e00fb25de0b8602e64c1714"}, + {file = "charset_normalizer-3.3.2-cp37-cp37m-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:0a55554a2fa0d408816b3b5cedf0045f4b8e1a6065aec45849de2d6f3f8e9786"}, + {file = "charset_normalizer-3.3.2-cp37-cp37m-musllinux_1_1_aarch64.whl", hash = "sha256:c083af607d2515612056a31f0a8d9e0fcb5876b7bfc0abad3ecd275bc4ebc2d5"}, + {file = "charset_normalizer-3.3.2-cp37-cp37m-musllinux_1_1_i686.whl", hash = "sha256:87d1351268731db79e0f8e745d92493ee2841c974128ef629dc518b937d9194c"}, + {file = "charset_normalizer-3.3.2-cp37-cp37m-musllinux_1_1_ppc64le.whl", hash = "sha256:bd8f7df7d12c2db9fab40bdd87a7c09b1530128315d047a086fa3ae3435cb3a8"}, + {file = "charset_normalizer-3.3.2-cp37-cp37m-musllinux_1_1_s390x.whl", hash = "sha256:c180f51afb394e165eafe4ac2936a14bee3eb10debc9d9e4db8958fe36afe711"}, + {file = "charset_normalizer-3.3.2-cp37-cp37m-musllinux_1_1_x86_64.whl", hash = "sha256:8c622a5fe39a48f78944a87d4fb8a53ee07344641b0562c540d840748571b811"}, + {file = "charset_normalizer-3.3.2-cp37-cp37m-win32.whl", hash = "sha256:db364eca23f876da6f9e16c9da0df51aa4f104a972735574842618b8c6d999d4"}, + {file = "charset_normalizer-3.3.2-cp37-cp37m-win_amd64.whl", hash = "sha256:86216b5cee4b06df986d214f664305142d9c76df9b6512be2738aa72a2048f99"}, + {file = "charset_normalizer-3.3.2-cp38-cp38-macosx_10_9_universal2.whl", hash = "sha256:6463effa3186ea09411d50efc7d85360b38d5f09b870c48e4600f63af490e56a"}, + {file = "charset_normalizer-3.3.2-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:6c4caeef8fa63d06bd437cd4bdcf3ffefe6738fb1b25951440d80dc7df8c03ac"}, + {file = "charset_normalizer-3.3.2-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:37e55c8e51c236f95b033f6fb391d7d7970ba5fe7ff453dad675e88cf303377a"}, + {file = "charset_normalizer-3.3.2-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:fb69256e180cb6c8a894fee62b3afebae785babc1ee98b81cdf68bbca1987f33"}, + {file = "charset_normalizer-3.3.2-cp38-cp38-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:ae5f4161f18c61806f411a13b0310bea87f987c7d2ecdbdaad0e94eb2e404238"}, + {file = "charset_normalizer-3.3.2-cp38-cp38-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:b2b0a0c0517616b6869869f8c581d4eb2dd83a4d79e0ebcb7d373ef9956aeb0a"}, + {file = "charset_normalizer-3.3.2-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:45485e01ff4d3630ec0d9617310448a8702f70e9c01906b0d0118bdf9d124cf2"}, + {file = "charset_normalizer-3.3.2-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:eb00ed941194665c332bf8e078baf037d6c35d7c4f3102ea2d4f16ca94a26dc8"}, + {file = "charset_normalizer-3.3.2-cp38-cp38-musllinux_1_1_aarch64.whl", hash = "sha256:2127566c664442652f024c837091890cb1942c30937add288223dc895793f898"}, + {file = "charset_normalizer-3.3.2-cp38-cp38-musllinux_1_1_i686.whl", hash = "sha256:a50aebfa173e157099939b17f18600f72f84eed3049e743b68ad15bd69b6bf99"}, + {file = "charset_normalizer-3.3.2-cp38-cp38-musllinux_1_1_ppc64le.whl", hash = "sha256:4d0d1650369165a14e14e1e47b372cfcb31d6ab44e6e33cb2d4e57265290044d"}, + {file = "charset_normalizer-3.3.2-cp38-cp38-musllinux_1_1_s390x.whl", hash = "sha256:923c0c831b7cfcb071580d3f46c4baf50f174be571576556269530f4bbd79d04"}, + {file = "charset_normalizer-3.3.2-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:06a81e93cd441c56a9b65d8e1d043daeb97a3d0856d177d5c90ba85acb3db087"}, + {file = "charset_normalizer-3.3.2-cp38-cp38-win32.whl", hash = "sha256:6ef1d82a3af9d3eecdba2321dc1b3c238245d890843e040e41e470ffa64c3e25"}, + {file = "charset_normalizer-3.3.2-cp38-cp38-win_amd64.whl", hash = "sha256:eb8821e09e916165e160797a6c17edda0679379a4be5c716c260e836e122f54b"}, + {file = "charset_normalizer-3.3.2-cp39-cp39-macosx_10_9_universal2.whl", hash = "sha256:c235ebd9baae02f1b77bcea61bce332cb4331dc3617d254df3323aa01ab47bd4"}, + {file = "charset_normalizer-3.3.2-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:5b4c145409bef602a690e7cfad0a15a55c13320ff7a3ad7ca59c13bb8ba4d45d"}, + {file = "charset_normalizer-3.3.2-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:68d1f8a9e9e37c1223b656399be5d6b448dea850bed7d0f87a8311f1ff3dabb0"}, + {file = "charset_normalizer-3.3.2-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:22afcb9f253dac0696b5a4be4a1c0f8762f8239e21b99680099abd9b2b1b2269"}, + {file = "charset_normalizer-3.3.2-cp39-cp39-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:e27ad930a842b4c5eb8ac0016b0a54f5aebbe679340c26101df33424142c143c"}, + {file = "charset_normalizer-3.3.2-cp39-cp39-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:1f79682fbe303db92bc2b1136016a38a42e835d932bab5b3b1bfcfbf0640e519"}, + {file = "charset_normalizer-3.3.2-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:b261ccdec7821281dade748d088bb6e9b69e6d15b30652b74cbbac25e280b796"}, + {file = "charset_normalizer-3.3.2-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:122c7fa62b130ed55f8f285bfd56d5f4b4a5b503609d181f9ad85e55c89f4185"}, + {file = "charset_normalizer-3.3.2-cp39-cp39-musllinux_1_1_aarch64.whl", hash = "sha256:d0eccceffcb53201b5bfebb52600a5fb483a20b61da9dbc885f8b103cbe7598c"}, + {file = "charset_normalizer-3.3.2-cp39-cp39-musllinux_1_1_i686.whl", hash = "sha256:9f96df6923e21816da7e0ad3fd47dd8f94b2a5ce594e00677c0013018b813458"}, + {file = "charset_normalizer-3.3.2-cp39-cp39-musllinux_1_1_ppc64le.whl", hash = "sha256:7f04c839ed0b6b98b1a7501a002144b76c18fb1c1850c8b98d458ac269e26ed2"}, + {file = "charset_normalizer-3.3.2-cp39-cp39-musllinux_1_1_s390x.whl", hash = "sha256:34d1c8da1e78d2e001f363791c98a272bb734000fcef47a491c1e3b0505657a8"}, + {file = "charset_normalizer-3.3.2-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:ff8fa367d09b717b2a17a052544193ad76cd49979c805768879cb63d9ca50561"}, + {file = "charset_normalizer-3.3.2-cp39-cp39-win32.whl", hash = "sha256:aed38f6e4fb3f5d6bf81bfa990a07806be9d83cf7bacef998ab1a9bd660a581f"}, + {file = "charset_normalizer-3.3.2-cp39-cp39-win_amd64.whl", hash = "sha256:b01b88d45a6fcb69667cd6d2f7a9aeb4bf53760d7fc536bf679ec94fe9f3ff3d"}, + {file = "charset_normalizer-3.3.2-py3-none-any.whl", hash = "sha256:3e4d1f6587322d2788836a99c69062fbb091331ec940e02d12d179c1d53e25fc"}, +] + +[[package]] +name = "colorama" +version = "0.4.6" +description = "Cross-platform colored terminal text." +optional = false +python-versions = "!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*,!=3.5.*,!=3.6.*,>=2.7" +files = [ + {file = "colorama-0.4.6-py2.py3-none-any.whl", hash = "sha256:4f1d9991f5acc0ca119f9d443620b77f9d6b33703e51011c16baf57afb285fc6"}, + {file = "colorama-0.4.6.tar.gz", hash = "sha256:08695f5cb7ed6e0531a20572697297273c47b8cae5a63ffc6d6ed5c201be6e44"}, +] + +[[package]] +name = "coverage" +version = "5.5" +description = "Code coverage measurement for Python" +optional = false +python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*, <4" +files = [ + {file = "coverage-5.5-cp27-cp27m-macosx_10_9_x86_64.whl", hash = "sha256:b6d534e4b2ab35c9f93f46229363e17f63c53ad01330df9f2d6bd1187e5eaacf"}, + {file = "coverage-5.5-cp27-cp27m-manylinux1_i686.whl", hash = "sha256:b7895207b4c843c76a25ab8c1e866261bcfe27bfaa20c192de5190121770672b"}, + {file = "coverage-5.5-cp27-cp27m-manylinux1_x86_64.whl", hash = "sha256:c2723d347ab06e7ddad1a58b2a821218239249a9e4365eaff6649d31180c1669"}, + {file = "coverage-5.5-cp27-cp27m-manylinux2010_i686.whl", hash = "sha256:900fbf7759501bc7807fd6638c947d7a831fc9fdf742dc10f02956ff7220fa90"}, + {file = "coverage-5.5-cp27-cp27m-manylinux2010_x86_64.whl", hash = "sha256:004d1880bed2d97151facef49f08e255a20ceb6f9432df75f4eef018fdd5a78c"}, + {file = "coverage-5.5-cp27-cp27m-win32.whl", hash = "sha256:06191eb60f8d8a5bc046f3799f8a07a2d7aefb9504b0209aff0b47298333302a"}, + {file = "coverage-5.5-cp27-cp27m-win_amd64.whl", hash = "sha256:7501140f755b725495941b43347ba8a2777407fc7f250d4f5a7d2a1050ba8e82"}, + {file = "coverage-5.5-cp27-cp27mu-manylinux1_i686.whl", hash = "sha256:372da284cfd642d8e08ef606917846fa2ee350f64994bebfbd3afb0040436905"}, + {file = "coverage-5.5-cp27-cp27mu-manylinux1_x86_64.whl", hash = "sha256:8963a499849a1fc54b35b1c9f162f4108017b2e6db2c46c1bed93a72262ed083"}, + {file = "coverage-5.5-cp27-cp27mu-manylinux2010_i686.whl", hash = "sha256:869a64f53488f40fa5b5b9dcb9e9b2962a66a87dab37790f3fcfb5144b996ef5"}, + {file = "coverage-5.5-cp27-cp27mu-manylinux2010_x86_64.whl", hash = "sha256:4a7697d8cb0f27399b0e393c0b90f0f1e40c82023ea4d45d22bce7032a5d7b81"}, + {file = "coverage-5.5-cp310-cp310-macosx_10_14_x86_64.whl", hash = "sha256:8d0a0725ad7c1a0bcd8d1b437e191107d457e2ec1084b9f190630a4fb1af78e6"}, + {file = "coverage-5.5-cp310-cp310-manylinux1_x86_64.whl", hash = "sha256:51cb9476a3987c8967ebab3f0fe144819781fca264f57f89760037a2ea191cb0"}, + {file = "coverage-5.5-cp310-cp310-win_amd64.whl", hash = "sha256:c0891a6a97b09c1f3e073a890514d5012eb256845c451bd48f7968ef939bf4ae"}, + {file = "coverage-5.5-cp35-cp35m-macosx_10_9_x86_64.whl", hash = "sha256:3487286bc29a5aa4b93a072e9592f22254291ce96a9fbc5251f566b6b7343cdb"}, + {file = "coverage-5.5-cp35-cp35m-manylinux1_i686.whl", hash = "sha256:deee1077aae10d8fa88cb02c845cfba9b62c55e1183f52f6ae6a2df6a2187160"}, + {file = "coverage-5.5-cp35-cp35m-manylinux1_x86_64.whl", hash = "sha256:f11642dddbb0253cc8853254301b51390ba0081750a8ac03f20ea8103f0c56b6"}, + {file = "coverage-5.5-cp35-cp35m-manylinux2010_i686.whl", hash = "sha256:6c90e11318f0d3c436a42409f2749ee1a115cd8b067d7f14c148f1ce5574d701"}, + {file = "coverage-5.5-cp35-cp35m-manylinux2010_x86_64.whl", hash = "sha256:30c77c1dc9f253283e34c27935fded5015f7d1abe83bc7821680ac444eaf7793"}, + {file = "coverage-5.5-cp35-cp35m-win32.whl", hash = "sha256:9a1ef3b66e38ef8618ce5fdc7bea3d9f45f3624e2a66295eea5e57966c85909e"}, + {file = "coverage-5.5-cp35-cp35m-win_amd64.whl", hash = "sha256:972c85d205b51e30e59525694670de6a8a89691186012535f9d7dbaa230e42c3"}, + {file = "coverage-5.5-cp36-cp36m-macosx_10_9_x86_64.whl", hash = "sha256:af0e781009aaf59e25c5a678122391cb0f345ac0ec272c7961dc5455e1c40066"}, + {file = "coverage-5.5-cp36-cp36m-manylinux1_i686.whl", hash = "sha256:74d881fc777ebb11c63736622b60cb9e4aee5cace591ce274fb69e582a12a61a"}, + {file = "coverage-5.5-cp36-cp36m-manylinux1_x86_64.whl", hash = "sha256:92b017ce34b68a7d67bd6d117e6d443a9bf63a2ecf8567bb3d8c6c7bc5014465"}, + {file = "coverage-5.5-cp36-cp36m-manylinux2010_i686.whl", hash = "sha256:d636598c8305e1f90b439dbf4f66437de4a5e3c31fdf47ad29542478c8508bbb"}, + {file = "coverage-5.5-cp36-cp36m-manylinux2010_x86_64.whl", hash = "sha256:41179b8a845742d1eb60449bdb2992196e211341818565abded11cfa90efb821"}, + {file = "coverage-5.5-cp36-cp36m-win32.whl", hash = "sha256:040af6c32813fa3eae5305d53f18875bedd079960822ef8ec067a66dd8afcd45"}, + {file = "coverage-5.5-cp36-cp36m-win_amd64.whl", hash = "sha256:5fec2d43a2cc6965edc0bb9e83e1e4b557f76f843a77a2496cbe719583ce8184"}, + {file = "coverage-5.5-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:18ba8bbede96a2c3dde7b868de9dcbd55670690af0988713f0603f037848418a"}, + {file = "coverage-5.5-cp37-cp37m-manylinux1_i686.whl", hash = "sha256:2910f4d36a6a9b4214bb7038d537f015346f413a975d57ca6b43bf23d6563b53"}, + {file = "coverage-5.5-cp37-cp37m-manylinux1_x86_64.whl", hash = "sha256:f0b278ce10936db1a37e6954e15a3730bea96a0997c26d7fee88e6c396c2086d"}, + {file = "coverage-5.5-cp37-cp37m-manylinux2010_i686.whl", hash = "sha256:796c9c3c79747146ebd278dbe1e5c5c05dd6b10cc3bcb8389dfdf844f3ead638"}, + {file = "coverage-5.5-cp37-cp37m-manylinux2010_x86_64.whl", hash = "sha256:53194af30d5bad77fcba80e23a1441c71abfb3e01192034f8246e0d8f99528f3"}, + {file = "coverage-5.5-cp37-cp37m-win32.whl", hash = "sha256:184a47bbe0aa6400ed2d41d8e9ed868b8205046518c52464fde713ea06e3a74a"}, + {file = "coverage-5.5-cp37-cp37m-win_amd64.whl", hash = "sha256:2949cad1c5208b8298d5686d5a85b66aae46d73eec2c3e08c817dd3513e5848a"}, + {file = "coverage-5.5-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:217658ec7187497e3f3ebd901afdca1af062b42cfe3e0dafea4cced3983739f6"}, + {file = "coverage-5.5-cp38-cp38-manylinux1_i686.whl", hash = "sha256:1aa846f56c3d49205c952d8318e76ccc2ae23303351d9270ab220004c580cfe2"}, + {file = "coverage-5.5-cp38-cp38-manylinux1_x86_64.whl", hash = "sha256:24d4a7de75446be83244eabbff746d66b9240ae020ced65d060815fac3423759"}, + {file = "coverage-5.5-cp38-cp38-manylinux2010_i686.whl", hash = "sha256:d1f8bf7b90ba55699b3a5e44930e93ff0189aa27186e96071fac7dd0d06a1873"}, + {file = "coverage-5.5-cp38-cp38-manylinux2010_x86_64.whl", hash = "sha256:970284a88b99673ccb2e4e334cfb38a10aab7cd44f7457564d11898a74b62d0a"}, + {file = "coverage-5.5-cp38-cp38-win32.whl", hash = "sha256:01d84219b5cdbfc8122223b39a954820929497a1cb1422824bb86b07b74594b6"}, + {file = "coverage-5.5-cp38-cp38-win_amd64.whl", hash = "sha256:2e0d881ad471768bf6e6c2bf905d183543f10098e3b3640fc029509530091502"}, + {file = "coverage-5.5-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:d1f9ce122f83b2305592c11d64f181b87153fc2c2bbd3bb4a3dde8303cfb1a6b"}, + {file = "coverage-5.5-cp39-cp39-manylinux1_i686.whl", hash = "sha256:13c4ee887eca0f4c5a247b75398d4114c37882658300e153113dafb1d76de529"}, + {file = "coverage-5.5-cp39-cp39-manylinux1_x86_64.whl", hash = "sha256:52596d3d0e8bdf3af43db3e9ba8dcdaac724ba7b5ca3f6358529d56f7a166f8b"}, + {file = "coverage-5.5-cp39-cp39-manylinux2010_i686.whl", hash = "sha256:2cafbbb3af0733db200c9b5f798d18953b1a304d3f86a938367de1567f4b5bff"}, + {file = "coverage-5.5-cp39-cp39-manylinux2010_x86_64.whl", hash = "sha256:44d654437b8ddd9eee7d1eaee28b7219bec228520ff809af170488fd2fed3e2b"}, + {file = "coverage-5.5-cp39-cp39-win32.whl", hash = "sha256:d314ed732c25d29775e84a960c3c60808b682c08d86602ec2c3008e1202e3bb6"}, + {file = "coverage-5.5-cp39-cp39-win_amd64.whl", hash = "sha256:13034c4409db851670bc9acd836243aeee299949bd5673e11844befcb0149f03"}, + {file = "coverage-5.5-pp36-none-any.whl", hash = "sha256:f030f8873312a16414c0d8e1a1ddff2d3235655a2174e3648b4fa66b3f2f1079"}, + {file = "coverage-5.5-pp37-none-any.whl", hash = "sha256:2a3859cb82dcbda1cfd3e6f71c27081d18aa251d20a17d87d26d4cd216fb0af4"}, + {file = "coverage-5.5.tar.gz", hash = "sha256:ebe78fe9a0e874362175b02371bdfbee64d8edc42a044253ddf4ee7d3c15212c"}, +] + +[package.extras] +toml = ["toml"] + +[[package]] +name = "distlib" +version = "0.3.7" +description = "Distribution utilities" +optional = false +python-versions = "*" +files = [ + {file = "distlib-0.3.7-py2.py3-none-any.whl", hash = "sha256:2e24928bc811348f0feb63014e97aaae3037f2cf48712d51ae61df7fd6075057"}, + {file = "distlib-0.3.7.tar.gz", hash = "sha256:9dafe54b34a028eafd95039d5e5d4851a13734540f1331060d31c9916e7147a8"}, +] + +[[package]] +name = "docstring-parser" +version = "0.15" +description = "Parse Python docstrings in reST, Google and Numpydoc format" +optional = false +python-versions = ">=3.6,<4.0" +files = [ + {file = "docstring_parser-0.15-py3-none-any.whl", hash = "sha256:d1679b86250d269d06a99670924d6bce45adc00b08069dae8c47d98e89b667a9"}, + {file = "docstring_parser-0.15.tar.gz", hash = "sha256:48ddc093e8b1865899956fcc03b03e66bb7240c310fac5af81814580c55bf682"}, +] + +[[package]] +name = "exceptiongroup" +version = "1.1.3" +description = "Backport of PEP 654 (exception groups)" +optional = false +python-versions = ">=3.7" +files = [ + {file = "exceptiongroup-1.1.3-py3-none-any.whl", hash = "sha256:343280667a4585d195ca1cf9cef84a4e178c4b6cf2274caef9859782b567d5e3"}, + {file = "exceptiongroup-1.1.3.tar.gz", hash = "sha256:097acd85d473d75af5bb98e41b61ff7fe35efe6675e4f9370ec6ec5126d160e9"}, +] + +[package.extras] +test = ["pytest (>=6)"] + +[[package]] +name = "filelock" +version = "3.13.1" +description = "A platform independent file lock." +optional = false +python-versions = ">=3.8" +files = [ + {file = "filelock-3.13.1-py3-none-any.whl", hash = "sha256:57dbda9b35157b05fb3e58ee91448612eb674172fab98ee235ccb0b5bee19a1c"}, + {file = "filelock-3.13.1.tar.gz", hash = "sha256:521f5f56c50f8426f5e03ad3b281b490a87ef15bc6c526f168290f0c7148d44e"}, +] + +[package.extras] +docs = ["furo (>=2023.9.10)", "sphinx (>=7.2.6)", "sphinx-autodoc-typehints (>=1.24)"] +testing = ["covdefaults (>=2.3)", "coverage (>=7.3.2)", "diff-cover (>=8)", "pytest (>=7.4.3)", "pytest-cov (>=4.1)", "pytest-mock (>=3.12)", "pytest-timeout (>=2.2)"] +typing = ["typing-extensions (>=4.8)"] + +[[package]] +name = "freezegun" +version = "1.2.2" +description = "Let your Python tests travel through time" +optional = false +python-versions = ">=3.6" +files = [ + {file = "freezegun-1.2.2-py3-none-any.whl", hash = "sha256:ea1b963b993cb9ea195adbd893a48d573fda951b0da64f60883d7e988b606c9f"}, + {file = "freezegun-1.2.2.tar.gz", hash = "sha256:cd22d1ba06941384410cd967d8a99d5ae2442f57dfafeff2fda5de8dc5c05446"}, +] + +[package.dependencies] +python-dateutil = ">=2.7" + +[[package]] +name = "identify" +version = "2.5.31" +description = "File identification library for Python" +optional = false +python-versions = ">=3.8" +files = [ + {file = "identify-2.5.31-py2.py3-none-any.whl", hash = "sha256:90199cb9e7bd3c5407a9b7e81b4abec4bb9d249991c79439ec8af740afc6293d"}, + {file = "identify-2.5.31.tar.gz", hash = "sha256:7736b3c7a28233637e3c36550646fc6389bedd74ae84cb788200cc8e2dd60b75"}, +] + +[package.extras] +license = ["ukkonen"] + +[[package]] +name = "idna" +version = "3.4" +description = "Internationalized Domain Names in Applications (IDNA)" +optional = false +python-versions = ">=3.5" +files = [ + {file = "idna-3.4-py3-none-any.whl", hash = "sha256:90b77e79eaa3eba6de819a0c442c0b4ceefc341a7a2ab77d7562bf49f425c5c2"}, + {file = "idna-3.4.tar.gz", hash = "sha256:814f528e8dead7d329833b91c5faa87d60bf71824cd12a7530b5526063d02cb4"}, +] + +[[package]] +name = "iniconfig" +version = "2.0.0" +description = "brain-dead simple config-ini parsing" +optional = false +python-versions = ">=3.7" +files = [ + {file = "iniconfig-2.0.0-py3-none-any.whl", hash = "sha256:b6a85871a79d2e3b22d2d1b94ac2824226a63c6b741c88f7ae975f18b6778374"}, + {file = "iniconfig-2.0.0.tar.gz", hash = "sha256:2d91e135bf72d31a410b17c16da610a82cb55f6b0477d1a902134b24a455b8b3"}, +] + +[[package]] +name = "lark" +version = "1.1.8" +description = "a modern parsing library" +optional = false +python-versions = ">=3.6" +files = [ + {file = "lark-1.1.8-py3-none-any.whl", hash = "sha256:7d2c221a66a8165f3f81aacb958d26033d40d972fdb70213ab0a2e0627e29c86"}, + {file = "lark-1.1.8.tar.gz", hash = "sha256:7ef424db57f59c1ffd6f0d4c2b705119927f566b68c0fe1942dddcc0e44391a5"}, +] + +[package.extras] +atomic-cache = ["atomicwrites"] +interegular = ["interegular (>=0.3.1,<0.4.0)"] +nearley = ["js2py"] +regex = ["regex"] + +[[package]] +name = "lxml" +version = "4.9.3" +description = "Powerful and Pythonic XML processing library combining libxml2/libxslt with the ElementTree API." +optional = false +python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, != 3.4.*" +files = [ + {file = "lxml-4.9.3-cp27-cp27m-macosx_11_0_x86_64.whl", hash = "sha256:b0a545b46b526d418eb91754565ba5b63b1c0b12f9bd2f808c852d9b4b2f9b5c"}, + {file = "lxml-4.9.3-cp27-cp27m-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:075b731ddd9e7f68ad24c635374211376aa05a281673ede86cbe1d1b3455279d"}, + {file = "lxml-4.9.3-cp27-cp27m-manylinux_2_5_x86_64.manylinux1_x86_64.whl", hash = "sha256:1e224d5755dba2f4a9498e150c43792392ac9b5380aa1b845f98a1618c94eeef"}, + {file = "lxml-4.9.3-cp27-cp27m-win32.whl", hash = "sha256:2c74524e179f2ad6d2a4f7caf70e2d96639c0954c943ad601a9e146c76408ed7"}, + {file = "lxml-4.9.3-cp27-cp27m-win_amd64.whl", hash = "sha256:4f1026bc732b6a7f96369f7bfe1a4f2290fb34dce00d8644bc3036fb351a4ca1"}, + {file = "lxml-4.9.3-cp27-cp27mu-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:c0781a98ff5e6586926293e59480b64ddd46282953203c76ae15dbbbf302e8bb"}, + {file = "lxml-4.9.3-cp27-cp27mu-manylinux_2_5_x86_64.manylinux1_x86_64.whl", hash = "sha256:cef2502e7e8a96fe5ad686d60b49e1ab03e438bd9123987994528febd569868e"}, + {file = "lxml-4.9.3-cp310-cp310-macosx_11_0_x86_64.whl", hash = "sha256:b86164d2cff4d3aaa1f04a14685cbc072efd0b4f99ca5708b2ad1b9b5988a991"}, + {file = "lxml-4.9.3-cp310-cp310-manylinux_2_12_i686.manylinux2010_i686.manylinux_2_24_i686.whl", hash = "sha256:42871176e7896d5d45138f6d28751053c711ed4d48d8e30b498da155af39aebd"}, + {file = "lxml-4.9.3-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.manylinux_2_24_x86_64.whl", hash = "sha256:ae8b9c6deb1e634ba4f1930eb67ef6e6bf6a44b6eb5ad605642b2d6d5ed9ce3c"}, + {file = "lxml-4.9.3-cp310-cp310-manylinux_2_28_aarch64.whl", hash = "sha256:411007c0d88188d9f621b11d252cce90c4a2d1a49db6c068e3c16422f306eab8"}, + {file = "lxml-4.9.3-cp310-cp310-manylinux_2_28_x86_64.whl", hash = "sha256:cd47b4a0d41d2afa3e58e5bf1f62069255aa2fd6ff5ee41604418ca925911d76"}, + {file = "lxml-4.9.3-cp310-cp310-musllinux_1_1_aarch64.whl", hash = "sha256:0e2cb47860da1f7e9a5256254b74ae331687b9672dfa780eed355c4c9c3dbd23"}, + {file = "lxml-4.9.3-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:1247694b26342a7bf47c02e513d32225ededd18045264d40758abeb3c838a51f"}, + {file = "lxml-4.9.3-cp310-cp310-win32.whl", hash = "sha256:cdb650fc86227eba20de1a29d4b2c1bfe139dc75a0669270033cb2ea3d391b85"}, + {file = "lxml-4.9.3-cp310-cp310-win_amd64.whl", hash = "sha256:97047f0d25cd4bcae81f9ec9dc290ca3e15927c192df17331b53bebe0e3ff96d"}, + {file = "lxml-4.9.3-cp311-cp311-macosx_11_0_universal2.whl", hash = "sha256:1f447ea5429b54f9582d4b955f5f1985f278ce5cf169f72eea8afd9502973dd5"}, + {file = "lxml-4.9.3-cp311-cp311-manylinux_2_12_i686.manylinux2010_i686.manylinux_2_24_i686.whl", hash = "sha256:57d6ba0ca2b0c462f339640d22882acc711de224d769edf29962b09f77129cbf"}, + {file = "lxml-4.9.3-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.manylinux_2_24_x86_64.whl", hash = "sha256:9767e79108424fb6c3edf8f81e6730666a50feb01a328f4a016464a5893f835a"}, + {file = "lxml-4.9.3-cp311-cp311-manylinux_2_28_aarch64.whl", hash = "sha256:71c52db65e4b56b8ddc5bb89fb2e66c558ed9d1a74a45ceb7dcb20c191c3df2f"}, + {file = "lxml-4.9.3-cp311-cp311-manylinux_2_28_x86_64.whl", hash = "sha256:d73d8ecf8ecf10a3bd007f2192725a34bd62898e8da27eb9d32a58084f93962b"}, + {file = "lxml-4.9.3-cp311-cp311-musllinux_1_1_aarch64.whl", hash = "sha256:0a3d3487f07c1d7f150894c238299934a2a074ef590b583103a45002035be120"}, + {file = "lxml-4.9.3-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:9e28c51fa0ce5674be9f560c6761c1b441631901993f76700b1b30ca6c8378d6"}, + {file = "lxml-4.9.3-cp311-cp311-win32.whl", hash = "sha256:0bfd0767c5c1de2551a120673b72e5d4b628737cb05414f03c3277bf9bed3305"}, + {file = "lxml-4.9.3-cp311-cp311-win_amd64.whl", hash = "sha256:25f32acefac14ef7bd53e4218fe93b804ef6f6b92ffdb4322bb6d49d94cad2bc"}, + {file = "lxml-4.9.3-cp312-cp312-macosx_11_0_universal2.whl", hash = "sha256:d3ff32724f98fbbbfa9f49d82852b159e9784d6094983d9a8b7f2ddaebb063d4"}, + {file = "lxml-4.9.3-cp312-cp312-manylinux_2_28_aarch64.whl", hash = "sha256:48d6ed886b343d11493129e019da91d4039826794a3e3027321c56d9e71505be"}, + {file = "lxml-4.9.3-cp312-cp312-manylinux_2_28_x86_64.whl", hash = "sha256:9a92d3faef50658dd2c5470af249985782bf754c4e18e15afb67d3ab06233f13"}, + {file = "lxml-4.9.3-cp312-cp312-musllinux_1_1_aarch64.whl", hash = "sha256:b4e4bc18382088514ebde9328da057775055940a1f2e18f6ad2d78aa0f3ec5b9"}, + {file = "lxml-4.9.3-cp312-cp312-musllinux_1_1_x86_64.whl", hash = "sha256:fc9b106a1bf918db68619fdcd6d5ad4f972fdd19c01d19bdb6bf63f3589a9ec5"}, + {file = "lxml-4.9.3-cp312-cp312-win_amd64.whl", hash = "sha256:d37017287a7adb6ab77e1c5bee9bcf9660f90ff445042b790402a654d2ad81d8"}, + {file = "lxml-4.9.3-cp35-cp35m-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:56dc1f1ebccc656d1b3ed288f11e27172a01503fc016bcabdcbc0978b19352b7"}, + {file = "lxml-4.9.3-cp35-cp35m-manylinux_2_5_x86_64.manylinux1_x86_64.whl", hash = "sha256:578695735c5a3f51569810dfebd05dd6f888147a34f0f98d4bb27e92b76e05c2"}, + {file = "lxml-4.9.3-cp35-cp35m-win32.whl", hash = "sha256:704f61ba8c1283c71b16135caf697557f5ecf3e74d9e453233e4771d68a1f42d"}, + {file = "lxml-4.9.3-cp35-cp35m-win_amd64.whl", hash = "sha256:c41bfca0bd3532d53d16fd34d20806d5c2b1ace22a2f2e4c0008570bf2c58833"}, + {file = "lxml-4.9.3-cp36-cp36m-macosx_11_0_x86_64.whl", hash = "sha256:64f479d719dc9f4c813ad9bb6b28f8390360660b73b2e4beb4cb0ae7104f1c12"}, + {file = "lxml-4.9.3-cp36-cp36m-manylinux_2_12_i686.manylinux2010_i686.manylinux_2_24_i686.whl", hash = "sha256:dd708cf4ee4408cf46a48b108fb9427bfa00b9b85812a9262b5c668af2533ea5"}, + {file = "lxml-4.9.3-cp36-cp36m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:5c31c7462abdf8f2ac0577d9f05279727e698f97ecbb02f17939ea99ae8daa98"}, + {file = "lxml-4.9.3-cp36-cp36m-manylinux_2_17_x86_64.manylinux2014_x86_64.manylinux_2_24_x86_64.whl", hash = "sha256:e3cd95e10c2610c360154afdc2f1480aea394f4a4f1ea0a5eacce49640c9b190"}, + {file = "lxml-4.9.3-cp36-cp36m-manylinux_2_28_x86_64.whl", hash = "sha256:4930be26af26ac545c3dffb662521d4e6268352866956672231887d18f0eaab2"}, + {file = "lxml-4.9.3-cp36-cp36m-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:4aec80cde9197340bc353d2768e2a75f5f60bacda2bab72ab1dc499589b3878c"}, + {file = "lxml-4.9.3-cp36-cp36m-manylinux_2_5_x86_64.manylinux1_x86_64.whl", hash = "sha256:14e019fd83b831b2e61baed40cab76222139926b1fb5ed0e79225bc0cae14584"}, + {file = "lxml-4.9.3-cp36-cp36m-musllinux_1_1_aarch64.whl", hash = "sha256:0c0850c8b02c298d3c7006b23e98249515ac57430e16a166873fc47a5d549287"}, + {file = "lxml-4.9.3-cp36-cp36m-musllinux_1_1_x86_64.whl", hash = "sha256:aca086dc5f9ef98c512bac8efea4483eb84abbf926eaeedf7b91479feb092458"}, + {file = "lxml-4.9.3-cp36-cp36m-win32.whl", hash = "sha256:50baa9c1c47efcaef189f31e3d00d697c6d4afda5c3cde0302d063492ff9b477"}, + {file = "lxml-4.9.3-cp36-cp36m-win_amd64.whl", hash = "sha256:bef4e656f7d98aaa3486d2627e7d2df1157d7e88e7efd43a65aa5dd4714916cf"}, + {file = "lxml-4.9.3-cp37-cp37m-manylinux_2_12_i686.manylinux2010_i686.manylinux_2_24_i686.whl", hash = "sha256:46f409a2d60f634fe550f7133ed30ad5321ae2e6630f13657fb9479506b00601"}, + {file = "lxml-4.9.3-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.manylinux_2_24_aarch64.whl", hash = "sha256:4c28a9144688aef80d6ea666c809b4b0e50010a2aca784c97f5e6bf143d9f129"}, + {file = "lxml-4.9.3-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.manylinux_2_24_x86_64.whl", hash = "sha256:141f1d1a9b663c679dc524af3ea1773e618907e96075262726c7612c02b149a4"}, + {file = "lxml-4.9.3-cp37-cp37m-manylinux_2_28_x86_64.whl", hash = "sha256:53ace1c1fd5a74ef662f844a0413446c0629d151055340e9893da958a374f70d"}, + {file = "lxml-4.9.3-cp37-cp37m-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:17a753023436a18e27dd7769e798ce302963c236bc4114ceee5b25c18c52c693"}, + {file = "lxml-4.9.3-cp37-cp37m-manylinux_2_5_x86_64.manylinux1_x86_64.whl", hash = "sha256:7d298a1bd60c067ea75d9f684f5f3992c9d6766fadbc0bcedd39750bf344c2f4"}, + {file = "lxml-4.9.3-cp37-cp37m-musllinux_1_1_aarch64.whl", hash = "sha256:081d32421db5df44c41b7f08a334a090a545c54ba977e47fd7cc2deece78809a"}, + {file = "lxml-4.9.3-cp37-cp37m-musllinux_1_1_x86_64.whl", hash = "sha256:23eed6d7b1a3336ad92d8e39d4bfe09073c31bfe502f20ca5116b2a334f8ec02"}, + {file = "lxml-4.9.3-cp37-cp37m-win32.whl", hash = "sha256:1509dd12b773c02acd154582088820893109f6ca27ef7291b003d0e81666109f"}, + {file = "lxml-4.9.3-cp37-cp37m-win_amd64.whl", hash = "sha256:120fa9349a24c7043854c53cae8cec227e1f79195a7493e09e0c12e29f918e52"}, + {file = "lxml-4.9.3-cp38-cp38-manylinux_2_12_i686.manylinux2010_i686.manylinux_2_24_i686.whl", hash = "sha256:4d2d1edbca80b510443f51afd8496be95529db04a509bc8faee49c7b0fb6d2cc"}, + {file = "lxml-4.9.3-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.manylinux_2_24_aarch64.whl", hash = "sha256:8d7e43bd40f65f7d97ad8ef5c9b1778943d02f04febef12def25f7583d19baac"}, + {file = "lxml-4.9.3-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.manylinux_2_24_x86_64.whl", hash = "sha256:71d66ee82e7417828af6ecd7db817913cb0cf9d4e61aa0ac1fde0583d84358db"}, + {file = "lxml-4.9.3-cp38-cp38-manylinux_2_28_x86_64.whl", hash = "sha256:6fc3c450eaa0b56f815c7b62f2b7fba7266c4779adcf1cece9e6deb1de7305ce"}, + {file = "lxml-4.9.3-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:65299ea57d82fb91c7f019300d24050c4ddeb7c5a190e076b5f48a2b43d19c42"}, + {file = "lxml-4.9.3-cp38-cp38-manylinux_2_5_x86_64.manylinux1_x86_64.whl", hash = "sha256:eadfbbbfb41b44034a4c757fd5d70baccd43296fb894dba0295606a7cf3124aa"}, + {file = "lxml-4.9.3-cp38-cp38-musllinux_1_1_aarch64.whl", hash = "sha256:3e9bdd30efde2b9ccfa9cb5768ba04fe71b018a25ea093379c857c9dad262c40"}, + {file = "lxml-4.9.3-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:fcdd00edfd0a3001e0181eab3e63bd5c74ad3e67152c84f93f13769a40e073a7"}, + {file = "lxml-4.9.3-cp38-cp38-win32.whl", hash = "sha256:57aba1bbdf450b726d58b2aea5fe47c7875f5afb2c4a23784ed78f19a0462574"}, + {file = "lxml-4.9.3-cp38-cp38-win_amd64.whl", hash = "sha256:92af161ecbdb2883c4593d5ed4815ea71b31fafd7fd05789b23100d081ecac96"}, + {file = "lxml-4.9.3-cp39-cp39-macosx_11_0_x86_64.whl", hash = "sha256:9bb6ad405121241e99a86efff22d3ef469024ce22875a7ae045896ad23ba2340"}, + {file = "lxml-4.9.3-cp39-cp39-manylinux_2_12_i686.manylinux2010_i686.manylinux_2_24_i686.whl", hash = "sha256:8ed74706b26ad100433da4b9d807eae371efaa266ffc3e9191ea436087a9d6a7"}, + {file = "lxml-4.9.3-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.manylinux_2_24_x86_64.whl", hash = "sha256:fbf521479bcac1e25a663df882c46a641a9bff6b56dc8b0fafaebd2f66fb231b"}, + {file = "lxml-4.9.3-cp39-cp39-manylinux_2_28_aarch64.whl", hash = "sha256:303bf1edce6ced16bf67a18a1cf8339d0db79577eec5d9a6d4a80f0fb10aa2da"}, + {file = "lxml-4.9.3-cp39-cp39-manylinux_2_28_x86_64.whl", hash = "sha256:5515edd2a6d1a5a70bfcdee23b42ec33425e405c5b351478ab7dc9347228f96e"}, + {file = "lxml-4.9.3-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:690dafd0b187ed38583a648076865d8c229661ed20e48f2335d68e2cf7dc829d"}, + {file = "lxml-4.9.3-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.whl", hash = "sha256:b6420a005548ad52154c8ceab4a1290ff78d757f9e5cbc68f8c77089acd3c432"}, + {file = "lxml-4.9.3-cp39-cp39-musllinux_1_1_aarch64.whl", hash = "sha256:bb3bb49c7a6ad9d981d734ef7c7193bc349ac338776a0360cc671eaee89bcf69"}, + {file = "lxml-4.9.3-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:d27be7405547d1f958b60837dc4c1007da90b8b23f54ba1f8b728c78fdb19d50"}, + {file = "lxml-4.9.3-cp39-cp39-win32.whl", hash = "sha256:8df133a2ea5e74eef5e8fc6f19b9e085f758768a16e9877a60aec455ed2609b2"}, + {file = "lxml-4.9.3-cp39-cp39-win_amd64.whl", hash = "sha256:4dd9a263e845a72eacb60d12401e37c616438ea2e5442885f65082c276dfb2b2"}, + {file = "lxml-4.9.3-pp310-pypy310_pp73-manylinux_2_28_x86_64.whl", hash = "sha256:6689a3d7fd13dc687e9102a27e98ef33730ac4fe37795d5036d18b4d527abd35"}, + {file = "lxml-4.9.3-pp37-pypy37_pp73-manylinux_2_12_i686.manylinux2010_i686.manylinux_2_24_i686.whl", hash = "sha256:f6bdac493b949141b733c5345b6ba8f87a226029cbabc7e9e121a413e49441e0"}, + {file = "lxml-4.9.3-pp37-pypy37_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.manylinux_2_24_x86_64.whl", hash = "sha256:05186a0f1346ae12553d66df1cfce6f251589fea3ad3da4f3ef4e34b2d58c6a3"}, + {file = "lxml-4.9.3-pp37-pypy37_pp73-manylinux_2_28_x86_64.whl", hash = "sha256:c2006f5c8d28dee289f7020f721354362fa304acbaaf9745751ac4006650254b"}, + {file = "lxml-4.9.3-pp38-pypy38_pp73-macosx_11_0_x86_64.whl", hash = "sha256:5c245b783db29c4e4fbbbfc9c5a78be496c9fea25517f90606aa1f6b2b3d5f7b"}, + {file = "lxml-4.9.3-pp38-pypy38_pp73-manylinux_2_12_i686.manylinux2010_i686.manylinux_2_24_i686.whl", hash = "sha256:4fb960a632a49f2f089d522f70496640fdf1218f1243889da3822e0a9f5f3ba7"}, + {file = "lxml-4.9.3-pp38-pypy38_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.manylinux_2_24_x86_64.whl", hash = "sha256:50670615eaf97227d5dc60de2dc99fb134a7130d310d783314e7724bf163f75d"}, + {file = "lxml-4.9.3-pp38-pypy38_pp73-manylinux_2_28_x86_64.whl", hash = "sha256:9719fe17307a9e814580af1f5c6e05ca593b12fb7e44fe62450a5384dbf61b4b"}, + {file = "lxml-4.9.3-pp38-pypy38_pp73-win_amd64.whl", hash = "sha256:3331bece23c9ee066e0fb3f96c61322b9e0f54d775fccefff4c38ca488de283a"}, + {file = "lxml-4.9.3-pp39-pypy39_pp73-macosx_11_0_x86_64.whl", hash = "sha256:ed667f49b11360951e201453fc3967344d0d0263aa415e1619e85ae7fd17b4e0"}, + {file = "lxml-4.9.3-pp39-pypy39_pp73-manylinux_2_12_i686.manylinux2010_i686.manylinux_2_24_i686.whl", hash = "sha256:8b77946fd508cbf0fccd8e400a7f71d4ac0e1595812e66025bac475a8e811694"}, + {file = "lxml-4.9.3-pp39-pypy39_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.manylinux_2_24_x86_64.whl", hash = "sha256:e4da8ca0c0c0aea88fd46be8e44bd49716772358d648cce45fe387f7b92374a7"}, + {file = "lxml-4.9.3-pp39-pypy39_pp73-manylinux_2_28_x86_64.whl", hash = "sha256:fe4bda6bd4340caa6e5cf95e73f8fea5c4bfc55763dd42f1b50a94c1b4a2fbd4"}, + {file = "lxml-4.9.3-pp39-pypy39_pp73-win_amd64.whl", hash = "sha256:f3df3db1d336b9356dd3112eae5f5c2b8b377f3bc826848567f10bfddfee77e9"}, + {file = "lxml-4.9.3.tar.gz", hash = "sha256:48628bd53a426c9eb9bc066a923acaa0878d1e86129fd5359aee99285f4eed9c"}, +] + +[package.extras] +cssselect = ["cssselect (>=0.7)"] +html5 = ["html5lib"] +htmlsoup = ["BeautifulSoup4"] +source = ["Cython (>=0.29.35)"] + +[[package]] +name = "mutatest" +version = "3.1.0" +description = "Python mutation testing: test your tests!" +optional = false +python-versions = ">=3.7.0" +files = [ + {file = "mutatest-3.1.0-py37-none-any.whl", hash = "sha256:648038e916611376f2b091f14be0d3d08b2df12dec7232fa158fb8d252c89d6f"}, + {file = "mutatest-3.1.0.tar.gz", hash = "sha256:274ecf0d10b68a7c6f9753788912cc82a7c39e505fc3f0b215d0b57efd7bff52"}, +] + +[package.dependencies] +coverage = ">=4.4,<6.0" +typing-extensions = "*" + +[package.extras] +build = ["twine", "wheel"] +dev = ["black", "coverage", "coverage (>=4.4,<6.0)", "freezegun", "hypothesis", "ipython", "isort", "mypy", "pre-commit", "pytest (>=4.0.0)", "pytest-cov", "pytest-xdist", "sphinx", "sphinx-rtd-theme", "tox", "twine", "virtualenv", "wheel"] +docs = ["coverage (>=4.4,<6.0)", "ipython", "sphinx", "sphinx-rtd-theme"] +qa = ["black", "isort", "mypy", "pre-commit"] +tests = ["coverage", "freezegun", "hypothesis", "pytest (>=4.0.0)", "pytest-cov", "pytest-xdist", "tox", "virtualenv"] + +[[package]] +name = "nodeenv" +version = "1.8.0" +description = "Node.js virtual environment builder" +optional = false +python-versions = ">=2.7,!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*,!=3.5.*,!=3.6.*" +files = [ + {file = "nodeenv-1.8.0-py2.py3-none-any.whl", hash = "sha256:df865724bb3c3adc86b3876fa209771517b0cfe596beff01a92700e0e8be4cec"}, + {file = "nodeenv-1.8.0.tar.gz", hash = "sha256:d51e0c37e64fbf47d017feac3145cdbb58836d7eee8c6f6d3b6880c5456227d2"}, +] + +[package.dependencies] +setuptools = "*" + +[[package]] +name = "packaging" +version = "23.2" +description = "Core utilities for Python packages" +optional = false +python-versions = ">=3.7" +files = [ + {file = "packaging-23.2-py3-none-any.whl", hash = "sha256:8c491190033a9af7e1d931d0b5dacc2ef47509b34dd0de67ed209b5203fc88c7"}, + {file = "packaging-23.2.tar.gz", hash = "sha256:048fb0e9405036518eaaf48a55953c750c11e1a1b68e0dd1a9d62ed0c092cfc5"}, +] + +[[package]] +name = "platformdirs" +version = "3.11.0" +description = "A small Python package for determining appropriate platform-specific dirs, e.g. a \"user data dir\"." +optional = false +python-versions = ">=3.7" +files = [ + {file = "platformdirs-3.11.0-py3-none-any.whl", hash = "sha256:e9d171d00af68be50e9202731309c4e658fd8bc76f55c11c7dd760d023bda68e"}, + {file = "platformdirs-3.11.0.tar.gz", hash = "sha256:cf8ee52a3afdb965072dcc652433e0c7e3e40cf5ea1477cd4b3b1d2eb75495b3"}, +] + +[package.extras] +docs = ["furo (>=2023.7.26)", "proselint (>=0.13)", "sphinx (>=7.1.1)", "sphinx-autodoc-typehints (>=1.24)"] +test = ["appdirs (==1.4.4)", "covdefaults (>=2.3)", "pytest (>=7.4)", "pytest-cov (>=4.1)", "pytest-mock (>=3.11.1)"] + +[[package]] +name = "pluggy" +version = "1.3.0" +description = "plugin and hook calling mechanisms for python" +optional = false +python-versions = ">=3.8" +files = [ + {file = "pluggy-1.3.0-py3-none-any.whl", hash = "sha256:d89c696a773f8bd377d18e5ecda92b7a3793cbe66c87060a6fb58c7b6e1061f7"}, + {file = "pluggy-1.3.0.tar.gz", hash = "sha256:cf61ae8f126ac6f7c451172cf30e3e43d3ca77615509771b3a984a0730651e12"}, +] + +[package.extras] +dev = ["pre-commit", "tox"] +testing = ["pytest", "pytest-benchmark"] + +[[package]] +name = "pre-commit" +version = "3.5.0" +description = "A framework for managing and maintaining multi-language pre-commit hooks." +optional = false +python-versions = ">=3.8" +files = [ + {file = "pre_commit-3.5.0-py2.py3-none-any.whl", hash = "sha256:841dc9aef25daba9a0238cd27984041fa0467b4199fc4852e27950664919f660"}, + {file = "pre_commit-3.5.0.tar.gz", hash = "sha256:5804465c675b659b0862f07907f96295d490822a450c4c40e747d0b1c6ebcb32"}, +] + +[package.dependencies] +cfgv = ">=2.0.0" +identify = ">=1.0.0" +nodeenv = ">=0.11.1" +pyyaml = ">=5.1" +virtualenv = ">=20.10.0" + +[[package]] +name = "pytest" +version = "7.4.3" +description = "pytest: simple powerful testing with Python" +optional = false +python-versions = ">=3.7" +files = [ + {file = "pytest-7.4.3-py3-none-any.whl", hash = "sha256:0d009c083ea859a71b76adf7c1d502e4bc170b80a8ef002da5806527b9591fac"}, + {file = "pytest-7.4.3.tar.gz", hash = "sha256:d989d136982de4e3b29dabcc838ad581c64e8ed52c11fbe86ddebd9da0818cd5"}, +] + +[package.dependencies] +colorama = {version = "*", markers = "sys_platform == \"win32\""} +exceptiongroup = {version = ">=1.0.0rc8", markers = "python_version < \"3.11\""} +iniconfig = "*" +packaging = "*" +pluggy = ">=0.12,<2.0" +tomli = {version = ">=1.0.0", markers = "python_version < \"3.11\""} + +[package.extras] +testing = ["argcomplete", "attrs (>=19.2.0)", "hypothesis (>=3.56)", "mock", "nose", "pygments (>=2.7.2)", "requests", "setuptools", "xmlschema"] + +[[package]] +name = "python-dateutil" +version = "2.8.2" +description = "Extensions to the standard Python datetime module" +optional = false +python-versions = "!=3.0.*,!=3.1.*,!=3.2.*,>=2.7" +files = [ + {file = "python-dateutil-2.8.2.tar.gz", hash = "sha256:0123cacc1627ae19ddf3c27a5de5bd67ee4586fbdd6440d9748f8abb483d3e86"}, + {file = "python_dateutil-2.8.2-py2.py3-none-any.whl", hash = "sha256:961d03dc3453ebbc59dbdea9e4e11c5651520a876d0f4db161e8674aae935da9"}, +] + +[package.dependencies] +six = ">=1.5" + +[[package]] +name = "pyyaml" +version = "6.0.1" +description = "YAML parser and emitter for Python" +optional = false +python-versions = ">=3.6" +files = [ + {file = "PyYAML-6.0.1-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:d858aa552c999bc8a8d57426ed01e40bef403cd8ccdd0fc5f6f04a00414cac2a"}, + {file = "PyYAML-6.0.1-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:fd66fc5d0da6d9815ba2cebeb4205f95818ff4b79c3ebe268e75d961704af52f"}, + {file = "PyYAML-6.0.1-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:69b023b2b4daa7548bcfbd4aa3da05b3a74b772db9e23b982788168117739938"}, + {file = "PyYAML-6.0.1-cp310-cp310-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:81e0b275a9ecc9c0c0c07b4b90ba548307583c125f54d5b6946cfee6360c733d"}, + {file = "PyYAML-6.0.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:ba336e390cd8e4d1739f42dfe9bb83a3cc2e80f567d8805e11b46f4a943f5515"}, + {file = "PyYAML-6.0.1-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:326c013efe8048858a6d312ddd31d56e468118ad4cdeda36c719bf5bb6192290"}, + {file = "PyYAML-6.0.1-cp310-cp310-win32.whl", hash = "sha256:bd4af7373a854424dabd882decdc5579653d7868b8fb26dc7d0e99f823aa5924"}, + {file = "PyYAML-6.0.1-cp310-cp310-win_amd64.whl", hash = "sha256:fd1592b3fdf65fff2ad0004b5e363300ef59ced41c2e6b3a99d4089fa8c5435d"}, + {file = "PyYAML-6.0.1-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:6965a7bc3cf88e5a1c3bd2e0b5c22f8d677dc88a455344035f03399034eb3007"}, + {file = "PyYAML-6.0.1-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:f003ed9ad21d6a4713f0a9b5a7a0a79e08dd0f221aff4525a2be4c346ee60aab"}, + {file = "PyYAML-6.0.1-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:42f8152b8dbc4fe7d96729ec2b99c7097d656dc1213a3229ca5383f973a5ed6d"}, + {file = "PyYAML-6.0.1-cp311-cp311-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:062582fca9fabdd2c8b54a3ef1c978d786e0f6b3a1510e0ac93ef59e0ddae2bc"}, + {file = "PyYAML-6.0.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:d2b04aac4d386b172d5b9692e2d2da8de7bfb6c387fa4f801fbf6fb2e6ba4673"}, + {file = "PyYAML-6.0.1-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:e7d73685e87afe9f3b36c799222440d6cf362062f78be1013661b00c5c6f678b"}, + {file = "PyYAML-6.0.1-cp311-cp311-win32.whl", hash = "sha256:1635fd110e8d85d55237ab316b5b011de701ea0f29d07611174a1b42f1444741"}, + {file = "PyYAML-6.0.1-cp311-cp311-win_amd64.whl", hash = "sha256:bf07ee2fef7014951eeb99f56f39c9bb4af143d8aa3c21b1677805985307da34"}, + {file = "PyYAML-6.0.1-cp312-cp312-macosx_10_9_x86_64.whl", hash = "sha256:855fb52b0dc35af121542a76b9a84f8d1cd886ea97c84703eaa6d88e37a2ad28"}, + {file = "PyYAML-6.0.1-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:40df9b996c2b73138957fe23a16a4f0ba614f4c0efce1e9406a184b6d07fa3a9"}, + {file = "PyYAML-6.0.1-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:6c22bec3fbe2524cde73d7ada88f6566758a8f7227bfbf93a408a9d86bcc12a0"}, + {file = "PyYAML-6.0.1-cp312-cp312-musllinux_1_1_x86_64.whl", hash = "sha256:8d4e9c88387b0f5c7d5f281e55304de64cf7f9c0021a3525bd3b1c542da3b0e4"}, + {file = "PyYAML-6.0.1-cp312-cp312-win32.whl", hash = "sha256:d483d2cdf104e7c9fa60c544d92981f12ad66a457afae824d146093b8c294c54"}, + {file = "PyYAML-6.0.1-cp312-cp312-win_amd64.whl", hash = "sha256:0d3304d8c0adc42be59c5f8a4d9e3d7379e6955ad754aa9d6ab7a398b59dd1df"}, + {file = "PyYAML-6.0.1-cp36-cp36m-macosx_10_9_x86_64.whl", hash = "sha256:50550eb667afee136e9a77d6dc71ae76a44df8b3e51e41b77f6de2932bfe0f47"}, + {file = "PyYAML-6.0.1-cp36-cp36m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:1fe35611261b29bd1de0070f0b2f47cb6ff71fa6595c077e42bd0c419fa27b98"}, + {file = "PyYAML-6.0.1-cp36-cp36m-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:704219a11b772aea0d8ecd7058d0082713c3562b4e271b849ad7dc4a5c90c13c"}, + {file = "PyYAML-6.0.1-cp36-cp36m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:afd7e57eddb1a54f0f1a974bc4391af8bcce0b444685d936840f125cf046d5bd"}, + {file = "PyYAML-6.0.1-cp36-cp36m-win32.whl", hash = "sha256:fca0e3a251908a499833aa292323f32437106001d436eca0e6e7833256674585"}, + {file = "PyYAML-6.0.1-cp36-cp36m-win_amd64.whl", hash = "sha256:f22ac1c3cac4dbc50079e965eba2c1058622631e526bd9afd45fedd49ba781fa"}, + {file = "PyYAML-6.0.1-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:b1275ad35a5d18c62a7220633c913e1b42d44b46ee12554e5fd39c70a243d6a3"}, + {file = "PyYAML-6.0.1-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:18aeb1bf9a78867dc38b259769503436b7c72f7a1f1f4c93ff9a17de54319b27"}, + {file = "PyYAML-6.0.1-cp37-cp37m-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:596106435fa6ad000c2991a98fa58eeb8656ef2325d7e158344fb33864ed87e3"}, + {file = "PyYAML-6.0.1-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:baa90d3f661d43131ca170712d903e6295d1f7a0f595074f151c0aed377c9b9c"}, + {file = "PyYAML-6.0.1-cp37-cp37m-win32.whl", hash = "sha256:9046c58c4395dff28dd494285c82ba00b546adfc7ef001486fbf0324bc174fba"}, + {file = "PyYAML-6.0.1-cp37-cp37m-win_amd64.whl", hash = "sha256:4fb147e7a67ef577a588a0e2c17b6db51dda102c71de36f8549b6816a96e1867"}, + {file = "PyYAML-6.0.1-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:1d4c7e777c441b20e32f52bd377e0c409713e8bb1386e1099c2415f26e479595"}, + {file = "PyYAML-6.0.1-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:a0cd17c15d3bb3fa06978b4e8958dcdc6e0174ccea823003a106c7d4d7899ac5"}, + {file = "PyYAML-6.0.1-cp38-cp38-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:28c119d996beec18c05208a8bd78cbe4007878c6dd15091efb73a30e90539696"}, + {file = "PyYAML-6.0.1-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:7e07cbde391ba96ab58e532ff4803f79c4129397514e1413a7dc761ccd755735"}, + {file = "PyYAML-6.0.1-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:49a183be227561de579b4a36efbb21b3eab9651dd81b1858589f796549873dd6"}, + {file = "PyYAML-6.0.1-cp38-cp38-win32.whl", hash = "sha256:184c5108a2aca3c5b3d3bf9395d50893a7ab82a38004c8f61c258d4428e80206"}, + {file = "PyYAML-6.0.1-cp38-cp38-win_amd64.whl", hash = "sha256:1e2722cc9fbb45d9b87631ac70924c11d3a401b2d7f410cc0e3bbf249f2dca62"}, + {file = "PyYAML-6.0.1-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:9eb6caa9a297fc2c2fb8862bc5370d0303ddba53ba97e71f08023b6cd73d16a8"}, + {file = "PyYAML-6.0.1-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:c8098ddcc2a85b61647b2590f825f3db38891662cfc2fc776415143f599bb859"}, + {file = "PyYAML-6.0.1-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:5773183b6446b2c99bb77e77595dd486303b4faab2b086e7b17bc6bef28865f6"}, + {file = "PyYAML-6.0.1-cp39-cp39-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:b786eecbdf8499b9ca1d697215862083bd6d2a99965554781d0d8d1ad31e13a0"}, + {file = "PyYAML-6.0.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:bc1bf2925a1ecd43da378f4db9e4f799775d6367bdb94671027b73b393a7c42c"}, + {file = "PyYAML-6.0.1-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:04ac92ad1925b2cff1db0cfebffb6ffc43457495c9b3c39d3fcae417d7125dc5"}, + {file = "PyYAML-6.0.1-cp39-cp39-win32.whl", hash = "sha256:faca3bdcf85b2fc05d06ff3fbc1f83e1391b3e724afa3feba7d13eeab355484c"}, + {file = "PyYAML-6.0.1-cp39-cp39-win_amd64.whl", hash = "sha256:510c9deebc5c0225e8c96813043e62b680ba2f9c50a08d3724c7f28a747d1486"}, + {file = "PyYAML-6.0.1.tar.gz", hash = "sha256:bfdf460b1736c775f2ba9f6a92bca30bc2095067b8a9d77876d1fad6cc3b4a43"}, +] + +[[package]] +name = "requests" +version = "2.31.0" +description = "Python HTTP for Humans." +optional = false +python-versions = ">=3.7" +files = [ + {file = "requests-2.31.0-py3-none-any.whl", hash = "sha256:58cd2187c01e70e6e26505bca751777aa9f2ee0b7f4300988b709f44e013003f"}, + {file = "requests-2.31.0.tar.gz", hash = "sha256:942c5a758f98d790eaed1a29cb6eefc7ffb0d1cf7af05c3d2791656dbd6ad1e1"}, +] + +[package.dependencies] +certifi = ">=2017.4.17" +charset-normalizer = ">=2,<4" +idna = ">=2.5,<4" +urllib3 = ">=1.21.1,<3" + +[package.extras] +socks = ["PySocks (>=1.5.6,!=1.5.7)"] +use-chardet-on-py3 = ["chardet (>=3.0.2,<6)"] + +[[package]] +name = "ruff" +version = "0.1.5" +description = "An extremely fast Python linter and code formatter, written in Rust." +optional = false +python-versions = ">=3.7" +files = [ + {file = "ruff-0.1.5-py3-none-macosx_10_7_x86_64.whl", hash = "sha256:32d47fc69261c21a4c48916f16ca272bf2f273eb635d91c65d5cd548bf1f3d96"}, + {file = "ruff-0.1.5-py3-none-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl", hash = "sha256:171276c1df6c07fa0597fb946139ced1c2978f4f0b8254f201281729981f3c17"}, + {file = "ruff-0.1.5-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:17ef33cd0bb7316ca65649fc748acc1406dfa4da96a3d0cde6d52f2e866c7b39"}, + {file = "ruff-0.1.5-py3-none-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:b2c205827b3f8c13b4a432e9585750b93fd907986fe1aec62b2a02cf4401eee6"}, + {file = "ruff-0.1.5-py3-none-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:bb408e3a2ad8f6881d0f2e7ad70cddb3ed9f200eb3517a91a245bbe27101d379"}, + {file = "ruff-0.1.5-py3-none-manylinux_2_17_ppc64.manylinux2014_ppc64.whl", hash = "sha256:f20dc5e5905ddb407060ca27267c7174f532375c08076d1a953cf7bb016f5a24"}, + {file = "ruff-0.1.5-py3-none-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:aafb9d2b671ed934998e881e2c0f5845a4295e84e719359c71c39a5363cccc91"}, + {file = "ruff-0.1.5-py3-none-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:a4894dddb476597a0ba4473d72a23151b8b3b0b5f958f2cf4d3f1c572cdb7af7"}, + {file = "ruff-0.1.5-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:a00a7ec893f665ed60008c70fe9eeb58d210e6b4d83ec6654a9904871f982a2a"}, + {file = "ruff-0.1.5-py3-none-musllinux_1_2_aarch64.whl", hash = "sha256:a8c11206b47f283cbda399a654fd0178d7a389e631f19f51da15cbe631480c5b"}, + {file = "ruff-0.1.5-py3-none-musllinux_1_2_armv7l.whl", hash = "sha256:fa29e67b3284b9a79b1a85ee66e293a94ac6b7bb068b307a8a373c3d343aa8ec"}, + {file = "ruff-0.1.5-py3-none-musllinux_1_2_i686.whl", hash = "sha256:9b97fd6da44d6cceb188147b68db69a5741fbc736465b5cea3928fdac0bc1aeb"}, + {file = "ruff-0.1.5-py3-none-musllinux_1_2_x86_64.whl", hash = "sha256:721f4b9d3b4161df8dc9f09aa8562e39d14e55a4dbaa451a8e55bdc9590e20f4"}, + {file = "ruff-0.1.5-py3-none-win32.whl", hash = "sha256:f80c73bba6bc69e4fdc73b3991db0b546ce641bdcd5b07210b8ad6f64c79f1ab"}, + {file = "ruff-0.1.5-py3-none-win_amd64.whl", hash = "sha256:c21fe20ee7d76206d290a76271c1af7a5096bc4c73ab9383ed2ad35f852a0087"}, + {file = "ruff-0.1.5-py3-none-win_arm64.whl", hash = "sha256:82bfcb9927e88c1ed50f49ac6c9728dab3ea451212693fe40d08d314663e412f"}, + {file = "ruff-0.1.5.tar.gz", hash = "sha256:5cbec0ef2ae1748fb194f420fb03fb2c25c3258c86129af7172ff8f198f125ab"}, +] + +[[package]] +name = "setuptools" +version = "68.2.2" +description = "Easily download, build, install, upgrade, and uninstall Python packages" +optional = false +python-versions = ">=3.8" +files = [ + {file = "setuptools-68.2.2-py3-none-any.whl", hash = "sha256:b454a35605876da60632df1a60f736524eb73cc47bbc9f3f1ef1b644de74fd2a"}, + {file = "setuptools-68.2.2.tar.gz", hash = "sha256:4ac1475276d2f1c48684874089fefcd83bd7162ddaafb81fac866ba0db282a87"}, +] + +[package.extras] +docs = ["furo", "jaraco.packaging (>=9.3)", "jaraco.tidelift (>=1.4)", "pygments-github-lexers (==0.0.5)", "rst.linker (>=1.9)", "sphinx (>=3.5)", "sphinx-favicon", "sphinx-hoverxref (<2)", "sphinx-inline-tabs", "sphinx-lint", "sphinx-notfound-page (>=1,<2)", "sphinx-reredirects", "sphinxcontrib-towncrier"] +testing = ["build[virtualenv]", "filelock (>=3.4.0)", "flake8-2020", "ini2toml[lite] (>=0.9)", "jaraco.develop (>=7.21)", "jaraco.envs (>=2.2)", "jaraco.path (>=3.2.0)", "pip (>=19.1)", "pytest (>=6)", "pytest-black (>=0.3.7)", "pytest-checkdocs (>=2.4)", "pytest-cov", "pytest-enabler (>=2.2)", "pytest-mypy (>=0.9.1)", "pytest-perf", "pytest-ruff", "pytest-timeout", "pytest-xdist", "tomli-w (>=1.0.0)", "virtualenv (>=13.0.0)", "wheel"] +testing-integration = ["build[virtualenv] (>=1.0.3)", "filelock (>=3.4.0)", "jaraco.envs (>=2.2)", "jaraco.path (>=3.2.0)", "packaging (>=23.1)", "pytest", "pytest-enabler", "pytest-xdist", "tomli", "virtualenv (>=13.0.0)", "wheel"] + +[[package]] +name = "six" +version = "1.16.0" +description = "Python 2 and 3 compatibility utilities" +optional = false +python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*" +files = [ + {file = "six-1.16.0-py2.py3-none-any.whl", hash = "sha256:8abb2f1d86890a2dfb989f9a77cfcfd3e47c2a354b01111771326f8aa26e0254"}, + {file = "six-1.16.0.tar.gz", hash = "sha256:1e61c37477a1626458e36f7b1d82aa5c9b094fa4802892072e49de9c60c4c926"}, +] + +[[package]] +name = "tomli" +version = "2.0.1" +description = "A lil' TOML parser" +optional = false +python-versions = ">=3.7" +files = [ + {file = "tomli-2.0.1-py3-none-any.whl", hash = "sha256:939de3e7a6161af0c887ef91b7d41a53e7c5a1ca976325f429cb46ea9bc30ecc"}, + {file = "tomli-2.0.1.tar.gz", hash = "sha256:de526c12914f0c550d15924c62d72abc48d6fe7364aa87328337a31007fe8a4f"}, +] + +[[package]] +name = "typing-extensions" +version = "4.8.0" +description = "Backported and Experimental Type Hints for Python 3.8+" +optional = false +python-versions = ">=3.8" +files = [ + {file = "typing_extensions-4.8.0-py3-none-any.whl", hash = "sha256:8f92fc8806f9a6b641eaa5318da32b44d401efaac0f6678c9bc448ba3605faa0"}, + {file = "typing_extensions-4.8.0.tar.gz", hash = "sha256:df8e4339e9cb77357558cbdbceca33c303714cf861d1eef15e1070055ae8b7ef"}, +] + +[[package]] +name = "urllib3" +version = "2.1.0" +description = "HTTP library with thread-safe connection pooling, file post, and more." +optional = false +python-versions = ">=3.8" +files = [ + {file = "urllib3-2.1.0-py3-none-any.whl", hash = "sha256:55901e917a5896a349ff771be919f8bd99aff50b79fe58fec595eb37bbc56bb3"}, + {file = "urllib3-2.1.0.tar.gz", hash = "sha256:df7aa8afb0148fa78488e7899b2c59b5f4ffcfa82e6c54ccb9dd37c1d7b52d54"}, +] + +[package.extras] +brotli = ["brotli (>=1.0.9)", "brotlicffi (>=0.8.0)"] +socks = ["pysocks (>=1.5.6,!=1.5.7,<2.0)"] +zstd = ["zstandard (>=0.18.0)"] + +[[package]] +name = "virtualenv" +version = "20.24.6" +description = "Virtual Python Environment builder" +optional = false +python-versions = ">=3.7" +files = [ + {file = "virtualenv-20.24.6-py3-none-any.whl", hash = "sha256:520d056652454c5098a00c0f073611ccbea4c79089331f60bf9d7ba247bb7381"}, + {file = "virtualenv-20.24.6.tar.gz", hash = "sha256:02ece4f56fbf939dbbc33c0715159951d6bf14aaf5457b092e4548e1382455af"}, +] + +[package.dependencies] +distlib = ">=0.3.7,<1" +filelock = ">=3.12.2,<4" +platformdirs = ">=3.9.1,<4" + +[package.extras] +docs = ["furo (>=2023.7.26)", "proselint (>=0.13)", "sphinx (>=7.1.2)", "sphinx-argparse (>=0.4)", "sphinxcontrib-towncrier (>=0.2.1a0)", "towncrier (>=23.6)"] +test = ["covdefaults (>=2.3)", "coverage (>=7.2.7)", "coverage-enable-subprocess (>=1)", "flaky (>=3.7)", "packaging (>=23.1)", "pytest (>=7.4)", "pytest-env (>=0.8.2)", "pytest-freezer (>=0.4.8)", "pytest-mock (>=3.11.1)", "pytest-randomly (>=3.12)", "pytest-timeout (>=2.1)", "setuptools (>=68)", "time-machine (>=2.10)"] + +[[package]] +name = "xmltodict" +version = "0.13.0" +description = "Makes working with XML feel like you are working with JSON" +optional = false +python-versions = ">=3.4" +files = [ + {file = "xmltodict-0.13.0-py2.py3-none-any.whl", hash = "sha256:aa89e8fd76320154a40d19a0df04a4695fb9dc5ba977cbb68ab3e4eb225e7852"}, + {file = "xmltodict-0.13.0.tar.gz", hash = "sha256:341595a488e3e01a85a9d8911d8912fd922ede5fecc4dce437eb4b6c8d037e56"}, +] + +[metadata] +lock-version = "2.0" +python-versions = "^3.9" +content-hash = "8cdf0421cfdb8c8a9a22d3dcd2279d71244bd44fb3c49ec92d6cc9e128773920" diff --git a/pyproject.toml b/pyproject.toml new file mode 100644 index 00000000..b180f8b6 --- /dev/null +++ b/pyproject.toml @@ -0,0 +1,79 @@ +[tool.poetry] +name = "data-factory-testing-framework" +version = "0.0.0" +description = "A unit test framework that allows you to write unit and functional tests for Data Factory pipelines against the git integrated json resource files." +authors = ["Arjen Kroezen ", "Yennifer Santos ", "Jaya Kumar ", "Leonard Herold "] +readme = "README.md" +license = "MIT" +include = [ "README.md", "LICENSE" ] +keywords = ["fabric", "datafactory", "unit-testing", "functional-testing", "azure"] + +[tool.poetry.dependencies] +python = "^3.9" +azure-core = "^1.29.5" +xmltodict = "^0.13.0" +lxml = "^4.9.3" +lark = "^1.1.8" + +[tool.poetry.group.dev.dependencies] +mutatest = "^3.1.0" +pytest = "^7.4.3" +ruff = "^0.1.5" +pre-commit = "^3.5.0" +astor = "^0.8.1" +docstring-parser = "^0.15" +freezegun = "^1.2.2" + + +[build-system] +requires = ["poetry-core"] +build-backend = "poetry.core.masonry.api" + + +[tool.ruff] +select = [ + "A", # flake8 builtins + "ANN", # annotations + "B", # bugbear + "COM", # flake8 commas + "D", # Pydoc style docstrings + "E", # PEP8 conventions + "F", # pyflakes + "N", # PEP8 naming conventions + "I" +] +ignore = [ + "ANN101", # Ignore missing type annotation for self in method + "D100", # Ignore missing docstring in public module + "D101", + "D102", + "D103", + "D104", # Ignore missing docstring in public package + # ruff format conflicts certain rules (see https://docs.astral.sh/ruff/formatter/#format-suppression) + "E111", + "E114", + "E117", + "COM812", + "COM819", + "D206", + "D300", + "ISC001", + "ISC002", + "Q000", + "Q001", + "Q002", + "Q003", + "W191", +] +extend-exclude = ["azure_data_factory_testing_framework/data_factory/generated/**"] +line-length = 120 + +[tool.ruff.lint.pycodestyle] +max-line-length = 160 # relax line length limit to 140 characters (wrapping happens at 120) + +[tool.ruff.lint.pydocstyle] +convention = "google" + +[tool.pytest.ini_options] +minversion = "7.0" +pythonpath = ["."] diff --git a/src/data_factory_testing_framework/__init__.py b/src/data_factory_testing_framework/__init__.py new file mode 100644 index 00000000..e69de29b diff --git a/src/data_factory_testing_framework/deserializers/__init__.py b/src/data_factory_testing_framework/deserializers/__init__.py new file mode 100644 index 00000000..e69de29b diff --git a/src/data_factory_testing_framework/deserializers/_deserializer_base.py b/src/data_factory_testing_framework/deserializers/_deserializer_base.py new file mode 100644 index 00000000..cb1beb60 --- /dev/null +++ b/src/data_factory_testing_framework/deserializers/_deserializer_base.py @@ -0,0 +1,21 @@ +from data_factory_testing_framework.deserializers.shared._activity_deserializer import ( + _get_activity_from_activity_data, +) +from data_factory_testing_framework.deserializers.shared._data_factory_element_replacer import ( + _find_and_replace_expressions_in_dict, +) +from data_factory_testing_framework.models.pipeline import Pipeline + + +def _parse_pipeline_from_json(name: str, json_data: dict) -> Pipeline: + properties = json_data.get("properties", {}) + activities = properties.get("activities", []) + + for activity_data in activities: + activities[activities.index(activity_data)] = _get_activity_from_activity_data(activity_data) + + pipeline = Pipeline(name, **properties) + + _find_and_replace_expressions_in_dict(pipeline) + + return pipeline diff --git a/src/data_factory_testing_framework/deserializers/_deserializer_data_factory.py b/src/data_factory_testing_framework/deserializers/_deserializer_data_factory.py new file mode 100644 index 00000000..db5bea18 --- /dev/null +++ b/src/data_factory_testing_framework/deserializers/_deserializer_data_factory.py @@ -0,0 +1,10 @@ +import json + +from data_factory_testing_framework.deserializers._deserializer_base import _parse_pipeline_from_json +from data_factory_testing_framework.models.pipeline import Pipeline + + +def parse_data_factory_pipeline_from_pipeline_json(pipeline_json: str) -> Pipeline: + json_data = json.loads(pipeline_json) + name = json_data["name"] + return _parse_pipeline_from_json(name, json_data) diff --git a/src/data_factory_testing_framework/deserializers/_deserializer_fabric.py b/src/data_factory_testing_framework/deserializers/_deserializer_fabric.py new file mode 100644 index 00000000..3392c92e --- /dev/null +++ b/src/data_factory_testing_framework/deserializers/_deserializer_fabric.py @@ -0,0 +1,15 @@ +import json + +from data_factory_testing_framework.deserializers._deserializer_base import _parse_pipeline_from_json +from data_factory_testing_framework.models.pipeline import Pipeline + + +def parse_fabric_pipeline_from_pipeline_json_files(metadata_json: str, pipeline_json: str) -> Pipeline: + pipeline_name = _get_pipeline_name_from_metadata_json(metadata_json) + pipeline_json = json.loads(pipeline_json) + return _parse_pipeline_from_json(pipeline_name, pipeline_json) + + +def _get_pipeline_name_from_metadata_json(metadata_json: str) -> str: + metadata_json = json.loads(metadata_json) + return metadata_json["displayName"] diff --git a/src/data_factory_testing_framework/deserializers/shared/__init__.py b/src/data_factory_testing_framework/deserializers/shared/__init__.py new file mode 100644 index 00000000..e69de29b diff --git a/src/data_factory_testing_framework/deserializers/shared/_activity_deserializer.py b/src/data_factory_testing_framework/deserializers/shared/_activity_deserializer.py new file mode 100644 index 00000000..cdd9736e --- /dev/null +++ b/src/data_factory_testing_framework/deserializers/shared/_activity_deserializer.py @@ -0,0 +1,64 @@ +from typing import List + +from data_factory_testing_framework.models.activities.activity import Activity +from data_factory_testing_framework.models.activities.append_variable_activity import AppendVariableActivity +from data_factory_testing_framework.models.activities.execute_pipeline_activity import ExecutePipelineActivity +from data_factory_testing_framework.models.activities.fail_activity import FailActivity +from data_factory_testing_framework.models.activities.filter_activity import FilterActivity +from data_factory_testing_framework.models.activities.for_each_activity import ForEachActivity +from data_factory_testing_framework.models.activities.if_condition_activity import IfConditionActivity +from data_factory_testing_framework.models.activities.set_variable_activity import SetVariableActivity +from data_factory_testing_framework.models.activities.switch_activity import SwitchActivity +from data_factory_testing_framework.models.activities.until_activity import UntilActivity + + +def _get_activity_from_activity_data(activity_data: dict) -> Activity: + type_properties = activity_data["typeProperties"] + if activity_data["type"] == "SetVariable": + return SetVariableActivity(**activity_data) + if activity_data["type"] == "AppendVariable": + return AppendVariableActivity(**activity_data) + elif activity_data["type"] == "Until": + activities = _get_activity_from_activities_data(type_properties["activities"]) + return UntilActivity(activities=activities, **activity_data) + elif activity_data["type"] == "ExecutePipeline": + return ExecutePipelineActivity(**activity_data) + elif activity_data["type"] == "IfCondition": + if_true_activities = ( + _get_activity_from_activities_data(type_properties["ifTrueActivities"]) + if "ifTrueActivities" in type_properties + else [] + ) + if_false_activities = ( + _get_activity_from_activities_data(type_properties["ifFalseActivities"]) + if "ifFalseActivities" in type_properties + else [] + ) + return IfConditionActivity( + if_true_activities=if_true_activities, if_false_activities=if_false_activities, **activity_data + ) + elif activity_data["type"] == "ForEach": + child_activities = _get_activity_from_activities_data(type_properties["activities"]) + return ForEachActivity(activities=child_activities, **activity_data) + elif activity_data["type"] == "Switch": + default_activities = _get_activity_from_activities_data(type_properties["defaultActivities"]) + cases_activities = {} + for case in type_properties["cases"]: + case_value = case["value"] + activities = case["activities"] + cases_activities[case_value] = _get_activity_from_activities_data(activities) + return SwitchActivity(default_activities=default_activities, cases_activities=cases_activities, **activity_data) + elif activity_data["type"] == "Filter": + return FilterActivity(**activity_data) + elif activity_data["type"] == "Fail": + return FailActivity(**activity_data) + else: + return Activity(**activity_data) + + +def _get_activity_from_activities_data(activities_data: dict) -> List[Activity]: + activities = [] + for activity_data in activities_data: + activities.append(_get_activity_from_activity_data(activity_data)) + + return activities diff --git a/src/data_factory_testing_framework/deserializers/shared/_data_factory_element_replacer.py b/src/data_factory_testing_framework/deserializers/shared/_data_factory_element_replacer.py new file mode 100644 index 00000000..53b7af99 --- /dev/null +++ b/src/data_factory_testing_framework/deserializers/shared/_data_factory_element_replacer.py @@ -0,0 +1,68 @@ +from typing import Any + +from data_factory_testing_framework.models.data_factory_element import DataFactoryElement + + +def _find_and_replace_expressions_in_dict(obj: any, visited: list = None) -> None: + if visited is None: + visited = [] + + if obj in visited: + return + + visited.append(obj) + + # Attributes + attribute_names = [ + attribute for attribute in dir(obj) if not attribute.startswith("_") and not callable(getattr(obj, attribute)) + ] + for attribute_name in attribute_names: + attribute = getattr(obj, attribute_name) + if attribute is None: + continue + + if _is_obj_expression_dict(attribute): + value = _get_obj_expression_value(attribute) + setattr(obj, attribute_name, DataFactoryElement(value)) + else: + _find_and_replace_expressions_in_dict(attribute, visited) + + # Dictionary + if isinstance(obj, dict): + for key in obj.keys(): + if _is_obj_expression_dict(obj[key]): + value = _get_obj_expression_value(obj[key]) + obj[key] = DataFactoryElement(value) + continue + + _find_and_replace_expressions_in_dict(obj[key], visited) + + # List + if isinstance(obj, list): + for item in obj: + if _is_obj_expression_dict(item): + value = _get_obj_expression_value(item) + obj[obj.index(item)] = DataFactoryElement(value) + continue + + _find_and_replace_expressions_in_dict(item, visited) + + +def _is_obj_expression_dict(obj: Any) -> bool: # noqa: ANN401 + return ( + isinstance(obj, dict) + and ("type" in obj.keys()) + and (obj["type"] == "Expression") + and (("value" in obj.keys()) or ("content" in obj.keys())) + and len(obj.keys()) == 2 + ) + + +def _get_obj_expression_value(obj: Any) -> Any: # noqa: ANN401 + if "value" in obj.keys(): + return obj["value"] + + if "content" in obj.keys(): + return obj["content"] + + raise ValueError("Expression object does not contain a value or content key") diff --git a/src/data_factory_testing_framework/exceptions/activity_not_found_error.py b/src/data_factory_testing_framework/exceptions/activity_not_found_error.py new file mode 100644 index 00000000..875c236a --- /dev/null +++ b/src/data_factory_testing_framework/exceptions/activity_not_found_error.py @@ -0,0 +1,4 @@ +class ActivityNotFoundError(Exception): + def __init__(self, activity_name: str) -> None: + """Error raised when an activity is not found.""" + super().__init__(f"Activity with name '{activity_name}' not found") diff --git a/src/data_factory_testing_framework/exceptions/activity_output_field_not_found_error.py b/src/data_factory_testing_framework/exceptions/activity_output_field_not_found_error.py new file mode 100644 index 00000000..280f15cb --- /dev/null +++ b/src/data_factory_testing_framework/exceptions/activity_output_field_not_found_error.py @@ -0,0 +1,6 @@ +class ActivityOutputFieldNotFoundError(Exception): + def __init__(self, activity_name: str, output_field_name: str) -> None: + """Exception raised when an activity does not have an expected output field.""" + super().__init__( + f"Activity '{activity_name}' does not have output field '{output_field_name}'. Consider setting it through activity.setResult()." + ) diff --git a/src/data_factory_testing_framework/exceptions/dataset_parameter_not_found_error.py b/src/data_factory_testing_framework/exceptions/dataset_parameter_not_found_error.py new file mode 100644 index 00000000..30e3e335 --- /dev/null +++ b/src/data_factory_testing_framework/exceptions/dataset_parameter_not_found_error.py @@ -0,0 +1,4 @@ +class DatasetParameterNotFoundError(Exception): + def __init__(self, dataset_name: str) -> None: + """Error raised when a dataset expression is not found.""" + super().__init__(f"Dataset parameter: '{dataset_name}' not found") diff --git a/src/data_factory_testing_framework/exceptions/expression_evaluation_error.py b/src/data_factory_testing_framework/exceptions/expression_evaluation_error.py new file mode 100644 index 00000000..ca3aa5d5 --- /dev/null +++ b/src/data_factory_testing_framework/exceptions/expression_evaluation_error.py @@ -0,0 +1,2 @@ +class ExpressionEvaluationError(Exception): + pass diff --git a/src/data_factory_testing_framework/exceptions/expression_parameter_not_found_error.py b/src/data_factory_testing_framework/exceptions/expression_parameter_not_found_error.py new file mode 100644 index 00000000..14344cbc --- /dev/null +++ b/src/data_factory_testing_framework/exceptions/expression_parameter_not_found_error.py @@ -0,0 +1,4 @@ +class ExpressionParameterNotFoundError(Exception): + def __init__(self, parameter_name: str) -> None: + """Error raised when an expression parameter is not found.""" + super().__init__(f"Parameter '{parameter_name}' not found") diff --git a/src/data_factory_testing_framework/exceptions/expression_parsing_error.py b/src/data_factory_testing_framework/exceptions/expression_parsing_error.py new file mode 100644 index 00000000..121652f8 --- /dev/null +++ b/src/data_factory_testing_framework/exceptions/expression_parsing_error.py @@ -0,0 +1,4 @@ +class ExpressionParsingError(Exception): + """Exception raised when an expression cannot be parsed.""" + + pass diff --git a/src/data_factory_testing_framework/exceptions/function_call_invalid_arguments_count_error.py b/src/data_factory_testing_framework/exceptions/function_call_invalid_arguments_count_error.py new file mode 100644 index 00000000..22299d31 --- /dev/null +++ b/src/data_factory_testing_framework/exceptions/function_call_invalid_arguments_count_error.py @@ -0,0 +1,9 @@ +class FunctionCallInvalidArgumentsCountError(Exception): + def __init__(self, name: str, evaluated_arguments: list, expected_argument_names: list) -> None: + """Error raised when a function call has an invalid arguments count.""" + message = ( + f"FunctionCall {name} has invalid arguments count. " + f"Evaluated arguments: \"{', '.join(map(str, evaluated_arguments))}\". " + f"Expected argument types: {', '.join(expected_argument_names)}" + ) + super().__init__(message) diff --git a/src/data_factory_testing_framework/exceptions/linked_service_parameter_not_found_error.py b/src/data_factory_testing_framework/exceptions/linked_service_parameter_not_found_error.py new file mode 100644 index 00000000..f8a06879 --- /dev/null +++ b/src/data_factory_testing_framework/exceptions/linked_service_parameter_not_found_error.py @@ -0,0 +1,4 @@ +class LinkedServiceParameterNotFoundError(Exception): + def __init__(self, linked_service_name: str) -> None: + """Error raised when a linked service expression is not found.""" + super().__init__(f"LinkedService parameter: '{linked_service_name}' not found") diff --git a/src/data_factory_testing_framework/exceptions/pipeline_activities_circular_dependency_error.py b/src/data_factory_testing_framework/exceptions/pipeline_activities_circular_dependency_error.py new file mode 100644 index 00000000..f9ff8b93 --- /dev/null +++ b/src/data_factory_testing_framework/exceptions/pipeline_activities_circular_dependency_error.py @@ -0,0 +1,4 @@ +class PipelineActivitiesCircularDependencyError(Exception): + def __init__(self) -> None: + """Exception for circular dependencies in pipeline activities.""" + super().__init__("Circular dependency detected in pipeline activities") diff --git a/src/data_factory_testing_framework/exceptions/pipeline_not_found_error.py b/src/data_factory_testing_framework/exceptions/pipeline_not_found_error.py new file mode 100644 index 00000000..4fb82e42 --- /dev/null +++ b/src/data_factory_testing_framework/exceptions/pipeline_not_found_error.py @@ -0,0 +1,4 @@ +class PipelineNotFoundError(Exception): + def __init__(self, pipeline_name: str) -> None: + """Error raised when a pipeline is not found.""" + super().__init__(f"Pipeline with name {pipeline_name} not found") diff --git a/src/data_factory_testing_framework/exceptions/state_iteration_item_not_set_error.py b/src/data_factory_testing_framework/exceptions/state_iteration_item_not_set_error.py new file mode 100644 index 00000000..33c5f402 --- /dev/null +++ b/src/data_factory_testing_framework/exceptions/state_iteration_item_not_set_error.py @@ -0,0 +1,4 @@ +class StateIterationItemNotSetError(Exception): + def __init__(self) -> None: + """Error raised when an iteration item is not set.""" + super().__init__("Iteration item not set.") diff --git a/src/data_factory_testing_framework/exceptions/unsupported_function_error.py b/src/data_factory_testing_framework/exceptions/unsupported_function_error.py new file mode 100644 index 00000000..1606ff0d --- /dev/null +++ b/src/data_factory_testing_framework/exceptions/unsupported_function_error.py @@ -0,0 +1,4 @@ +class UnsupportedFunctionError(Exception): + def __init__(self, function_name: str) -> None: + """Error raised when a function is not supported.""" + super().__init__(f"Unsupported function: {function_name}") diff --git a/src/data_factory_testing_framework/exceptions/variable_being_evaluated_does_not_exist_error.py b/src/data_factory_testing_framework/exceptions/variable_being_evaluated_does_not_exist_error.py new file mode 100644 index 00000000..79186758 --- /dev/null +++ b/src/data_factory_testing_framework/exceptions/variable_being_evaluated_does_not_exist_error.py @@ -0,0 +1,4 @@ +class VariableBeingEvaluatedDoesNotExistError(Exception): + def __init__(self, variable_name: str) -> None: + """Error raised when a variable being evaluated does not exist.""" + super().__init__(f"Variable being evaluated does not exist: {variable_name}") diff --git a/src/data_factory_testing_framework/exceptions/variable_does_not_exist_error.py b/src/data_factory_testing_framework/exceptions/variable_does_not_exist_error.py new file mode 100644 index 00000000..e9b6be10 --- /dev/null +++ b/src/data_factory_testing_framework/exceptions/variable_does_not_exist_error.py @@ -0,0 +1,4 @@ +class VariableDoesNotExistError(Exception): + def __init__(self, variable_name: str) -> None: + """Error raised when a variable does not exist.""" + super().__init__(f"Variable does not exist: {variable_name}") diff --git a/src/data_factory_testing_framework/exceptions/variable_not_found_error.py b/src/data_factory_testing_framework/exceptions/variable_not_found_error.py new file mode 100644 index 00000000..c3f7afe5 --- /dev/null +++ b/src/data_factory_testing_framework/exceptions/variable_not_found_error.py @@ -0,0 +1,4 @@ +class VariableNotFoundError(Exception): + def __init__(self, variable_name: str) -> None: + """Error raised when a variable is not found.""" + super().__init__(f"Variable '{variable_name}' not found") diff --git a/src/data_factory_testing_framework/functions/__init__.py b/src/data_factory_testing_framework/functions/__init__.py new file mode 100644 index 00000000..c9893be2 --- /dev/null +++ b/src/data_factory_testing_framework/functions/__init__.py @@ -0,0 +1,5 @@ +from data_factory_testing_framework.functions.functions_repository import FunctionsRepository + +__all__ = [ + "FunctionsRepository", +] diff --git a/src/data_factory_testing_framework/functions/_expression_transformer.py b/src/data_factory_testing_framework/functions/_expression_transformer.py new file mode 100644 index 00000000..f645647f --- /dev/null +++ b/src/data_factory_testing_framework/functions/_expression_transformer.py @@ -0,0 +1,285 @@ +import inspect +from typing import Callable, Optional + +from lark import Discard, Token, Transformer +from lxml.etree import _Element + +from data_factory_testing_framework.exceptions.activity_not_found_error import ActivityNotFoundError +from data_factory_testing_framework.exceptions.activity_output_field_not_found_error import ( + ActivityOutputFieldNotFoundError, +) +from data_factory_testing_framework.exceptions.dataset_parameter_not_found_error import ( + DatasetParameterNotFoundError, +) +from data_factory_testing_framework.exceptions.expression_evaluation_error import ( + ExpressionEvaluationError, +) +from data_factory_testing_framework.exceptions.expression_parameter_not_found_error import ( + ExpressionParameterNotFoundError, +) +from data_factory_testing_framework.exceptions.linked_service_parameter_not_found_error import ( + LinkedServiceParameterNotFoundError, +) +from data_factory_testing_framework.exceptions.state_iteration_item_not_set_error import ( + StateIterationItemNotSetError, +) +from data_factory_testing_framework.exceptions.variable_not_found_error import VariableNotFoundError +from data_factory_testing_framework.functions.functions_repository import FunctionsRepository +from data_factory_testing_framework.state.pipeline_run_state import PipelineRunState +from data_factory_testing_framework.state.run_parameter import RunParameter +from data_factory_testing_framework.state.run_parameter_type import RunParameterType + + +class ExpressionTransformer(Transformer): + def __init__(self, state: PipelineRunState) -> None: + """Transformer for the Expression Language.""" + self.state: PipelineRunState = state + super().__init__() + + def LITERAL_LETTER(self, token: Token) -> str: # noqa: N802 + return str(token.value) + + def LITERAL_INT(self, token: Token) -> int: # noqa: N802 + return int(token.value) + + def LITERAL_FLOAT(self, token: Token) -> float: # noqa: N802 + return float(token.value) + + def LITERAL_SINGLE_QUOTED_STRING(self, token: Token) -> str: # noqa: N802 + return str(token.value) + + def LITERAL_BOOLEAN(self, token: Token) -> bool: # noqa: N802 + return bool(token.value) + + def LITERAL_NULL(self, token: Token) -> Optional[None]: # noqa: N802 + return None + + def literal_evaluation(self, value: list[Token, str, int, float, bool]) -> [str, int, float, bool, None]: + if len(value) != 1: + raise ExpressionEvaluationError("Literal evaluation should have only one value") + if type(value[0]) not in [str, int, float, bool, None]: + raise ExpressionEvaluationError("Literal evaluation only supports string, int, float, bool and None") + return value[0] + + def literal_interpolation(self, value: list[Token, str, int, float, bool]) -> str: + result = "" + for item in value: + if type(item) not in [str, int, float, bool, None]: + raise ExpressionEvaluationError("Literal interpolation only supports string, int, float, bool and None") + + result += str(item) + + return result + + def EXPRESSION_NULL(self, token: Token) -> Optional[None]: # noqa: N802 + return None + + def EXPRESSION_STRING(self, token: Token) -> str: # noqa: N802 + string = str(token.value) + string = string.replace("''", "'") # replace escaped single quotes + string = string[1:-1] + + return string + + def EXPRESSION_INTEGER(self, token: Token) -> int: # noqa: N802 + return int(token.value) + + def EXPRESSION_FLOAT(self, token: Token) -> float: # noqa: N802 + return float(token.value) + + def EXPRESSION_BOOLEAN(self, token: Token) -> bool: # noqa: N802 + return bool(token.value) + + def EXPRESSION_WS(self, token: Token) -> Discard: # noqa: N802 + # Discard whitespaces in expressions + return Discard + + def EXPRESSION_ARRAY_INDEX(self, token: Token) -> int: # noqa: N802 + token.value = int(token.value[1:-1]) + return token + + def expression_pipeline_reference(self, value: list[Token, str, int, float, bool]) -> [str, int, float, bool]: + if not (isinstance(value[0], Token) and value[0].type == "EXPRESSION_PIPELINE_PROPERTY"): + raise ExpressionEvaluationError('Pipeline reference requires Token "EXPRESSION_PIPELINE_PROPERTY"') + + if not (isinstance(value[1], Token) and value[1].type == "EXPRESSION_PARAMETER_NAME"): + raise ExpressionEvaluationError('Pipeline reference requires Token "EXPRESSION_PARAMETER_NAME"') + pipeline_reference_property: Token = value[0] + pipeline_reference_property_parameter: Token = value[1] + + global_parameters: list[RunParameter] = list( + filter(lambda p: p.type == RunParameterType.Global, self.state.parameters) + ) + pipeline_parameters = list(filter(lambda p: p.type == RunParameterType.Pipeline, self.state.parameters)) + + first = None + if pipeline_reference_property == "parameters": + first = list(filter(lambda p: p.name == pipeline_reference_property_parameter, pipeline_parameters)) + else: + first = list(filter(lambda p: p.name == pipeline_reference_property_parameter, global_parameters)) + + if len(first) == 0: + raise ExpressionParameterNotFoundError(pipeline_reference_property_parameter) + + return first[0].value + + def expression_variable_reference(self, value: list[Token, str, int, float, bool]) -> [str, int, float, bool]: + if not (isinstance(value[0], Token) and value[0].type == "EXPRESSION_VARIABLE_NAME"): + raise ExpressionEvaluationError('Variable reference requires Token "EXPRESSION_VARIABLE_NAME"') + + variable_name = value[0].value + variable_name = variable_name[1:-1] # remove quotes + variable = list(filter(lambda p: p.name == variable_name, self.state.variables)) + + if len(variable) == 0: + raise VariableNotFoundError(variable_name) + return variable[0].value + + def expression_dataset_reference(self, value: list[Token, str, int, float, bool]) -> [str, int, float, bool]: + if not (isinstance(value[0], Token) and value[0].type == "EXPRESSION_DATASET_NAME"): + raise ExpressionEvaluationError('Dataset reference requires Token "EXPRESSION_DATASET_NAME"') + + dataset_name = value[0].value + dataset_name = dataset_name[1:-1] # remove quotes + datasets = list(filter(lambda p: p.type == RunParameterType.Dataset, self.state.parameters)) + dataset = list(filter(lambda p: p.name == dataset_name, datasets)) + + if len(dataset) == 0: + raise DatasetParameterNotFoundError(dataset_name) + return dataset[0].value + + def expression_linked_service_reference(self, value: list[Token, str, int, float, bool]) -> [str, int, float, bool]: + if not (isinstance(value[0], Token) and value[0].type == "EXPRESSION_LINKED_SERVICE_NAME"): + raise ExpressionEvaluationError('Linked service reference requires Token "EXPRESSION_LINKED_SERVICE_NAME"') + + linked_service_name = value[0].value + linked_service_name = linked_service_name[1:-1] # remove quotes + linked_services = list(filter(lambda p: p.type == RunParameterType.LinkedService, self.state.parameters)) + linked_service = list(filter(lambda p: p.name == linked_service_name, linked_services)) + + if len(linked_service) == 0: + raise LinkedServiceParameterNotFoundError(linked_service_name) + return linked_service[0].value + + def expression_activity_reference(self, values: list[Token, str, int, float, bool]) -> [str, int, float, bool]: + if not (isinstance(values[0], Token) and values[0].type == "EXPRESSION_ACTIVITY_NAME"): + raise ExpressionEvaluationError('Activity reference requires Token "EXPRESSION_ACTIVITY_NAME"') + + activity_name = values[0].value + activity_name = activity_name[1:-1] # remove quotes + + if not all( + isinstance(value, Token) and value.type in ["EXPRESSION_PARAMETER_NAME", "EXPRESSION_ARRAY_INDEX"] + for value in values[1:] + ): + raise ExpressionEvaluationError( + 'Activity property and fields should be of type "EXPRESSION_PARAMETER_NAME" or "EXPRESSION_ARRAY_INDEX"' + ) + + activity = self.state.try_get_scoped_activity_result_by_name(activity_name) + if activity is None: + raise ActivityNotFoundError(activity_name) + + property_tokens = values[1:] + current_output = activity + + while len(property_tokens) > 0: + current_token = property_tokens.pop(0) + if current_token.type == "EXPRESSION_PARAMETER_NAME": + if current_token.value not in current_output: + raise ActivityOutputFieldNotFoundError(activity_name, current_token.value) + + current_output = current_output[current_token.value] + continue + if current_token.type == "EXPRESSION_ARRAY_INDEX": + if not isinstance(current_output, list): + raise ExpressionEvaluationError("Array index can only be used on lists") + current_output = current_output[current_token.value] + continue + return current_output + + def expression_item_reference(self, value: list[Token, str, int, float, bool]) -> [str, int, float, bool]: + item = self.state.iteration_item + if item is None: + raise StateIterationItemNotSetError() + return item + + def expression_system_variable_reference( + self, value: list[Token, str, int, float, bool] + ) -> [str, int, float, bool]: + if not (isinstance(value[0], Token) and value[0].type == "EXPRESSION_SYSTEM_VARIABLE_NAME"): + raise ExpressionEvaluationError( + 'System variable reference requires Token "EXPRESSION_SYSTEM_VARIABLE_NAME"' + ) + + system_variable_name: Token = value[0] + + system_variable_parameters: list[RunParameter] = list( + filter(lambda p: p.type == RunParameterType.System, self.state.parameters) + ) + + system_parameters = list(filter(lambda p: p.name == system_variable_name, system_variable_parameters)) + if len(system_parameters) == 0: + raise ExpressionParameterNotFoundError(system_variable_name) + + return system_parameters[0].value + + def expression_function_parameters(self, values: list[Token, str, int, float, bool]) -> list: + if not all(type(value) in [str, int, float, bool, list, _Element] or value is None for value in values): + raise ExpressionEvaluationError("Function parameters should be string, int, float, bool, list or _Element") + return values + + def expression_parameter(self, values: list[Token, str, int, float, bool, list]) -> str: + if len(values) != 1: + raise ExpressionEvaluationError("Function parameter must have only one value") + parameter = values[0] + if type(parameter) not in [str, int, float, bool, list, _Element, None] and parameter is not None: + raise ExpressionEvaluationError("Function parameters should be string, int, float, bool, list or _Element") + return parameter + + def expression_evaluation(self, values: list[Token, str, int, float, bool, list]) -> [str, int, float, bool]: + eval_value = values[0] + if len(values) == 1: + return eval_value + + if not all( + isinstance(array_index, Token) or array_index.type == "EXPRESSION_ARRAY_INDEX" for array_index in values[1] + ): + raise ExpressionEvaluationError('Array indices should be of type "EXPRESSION_ARRAY_INDEX"') + + array_indices: list[Token] = values[1] + for array_index in array_indices: + eval_value = eval_value[array_index.value] + return eval_value + + def expression_interpolation_evaluation( + self, values: list[Token, str, int, float, bool, list] + ) -> [str, int, float, bool]: + return values[0] + + def expression_array_indices(self, values: list[Token, str, int, float, bool]) -> Optional[list[Token]]: + if values[0] is None: + return Discard # if there are no array indices, discard the value + if not all(isinstance(value, Token) and value.type == "EXPRESSION_ARRAY_INDEX" for value in values): + raise ExpressionEvaluationError('Array indices should be of type "EXPRESSION_ARRAY_INDEX"') + return values + + def expression_function_call(self, values: list[Token, str, int, float, bool]) -> [str, int, float, bool]: + fn = values[0] + fn_parameters = values[1] if values[1] is not None else [] + function: Callable = FunctionsRepository.functions.get(fn.value) + + pos_or_keyword_parameters = [] + + function_signature = inspect.signature(function) + pos_or_keyword_parameters = [ + param + for param in function_signature.parameters.values() + if param.kind == inspect.Parameter.POSITIONAL_OR_KEYWORD + ] + + pos_or_keyword_values = fn_parameters[: len(pos_or_keyword_parameters)] + var_positional_values = fn_parameters[len(pos_or_keyword_parameters) :] # should be 0 or 1 + # TODO: implement automatic conversion of parameters based on type hints + result = function(*pos_or_keyword_values, *var_positional_values) + return result diff --git a/src/data_factory_testing_framework/functions/expression_evaluator.py b/src/data_factory_testing_framework/functions/expression_evaluator.py new file mode 100644 index 00000000..ec3a0f8b --- /dev/null +++ b/src/data_factory_testing_framework/functions/expression_evaluator.py @@ -0,0 +1,132 @@ +from typing import Union + +from lark import Lark, Token, Tree, UnexpectedCharacters +from lark.exceptions import VisitError + +from data_factory_testing_framework.exceptions.expression_parsing_error import ExpressionParsingError +from data_factory_testing_framework.functions._expression_transformer import ExpressionTransformer +from data_factory_testing_framework.functions.functions_repository import FunctionsRepository +from data_factory_testing_framework.state.pipeline_run_state import PipelineRunState + + +class ExpressionEvaluator: + def __init__(self) -> None: + """Evaluator for the expression language.""" + literal_grammar = """ + + // literal rules + ?literal_start: literal_evaluation + literal_evaluation: LITERAL_INT + | LITERAL_LETTER + | LITERAL_SINGLE_QUOTED_STRING + | LITERAL_BOOLEAN + | LITERAL_FLOAT + | LITERAL_NULL + | literal_array + literal_array: "[" literal_evaluation ("," literal_evaluation)* "]" + literal_interpolation: (LITERAL_LETTER* "@{" expression_evaluation "}" LITERAL_LETTER*)* + + + // literal terminals: + LITERAL_LETTER: /[^@]+/ + LITERAL_INT: SIGNED_INT + LITERAL_FLOAT: SIGNED_FLOAT + LITERAL_SINGLE_QUOTED_STRING: SINGLE_QUOTED_STRING + LITERAL_BOOLEAN: BOOLEAN + LITERAL_NULL: NULL + """ + + expression_grammar = f""" + // TODO: add support for array index + ?expression_start: expression_evaluation + expression_evaluation: expression_call [expression_array_indices] + ?expression_call: expression_function_call + | expression_pipeline_reference + | expression_variable_reference + | expression_activity_reference + | expression_dataset_reference + | expression_linked_service_reference + | expression_item_reference + | expression_system_variable_reference + expression_array_indices: [EXPRESSION_ARRAY_INDEX]* + + // reference rules: + expression_pipeline_reference: "pipeline" "()" "." EXPRESSION_PIPELINE_PROPERTY "." EXPRESSION_PARAMETER_NAME + expression_variable_reference: "variables" "(" EXPRESSION_VARIABLE_NAME ")" + expression_activity_reference: "activity" "(" EXPRESSION_ACTIVITY_NAME ")" ("." EXPRESSION_PARAMETER_NAME [EXPRESSION_ARRAY_INDEX]*)+ + expression_dataset_reference: "dataset" "(" EXPRESSION_DATASET_NAME ")" + expression_linked_service_reference: "linkedService" "(" EXPRESSION_LINKED_SERVICE_NAME ")" + expression_item_reference: "item()" + expression_system_variable_reference: "pipeline" "()" "." EXPRESSION_SYSTEM_VARIABLE_NAME + + // function call rules + expression_function_call: EXPRESSION_FUNCTION_NAME "(" [expression_function_parameters] ")" + expression_function_parameters: expression_parameter ("," expression_parameter )* + expression_parameter: EXPRESSION_WS* (EXPRESSION_NULL | EXPRESSION_INTEGER | EXPRESSION_FLOAT | EXPRESSION_BOOLEAN | EXPRESSION_STRING | expression_start) EXPRESSION_WS* + + // expression terminals + EXPRESSION_PIPELINE_PROPERTY: "parameters" | "globalParameters" + EXPRESSION_PARAMETER_NAME: /[a-zA-Z0-9_]+/ + EXPRESSION_VARIABLE_NAME: "'" /[^']*/ "'" + EXPRESSION_ACTIVITY_NAME: "'" /[^']*/ "'" + EXPRESSION_DATASET_NAME: "'" /[^']*/ "'" + EXPRESSION_LINKED_SERVICE_NAME: "'" /[^']*/ "'" + EXPRESSION_SYSTEM_VARIABLE_NAME: /[a-zA-Z0-9_]+/ + EXPRESSION_FUNCTION_NAME: {self._supported_functions()} + EXPRESSION_NULL: NULL + EXPRESSION_STRING: SINGLE_QUOTED_STRING + EXPRESSION_INTEGER: SIGNED_INT + EXPRESSION_FLOAT: SIGNED_FLOAT + EXPRESSION_BOOLEAN: BOOLEAN + EXPRESSION_WS: WS + EXPRESSION_ARRAY_INDEX: ARRAY_INDEX + """ # noqa: E501 + + base_grammar = """ + ?start: ("@" expression_start) | (["@@"] literal_start) | (literal_interpolation) + + // shared custom basic data type rules: + ARRAY_INDEX: "[" /[0-9]+/ "]" + NULL: "null" + BOOLEAN: "true" | "false" + SINGLE_QUOTED_STRING: "'" /([^']|'')*/ "'" + + // imported lark terminals: + %import common.SIGNED_INT + %import common.SIGNED_FLOAT + %import common.INT + %import common.WS + """ + + grammer = base_grammar + literal_grammar + expression_grammar + self.lark_parser = Lark(grammer, start="start") + + def _supported_functions(self) -> str: + functions = list(FunctionsRepository.functions.keys()) + functions = [f'"{f}"' for f in functions] + return " | ".join(functions) + + def parse(self, expression: str) -> Tree[Token]: + tree = self.lark_parser.parse(expression) + return tree + + def evaluate(self, expression: str, state: PipelineRunState) -> Union[str, int, float, bool]: + try: + tree = self.parse(expression) + except UnexpectedCharacters as uc: + msg = f""" + Expression could not be parsed. + + expression: {expression} + line: {uc.line} + column: {uc.column} + char: {uc.char} + """ + raise ExpressionParsingError(msg) from uc + + transformer = ExpressionTransformer(state) + try: + result: Tree = transformer.transform(tree) + except VisitError as ve: + raise ve.orig_exc from ve + return result diff --git a/src/data_factory_testing_framework/functions/functions_collection_implementation.py b/src/data_factory_testing_framework/functions/functions_collection_implementation.py new file mode 100644 index 00000000..b7e9b8d6 --- /dev/null +++ b/src/data_factory_testing_framework/functions/functions_collection_implementation.py @@ -0,0 +1,179 @@ +import json +from typing import Any, Union + + +def contains(collection: Union[str, list, dict], value: Any) -> bool: # noqa: ANN401 + """Check whether a collection has a specific item. Return true when the item is found, or return false when not found. + + This function is case-sensitive. + """ + if isinstance(collection, str): + return value in collection + + if isinstance(collection, list): + if value in collection: + return True + + if isinstance(collection, dict): + if value in collection.keys(): + return True + return False + + +def empty(collection: Union[str, list]) -> bool: + """Check whether a collection is empty. Return true when the collection is empty, or return false when not empty.""" + # TODO: we do not support Object - how does ADF/Fabric handle this. + return len(collection) == 0 + + +def first(collection: Union[str, list]) -> Any: # noqa: ANN401 + """Return the first item from a string or array. + + Returns None if collection is empty. + """ + if isinstance(collection, str) or isinstance(collection, list): + if len(collection) > 0: + return collection[0] + else: + return None + # TODO: check default checks. + return None + + +def intersection(*collections: Union[str, list]) -> list: + """Return a collection that has only the common items across the specified collections. + + To appear in the result, an item must appear in all the collections passed to this function. + If one or more items have the same name, the last item with that name appears in the result. + """ + # TODO: validate this is correct. + if len(collections) == 0: + return [] + + # TODO: what if only single collection + if len(collections) == 1: + raise ValueError("Only one collection passed to intersection") + + # All collections must be of the same type + if not all(isinstance(collection, type(collections[0])) for collection in collections): + raise ValueError("All collections must be of the same type") + + # Check if all collections are of type str or list + if not isinstance(collections[0], str) and not isinstance(collections[0], list): + raise ValueError("Only str and list are supported") + + output_type = type(collections[0]) + + base_collection = collections[0] + + for collection in collections[1:]: + intersection = [value for value in base_collection if value in collection] + base_collection = intersection + + if output_type == str: + return "".join(intersection) + else: + return intersection + + +def join(collection: list, delimiter: str) -> str: + """Return a string that has all the items from an array and has each character separated by a delimiter.""" + if not isinstance(collection, list): + raise ValueError("Only list is supported") + + if not isinstance(delimiter, str): + raise ValueError("Only str is supported") + + return delimiter.join(collection) + + +def last(collection: Union[str, list]) -> Any: # noqa: ANN401 + """Return the last item from a collection.""" + if isinstance(collection, str) or isinstance(collection, list): + if len(collection) > 0: + return collection[-1] + else: + return None + + +def length(collection: Union[str, list]) -> int: + """Return the number of items in a collection.""" + if isinstance(collection, str) or isinstance(collection, list): + return len(collection) + else: + return 0 + + +def skip(collection: list, count: int) -> Union[str, list]: + """Remove items from the front of a collection, and return all the other items.""" + if not isinstance(collection, list): + raise ValueError("Only list is supported") + + if not isinstance(count, int): + raise ValueError("Only int is supported") + + if count < 0: + raise IndexError("Count must be greater than or equal to 0") + + if count > len(collection): + raise IndexError("Count must be less than or equal to the length of the collection") + + return collection[count:] + + +def take(collection: Union[str, list], count: int) -> Union[str, list]: + """Return the specified number of items from the front of a collection.""" + if not isinstance(collection, str) and not isinstance(collection, list): + raise ValueError("Only str and list are supported") + + if not isinstance(count, int): + raise ValueError("Only int is supported") + + if count < 0: + raise IndexError("Count must be greater than or equal to 0") + + if count > len(collection): + raise IndexError("Count must be less than or equal to the length of the collection") + + return collection[:count] + + +def union(*collections: list) -> list: # noqa: ANN401 + """Return a collection that has all the items from the specified collections. + + To appear in the result, an item can appear in any collection passed to this function. + If one or more items have the same name, the last item with that name appears in the result. + """ + if len(collections) < 2: + raise ValueError( + ( + "The function 'union' expects either a comma separated list of arrays or a comma separated list of objects as its parameters." + f"The function was invoked with '{len(collections)}' parameter(s)." + ) + ) + + # todo: need to check how we can support objects (as they handled as str right now) + # if not all([isinstance(collection, list) for collection in collections]): + # raise ValueError("All collections must be of type list") + + base_collection = collections[0] + if isinstance(base_collection, list): + # filter duplicates with order preserved + base_collection = list(dict.fromkeys(base_collection)) + + for collection in collections[1:]: + base_collection = list(dict.fromkeys(base_collection + collection)) + + return base_collection + + # todo: need to check how we can support objects (as they handled as str right now) + # if not all([isinstance(collection, list) for collection in collections]): + # raise ValueError("All collections must be of type list") + + # for objects (currently handled as str) + json_obs = [json.loads(arg) for arg in collections] + merged_json = json_obs[0] + for json_ob in json_obs[1:]: + merged_json = merged_json + json_ob + + return json.dumps(merged_json) diff --git a/src/data_factory_testing_framework/functions/functions_conversion_implementation.py b/src/data_factory_testing_framework/functions/functions_conversion_implementation.py new file mode 100644 index 00000000..d0a1c341 --- /dev/null +++ b/src/data_factory_testing_framework/functions/functions_conversion_implementation.py @@ -0,0 +1,163 @@ +import base64 as base64_lib +import json as json_lib +from typing import Any, Union +from urllib.parse import quote, unquote + +import xmltodict +from lxml import etree + + +def array(value: str) -> list: + """Return an array from a single specified input. For multiple inputs, see createArray().""" + return [value] + + +def base64(value: str) -> str: + """Return the base64-encoded version for a string.""" + return base64_lib.b64encode(value.encode("utf-8")).decode("utf-8") + + +def base64_to_binary(value: str) -> str: + """Return the binary version for a base64-encoded string.""" + bytes_value = value.encode("utf-8") + return "".join(f"{byte:08b}" for byte in bytes_value) + + +def base64_to_string(value: str) -> str: + """Return the string version for a base64-encoded string, effectively decoding the base64 string. + + Use this function rather than decodeBase64(). Although both functions work the same way, base64ToString() is preferred. + """ + return base64_lib.b64decode(value).decode("utf-8") + + +def binary(value: str) -> str: + """Return the binary version for a string.""" + bytes_value = value.encode("utf-8") + return "".join(f"{byte:08b}" for byte in bytes_value) + + +def bool_(value: Any) -> bool: # noqa: ANN401 + """Return the Boolean version for a value.""" + return bool(value) + + +def coalesce(*objects: Any) -> Any: # noqa: ANN401 + """Return the first non-null value from one or more parameters. + + Returns the first non-null (or non-empty for string) expression + """ + for obj in objects: + if obj is not None and obj != "": + return obj + + return None + + +def create_array(*objects: Any) -> list: # noqa: ANN401 + """Return an array from multiple inputs. For single input arrays, see array().""" + return list(objects) + + +def data_uri(value: str) -> str: + """Return a data uniform resource identifier (URI) for a string.""" + return f"data:text/plain;charset=utf-8;base64,{base64_lib.b64encode(value.encode('utf-8')).decode('utf-8')}" + + +def data_uri_to_binary(value: str) -> str: + """Return the binary version for a data uniform resource identifier (URI). + + Use this function rather than decodeDataUri(). Although both functions work the same way, dataUriBinary() is preferred. + """ + return base64_to_binary(value) + + +def data_uri_to_string(value: str) -> str: + """Return the string version for a data uniform resource identifier (URI).""" + base64_str = value.split(",")[1] + return base64_to_string(base64_str) + + +def decode_base64(value: str) -> str: + """Return the string version for a base64-encoded string, effectively decoding the base64 string. + + Consider using base64ToString() rather than decodeBase64(). Although both functions work the same way, base64ToString() is preferred. + """ + return base64_lib.b64decode(value).decode("utf-8") + + +def decode_data_uri(value: str) -> str: + """Return the binary version for a data uniform resource identifier (URI). + + Consider using dataUriToBinary(), rather than decodeDataUri(). Although both functions work the same way, dataUriToBinary() is preferred. + """ + return base64_to_binary(value) + + +def decode_uri_component(value: str) -> str: + """Return a string that replaces escape characters with decoded versions.""" + return unquote(value) + + +def encode_uri_component(value: str) -> str: + """Return a string that replaces special characters with escaped versions.""" + return quote(value, safe="~()*!.'", encoding="utf-8") + + +def float_(value: Any) -> float: # noqa: ANN401 + """Convert a string version for a floating-point number to an actual floating point number.""" + return float(value) + + +def int_(value: Any) -> int: # noqa: ANN401 + """Return the integer version for a string.""" + return int(value) + + +def json(value: Union[str, etree.ElementBase]) -> Any: # noqa: ANN401 + """Return the object version for a JSON string.""" + if isinstance(value, etree.ElementBase): + elem_str = etree.tostring(value, encoding="utf-8", short_empty_elements=False).decode("utf-8") + obj = xmltodict.parse(elem_str) + return obj + + # TODO: we do not support objects yet (e.g., list, dict, complex objects) thus flatten to string + # return json_lib.loads(value) + return value + + +def string(value: Any) -> str: # noqa: ANN401 + """Return the string version for a value.""" + if isinstance(value, dict): + return json_lib.dumps(value) + + return str(value) + + +def uri_component(value: str) -> str: + """Return a string that replaces special characters with escaped versions.""" + return quote(value, safe="~()*!.'", encoding="utf-8") + + +def uri_component_to_binary(value: str) -> str: + """Return the binary version for a URI component.""" + return base64_to_binary(f'"{value}"') + + +def uri_component_to_string(value: str) -> str: + """Return the string version for a URI component.""" + return unquote(value) + + +def xml(value: str) -> etree.ElementBase: + """Return the object version for an XML string.""" + # TODO: xml support is not sufficient yet + # we do not match the expression language of Fabric/ADF yet + return etree.fromstring(value) + + +def xpath(value: etree.ElementBase, expression: str) -> list[etree.ElementBase]: + """Return the object version for an XML string.""" + # TODO: xpath support is not sufficient yet + # we do not match the expression language of Fabric/ADF yet + return value.xpath(expression) diff --git a/src/data_factory_testing_framework/functions/functions_date_implementation.py b/src/data_factory_testing_framework/functions/functions_date_implementation.py new file mode 100644 index 00000000..3d051545 --- /dev/null +++ b/src/data_factory_testing_framework/functions/functions_date_implementation.py @@ -0,0 +1,263 @@ +from datetime import datetime, timedelta +from typing import Union + +from dateutil.relativedelta import relativedelta + + +def _datetime_from_isoformat(timestamp: str, fmt: str = None) -> datetime: + return datetime.fromisoformat(timestamp.rstrip("Z")) + + +def _datetime_to_isoformat(date_time: datetime, fmt: str = None) -> str: + # TODO: Implement other fmt's if valuable. Use cases where you need to assert certain format should be rare. + return date_time.isoformat(timespec="microseconds") + "Z" + + +def _add_time_delta_to_iso_timestamp(timestamp: str, time_delta: Union[timedelta, relativedelta]) -> str: + date_time = _datetime_from_isoformat(timestamp) + time_delta + return _datetime_to_isoformat(date_time) + + +def utcnow(fmt: str = None) -> str: + """Return the current timestamp. + + Args: + fmt (str, optional): Optionally, you can specify a different format with the parameter. + + Note: This function does not implement formatting for now and + """ + return _datetime_to_isoformat(datetime.utcnow()) + + +def ticks(timestamp: str) -> int: + """Return the ticks property value for a specified timestamp. A tick is a 100-nanosecond interval. + + Args: + timestamp (str): The string for a timestamp + """ + date_time = _datetime_from_isoformat(timestamp) + delta = date_time - datetime(1, 1, 1) + return int(delta.total_seconds()) * 10000000 + delta.microseconds * 10 + + +def add_days(timestamp: str, days: int, fmt: str = None) -> str: + """Add a number of days to a timestamp. + + Args: + timestamp (str): The string that contains the timestamp + days (int): The positive or negative number of days to add + fmt (str, optional): Optionally, you can specify a different format with the parameter. + """ + return _add_time_delta_to_iso_timestamp(timestamp, timedelta(days=days)) + + +def add_hours(timestamp: str, hours: int, fmt: str = None) -> str: + """Add a number of hours to a timestamp. + + Args: + timestamp (str): The string that contains the timestamp + hours (int): The positive or negative number of hours to add + fmt (str, optional): Optionally, you can specify a different format with the parameter. + """ + return _add_time_delta_to_iso_timestamp(timestamp, timedelta(hours=hours)) + + +def add_minutes(timestamp: str, minutes: int, fmt: str = None) -> str: + """Add a number of minutes to a timestamp. + + Args: + timestamp (str): The string that contains the timestamp + minutes (int): The positive or negative number of minutes to add + fmt (str, optional): Optionally, you can specify a different format with the parameter. + """ + return _add_time_delta_to_iso_timestamp(timestamp, timedelta(minutes=minutes)) + + +def add_seconds(timestamp: str, seconds: int, fmt: str = None) -> str: + """Add a number of seconds to a timestamp. + + Args: + timestamp (str): The string that contains the timestamp + seconds (int): The positive or negative number of seconds to add + fmt (str, optional): Optionally, you can specify a different format with the parameter. + """ + return _add_time_delta_to_iso_timestamp(timestamp, timedelta(seconds=seconds)) + + +def add_to_time(timestamp: str, interval: int, time_unit: str, fmt: str = None) -> str: + """Add a number of time units to a timestamp. See also getFutureTime. + + Args: + timestamp (str): The string that contains the timestamp + interval (int): The number of specified time units to add + time_unit (str): The unit of time to use with interval: "Second", "Minute", "Hour", "Day", "Week", "Month", "Year" + fmt (str, optional): Optionally, you can specify a different format with the parameter. + """ + if time_unit == "Second": + return add_seconds(timestamp, interval, fmt) + elif time_unit == "Minute": + return add_minutes(timestamp, interval, fmt) + elif time_unit == "Hour": + return add_hours(timestamp, interval, fmt) + elif time_unit == "Day": + return add_days(timestamp, interval, fmt) + elif time_unit == "Week": + return _add_time_delta_to_iso_timestamp(timestamp, timedelta(weeks=interval)) + elif time_unit == "Month": + return _add_time_delta_to_iso_timestamp(timestamp, relativedelta(months=interval)) + elif time_unit == "Year": + return _add_time_delta_to_iso_timestamp(timestamp, relativedelta(years=interval)) + else: + raise ValueError(f"Invalid time unit: {time_unit}") + + +def convert_from_utc(timestamp: str, destination_timezone: str, fmt: str = None) -> str: + """Convert a timestamp from Universal Time Coordinated (UTC) to the target time zone. + + Args: + timestamp (str): The string that contains the timestamp + destination_timezone (str): The name for the target time zone. + For time zone names, see Microsoft Time Zone Values, but you might have to remove any punctuation from the time zone name. + fmt (str, optional): Optionally, you can specify a different format with the parameter. + """ + # TODO: Implement other fmt's if valuable. Use cases where you need to assert certain format should be rare. + return timestamp + + +def convert_time_zone(timestamp: str, source_timezone: str, destination_timezone: str, fmt: str = None) -> str: + """Convert a timestamp from the source time zone to the target time zone. + + Args: + timestamp (str): The string that contains the timestamp + source_timezone (str): The name for the source time zone. + For time zone names, see Microsoft Time Zone Values, but you might have to remove any punctuation from the time zone name. + destination_timezone (str): The name for the target time zone. + For time zone names, see Microsoft Time Zone Values, but you might have to remove any punctuation from the time zone name. + fmt (str, optional): Optionally, you can specify a different format with the parameter. + """ + # TODO: Implement other fmt's if valuable. Use cases where you need to assert certain format should be rare. + return timestamp + + +def convert_to_utc(timestamp: str, source_timezone: str, fmt: str = None) -> str: + """Convert a timestamp from the source time zone to Universal Time Coordinated (UTC). + + Args: + timestamp (str): The string that contains the timestamp + source_timezone (str): The name for the source time zone. + For time zone names, see Microsoft Time Zone Values, but you might have to remove any punctuation from the time zone name. + fmt (str, optional): Optionally, you can specify a different format with the parameter. + """ + # TODO: Implement other fmt's if valuable. Use cases where you need to assert certain format should be rare. + return timestamp + + +def day_of_month(timestamp: str) -> int: + """Return the day of the month component from a timestamp. + + Args: + timestamp (str): The string that contains the timestamp + """ + date_time = _datetime_from_isoformat(timestamp) + return date_time.day + + +def day_of_week(timestamp: str) -> int: + """Return the day of the week component from a timestamp. + + Args: + timestamp (str): The string that contains the timestamp + """ + date_time = _datetime_from_isoformat(timestamp) + return date_time.weekday() + 1 + + +def day_of_year(timestamp: str) -> int: + """Return the day of the year component from a timestamp. + + Args: + timestamp (str): The string that contains the timestamp + """ + date_time = _datetime_from_isoformat(timestamp) + return date_time.timetuple().tm_yday + + +def format_date_time(timestamp: str, fmt: str = None) -> str: + """Return the timestamp as a string in optional format. + + Args: + timestamp (str): The string that contains the timestamp + fmt (str): The format to use when converting the timestamp to a string + """ + date_time = _datetime_from_isoformat(timestamp) + return _datetime_to_isoformat(date_time, fmt) + + +def get_future_time(interval: int, time_unit: str, fmt: str = None) -> str: + """Return the current timestamp plus the specified time units. See also addToTime. + + Args: + interval (str): The number of specified time units to add + time_unit (str): The unit of time to use with interval: "Second", "Minute", "Hour", "Day", "Week", "Month", "Year" + fmt (str, optional): Optionally, you can specify a different format with the parameter. + """ + return add_to_time(utcnow(), interval, time_unit, fmt) + + +def get_past_time(interval: int, time_unit: str, fmt: str = None) -> str: + """Return the current timestamp minus the specified time units. See also subtractFromTime. + + Args: + interval (str): The number of specified time units to subtract + time_unit (str): The unit of time to use with interval: "Second", "Minute", "Hour", "Day", "Week", "Month", "Year" + fmt (str, optional): Optionally, you can specify a different format with the parameter. + """ + return add_to_time(utcnow(), -interval, time_unit, fmt) + + +def start_of_day(timestamp: str, fmt: str = None) -> str: + """Return the start of the day for a timestamp. + + Args: + timestamp (str): The string that contains the timestamp + fmt (str, optional): Optionally, you can specify a different format with the parameter. + """ + date_time = _datetime_from_isoformat(timestamp) + date_time = date_time.replace(hour=0, minute=0, second=0, microsecond=0) + return _datetime_to_isoformat(date_time, fmt) + + +def start_of_hour(timestamp: str, fmt: str = None) -> str: + """Return the start of the hour for a timestamp. + + Args: + timestamp (str): The string that contains the timestamp + fmt (str, optional): Optionally, you can specify a different format with the parameter. + """ + date_time = _datetime_from_isoformat(timestamp) + date_time = date_time.replace(minute=0, second=0, microsecond=0) + return _datetime_to_isoformat(date_time, fmt) + + +def start_of_month(timestamp: str, fmt: str = None) -> str: + """Return the start of the month for a timestamp. + + Args: + timestamp (str): The string that contains the timestamp + fmt (str, optional): Optionally, you can specify a different format with the parameter. + """ + date_time = _datetime_from_isoformat(timestamp) + date_time = date_time.replace(day=1, hour=0, minute=0, second=0, microsecond=0) + return _datetime_to_isoformat(date_time, fmt) + + +def subtract_from_time(timestamp: str, interval: int, time_unit: str, fmt: str = None) -> str: + """Subtract a number of time units from a timestamp. See also getPastTime. + + Args: + timestamp (str): The string that contains the timestamp + interval (int): The number of specified time units to subtract + time_unit (str): The unit of time to use with interval: "Second", "Minute", "Hour", "Day", "Week", "Month", "Year" + fmt (str, optional): Optionally, you can specify a different format with the parameter. + """ + return add_to_time(timestamp, -interval, time_unit, fmt) diff --git a/src/data_factory_testing_framework/functions/functions_logical_implementation.py b/src/data_factory_testing_framework/functions/functions_logical_implementation.py new file mode 100644 index 00000000..4a222e4c --- /dev/null +++ b/src/data_factory_testing_framework/functions/functions_logical_implementation.py @@ -0,0 +1,64 @@ +from typing import Any, Union + + +def and_(expression1: bool, expression2: bool) -> bool: + """Check whether both expressions are true. + + Return true when both expressions are true, or return false when at least one expression is false. + """ + return expression1 and expression2 + + +def equals(object1: Any, object2: Any) -> bool: # noqa: ANN401 + """Check whether both values, expressions, or objects are equivalent. + + Return true when both are equivalent, or return false when they're not equivalent. + """ + return object1 == object2 + + +def greater(value: Any, compare_to: Any) -> bool: # noqa: ANN401 + """Check whether the first value is greater than the second value. + + Return true when the first value is more, or return false when less. + """ + return value > compare_to + + +def greater_or_equals(value: Any, compare_to: Any) -> bool: # noqa: ANN401 + """Check whether the first value is greater than or equal to the second value. + + Return true when the first value is greater or equal, or return false when the first value is less. + """ + return value >= compare_to + + +def if_(expression: bool, value_if_true: Any, value_if_false: Any) -> Any: # noqa: ANN401 + """Check whether an expression is true or false. Based on the result, return a specified value.""" + return value_if_true if expression else value_if_false + + +def less(value: Union[int, float, str], compare_to: Union[int, float, str]) -> bool: # noqa: ANN401 + """Check whether the first value is less than the second value. + + Return true when the first value is less, or return false when the first value is more. + """ + return value < compare_to + + +def less_or_equals(value: Union[int, float, str], compare_to: Union[int, float, str]) -> bool: # noqa: ANN401 + """Check whether the first value is less than or equal to the second value. + + Return true when the first value is less than or equal, or return false when the first value is more. + """ + return value <= compare_to + + +def not_(value: Any) -> bool: # noqa: ANN401 + """Check whether an expression is false. Return true when the expression is false, or return false when true.""" + return not value + + +def or_(a: Any, b: Any) -> Any: # noqa: ANN401 + """Check whether at least one expression is true. Return true when at least one expression is true, or return false when both are false.""" + return a or b diff --git a/src/data_factory_testing_framework/functions/functions_math_implementation.py b/src/data_factory_testing_framework/functions/functions_math_implementation.py new file mode 100644 index 00000000..cab6f4c6 --- /dev/null +++ b/src/data_factory_testing_framework/functions/functions_math_implementation.py @@ -0,0 +1,57 @@ +import random +from typing import Union + + +def add(summand_1: Union[int, float], summand_2: Union[int, float]) -> Union[int, float]: + """Return the result from adding two numbers.""" + return summand_1 + summand_2 + + +def div(dividend: Union[int, float], divisor: Union[int, float]) -> Union[int, float]: + """Return the integer result from dividing two numbers. If both the inputs are integers, the result will be an integer.""" + if isinstance(dividend, int) and isinstance(divisor, int): + return dividend // divisor + return dividend / divisor + + +def max_(arg1: Union[list, int, float], *args: Union[int, float]) -> Union[int, float]: + """Return the highest value from an array with numbers that is inclusive at both ends.""" + if isinstance(arg1, list): + return max(arg1) + if len(args) == 0: + return arg1 + return max(arg1, *args) + + +def min_(arg1: Union[list, int, float], *args: Union[int, float]) -> Union[int, float]: + """Return the lowest value from a set of numbers or an array.""" + if isinstance(arg1, list): + return min(arg1) + if len(args) == 0: + return arg1 + return min(arg1, *args) + + +def mod(dividend: Union[int, float], divisor: Union[int, float]) -> Union[int, float]: + """Return the remainder from dividing two numbers.""" + return dividend % divisor + + +def mul(multiplicand1: Union[int, float], multiplicand2: Union[int, float]) -> Union[int, float]: + """Return the product from multiplying two numbers.""" + return multiplicand1 * multiplicand2 + + +def rand(min_value: int, max_value: int) -> int: + """Return a random integer from a specified range, which is inclusive only at the starting end.""" + return random.randint(min_value, max_value - 1) + + +def range_(start_index: int, count: int) -> list: + """Return an integer array that starts from a specified integer.""" + return list(range(start_index, start_index + count)) + + +def sub(minuend: Union[int, float], subtrahend: Union[int, float]) -> Union[int, float]: + """Return the result from subtracting the second number from the first number.""" + return minuend - subtrahend diff --git a/src/data_factory_testing_framework/functions/functions_repository.py b/src/data_factory_testing_framework/functions/functions_repository.py new file mode 100644 index 00000000..e491bf0f --- /dev/null +++ b/src/data_factory_testing_framework/functions/functions_repository.py @@ -0,0 +1,102 @@ +from typing import Callable, Dict + +import data_factory_testing_framework.functions.functions_collection_implementation as collection_functions +import data_factory_testing_framework.functions.functions_conversion_implementation as conversion_functions +import data_factory_testing_framework.functions.functions_date_implementation as date_functions +import data_factory_testing_framework.functions.functions_logical_implementation as logical_functions +import data_factory_testing_framework.functions.functions_math_implementation as math_functions +import data_factory_testing_framework.functions.functions_string_implementation as string_functions + + +class FunctionsRepository: + functions: Dict[str, Callable] = { + "add": math_functions.add, + "addDays": date_functions.add_days, + "addHours": date_functions.add_hours, + "addMinutes": date_functions.add_minutes, + "addSeconds": date_functions.add_seconds, + "addToTime": date_functions.add_to_time, + "and": logical_functions.and_, + "array": conversion_functions.array, + "base64": conversion_functions.base64, + "base64ToBinary": conversion_functions.base64_to_binary, + "base64ToString": conversion_functions.base64_to_string, + "binary": conversion_functions.binary, + "bool": conversion_functions.bool_, + "coalesce": conversion_functions.coalesce, + "concat": string_functions.concat, + "contains": collection_functions.contains, + "convertFromUtc": date_functions.convert_from_utc, + "convertTimeZone": date_functions.convert_time_zone, + "convertToUtc": date_functions.convert_to_utc, + "createArray": conversion_functions.create_array, + "dataUri": conversion_functions.data_uri, + "dataUriToBinary": conversion_functions.data_uri_to_binary, + "dataUriToString": conversion_functions.data_uri_to_string, + "dayOfMonth": date_functions.day_of_month, + "dayOfWeek": date_functions.day_of_week, + "dayOfYear": date_functions.day_of_year, + "decodeBase64": conversion_functions.decode_base64, + "decodeDataUri": conversion_functions.decode_data_uri, + "decodeUriComponent": conversion_functions.decode_uri_component, + "div": math_functions.div, + "encodeUriComponent": conversion_functions.encode_uri_component, + "empty": collection_functions.empty, + "endsWith": string_functions.ends_with, + "equals": logical_functions.equals, + "first": collection_functions.first, + "float": conversion_functions.float_, + "formatDataTime": date_functions.format_date_time, + "getFutureTime": date_functions.get_future_time, + "getPastTime": date_functions.get_past_time, + "greater": logical_functions.greater, + "greaterOrEquals": logical_functions.greater_or_equals, + "guid": string_functions.guid, + "if": logical_functions.if_, + "indexOf": string_functions.index_of, + "int": conversion_functions.int_, + "json": conversion_functions.json, + "intersection": collection_functions.intersection, + "join": collection_functions.join, + "last": collection_functions.last, + "lastIndexOf": string_functions.last_index_of, + "length": collection_functions.length, + "less": logical_functions.less, + "lessOrEquals": logical_functions.less_or_equals, + "max": math_functions.max_, + "min": math_functions.min_, + "mod": math_functions.mod, + "mul": math_functions.mul, + "not": logical_functions.not_, + "or": logical_functions.or_, + "rand": math_functions.rand, + "range": math_functions.range_, + "replace": string_functions.replace, + "skip": collection_functions.skip, + "split": string_functions.split, + "startOfDay": date_functions.start_of_day, + "startOfHour": date_functions.start_of_hour, + "startOfMonth": date_functions.start_of_month, + "startsWith": string_functions.starts_with, + "string": conversion_functions.string, + "sub": math_functions.sub, + "substring": string_functions.substring, + "subtractFromTime": date_functions.subtract_from_time, + "take": collection_functions.take, + "ticks": date_functions.ticks, + "toLower": string_functions.to_lower, + "toUpper": string_functions.to_upper, + "trim": string_functions.trim, + "union": collection_functions.union, + "uriComponent": conversion_functions.uri_component, + "uriComponentToBinary": conversion_functions.uri_component_to_binary, + "uriComponentToString": conversion_functions.uri_component_to_string, + "utcNow": date_functions.utcnow, + "utcnow": date_functions.utcnow, + "xml": conversion_functions.xml, + "xpath": conversion_functions.xpath, + } + + @staticmethod + def register(function_name: str, function: Callable) -> None: + FunctionsRepository.functions[function_name] = function diff --git a/src/data_factory_testing_framework/functions/functions_string_implementation.py b/src/data_factory_testing_framework/functions/functions_string_implementation.py new file mode 100644 index 00000000..63cd26ff --- /dev/null +++ b/src/data_factory_testing_framework/functions/functions_string_implementation.py @@ -0,0 +1,130 @@ +"""String functions implementation based on Expression Language. + +See https://learn.microsoft.com/en-us/azure/data-factory/control-flow-expression-language-functions +""" + + +import uuid +from typing import Literal, Optional + + +def concat(*args: list[str]) -> str: + """Combine two or more strings, and return the combined string.""" + return "".join(args) + + +def ends_with(text: str, search_text: str) -> bool: + """Check whether a string ends with a specific substring. + + Return true when the substring is found, or return false when not found. This function is not case-sensitive. + """ + return text.lower().endswith(search_text.lower()) + + +def guid(format_: Optional[Literal["N", "D", "B", "P", "X"]] = None) -> str: # noqa: A002 + """Generate a globally unique identifier (GUID) as a string, for example, "c2ecc88d-88c8-4096-912c-d6f2e2b138ce".""" + if format_ is None or format_ == "": + format_ = "D" + + uuid_value = uuid.uuid4() + + if format_ == "N": + return str(uuid_value).replace("-", "") + elif format_ == "D": + return str(uuid_value) + elif format_ == "B": + return f"{{{str(uuid_value)}}}" + elif format_ == "P": + return f"({str(uuid_value)})" + elif format_ == "X": + node_bytes = uuid_value.node.to_bytes(6, "big") + return ( + "{" + f"0x{uuid_value.time_low:08x}," + f"0x{uuid_value.time_mid:04x}," + f"0x{uuid_value.time_hi_version:04x}," + "{" + f"0x{uuid_value.clock_seq_hi_variant:02x}," + f"0x{uuid_value.clock_seq_low:02x}," + f"0x{node_bytes[0]:02x}," + f"0x{node_bytes[1]:02x}," + f"0x{node_bytes[2]:02x}," + f"0x{node_bytes[3]:02x}," + f"0x{node_bytes[4]:02x}," + f"0x{node_bytes[5]:02x}" + "}}" + ) + else: + raise ValueError(f"Invalid format: {format_}") + + +def index_of(text: str, search_text: str) -> int: + """Return the starting position or index value for a substring. + + This function is not case-sensitive, and indexes start with the number 0. + """ + try: + return text.lower().index(search_text.lower()) + except ValueError: + return -1 + + +def last_index_of(text: str, search_text: str) -> int: + """Return the starting position or index value for the last occurrence of a substring. + + This function is not case-sensitive, and indexes start with the number 0. + """ + try: + return text.lower().rindex(search_text.lower()) + except ValueError: + return -1 + + +def replace(text: str, old_text: str, new_text: str) -> str: + """Replace a substring with the specified string, and return the result string. + + This function is case-sensitive. + """ + return text.replace(old_text, new_text) + + +def split(text: str, delimiter: str) -> list[str]: + """Return an array that contains substrings, separated by commas, based on the specified delimiter character in the original string.""" + return text.split(delimiter) + + +def starts_with(text: str, search_text: str) -> bool: + """Check whether a string starts with a specific substring. + + Return true when the substring is found, or return false when not found. This function is not case-sensitive. + """ + return text.lower().startswith(search_text.lower()) + + +def substring(text: str, start_index: int, length: int) -> str: + """Return characters from a string, starting from the specified position, or index. + + Index values start with the number 0. + """ + return text[start_index : start_index + length] + + +def to_lower(text: str) -> str: + """Return a string in lowercase format. + + If a character in the string doesn't have a lowercase version, that character stays unchanged in the returned string. + """ + return text.lower() + + +def to_upper(text: str) -> str: + """Return a string in uppercase format. + + If a character in the string doesn't have an uppercase version, that character stays unchanged in the returned string. + """ + return text.upper() + + +def trim(text: str) -> str: + """Removes all leading and trailing white-space characters from the specified string.""" + return text.strip() diff --git a/src/data_factory_testing_framework/models/__init__.py b/src/data_factory_testing_framework/models/__init__.py new file mode 100644 index 00000000..e69de29b diff --git a/src/data_factory_testing_framework/models/activities/__init__.py b/src/data_factory_testing_framework/models/activities/__init__.py new file mode 100644 index 00000000..e69de29b diff --git a/src/data_factory_testing_framework/models/activities/activity.py b/src/data_factory_testing_framework/models/activities/activity.py new file mode 100644 index 00000000..4d72e0d3 --- /dev/null +++ b/src/data_factory_testing_framework/models/activities/activity.py @@ -0,0 +1,119 @@ +from typing import Any, List + +from data_factory_testing_framework.models.activities.activity_dependency import ( + ActivityDependency, +) +from data_factory_testing_framework.models.data_factory_element import DataFactoryElement +from data_factory_testing_framework.state import PipelineRunState +from data_factory_testing_framework.state.dependency_condition import DependencyCondition + + +class Activity: + def __init__(self, name: str, type: str, policy: dict = None, **kwargs: Any) -> None: # noqa: ANN401, A002 + """Activity with dynamic dicts. + + Args: + name: Name of the activity. + type: Type of the activity. + policy: Policy of the activity. + **kwargs: Activity properties coming directly from the json representation of the activity. + """ + if policy is None: + policy = {} + + self.name = name + self.type = type + self.policy = policy + self.type_properties = kwargs["typeProperties"] if "typeProperties" in kwargs else {} + + self.depends_on: List[ActivityDependency] = [] + if "dependsOn" in kwargs: + for dependency in kwargs["dependsOn"]: + self.depends_on.append(ActivityDependency(**dependency)) + + self.all_properties = kwargs + + self.status: DependencyCondition = None + self.output = {} + + def evaluate(self, state: PipelineRunState) -> "Activity": + self._evaluate_expressions(self, state, types_to_ignore=[Activity]) + self.status = DependencyCondition.Succeeded + self.output = {} + return self + + def are_dependency_condition_met(self, state: PipelineRunState) -> bool: + if not self.depends_on: + return True + + for dependency in self.depends_on: + dependency_activity = state.try_get_scoped_activity_result_by_name(dependency.activity) + + if dependency_activity is None: + return False + + for dependency_condition in dependency.dependency_conditions: + if dependency_activity["status"] != dependency_condition: + return False + + return True + + def _evaluate_expressions( + self, + obj: Any, # noqa: ANN401 + state: PipelineRunState, + visited: List[Any] = None, # noqa: ANN401 + types_to_ignore: List[Any] = None, # noqa: ANN401 + ) -> None: + if visited is None: + visited = [] + + if obj in visited: + return + + visited.append(obj) + + if data_factory_element := isinstance(obj, DataFactoryElement) and obj: + data_factory_element.evaluate(state) + return + + # Attributes + attribute_names = [ + attribute + for attribute in dir(obj) + if not attribute.startswith("_") and not callable(getattr(obj, attribute)) + ] + for attribute_name in attribute_names: + if "activities" in attribute_name: + continue + + attribute = getattr(obj, attribute_name) + if attribute is None: + continue + + self._evaluate_expressions(attribute, state, visited, types_to_ignore) + + # Dictionary + if isinstance(obj, dict): + for key in obj.keys(): + if "activities" in key: + continue + + self._evaluate_expressions(obj[key], state, visited, types_to_ignore) + + # List + if isinstance(obj, list): + for item in obj: + ignore_item = False + for type_to_ignore in types_to_ignore: + if isinstance(item, type_to_ignore): + ignore_item = True + + if ignore_item: + continue + + self._evaluate_expressions(item, state, visited, types_to_ignore) + + def set_result(self, result: DependencyCondition, output: Any = None) -> None: # noqa: ANN401 + self.status = result + self.output = output diff --git a/src/data_factory_testing_framework/models/activities/activity_dependency.py b/src/data_factory_testing_framework/models/activities/activity_dependency.py new file mode 100644 index 00000000..1a22b1d0 --- /dev/null +++ b/src/data_factory_testing_framework/models/activities/activity_dependency.py @@ -0,0 +1,18 @@ +from typing import List, Union + +from data_factory_testing_framework.state.dependency_condition import DependencyCondition + + +class ActivityDependency: + def __init__(self, activity: str, dependencyConditions: List[Union[str, DependencyCondition]] = None) -> None: # noqa: ANN401, N803 + """ActivityDependency. + + Args: + activity: Name of the activity. + dependencyConditions: List of dependency conditions. + """ + if dependencyConditions is None: + dependencyConditions = [] # noqa: N806 + + self.activity: str = activity + self.dependency_conditions: List[DependencyCondition] = dependencyConditions diff --git a/src/data_factory_testing_framework/models/activities/append_variable_activity.py b/src/data_factory_testing_framework/models/activities/append_variable_activity.py new file mode 100644 index 00000000..8b92e2a4 --- /dev/null +++ b/src/data_factory_testing_framework/models/activities/append_variable_activity.py @@ -0,0 +1,32 @@ +from typing import Any + +from data_factory_testing_framework.models.activities.control_activity import ControlActivity +from data_factory_testing_framework.models.data_factory_element import DataFactoryElement +from data_factory_testing_framework.state import PipelineRunState + + +class AppendVariableActivity(ControlActivity): + def __init__(self, **kwargs: Any) -> None: # noqa: ANN401 + """This is the class that represents the Append Variable activity in the pipeline. + + Args: + **kwargs: AppendVariableActivity properties coming directly from the json representation of the activity. + """ + kwargs["type"] = "AppendVariable" + + super(ControlActivity, self).__init__(**kwargs) + + self.variable_name: str = self.type_properties["variableName"] + self.value: DataFactoryElement = self.type_properties["value"] + + def evaluate(self, state: PipelineRunState) -> "AppendVariableActivity": + super(ControlActivity, self).evaluate(state) + + if isinstance(self.value, DataFactoryElement): + evaluated_value = self.value.evaluate(state) + else: + evaluated_value = self.value + + state.append_variable(self.type_properties["variableName"], evaluated_value) + + return self diff --git a/src/data_factory_testing_framework/models/activities/control_activity.py b/src/data_factory_testing_framework/models/activities/control_activity.py new file mode 100644 index 00000000..feb54ee8 --- /dev/null +++ b/src/data_factory_testing_framework/models/activities/control_activity.py @@ -0,0 +1,21 @@ +from typing import Any, Callable, Iterator, List + +from data_factory_testing_framework.models.activities.activity import Activity +from data_factory_testing_framework.state import PipelineRunState + + +class ControlActivity(Activity): + def __init__(self, **kwargs: Any) -> None: # noqa: ANN401 + """This is the base class for all control activities in the pipeline. + + Args: + **kwargs: ControlActivity properties coming directly from the json representation of the activity. + """ + super(Activity, self).__init__(**kwargs) + + def evaluate_control_activities( + self, + state: PipelineRunState, + evaluate_activities: Callable[[List[Activity], PipelineRunState], Iterator[Activity]], + ) -> Iterator[Activity]: + yield from list() diff --git a/src/data_factory_testing_framework/models/activities/execute_pipeline_activity.py b/src/data_factory_testing_framework/models/activities/execute_pipeline_activity.py new file mode 100644 index 00000000..d6ae01f0 --- /dev/null +++ b/src/data_factory_testing_framework/models/activities/execute_pipeline_activity.py @@ -0,0 +1,52 @@ +from typing import Any, Callable, Iterator, List + +from data_factory_testing_framework.models.activities.activity import Activity +from data_factory_testing_framework.models.activities.control_activity import ControlActivity +from data_factory_testing_framework.models.data_factory_element import DataFactoryElement +from data_factory_testing_framework.models.pipeline import Pipeline +from data_factory_testing_framework.state import PipelineRunState, RunParameterType +from data_factory_testing_framework.state.run_parameter import RunParameter + + +class ExecutePipelineActivity(ControlActivity): + def __init__(self, **kwargs: Any) -> None: # noqa: ANN401 + """This is the class that represents the Execute Pipeline activity in the pipeline. + + Args: + **kwargs: ExecutePipelineActivity properties coming directly from the json representation of the activity. + """ + kwargs["type"] = "ExecutePipeline" + + super(ControlActivity, self).__init__(**kwargs) + + self.parameters: dict = self.type_properties["parameters"] + + def get_child_run_parameters(self, state: PipelineRunState) -> List[RunParameter]: + child_parameters = [] + for parameter in state.parameters: + if parameter.type == RunParameterType.Global or parameter.type == RunParameterType.System: + child_parameters.append(RunParameter(parameter.type, parameter.name, parameter.value)) + + for parameter_name, parameter_value in self.parameters.items(): + parameter_value = ( + parameter_value.value if isinstance(parameter_value, DataFactoryElement) else parameter_value + ) + child_parameters.append(RunParameter(RunParameterType.Pipeline, parameter_name, parameter_value)) + + return child_parameters + + def evaluate_pipeline( + self, + pipeline: Pipeline, + parameters: List[RunParameter], + evaluate_activities: Callable[[List[Activity], PipelineRunState], Iterator[Activity]], + ) -> Iterator[Activity]: + parameters = pipeline.validate_and_append_default_parameters(parameters) + scoped_state = PipelineRunState(parameters, pipeline.get_run_variables()) + for activity in evaluate_activities(pipeline.activities, scoped_state): + yield activity + + # Set the pipelineReturnValues as evaluated by SetVariable activities to the ExecutePipelineActivity output + self.output["pipelineReturnValue"] = {} + for key in scoped_state.return_values: + self.output["pipelineReturnValue"][key] = scoped_state.return_values[key] diff --git a/src/data_factory_testing_framework/models/activities/fail_activity.py b/src/data_factory_testing_framework/models/activities/fail_activity.py new file mode 100644 index 00000000..bba611d3 --- /dev/null +++ b/src/data_factory_testing_framework/models/activities/fail_activity.py @@ -0,0 +1,24 @@ +from typing import Any + +from data_factory_testing_framework.models.activities.control_activity import ControlActivity +from data_factory_testing_framework.state import PipelineRunState +from data_factory_testing_framework.state.dependency_condition import DependencyCondition + + +class FailActivity(ControlActivity): + def __init__(self, **kwargs: Any) -> None: # noqa: ANN401 + """This is the class that represents the Fail activity in the pipeline. + + Args: + **kwargs: FailActivity properties coming directly from the json representation of the activity. + """ + kwargs["type"] = "Fail" + + super(ControlActivity, self).__init__(**kwargs) + + def evaluate(self, state: PipelineRunState) -> "FailActivity": + super(ControlActivity, self).evaluate(state) + + self.set_result(DependencyCondition.FAILED) + + return self diff --git a/src/data_factory_testing_framework/models/activities/filter_activity.py b/src/data_factory_testing_framework/models/activities/filter_activity.py new file mode 100644 index 00000000..c2ca3b4e --- /dev/null +++ b/src/data_factory_testing_framework/models/activities/filter_activity.py @@ -0,0 +1,36 @@ +from typing import Any + +from data_factory_testing_framework.models.activities.control_activity import ControlActivity +from data_factory_testing_framework.models.data_factory_element import DataFactoryElement +from data_factory_testing_framework.state import PipelineRunState +from data_factory_testing_framework.state.dependency_condition import DependencyCondition + + +class FilterActivity(ControlActivity): + def __init__( + self, + **kwargs: Any, # noqa: ANN401 + ) -> None: + """This is the class that represents the If Condition activity in the pipeline. + + Args: + **kwargs: FilterActivity properties coming directly from the json representation of the activity. + """ + kwargs["type"] = "Filter" + + super(ControlActivity, self).__init__(**kwargs) + + self.items: DataFactoryElement = self.type_properties["items"] + self.condition: DataFactoryElement = self.type_properties["condition"] + + def evaluate(self, state: PipelineRunState) -> "FilterActivity": + value = [] + for item in self.items.evaluate(state): + state.iteration_item = item + if self.condition.evaluate(state): + value.append(item) + + self.set_result(DependencyCondition.SUCCEEDED, {"value": value}) + state.iteration_item = None + + return self diff --git a/src/data_factory_testing_framework/models/activities/for_each_activity.py b/src/data_factory_testing_framework/models/activities/for_each_activity.py new file mode 100644 index 00000000..8e7575bf --- /dev/null +++ b/src/data_factory_testing_framework/models/activities/for_each_activity.py @@ -0,0 +1,45 @@ +from typing import Any, Callable, Iterator, List + +from data_factory_testing_framework.models.activities.activity import Activity +from data_factory_testing_framework.models.activities.control_activity import ControlActivity +from data_factory_testing_framework.models.data_factory_element import DataFactoryElement +from data_factory_testing_framework.state import PipelineRunState + + +class ForEachActivity(ControlActivity): + def __init__( + self, + activities: List[Activity], + **kwargs: Any, # noqa: ANN401 + ) -> None: + """This is the class that represents the For Each activity in the pipeline. + + Args: + activities: The deserialized activities that will be executed for each item in the items array. + **kwargs: ForEachActivity properties coming directly from the json representation of the activity. + """ + kwargs["type"] = "ForEach" + + super(ControlActivity, self).__init__(**kwargs) + + self.activities = activities + self.items: DataFactoryElement = self.type_properties["items"] + + def evaluate(self, state: PipelineRunState) -> "ForEachActivity": + self.items.evaluate(state) + + super(ControlActivity, self).evaluate(state) + + return self + + def evaluate_control_activities( + self, + state: PipelineRunState, + evaluate_activities: Callable[[List[Activity], PipelineRunState], Iterator[Activity]], + ) -> Iterator[Activity]: + for item in self.items.value: + scoped_state = state.create_iteration_scope(item) + for activity in evaluate_activities(self.activities, scoped_state): + yield activity + + state.add_scoped_activity_results_from_scoped_state(scoped_state) diff --git a/src/data_factory_testing_framework/models/activities/if_condition_activity.py b/src/data_factory_testing_framework/models/activities/if_condition_activity.py new file mode 100644 index 00000000..00ae809e --- /dev/null +++ b/src/data_factory_testing_framework/models/activities/if_condition_activity.py @@ -0,0 +1,48 @@ +from typing import Any, Callable, Iterator, List + +from data_factory_testing_framework.models.activities.activity import Activity +from data_factory_testing_framework.models.activities.control_activity import ControlActivity +from data_factory_testing_framework.models.data_factory_element import DataFactoryElement +from data_factory_testing_framework.state import PipelineRunState + + +class IfConditionActivity(ControlActivity): + def __init__( + self, + if_true_activities: List[Activity], + if_false_activities: List[Activity], + **kwargs: Any, # noqa: ANN401 + ) -> None: + """This is the class that represents the If Condition activity in the pipeline. + + Args: + if_true_activities: The deserialized activities that will be executed if the condition is true. + if_false_activities: The deserialized activities that will be executed if the condition is false. + **kwargs: IfConditionActivity properties coming directly from the json representation of the activity. + """ + kwargs["type"] = "IfCondition" + + super(ControlActivity, self).__init__(**kwargs) + + self.if_true_activities = if_true_activities + self.if_false_activities = if_false_activities + self.expression: DataFactoryElement = self.type_properties["expression"] + + def evaluate(self, state: PipelineRunState) -> "IfConditionActivity": + self.expression.evaluate(state) + + super(ControlActivity, self).evaluate(state) + + return self + + def evaluate_control_activities( + self, + state: PipelineRunState, + evaluate_activities: Callable[[List[Activity], PipelineRunState], Iterator[Activity]], + ) -> Iterator[Activity]: + scoped_state = state.create_iteration_scope(None) + activities = self.if_true_activities if self.expression.value else self.if_false_activities + for activity in evaluate_activities(activities, scoped_state): + yield activity + + state.add_scoped_activity_results_from_scoped_state(scoped_state) diff --git a/src/data_factory_testing_framework/models/activities/set_variable_activity.py b/src/data_factory_testing_framework/models/activities/set_variable_activity.py new file mode 100644 index 00000000..d5d5f0e4 --- /dev/null +++ b/src/data_factory_testing_framework/models/activities/set_variable_activity.py @@ -0,0 +1,44 @@ +from typing import Any + +from data_factory_testing_framework.models.activities.control_activity import ControlActivity +from data_factory_testing_framework.models.data_factory_element import DataFactoryElement +from data_factory_testing_framework.state import PipelineRunState + + +class SetVariableActivity(ControlActivity): + def __init__(self, **kwargs: Any) -> None: # noqa: ANN401 + """This is the class that represents the Set Variable activity in the pipeline. + + Args: + **kwargs: SetVariableActivity properties coming directly from the json representation of the activity. + """ + kwargs["type"] = "SetVariable" + + super(ControlActivity, self).__init__(**kwargs) + + self.variable_name: str = self.type_properties["variableName"] + self.value: DataFactoryElement = self.type_properties["value"] + + def evaluate(self, state: PipelineRunState) -> "SetVariableActivity": + super(ControlActivity, self).evaluate(state) + + if self.type_properties["variableName"] == "pipelineReturnValue": + for return_value in self.type_properties["value"]: + value = return_value["value"] + if isinstance(value, DataFactoryElement): + evaluated_value = value.evaluate(state) + else: + evaluated_value = value + + state.set_return_value(return_value["key"], evaluated_value) + + return self + + if isinstance(self.value, DataFactoryElement): + evaluated_value = self.value.evaluate(state) + else: + evaluated_value = self.value + + state.set_variable(self.type_properties["variableName"], evaluated_value) + + return self diff --git a/src/data_factory_testing_framework/models/activities/switch_activity.py b/src/data_factory_testing_framework/models/activities/switch_activity.py new file mode 100644 index 00000000..45f4ddc4 --- /dev/null +++ b/src/data_factory_testing_framework/models/activities/switch_activity.py @@ -0,0 +1,58 @@ +from typing import Any, Callable, Dict, Generator, Iterator, List + +from data_factory_testing_framework.models.activities.activity import Activity +from data_factory_testing_framework.models.activities.control_activity import ControlActivity +from data_factory_testing_framework.models.data_factory_element import DataFactoryElement +from data_factory_testing_framework.state import PipelineRunState + + +class SwitchActivity(ControlActivity): + def __init__( + self, + default_activities: List[Activity], + cases_activities: Dict[str, List[Activity]], + **kwargs: Any, # noqa: ANN401 + ) -> None: + """This is the class that represents the Switch activity in the pipeline. + + Args: + default_activities: The deserialized activities that will be executed if none of the cases matches. + cases_activities: The deserialized activities that will be executed if the case matches. + **kwargs: SwitchActivity properties coming directly from the json representation of the activity. + """ + kwargs["type"] = "Switch" + + super(ControlActivity, self).__init__(**kwargs) + + self.default_activities = default_activities + self.cases_activities = cases_activities + self.on: DataFactoryElement = self.type_properties["on"] + + def evaluate(self, state: PipelineRunState) -> "SwitchActivity": + self.on.evaluate(state) + + super(ControlActivity, self).evaluate(state) + + return self + + def evaluate_control_activities( + self, + state: PipelineRunState, + evaluate_activities: Callable[[List[Activity], PipelineRunState], Iterator[Activity]], + ) -> Iterator[Activity]: + for case, activities in self.cases_activities.items(): + if case == self.on.value: + return self._run_activities_in_scope(state, activities, evaluate_activities) + + return self._run_activities_in_scope(state, self.default_activities, evaluate_activities) + + @staticmethod + def _run_activities_in_scope( + state: PipelineRunState, + activities: List[Activity], + evaluate_activities: Callable[[List[Activity], PipelineRunState], Iterator[Activity]], + ) -> Generator[Activity, None, None]: + scoped_state = state.create_iteration_scope(None) + for activity in evaluate_activities(activities, scoped_state): + yield activity + state.add_scoped_activity_results_from_scoped_state(scoped_state) diff --git a/src/data_factory_testing_framework/models/activities/until_activity.py b/src/data_factory_testing_framework/models/activities/until_activity.py new file mode 100644 index 00000000..1849ddb1 --- /dev/null +++ b/src/data_factory_testing_framework/models/activities/until_activity.py @@ -0,0 +1,48 @@ +from typing import Any, Callable, Iterator, List + +from data_factory_testing_framework.models.activities.activity import Activity +from data_factory_testing_framework.models.activities.control_activity import ControlActivity +from data_factory_testing_framework.models.data_factory_element import DataFactoryElement +from data_factory_testing_framework.state import PipelineRunState +from data_factory_testing_framework.state.dependency_condition import DependencyCondition + + +class UntilActivity(ControlActivity): + def __init__( + self, + activities: List[Activity], + **kwargs: Any, # noqa: ANN401 + ) -> None: + """This is the class that represents the Until activity in the pipeline. + + Args: + activities: The deserialized activities that will be executed until the expression evaluates to true. + **kwargs: UntilActivity properties coming directly from the json representation of the activity. + """ + kwargs["type"] = "Until" + + super(ControlActivity, self).__init__(**kwargs) + + self.expression: DataFactoryElement = self.type_properties["expression"] + self.activities = activities + + def evaluate(self, state: PipelineRunState) -> "UntilActivity": + # Explicitly not evaluate here, but in the evaluate_control_activities method after the first iteration + return self + + def evaluate_control_activities( + self, + state: PipelineRunState, + evaluate_activities: Callable[[List[Activity], PipelineRunState], Iterator[Activity]], + ) -> Iterator[Activity]: + while True: + scoped_state = state.create_iteration_scope(None) + for activity in evaluate_activities(self.activities, scoped_state): + yield activity + + state.add_scoped_activity_results_from_scoped_state(scoped_state) + + if self.expression.evaluate(state): + state.add_activity_result(self.name, DependencyCondition.Succeeded) + self.set_result(DependencyCondition.Succeeded) + break diff --git a/src/data_factory_testing_framework/models/data_factory_element.py b/src/data_factory_testing_framework/models/data_factory_element.py new file mode 100644 index 00000000..f4170144 --- /dev/null +++ b/src/data_factory_testing_framework/models/data_factory_element.py @@ -0,0 +1,26 @@ +from typing import Generic, TypeVar, Union + +from data_factory_testing_framework.functions.expression_evaluator import ExpressionEvaluator +from data_factory_testing_framework.state import RunState + +T = TypeVar("T") + + +class DataFactoryElement(Generic[T]): + expression: str + value: T + + def __init__(self, expression: str) -> None: + """DataFactoryElement. + + Args: + expression: Expression to evaluate. (e.g. @concat(@pipeline().parameters.pipelineName, '-pipeline')) + """ + self.expression = expression + self.value: Union[str, int, bool, float] = None + + def evaluate(self, state: RunState) -> Union[str, int, bool, float]: + """Evaluate the expression.""" + evaluator = ExpressionEvaluator() + self.value = evaluator.evaluate(self.expression, state) + return self.value diff --git a/src/data_factory_testing_framework/models/pipeline.py b/src/data_factory_testing_framework/models/pipeline.py new file mode 100644 index 00000000..2c72e71f --- /dev/null +++ b/src/data_factory_testing_framework/models/pipeline.py @@ -0,0 +1,83 @@ +from typing import Any, List + +from data_factory_testing_framework.exceptions.activity_not_found_error import ActivityNotFoundError +from data_factory_testing_framework.models.activities.activity import Activity +from data_factory_testing_framework.state import PipelineRunVariable, RunParameter, RunParameterType + + +class Pipeline: + def __init__( + self, + name: str, + activities: List[Activity], + **kwargs: Any, # noqa: ANN401 + ) -> None: + """This is the class that represents a pipeline. + + Args: + name: Name of the pipeline. + activities: List of activities in the pipeline. + **kwargs: Pipeline properties coming directly from the json representation of the pipeline. + """ + self.name = name + self.parameters: dict = kwargs["parameters"] if "parameters" in kwargs else {} + self.variables: dict = kwargs["variables"] if "variables" in kwargs else {} + self.activities = activities + self.annotations = kwargs["annotations"] if "annotations" in kwargs else [] + + def get_activity_by_name(self, name: str) -> Activity: + """Get an activity by name. Throws an exception if the activity is not found. + + Args: + name: Name of the activity. + """ + for activity in self.activities: + if activity.name == name: + return activity + + raise ActivityNotFoundError(f"Activity with name {name} not found") + + def validate_and_append_default_parameters(self, parameters: List[RunParameter]) -> List[RunParameter]: + """Validate that all parameters are provided and that no duplicate parameters are provided. + + Args: + parameters: List of parameters. + """ + # Check if all parameters are provided + run_parameters = parameters + for pipeline_parameter_name, pipeline_parameter in self.parameters.items(): + found = False + for parameter in parameters: + if pipeline_parameter_name == parameter.name and parameter.type == RunParameterType.Pipeline: + found = True + break + + if not found: + if "defaultValue" in pipeline_parameter: + run_parameters.append( + RunParameter( + RunParameterType.Pipeline, pipeline_parameter_name, pipeline_parameter["defaultValue"] + ) + ) + continue + + raise ValueError( + f"Parameter with name '{pipeline_parameter_name}' and type 'RunParameterType.Pipeline' not found in pipeline '{self.name}'", + ) + + # Check if no duplicate parameters are provided + for parameter in parameters: + if sum(1 for p in parameters if p.name == parameter.name and p.type == parameter.type) > 1: + raise ValueError( + f"Duplicate parameter with name '{parameter.name}' and type '{parameter.type}' found in pipeline '{self.name}'", + ) + + return parameters + + def get_run_variables(self) -> List[PipelineRunVariable]: + """Get the run variables for the pipeline. This can be used to generate the instance variables for a pipeline run.""" + run_variables = [] + for variable_name, variable_value in self.variables.items(): + run_variables.append(PipelineRunVariable(variable_name, variable_value.get("default_value", None))) + + return run_variables diff --git a/src/data_factory_testing_framework/repositories/__init__.py b/src/data_factory_testing_framework/repositories/__init__.py new file mode 100644 index 00000000..e69de29b diff --git a/src/data_factory_testing_framework/repositories/base_repository_factory.py b/src/data_factory_testing_framework/repositories/base_repository_factory.py new file mode 100644 index 00000000..84a43d25 --- /dev/null +++ b/src/data_factory_testing_framework/repositories/base_repository_factory.py @@ -0,0 +1,14 @@ +from abc import ABC, abstractmethod + +from data_factory_testing_framework.models.pipeline import Pipeline +from data_factory_testing_framework.repositories.data_factory_repository import DataFactoryRepository + + +class BaseRepositoryFactory(ABC): + def parse_from_folder(self, folder_path: str) -> DataFactoryRepository: + pipelines = self._get_data_factory_pipelines_by_folder_path(folder_path) + return DataFactoryRepository(pipelines) + + @abstractmethod + def _get_data_factory_pipelines_by_folder_path(self, folder_path: str) -> list[Pipeline]: + pass diff --git a/src/data_factory_testing_framework/repositories/data_factory_repository.py b/src/data_factory_testing_framework/repositories/data_factory_repository.py new file mode 100644 index 00000000..6b8c7e7b --- /dev/null +++ b/src/data_factory_testing_framework/repositories/data_factory_repository.py @@ -0,0 +1,26 @@ +from typing import List + +from data_factory_testing_framework.exceptions.pipeline_not_found_error import PipelineNotFoundError +from data_factory_testing_framework.models.pipeline import Pipeline + + +class DataFactoryRepository: + def __init__(self, pipelines: List[Pipeline]) -> None: + """Initializes the repository with pipelines, linkedServices, datasets and triggers. + + Args: + pipelines: List of pipelines. + """ + self.pipelines = pipelines + + def get_pipeline_by_name(self, name: str) -> Pipeline: + """Get a pipeline by name. Throws an exception if the pipeline is not found. + + Args: + name: Name of the pipeline. + """ + for pipeline in self.pipelines: + if pipeline.name == name: + return pipeline + + raise PipelineNotFoundError(f"Pipeline with name {name} not found") diff --git a/src/data_factory_testing_framework/repositories/data_factory_repository_factory.py b/src/data_factory_testing_framework/repositories/data_factory_repository_factory.py new file mode 100644 index 00000000..e56daf64 --- /dev/null +++ b/src/data_factory_testing_framework/repositories/data_factory_repository_factory.py @@ -0,0 +1,21 @@ +import os + +from data_factory_testing_framework.deserializers._deserializer_data_factory import ( + parse_data_factory_pipeline_from_pipeline_json, +) +from data_factory_testing_framework.models.pipeline import Pipeline +from data_factory_testing_framework.repositories.base_repository_factory import BaseRepositoryFactory + + +class DataFactoryRepositoryFactory(BaseRepositoryFactory): + def _get_data_factory_pipelines_by_folder_path(self, folder_path: str) -> list[Pipeline]: + pipeline_path = os.path.join(folder_path, "pipeline") + pipelines = [] + files = os.listdir(pipeline_path) + for file in files: + file_path = os.path.join(pipeline_path, file) + if file.endswith(".json"): + with open(file_path, "r") as f: + pipelines.append(parse_data_factory_pipeline_from_pipeline_json(f.read())) + + return pipelines diff --git a/src/data_factory_testing_framework/repositories/fabric_repository_factory.py b/src/data_factory_testing_framework/repositories/fabric_repository_factory.py new file mode 100644 index 00000000..f51ae0d3 --- /dev/null +++ b/src/data_factory_testing_framework/repositories/fabric_repository_factory.py @@ -0,0 +1,39 @@ +import os +from typing import List + +from data_factory_testing_framework.deserializers._deserializer_fabric import ( + parse_fabric_pipeline_from_pipeline_json_files, +) +from data_factory_testing_framework.models.pipeline import Pipeline +from data_factory_testing_framework.repositories.base_repository_factory import BaseRepositoryFactory + + +class FabricRepositoryFactory(BaseRepositoryFactory): + def _get_data_factory_pipelines_by_folder_path(self, folder_path: str) -> list[Pipeline]: + pipeline_folders = FabricRepositoryFactory._find_folders_containing_pipeline(folder_path) + pipelines = [] + for pipeline_folder in pipeline_folders: + pipeline_file = os.path.join(pipeline_folder, "pipeline-content.json") + pipeline_metadata_file = os.path.join(pipeline_folder, "item.metadata.json") + with open(pipeline_file, "r") as pipeline_file, open(pipeline_metadata_file, "r") as pipeline_metadata_file: + pipelines.append( + parse_fabric_pipeline_from_pipeline_json_files(pipeline_metadata_file.read(), pipeline_file.read()) + ) + + return pipelines + + @staticmethod + def _find_folders_containing_pipeline(search_path: str) -> List[str]: + pipeline_folders = [] + + # Walk through the directory tree and fine pipeline folders + for root, _, files in os.walk(search_path): + if "pipeline-content.json" in files: + pipeline_folders.append(root) + + # Check if each folder contains metadata file + for pipeline_folder in pipeline_folders: + if "item.metadata.json" not in os.listdir(pipeline_folder): + raise FileNotFoundError(f"Pipeline folder {pipeline_folder} does not contain metadata file") + + return pipeline_folders diff --git a/src/data_factory_testing_framework/state/__init__.py b/src/data_factory_testing_framework/state/__init__.py new file mode 100644 index 00000000..882d09af --- /dev/null +++ b/src/data_factory_testing_framework/state/__init__.py @@ -0,0 +1,13 @@ +from .pipeline_run_state import PipelineRunState +from .pipeline_run_variable import PipelineRunVariable +from .run_parameter import RunParameter +from .run_parameter_type import RunParameterType +from .run_state import RunState + +__all__ = [ + "PipelineRunState", + "RunParameter", + "RunParameterType", + "RunState", + "PipelineRunVariable", +] diff --git a/src/data_factory_testing_framework/state/dependency_condition.py b/src/data_factory_testing_framework/state/dependency_condition.py new file mode 100644 index 00000000..d4a5958b --- /dev/null +++ b/src/data_factory_testing_framework/state/dependency_condition.py @@ -0,0 +1,12 @@ +from enum import Enum + +from azure.core import CaseInsensitiveEnumMeta + + +class DependencyCondition(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """DependencyCondition.""" + + SUCCEEDED = "Succeeded" + FAILED = "Failed" + SKIPPED = "Skipped" + COMPLETED = "Completed" diff --git a/src/data_factory_testing_framework/state/pipeline_run_state.py b/src/data_factory_testing_framework/state/pipeline_run_state.py new file mode 100644 index 00000000..4ec8b4bc --- /dev/null +++ b/src/data_factory_testing_framework/state/pipeline_run_state.py @@ -0,0 +1,138 @@ +from typing import Any, Dict, List, Optional, Union + +from data_factory_testing_framework.exceptions.variable_being_evaluated_does_not_exist_error import ( + VariableBeingEvaluatedDoesNotExistError, +) +from data_factory_testing_framework.exceptions.variable_does_not_exist_error import VariableDoesNotExistError +from data_factory_testing_framework.state.dependency_condition import DependencyCondition +from data_factory_testing_framework.state.pipeline_run_variable import PipelineRunVariable +from data_factory_testing_framework.state.run_parameter import RunParameter +from data_factory_testing_framework.state.run_state import RunState + + +class PipelineRunState(RunState): + def __init__( + self, + parameters: Optional[List[RunParameter]] = None, + variables: Optional[List[PipelineRunVariable]] = None, + pipeline_activity_results: Optional[Dict[str, Any]] = None, + iteration_item: str = None, + ) -> None: + """Represents the state of a pipeline run. Can be used to configure the state to validate certain pipeline conditions. + + Args: + parameters: The global and regular parameters to be used for evaluating expressions. + variables: The initial variables specification to use for the pipeline run. + pipeline_activity_results: The results of previous activities to use for validating dependencyConditions and evaluating expressions + (i.e. activity('activityName').output). + iteration_item: The current item() of a ForEach activity. + """ + if variables is None: + variables = [] + + if pipeline_activity_results is None: + pipeline_activity_results = {} + + super().__init__(parameters) + + self.variables = variables + self.pipeline_activity_results: Dict[str, Any] = pipeline_activity_results + self.scoped_pipeline_activity_results: Dict[str, Any] = {} + self.iteration_item = iteration_item + self.return_values: Dict[str, Any] = {} + + def add_activity_result(self, activity_name: str, status: DependencyCondition, output: Any = None) -> None: # noqa: ANN401 + """Registers the result of an activity to the pipeline run state. + + Args: + activity_name: Name of the activity. + status: Status of the activity. + output: Output of the activity. (e.g. { "count": 1 } for activity('activityName').output.count) + """ + self.pipeline_activity_results[activity_name] = { + "status": status, + "output": output, + } + self.scoped_pipeline_activity_results[activity_name] = { + "status": status, + "output": output, + } + + def create_iteration_scope(self, iteration_item: str = None) -> "PipelineRunState": + """Used to create a new scope for a ControlActivity like ForEach, If and Until activities. + + Args: + iteration_item: The current item() of a ForEach activity. + + Returns: + A new PipelineRunState with the scoped variables and activity results. + """ + return PipelineRunState( + self.parameters, + self.variables, + self.pipeline_activity_results, + iteration_item, + ) + + def add_scoped_activity_results_from_scoped_state(self, scoped_state: "PipelineRunState") -> None: + """Registers all the activity results of a childScope into the current state. + + Args: + scoped_state: The scoped childState. + """ + for result in scoped_state.pipeline_activity_results: + self.pipeline_activity_results[result] = scoped_state.pipeline_activity_results[result] + + def try_get_scoped_activity_result_by_name(self, name: str) -> Optional[Dict[str, Any]]: + """Tries to get the activity result from the scoped state. Might be None if the activity was not executed in the scope. + + Args: + name: Name of the activity. + """ + return self.pipeline_activity_results[name] if name in self.pipeline_activity_results else None + + def set_variable(self, variable_name: str, value: Union[str, int, bool, float]) -> None: + """Sets the value of a variable if it exists. Otherwise throws an exception. + + Args: + variable_name: Name of the variable. + value: New value of the variable. + """ + for variable in self.variables: + if variable.name == variable_name: + variable.value = value + return + + raise VariableBeingEvaluatedDoesNotExistError(variable_name) + + def append_variable(self, variable_name: str, value: Union[str, int, bool, float]) -> None: + """Appends a value to a variable if it exists and is an array. Otherwise, throws an exception. + + Args: + variable_name: Name of the variable. + value: Appended value of the variable. + """ + for variable in self.variables: + if variable.name == variable_name: + if not isinstance(variable.value, list): + raise ValueError(f"Variable {variable_name} is not an array.") + + variable.value.append(value) + return + + raise VariableBeingEvaluatedDoesNotExistError(variable_name) + + def get_variable_by_name(self, variable_name: str) -> PipelineRunVariable: + """Gets a variable by name. Throws an exception if the variable is not found. + + Args: + variable_name: Name of the variable. + """ + for variable in self.variables: + if variable.name == variable_name: + return variable + + raise VariableDoesNotExistError(variable_name) + + def set_return_value(self, param: str, evaluated_value: Any) -> None: # noqa: ANN401 + self.return_values[param] = evaluated_value diff --git a/src/data_factory_testing_framework/state/pipeline_run_variable.py b/src/data_factory_testing_framework/state/pipeline_run_variable.py new file mode 100644 index 00000000..4c76ed90 --- /dev/null +++ b/src/data_factory_testing_framework/state/pipeline_run_variable.py @@ -0,0 +1,15 @@ +from typing import Generic, TypeVar + +T = TypeVar("T") + + +class PipelineRunVariable(Generic[T]): + def __init__(self, name: str, default_value: T = None) -> None: + """Represents a pipeline variable that is being tracked during a pipeline run. + + Args: + name: Name of the variable. + default_value: Default value of the variable. Defaults to None. + """ + self.name = name + self.value = default_value diff --git a/src/data_factory_testing_framework/state/run_parameter.py b/src/data_factory_testing_framework/state/run_parameter.py new file mode 100644 index 00000000..a1884519 --- /dev/null +++ b/src/data_factory_testing_framework/state/run_parameter.py @@ -0,0 +1,19 @@ +from typing import Generic, TypeVar + +from data_factory_testing_framework.state.run_parameter_type import RunParameterType + +T = TypeVar("T") + + +class RunParameter(Generic[T]): + def __init__(self, parameter_type: RunParameterType, name: str, value: T) -> None: + """Run parameter. Represents a parameter that is being tracked during a pipeline run. + + Args: + parameter_type: Type of the parameter. + name: Name of the parameter. + value: Value of the parameter. + """ + self.type = parameter_type + self.name = name + self.value = value diff --git a/src/data_factory_testing_framework/state/run_parameter_type.py b/src/data_factory_testing_framework/state/run_parameter_type.py new file mode 100644 index 00000000..c5f6b6af --- /dev/null +++ b/src/data_factory_testing_framework/state/run_parameter_type.py @@ -0,0 +1,23 @@ +from enum import Enum + +from azure.core import CaseInsensitiveEnumMeta + + +class RunParameterType(str, Enum, metaclass=CaseInsensitiveEnumMeta): + Pipeline = "Pipeline" + Global = "Global" + Dataset = "Dataset" + LinkedService = "LinkedService" + System = "System" + + def __str__(self) -> str: + """Get the string representation of the enum. + + We override this method to make sure that the string representation + is the same across all Python versions. + + Returns: + The string representation of the enum. + """ + super().__str__() + return f"{RunParameterType.__name__}.{self.name}" diff --git a/src/data_factory_testing_framework/state/run_state.py b/src/data_factory_testing_framework/state/run_state.py new file mode 100644 index 00000000..70bda86e --- /dev/null +++ b/src/data_factory_testing_framework/state/run_state.py @@ -0,0 +1,16 @@ +from typing import List, Optional + +from data_factory_testing_framework.state.run_parameter import RunParameter + + +class RunState: + def __init__(self, parameters: Optional[List[RunParameter]] = None) -> None: + """Represents the RunState for non-pipeline runs, like LinkedServices, Datasets and Triggers. + + Args: + parameters: The global and regular parameters to be used for evaluating expressions. + """ + if parameters is None: + parameters = [] + + self.parameters = parameters diff --git a/src/data_factory_testing_framework/test_framework.py b/src/data_factory_testing_framework/test_framework.py new file mode 100644 index 00000000..b7c9ecb4 --- /dev/null +++ b/src/data_factory_testing_framework/test_framework.py @@ -0,0 +1,178 @@ +from enum import Enum +from typing import Iterator, List + +from azure.core import CaseInsensitiveEnumMeta + +from data_factory_testing_framework.exceptions.pipeline_activities_circular_dependency_error import ( + PipelineActivitiesCircularDependencyError, +) +from data_factory_testing_framework.models.activities.activity import Activity +from data_factory_testing_framework.models.activities.control_activity import ControlActivity +from data_factory_testing_framework.models.activities.execute_pipeline_activity import ( + ExecutePipelineActivity, +) +from data_factory_testing_framework.models.activities.fail_activity import FailActivity +from data_factory_testing_framework.models.activities.for_each_activity import ForEachActivity +from data_factory_testing_framework.models.activities.if_condition_activity import ( + IfConditionActivity, +) +from data_factory_testing_framework.models.activities.switch_activity import SwitchActivity +from data_factory_testing_framework.models.activities.until_activity import UntilActivity +from data_factory_testing_framework.models.pipeline import Pipeline +from data_factory_testing_framework.repositories.data_factory_repository import DataFactoryRepository +from data_factory_testing_framework.repositories.data_factory_repository_factory import ( + DataFactoryRepositoryFactory, +) +from data_factory_testing_framework.repositories.fabric_repository_factory import ( + FabricRepositoryFactory, +) +from data_factory_testing_framework.state import PipelineRunState, RunParameter + + +class TestFrameworkType(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """TestFrameworkType.""" + + __test__ = False # Prevent pytest from discovering this class as a test class + + DataFactory = "DataFactory" + Fabric = "Fabric" + Synapse = "Synapse" + + +class TestFramework: + __test__ = False # Prevent pytest from discovering this class as a test class + + def __init__( + self, + framework_type: TestFrameworkType, + root_folder_path: str = None, + should_evaluate_child_pipelines: bool = False, + ) -> None: + """Initializes the test framework allowing you to evaluate pipelines and activities. + + Args: + framework_type: type of the test framework. + root_folder_path: optional path to the folder containing the data factory files. + The repository attribute will be populated with the data factory entities if provided. + should_evaluate_child_pipelines: optional boolean indicating whether child pipelines should be evaluated. Defaults to False. + """ + if framework_type == TestFrameworkType.Fabric: + if root_folder_path is not None: + self.repository = FabricRepositoryFactory().parse_from_folder(root_folder_path) + else: + self.repository = DataFactoryRepository([]) + elif framework_type == TestFrameworkType.DataFactory: + if root_folder_path is not None: + self.repository = DataFactoryRepositoryFactory().parse_from_folder(root_folder_path) + else: + self.repository = DataFactoryRepository([]) + elif framework_type == TestFrameworkType.Synapse: + raise NotImplementedError("Synapse test framework is not implemented yet.") + + self.should_evaluate_child_pipelines = should_evaluate_child_pipelines + + def evaluate_activity(self, activity: Activity, state: PipelineRunState) -> Iterator[Activity]: + """Evaluates a single activity given a state. Any expression part of the activity is evaluated based on the state of the pipeline. + + Args: + activity: The activity to evaluate. + state: The state to use for evaluating the activity. + + Returns: + A list of evaluated pipelines, which can be more than 1 due to possible child activities. + """ + return self.evaluate_activities([activity], state) + + def evaluate_pipeline(self, pipeline: Pipeline, parameters: List[RunParameter]) -> Iterator[Activity]: + """Evaluates all pipeline activities using the provided parameters. + + The order of activity execution is simulated based on the dependencies. + Any expression part of the activity is evaluated based on the state of the pipeline. + + Args: + pipeline: The pipeline to evaluate. + parameters: The parameters to use for evaluating the pipeline. + + Returns: + A list of evaluated pipelines, which can be more than 1 due to possible child activities. + """ + parameters = pipeline.validate_and_append_default_parameters(parameters) + state = PipelineRunState(parameters, pipeline.get_run_variables()) + return self.evaluate_activities(pipeline.activities, state) + + def evaluate_activities(self, activities: List[Activity], state: PipelineRunState) -> Iterator[Activity]: + """Evaluates all activities using the provided state. + + The order of activity execution is simulated based on the dependencies. + Any expression part of the activity is evaluated based on the state of the pipeline. + + Args: + activities: The activities to evaluate. + state: The state to use for evaluating the pipeline. + + Returns: + A list of evaluated pipelines, which can be more than 1 due to possible child activities. + """ + fail_activity_evaluated = False + while len(state.scoped_pipeline_activity_results) != len(activities): + any_activity_evaluated = False + for activity in filter( + lambda a: a.name not in state.scoped_pipeline_activity_results + and a.are_dependency_condition_met(state), + activities, + ): + evaluated_activity = activity.evaluate(state) + if not self._is_iteration_activity(evaluated_activity) or ( + isinstance(evaluated_activity, ExecutePipelineActivity) and not self.should_evaluate_child_pipelines + ): + yield evaluated_activity + + if isinstance(activity, FailActivity): + fail_activity_evaluated = True + break + + any_activity_evaluated = True + state.add_activity_result(activity.name, activity.status, activity.output) + + # Check if there are any child activities to evaluate + if self._is_iteration_activity(activity): + activities_iterator = [] + if isinstance(activity, ExecutePipelineActivity) and self.should_evaluate_child_pipelines: + execute_pipeline_activity: ExecutePipelineActivity = activity + pipeline = self.repository.get_pipeline_by_name( + execute_pipeline_activity.type_properties["pipeline"]["referenceName"], + ) + activities_iterator = execute_pipeline_activity.evaluate_pipeline( + pipeline, + activity.get_child_run_parameters(state), + self.evaluate_activities, + ) + + if not isinstance(activity, ExecutePipelineActivity) and isinstance(activity, ControlActivity): + control_activity: ControlActivity = activity + activities_iterator = control_activity.evaluate_control_activities( + state, + self.evaluate_activities, + ) + + for child_activity in activities_iterator: + yield child_activity + if isinstance(child_activity, FailActivity): + fail_activity_evaluated = True + break + + if fail_activity_evaluated: + break + + if not any_activity_evaluated: + raise PipelineActivitiesCircularDependencyError() + + @staticmethod + def _is_iteration_activity(activity: Activity) -> bool: + return ( + isinstance(activity, UntilActivity) + or isinstance(activity, ForEachActivity) + or isinstance(activity, IfConditionActivity) + or isinstance(activity, SwitchActivity) + or isinstance(activity, ExecutePipelineActivity) + ) diff --git a/src/dotnet/.editorconfig b/src/dotnet/.editorconfig deleted file mode 100644 index 333baae4..00000000 --- a/src/dotnet/.editorconfig +++ /dev/null @@ -1,47 +0,0 @@ -[*] - -# Microsoft .NET properties -csharp_new_line_before_members_in_object_initializers = false -csharp_new_line_before_open_brace = all -csharp_preferred_modifier_order = internal, protected, private, public, file, new, override, sealed, abstract, static, virtual, async, extern, unsafe, volatile, readonly, required:suggestion -file_header_template=Copyright (c) Microsoft Corporation.\nLicensed under the MIT License. - -# ReSharper properties -resharper_accessor_owner_body = accessors_with_expression_body -resharper_arguments_skip_single = true -resharper_blank_lines_after_block_statements = 0 -resharper_blank_lines_around_auto_property = 0 -resharper_blank_lines_around_property = 0 -resharper_braces_for_foreach = required_for_multiline -resharper_braces_for_ifelse = not_required -resharper_braces_redundant = false -resharper_csharp_blank_lines_around_field = 0 -resharper_csharp_blank_lines_around_invocable = 0 -resharper_csharp_blank_lines_around_region = 0 -resharper_csharp_blank_lines_around_single_line_invocable = 1 -resharper_csharp_blank_lines_inside_region = 0 -resharper_csharp_case_block_braces = next_line_shifted_2 -resharper_csharp_indent_invocation_pars = none -resharper_csharp_insert_final_newline = true -resharper_csharp_max_line_length = 4517 -resharper_csharp_remove_blank_lines_near_braces_in_code = false -resharper_csharp_remove_blank_lines_near_braces_in_declarations = false -resharper_csharp_wrap_parameters_style = chop_if_long -resharper_for_other_types = use_explicit_type -resharper_instance_members_qualify_declared_in = -resharper_local_function_body = expression_body -resharper_method_or_operator_body = expression_body -resharper_null_checking_pattern_style = empty_recursive_pattern -resharper_object_creation_when_type_evident = explicitly_typed -resharper_parentheses_redundancy_style = remove -resharper_place_accessorholder_attribute_on_same_line = false -resharper_place_expr_accessor_on_single_line = true -resharper_place_expr_method_on_single_line = true -resharper_place_expr_property_on_single_line = true -resharper_place_simple_anonymousmethod_on_single_line = false -resharper_place_simple_embedded_statement_on_same_line = false -resharper_place_simple_enum_on_single_line = true -resharper_place_simple_initializer_on_single_line = false -resharper_wrap_chained_binary_expressions = chop_if_long -resharper_wrap_enum_declaration = wrap_if_long -resharper_wrap_object_and_collection_initializer_style = chop_always \ No newline at end of file diff --git a/src/dotnet/AzureDataFactory.TestingFramework.Example/AzureDataFactory.TestingFramework.Example.csproj b/src/dotnet/AzureDataFactory.TestingFramework.Example/AzureDataFactory.TestingFramework.Example.csproj deleted file mode 100644 index 60205238..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework.Example/AzureDataFactory.TestingFramework.Example.csproj +++ /dev/null @@ -1,35 +0,0 @@ - - - - net7.0 - enable - enable - - false - true - - - - - - - runtime; build; native; contentfiles; analyzers; buildtransitive - all - - - runtime; build; native; contentfiles; analyzers; buildtransitive - all - - - - - - - - - - PreserveNewest - - - - diff --git a/src/dotnet/AzureDataFactory.TestingFramework.Example/BatchJob/BatchJobFunctionalTests.cs b/src/dotnet/AzureDataFactory.TestingFramework.Example/BatchJob/BatchJobFunctionalTests.cs deleted file mode 100644 index 71d0ee2c..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework.Example/BatchJob/BatchJobFunctionalTests.cs +++ /dev/null @@ -1,207 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -using AzureDataFactory.TestingFramework.Exceptions; -using AzureDataFactory.TestingFramework.Models; -using AzureDataFactory.TestingFramework.Models.Base; - -namespace AzureDataFactory.TestingFramework.Example.BatchJob; - -public class BatchJobFunctionalTests -{ - [Fact] - public void BatchJobTest() - { - var testFramework = new TestFramework(dataFactoryFolderPath: "BatchJob"); - var pipeline = testFramework.Repository.GetPipelineByName("batch_job"); - Assert.Equal("batch_job", pipeline.Name); - Assert.Equal(11, pipeline.Activities.Count); - - var activities = testFramework.EvaluateWithEnumerator(pipeline, new List - { - new RunParameter(ParameterType.Pipeline, "BatchPoolId", "batch-pool-id"), - new RunParameter(ParameterType.Pipeline, "WorkloadApplicationPackageName", "test-application"), - new RunParameter(ParameterType.Pipeline, "WorkloadApplicationPackageVersion", "1.5.0"), - new RunParameter(ParameterType.Pipeline, "ManagerApplicationPackageName", "batchmanager"), - new RunParameter(ParameterType.Pipeline, "ManagerApplicationPackageVersion", "2.0.0"), - new RunParameter(ParameterType.Pipeline, "ManagerTaskParameters", "--parameter1 dummy --parameter2 another-dummy"), - new RunParameter(ParameterType.Pipeline, "JobId", "802100a5-ec79-4a52-be62-8d6109f3ff9a"), - new RunParameter(ParameterType.Pipeline, "TaskOutputFolderPrefix", "TASKOUTPUT_"), - new RunParameter(ParameterType.Pipeline, "WorkloadUserAssignedIdentityName", "test-application-identity-name"), - new RunParameter(ParameterType.Pipeline, "WorkloadUserAssignedIdentityClientId", "/subscriptions/SUBSCRIPTION_ID/resourcegroups/RESOURCE_GROUP/providers/Microsoft.ManagedIdentity/userAssignedIdentities/test-application-identity-name"), - new RunParameter(ParameterType.Pipeline, "JobAdditionalEnvironmentSettings", "[]"), - new RunParameter(ParameterType.Pipeline, "OutputStorageAccountName", "test-application-output-storage-account-name"), - new RunParameter(ParameterType.Pipeline, "OutputContainerName", "test-application-output-container-name"), - new RunParameter(ParameterType.Pipeline, "OutputFolderName", "TEMP"), - new RunParameter(ParameterType.Pipeline, "BatchJobTimeout", "PT4H"), - new RunParameter(ParameterType.Global, "BatchStorageAccountName", "batch-account-name"), - new RunParameter(ParameterType.Global, "BatchAccountSubscription", "SUBSCRIPTION_ID"), - new RunParameter(ParameterType.Global, "BatchAccountResourceGroup", "RESOURCE_GROUP"), - new RunParameter(ParameterType.Global, "BatchURI", "https://batch-account-name.westeurope.batch.azure.com"), - new RunParameter(ParameterType.Global, "ADFSubscription", "bd19dba4-89ad-4976-b862-848bf43a4340"), - new RunParameter(ParameterType.Global, "ADFResourceGroup", "adf-rg"), - new RunParameter(ParameterType.Global, "ADFName", "adf-name"), - }); - - var setUserAssignedIdentityActivity = activities.GetNext(); - Assert.Equal("Set UserAssignedIdentityReference", setUserAssignedIdentityActivity.Name); - Assert.Equal("UserAssignedIdentityReference", setUserAssignedIdentityActivity.VariableName); - Assert.Equal("/subscriptions/SUBSCRIPTION_ID/resourcegroups/RESOURCE_GROUP/providers/Microsoft.ManagedIdentity/userAssignedIdentities/test-application-identity-name", setUserAssignedIdentityActivity.Value); - - var setManagerApplicationPackagePathActivity = activities.GetNext(); - Assert.Equal("Set ManagerApplicationPackagePath", setManagerApplicationPackagePathActivity.Name); - Assert.Equal("ManagerApplicationPackagePath", setManagerApplicationPackagePathActivity.VariableName); - Assert.Equal("$AZ_BATCH_APP_PACKAGE_batchmanager_2_0_0/batchmanager.tar.gz", setManagerApplicationPackagePathActivity.Value); - - var setWorkloadApplicationPackagePathActivity = activities.GetNext(); - Assert.Equal("Set WorkloadApplicationPackagePath", setWorkloadApplicationPackagePathActivity.Name); - Assert.Equal("WorkloadApplicationPackagePath", setWorkloadApplicationPackagePathActivity.VariableName); - Assert.Equal("$AZ_BATCH_APP_PACKAGE_test-application_1_5_0/test-application.tar.gz", setWorkloadApplicationPackagePathActivity.Value); - - var setCommonEnvironmentSettingsActivity = activities.GetNext(); - Assert.Equal("Set CommonEnvironmentSettings", setCommonEnvironmentSettingsActivity.Name); - Assert.Equal("CommonEnvironmentSettings", setCommonEnvironmentSettingsActivity.VariableName); - Assert.Equal(@"[ - { - ""name"": ""WORKLOAD_APP_PACKAGE"", - ""value"": ""test-application"" - }, - { - ""name"": ""WORKLOAD_APP_PACKAGE_VERSION"", - ""value"": ""1.5.0"" - }, - { - ""name"": ""MANAGER_APP_PACKAGE"", - ""value"": ""batchmanager"" - }, - { - ""name"": ""MANAGER_APP_PACKAGE_VERSION"", - ""value"": ""2.0.0"" - }, - { - ""name"": ""BATCH_JOB_TIMEOUT"", - ""value"": ""PT4H"" - }, - { - ""name"": ""WORKLOAD_AUTO_STORAGE_ACCOUNT_NAME"", - ""value"": ""batch-account-name"" - }, - { - ""name"": ""WORKLOAD_USER_ASSIGNED_IDENTITY_RESOURCE_ID"", - ""value"": ""/subscriptions/SUBSCRIPTION_ID/resourcegroups/RESOURCE_GROUP/providers/Microsoft.ManagedIdentity/userAssignedIdentities/test-application-identity-name"" - }, - { - ""name"": ""WORKLOAD_USER_ASSIGNED_IDENTITY_CLIENT_ID"", - ""value"": ""/subscriptions/SUBSCRIPTION_ID/resourcegroups/RESOURCE_GROUP/providers/Microsoft.ManagedIdentity/userAssignedIdentities/test-application-identity-name"" - } - ]", setCommonEnvironmentSettingsActivity.Value, ignoreLineEndingDifferences: true, ignoreWhiteSpaceDifferences: true); - - var setJobContainerNameActivity = activities.GetNext(); - Assert.Equal("Set JobContainerName", setJobContainerNameActivity.Name); - Assert.Equal("JobContainerName", setJobContainerNameActivity.VariableName); - Assert.Equal("job-802100a5-ec79-4a52-be62-8d6109f3ff9a", setJobContainerNameActivity.Value); - - var setJobContainerUrlActivity = activities.GetNext(); - Assert.Equal("Set Job Container URL", setJobContainerUrlActivity.Name); - Assert.Equal("JobContainerURL", setJobContainerUrlActivity.VariableName); - Assert.Equal("https://batch-account-name.blob.core.windows.net/job-802100a5-ec79-4a52-be62-8d6109f3ff9a", setJobContainerUrlActivity.Value); - - var createJobContainer = activities.GetNext(); - Assert.Equal("Create Job Storage Container", createJobContainer.Name); - Assert.Equal("https://batch-account-name.blob.core.windows.net/job-802100a5-ec79-4a52-be62-8d6109f3ff9a?restype=container", createJobContainer.Uri); - Assert.Equal("PUT", createJobContainer.Method); - Assert.Equal("{}", createJobContainer.Body); - - var startJobActivity = activities.GetNext(); - Assert.Equal("Start Job", startJobActivity.Name); - Assert.Equal("https://batch-account-name.westeurope.batch.azure.com/jobs?api-version=2022-10-01.16.0", startJobActivity.Uri); - Assert.Equal("POST", startJobActivity.Method); - Assert.Equal(@"{ - ""id"": ""802100a5-ec79-4a52-be62-8d6109f3ff9a"", - ""priority"": 100, - ""constraints"": { - ""maxWallClockTime"":""PT4H"", - ""maxTaskRetryCount"": 0 - }, - ""jobManagerTask"": { - ""id"": ""Manager"", - ""displayName"": ""Manager"", - ""authenticationTokenSettings"": { - ""access"": [ - ""job"" - ] - }, - ""commandLine"": ""/bin/bash -c \""python3 -m ensurepip --upgrade && python3 -m pip install --user $AZ_BATCH_APP_PACKAGE_batchmanager_2_0_0/batchmanager.tar.gz && python3 -m pip install --user $AZ_BATCH_APP_PACKAGE_test-application_1_5_0/test-application.tar.gz && python3 -m test-application job --parameter1 dummy --parameter2 another-dummy\"""", - ""applicationPackageReferences"": [ - { - ""applicationId"": ""batchmanager"", - ""version"": ""2.0.0"" - }, - { - ""applicationId"": ""test-application"", - ""version"": ""1.5.0"" - } - ], - ""outputFiles"": [ - { - ""destination"": { - ""container"": { - ""containerUrl"": ""https://batch-account-name.blob.core.windows.net/job-802100a5-ec79-4a52-be62-8d6109f3ff9a"", - ""identityReference"": { - ""resourceId"": ""/subscriptions/SUBSCRIPTION_ID/resourcegroups/RESOURCE_GROUP/providers/Microsoft.ManagedIdentity/userAssignedIdentities/test-application-identity-name"" - }, - ""path"": ""Manager/$TaskLog"" - } - }, - ""filePattern"": ""../*.txt"", - ""uploadOptions"": { - ""uploadCondition"": ""taskcompletion"" - } - } - ], - ""environmentSettings"": [], - ""requiredSlots"": 1, - ""killJobOnCompletion"": false, - ""userIdentity"": { - ""username"": null, - ""autoUser"": { - ""scope"": ""pool"", - ""elevationLevel"": ""nonadmin"" - } - }, - ""runExclusive"": true, - ""allowLowPriorityNode"": true - }, - ""poolInfo"": { - ""poolId"": ""batch-pool-id"" - }, - ""onAllTasksComplete"": ""terminatejob"", - ""onTaskFailure"": ""noaction"", - ""usesTaskDependencies"": true, - ""commonEnvironmentSettings"": [{""name"":""WORKLOAD_APP_PACKAGE"",""value"":""test-application""},{""name"":""WORKLOAD_APP_PACKAGE_VERSION"",""value"":""1.5.0""},{""name"":""MANAGER_APP_PACKAGE"",""value"":""batchmanager""},{""name"":""MANAGER_APP_PACKAGE_VERSION"",""value"":""2.0.0""},{""name"":""BATCH_JOB_TIMEOUT"",""value"":""PT4H""},{""name"":""WORKLOAD_AUTO_STORAGE_ACCOUNT_NAME"",""value"":""batch-account-name""},{""name"":""WORKLOAD_USER_ASSIGNED_IDENTITY_RESOURCE_ID"",""value"":""/subscriptions/SUBSCRIPTION_ID/resourcegroups/RESOURCE_GROUP/providers/Microsoft.ManagedIdentity/userAssignedIdentities/test-application-identity-name""},{""name"":""WORKLOAD_USER_ASSIGNED_IDENTITY_CLIENT_ID"",""value"":""/subscriptions/SUBSCRIPTION_ID/resourcegroups/RESOURCE_GROUP/providers/Microsoft.ManagedIdentity/userAssignedIdentities/test-application-identity-name""}]}", startJobActivity.Body, ignoreLineEndingDifferences: true, ignoreWhiteSpaceDifferences: true); - - var monitorActivity = activities.GetNext(); - Assert.Equal("Monitor Batch Job", monitorActivity.Name); - Assert.Equal("monitor_batch_job", monitorActivity.Pipeline.ReferenceName); - Assert.Equal(1, monitorActivity.Parameters.Count); - Assert.Equal("802100a5-ec79-4a52-be62-8d6109f3ff9a", monitorActivity.Parameters["JobId"]); - - var copyOutputFiles = activities.GetNext(); - Assert.Equal("Copy Output Files", copyOutputFiles.Name); - Assert.Equal("copy_output_files", copyOutputFiles.Pipeline.ReferenceName); - Assert.Equal(5, copyOutputFiles.Parameters.Count); - Assert.Equal("job-802100a5-ec79-4a52-be62-8d6109f3ff9a", copyOutputFiles.Parameters["JobContainerName"]); - Assert.Equal("TASKOUTPUT_", copyOutputFiles.Parameters["TaskOutputFolderPrefix"]); - Assert.Equal("test-application-output-storage-account-name", copyOutputFiles.Parameters["OutputStorageAccountName"]); - Assert.Equal("test-application-output-container-name", copyOutputFiles.Parameters["OutputContainerName"]); - Assert.Equal("TEMP", copyOutputFiles.Parameters["OutputFolderName"]); - - var deleteJobContainer = activities.GetNext(); - Assert.Equal("Delete Job Storage Container", deleteJobContainer.Name); - Assert.Equal("https://batch-account-name.blob.core.windows.net/job-802100a5-ec79-4a52-be62-8d6109f3ff9a?restype=container", deleteJobContainer.Uri); - Assert.Equal("DELETE", deleteJobContainer.Method); - Assert.Null(deleteJobContainer.Body); - - Assert.Throws(() => activities.GetNext()); - } -} \ No newline at end of file diff --git a/src/dotnet/AzureDataFactory.TestingFramework.Example/BatchJob/BatchJobUnitTests.cs b/src/dotnet/AzureDataFactory.TestingFramework.Example/BatchJob/BatchJobUnitTests.cs deleted file mode 100644 index 1702852b..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework.Example/BatchJob/BatchJobUnitTests.cs +++ /dev/null @@ -1,349 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -using Azure.ResourceManager.DataFactory; -using AzureDataFactory.TestingFramework.Models; -using AzureDataFactory.TestingFramework.Models.Base; -using AzureDataFactory.TestingFramework.Models.Pipelines; -using ParameterType = AzureDataFactory.TestingFramework.Models.Base.ParameterType; - -namespace AzureDataFactory.TestingFramework.Example.BatchJob; - -public class BatchJobUnitTests -{ - private readonly Pipeline _pipeline; - private readonly PipelineRunState _state; - - public BatchJobUnitTests() - { - _pipeline = PipelineFactory.ParseFromFile("BatchJob/pipeline/batch_job.json"); - _state = new PipelineRunState(); - } - - - [Fact] - public void SetJobContainerUrlTest() - { - // Arrange - var activity = _pipeline.GetActivityByName("Set Job Container URL") as SetVariableActivity; - var variable = new PipelineRunVariable("JobContainerURL"); - _state.Variables.Add(new PipelineRunVariable("JobContainerName", "job-8b6b545b-c583-4a06-adf7-19ff41370aba")); - _state.Parameters.Add(new RunParameter(ParameterType.Global, "BatchStorageAccountName", "batch-account-name")); - _state.Variables.Add(variable); - - // Act - activity.Evaluate(_state); - - // Assert - var expectedUrl = "https://batch-account-name.blob.core.windows.net/job-8b6b545b-c583-4a06-adf7-19ff41370aba"; - Assert.Equal(expectedUrl, activity.Value); - Assert.Equal(expectedUrl, variable.Value); - } - - [Fact] - public void SetUserAssignedIdentityReferenceTests() - { - // Arrange - var activity = _pipeline.GetActivityByName("Set UserAssignedIdentityReference") as SetVariableActivity; - var variable = new PipelineRunVariable("UserAssignedIdentityReference"); - _state.Parameters.Add(new RunParameter(ParameterType.Global, "BatchAccountSubscription", "batch-account-subscription")); - _state.Parameters.Add(new RunParameter(ParameterType.Global, "BatchAccountResourceGroup", "batch-account-resource-group")); - _state.Parameters.Add(new RunParameter(ParameterType.Pipeline, "WorkloadUserAssignedIdentityName", "workload-user-assigned-identity-name")); - _state.Variables.Add(variable); - - // Act - activity.Evaluate(_state); - - // Assert - var expectedReference = "/subscriptions/batch-account-subscription/resourcegroups/batch-account-resource-group/providers/Microsoft.ManagedIdentity/userAssignedIdentities/workload-user-assigned-identity-name"; - Assert.Equal(expectedReference, activity.Value); - Assert.Equal(expectedReference, variable.Value); - } - - [Fact] - public void SetManagerApplicationPackagePathTest() - { - // Arrange - var activity = _pipeline.GetActivityByName("Set ManagerApplicationPackagePath") as SetVariableActivity; - var variable = new PipelineRunVariable("ManagerApplicationPackagePath"); - _state.Parameters.Add(new RunParameter(ParameterType.Pipeline, "ManagerApplicationPackageName", "managerworkload")); - _state.Parameters.Add(new RunParameter(ParameterType.Pipeline, "ManagerApplicationPackageVersion", "0.13.2")); - _state.Variables.Add(variable); - - // Act - activity.Evaluate(_state); - - // Assert - var expectedPath = "$AZ_BATCH_APP_PACKAGE_managerworkload_0_13_2/managerworkload.tar.gz"; - Assert.Equal(expectedPath, activity.Value); - } - - [Fact] - public void SetWorkloadApplicationPackagePathTest() - { - // Arrange - var activity = _pipeline.GetActivityByName("Set WorkloadApplicationPackagePath") as SetVariableActivity; - var variable = new PipelineRunVariable("WorkloadApplicationPackagePath"); - _state.Parameters.Add(new RunParameter(ParameterType.Pipeline, "WorkloadApplicationPackageName", "workload")); - _state.Parameters.Add(new RunParameter(ParameterType.Pipeline, "WorkloadApplicationPackageVersion", "0.13.2")); - _state.Variables.Add(variable); - - // Act - activity.Evaluate(_state); - - // Assert - var expectedPath = "$AZ_BATCH_APP_PACKAGE_workload_0_13_2/workload.tar.gz"; - Assert.Equal(expectedPath, activity.Value); - } - - [Fact] - public void SetCommonEnvironmentSettingsTest() - { - // Arrange - var activity = _pipeline.GetActivityByName("Set CommonEnvironmentSettings") as SetVariableActivity; - var variable = new PipelineRunVariable("CommonEnvironmentSettings"); - _state.Parameters.Add(new RunParameter(ParameterType.Pipeline, "WorkloadApplicationPackageName", "workload")); - _state.Parameters.Add(new RunParameter(ParameterType.Pipeline, "WorkloadApplicationPackageVersion", "0.13.2")); - _state.Parameters.Add(new RunParameter(ParameterType.Pipeline, "ManagerApplicationPackageName", "managerworkload")); - _state.Parameters.Add(new RunParameter(ParameterType.Pipeline, "ManagerApplicationPackageVersion", "0.13.2")); - _state.Parameters.Add(new RunParameter(ParameterType.Pipeline, "BatchJobTimeout", "PT4H")); - _state.Parameters.Add(new RunParameter(ParameterType.Global, "BatchStorageAccountName", "batch-account-name")); - _state.Parameters.Add(new RunParameter(ParameterType.Pipeline, "WorkloadUserAssignedIdentityName", "workload-user-assigned-identity-name")); - _state.Parameters.Add(new RunParameter(ParameterType.Pipeline, "WorkloadUserAssignedIdentityClientId", "workload-user-assigned-identity-client-id")); - _state.Variables.Add(new PipelineRunVariable("UserAssignedIdentityReference", "/subscriptions/batch-account-subscription/resourcegroups/batch-account-resource-group/providers/Microsoft.ManagedIdentity/userAssignedIdentities/workload-user-assigned-identity-name")); - _state.Variables.Add(variable); - - // Act - activity.Evaluate(_state); - - // Assert - var expectedSettings = @"[ - { - ""name"": ""WORKLOAD_APP_PACKAGE"", - ""value"": ""workload"" - }, - { - ""name"": ""WORKLOAD_APP_PACKAGE_VERSION"", - ""value"": ""0.13.2"" - }, - { - ""name"": ""MANAGER_APP_PACKAGE"", - ""value"": ""managerworkload"" - }, - { - ""name"": ""MANAGER_APP_PACKAGE_VERSION"", - ""value"": ""0.13.2"" - }, - { - ""name"": ""BATCH_JOB_TIMEOUT"", - ""value"": ""PT4H"" - }, - { - ""name"": ""WORKLOAD_AUTO_STORAGE_ACCOUNT_NAME"", - ""value"": ""batch-account-name"" - }, - { - ""name"": ""WORKLOAD_USER_ASSIGNED_IDENTITY_RESOURCE_ID"", - ""value"": ""/subscriptions/batch-account-subscription/resourcegroups/batch-account-resource-group/providers/Microsoft.ManagedIdentity/userAssignedIdentities/workload-user-assigned-identity-name"" - }, - { - ""name"": ""WORKLOAD_USER_ASSIGNED_IDENTITY_CLIENT_ID"", - ""value"": ""workload-user-assigned-identity-client-id"" - } - ]"; - Assert.Equal(expectedSettings, activity.Value, ignoreLineEndingDifferences: true, ignoreWhiteSpaceDifferences: true); - } - - [Fact] - public void CreateJobStorageContainerTest() - { - // Arrange - var activity = _pipeline.GetActivityByName("Create Job Storage Container") as WebActivity; - _state.Variables.Add(new PipelineRunVariable("JobContainerURL", "https://batchstorage.blob.core.windows.net/job-8b6b545b-c583-4a06-adf7-19ff41370aba")); - - // Act - activity.Evaluate(_state); - - // Assert - Assert.Equal("Create Job Storage Container", activity.Name); - Assert.Equal("https://batchstorage.blob.core.windows.net/job-8b6b545b-c583-4a06-adf7-19ff41370aba?restype=container", activity.Uri); - Assert.Equal("PUT", activity.Method); - Assert.Equal("{}", activity.Body); - } - - [Fact] - public void SetJobContainerNameTest() - { - // Arrange - var activity = _pipeline.GetActivityByName("Set JobContainerName") as SetVariableActivity; - var jobContainerNameVariable = new PipelineRunVariable("JobContainerName"); - _state.Parameters.Add(new RunParameter(ParameterType.Pipeline, "JobId", "8b6b545b-c583-4a06-adf7-19ff41370aba")); - _state.Variables.Add(jobContainerNameVariable); - - // Act - activity.Evaluate(_state); - - // Assert - Assert.Equal("job-8b6b545b-c583-4a06-adf7-19ff41370aba", activity.Value); - Assert.Equal("job-8b6b545b-c583-4a06-adf7-19ff41370aba", jobContainerNameVariable.Value); - } - - [Fact] - public void StartJobPipelineTest() - { - // Arrange - var activity = _pipeline.GetActivityByName("Start Job") as WebActivity; - _state.Parameters.Add(new RunParameter(ParameterType.Global, "BatchURI", "https://batch-account-name.westeurope.batch.azure.com")); - _state.Parameters.Add(new RunParameter(ParameterType.Global, "BatchStorageAccountName", "batchstorage")); - _state.Parameters.Add(new RunParameter(ParameterType.Global, "ADFSubscription", "d9153e28-dd4e-446c-91e4-0b1331b523f1")); - _state.Parameters.Add(new RunParameter(ParameterType.Global, "ADFResourceGroup", "adf-rg")); - _state.Parameters.Add(new RunParameter(ParameterType.Global, "ADFName", "adf-name")); - _state.Parameters.Add(new RunParameter(ParameterType.Pipeline, "JobId", "8b6b545b-c583-4a06-adf7-19ff41370aba")); - _state.Parameters.Add(new RunParameter(ParameterType.Pipeline, "BatchJobTimeout", "PT4H")); - _state.Parameters.Add(new RunParameter(ParameterType.Pipeline, "BatchPoolId", "test-application-batch-pool-id")); - _state.Parameters.Add(new RunParameter(ParameterType.Pipeline, "WorkloadApplicationPackageName", "test-application-name")); - _state.Parameters.Add(new RunParameter(ParameterType.Pipeline, "WorkloadApplicationPackageVersion", "1.5.0")); - _state.Parameters.Add(new RunParameter(ParameterType.Pipeline, "ManagerApplicationPackageName", "batchmanager")); - _state.Parameters.Add(new RunParameter(ParameterType.Pipeline, "ManagerApplicationPackageVersion", "2.0.0")); - _state.Parameters.Add(new RunParameter(ParameterType.Pipeline, "ManagerTaskParameters", "--parameter1 dummy --parameter2 another-dummy")); - _state.Parameters.Add(new RunParameter(ParameterType.Pipeline, "WorkloadUserAssignedIdentityName", "test-application-batch-pool-id")); - _state.Parameters.Add(new RunParameter(ParameterType.Pipeline, "WorkloadUserAssignedIdentityClientId", "test-application-identity-client-id")); - _state.Parameters.Add(new RunParameter(ParameterType.Pipeline, "JobAdditionalEnvironmentSettings", "[{\"name\": \"STORAGE_ACCOUNT_NAME\", \"value\": \"teststorage\"}]")); - _state.Variables.Add(new PipelineRunVariable("JobContainerURL", "https://batch-account-name.blob.core.windows.net/job-8b6b545b-c583-4a06-adf7-19ff41370aba")); - _state.Variables.Add(new PipelineRunVariable("UserAssignedIdentityReference", "/subscriptions/batch-account-subscription/resourcegroups/batch-account-resource-group/providers/Microsoft.ManagedIdentity/userAssignedIdentities/workload-user-assigned-identity-name")); - _state.Variables.Add(new PipelineRunVariable("ManagerApplicationPackagePath", "$AZ_BATCH_APP_PACKAGE_managerworkload_0_13_2/managerworkload.tar.gz")); - _state.Variables.Add(new PipelineRunVariable("WorkloadApplicationPackagePath", "$AZ_BATCH_APP_PACKAGE_workload_0_13_2/workload.tar.gz")); - _state.Variables.Add(new PipelineRunVariable("CommonEnvironmentSettings", @"[{""name"": ""COMMON_ENV_SETTING"", ""value"":""dummy""}]")); - - // Act - activity.Evaluate(_state); - - // Assert - Assert.Equal("Start Job", activity.Name); - Assert.Equal("https://batch-account-name.westeurope.batch.azure.com/jobs?api-version=2022-10-01.16.0", activity.Uri); - Assert.Equal("POST", activity.Method); - Assert.Equal(@"{ - ""id"": ""8b6b545b-c583-4a06-adf7-19ff41370aba"", - ""priority"": 100, - ""constraints"": { - ""maxWallClockTime"":""PT4H"", - ""maxTaskRetryCount"": 0 - }, - ""jobManagerTask"": { - ""id"": ""Manager"", - ""displayName"": ""Manager"", - ""authenticationTokenSettings"": { - ""access"": [ - ""job"" - ] - }, - ""commandLine"": ""/bin/bash -c \""python3 -m ensurepip --upgrade && python3 -m pip install --user $AZ_BATCH_APP_PACKAGE_managerworkload_0_13_2/managerworkload.tar.gz && python3 -m pip install --user $AZ_BATCH_APP_PACKAGE_workload_0_13_2/workload.tar.gz && python3 -m test-application-name job --parameter1 dummy --parameter2 another-dummy\"""", - ""applicationPackageReferences"": [ - { - ""applicationId"": ""batchmanager"", - ""version"": ""2.0.0"" - }, - { - ""applicationId"": ""test-application-name"", - ""version"": ""1.5.0"" - } - ], - ""outputFiles"": [ - { - ""destination"": { - ""container"": { - ""containerUrl"": ""https://batch-account-name.blob.core.windows.net/job-8b6b545b-c583-4a06-adf7-19ff41370aba"", - ""identityReference"": { - ""resourceId"": ""/subscriptions/batch-account-subscription/resourcegroups/batch-account-resource-group/providers/Microsoft.ManagedIdentity/userAssignedIdentities/workload-user-assigned-identity-name"" - }, - ""path"": ""Manager/$TaskLog"" - } - }, - ""filePattern"": ""../*.txt"", - ""uploadOptions"": { - ""uploadCondition"": ""taskcompletion"" - } - } - ], - ""environmentSettings"": [], - ""requiredSlots"": 1, - ""killJobOnCompletion"": false, - ""userIdentity"": { - ""username"": null, - ""autoUser"": { - ""scope"": ""pool"", - ""elevationLevel"": ""nonadmin"" - } - }, - ""runExclusive"": true, - ""allowLowPriorityNode"": true - }, - ""poolInfo"": { - ""poolId"": ""test-application-batch-pool-id"" - }, - ""onAllTasksComplete"": ""terminatejob"", - ""onTaskFailure"": ""noaction"", - ""usesTaskDependencies"": true, - ""commonEnvironmentSettings"": [{""name"":""COMMON_ENV_SETTING"",""value"":""dummy""},{""name"":""STORAGE_ACCOUNT_NAME"",""value"":""teststorage""}]}", activity.Body, ignoreLineEndingDifferences: true, ignoreWhiteSpaceDifferences: true); - } - - [Fact] - public void MonitorJobTest() - { - // Arrange - var activity = _pipeline.GetActivityByName("Monitor Batch Job") as ExecutePipelineActivity; - _state.Parameters.Add(new RunParameter(ParameterType.Pipeline, "JobId", "8b6b545b-c583-4a06-adf7-19ff41370aba")); - - // Act - activity.Evaluate(_state); - - // Assert - Assert.Equal("Monitor Batch Job", activity.Name); - Assert.Equal("monitor_batch_job", activity.Pipeline.ReferenceName); - Assert.Equal(1, activity.Parameters.Count); - Assert.Equal("8b6b545b-c583-4a06-adf7-19ff41370aba", activity.Parameters["JobId"]); - } - - [Fact] - public void CopyOutputFilesTest() - { - // Arrange - var activity = _pipeline.GetActivityByName("Copy Output Files") as ExecutePipelineActivity; - _state.Variables.Add(new PipelineRunVariable("JobContainerName", "job-8b6b545b-c583-4a06-adf7-19ff41370aba")); - _state.Parameters.Add(new RunParameter(ParameterType.Pipeline, "TaskOutputFolderPrefix", "TASKOUTPUT_")); - _state.Parameters.Add(new RunParameter(ParameterType.Pipeline, "OutputStorageAccountName", "teststorage")); - _state.Parameters.Add(new RunParameter(ParameterType.Pipeline, "OutputContainerName", "test-application-output-container-name")); - _state.Parameters.Add(new RunParameter(ParameterType.Pipeline, "OutputFolderName", "output")); - - // Act - activity.Evaluate(_state); - - // Assert - Assert.Equal("Copy Output Files", activity.Name); - Assert.Equal("copy_output_files", activity.Pipeline.ReferenceName); - Assert.Equal(5, activity.Parameters.Count); - Assert.Equal("job-8b6b545b-c583-4a06-adf7-19ff41370aba", activity.Parameters["JobContainerName"]); - Assert.Equal("TASKOUTPUT_", activity.Parameters["TaskOutputFolderPrefix"]); - Assert.Equal("teststorage", activity.Parameters["OutputStorageAccountName"]); - Assert.Equal("test-application-output-container-name", activity.Parameters["OutputContainerName"]); - Assert.Equal("output", activity.Parameters["OutputFolderName"]); - } - - [Fact] - public void DeleteJobStorageContainerTest() - { - // Arrange - var activity = _pipeline.GetActivityByName("Delete Job Storage Container") as WebActivity; - _state.Parameters.Add(new RunParameter(ParameterType.Global, "BatchStorageAccountName", "batchstorage")); - _state.Variables.Add(new PipelineRunVariable("JobContainerName", "job-8b6b545b-c583-4a06-adf7-19ff41370aba")); - - // Act - activity.Evaluate(_state); - - // Assert - Assert.Equal("Delete Job Storage Container", activity.Name); - Assert.Equal("https://batchstorage.blob.core.windows.net/job-8b6b545b-c583-4a06-adf7-19ff41370aba?restype=container", activity.Uri); - Assert.Equal("DELETE", activity.Method); - Assert.Null(activity.Body); - } -} \ No newline at end of file diff --git a/src/dotnet/AzureDataFactory.TestingFramework.Example/BatchJob/README.md b/src/dotnet/AzureDataFactory.TestingFramework.Example/BatchJob/README.md deleted file mode 100644 index ef8a3111..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework.Example/BatchJob/README.md +++ /dev/null @@ -1,6 +0,0 @@ -# Batch Job - -This pipeline is an example on how a batch job can be triggered from an Azure Data Factory pipeline. It configures a set of variables, create a storage container to be used by the batch job, trigger the job, monitors it, once complete it moves the output files to another storage account and finally deletes the storage container. - -![img.png](img.png) - diff --git a/src/dotnet/AzureDataFactory.TestingFramework.Example/BatchJob/img.png b/src/dotnet/AzureDataFactory.TestingFramework.Example/BatchJob/img.png deleted file mode 100644 index 29e95c08..00000000 Binary files a/src/dotnet/AzureDataFactory.TestingFramework.Example/BatchJob/img.png and /dev/null differ diff --git a/src/dotnet/AzureDataFactory.TestingFramework.Example/README.md b/src/dotnet/AzureDataFactory.TestingFramework.Example/README.md deleted file mode 100644 index 22f084ed..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework.Example/README.md +++ /dev/null @@ -1,7 +0,0 @@ -# Example project - -This example project contains real-world examples of how the Azure Data Factory Testing Framework can be used to test Azure Data Factory pipelines. - -## Contributing - -Please share your own examples by creating a pull request. You can also create an issue if you have any questions or suggestions. \ No newline at end of file diff --git a/src/dotnet/AzureDataFactory.TestingFramework.Example/Usings.cs b/src/dotnet/AzureDataFactory.TestingFramework.Example/Usings.cs deleted file mode 100644 index 20580725..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework.Example/Usings.cs +++ /dev/null @@ -1,4 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -global using Xunit; \ No newline at end of file diff --git a/src/dotnet/AzureDataFactory.TestingFramework.Tests/AzureDataFactory.TestingFramework.Tests.csproj b/src/dotnet/AzureDataFactory.TestingFramework.Tests/AzureDataFactory.TestingFramework.Tests.csproj deleted file mode 100644 index 5c47e705..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework.Tests/AzureDataFactory.TestingFramework.Tests.csproj +++ /dev/null @@ -1,42 +0,0 @@ - - - - net7.0 - enable - enable - - false - true - - - - - - - runtime; build; native; contentfiles; analyzers; buildtransitive - all - - - runtime; build; native; contentfiles; analyzers; buildtransitive - all - - - - - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - - - - - - diff --git a/src/dotnet/AzureDataFactory.TestingFramework.Tests/Functional/Pipelines/Child/ChildPipelineTests.cs b/src/dotnet/AzureDataFactory.TestingFramework.Tests/Functional/Pipelines/Child/ChildPipelineTests.cs deleted file mode 100644 index b25396af..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework.Tests/Functional/Pipelines/Child/ChildPipelineTests.cs +++ /dev/null @@ -1,51 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -using AzureDataFactory.TestingFramework.Exceptions; -using AzureDataFactory.TestingFramework.Models; -using AzureDataFactory.TestingFramework.Models.Base; -using AzureDataFactory.TestingFramework.Models.Pipelines; - -namespace AzureDataFactory.TestingFramework.Tests.Functional.Pipelines.Child; - -public class ChildPipelineTests -{ - [Fact] - public void WhenExecutePipelineActivityIsCalled_ThenChildPipelineActivitiesAreExecuted() - { - // Arrange - var testFramework = new TestFramework(dataFactoryFolderPath: "Functional/Pipelines/Child", shouldEvaluateChildPipelines: true); - var pipeline = testFramework.Repository.GetPipelineByName("main"); - - // Act - var activities = testFramework.EvaluateWithEnumerator(pipeline, new List() - { - new RunParameter(ParameterType.Pipeline, "Url", "https://example.com"), - new RunParameter(ParameterType.Pipeline, "Body", "{ \"key\": \"value\" }") - }); - - // Assert - var childWebActivity = activities.GetNext(); - Assert.Equal("API Call", childWebActivity.Name); - Assert.Equal("https://example.com", childWebActivity.Uri); - Assert.Equal("{ \"key\": \"value\" }", childWebActivity.Body); - } - - [Fact] - public void WhenExecutePipelineActivityIsCalledAndIsConfiguredToEvaluateChildPipelinesAndChildPipelineIsNotKnown_ThenExceptionShouldBeThrown() - { - // Arrange - var testFramework = new TestFramework(shouldEvaluateChildPipelines: true); - var pipeline = PipelineFactory.ParseFromFile("Functional/Pipelines/Child/pipeline/main.json"); - - // Act - var exception = Assert.Throws(() => testFramework.EvaluateAll(pipeline, new List() - { - new RunParameter(ParameterType.Pipeline, "Url", "https://example.com"), - new RunParameter(ParameterType.Pipeline, "Body", "{ \"key\": \"value\" }") - })); - - // Assert - Assert.Equal("Pipeline with name 'child' was not found in the repository. Make sure to load the repository before evaluating pipelines.", exception.Message); - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework.Tests/FunctionsAndExpressions/FunctionArgumentTests.cs b/src/dotnet/AzureDataFactory.TestingFramework.Tests/FunctionsAndExpressions/FunctionArgumentTests.cs deleted file mode 100644 index 6bef8cf2..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework.Tests/FunctionsAndExpressions/FunctionArgumentTests.cs +++ /dev/null @@ -1,241 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -using AzureDataFactory.TestingFramework.Exceptions; -using AzureDataFactory.TestingFramework.Expressions; -using AzureDataFactory.TestingFramework.Functions; -using AzureDataFactory.TestingFramework.Models.Base; -using AzureDataFactory.TestingFramework.Models.Pipelines; - -namespace AzureDataFactory.TestingFramework.Tests; - -public class FunctionArgumentTests -{ - private readonly PipelineRunState _state; - - public FunctionArgumentTests() - { - _state = new PipelineRunState(); - } - - [Fact] - private void EvaluateVariableStringExpression() - { - // Arrange - var expression = "variables('variableName')"; - var argument = new FunctionArgument(expression); - _state.Variables.Add(new PipelineRunVariable("variableName", "variableValue")); - - // Act - var evaluated = argument.Evaluate(_state); - - // Assert - Assert.Equal("variableValue", evaluated); - } - - [Theory] - [InlineData(true)] - [InlineData(false)] - private void EvaluateVariableBoolExpression(bool boolValue) - { - // Arrange - var expression = "variables('variableName')"; - var argument = new FunctionArgument(expression); - _state.Variables.Add(new PipelineRunVariable("variableName", boolValue)); - - // Act - var evaluated = argument.Evaluate(_state); - - // Assert - Assert.Equal(boolValue, evaluated); - } - - [Theory] - [InlineData(1)] - [InlineData(2)] - private void EvaluateVariableIntExpression(int intValue) - { - // Arrange - var expression = "variables('variableName')"; - var argument = new FunctionArgument(expression); - _state.Variables.Add(new PipelineRunVariable("variableName", intValue)); - - // Act - var evaluated = argument.Evaluate(_state); - - // Assert - Assert.Equal(intValue, evaluated); - } - - [Fact] - private void EvaluateParameterExpression() - { - // Arrange - var expression = "pipeline().parameters.parameterName"; - var argument = new FunctionArgument(expression); - _state.Parameters.Add(new RunParameter(ParameterType.Pipeline, "parameterName", "parameterValue")); - - // Act - var evaluated = argument.Evaluate(_state); - - // Assert - Assert.Equal("parameterValue", evaluated); - } - - [Fact] - private void EvaluateGlobalParameterExpression() - { - // Arrange - var expression = "pipeline().globalParameters.parameterName"; - var argument = new FunctionArgument(expression); - _state.Parameters.Add(new RunParameter(ParameterType.Global, "parameterName", "parameterValue")); - - // Act - var evaluated = argument.Evaluate(_state); - - // Assert - Assert.Equal("parameterValue", evaluated); - } - - [Fact] - private void EvaluateActivityOutputExpression() - { - // Arrange - var expression = "activity('activityName').output.outputName"; - var argument = new FunctionArgument(expression); - _state.AddActivityResult(new TestActivityResult("activityName", new { outputName = "outputValue" })); - - // Act - var evaluated = argument.Evaluate(_state); - - // Assert - Assert.Equal("outputValue", evaluated); - } - - [Fact] - private void EvaluateIterationExpression() - { - // Arrange - var expression = "item()"; - var argument = new FunctionArgument(expression); - _state.IterationItem = "item0"; - - // Act - var evaluated = argument.Evaluate(_state); - - // Assert - Assert.Equal("item0", evaluated); - } - - [Fact] - private void EvaluateDatasetExpression() - { - // Arrange - var expression = "dataset().datasetParameter"; - var argument = new FunctionArgument(expression); - _state.Parameters.Add(new RunParameter(ParameterType.Dataset, "datasetParameter", "datasetValue")); - - // Act - var evaluated = argument.Evaluate(_state); - - // Assert - Assert.Equal("datasetValue", evaluated); - } - - [Fact] - private void EvaluateLinkedServiceExpression() - { - // Arrange - var expression = "linkedService().linkedServiceParameter"; - var argument = new FunctionArgument(expression); - _state.Parameters.Add(new RunParameter(ParameterType.LinkedService, "linkedServiceParameter", "linkedServiceValue")); - - // Act - var evaluated = argument.Evaluate(_state); - - // Assert - Assert.Equal("linkedServiceValue", evaluated); - } - - [Fact] - private void EvaluateParameterInString() - { - // Arrange - var expression = "{ \"parameter\": \"@pipeline().parameters.parameterName\" }"; - var argument = new FunctionArgument(expression); - _state.Parameters.Add(new RunParameter(ParameterType.Pipeline, "parameterName", "parameterValue")); - - // Act - var evaluated = argument.Evaluate(_state); - - // Assert - Assert.Equal("{ \"parameter\": \"parameterValue\" }", evaluated); - } - - [Fact] - public void EvaluateUnknownParameter() - { - // Arrange - var expression = "pipeline().parameters.parameterName"; - var argument = new FunctionArgument(expression); - - // Act - Assert.Throws(() => argument.Evaluate(_state)); - } - - [Fact] - public void EvaluateUnknownVariable() - { - // Arrange - var expression = "variables('variableName')"; - var argument = new FunctionArgument(expression); - - // Act - Assert.Throws(() => argument.Evaluate(_state)); - } - - [Fact] - public void EvaluateUnknownActivity() - { - // Arrange - var expression = "activity('activityName').output.outputName"; - var argument = new FunctionArgument(expression); - - // Act - Assert.Throws(() => argument.Evaluate(_state)); - } - - [Fact] - public void EvaluateUnknownDataset() - { - // Arrange - var expression = "dataset().datasetParameter"; - var argument = new FunctionArgument(expression); - - // Act - Assert.Throws(() => argument.Evaluate(_state)); - } - - [Fact] - public void EvaluateUnknownLinkedService() - { - // Arrange - var expression = "linkedService().linkedServiceParameter"; - var argument = new FunctionArgument(expression); - - // Act - Assert.Throws(() => argument.Evaluate(_state)); - } - - [Fact] - public void EvaluateParameterOfWrongType() - { - // Arrange - var expression = "pipeline().parameters.parameterName"; - var argument = new FunctionArgument(expression); - _state.Parameters.Add(new RunParameter(ParameterType.Pipeline, "parameterName", 1)); - - // Act - Assert.Throws(() => argument.Evaluate(_state)); - } -} \ No newline at end of file diff --git a/src/dotnet/AzureDataFactory.TestingFramework.Tests/FunctionsAndExpressions/FunctionCallTests.cs b/src/dotnet/AzureDataFactory.TestingFramework.Tests/FunctionsAndExpressions/FunctionCallTests.cs deleted file mode 100644 index 0055d6d2..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework.Tests/FunctionsAndExpressions/FunctionCallTests.cs +++ /dev/null @@ -1,249 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -using AzureDataFactory.TestingFramework.Exceptions; -using AzureDataFactory.TestingFramework.Functions; -using AzureDataFactory.TestingFramework.Models; -using AzureDataFactory.TestingFramework.Models.Base; -using AzureDataFactory.TestingFramework.Models.Pipelines; -using Xunit.Sdk; - -namespace AzureDataFactory.TestingFramework.Tests; - -public class FunctionCallTests -{ - private PipelineRunState _state; - - public FunctionCallTests() - { - _state = new PipelineRunState(); - } - - [Fact] - private void EvaluateExpressionWithNestedFunction() - { - var rawExpression = "concat('https://example.com/jobs/,', '123''', concat('&', 'abc,'))"; - var expression = FunctionPart.Parse(rawExpression); - - var evaluated = expression.Evaluate(new PipelineRunState()); - - Assert.Equal("https://example.com/jobs/,123'&abc,", evaluated); - } - - [Fact] - private void EvaluateWithParameter() - { - // Arrange - var rawExpression = "concat('https://example.com/jobs/', pipeline().parameters.abc)"; - var expression = FunctionPart.Parse(rawExpression); - _state.Parameters.Add(new RunParameter(ParameterType.Pipeline, "abc", "123")); - - // Act - var evaluated = expression.Evaluate(_state); - - // Assert - Assert.Equal("https://example.com/jobs/123", evaluated); - } - - [Fact] - private void EvaluateWithGlobalParameter() - { - // Arrange - var rawExpression = "concat('https://example.com/jobs/', pipeline().globalParameters.abc)"; - var expression = FunctionPart.Parse(rawExpression); - _state.Parameters.Add(new RunParameter(ParameterType.Global, "abc", "123")); - - // Act - var evaluated = expression.Evaluate(_state); - - // Assert - Assert.Equal("https://example.com/jobs/123", evaluated); - } - - [Fact] - private void EvaluateWithVariable() - { - // Arrange - var rawExpression = "concat('https://example.com/jobs/', variables('abc'))"; - var expression = FunctionPart.Parse(rawExpression); - _state.Variables.Add(new PipelineRunVariable("abc", "123")); - - // Act - var evaluated = expression.Evaluate(_state); - - // Assert - Assert.Equal("https://example.com/jobs/123", evaluated); - } - - [Fact] - private void EvaluateWithActivityOutput() - { - // Arrange - var rawExpression = "concat('https://example.com/jobs/', activity('abc').output.abc)"; - var expression = FunctionPart.Parse(rawExpression); - _state.AddActivityResult(new TestActivityResult("abc", new { abc = "123" })); - - // Act - var evaluated = expression.Evaluate(_state); - - // Assert - Assert.Equal("https://example.com/jobs/123", evaluated); - } - - [Fact] - private void EvaluateWithActivityOutputAndVariable() - { - // Arrange - var rawExpression = "concat('https://example.com/jobs/', activity('abc').output.abc, '/', variables('abc'))"; - var expression = FunctionPart.Parse(rawExpression); - _state.AddActivityResult(new TestActivityResult("abc", new { abc = "123" })); - _state.Variables.Add(new PipelineRunVariable("abc", "456")); - - // Act - var evaluated = expression.Evaluate(_state); - - // Assert - Assert.Equal("https://example.com/jobs/123/456", evaluated); - } - - [Fact] - private void EvaluateWithActivityOutputAndVariableAndParameters() - { - // Arrange - var rawExpression = "concat('https://example.com/jobs/', activity('abc').output.abc, '/', variables('abc'), '/', pipeline().parameters.abc, '/', pipeline().globalParameters.abc)"; - var expression = FunctionPart.Parse(rawExpression); - _state.AddActivityResult(new TestActivityResult("abc", new { abc = "123" })); - _state.Variables.Add(new PipelineRunVariable("abc", "456")); - _state.Parameters.Add(new RunParameter(ParameterType.Pipeline, "abc", "789")); - _state.Parameters.Add(new RunParameter(ParameterType.Global, "abc", "10")); - - // Act - var evaluated = expression.Evaluate(_state); - - // Assert - Assert.Equal("https://example.com/jobs/123/456/789/10", evaluated); - } - - [Theory] - [InlineData("'abc'", "'abc'", true)] - [InlineData("'abc'", "'abc1'", false)] - [InlineData("1", "1", true)] - [InlineData("1", "2", false)] - private void EvaluateEqualsExpression(string left, string right, bool expected) - { - // Arrange - var rawExpression = $"equals({left}, {right})"; - var expression = FunctionPart.Parse(rawExpression); - - // Act - var evaluated = - expression.Evaluate(new PipelineRunState()); - - Assert.Equal(expected, evaluated); - } - - [Theory] - [InlineData(1, 1, true)] - [InlineData(1, 2, false)] - [InlineData(2, 2, true)] - [InlineData(0, -1, false)] - private void EvaluateEqualsIntExpression(int left, int right, bool expected) - { - // Arrange - var rawExpression = $"equals({left}, {right})"; - var expression = FunctionPart.Parse(rawExpression); - - // Act - var evaluated = - expression.Evaluate(new PipelineRunState()); - - Assert.Equal(expected, evaluated); - } - - [Theory] - [InlineData("SomeKey", true)] - [InlineData("SomeKey2", true)] - [InlineData("SomeKey3", false)] - public void ContainsDictionaryKeyExpression(string key, bool expected) - { - // Arrange - var state = new PipelineRunState(); - state.AddActivityResult(new TestActivityResult("someActivityOutputingDictionary", new - { - SomeDictionary = new Dictionary() - { - { "SomeKey", "SomeValue" }, - { "SomeKey2", "SomeValue2" } - } - })); - - var rawExpression = $"@contains(activity('someActivityOutputingDictionary').output.SomeDictionary, '{key}')"; - var expression = FunctionPart.Parse(rawExpression); - - // Act - var evaluated = expression.Evaluate(state); - - // Assert - Assert.Equal(expected, evaluated); - } - - [Theory] - [InlineData("SomeItem", true)] - [InlineData("SomeItem2", true)] - [InlineData("SomeItem3", false)] - public void ContainsListItemExpression(string key, bool expected) - { - // Arrange - var state = new PipelineRunState(); - state.AddActivityResult(new TestActivityResult("someActivityOutputingList", new - { - SomeList = new List() - { - "SomeItem", - "SomeItem2" - } - })); - - var rawExpression = $"@contains(activity('someActivityOutputingList').output.SomeList, '{key}')"; - var expression = FunctionPart.Parse(rawExpression); - - // Act - var evaluated = expression.Evaluate(state); - - // Assert - Assert.Equal(expected, evaluated); - } - - [Theory] - [InlineData("PartOfString", true)] - [InlineData("NotPartOfString", false)] - public void ContainsStringExpression(string substring, bool expected) - { - // Arrange - var state = new PipelineRunState(); - state.AddActivityResult(new TestActivityResult("someActivityOutputingString", new - { - SomeString = "A message that contains PartOfString!" - })); - - var rawExpression = $"@contains(activity('someActivityOutputingString').output.SomeString, '{substring}')"; - var expression = FunctionPart.Parse(rawExpression); - - // Act - var evaluated = expression.Evaluate(state); - - // Assert - Assert.Equal(expected, evaluated); - } - - [Fact] - public void EqualsIncorrectParameterCountThrowsException() - { - // Arrange - var rawExpression = $"equals('1', '2', '3')"; - var expression = FunctionPart.Parse(rawExpression); - - // Act - Assert.Throws(() => expression.Evaluate(new PipelineRunState())); - } -} \ No newline at end of file diff --git a/src/dotnet/AzureDataFactory.TestingFramework.Tests/FunctionsAndExpressions/FunctionPartTests.cs b/src/dotnet/AzureDataFactory.TestingFramework.Tests/FunctionsAndExpressions/FunctionPartTests.cs deleted file mode 100644 index 70efd291..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework.Tests/FunctionsAndExpressions/FunctionPartTests.cs +++ /dev/null @@ -1,59 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -using AzureDataFactory.TestingFramework.Functions; -using AzureDataFactory.TestingFramework.Models.Pipelines; - -namespace AzureDataFactory.TestingFramework.Tests; - -public class FunctionPartTests -{ - [Fact] - public void ParseExpressionWithNestedFunctionAndSingleQuote() - { - // Arrange - var state = new PipelineRunState(); - var rawExpression = "concat('https://example.com/jobs/', '123''', concat('&', 'abc,'))"; - - // Act - var expression = FunctionPart.Parse(rawExpression); - - // Assert - var function = expression as FunctionCall; - - Assert.Equal(typeof(FunctionCall), expression.GetType()); - Assert.NotNull(function); - Assert.Equal("concat", function.Name); - Assert.Equal(3, function.Arguments.Count); - Assert.Equal("'https://example.com/jobs/'", (function.Arguments[0] as FunctionArgument)?.ExpressionValue); - Assert.Equal("'123''", (function.Arguments[1] as FunctionArgument)?.ExpressionValue); - - var innerFunction = function.Arguments[2] as FunctionCall; - Assert.NotNull(innerFunction); - Assert.Equal("concat", innerFunction.Name); - Assert.Equal(2, innerFunction.Arguments.Count); - Assert.Equal("'&'", (innerFunction.Arguments[0] as FunctionArgument)?.ExpressionValue); - Assert.Equal("'abc,'", (innerFunction.Arguments[1] as FunctionArgument)?.ExpressionValue); - } - - [Fact] - public void ParseExpressionWithAdfNativeFunctions() - { - // Arrange - var state = new PipelineRunState(); - var rawExpression = "concat('https://example.com/jobs/', '123''', variables('abc'), pipeline().parameters.abc, activity('abc').output.abc)"; - - // Act - var expression = FunctionPart.Parse(rawExpression); - - // Assert - var function = expression as FunctionCall; - Assert.Equal("concat", function.Name); - Assert.Equal(5, function.Arguments.Count); - Assert.Equal("'https://example.com/jobs/'", (function.Arguments[0] as FunctionArgument).ExpressionValue); - Assert.Equal("'123''", (function.Arguments[1] as FunctionArgument).ExpressionValue); - Assert.Equal("variables('abc')", (function.Arguments[2] as FunctionArgument).ExpressionValue); - Assert.Equal("pipeline().parameters.abc", (function.Arguments[3] as FunctionArgument).ExpressionValue); - Assert.Equal("activity('abc').output.abc", (function.Arguments[4] as FunctionArgument).ExpressionValue); - } -} \ No newline at end of file diff --git a/src/dotnet/AzureDataFactory.TestingFramework.Tests/FunctionsAndExpressions/FunctionsRepositoryTest.cs b/src/dotnet/AzureDataFactory.TestingFramework.Tests/FunctionsAndExpressions/FunctionsRepositoryTest.cs deleted file mode 100644 index 7d9a8025..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework.Tests/FunctionsAndExpressions/FunctionsRepositoryTest.cs +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -using AzureDataFactory.TestingFramework.Functions; -using AzureDataFactory.TestingFramework.Models.Pipelines; - -namespace AzureDataFactory.TestingFramework.Tests; - -public class FunctionsRepositoryTest -{ - [Fact] - public void RegisterMultiplicationFunctionTest() - { - // Arrange - FunctionsRepository.Register("multiply", (int arg0, int arg1) => arg0 * arg1); - var expression = "multiply(7, 6)"; - var functionPart = FunctionPart.Parse(expression); - - // Act - var evaluated = functionPart.Evaluate(new PipelineRunState()); - - // Assert - Assert.Equal(42, evaluated); - } -} \ No newline at end of file diff --git a/src/dotnet/AzureDataFactory.TestingFramework.Tests/Models/Activities/Base/PipelineActivityTests.cs b/src/dotnet/AzureDataFactory.TestingFramework.Tests/Models/Activities/Base/PipelineActivityTests.cs deleted file mode 100644 index 6ecb86ff..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework.Tests/Models/Activities/Base/PipelineActivityTests.cs +++ /dev/null @@ -1,49 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -using AzureDataFactory.TestingFramework.Models; -using AzureDataFactory.TestingFramework.Models.Pipelines; - -namespace AzureDataFactory.TestingFramework.Tests.Models.Activities.Base; - -public class PipelineActivityTests -{ - [Theory] - [InlineData("Succeeded", "Succeeded", true)] - [InlineData("Failed", "Succeeded", false)] - [InlineData("Skipped", "Succeeded", false)] - [InlineData("Completed", "Succeeded", false)] - [InlineData("Failed", "Failed", true)] - [InlineData("Skipped", "Failed", false)] - [InlineData("Completed", "Failed", false)] - [InlineData("Skipped", "Skipped", true)] - [InlineData("Completed", "Skipped", false)] - [InlineData("Completed", "Completed", true)] - public void DependencyConditions_WhenCalled_ReturnsExpected(string requiredCondition, string actualCondition, bool expected) - { - // Arrange - var pipelineActivity = new PipelineActivity("activity") - { - DependsOn = { new PipelineActivityDependency("otherActivity", new[] { new DependencyCondition(requiredCondition) }) } - }; - var state = new PipelineRunState(); - state.AddActivityResult(new TestActivityResult("otherActivity", new DependencyCondition(actualCondition))); - - // Assert - Assert.Equal(expected, pipelineActivity.AreDependencyConditionMet(state)); - } - - [Fact] - public void EvaluateWhenNoStatusIsSet_ShouldSetStatusToSucceeded() - { - // Arrange - var pipelineActivity = new PipelineActivity("activity"); - var state = new PipelineRunState(); - - // Act - pipelineActivity.Evaluate(state); - - // Assert - Assert.Equal(DependencyCondition.Succeeded, pipelineActivity.Status); - } -} \ No newline at end of file diff --git a/src/dotnet/AzureDataFactory.TestingFramework.Tests/Models/Activities/ControlActivities/ForEachActivityTests.cs b/src/dotnet/AzureDataFactory.TestingFramework.Tests/Models/Activities/ControlActivities/ForEachActivityTests.cs deleted file mode 100644 index a48561fc..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework.Tests/Models/Activities/ControlActivities/ForEachActivityTests.cs +++ /dev/null @@ -1,50 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -using Azure.Core.Expressions.DataFactory; -using AzureDataFactory.TestingFramework.Models; -using AzureDataFactory.TestingFramework.Models.Pipelines; - -namespace AzureDataFactory.TestingFramework.Tests.Models.Activities.ControlActivities; - -public class ForEachActivityTests -{ - [Fact] - public void WhenEvaluateChildActivities_ThenShouldReturnTheActivityWithItemExpressionEvaluated() - { - // Arrange - var testFramework = new TestFramework(); - var forEachActivity = new ForEachActivity("ForEachActivity", - new DataFactoryExpression(DataFactoryExpressionType.Expression, "@split('a,b,c', ',')"), - new List() - { - new SetVariableActivity("setVariable") - { - VariableName = "variable", - Value = new DataFactoryElement("item()", DataFactoryElementKind.Expression) - } - }); - var state = new PipelineRunState(); - state.Variables.Add(new PipelineRunVariable("variable", string.Empty)); - - // Act - forEachActivity.Evaluate(state); - var childActivities = testFramework.Evaluate(forEachActivity, state); - - // Assert - using var enumarator = childActivities.GetEnumerator(); - Assert.True(enumarator.MoveNext()); - var setVariableActivity = enumarator.Current as SetVariableActivity; - Assert.NotNull(setVariableActivity); - Assert.Equal("a", setVariableActivity.Value); - Assert.True(enumarator.MoveNext()); - setVariableActivity = enumarator.Current as SetVariableActivity; - Assert.NotNull(setVariableActivity); - Assert.Equal("b", setVariableActivity.Value); - Assert.True(enumarator.MoveNext()); - setVariableActivity = enumarator.Current as SetVariableActivity; - Assert.NotNull(setVariableActivity); - Assert.Equal("c", setVariableActivity.Value); - Assert.False(enumarator.MoveNext()); - } -} \ No newline at end of file diff --git a/src/dotnet/AzureDataFactory.TestingFramework.Tests/Models/Activities/ControlActivities/IfConditionActivityTests.cs b/src/dotnet/AzureDataFactory.TestingFramework.Tests/Models/Activities/ControlActivities/IfConditionActivityTests.cs deleted file mode 100644 index 5096c499..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework.Tests/Models/Activities/ControlActivities/IfConditionActivityTests.cs +++ /dev/null @@ -1,51 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -using Azure.Core.Expressions.DataFactory; -using AzureDataFactory.TestingFramework.Models; -using AzureDataFactory.TestingFramework.Models.Pipelines; - -namespace AzureDataFactory.TestingFramework.Tests.Models.Activities.ControlActivities; - -public class IfConditionActivityTests -{ - [Fact] - public void WhenEvaluated_ShouldEvaluateExpression() - { - // Arrange - var activity = new IfConditionActivity("IfConditionActivity", - new DataFactoryExpression(DataFactoryExpressionType.Expression, "@equals(1, 1)")); - - // Act - activity.Evaluate(new PipelineRunState()); - - // Assert - Assert.True(activity.EvaluatedExpression); - } - - [Theory] - [InlineData(true, "setVariableActivity1")] - [InlineData(false, "setVariableActivity2")] - public void WhenEvaluated_ShouldEvaluateCorrectChildActivities(bool expressionOutcome, string expectedActivityName) - { - // Arrange - var testFramework = new TestFramework(); - var expression = expressionOutcome ? "@equals(1, 1)" : "@equals(1, 2)"; - var activity = new IfConditionActivity("IfConditionActivity", - new DataFactoryExpression(DataFactoryExpressionType.Expression, expression)) - { - IfTrueActivities = { new SetVariableActivity("setVariableActivity1") { VariableName = "variable", Value = "dummy" } }, - IfFalseActivities = { new SetVariableActivity("setVariableActivity2") { VariableName = "variable", Value = "dummy" } } - }; - var state = new PipelineRunState(); - state.Variables.Add(new PipelineRunVariable("variable", string.Empty)); - activity.Evaluate(state); - - // Act - var childActivities = testFramework.Evaluate(activity, state).ToList(); - - // Assert - Assert.Single(childActivities); - Assert.Equal(expectedActivityName, childActivities.First().Name); - } -} \ No newline at end of file diff --git a/src/dotnet/AzureDataFactory.TestingFramework.Tests/Models/Activities/SetVariableTests.cs b/src/dotnet/AzureDataFactory.TestingFramework.Tests/Models/Activities/SetVariableTests.cs deleted file mode 100644 index 49bdb9d9..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework.Tests/Models/Activities/SetVariableTests.cs +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -using AzureDataFactory.TestingFramework.Models; -using AzureDataFactory.TestingFramework.Models.Pipelines; - -namespace AzureDataFactory.TestingFramework.Tests.Models.Activities; - -public class SetVariableTests -{ - [Fact] - public void WhenStringVariableEvaluated_ThenStateVariableShouldBeSet() - { - // Arrange - var variableName = "TestVariable"; - var variable = new PipelineRunVariable(variableName, string.Empty); - var setVariable = new SetVariableActivity("TestSetVariable") - { - VariableName = variableName, - Value = "value1" - }; - var state = new PipelineRunState(); - state.Variables.Add(variable); - - // Act - setVariable.Evaluate(state); - - // Assert - Assert.Equal("value1", variable.Value); - } -} \ No newline at end of file diff --git a/src/dotnet/AzureDataFactory.TestingFramework.Tests/Models/DataFactoryEntityTests.cs b/src/dotnet/AzureDataFactory.TestingFramework.Tests/Models/DataFactoryEntityTests.cs deleted file mode 100644 index a27a4b9b..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework.Tests/Models/DataFactoryEntityTests.cs +++ /dev/null @@ -1,38 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -using AzureDataFactory.TestingFramework.Models; -using Azure.Core.Expressions.DataFactory; -using AzureDataFactory.TestingFramework.Models.Pipelines; - -namespace AzureDataFactory.TestingFramework.Tests.Models; - -public class DataFactoryEntityTests -{ - [Fact] - public void WhenEvaluatingEntity_ShouldEvaluateAllProperties() - { - // Arrange - var entity = new WebActivity("TestActivity", WebActivityMethod.Get, new DataFactoryElement("@concat('https://example.com', '/123')", DataFactoryElementKind.Expression)); - - // Act - entity.Evaluate(new PipelineRunState()); - - // Assert - Assert.NotNull(entity); - Assert.Equal("https://example.com/123", entity.Uri); - } - - [Fact] - public void WhenNotEvaluatingEntity_ShouldNotEvaluateAllProperties() - { - // Arrange - var entity = new WebActivity("TestActivity", WebActivityMethod.Get, new DataFactoryElement("@concat('https://example.com', '/123')", DataFactoryElementKind.Expression)); - - // Act - - // Assert - Assert.NotNull(entity); - Assert.Throws(() => entity.Uri.Value); - } -} \ No newline at end of file diff --git a/src/dotnet/AzureDataFactory.TestingFramework.Tests/Models/Pipelines/PipelineRunStateTests.cs b/src/dotnet/AzureDataFactory.TestingFramework.Tests/Models/Pipelines/PipelineRunStateTests.cs deleted file mode 100644 index 195f36ee..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework.Tests/Models/Pipelines/PipelineRunStateTests.cs +++ /dev/null @@ -1,111 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -using AzureDataFactory.TestingFramework.Models; -using AzureDataFactory.TestingFramework.Models.Base; -using AzureDataFactory.TestingFramework.Models.Pipelines; - -namespace AzureDataFactory.TestingFramework.Tests.Models.Pipelines; - -public class PipelineRunStateTests -{ - [Fact] - public void WhenPipelineRunStateIsInitialized_ShouldBeInitializedCorrectly() - { - // Act - var state = new PipelineRunState( - new List() - { - new RunParameter(ParameterType.Dataset, "datasetKey", "datasetValue"), - new RunParameter(ParameterType.LinkedService, "linkedServiceKey", "linkedServiceValue"), - new RunParameter(ParameterType.Pipeline, "parameterKey", "parameterValue"), - new RunParameter(ParameterType.Global, "globalParameterKey", "globalParameterValue") - }, - new Dictionary() - { - { "stringVariableKey", new PipelineVariableSpecification(PipelineVariableType.String) }, - { "boolVariableKey", new PipelineVariableSpecification(PipelineVariableType.Bool) } - }); - - // Assert - Assert.NotNull(state); - Assert.NotNull(state.Parameters); - Assert.Equal(4, state.Parameters.Count); - var datasetParameter = state.Parameters.Single(p => p.Name == "datasetKey"); - Assert.Equal(ParameterType.Dataset, datasetParameter.Type); - - var linkedServiceParameter = state.Parameters.Single(p => p.Name == "linkedServiceKey"); - Assert.Equal(ParameterType.LinkedService, linkedServiceParameter.Type); - - var parameterParameter = state.Parameters.Single(p => p.Name == "parameterKey"); - Assert.Equal(ParameterType.Pipeline, parameterParameter.Type); - - var globalParameterParameter = state.Parameters.Single(p => p.Name == "globalParameterKey"); - Assert.Equal(ParameterType.Global, globalParameterParameter.Type); - - Assert.NotNull(state.Variables); - Assert.Equal(2, state.Variables.Count); - var stringVariable = state.Variables.OfType>().Single(v => v.Name == "stringVariableKey"); - Assert.Null(stringVariable.Value); - - var boolVariable = state.Variables.OfType>().Single(v => v.Name == "boolVariableKey"); - Assert.False(boolVariable.Value); - - Assert.Empty(state.PipelineActivityResults); - Assert.Empty(state.ScopedPipelineActivityResults); - Assert.Null(state.IterationItem); - } - - [Fact] - public void WhenActivityResultAreAdded_ShouldBeAddedCorrectly() - { - // Arrange - var state = new PipelineRunState(); - var activityResult = new TestActivityResult("activityName", DependencyCondition.Succeeded); - - // Act - state.AddActivityResult(activityResult); - - // Assert - Assert.Single(state.PipelineActivityResults); - Assert.Equal(activityResult, state.PipelineActivityResults.Single()); - Assert.Single(state.ScopedPipelineActivityResults); - Assert.Equal(activityResult, state.ScopedPipelineActivityResults.Single()); - } - - [Fact] - public void WhenAddScopedActivityResultsFromScopedState_ShouldRegisterScopedResults() - { - // Arrange - var scopedState = new PipelineRunState(); - scopedState.AddActivityResult(new TestActivityResult("activityName", DependencyCondition.Succeeded)); - var state = new PipelineRunState(); - - // Act - state.AddScopedActivityResultsFromScopedState(scopedState); - - // Assert - Assert.Single(state.PipelineActivityResults); - Assert.Equal(scopedState.ScopedPipelineActivityResults.Single(), state.PipelineActivityResults.Single()); - } - - [Fact] - public void WhenIterationScopedIsCreated_ShouldReturnNewScopeWithIterationItem() - { - // Arrange - var state = new PipelineRunState(); - state.AddActivityResult(new TestActivityResult("activityName", DependencyCondition.Succeeded)); - state.Parameters.Add(new RunParameter(ParameterType.Pipeline, "parameterKey", "parameterValue")); - state.Variables.Add(new PipelineRunVariable("variableKey", "variableValue")); - - // Act - var scopedState = state.CreateIterationScope("iterationItem"); - - // Assert - Assert.Equal("iterationItem", scopedState.IterationItem); - Assert.Equal(state.Parameters, scopedState.Parameters); - Assert.Equal(state.Variables, scopedState.Variables); - Assert.Equal(state.PipelineActivityResults, scopedState.PipelineActivityResults); - Assert.Empty(scopedState.ScopedPipelineActivityResults); - } -} \ No newline at end of file diff --git a/src/dotnet/AzureDataFactory.TestingFramework.Tests/Models/Pipelines/PipelineTests.cs b/src/dotnet/AzureDataFactory.TestingFramework.Tests/Models/Pipelines/PipelineTests.cs deleted file mode 100644 index 2fc3588f..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework.Tests/Models/Pipelines/PipelineTests.cs +++ /dev/null @@ -1,44 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -using Azure.ResourceManager.DataFactory; -using AzureDataFactory.TestingFramework.Exceptions; -using AzureDataFactory.TestingFramework.Models; -using AzureDataFactory.TestingFramework.Models.Base; - -namespace AzureDataFactory.TestingFramework.Tests.Models.Pipelines; - -public class PipelineTests -{ - [Fact] - public void WhenEvaluatingPipelineWithMissingParameters_ShouldThrowException() - { - // Arrange - var testFramework = new TestFramework(); - var pipeline = new Pipeline(); - pipeline.Parameters.Add("key1", new EntityParameterSpecification(EntityParameterType.String)); - pipeline.Parameters.Add("key2", new EntityParameterSpecification(EntityParameterType.String)); - - // Assert - Assert.Throws(() => testFramework.Evaluate(pipeline, new List()).ToList()); - } - - [Fact] - public void WhenEvaluatingPipeline_ShouldReturnActivities() - { - // Arrange - var testFramework = new TestFramework(); - var pipeline = new Pipeline(); - pipeline.Parameters.Add("key1", new EntityParameterSpecification(EntityParameterType.String)); - - // Act - var activities = testFramework.EvaluateAll(pipeline, new List() - { - new RunParameter(ParameterType.Pipeline, "key1", "value1") - }); - - // Assert - Assert.NotNull(activities); - Assert.Empty(activities); - } -} \ No newline at end of file diff --git a/src/dotnet/AzureDataFactory.TestingFramework.Tests/Models/TestFrameworkTests.cs b/src/dotnet/AzureDataFactory.TestingFramework.Tests/Models/TestFrameworkTests.cs deleted file mode 100644 index 00399e79..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework.Tests/Models/TestFrameworkTests.cs +++ /dev/null @@ -1,121 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -using Azure.Core.Expressions.DataFactory; -using AzureDataFactory.TestingFramework.Exceptions; -using AzureDataFactory.TestingFramework.Functions; -using AzureDataFactory.TestingFramework.Models; -using AzureDataFactory.TestingFramework.Models.Activities.Base; -using AzureDataFactory.TestingFramework.Models.Pipelines; - -namespace AzureDataFactory.TestingFramework.Tests.Models.Activities.Base; - -public class TestFrameworkTests -{ - private readonly List _activities; - private readonly WebActivity _webActivity; - private readonly SetVariableActivity _setVariableActivity; - private readonly TestFramework _testFramework; - - public TestFrameworkTests() - { - _testFramework = new TestFramework(); - _activities = new List(); - _webActivity = new WebActivity("webActivity", WebActivityMethod.Get, "https://www.example.com") - { - DependsOn = - { - new PipelineActivityDependency("setVariableActivity", new[] { DependencyCondition.Succeeded }) - } - }; - _setVariableActivity = new SetVariableActivity("setVariableActivity") - { - VariableName = "variable1", - Value = "value1" - }; - _activities.Add(_webActivity); - _activities.Add(_setVariableActivity); - } - - [Fact] - public void EvaluateWithoutIterationActivities_ShouldEvaluateAccordingToDependencies() - { - // Act - var state = new PipelineRunState(); - state.Variables.Add(new PipelineRunVariable("variable1", string.Empty)); - var evaluatedActivities = _testFramework.Evaluate(_activities, state).ToList(); - - // Assert - Assert.NotNull(evaluatedActivities); - Assert.Equal(2, evaluatedActivities.Count()); - Assert.Equal("setVariableActivity", evaluatedActivities.First().Name); - Assert.Equal("webActivity", evaluatedActivities.Last().Name); - } - - [Fact] - public void EvaluateWithCircularDependencies_ShouldThrowActivitiesEvaluatorInvalidDependencyException() - { - // Arrange - _setVariableActivity.DependsOn.Add(new PipelineActivityDependency("webActivity", new[] { DependencyCondition.Succeeded })); - - // Assert - Assert.Throws(() => _testFramework.Evaluate(_activities, new PipelineRunState()).ToList()); - } - - [Fact] - public void EvaluateWithForeachActivities_ShouldEvaluateAccordingToDependencies() - { - // Arrange - var state = new PipelineRunState(); - state.Variables.Add(new PipelineRunVariable("variable1", string.Empty)); - state.Variables.Add(new PipelineRunVariable("iterationItems", "item1,item2,item3")); - var foreachActivity = new ForEachActivity("foreachActivity", - new DataFactoryExpression(DataFactoryExpressionType.Expression, "@split(variables('iterationItems'), ',')"), - _activities); - _webActivity.Uri = new DataFactoryElement("@concat('https://www.example.com/', item())", DataFactoryElementKind.Expression); - - // Act - var evaluatedActivities = _testFramework.Evaluate(new List { foreachActivity }, state); - - // Assert - using var enumerator = evaluatedActivities.GetEnumerator(); - Assert.True(enumerator.MoveNext()); - Assert.Equal("setVariableActivity", enumerator.Current.Name); - Assert.True(enumerator.MoveNext()); - Assert.Equal("webActivity", enumerator.Current.Name); - Assert.Equal("https://www.example.com/item1", ((WebActivity)enumerator.Current).Uri); - Assert.True(enumerator.MoveNext()); - Assert.Equal("setVariableActivity", enumerator.Current.Name); - Assert.True(enumerator.MoveNext()); - Assert.Equal("webActivity", enumerator.Current.Name); - Assert.Equal("https://www.example.com/item2", ((WebActivity)enumerator.Current).Uri); - Assert.True(enumerator.MoveNext()); - Assert.Equal("setVariableActivity", enumerator.Current.Name); - Assert.True(enumerator.MoveNext()); - Assert.Equal("webActivity", enumerator.Current.Name); - Assert.Equal("https://www.example.com/item3", ((WebActivity)enumerator.Current).Uri); - Assert.False(enumerator.MoveNext()); - } - - [Fact] - public void EvaluateWithUntilActivities_ShouldEvaluateAccordingToDependencies() - { - // Arrange - var state = new PipelineRunState(); - state.Variables.Add(new PipelineRunVariable("variable1", string.Empty)); - var untilActivity = new UntilActivity("untilActivity", - new DataFactoryExpression(DataFactoryExpressionType.Expression, "@equals(variables('variable1'), 'value1')"), - _activities); - - // Act - var evaluatedActivities = _testFramework.Evaluate(new List { untilActivity }, state); - - // Assert - using var enumerator = evaluatedActivities.GetEnumerator(); - Assert.True(enumerator.MoveNext()); - Assert.Equal("setVariableActivity", enumerator.Current.Name); - Assert.True(enumerator.MoveNext()); - Assert.Equal("webActivity", enumerator.Current.Name); - Assert.False(enumerator.MoveNext()); - } -} \ No newline at end of file diff --git a/src/dotnet/AzureDataFactory.TestingFramework.Tests/Usings.cs b/src/dotnet/AzureDataFactory.TestingFramework.Tests/Usings.cs deleted file mode 100644 index 20580725..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework.Tests/Usings.cs +++ /dev/null @@ -1,4 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -global using Xunit; \ No newline at end of file diff --git a/src/dotnet/AzureDataFactory.TestingFramework.sln b/src/dotnet/AzureDataFactory.TestingFramework.sln deleted file mode 100644 index a23d896c..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework.sln +++ /dev/null @@ -1,39 +0,0 @@ - -Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio Version 17 -VisualStudioVersion = 17.7.34031.279 -MinimumVisualStudioVersion = 10.0.40219.1 -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "AzureDataFactory.TestingFramework", "AzureDataFactory.TestingFramework\AzureDataFactory.TestingFramework.csproj", "{F5C4C98C-B717-4ED8-95EA-5DD51CB87C92}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "AzureDataFactory.TestingFramework.Tests", "AzureDataFactory.TestingFramework.Tests\AzureDataFactory.TestingFramework.Tests.csproj", "{76089DF4-314B-4556-9ED7-D2B2F3BBA87A}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "AzureDataFactory.TestingFramework.Example", "AzureDataFactory.TestingFramework.Example\AzureDataFactory.TestingFramework.Example.csproj", "{F044EB13-DF36-43FB-90E8-9ADDE0E03821}" -EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{2EC1EFEA-98DC-47FC-9EAD-69541C65ACA1}" - ProjectSection(SolutionItems) = preProject - ..\README.md = ..\README.md - EndProjectSection -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|Any CPU = Debug|Any CPU - Release|Any CPU = Release|Any CPU - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {F5C4C98C-B717-4ED8-95EA-5DD51CB87C92}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {F5C4C98C-B717-4ED8-95EA-5DD51CB87C92}.Debug|Any CPU.Build.0 = Debug|Any CPU - {F5C4C98C-B717-4ED8-95EA-5DD51CB87C92}.Release|Any CPU.ActiveCfg = Release|Any CPU - {F5C4C98C-B717-4ED8-95EA-5DD51CB87C92}.Release|Any CPU.Build.0 = Release|Any CPU - {76089DF4-314B-4556-9ED7-D2B2F3BBA87A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {76089DF4-314B-4556-9ED7-D2B2F3BBA87A}.Debug|Any CPU.Build.0 = Debug|Any CPU - {76089DF4-314B-4556-9ED7-D2B2F3BBA87A}.Release|Any CPU.ActiveCfg = Release|Any CPU - {76089DF4-314B-4556-9ED7-D2B2F3BBA87A}.Release|Any CPU.Build.0 = Release|Any CPU - {F044EB13-DF36-43FB-90E8-9ADDE0E03821}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {F044EB13-DF36-43FB-90E8-9ADDE0E03821}.Debug|Any CPU.Build.0 = Debug|Any CPU - {F044EB13-DF36-43FB-90E8-9ADDE0E03821}.Release|Any CPU.ActiveCfg = Release|Any CPU - {F044EB13-DF36-43FB-90E8-9ADDE0E03821}.Release|Any CPU.Build.0 = Release|Any CPU - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection -EndGlobal diff --git a/src/dotnet/AzureDataFactory.TestingFramework/AzureDataFactory.TestingFramework.csproj b/src/dotnet/AzureDataFactory.TestingFramework/AzureDataFactory.TestingFramework.csproj deleted file mode 100644 index 03f551f7..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/AzureDataFactory.TestingFramework.csproj +++ /dev/null @@ -1,28 +0,0 @@ - - - net7.0 - enable - enable - annotations - true - - - - - - - - - - - <_Parameter1>AzureDataFactory.TestingFramework.Tests - - - - - AzureDataFactory.TestingFramework - 0.1.7-alpha - arjendev - true - - diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Exceptions/ActivitiesEvaluatorInvalidDependencyException.cs b/src/dotnet/AzureDataFactory.TestingFramework/Exceptions/ActivitiesEvaluatorInvalidDependencyException.cs deleted file mode 100644 index 8f8287e0..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Exceptions/ActivitiesEvaluatorInvalidDependencyException.cs +++ /dev/null @@ -1,12 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -namespace AzureDataFactory.TestingFramework.Exceptions; - -public class ActivitiesEvaluatorInvalidDependencyException : Exception -{ - public ActivitiesEvaluatorInvalidDependencyException(string message) : base(message) - { - - } -} \ No newline at end of file diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Exceptions/ActivityEnumeratorException.cs b/src/dotnet/AzureDataFactory.TestingFramework/Exceptions/ActivityEnumeratorException.cs deleted file mode 100644 index b536f0e0..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Exceptions/ActivityEnumeratorException.cs +++ /dev/null @@ -1,11 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -namespace AzureDataFactory.TestingFramework.Exceptions; - -public class ActivityEnumeratorException : Exception -{ - public ActivityEnumeratorException(string message) : base(message) - { - } -} \ No newline at end of file diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Exceptions/ActivityEnumeratorTypeMismatchException.cs b/src/dotnet/AzureDataFactory.TestingFramework/Exceptions/ActivityEnumeratorTypeMismatchException.cs deleted file mode 100644 index beb2640a..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Exceptions/ActivityEnumeratorTypeMismatchException.cs +++ /dev/null @@ -1,11 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -namespace AzureDataFactory.TestingFramework.Exceptions; - -public class ActivityEnumeratorTypeMismatchException : Exception -{ - public ActivityEnumeratorTypeMismatchException(string message) : base(message) - { - } -} \ No newline at end of file diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Exceptions/ActivityNotEvaluatedException.cs b/src/dotnet/AzureDataFactory.TestingFramework/Exceptions/ActivityNotEvaluatedException.cs deleted file mode 100644 index 38de95b1..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Exceptions/ActivityNotEvaluatedException.cs +++ /dev/null @@ -1,11 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -namespace AzureDataFactory.TestingFramework.Exceptions; - -public class ActivityNotEvaluatedException : Exception -{ - public ActivityNotEvaluatedException(string activityName) : base($"Activity {activityName} was not evaluated.") - { - } -} \ No newline at end of file diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Exceptions/ActivityNotFoundException.cs b/src/dotnet/AzureDataFactory.TestingFramework/Exceptions/ActivityNotFoundException.cs deleted file mode 100644 index 89c08a49..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Exceptions/ActivityNotFoundException.cs +++ /dev/null @@ -1,11 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -namespace AzureDataFactory.TestingFramework.Models.Pipelines; - -public class ActivityNotFoundException : Exception -{ - public ActivityNotFoundException(string activityName) : base($"Activity with name {activityName} was not found in the pipeline") - { - } -} \ No newline at end of file diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Exceptions/ActivityOutputFieldNotFoundException.cs b/src/dotnet/AzureDataFactory.TestingFramework/Exceptions/ActivityOutputFieldNotFoundException.cs deleted file mode 100644 index 077f3edd..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Exceptions/ActivityOutputFieldNotFoundException.cs +++ /dev/null @@ -1,11 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -namespace AzureDataFactory.TestingFramework.Exceptions; - -public class ActivityOutputFieldNotFoundException : Exception -{ - public ActivityOutputFieldNotFoundException(string activityName, string field) : base($"The field {field} was not found on the activity: {activityName}. Set the activity results to include the field.") - { - } -} \ No newline at end of file diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Exceptions/ContentNotEvaluatedException.cs b/src/dotnet/AzureDataFactory.TestingFramework/Exceptions/ContentNotEvaluatedException.cs deleted file mode 100644 index b5fddb95..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Exceptions/ContentNotEvaluatedException.cs +++ /dev/null @@ -1,8 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -namespace AzureDataFactory.TestingFramework.Exceptions; - -public class ContentNotEvaluatedException : Exception -{ -} \ No newline at end of file diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Exceptions/ExpectedActivityTypePropertyNotFound.cs b/src/dotnet/AzureDataFactory.TestingFramework/Exceptions/ExpectedActivityTypePropertyNotFound.cs deleted file mode 100644 index b946dfa8..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Exceptions/ExpectedActivityTypePropertyNotFound.cs +++ /dev/null @@ -1,11 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -namespace AzureDataFactory.TestingFramework.Exceptions; - -public class ExpectedActivityTypePropertyNotFound : Exception -{ - public ExpectedActivityTypePropertyNotFound(string activityType, string propertyName) : base($"Activity type '{activityType}' does not have a typed property named '{propertyName}'") - { - } -} \ No newline at end of file diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Exceptions/ExpressionEvaluatedToNullException.cs b/src/dotnet/AzureDataFactory.TestingFramework/Exceptions/ExpressionEvaluatedToNullException.cs deleted file mode 100644 index e35a1304..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Exceptions/ExpressionEvaluatedToNullException.cs +++ /dev/null @@ -1,11 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -namespace AzureDataFactory.TestingFramework.Exceptions; - -public class ExpressionEvaluatedToNullException : Exception -{ - public ExpressionEvaluatedToNullException(string message) : base(message) - { } - -} \ No newline at end of file diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Exceptions/ExpressionEvaluatedToWrongTypeException.cs b/src/dotnet/AzureDataFactory.TestingFramework/Exceptions/ExpressionEvaluatedToWrongTypeException.cs deleted file mode 100644 index 3baf5304..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Exceptions/ExpressionEvaluatedToWrongTypeException.cs +++ /dev/null @@ -1,11 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -namespace AzureDataFactory.TestingFramework.Exceptions; - -public class ExpressionEvaluatedToWrongTypeException : Exception -{ - public ExpressionEvaluatedToWrongTypeException(Type type, Type getType) : base($"Expression evaluated to wrong type. Expected: {type.Name}, Actual: {getType.Name}") - { - } -} \ No newline at end of file diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Exceptions/ExpressionParameterNotFoundException.cs b/src/dotnet/AzureDataFactory.TestingFramework/Exceptions/ExpressionParameterNotFoundException.cs deleted file mode 100644 index 492e06ce..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Exceptions/ExpressionParameterNotFoundException.cs +++ /dev/null @@ -1,16 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -using AzureDataFactory.TestingFramework.Models.Base; - -namespace AzureDataFactory.TestingFramework.Exceptions; - -public class ExpressionParameterNotFoundException : Exception -{ - public ExpressionParameterNotFoundException(string parameterName) : base($"parameter with name: '{parameterName}' not found") - { - } - public ExpressionParameterNotFoundException(string parameterName, ParameterType type) : base($"{type} parameter with name: '{parameterName}' not found") - { - } -} \ No newline at end of file diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Exceptions/ExpressionParameterOrVariableTypeMismatchException.cs b/src/dotnet/AzureDataFactory.TestingFramework/Exceptions/ExpressionParameterOrVariableTypeMismatchException.cs deleted file mode 100644 index ae774a08..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Exceptions/ExpressionParameterOrVariableTypeMismatchException.cs +++ /dev/null @@ -1,16 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -using AzureDataFactory.TestingFramework.Models.Base; - -namespace AzureDataFactory.TestingFramework.Expressions; - -public class ExpressionParameterOrVariableTypeMismatchException : Exception -{ - public ExpressionParameterOrVariableTypeMismatchException(string parameterName, Type type) : base($"Parameter {parameterName} is not of expectedtype {type.Name}") - { - } - public ExpressionParameterOrVariableTypeMismatchException(string parameterName, ParameterType parameterType, Type type) : base($"{parameterType} parameter {parameterName} is not of expectedtype {type.Name}") - { - } -} \ No newline at end of file diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Exceptions/FunctionCallInvalidArgumentsCountException.cs b/src/dotnet/AzureDataFactory.TestingFramework/Exceptions/FunctionCallInvalidArgumentsCountException.cs deleted file mode 100644 index 7a73a9af..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Exceptions/FunctionCallInvalidArgumentsCountException.cs +++ /dev/null @@ -1,17 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -using System.Reflection; -using AzureDataFactory.TestingFramework.Functions; - -namespace AzureDataFactory.TestingFramework.Exceptions; - -public class FunctionCallInvalidArgumentsCountException : Exception -{ - public FunctionCallInvalidArgumentsCountException(string name, List evaluatedArguments, ParameterInfo[] parameters) : base($"FunctionCall {name} has invalid arguments count. Evaluated arguments: \"{string.Join("\", \"", evaluatedArguments)}\". Expected argument types: {string.Join(", ", parameters.Select(p => p.ParameterType))}") - { - } - public FunctionCallInvalidArgumentsCountException(string name, List arguments, ParameterInfo[] parameters) : base($"FunctionCall {name} has invalid arguments count. Evaluated arguments: \"{string.Join("\", \"", arguments)}\". Expected argument types: {string.Join(", ", parameters.Select(p => p.ParameterType))}") - { - } -} \ No newline at end of file diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Exceptions/LinkedServiceParameterNotFoundException.cs b/src/dotnet/AzureDataFactory.TestingFramework/Exceptions/LinkedServiceParameterNotFoundException.cs deleted file mode 100644 index c8559980..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Exceptions/LinkedServiceParameterNotFoundException.cs +++ /dev/null @@ -1,12 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -namespace AzureDataFactory.TestingFramework.Exceptions; - -internal class LinkedServiceParameterNotFoundException : Exception -{ - public LinkedServiceParameterNotFoundException(string parameterExpressionParameterName) : base( - $"Parameter with name {parameterExpressionParameterName} was not found.") - { - } -} \ No newline at end of file diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Exceptions/ParameterNotFoundException.cs b/src/dotnet/AzureDataFactory.TestingFramework/Exceptions/ParameterNotFoundException.cs deleted file mode 100644 index b21b33bd..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Exceptions/ParameterNotFoundException.cs +++ /dev/null @@ -1,12 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -namespace AzureDataFactory.TestingFramework.Exceptions; - -internal class ParameterNotFoundException : Exception -{ - public ParameterNotFoundException(string parameterExpressionParameterName) : base( - $"Parameter with name {parameterExpressionParameterName} was not found.") - { - } -} \ No newline at end of file diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Exceptions/PipelineDuplicateParameterProvidedException.cs b/src/dotnet/AzureDataFactory.TestingFramework/Exceptions/PipelineDuplicateParameterProvidedException.cs deleted file mode 100644 index 0aa10b77..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Exceptions/PipelineDuplicateParameterProvidedException.cs +++ /dev/null @@ -1,11 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -namespace AzureDataFactory.TestingFramework.Exceptions; - -public class PipelineDuplicateParameterProvidedException : Exception -{ - public PipelineDuplicateParameterProvidedException(string message) : base(message) - { - } -} \ No newline at end of file diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Exceptions/PipelineNotFoundException.cs b/src/dotnet/AzureDataFactory.TestingFramework/Exceptions/PipelineNotFoundException.cs deleted file mode 100644 index 5a408690..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Exceptions/PipelineNotFoundException.cs +++ /dev/null @@ -1,11 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -namespace AzureDataFactory.TestingFramework.Exceptions; - -public class PipelineNotFoundException : Exception -{ - public PipelineNotFoundException(string name) : base($"Pipeline with name '{name}' was not found in the repository. Make sure to load the repository before evaluating pipelines.") - { - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Exceptions/PipelineParameterNotProvidedException.cs b/src/dotnet/AzureDataFactory.TestingFramework/Exceptions/PipelineParameterNotProvidedException.cs deleted file mode 100644 index 6bc92bc0..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Exceptions/PipelineParameterNotProvidedException.cs +++ /dev/null @@ -1,11 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -namespace AzureDataFactory.TestingFramework.Exceptions; - -public class PipelineParameterNotProvidedException : Exception -{ - public PipelineParameterNotProvidedException(string message) : base(message) - { - } -} \ No newline at end of file diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Exceptions/TypeOfPipelineActivityResultDoesNotMatchExpectedType.cs b/src/dotnet/AzureDataFactory.TestingFramework/Exceptions/TypeOfPipelineActivityResultDoesNotMatchExpectedType.cs deleted file mode 100644 index 25382f5b..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Exceptions/TypeOfPipelineActivityResultDoesNotMatchExpectedType.cs +++ /dev/null @@ -1,11 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -namespace AzureDataFactory.TestingFramework.Expressions; - -public class TypeOfPipelineActivityResultDoesNotMatchExpectedType : Exception -{ - public TypeOfPipelineActivityResultDoesNotMatchExpectedType(string activityName, string field, Type actualType, Type expectedType) : base($"The type of the activity output field '{field}' on activity '{activityName}' is '{actualType.Name}' but the expected type is '{expectedType.Name}'") - { - } -} \ No newline at end of file diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Exceptions/UnknownFunctionArgumentTypeException.cs b/src/dotnet/AzureDataFactory.TestingFramework/Exceptions/UnknownFunctionArgumentTypeException.cs deleted file mode 100644 index 61307cc2..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Exceptions/UnknownFunctionArgumentTypeException.cs +++ /dev/null @@ -1,8 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -namespace AzureDataFactory.TestingFramework.Exceptions; - -public class UnknownFunctionArgumentTypeException : Exception -{ -} \ No newline at end of file diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Exceptions/VariableBeingEvaluatedDoesNotExistException.cs b/src/dotnet/AzureDataFactory.TestingFramework/Exceptions/VariableBeingEvaluatedDoesNotExistException.cs deleted file mode 100644 index 079678af..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Exceptions/VariableBeingEvaluatedDoesNotExistException.cs +++ /dev/null @@ -1,11 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -namespace AzureDataFactory.TestingFramework.Exceptions; - -public class VariableBeingEvaluatedDoesNotExistException : Exception -{ - public VariableBeingEvaluatedDoesNotExistException(string variableName) : base($"Variable with name {variableName} does not exist in the pipeline") - { - } -} \ No newline at end of file diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Exceptions/VariableNotFoundException.cs b/src/dotnet/AzureDataFactory.TestingFramework/Exceptions/VariableNotFoundException.cs deleted file mode 100644 index 6e1f7988..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Exceptions/VariableNotFoundException.cs +++ /dev/null @@ -1,12 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -namespace AzureDataFactory.TestingFramework.Exceptions; - -internal class VariableNotFoundException : Exception -{ - public VariableNotFoundException(string variableExpressionVariableName) : base( - $"Variable with name {variableExpressionVariableName} was not found.") - { - } -} \ No newline at end of file diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Expressions/ActivityExpression.cs b/src/dotnet/AzureDataFactory.TestingFramework/Expressions/ActivityExpression.cs deleted file mode 100644 index 067e200a..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Expressions/ActivityExpression.cs +++ /dev/null @@ -1,75 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -using System.Text.RegularExpressions; -using AzureDataFactory.TestingFramework.Exceptions; -using AzureDataFactory.TestingFramework.Models.Base; -using AzureDataFactory.TestingFramework.Models.Pipelines; - -namespace AzureDataFactory.TestingFramework.Expressions; - -/// -/// Used to evaluate any activity('activityName').status or activity('activityName').output.field1.field2 -/// -internal class ActivityExpression : BaseExpression, IPipelineExpression -{ - private const string ExtractActivityRegex = @"(@?{?activity\('(\w+( +\w+)*)'\)(\.(\w+))*}?)"; - - private ActivityExpression(string expression) : base(expression) - { - } - - public TType Evaluate(PipelineRunState state) - { - var (activityName, fields) = GetActivityNameAndFields(); - var activity = state.PipelineActivityResults.LastOrDefault(x => string.Equals(x.Name, activityName, StringComparison.CurrentCultureIgnoreCase)) ?? - throw new ActivityNotFoundException(activityName); - if (activity.Status == null) - throw new ActivityNotEvaluatedException(activity.Name); - - var firstField = fields[0]; - switch (firstField) - { - case "status": - if (typeof(TType) != typeof(string)) - throw new TypeOfPipelineActivityResultDoesNotMatchExpectedType(activity.Name, firstField, typeof(string), typeof(TType)); - - return (TType)(object)activity.Status.ToString().ToLower(); - case "output": - var activityOutput = activity.Output; - foreach (var field in fields.Skip(1)) - { - // Use reflection to get field on activityOutput - var property = activityOutput.GetType().GetProperty(field); - if (property == null) - throw new ActivityOutputFieldNotFoundException(activity.Name, field); - - activityOutput = property.GetValue(activityOutput) ?? throw new ActivityOutputFieldNotFoundException(activity.Name, field); - } - - if (activityOutput is not TType type) - throw new TypeOfPipelineActivityResultDoesNotMatchExpectedType(activity.Name, string.Join(".", fields), activityOutput.GetType(), typeof(TType)); - - return type; - default: - throw new ActivityOutputFieldNotFoundException(activity.Name, firstField); - } - } - - private (string ActivityName, IReadOnlyList Fields) GetActivityNameAndFields() - { - var match = Regex.Match(ExpressionValue, ExtractActivityRegex, RegexOptions.Singleline); - if (match.Groups.Count != 6) - throw new Exception(); - - var activityName = match.Groups[2].Value; - var fields = match.Groups[5].Captures.Select(x => x.Value).ToList(); - - return (activityName, fields); - } - - internal static IEnumerable Find(string text) - { - return ExpressionFinder.FindByRegex(text, ExtractActivityRegex, e => new ActivityExpression(e)); - } -} \ No newline at end of file diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Expressions/BaseExpression.cs b/src/dotnet/AzureDataFactory.TestingFramework/Expressions/BaseExpression.cs deleted file mode 100644 index 017ab6bc..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Expressions/BaseExpression.cs +++ /dev/null @@ -1,40 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -using AzureDataFactory.TestingFramework.Exceptions; -using AzureDataFactory.TestingFramework.Models.Base; -using AzureDataFactory.TestingFramework.Models.Pipelines; - -namespace AzureDataFactory.TestingFramework.Expressions; - -internal abstract class BaseExpression -{ - internal string ExpressionValue { get; } - - protected BaseExpression(string expressionValue) - { - ExpressionValue = expressionValue; - } - - protected static TType GetParameterValue(RunState state, string parameterName, ParameterType parameterType) - { - var parameter = state.Parameters.SingleOrDefault(x => x.Name == parameterName && x.Type == parameterType); - if (parameter == null) - throw new ExpressionParameterNotFoundException(parameterName, parameterType); - - if (parameter is not RunParameter typedParameter) - throw new ExpressionParameterOrVariableTypeMismatchException(parameterName, parameterType, typeof(TType)); - - return typedParameter.Value; - } -} - -internal interface IPipelineExpression -{ - TType Evaluate(PipelineRunState state); -} - -internal interface IRunExpression -{ - TType Evaluate(RunState state); -} \ No newline at end of file diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Expressions/DatasetExpression.cs b/src/dotnet/AzureDataFactory.TestingFramework/Expressions/DatasetExpression.cs deleted file mode 100644 index a359fc48..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Expressions/DatasetExpression.cs +++ /dev/null @@ -1,40 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -using System.Text.RegularExpressions; -using AzureDataFactory.TestingFramework.Exceptions; -using AzureDataFactory.TestingFramework.Models.Base; - -namespace AzureDataFactory.TestingFramework.Expressions; - -/// -/// Used to evaluate any dataset('datasetName') expression. -/// -internal class DatasetExpression : BaseExpression, IRunExpression -{ - private const string ExtractDatasetRegex = @"(@?{?dataset\(\)\.(\w+)}?)"; - - private DatasetExpression(string expression) : base(expression) - { - } - - public TType Evaluate(RunState state) - { - var parameterName = GetParameterName(); - return GetParameterValue(state, parameterName, ParameterType.Dataset); - } - - private string GetParameterName() - { - var match = Regex.Match(ExpressionValue, ExtractDatasetRegex, RegexOptions.Singleline); - if (match.Groups.Count != 3) - throw new Exception(); - - return match.Groups[2].Value; - } - - public static IEnumerable Find(string text) - { - return ExpressionFinder.FindByRegex(text, ExtractDatasetRegex, e => new DatasetExpression(e)); - } -} \ No newline at end of file diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Expressions/ExpressionFinder.cs b/src/dotnet/AzureDataFactory.TestingFramework/Expressions/ExpressionFinder.cs deleted file mode 100644 index b6365420..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Expressions/ExpressionFinder.cs +++ /dev/null @@ -1,15 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -using System.Text.RegularExpressions; - -namespace AzureDataFactory.TestingFramework.Expressions; - -public static class ExpressionFinder -{ - internal static IReadOnlyList FindByRegex(string text, string regex, Func expressionFactory) where TExpression : BaseExpression - { - var matches = Regex.Matches(text, regex, RegexOptions.Singleline); - return matches.Select(x => x.Value).Select(expressionFactory).ToList(); - } -} \ No newline at end of file diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Expressions/IterationItemExpression.cs b/src/dotnet/AzureDataFactory.TestingFramework/Expressions/IterationItemExpression.cs deleted file mode 100644 index 39dfbaba..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Expressions/IterationItemExpression.cs +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -using AzureDataFactory.TestingFramework.Models.Base; -using AzureDataFactory.TestingFramework.Models.Pipelines; - -namespace AzureDataFactory.TestingFramework.Expressions; - -/// -/// Used to evaluate any item() expression. -/// -internal class IterationItemExpression : BaseExpression, IPipelineExpression -{ - private const string ExtractIterationItemRegex = "(@?{?item\\(\\)\\}?)"; - - private IterationItemExpression(string expression) : base(expression) - { - } - - public TType Evaluate(PipelineRunState state) - { - if (typeof(TType) != typeof(string)) - throw new ArgumentException($"Only string is supported for {nameof(IterationItemExpression)}."); - - return (TType)(object)state.IterationItem; - } - - public static IEnumerable Find(string text) - { - return ExpressionFinder.FindByRegex(text, ExtractIterationItemRegex, e => new IterationItemExpression(e)); - } -} \ No newline at end of file diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Expressions/LinkedServiceExpression.cs b/src/dotnet/AzureDataFactory.TestingFramework/Expressions/LinkedServiceExpression.cs deleted file mode 100644 index 594d5a52..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Expressions/LinkedServiceExpression.cs +++ /dev/null @@ -1,40 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -using System.Text.RegularExpressions; -using AzureDataFactory.TestingFramework.Exceptions; -using AzureDataFactory.TestingFramework.Models.Base; - -namespace AzureDataFactory.TestingFramework.Expressions; - -/// -/// Used to evaluate any linkedService('linkedServiceName') expression. -/// -internal class LinkedServiceExpression : BaseExpression, IRunExpression -{ - private const string ExtractLinkedServiceRegex = @"(@?{?linkedService\(\)\.(\w+)}?)"; - - private LinkedServiceExpression(string expression) : base(expression) - { - } - - public TType Evaluate(RunState state) - { - var parameterName = GetParameterName(); - return GetParameterValue(state, parameterName, ParameterType.LinkedService); - } - - private string GetParameterName() - { - var match = Regex.Match(ExpressionValue, ExtractLinkedServiceRegex, RegexOptions.Singleline); - if (match.Groups.Count != 3) - throw new Exception(); - - return match.Groups[2].Value; - } - - public static IEnumerable Find(string text) - { - return ExpressionFinder.FindByRegex(text, ExtractLinkedServiceRegex, e => new LinkedServiceExpression(e)); - } -} \ No newline at end of file diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Expressions/ParameterExpression.cs b/src/dotnet/AzureDataFactory.TestingFramework/Expressions/ParameterExpression.cs deleted file mode 100644 index dcec7eef..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Expressions/ParameterExpression.cs +++ /dev/null @@ -1,54 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -using System.Text.RegularExpressions; -using AzureDataFactory.TestingFramework.Exceptions; -using AzureDataFactory.TestingFramework.Models.Base; - -namespace AzureDataFactory.TestingFramework.Expressions; - -/// -/// Used to evaluate any pipeline() expression, like pipeline().parameters.name and pipeline().globalParameters.name. -/// -internal class ParameterExpression : BaseExpression, IRunExpression -{ - private readonly ParameterType _type; - - private ParameterExpression(string expression, ParameterType type) : base(expression) - { - _type = type; - } - - public TType Evaluate(RunState state) - { - var parameterName = GetParameterName(); - return GetParameterValue(state, parameterName, _type); - } - - private string GetParameterName() - { - var regex = "(@?{?pipeline\\(\\)\\." + GetParameterStringTemplate(_type) + @"\.(\w+)}?)"; - var match = Regex.Match(ExpressionValue, regex, RegexOptions.Singleline); - if (match.Groups.Count != 3) - throw new Exception(); - - return match.Groups[2].Value; - } - - private static string GetParameterStringTemplate(ParameterType type) - { - return type switch - { - ParameterType.Pipeline => "parameters", - ParameterType.Global => "globalParameters", - _ => throw new NotImplementedException($"Parameter type {type} is not implemented.") - }; - } - - public static IEnumerable Find(string text, - ParameterType parameterType) - { - var regex = "(@?{?pipeline\\(\\)\\." + GetParameterStringTemplate(parameterType) + @"\.(\w+)}?)"; - return ExpressionFinder.FindByRegex(text, regex, e => new ParameterExpression(e, parameterType)); - } -} \ No newline at end of file diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Expressions/VariableExpression.cs b/src/dotnet/AzureDataFactory.TestingFramework/Expressions/VariableExpression.cs deleted file mode 100644 index 0ae5e769..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Expressions/VariableExpression.cs +++ /dev/null @@ -1,53 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -using System.Text.RegularExpressions; -using AzureDataFactory.TestingFramework.Exceptions; -using AzureDataFactory.TestingFramework.Models.Base; -using AzureDataFactory.TestingFramework.Models.Pipelines; - -namespace AzureDataFactory.TestingFramework.Expressions; - -/// -/// Used to evaluate any variables('variableName') expression. -/// -internal class VariableExpression : BaseExpression, IPipelineExpression -{ - private const string ExtractVariablesRegex = @"(@?{?variables\('(\w+)'\)}?)"; - - private VariableExpression(string expression) : base(expression) - { - } - - public TType Evaluate(PipelineRunState state) - { - var variableName = GetVariableName(); - return GetVariableValueFromState(state, variableName); - } - - private string GetVariableName() - { - var match = Regex.Match(ExpressionValue, ExtractVariablesRegex, RegexOptions.Singleline); - if (match.Groups.Count != 3) - throw new Exception(); - - return match.Groups[2].Value; - } - - private static TType GetVariableValueFromState(PipelineRunState state, string variableName) - { - var parameter = state.Variables.SingleOrDefault(x => x.Name == variableName); - if (parameter == null) - throw new ExpressionParameterNotFoundException(variableName); - - if (parameter is not PipelineRunVariable typedParameter) - throw new ExpressionParameterOrVariableTypeMismatchException(variableName, typeof(TType)); - - return typedParameter.Value; - } - - public static IEnumerable Find(string text) - { - return ExpressionFinder.FindByRegex(text, ExtractVariablesRegex, e => new VariableExpression(e)); - } -} \ No newline at end of file diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Extensions/StringExtensions.cs b/src/dotnet/AzureDataFactory.TestingFramework/Extensions/StringExtensions.cs deleted file mode 100644 index 6998482c..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Extensions/StringExtensions.cs +++ /dev/null @@ -1,14 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -namespace AzureDataFactory.TestingFramework.Extensions; - -internal static class StringExtensions -{ - internal static string TrimOneChar(this string text, char character) - { - text = text.StartsWith(character) ? text[1..] : text; - text = text.EndsWith(character) ? text[..^1] : text; - return text; - } -} \ No newline at end of file diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Functions/FunctionArgument.cs b/src/dotnet/AzureDataFactory.TestingFramework/Functions/FunctionArgument.cs deleted file mode 100644 index 9d259b34..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Functions/FunctionArgument.cs +++ /dev/null @@ -1,58 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -using AzureDataFactory.TestingFramework.Expressions; -using AzureDataFactory.TestingFramework.Extensions; -using AzureDataFactory.TestingFramework.Models.Base; -using AzureDataFactory.TestingFramework.Models.Pipelines; - -namespace AzureDataFactory.TestingFramework.Functions; - -public class FunctionArgument : IFunctionPart -{ - public FunctionArgument(string expression) - { - _expression = expression.Trim('\n').Trim(' '); - } - - private readonly string _expression; - public string ExpressionValue => _expression; - - public TType Evaluate(RunState state) - { - var evalExpression = _expression; - var expressions = new List() - .Concat(ActivityExpression.Find(evalExpression)) - .Concat(ParameterExpression.Find(evalExpression, ParameterType.Global)) - .Concat(ParameterExpression.Find(evalExpression, ParameterType.Pipeline)) - .Concat(VariableExpression.Find(evalExpression)) - .Concat(IterationItemExpression.Find(evalExpression)) - .Concat(DatasetExpression.Find(evalExpression)) - .Concat(LinkedServiceExpression.Find(evalExpression)); - - foreach (var expression in expressions) - { - var evaluatedExpression = expression switch - { - IRunExpression runExpression => runExpression.Evaluate(state), - IPipelineExpression pipelineExpression when state is PipelineRunState pipelineRunState => pipelineExpression.Evaluate(pipelineRunState), - _ => throw new ArgumentException($"The expression is not supported in the given context.") - }; - - // To keep the evaluatedExpression type, it is immediately returned if the expression is the only one in the string. - if (evalExpression == expression.ExpressionValue) - return evaluatedExpression; - - evalExpression = evalExpression.Replace(expression.ExpressionValue, evaluatedExpression.ToString()); - } - - return typeof(TType) switch - { - { } type when type == typeof(bool) && bool.TryParse(evalExpression, out var boolValue) => (TType)(object)boolValue, - { } type when type == typeof(int) && int.TryParse(evalExpression, out var intValue) => (TType)(object)intValue, - { } type when type == typeof(long) && long.TryParse(evalExpression, out var longValue) => (TType)(object)longValue, - { } type when type == typeof(string) => (TType)(object)evalExpression.TrimOneChar('\''), - { } type => throw new ArgumentException($"The result {evalExpression} with DataType: {type} could not be parsed accordingly.") - }; - } -} \ No newline at end of file diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Functions/FunctionCall.cs b/src/dotnet/AzureDataFactory.TestingFramework/Functions/FunctionCall.cs deleted file mode 100644 index fa98c9ed..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Functions/FunctionCall.cs +++ /dev/null @@ -1,64 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -using System.Reflection; -using AzureDataFactory.TestingFramework.Exceptions; -using AzureDataFactory.TestingFramework.Models.Base; - -namespace AzureDataFactory.TestingFramework.Functions; - -public class FunctionCall : IFunctionPart -{ - public FunctionCall(string name, List arguments) - { - Name = name.Trim(' '); - Arguments = arguments; - } - - public string Name { get; } - public List Arguments { get; } - - public TType Evaluate(RunState state) - { - if (!FunctionsRepository.Functions.TryGetValue(Name, out var function)) - throw new Exception($"Unsupported function: {Name}"); - - var parameters = function.Method.GetParameters(); - var isParamsArgument = parameters.Length == 1 && parameters[0].ParameterType.IsGenericType && parameters[0].ParameterType.GetGenericTypeDefinition() == typeof(IEnumerable<>); - - if (!isParamsArgument && parameters.Length != Arguments.Count) - throw new FunctionCallInvalidArgumentsCountException(Name, Arguments, parameters); - - var evaluatedArguments = Arguments.Select(argument => - { - var argumentIndex = Arguments.IndexOf(argument); - var parameterType = isParamsArgument ? parameters[0].ParameterType.GetGenericArguments()[0] : parameters[argumentIndex].ParameterType; - - return parameterType switch - { - { } when parameterType == typeof(string) => argument.Evaluate(state), - { } when parameterType == typeof(char) => argument.Evaluate(state), - { } when parameterType == typeof(bool) => argument.Evaluate(state), - { } when parameterType == typeof(int) => argument.Evaluate(state), - { } when parameterType == typeof(long) => argument.Evaluate(state), - { } when parameterType == typeof(float) => argument.Evaluate(state), - { } when parameterType == typeof(double) => argument.Evaluate(state), - { } when parameterType == typeof(object) => argument.Evaluate(state), - { IsArray: true } => argument.Evaluate(state), - _ => throw new Exception($"Unsupported parameter type: {parameterType}") - }; - }).ToList(); - - try - { - var arguments = isParamsArgument ? TypeHelper.ConvertListGenericTypeToType(evaluatedArguments, parameters[0].ParameterType.GetGenericArguments()[0]) : evaluatedArguments; - - // Note: The following line's code duplication is a workaround to support functions with params arguments. - return (TType)(isParamsArgument ? function.DynamicInvoke(arguments) : function.DynamicInvoke(evaluatedArguments.ToArray())) ?? throw new Exception($"Function {Name} returned null."); - } - catch (TargetParameterCountException) - { - throw new FunctionCallInvalidArgumentsCountException(Name, evaluatedArguments, parameters); - } - } -} \ No newline at end of file diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Functions/FunctionPart.cs b/src/dotnet/AzureDataFactory.TestingFramework/Functions/FunctionPart.cs deleted file mode 100644 index 40ee9c35..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Functions/FunctionPart.cs +++ /dev/null @@ -1,86 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -using System.Text.RegularExpressions; - -namespace AzureDataFactory.TestingFramework.Functions; - -public static class FunctionPart -{ - private const string ExtractFuncRegex = @"^@?{?([^()]+?)\((.*)\)}?$"; - - public static IFunctionPart Parse(string expression) - { - var match = Regex.Match(expression, ExtractFuncRegex, RegexOptions.Singleline); - if (match.Groups.Count != 3) - return new FunctionArgument(expression); - - var functionName = match.Groups[1].Value.Trim(); - if (functionName is "variables" or "activity" or "pipeline" or "item") - return new FunctionArgument(expression); - - var functionArgumentsExpression = match.Groups[2].Value; - - var start = 0; - var inQuotes = false; - var inParenthesis = 0; - var arguments = new List(); - for (int i = 0; i < functionArgumentsExpression.Length; i++) - { - var currentChar = functionArgumentsExpression[i]; - var nextChar = i < functionArgumentsExpression.Length - 1 ? functionArgumentsExpression[i + 1] : '\0'; - if (currentChar == ',' && !inQuotes && inParenthesis == 0) - { - arguments.Add(functionArgumentsExpression[start..i].Replace("''", "'")); - start = i + 1; - continue; - } - - // Skip escaped single quotes - if (inQuotes && currentChar == '\'' && nextChar == '\'') - { - i++; - continue; - } - - if (currentChar == '\'') - inQuotes = !inQuotes; - - if (currentChar == '(') - inParenthesis++; - - if (currentChar == ')') - inParenthesis--; - - if (i == functionArgumentsExpression.Length - 1) - arguments.Add(functionArgumentsExpression[start..(i + 1)].Replace("''", "'")); - } - - return new FunctionCall( - functionName, - arguments.Select(x => x.Trim()).Select(Parse).ToList() - ); - } - - // This Parsing method is neat, however regex must be adapted to handle comma's and escaped quotes in strings . - // - // private const string ExtractArgsRegex = @"(?:[^,()]+((?:\((?>[^()]+|\((?)|\)(?<-open>))*\)))*)+"; - // public static IFunctionPart ParseByRegex(string expression) - // { - // var match = Regex.Match(expression, ExtractFuncRegex, RegexOptions.Singleline); - // if (match.Groups.Count != 3) - // return new FunctionArgument(expression); - // - // var functionName = match.Groups[1].Value.Trim(); - // if (functionName is "variables" or "activity" or "pipeline") - // return new FunctionArgument(expression); - // - // var functionArgumentsExpression = match.Groups[2].Value; - // var functionArguments = Regex.Matches(functionArgumentsExpression, ExtractArgsRegex); - // - // return new FunctionCall( - // functionName, - // functionArguments.Select(x => x.Value).Select(Parse).ToList() - // ); - // } -} \ No newline at end of file diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Functions/FunctionsRepository.cs b/src/dotnet/AzureDataFactory.TestingFramework/Functions/FunctionsRepository.cs deleted file mode 100644 index 7166f28b..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Functions/FunctionsRepository.cs +++ /dev/null @@ -1,75 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -using System.Text.Json; -using System.Text.Json.Nodes; - -namespace AzureDataFactory.TestingFramework.Functions; - -public static class FunctionsRepository -{ - internal static readonly Dictionary Functions = new() - { - { "concat", (IEnumerable arguments) => string.Concat(arguments) }, - { "trim", Trim }, - { "equals", FuncEquals }, - { "json", Json }, - { "contains", Contains }, - { "replace", (string input, string pattern, string replacement) => input.Replace(pattern, replacement) }, - { "string", (string input) => input }, - { "union" , (string arg0, string arg1) => JsonSerializer.Serialize(JsonSerializer.Deserialize(arg0).Union(JsonSerializer.Deserialize((arg1)))) }, - { "coalesce", (IEnumerable args) => args.FirstOrDefault(arg => !string.IsNullOrEmpty(arg)) }, - { "or", (bool a, bool b) => a || b }, - { "utcnow", () => DateTime.UtcNow.ToString("o") }, - { "utcNow", () => DateTime.UtcNow.ToString("o") }, - { "ticks", (string dateTime) => DateTime.Parse(dateTime).Ticks }, - { "sub", (long a, long b) => a - b }, - { "div", (long a, long b) => a / b }, - { "greaterOrEquals", (long a, long b) => a >= b }, - { "not", (bool value) => !value }, - { "empty", (object[] array) => array.Length == 0 }, - { "split", (string input, string delimiter) => input.Split(delimiter).ToList() } - }; - - /// - /// Registers a function to be used to evaluate ADF expressions. - /// - /// The name of the function - /// The delegate that takes the expected arguments and evaluates them in C#. - public static void Register(string functionName, Delegate function) - { - Functions[functionName] = function; - } - - private static object FuncEquals(string argument0, string argument1) - { - if (argument0.GetType() != argument1.GetType()) - throw new ArgumentException("Equals function requires arguments of the same type."); - - return argument0.Equals(argument1); - } - - private static string Trim(string text, string trimArgument) - { - return text.Trim(trimArgument[0]); - } - - private static string Json(string argument) - { - return argument; - } - - private static bool Contains(object obj, string value) - { - if (obj is Dictionary dictionary) - return dictionary.ContainsKey(value); - - if (obj is IEnumerable enumerable) - return enumerable.Contains(value); - - if (obj is string text) - return text.Contains(value); - - throw new ArgumentException("Contains function requires an object of type Dictionary, IEnumerable or string."); - } -} \ No newline at end of file diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Functions/IFunctionPart.cs b/src/dotnet/AzureDataFactory.TestingFramework/Functions/IFunctionPart.cs deleted file mode 100644 index 4e2f837f..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Functions/IFunctionPart.cs +++ /dev/null @@ -1,11 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -using AzureDataFactory.TestingFramework.Models.Base; - -namespace AzureDataFactory.TestingFramework.Functions; - -public interface IFunctionPart -{ - public TType Evaluate(RunState state); -} \ No newline at end of file diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Functions/TypeHelper.cs b/src/dotnet/AzureDataFactory.TestingFramework/Functions/TypeHelper.cs deleted file mode 100644 index a481d6d7..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Functions/TypeHelper.cs +++ /dev/null @@ -1,20 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -namespace AzureDataFactory.TestingFramework.Functions; - -public static class TypeHelper -{ - public static object ConvertListGenericTypeToType(List value, Type type) - { - var enumerableType = typeof(Enumerable); - var castMethod = enumerableType.GetMethod(nameof(Enumerable.Cast)).MakeGenericMethod(type); - var toListMethod = enumerableType.GetMethod(nameof(Enumerable.ToList)).MakeGenericMethod(type); - - var items = value.Select(item => Convert.ChangeType(item, type)).ToList(); - - var castedItems = castMethod.Invoke(null, new[] { items }); - - return toListMethod.Invoke(null, new[] { castedItems }); - } -} \ No newline at end of file diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/DataFactoryChangeDataCaptureCollection.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/DataFactoryChangeDataCaptureCollection.cs deleted file mode 100644 index 6d844b40..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/DataFactoryChangeDataCaptureCollection.cs +++ /dev/null @@ -1,337 +0,0 @@ -// - -#nullable disable - -using System.Collections; -using System.Globalization; -using Azure.Core; -using Azure.Core.Pipeline; - -namespace Azure.ResourceManager.DataFactory -{ - /// - /// A class representing a collection of and their operations. - /// Each in the collection will belong to the same instance of . - /// To get a instance call the GetDataFactoryChangeDataCaptures method from an instance of . - /// - public partial class DataFactoryChangeDataCaptureCollection : ArmCollection, IEnumerable, IAsyncEnumerable - { - private readonly ClientDiagnostics _dataFactoryChangeDataCaptureChangeDataCaptureClientDiagnostics; - private readonly ChangeDataCaptureRestOperations _dataFactoryChangeDataCaptureChangeDataCaptureRestClient; - - /// Initializes a new instance of the class for mocking. - protected DataFactoryChangeDataCaptureCollection() - { - } - - /// Initializes a new instance of the class. - /// The client parameters to use in these operations. - /// The identifier of the parent resource that is the target of operations. - internal DataFactoryChangeDataCaptureCollection(ArmClient client, ResourceIdentifier id) : base(client, id) - { - _dataFactoryChangeDataCaptureChangeDataCaptureClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.DataFactory", DataFactoryChangeDataCaptureResource.ResourceType.Namespace, Diagnostics); - TryGetApiVersion(DataFactoryChangeDataCaptureResource.ResourceType, out string dataFactoryChangeDataCaptureChangeDataCaptureApiVersion); - _dataFactoryChangeDataCaptureChangeDataCaptureRestClient = new ChangeDataCaptureRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, dataFactoryChangeDataCaptureChangeDataCaptureApiVersion); -#if DEBUG - ValidateResourceId(Id); -#endif - } - - internal static void ValidateResourceId(ResourceIdentifier id) - { - if (id.ResourceType != DataFactoryResource.ResourceType) - throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, DataFactoryResource.ResourceType), nameof(id)); - } - - /// - /// Creates or updates a change data capture resource. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName}/adfcdcs/{changeDataCaptureName} - /// - /// - /// Operation Id - /// ChangeDataCapture_CreateOrUpdate - /// - /// - /// - /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. - /// The change data capture name. - /// Change data capture resource definition. - /// ETag of the change data capture entity. Should only be specified for update, for which it should match existing entity or can be * for unconditional update. - /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// or is null. - public virtual async Task> CreateOrUpdateAsync(WaitUntil waitUntil, string changeDataCaptureName, DataFactoryChangeDataCaptureData data, string ifMatch = null, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(changeDataCaptureName, nameof(changeDataCaptureName)); - Argument.AssertNotNull(data, nameof(data)); - - using var scope = _dataFactoryChangeDataCaptureChangeDataCaptureClientDiagnostics.CreateScope("DataFactoryChangeDataCaptureCollection.CreateOrUpdate"); - scope.Start(); - try - { - var response = await _dataFactoryChangeDataCaptureChangeDataCaptureRestClient.CreateOrUpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, changeDataCaptureName, data, ifMatch, cancellationToken).ConfigureAwait(false); - var operation = new DataFactoryArmOperation(Response.FromValue(new DataFactoryChangeDataCaptureResource(Client, response), response.GetRawResponse())); - if (waitUntil == WaitUntil.Completed) - await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); - return operation; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Creates or updates a change data capture resource. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName}/adfcdcs/{changeDataCaptureName} - /// - /// - /// Operation Id - /// ChangeDataCapture_CreateOrUpdate - /// - /// - /// - /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. - /// The change data capture name. - /// Change data capture resource definition. - /// ETag of the change data capture entity. Should only be specified for update, for which it should match existing entity or can be * for unconditional update. - /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// or is null. - public virtual ArmOperation CreateOrUpdate(WaitUntil waitUntil, string changeDataCaptureName, DataFactoryChangeDataCaptureData data, string ifMatch = null, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(changeDataCaptureName, nameof(changeDataCaptureName)); - Argument.AssertNotNull(data, nameof(data)); - - using var scope = _dataFactoryChangeDataCaptureChangeDataCaptureClientDiagnostics.CreateScope("DataFactoryChangeDataCaptureCollection.CreateOrUpdate"); - scope.Start(); - try - { - var response = _dataFactoryChangeDataCaptureChangeDataCaptureRestClient.CreateOrUpdate(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, changeDataCaptureName, data, ifMatch, cancellationToken); - var operation = new DataFactoryArmOperation(Response.FromValue(new DataFactoryChangeDataCaptureResource(Client, response), response.GetRawResponse())); - if (waitUntil == WaitUntil.Completed) - operation.WaitForCompletion(cancellationToken); - return operation; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Gets a change data capture. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName}/adfcdcs/{changeDataCaptureName} - /// - /// - /// Operation Id - /// ChangeDataCapture_Get - /// - /// - /// - /// The change data capture name. - /// ETag of the change data capture entity. Should only be specified for get. If the ETag matches the existing entity tag, or if * was provided, then no content will be returned. - /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// is null. - public virtual async Task> GetAsync(string changeDataCaptureName, string ifNoneMatch = null, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(changeDataCaptureName, nameof(changeDataCaptureName)); - - using var scope = _dataFactoryChangeDataCaptureChangeDataCaptureClientDiagnostics.CreateScope("DataFactoryChangeDataCaptureCollection.Get"); - scope.Start(); - try - { - var response = await _dataFactoryChangeDataCaptureChangeDataCaptureRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, changeDataCaptureName, ifNoneMatch, cancellationToken).ConfigureAwait(false); - if (response.Value == null) - throw new RequestFailedException(response.GetRawResponse()); - return Response.FromValue(new DataFactoryChangeDataCaptureResource(Client, response.Value), response.GetRawResponse()); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Gets a change data capture. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName}/adfcdcs/{changeDataCaptureName} - /// - /// - /// Operation Id - /// ChangeDataCapture_Get - /// - /// - /// - /// The change data capture name. - /// ETag of the change data capture entity. Should only be specified for get. If the ETag matches the existing entity tag, or if * was provided, then no content will be returned. - /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// is null. - public virtual Response Get(string changeDataCaptureName, string ifNoneMatch = null, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(changeDataCaptureName, nameof(changeDataCaptureName)); - - using var scope = _dataFactoryChangeDataCaptureChangeDataCaptureClientDiagnostics.CreateScope("DataFactoryChangeDataCaptureCollection.Get"); - scope.Start(); - try - { - var response = _dataFactoryChangeDataCaptureChangeDataCaptureRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, changeDataCaptureName, ifNoneMatch, cancellationToken); - if (response.Value == null) - throw new RequestFailedException(response.GetRawResponse()); - return Response.FromValue(new DataFactoryChangeDataCaptureResource(Client, response.Value), response.GetRawResponse()); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Lists all resources of type change data capture. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName}/adfcdcs - /// - /// - /// Operation Id - /// ChangeDataCapture_ListByFactory - /// - /// - /// - /// The cancellation token to use. - /// An async collection of that may take multiple service requests to iterate over. - public virtual AsyncPageable GetAllAsync(CancellationToken cancellationToken = default) - { - HttpMessage FirstPageRequest(int? pageSizeHint) => _dataFactoryChangeDataCaptureChangeDataCaptureRestClient.CreateListByFactoryRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name); - HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _dataFactoryChangeDataCaptureChangeDataCaptureRestClient.CreateListByFactoryNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name); - return PageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new DataFactoryChangeDataCaptureResource(Client, DataFactoryChangeDataCaptureData.DeserializeDataFactoryChangeDataCaptureData(e)), _dataFactoryChangeDataCaptureChangeDataCaptureClientDiagnostics, Pipeline, "DataFactoryChangeDataCaptureCollection.GetAll", "value", "nextLink", cancellationToken); - } - - /// - /// Lists all resources of type change data capture. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName}/adfcdcs - /// - /// - /// Operation Id - /// ChangeDataCapture_ListByFactory - /// - /// - /// - /// The cancellation token to use. - /// A collection of that may take multiple service requests to iterate over. - public virtual Pageable GetAll(CancellationToken cancellationToken = default) - { - HttpMessage FirstPageRequest(int? pageSizeHint) => _dataFactoryChangeDataCaptureChangeDataCaptureRestClient.CreateListByFactoryRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name); - HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _dataFactoryChangeDataCaptureChangeDataCaptureRestClient.CreateListByFactoryNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name); - return PageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new DataFactoryChangeDataCaptureResource(Client, DataFactoryChangeDataCaptureData.DeserializeDataFactoryChangeDataCaptureData(e)), _dataFactoryChangeDataCaptureChangeDataCaptureClientDiagnostics, Pipeline, "DataFactoryChangeDataCaptureCollection.GetAll", "value", "nextLink", cancellationToken); - } - - /// - /// Checks to see if the resource exists in azure. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName}/adfcdcs/{changeDataCaptureName} - /// - /// - /// Operation Id - /// ChangeDataCapture_Get - /// - /// - /// - /// The change data capture name. - /// ETag of the change data capture entity. Should only be specified for get. If the ETag matches the existing entity tag, or if * was provided, then no content will be returned. - /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// is null. - public virtual async Task> ExistsAsync(string changeDataCaptureName, string ifNoneMatch = null, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(changeDataCaptureName, nameof(changeDataCaptureName)); - - using var scope = _dataFactoryChangeDataCaptureChangeDataCaptureClientDiagnostics.CreateScope("DataFactoryChangeDataCaptureCollection.Exists"); - scope.Start(); - try - { - var response = await _dataFactoryChangeDataCaptureChangeDataCaptureRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, changeDataCaptureName, ifNoneMatch, cancellationToken: cancellationToken).ConfigureAwait(false); - return Response.FromValue(response.Value != null, response.GetRawResponse()); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Checks to see if the resource exists in azure. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName}/adfcdcs/{changeDataCaptureName} - /// - /// - /// Operation Id - /// ChangeDataCapture_Get - /// - /// - /// - /// The change data capture name. - /// ETag of the change data capture entity. Should only be specified for get. If the ETag matches the existing entity tag, or if * was provided, then no content will be returned. - /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// is null. - public virtual Response Exists(string changeDataCaptureName, string ifNoneMatch = null, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(changeDataCaptureName, nameof(changeDataCaptureName)); - - using var scope = _dataFactoryChangeDataCaptureChangeDataCaptureClientDiagnostics.CreateScope("DataFactoryChangeDataCaptureCollection.Exists"); - scope.Start(); - try - { - var response = _dataFactoryChangeDataCaptureChangeDataCaptureRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, changeDataCaptureName, ifNoneMatch, cancellationToken: cancellationToken); - return Response.FromValue(response.Value != null, response.GetRawResponse()); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - IEnumerator IEnumerable.GetEnumerator() - { - return GetAll().GetEnumerator(); - } - - IEnumerator IEnumerable.GetEnumerator() - { - return GetAll().GetEnumerator(); - } - - IAsyncEnumerator IAsyncEnumerable.GetAsyncEnumerator(CancellationToken cancellationToken) - { - return GetAllAsync(cancellationToken: cancellationToken).GetAsyncEnumerator(cancellationToken); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/DataFactoryChangeDataCaptureData.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/DataFactoryChangeDataCaptureData.cs deleted file mode 100644 index b37ed42e..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/DataFactoryChangeDataCaptureData.cs +++ /dev/null @@ -1,122 +0,0 @@ -// - -#nullable disable - -using Azure.Core; -using Azure.Core.Expressions.DataFactory; -using AzureDataFactory.TestingFramework.Models; -using Azure.ResourceManager.Models; - -namespace Azure.ResourceManager.DataFactory -{ - /// - /// A class representing the DataFactoryChangeDataCapture data model. - /// Change data capture resource type. - /// - public partial class DataFactoryChangeDataCaptureData : ResourceData - { - /// Initializes a new instance of DataFactoryChangeDataCaptureData. - /// List of sources connections that can be used as sources in the CDC. - /// List of target connections that can be used as sources in the CDC. - /// CDC policy. - /// , or is null. - public DataFactoryChangeDataCaptureData(IEnumerable sourceConnectionsInfo, IEnumerable targetConnectionsInfo, MapperPolicy policy) - { - Argument.AssertNotNull(sourceConnectionsInfo, nameof(sourceConnectionsInfo)); - Argument.AssertNotNull(targetConnectionsInfo, nameof(targetConnectionsInfo)); - Argument.AssertNotNull(policy, nameof(policy)); - - SourceConnectionsInfo = sourceConnectionsInfo.ToList(); - TargetConnectionsInfo = targetConnectionsInfo.ToList(); - Policy = policy; - AdditionalProperties = new ChangeTrackingDictionary>(); - } - - /// Initializes a new instance of DataFactoryChangeDataCaptureData. - /// The id. - /// The name. - /// The resourceType. - /// The systemData. - /// The folder that this CDC is in. If not specified, CDC will appear at the root level. - /// The description of the change data capture. - /// List of sources connections that can be used as sources in the CDC. - /// List of target connections that can be used as sources in the CDC. - /// CDC policy. - /// A boolean to determine if the vnet configuration needs to be overwritten. - /// Status of the CDC as to if it is running or stopped. - /// Etag identifies change in the resource. - /// Additional Properties. - internal DataFactoryChangeDataCaptureData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, ChangeDataCaptureFolder folder, string description, IList sourceConnectionsInfo, IList targetConnectionsInfo, MapperPolicy policy, bool? allowVnetOverride, string status, ETag? eTag, IDictionary> additionalProperties) : base(id, name, resourceType, systemData) - { - Folder = folder; - Description = description; - SourceConnectionsInfo = sourceConnectionsInfo; - TargetConnectionsInfo = targetConnectionsInfo; - Policy = policy; - AllowVnetOverride = allowVnetOverride; - Status = status; - ETag = eTag; - AdditionalProperties = additionalProperties; - } - - /// The folder that this CDC is in. If not specified, CDC will appear at the root level. - internal ChangeDataCaptureFolder Folder { get; set; } - /// The name of the folder that this CDC is in. - public string FolderName - { - get => Folder is null ? default : Folder.Name; - set - { - if (Folder is null) - Folder = new ChangeDataCaptureFolder(); - Folder.Name = value; - } - } - - /// The description of the change data capture. - public string Description { get; set; } - /// List of sources connections that can be used as sources in the CDC. - public IList SourceConnectionsInfo { get; } - /// List of target connections that can be used as sources in the CDC. - public IList TargetConnectionsInfo { get; } - /// CDC policy. - public MapperPolicy Policy { get; set; } - /// A boolean to determine if the vnet configuration needs to be overwritten. - public bool? AllowVnetOverride { get; set; } - /// Status of the CDC as to if it is running or stopped. - public string Status { get; set; } - /// Etag identifies change in the resource. - public ETag? ETag { get; } - /// - /// Additional Properties - /// - /// To assign an object to the value of this property use . - /// - /// - /// To assign an already formated json string to this property use . - /// - /// - /// Examples: - /// - /// - /// BinaryData.FromObjectAsJson("foo") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromString("\"foo\"") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromObjectAsJson(new { key = "value" }) - /// Creates a payload of { "key": "value" }. - /// - /// - /// BinaryData.FromString("{\"key\": \"value\"}") - /// Creates a payload of { "key": "value" }. - /// - /// - /// - /// - public IDictionary> AdditionalProperties { get; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/DataFactoryChangeDataCaptureResource.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/DataFactoryChangeDataCaptureResource.cs deleted file mode 100644 index bb16b810..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/DataFactoryChangeDataCaptureResource.cs +++ /dev/null @@ -1,473 +0,0 @@ -// - -#nullable disable - -using System.Globalization; -using Azure.Core; -using Azure.Core.Pipeline; - -namespace Azure.ResourceManager.DataFactory -{ - /// - /// A Class representing a DataFactoryChangeDataCapture along with the instance operations that can be performed on it. - /// If you have a you can construct a - /// from an instance of using the GetDataFactoryChangeDataCaptureResource method. - /// Otherwise you can get one from its parent resource using the GetDataFactoryChangeDataCapture method. - /// - public partial class DataFactoryChangeDataCaptureResource : ArmResource - { - /// Generate the resource identifier of a instance. - public static ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string factoryName, string changeDataCaptureName) - { - var resourceId = $"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName}/adfcdcs/{changeDataCaptureName}"; - return new ResourceIdentifier(resourceId); - } - - private readonly ClientDiagnostics _dataFactoryChangeDataCaptureChangeDataCaptureClientDiagnostics; - private readonly ChangeDataCaptureRestOperations _dataFactoryChangeDataCaptureChangeDataCaptureRestClient; - private readonly DataFactoryChangeDataCaptureData _data; - - /// Initializes a new instance of the class for mocking. - protected DataFactoryChangeDataCaptureResource() - { - } - - /// Initializes a new instance of the class. - /// The client parameters to use in these operations. - /// The resource that is the target of operations. - internal DataFactoryChangeDataCaptureResource(ArmClient client, DataFactoryChangeDataCaptureData data) : this(client, data.Id) - { - HasData = true; - _data = data; - } - - /// Initializes a new instance of the class. - /// The client parameters to use in these operations. - /// The identifier of the resource that is the target of operations. - internal DataFactoryChangeDataCaptureResource(ArmClient client, ResourceIdentifier id) : base(client, id) - { - _dataFactoryChangeDataCaptureChangeDataCaptureClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.DataFactory", ResourceType.Namespace, Diagnostics); - TryGetApiVersion(ResourceType, out string dataFactoryChangeDataCaptureChangeDataCaptureApiVersion); - _dataFactoryChangeDataCaptureChangeDataCaptureRestClient = new ChangeDataCaptureRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, dataFactoryChangeDataCaptureChangeDataCaptureApiVersion); -#if DEBUG - ValidateResourceId(Id); -#endif - } - - /// Gets the resource type for the operations. - public static readonly ResourceType ResourceType = "Microsoft.DataFactory/factories/adfcdcs"; - - /// Gets whether or not the current instance has data. - public virtual bool HasData { get; } - - /// Gets the data representing this Feature. - /// Throws if there is no data loaded in the current instance. - public virtual DataFactoryChangeDataCaptureData Data - { - get - { - if (!HasData) - throw new InvalidOperationException("The current instance does not have data, you must call Get first."); - return _data; - } - } - - internal static void ValidateResourceId(ResourceIdentifier id) - { - if (id.ResourceType != ResourceType) - throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, ResourceType), nameof(id)); - } - - /// - /// Gets a change data capture. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName}/adfcdcs/{changeDataCaptureName} - /// - /// - /// Operation Id - /// ChangeDataCapture_Get - /// - /// - /// - /// ETag of the change data capture entity. Should only be specified for get. If the ETag matches the existing entity tag, or if * was provided, then no content will be returned. - /// The cancellation token to use. - public virtual async Task> GetAsync(string ifNoneMatch = null, CancellationToken cancellationToken = default) - { - using var scope = _dataFactoryChangeDataCaptureChangeDataCaptureClientDiagnostics.CreateScope("DataFactoryChangeDataCaptureResource.Get"); - scope.Start(); - try - { - var response = await _dataFactoryChangeDataCaptureChangeDataCaptureRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, ifNoneMatch, cancellationToken).ConfigureAwait(false); - if (response.Value == null) - throw new RequestFailedException(response.GetRawResponse()); - return Response.FromValue(new DataFactoryChangeDataCaptureResource(Client, response.Value), response.GetRawResponse()); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Gets a change data capture. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName}/adfcdcs/{changeDataCaptureName} - /// - /// - /// Operation Id - /// ChangeDataCapture_Get - /// - /// - /// - /// ETag of the change data capture entity. Should only be specified for get. If the ETag matches the existing entity tag, or if * was provided, then no content will be returned. - /// The cancellation token to use. - public virtual Response Get(string ifNoneMatch = null, CancellationToken cancellationToken = default) - { - using var scope = _dataFactoryChangeDataCaptureChangeDataCaptureClientDiagnostics.CreateScope("DataFactoryChangeDataCaptureResource.Get"); - scope.Start(); - try - { - var response = _dataFactoryChangeDataCaptureChangeDataCaptureRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, ifNoneMatch, cancellationToken); - if (response.Value == null) - throw new RequestFailedException(response.GetRawResponse()); - return Response.FromValue(new DataFactoryChangeDataCaptureResource(Client, response.Value), response.GetRawResponse()); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Deletes a change data capture. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName}/adfcdcs/{changeDataCaptureName} - /// - /// - /// Operation Id - /// ChangeDataCapture_Delete - /// - /// - /// - /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. - /// The cancellation token to use. - public virtual async Task DeleteAsync(WaitUntil waitUntil, CancellationToken cancellationToken = default) - { - using var scope = _dataFactoryChangeDataCaptureChangeDataCaptureClientDiagnostics.CreateScope("DataFactoryChangeDataCaptureResource.Delete"); - scope.Start(); - try - { - var response = await _dataFactoryChangeDataCaptureChangeDataCaptureRestClient.DeleteAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); - var operation = new DataFactoryArmOperation(response); - if (waitUntil == WaitUntil.Completed) - await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false); - return operation; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Deletes a change data capture. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName}/adfcdcs/{changeDataCaptureName} - /// - /// - /// Operation Id - /// ChangeDataCapture_Delete - /// - /// - /// - /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. - /// The cancellation token to use. - public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancellationToken = default) - { - using var scope = _dataFactoryChangeDataCaptureChangeDataCaptureClientDiagnostics.CreateScope("DataFactoryChangeDataCaptureResource.Delete"); - scope.Start(); - try - { - var response = _dataFactoryChangeDataCaptureChangeDataCaptureRestClient.Delete(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); - var operation = new DataFactoryArmOperation(response); - if (waitUntil == WaitUntil.Completed) - operation.WaitForCompletionResponse(cancellationToken); - return operation; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Creates or updates a change data capture resource. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName}/adfcdcs/{changeDataCaptureName} - /// - /// - /// Operation Id - /// ChangeDataCapture_CreateOrUpdate - /// - /// - /// - /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. - /// Change data capture resource definition. - /// ETag of the change data capture entity. Should only be specified for update, for which it should match existing entity or can be * for unconditional update. - /// The cancellation token to use. - /// is null. - public virtual async Task> UpdateAsync(WaitUntil waitUntil, DataFactoryChangeDataCaptureData data, string ifMatch = null, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(data, nameof(data)); - - using var scope = _dataFactoryChangeDataCaptureChangeDataCaptureClientDiagnostics.CreateScope("DataFactoryChangeDataCaptureResource.Update"); - scope.Start(); - try - { - var response = await _dataFactoryChangeDataCaptureChangeDataCaptureRestClient.CreateOrUpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data, ifMatch, cancellationToken).ConfigureAwait(false); - var operation = new DataFactoryArmOperation(Response.FromValue(new DataFactoryChangeDataCaptureResource(Client, response), response.GetRawResponse())); - if (waitUntil == WaitUntil.Completed) - await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); - return operation; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Creates or updates a change data capture resource. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName}/adfcdcs/{changeDataCaptureName} - /// - /// - /// Operation Id - /// ChangeDataCapture_CreateOrUpdate - /// - /// - /// - /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. - /// Change data capture resource definition. - /// ETag of the change data capture entity. Should only be specified for update, for which it should match existing entity or can be * for unconditional update. - /// The cancellation token to use. - /// is null. - public virtual ArmOperation Update(WaitUntil waitUntil, DataFactoryChangeDataCaptureData data, string ifMatch = null, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(data, nameof(data)); - - using var scope = _dataFactoryChangeDataCaptureChangeDataCaptureClientDiagnostics.CreateScope("DataFactoryChangeDataCaptureResource.Update"); - scope.Start(); - try - { - var response = _dataFactoryChangeDataCaptureChangeDataCaptureRestClient.CreateOrUpdate(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data, ifMatch, cancellationToken); - var operation = new DataFactoryArmOperation(Response.FromValue(new DataFactoryChangeDataCaptureResource(Client, response), response.GetRawResponse())); - if (waitUntil == WaitUntil.Completed) - operation.WaitForCompletion(cancellationToken); - return operation; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Starts a change data capture. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName}/adfcdcs/{changeDataCaptureName}/start - /// - /// - /// Operation Id - /// ChangeDataCapture_Start - /// - /// - /// - /// The cancellation token to use. - public virtual async Task StartAsync(CancellationToken cancellationToken = default) - { - using var scope = _dataFactoryChangeDataCaptureChangeDataCaptureClientDiagnostics.CreateScope("DataFactoryChangeDataCaptureResource.Start"); - scope.Start(); - try - { - var response = await _dataFactoryChangeDataCaptureChangeDataCaptureRestClient.StartAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); - return response; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Starts a change data capture. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName}/adfcdcs/{changeDataCaptureName}/start - /// - /// - /// Operation Id - /// ChangeDataCapture_Start - /// - /// - /// - /// The cancellation token to use. - public virtual Response Start(CancellationToken cancellationToken = default) - { - using var scope = _dataFactoryChangeDataCaptureChangeDataCaptureClientDiagnostics.CreateScope("DataFactoryChangeDataCaptureResource.Start"); - scope.Start(); - try - { - var response = _dataFactoryChangeDataCaptureChangeDataCaptureRestClient.Start(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); - return response; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Stops a change data capture. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName}/adfcdcs/{changeDataCaptureName}/stop - /// - /// - /// Operation Id - /// ChangeDataCapture_Stop - /// - /// - /// - /// The cancellation token to use. - public virtual async Task StopAsync(CancellationToken cancellationToken = default) - { - using var scope = _dataFactoryChangeDataCaptureChangeDataCaptureClientDiagnostics.CreateScope("DataFactoryChangeDataCaptureResource.Stop"); - scope.Start(); - try - { - var response = await _dataFactoryChangeDataCaptureChangeDataCaptureRestClient.StopAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); - return response; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Stops a change data capture. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName}/adfcdcs/{changeDataCaptureName}/stop - /// - /// - /// Operation Id - /// ChangeDataCapture_Stop - /// - /// - /// - /// The cancellation token to use. - public virtual Response Stop(CancellationToken cancellationToken = default) - { - using var scope = _dataFactoryChangeDataCaptureChangeDataCaptureClientDiagnostics.CreateScope("DataFactoryChangeDataCaptureResource.Stop"); - scope.Start(); - try - { - var response = _dataFactoryChangeDataCaptureChangeDataCaptureRestClient.Stop(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); - return response; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Gets the current status for the change data capture resource. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName}/adfcdcs/{changeDataCaptureName}/status - /// - /// - /// Operation Id - /// ChangeDataCapture_Status - /// - /// - /// - /// The cancellation token to use. - public virtual async Task> StatusAsync(CancellationToken cancellationToken = default) - { - using var scope = _dataFactoryChangeDataCaptureChangeDataCaptureClientDiagnostics.CreateScope("DataFactoryChangeDataCaptureResource.Status"); - scope.Start(); - try - { - var response = await _dataFactoryChangeDataCaptureChangeDataCaptureRestClient.StatusAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); - return response; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Gets the current status for the change data capture resource. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName}/adfcdcs/{changeDataCaptureName}/status - /// - /// - /// Operation Id - /// ChangeDataCapture_Status - /// - /// - /// - /// The cancellation token to use. - public virtual Response Status(CancellationToken cancellationToken = default) - { - using var scope = _dataFactoryChangeDataCaptureChangeDataCaptureClientDiagnostics.CreateScope("DataFactoryChangeDataCaptureResource.Status"); - scope.Start(); - try - { - var response = _dataFactoryChangeDataCaptureChangeDataCaptureRestClient.Status(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); - return response; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/DataFactoryCollection.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/DataFactoryCollection.cs deleted file mode 100644 index d30a5e78..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/DataFactoryCollection.cs +++ /dev/null @@ -1,338 +0,0 @@ -// - -#nullable disable - -using System.Collections; -using System.Globalization; -using Azure.Core; -using Azure.Core.Pipeline; -using Azure.ResourceManager.Resources; - -namespace Azure.ResourceManager.DataFactory -{ - /// - /// A class representing a collection of and their operations. - /// Each in the collection will belong to the same instance of . - /// To get a instance call the GetDataFactories method from an instance of . - /// - public partial class DataFactoryCollection : ArmCollection, IEnumerable, IAsyncEnumerable - { - private readonly ClientDiagnostics _dataFactoryFactoriesClientDiagnostics; - private readonly FactoriesRestOperations _dataFactoryFactoriesRestClient; - - /// Initializes a new instance of the class for mocking. - protected DataFactoryCollection() - { - } - - /// Initializes a new instance of the class. - /// The client parameters to use in these operations. - /// The identifier of the parent resource that is the target of operations. - internal DataFactoryCollection(ArmClient client, ResourceIdentifier id) : base(client, id) - { - _dataFactoryFactoriesClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.DataFactory", DataFactoryResource.ResourceType.Namespace, Diagnostics); - TryGetApiVersion(DataFactoryResource.ResourceType, out string dataFactoryFactoriesApiVersion); - _dataFactoryFactoriesRestClient = new FactoriesRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, dataFactoryFactoriesApiVersion); -#if DEBUG - ValidateResourceId(Id); -#endif - } - - internal static void ValidateResourceId(ResourceIdentifier id) - { - if (id.ResourceType != ResourceGroupResource.ResourceType) - throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, ResourceGroupResource.ResourceType), nameof(id)); - } - - /// - /// Creates or updates a factory. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName} - /// - /// - /// Operation Id - /// Factories_CreateOrUpdate - /// - /// - /// - /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. - /// The factory name. - /// Factory resource definition. - /// ETag of the factory entity. Should only be specified for update, for which it should match existing entity or can be * for unconditional update. - /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// or is null. - public virtual async Task> CreateOrUpdateAsync(WaitUntil waitUntil, string factoryName, DataFactoryData data, string ifMatch = null, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(factoryName, nameof(factoryName)); - Argument.AssertNotNull(data, nameof(data)); - - using var scope = _dataFactoryFactoriesClientDiagnostics.CreateScope("DataFactoryCollection.CreateOrUpdate"); - scope.Start(); - try - { - var response = await _dataFactoryFactoriesRestClient.CreateOrUpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, factoryName, data, ifMatch, cancellationToken).ConfigureAwait(false); - var operation = new DataFactoryArmOperation(Response.FromValue(new DataFactoryResource(Client, response), response.GetRawResponse())); - if (waitUntil == WaitUntil.Completed) - await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); - return operation; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Creates or updates a factory. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName} - /// - /// - /// Operation Id - /// Factories_CreateOrUpdate - /// - /// - /// - /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. - /// The factory name. - /// Factory resource definition. - /// ETag of the factory entity. Should only be specified for update, for which it should match existing entity or can be * for unconditional update. - /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// or is null. - public virtual ArmOperation CreateOrUpdate(WaitUntil waitUntil, string factoryName, DataFactoryData data, string ifMatch = null, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(factoryName, nameof(factoryName)); - Argument.AssertNotNull(data, nameof(data)); - - using var scope = _dataFactoryFactoriesClientDiagnostics.CreateScope("DataFactoryCollection.CreateOrUpdate"); - scope.Start(); - try - { - var response = _dataFactoryFactoriesRestClient.CreateOrUpdate(Id.SubscriptionId, Id.ResourceGroupName, factoryName, data, ifMatch, cancellationToken); - var operation = new DataFactoryArmOperation(Response.FromValue(new DataFactoryResource(Client, response), response.GetRawResponse())); - if (waitUntil == WaitUntil.Completed) - operation.WaitForCompletion(cancellationToken); - return operation; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Gets a factory. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName} - /// - /// - /// Operation Id - /// Factories_Get - /// - /// - /// - /// The factory name. - /// ETag of the factory entity. Should only be specified for get. If the ETag matches the existing entity tag, or if * was provided, then no content will be returned. - /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// is null. - public virtual async Task> GetAsync(string factoryName, string ifNoneMatch = null, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(factoryName, nameof(factoryName)); - - using var scope = _dataFactoryFactoriesClientDiagnostics.CreateScope("DataFactoryCollection.Get"); - scope.Start(); - try - { - var response = await _dataFactoryFactoriesRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, factoryName, ifNoneMatch, cancellationToken).ConfigureAwait(false); - if (response.Value == null) - throw new RequestFailedException(response.GetRawResponse()); - return Response.FromValue(new DataFactoryResource(Client, response.Value), response.GetRawResponse()); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Gets a factory. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName} - /// - /// - /// Operation Id - /// Factories_Get - /// - /// - /// - /// The factory name. - /// ETag of the factory entity. Should only be specified for get. If the ETag matches the existing entity tag, or if * was provided, then no content will be returned. - /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// is null. - public virtual Response Get(string factoryName, string ifNoneMatch = null, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(factoryName, nameof(factoryName)); - - using var scope = _dataFactoryFactoriesClientDiagnostics.CreateScope("DataFactoryCollection.Get"); - scope.Start(); - try - { - var response = _dataFactoryFactoriesRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, factoryName, ifNoneMatch, cancellationToken); - if (response.Value == null) - throw new RequestFailedException(response.GetRawResponse()); - return Response.FromValue(new DataFactoryResource(Client, response.Value), response.GetRawResponse()); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Lists factories. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories - /// - /// - /// Operation Id - /// Factories_ListByResourceGroup - /// - /// - /// - /// The cancellation token to use. - /// An async collection of that may take multiple service requests to iterate over. - public virtual AsyncPageable GetAllAsync(CancellationToken cancellationToken = default) - { - HttpMessage FirstPageRequest(int? pageSizeHint) => _dataFactoryFactoriesRestClient.CreateListByResourceGroupRequest(Id.SubscriptionId, Id.ResourceGroupName); - HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _dataFactoryFactoriesRestClient.CreateListByResourceGroupNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName); - return PageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new DataFactoryResource(Client, DataFactoryData.DeserializeDataFactoryData(e)), _dataFactoryFactoriesClientDiagnostics, Pipeline, "DataFactoryCollection.GetAll", "value", "nextLink", cancellationToken); - } - - /// - /// Lists factories. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories - /// - /// - /// Operation Id - /// Factories_ListByResourceGroup - /// - /// - /// - /// The cancellation token to use. - /// A collection of that may take multiple service requests to iterate over. - public virtual Pageable GetAll(CancellationToken cancellationToken = default) - { - HttpMessage FirstPageRequest(int? pageSizeHint) => _dataFactoryFactoriesRestClient.CreateListByResourceGroupRequest(Id.SubscriptionId, Id.ResourceGroupName); - HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _dataFactoryFactoriesRestClient.CreateListByResourceGroupNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName); - return PageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new DataFactoryResource(Client, DataFactoryData.DeserializeDataFactoryData(e)), _dataFactoryFactoriesClientDiagnostics, Pipeline, "DataFactoryCollection.GetAll", "value", "nextLink", cancellationToken); - } - - /// - /// Checks to see if the resource exists in azure. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName} - /// - /// - /// Operation Id - /// Factories_Get - /// - /// - /// - /// The factory name. - /// ETag of the factory entity. Should only be specified for get. If the ETag matches the existing entity tag, or if * was provided, then no content will be returned. - /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// is null. - public virtual async Task> ExistsAsync(string factoryName, string ifNoneMatch = null, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(factoryName, nameof(factoryName)); - - using var scope = _dataFactoryFactoriesClientDiagnostics.CreateScope("DataFactoryCollection.Exists"); - scope.Start(); - try - { - var response = await _dataFactoryFactoriesRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, factoryName, ifNoneMatch, cancellationToken: cancellationToken).ConfigureAwait(false); - return Response.FromValue(response.Value != null, response.GetRawResponse()); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Checks to see if the resource exists in azure. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName} - /// - /// - /// Operation Id - /// Factories_Get - /// - /// - /// - /// The factory name. - /// ETag of the factory entity. Should only be specified for get. If the ETag matches the existing entity tag, or if * was provided, then no content will be returned. - /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// is null. - public virtual Response Exists(string factoryName, string ifNoneMatch = null, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(factoryName, nameof(factoryName)); - - using var scope = _dataFactoryFactoriesClientDiagnostics.CreateScope("DataFactoryCollection.Exists"); - scope.Start(); - try - { - var response = _dataFactoryFactoriesRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, factoryName, ifNoneMatch, cancellationToken: cancellationToken); - return Response.FromValue(response.Value != null, response.GetRawResponse()); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - IEnumerator IEnumerable.GetEnumerator() - { - return GetAll().GetEnumerator(); - } - - IEnumerator IEnumerable.GetEnumerator() - { - return GetAll().GetEnumerator(); - } - - IAsyncEnumerator IAsyncEnumerable.GetAsyncEnumerator(CancellationToken cancellationToken) - { - return GetAllAsync(cancellationToken: cancellationToken).GetAsyncEnumerator(cancellationToken); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/DataFactoryData.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/DataFactoryData.cs deleted file mode 100644 index 05b36909..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/DataFactoryData.cs +++ /dev/null @@ -1,131 +0,0 @@ -// - -#nullable disable - -using Azure.Core; -using Azure.Core.Expressions.DataFactory; -using AzureDataFactory.TestingFramework.Models; -using Azure.ResourceManager.Models; - -namespace Azure.ResourceManager.DataFactory -{ - /// - /// A class representing the DataFactory data model. - /// Factory resource type. - /// - public partial class DataFactoryData : TrackedResourceData - { - /// Initializes a new instance of DataFactoryData. - /// The location. - public DataFactoryData(AzureLocation location) : base(location) - { - GlobalParameters = new ChangeTrackingDictionary(); - AdditionalProperties = new ChangeTrackingDictionary>(); - } - - /// Initializes a new instance of DataFactoryData. - /// The id. - /// The name. - /// The resourceType. - /// The systemData. - /// The tags. - /// The location. - /// Managed service identity of the factory. Current supported identity types: SystemAssigned, UserAssigned, SystemAssigned,UserAssigned. - /// Factory provisioning state, example Succeeded. - /// Time the factory was created in ISO8601 format. - /// Version of the factory. - /// Purview information of the factory. - /// - /// Git repo information of the factory. - /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. - /// The available derived classes include and . - /// - /// List of parameters for factory. - /// Properties to enable Customer Managed Key for the factory. - /// Whether or not public network access is allowed for the data factory. - /// Etag identifies change in the resource. - /// Additional Properties. - internal DataFactoryData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary tags, AzureLocation location, ManagedServiceIdentity identity, string provisioningState, DateTimeOffset? createdOn, string version, DataFactoryPurviewConfiguration purviewConfiguration, FactoryRepoConfiguration repoConfiguration, IDictionary globalParameters, DataFactoryEncryptionConfiguration encryption, DataFactoryPublicNetworkAccess? publicNetworkAccess, ETag? eTag, IDictionary> additionalProperties) : base(id, name, resourceType, systemData, tags, location) - { - Identity = identity; - ProvisioningState = provisioningState; - CreatedOn = createdOn; - Version = version; - PurviewConfiguration = purviewConfiguration; - RepoConfiguration = repoConfiguration; - GlobalParameters = globalParameters; - Encryption = encryption; - PublicNetworkAccess = publicNetworkAccess; - ETag = eTag; - AdditionalProperties = additionalProperties; - } - - /// Managed service identity of the factory. Current supported identity types: SystemAssigned, UserAssigned, SystemAssigned,UserAssigned. - public ManagedServiceIdentity Identity { get; set; } - /// Factory provisioning state, example Succeeded. - public string ProvisioningState { get; } - /// Time the factory was created in ISO8601 format. - public DateTimeOffset? CreatedOn { get; } - /// Version of the factory. - public string Version { get; } - /// Purview information of the factory. - internal DataFactoryPurviewConfiguration PurviewConfiguration { get; set; } - /// Purview resource id. - public ResourceIdentifier PurviewResourceId - { - get => PurviewConfiguration is null ? default : PurviewConfiguration.PurviewResourceId; - set - { - if (PurviewConfiguration is null) - PurviewConfiguration = new DataFactoryPurviewConfiguration(); - PurviewConfiguration.PurviewResourceId = value; - } - } - - /// - /// Git repo information of the factory. - /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. - /// The available derived classes include and . - /// - public FactoryRepoConfiguration RepoConfiguration { get; set; } - /// List of parameters for factory. - public IDictionary GlobalParameters { get; } - /// Properties to enable Customer Managed Key for the factory. - public DataFactoryEncryptionConfiguration Encryption { get; set; } - /// Whether or not public network access is allowed for the data factory. - public DataFactoryPublicNetworkAccess? PublicNetworkAccess { get; set; } - /// Etag identifies change in the resource. - public ETag? ETag { get; } - /// - /// Additional Properties - /// - /// To assign an object to the value of this property use . - /// - /// - /// To assign an already formated json string to this property use . - /// - /// - /// Examples: - /// - /// - /// BinaryData.FromObjectAsJson("foo") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromString("\"foo\"") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromObjectAsJson(new { key = "value" }) - /// Creates a payload of { "key": "value" }. - /// - /// - /// BinaryData.FromString("{\"key\": \"value\"}") - /// Creates a payload of { "key": "value" }. - /// - /// - /// - /// - public IDictionary> AdditionalProperties { get; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/DataFactoryDataFlowCollection.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/DataFactoryDataFlowCollection.cs deleted file mode 100644 index 28dce3af..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/DataFactoryDataFlowCollection.cs +++ /dev/null @@ -1,337 +0,0 @@ -// - -#nullable disable - -using System.Collections; -using System.Globalization; -using Azure.Core; -using Azure.Core.Pipeline; - -namespace Azure.ResourceManager.DataFactory -{ - /// - /// A class representing a collection of and their operations. - /// Each in the collection will belong to the same instance of . - /// To get a instance call the GetDataFactoryDataFlows method from an instance of . - /// - public partial class DataFactoryDataFlowCollection : ArmCollection, IEnumerable, IAsyncEnumerable - { - private readonly ClientDiagnostics _dataFactoryDataFlowDataFlowsClientDiagnostics; - private readonly DataFlowsRestOperations _dataFactoryDataFlowDataFlowsRestClient; - - /// Initializes a new instance of the class for mocking. - protected DataFactoryDataFlowCollection() - { - } - - /// Initializes a new instance of the class. - /// The client parameters to use in these operations. - /// The identifier of the parent resource that is the target of operations. - internal DataFactoryDataFlowCollection(ArmClient client, ResourceIdentifier id) : base(client, id) - { - _dataFactoryDataFlowDataFlowsClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.DataFactory", DataFactoryDataFlowResource.ResourceType.Namespace, Diagnostics); - TryGetApiVersion(DataFactoryDataFlowResource.ResourceType, out string dataFactoryDataFlowDataFlowsApiVersion); - _dataFactoryDataFlowDataFlowsRestClient = new DataFlowsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, dataFactoryDataFlowDataFlowsApiVersion); -#if DEBUG - ValidateResourceId(Id); -#endif - } - - internal static void ValidateResourceId(ResourceIdentifier id) - { - if (id.ResourceType != DataFactoryResource.ResourceType) - throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, DataFactoryResource.ResourceType), nameof(id)); - } - - /// - /// Creates or updates a data flow. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName}/dataflows/{dataFlowName} - /// - /// - /// Operation Id - /// DataFlows_CreateOrUpdate - /// - /// - /// - /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. - /// The data flow name. - /// Data flow resource definition. - /// ETag of the data flow entity. Should only be specified for update, for which it should match existing entity or can be * for unconditional update. - /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// or is null. - public virtual async Task> CreateOrUpdateAsync(WaitUntil waitUntil, string dataFlowName, DataFactoryDataFlowData data, string ifMatch = null, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(dataFlowName, nameof(dataFlowName)); - Argument.AssertNotNull(data, nameof(data)); - - using var scope = _dataFactoryDataFlowDataFlowsClientDiagnostics.CreateScope("DataFactoryDataFlowCollection.CreateOrUpdate"); - scope.Start(); - try - { - var response = await _dataFactoryDataFlowDataFlowsRestClient.CreateOrUpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, dataFlowName, data, ifMatch, cancellationToken).ConfigureAwait(false); - var operation = new DataFactoryArmOperation(Response.FromValue(new DataFactoryDataFlowResource(Client, response), response.GetRawResponse())); - if (waitUntil == WaitUntil.Completed) - await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); - return operation; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Creates or updates a data flow. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName}/dataflows/{dataFlowName} - /// - /// - /// Operation Id - /// DataFlows_CreateOrUpdate - /// - /// - /// - /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. - /// The data flow name. - /// Data flow resource definition. - /// ETag of the data flow entity. Should only be specified for update, for which it should match existing entity or can be * for unconditional update. - /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// or is null. - public virtual ArmOperation CreateOrUpdate(WaitUntil waitUntil, string dataFlowName, DataFactoryDataFlowData data, string ifMatch = null, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(dataFlowName, nameof(dataFlowName)); - Argument.AssertNotNull(data, nameof(data)); - - using var scope = _dataFactoryDataFlowDataFlowsClientDiagnostics.CreateScope("DataFactoryDataFlowCollection.CreateOrUpdate"); - scope.Start(); - try - { - var response = _dataFactoryDataFlowDataFlowsRestClient.CreateOrUpdate(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, dataFlowName, data, ifMatch, cancellationToken); - var operation = new DataFactoryArmOperation(Response.FromValue(new DataFactoryDataFlowResource(Client, response), response.GetRawResponse())); - if (waitUntil == WaitUntil.Completed) - operation.WaitForCompletion(cancellationToken); - return operation; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Gets a data flow. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName}/dataflows/{dataFlowName} - /// - /// - /// Operation Id - /// DataFlows_Get - /// - /// - /// - /// The data flow name. - /// ETag of the data flow entity. Should only be specified for get. If the ETag matches the existing entity tag, or if * was provided, then no content will be returned. - /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// is null. - public virtual async Task> GetAsync(string dataFlowName, string ifNoneMatch = null, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(dataFlowName, nameof(dataFlowName)); - - using var scope = _dataFactoryDataFlowDataFlowsClientDiagnostics.CreateScope("DataFactoryDataFlowCollection.Get"); - scope.Start(); - try - { - var response = await _dataFactoryDataFlowDataFlowsRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, dataFlowName, ifNoneMatch, cancellationToken).ConfigureAwait(false); - if (response.Value == null) - throw new RequestFailedException(response.GetRawResponse()); - return Response.FromValue(new DataFactoryDataFlowResource(Client, response.Value), response.GetRawResponse()); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Gets a data flow. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName}/dataflows/{dataFlowName} - /// - /// - /// Operation Id - /// DataFlows_Get - /// - /// - /// - /// The data flow name. - /// ETag of the data flow entity. Should only be specified for get. If the ETag matches the existing entity tag, or if * was provided, then no content will be returned. - /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// is null. - public virtual Response Get(string dataFlowName, string ifNoneMatch = null, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(dataFlowName, nameof(dataFlowName)); - - using var scope = _dataFactoryDataFlowDataFlowsClientDiagnostics.CreateScope("DataFactoryDataFlowCollection.Get"); - scope.Start(); - try - { - var response = _dataFactoryDataFlowDataFlowsRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, dataFlowName, ifNoneMatch, cancellationToken); - if (response.Value == null) - throw new RequestFailedException(response.GetRawResponse()); - return Response.FromValue(new DataFactoryDataFlowResource(Client, response.Value), response.GetRawResponse()); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Lists data flows. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName}/dataflows - /// - /// - /// Operation Id - /// DataFlows_ListByFactory - /// - /// - /// - /// The cancellation token to use. - /// An async collection of that may take multiple service requests to iterate over. - public virtual AsyncPageable GetAllAsync(CancellationToken cancellationToken = default) - { - HttpMessage FirstPageRequest(int? pageSizeHint) => _dataFactoryDataFlowDataFlowsRestClient.CreateListByFactoryRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name); - HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _dataFactoryDataFlowDataFlowsRestClient.CreateListByFactoryNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name); - return PageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new DataFactoryDataFlowResource(Client, DataFactoryDataFlowData.DeserializeDataFactoryDataFlowData(e)), _dataFactoryDataFlowDataFlowsClientDiagnostics, Pipeline, "DataFactoryDataFlowCollection.GetAll", "value", "nextLink", cancellationToken); - } - - /// - /// Lists data flows. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName}/dataflows - /// - /// - /// Operation Id - /// DataFlows_ListByFactory - /// - /// - /// - /// The cancellation token to use. - /// A collection of that may take multiple service requests to iterate over. - public virtual Pageable GetAll(CancellationToken cancellationToken = default) - { - HttpMessage FirstPageRequest(int? pageSizeHint) => _dataFactoryDataFlowDataFlowsRestClient.CreateListByFactoryRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name); - HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _dataFactoryDataFlowDataFlowsRestClient.CreateListByFactoryNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name); - return PageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new DataFactoryDataFlowResource(Client, DataFactoryDataFlowData.DeserializeDataFactoryDataFlowData(e)), _dataFactoryDataFlowDataFlowsClientDiagnostics, Pipeline, "DataFactoryDataFlowCollection.GetAll", "value", "nextLink", cancellationToken); - } - - /// - /// Checks to see if the resource exists in azure. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName}/dataflows/{dataFlowName} - /// - /// - /// Operation Id - /// DataFlows_Get - /// - /// - /// - /// The data flow name. - /// ETag of the data flow entity. Should only be specified for get. If the ETag matches the existing entity tag, or if * was provided, then no content will be returned. - /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// is null. - public virtual async Task> ExistsAsync(string dataFlowName, string ifNoneMatch = null, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(dataFlowName, nameof(dataFlowName)); - - using var scope = _dataFactoryDataFlowDataFlowsClientDiagnostics.CreateScope("DataFactoryDataFlowCollection.Exists"); - scope.Start(); - try - { - var response = await _dataFactoryDataFlowDataFlowsRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, dataFlowName, ifNoneMatch, cancellationToken: cancellationToken).ConfigureAwait(false); - return Response.FromValue(response.Value != null, response.GetRawResponse()); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Checks to see if the resource exists in azure. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName}/dataflows/{dataFlowName} - /// - /// - /// Operation Id - /// DataFlows_Get - /// - /// - /// - /// The data flow name. - /// ETag of the data flow entity. Should only be specified for get. If the ETag matches the existing entity tag, or if * was provided, then no content will be returned. - /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// is null. - public virtual Response Exists(string dataFlowName, string ifNoneMatch = null, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(dataFlowName, nameof(dataFlowName)); - - using var scope = _dataFactoryDataFlowDataFlowsClientDiagnostics.CreateScope("DataFactoryDataFlowCollection.Exists"); - scope.Start(); - try - { - var response = _dataFactoryDataFlowDataFlowsRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, dataFlowName, ifNoneMatch, cancellationToken: cancellationToken); - return Response.FromValue(response.Value != null, response.GetRawResponse()); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - IEnumerator IEnumerable.GetEnumerator() - { - return GetAll().GetEnumerator(); - } - - IEnumerator IEnumerable.GetEnumerator() - { - return GetAll().GetEnumerator(); - } - - IAsyncEnumerator IAsyncEnumerable.GetAsyncEnumerator(CancellationToken cancellationToken) - { - return GetAllAsync(cancellationToken: cancellationToken).GetAsyncEnumerator(cancellationToken); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/DataFactoryDataFlowData.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/DataFactoryDataFlowData.cs deleted file mode 100644 index 20e669e4..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/DataFactoryDataFlowData.cs +++ /dev/null @@ -1,57 +0,0 @@ -// - -#nullable disable - -using Azure.Core; -using AzureDataFactory.TestingFramework.Models; -using Azure.ResourceManager.Models; - -namespace Azure.ResourceManager.DataFactory -{ - /// - /// A class representing the DataFactoryDataFlow data model. - /// Data flow resource type. - /// - public partial class DataFactoryDataFlowData : ResourceData - { - /// Initializes a new instance of DataFactoryDataFlowData. - /// - /// Data flow properties. - /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. - /// The available derived classes include , and . - /// - /// is null. - public DataFactoryDataFlowData(DataFactoryDataFlowProperties properties) - { - Argument.AssertNotNull(properties, nameof(properties)); - - Properties = properties; - } - - /// Initializes a new instance of DataFactoryDataFlowData. - /// The id. - /// The name. - /// The resourceType. - /// The systemData. - /// - /// Data flow properties. - /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. - /// The available derived classes include , and . - /// - /// Etag identifies change in the resource. - internal DataFactoryDataFlowData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, DataFactoryDataFlowProperties properties, ETag? eTag) : base(id, name, resourceType, systemData) - { - Properties = properties; - ETag = eTag; - } - - /// - /// Data flow properties. - /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. - /// The available derived classes include , and . - /// - public DataFactoryDataFlowProperties Properties { get; set; } - /// Etag identifies change in the resource. - public ETag? ETag { get; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/DataFactoryDataFlowResource.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/DataFactoryDataFlowResource.cs deleted file mode 100644 index 8a4798bd..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/DataFactoryDataFlowResource.cs +++ /dev/null @@ -1,293 +0,0 @@ -// - -#nullable disable - -using System.Globalization; -using Azure.Core; -using Azure.Core.Pipeline; - -namespace Azure.ResourceManager.DataFactory -{ - /// - /// A Class representing a DataFactoryDataFlow along with the instance operations that can be performed on it. - /// If you have a you can construct a - /// from an instance of using the GetDataFactoryDataFlowResource method. - /// Otherwise you can get one from its parent resource using the GetDataFactoryDataFlow method. - /// - public partial class DataFactoryDataFlowResource : ArmResource - { - /// Generate the resource identifier of a instance. - public static ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string factoryName, string dataFlowName) - { - var resourceId = $"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName}/dataflows/{dataFlowName}"; - return new ResourceIdentifier(resourceId); - } - - private readonly ClientDiagnostics _dataFactoryDataFlowDataFlowsClientDiagnostics; - private readonly DataFlowsRestOperations _dataFactoryDataFlowDataFlowsRestClient; - private readonly DataFactoryDataFlowData _data; - - /// Initializes a new instance of the class for mocking. - protected DataFactoryDataFlowResource() - { - } - - /// Initializes a new instance of the class. - /// The client parameters to use in these operations. - /// The resource that is the target of operations. - internal DataFactoryDataFlowResource(ArmClient client, DataFactoryDataFlowData data) : this(client, data.Id) - { - HasData = true; - _data = data; - } - - /// Initializes a new instance of the class. - /// The client parameters to use in these operations. - /// The identifier of the resource that is the target of operations. - internal DataFactoryDataFlowResource(ArmClient client, ResourceIdentifier id) : base(client, id) - { - _dataFactoryDataFlowDataFlowsClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.DataFactory", ResourceType.Namespace, Diagnostics); - TryGetApiVersion(ResourceType, out string dataFactoryDataFlowDataFlowsApiVersion); - _dataFactoryDataFlowDataFlowsRestClient = new DataFlowsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, dataFactoryDataFlowDataFlowsApiVersion); -#if DEBUG - ValidateResourceId(Id); -#endif - } - - /// Gets the resource type for the operations. - public static readonly ResourceType ResourceType = "Microsoft.DataFactory/factories/dataflows"; - - /// Gets whether or not the current instance has data. - public virtual bool HasData { get; } - - /// Gets the data representing this Feature. - /// Throws if there is no data loaded in the current instance. - public virtual DataFactoryDataFlowData Data - { - get - { - if (!HasData) - throw new InvalidOperationException("The current instance does not have data, you must call Get first."); - return _data; - } - } - - internal static void ValidateResourceId(ResourceIdentifier id) - { - if (id.ResourceType != ResourceType) - throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, ResourceType), nameof(id)); - } - - /// - /// Gets a data flow. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName}/dataflows/{dataFlowName} - /// - /// - /// Operation Id - /// DataFlows_Get - /// - /// - /// - /// ETag of the data flow entity. Should only be specified for get. If the ETag matches the existing entity tag, or if * was provided, then no content will be returned. - /// The cancellation token to use. - public virtual async Task> GetAsync(string ifNoneMatch = null, CancellationToken cancellationToken = default) - { - using var scope = _dataFactoryDataFlowDataFlowsClientDiagnostics.CreateScope("DataFactoryDataFlowResource.Get"); - scope.Start(); - try - { - var response = await _dataFactoryDataFlowDataFlowsRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, ifNoneMatch, cancellationToken).ConfigureAwait(false); - if (response.Value == null) - throw new RequestFailedException(response.GetRawResponse()); - return Response.FromValue(new DataFactoryDataFlowResource(Client, response.Value), response.GetRawResponse()); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Gets a data flow. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName}/dataflows/{dataFlowName} - /// - /// - /// Operation Id - /// DataFlows_Get - /// - /// - /// - /// ETag of the data flow entity. Should only be specified for get. If the ETag matches the existing entity tag, or if * was provided, then no content will be returned. - /// The cancellation token to use. - public virtual Response Get(string ifNoneMatch = null, CancellationToken cancellationToken = default) - { - using var scope = _dataFactoryDataFlowDataFlowsClientDiagnostics.CreateScope("DataFactoryDataFlowResource.Get"); - scope.Start(); - try - { - var response = _dataFactoryDataFlowDataFlowsRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, ifNoneMatch, cancellationToken); - if (response.Value == null) - throw new RequestFailedException(response.GetRawResponse()); - return Response.FromValue(new DataFactoryDataFlowResource(Client, response.Value), response.GetRawResponse()); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Deletes a data flow. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName}/dataflows/{dataFlowName} - /// - /// - /// Operation Id - /// DataFlows_Delete - /// - /// - /// - /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. - /// The cancellation token to use. - public virtual async Task DeleteAsync(WaitUntil waitUntil, CancellationToken cancellationToken = default) - { - using var scope = _dataFactoryDataFlowDataFlowsClientDiagnostics.CreateScope("DataFactoryDataFlowResource.Delete"); - scope.Start(); - try - { - var response = await _dataFactoryDataFlowDataFlowsRestClient.DeleteAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); - var operation = new DataFactoryArmOperation(response); - if (waitUntil == WaitUntil.Completed) - await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false); - return operation; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Deletes a data flow. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName}/dataflows/{dataFlowName} - /// - /// - /// Operation Id - /// DataFlows_Delete - /// - /// - /// - /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. - /// The cancellation token to use. - public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancellationToken = default) - { - using var scope = _dataFactoryDataFlowDataFlowsClientDiagnostics.CreateScope("DataFactoryDataFlowResource.Delete"); - scope.Start(); - try - { - var response = _dataFactoryDataFlowDataFlowsRestClient.Delete(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); - var operation = new DataFactoryArmOperation(response); - if (waitUntil == WaitUntil.Completed) - operation.WaitForCompletionResponse(cancellationToken); - return operation; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Creates or updates a data flow. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName}/dataflows/{dataFlowName} - /// - /// - /// Operation Id - /// DataFlows_CreateOrUpdate - /// - /// - /// - /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. - /// Data flow resource definition. - /// ETag of the data flow entity. Should only be specified for update, for which it should match existing entity or can be * for unconditional update. - /// The cancellation token to use. - /// is null. - public virtual async Task> UpdateAsync(WaitUntil waitUntil, DataFactoryDataFlowData data, string ifMatch = null, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(data, nameof(data)); - - using var scope = _dataFactoryDataFlowDataFlowsClientDiagnostics.CreateScope("DataFactoryDataFlowResource.Update"); - scope.Start(); - try - { - var response = await _dataFactoryDataFlowDataFlowsRestClient.CreateOrUpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data, ifMatch, cancellationToken).ConfigureAwait(false); - var operation = new DataFactoryArmOperation(Response.FromValue(new DataFactoryDataFlowResource(Client, response), response.GetRawResponse())); - if (waitUntil == WaitUntil.Completed) - await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); - return operation; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Creates or updates a data flow. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName}/dataflows/{dataFlowName} - /// - /// - /// Operation Id - /// DataFlows_CreateOrUpdate - /// - /// - /// - /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. - /// Data flow resource definition. - /// ETag of the data flow entity. Should only be specified for update, for which it should match existing entity or can be * for unconditional update. - /// The cancellation token to use. - /// is null. - public virtual ArmOperation Update(WaitUntil waitUntil, DataFactoryDataFlowData data, string ifMatch = null, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(data, nameof(data)); - - using var scope = _dataFactoryDataFlowDataFlowsClientDiagnostics.CreateScope("DataFactoryDataFlowResource.Update"); - scope.Start(); - try - { - var response = _dataFactoryDataFlowDataFlowsRestClient.CreateOrUpdate(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data, ifMatch, cancellationToken); - var operation = new DataFactoryArmOperation(Response.FromValue(new DataFactoryDataFlowResource(Client, response), response.GetRawResponse())); - if (waitUntil == WaitUntil.Completed) - operation.WaitForCompletion(cancellationToken); - return operation; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/DataFactoryDatasetCollection.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/DataFactoryDatasetCollection.cs deleted file mode 100644 index d5f79822..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/DataFactoryDatasetCollection.cs +++ /dev/null @@ -1,337 +0,0 @@ -// - -#nullable disable - -using System.Collections; -using System.Globalization; -using Azure.Core; -using Azure.Core.Pipeline; - -namespace Azure.ResourceManager.DataFactory -{ - /// - /// A class representing a collection of and their operations. - /// Each in the collection will belong to the same instance of . - /// To get a instance call the GetDataFactoryDatasets method from an instance of . - /// - public partial class DataFactoryDatasetCollection : ArmCollection, IEnumerable, IAsyncEnumerable - { - private readonly ClientDiagnostics _dataFactoryDatasetDatasetsClientDiagnostics; - private readonly DatasetsRestOperations _dataFactoryDatasetDatasetsRestClient; - - /// Initializes a new instance of the class for mocking. - protected DataFactoryDatasetCollection() - { - } - - /// Initializes a new instance of the class. - /// The client parameters to use in these operations. - /// The identifier of the parent resource that is the target of operations. - internal DataFactoryDatasetCollection(ArmClient client, ResourceIdentifier id) : base(client, id) - { - _dataFactoryDatasetDatasetsClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.DataFactory", DataFactoryDatasetResource.ResourceType.Namespace, Diagnostics); - TryGetApiVersion(DataFactoryDatasetResource.ResourceType, out string dataFactoryDatasetDatasetsApiVersion); - _dataFactoryDatasetDatasetsRestClient = new DatasetsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, dataFactoryDatasetDatasetsApiVersion); -#if DEBUG - ValidateResourceId(Id); -#endif - } - - internal static void ValidateResourceId(ResourceIdentifier id) - { - if (id.ResourceType != DataFactoryResource.ResourceType) - throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, DataFactoryResource.ResourceType), nameof(id)); - } - - /// - /// Creates or updates a dataset. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName}/datasets/{datasetName} - /// - /// - /// Operation Id - /// Datasets_CreateOrUpdate - /// - /// - /// - /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. - /// The dataset name. - /// Dataset resource definition. - /// ETag of the dataset entity. Should only be specified for update, for which it should match existing entity or can be * for unconditional update. - /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// or is null. - public virtual async Task> CreateOrUpdateAsync(WaitUntil waitUntil, string datasetName, DataFactoryDatasetData data, string ifMatch = null, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(datasetName, nameof(datasetName)); - Argument.AssertNotNull(data, nameof(data)); - - using var scope = _dataFactoryDatasetDatasetsClientDiagnostics.CreateScope("DataFactoryDatasetCollection.CreateOrUpdate"); - scope.Start(); - try - { - var response = await _dataFactoryDatasetDatasetsRestClient.CreateOrUpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, datasetName, data, ifMatch, cancellationToken).ConfigureAwait(false); - var operation = new DataFactoryArmOperation(Response.FromValue(new DataFactoryDatasetResource(Client, response), response.GetRawResponse())); - if (waitUntil == WaitUntil.Completed) - await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); - return operation; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Creates or updates a dataset. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName}/datasets/{datasetName} - /// - /// - /// Operation Id - /// Datasets_CreateOrUpdate - /// - /// - /// - /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. - /// The dataset name. - /// Dataset resource definition. - /// ETag of the dataset entity. Should only be specified for update, for which it should match existing entity or can be * for unconditional update. - /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// or is null. - public virtual ArmOperation CreateOrUpdate(WaitUntil waitUntil, string datasetName, DataFactoryDatasetData data, string ifMatch = null, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(datasetName, nameof(datasetName)); - Argument.AssertNotNull(data, nameof(data)); - - using var scope = _dataFactoryDatasetDatasetsClientDiagnostics.CreateScope("DataFactoryDatasetCollection.CreateOrUpdate"); - scope.Start(); - try - { - var response = _dataFactoryDatasetDatasetsRestClient.CreateOrUpdate(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, datasetName, data, ifMatch, cancellationToken); - var operation = new DataFactoryArmOperation(Response.FromValue(new DataFactoryDatasetResource(Client, response), response.GetRawResponse())); - if (waitUntil == WaitUntil.Completed) - operation.WaitForCompletion(cancellationToken); - return operation; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Gets a dataset. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName}/datasets/{datasetName} - /// - /// - /// Operation Id - /// Datasets_Get - /// - /// - /// - /// The dataset name. - /// ETag of the dataset entity. Should only be specified for get. If the ETag matches the existing entity tag, or if * was provided, then no content will be returned. - /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// is null. - public virtual async Task> GetAsync(string datasetName, string ifNoneMatch = null, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(datasetName, nameof(datasetName)); - - using var scope = _dataFactoryDatasetDatasetsClientDiagnostics.CreateScope("DataFactoryDatasetCollection.Get"); - scope.Start(); - try - { - var response = await _dataFactoryDatasetDatasetsRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, datasetName, ifNoneMatch, cancellationToken).ConfigureAwait(false); - if (response.Value == null) - throw new RequestFailedException(response.GetRawResponse()); - return Response.FromValue(new DataFactoryDatasetResource(Client, response.Value), response.GetRawResponse()); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Gets a dataset. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName}/datasets/{datasetName} - /// - /// - /// Operation Id - /// Datasets_Get - /// - /// - /// - /// The dataset name. - /// ETag of the dataset entity. Should only be specified for get. If the ETag matches the existing entity tag, or if * was provided, then no content will be returned. - /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// is null. - public virtual Response Get(string datasetName, string ifNoneMatch = null, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(datasetName, nameof(datasetName)); - - using var scope = _dataFactoryDatasetDatasetsClientDiagnostics.CreateScope("DataFactoryDatasetCollection.Get"); - scope.Start(); - try - { - var response = _dataFactoryDatasetDatasetsRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, datasetName, ifNoneMatch, cancellationToken); - if (response.Value == null) - throw new RequestFailedException(response.GetRawResponse()); - return Response.FromValue(new DataFactoryDatasetResource(Client, response.Value), response.GetRawResponse()); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Lists datasets. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName}/datasets - /// - /// - /// Operation Id - /// Datasets_ListByFactory - /// - /// - /// - /// The cancellation token to use. - /// An async collection of that may take multiple service requests to iterate over. - public virtual AsyncPageable GetAllAsync(CancellationToken cancellationToken = default) - { - HttpMessage FirstPageRequest(int? pageSizeHint) => _dataFactoryDatasetDatasetsRestClient.CreateListByFactoryRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name); - HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _dataFactoryDatasetDatasetsRestClient.CreateListByFactoryNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name); - return PageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new DataFactoryDatasetResource(Client, DataFactoryDatasetData.DeserializeDataFactoryDatasetData(e)), _dataFactoryDatasetDatasetsClientDiagnostics, Pipeline, "DataFactoryDatasetCollection.GetAll", "value", "nextLink", cancellationToken); - } - - /// - /// Lists datasets. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName}/datasets - /// - /// - /// Operation Id - /// Datasets_ListByFactory - /// - /// - /// - /// The cancellation token to use. - /// A collection of that may take multiple service requests to iterate over. - public virtual Pageable GetAll(CancellationToken cancellationToken = default) - { - HttpMessage FirstPageRequest(int? pageSizeHint) => _dataFactoryDatasetDatasetsRestClient.CreateListByFactoryRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name); - HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _dataFactoryDatasetDatasetsRestClient.CreateListByFactoryNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name); - return PageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new DataFactoryDatasetResource(Client, DataFactoryDatasetData.DeserializeDataFactoryDatasetData(e)), _dataFactoryDatasetDatasetsClientDiagnostics, Pipeline, "DataFactoryDatasetCollection.GetAll", "value", "nextLink", cancellationToken); - } - - /// - /// Checks to see if the resource exists in azure. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName}/datasets/{datasetName} - /// - /// - /// Operation Id - /// Datasets_Get - /// - /// - /// - /// The dataset name. - /// ETag of the dataset entity. Should only be specified for get. If the ETag matches the existing entity tag, or if * was provided, then no content will be returned. - /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// is null. - public virtual async Task> ExistsAsync(string datasetName, string ifNoneMatch = null, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(datasetName, nameof(datasetName)); - - using var scope = _dataFactoryDatasetDatasetsClientDiagnostics.CreateScope("DataFactoryDatasetCollection.Exists"); - scope.Start(); - try - { - var response = await _dataFactoryDatasetDatasetsRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, datasetName, ifNoneMatch, cancellationToken: cancellationToken).ConfigureAwait(false); - return Response.FromValue(response.Value != null, response.GetRawResponse()); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Checks to see if the resource exists in azure. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName}/datasets/{datasetName} - /// - /// - /// Operation Id - /// Datasets_Get - /// - /// - /// - /// The dataset name. - /// ETag of the dataset entity. Should only be specified for get. If the ETag matches the existing entity tag, or if * was provided, then no content will be returned. - /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// is null. - public virtual Response Exists(string datasetName, string ifNoneMatch = null, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(datasetName, nameof(datasetName)); - - using var scope = _dataFactoryDatasetDatasetsClientDiagnostics.CreateScope("DataFactoryDatasetCollection.Exists"); - scope.Start(); - try - { - var response = _dataFactoryDatasetDatasetsRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, datasetName, ifNoneMatch, cancellationToken: cancellationToken); - return Response.FromValue(response.Value != null, response.GetRawResponse()); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - IEnumerator IEnumerable.GetEnumerator() - { - return GetAll().GetEnumerator(); - } - - IEnumerator IEnumerable.GetEnumerator() - { - return GetAll().GetEnumerator(); - } - - IAsyncEnumerator IAsyncEnumerable.GetAsyncEnumerator(CancellationToken cancellationToken) - { - return GetAllAsync(cancellationToken: cancellationToken).GetAsyncEnumerator(cancellationToken); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/DataFactoryDatasetData.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/DataFactoryDatasetData.cs deleted file mode 100644 index 7922837a..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/DataFactoryDatasetData.cs +++ /dev/null @@ -1,57 +0,0 @@ -// - -#nullable disable - -using Azure.Core; -using AzureDataFactory.TestingFramework.Models; -using Azure.ResourceManager.Models; - -namespace Azure.ResourceManager.DataFactory -{ - /// - /// A class representing the DataFactoryDataset data model. - /// Dataset resource type. - /// - public partial class DataFactoryDatasetData : ResourceData - { - /// Initializes a new instance of DataFactoryDatasetData. - /// - /// Dataset properties. - /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. - /// The available derived classes include , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , and . - /// - /// is null. - public DataFactoryDatasetData(DataFactoryDatasetProperties properties) - { - Argument.AssertNotNull(properties, nameof(properties)); - - Properties = properties; - } - - /// Initializes a new instance of DataFactoryDatasetData. - /// The id. - /// The name. - /// The resourceType. - /// The systemData. - /// - /// Dataset properties. - /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. - /// The available derived classes include , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , and . - /// - /// Etag identifies change in the resource. - internal DataFactoryDatasetData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, DataFactoryDatasetProperties properties, ETag? eTag) : base(id, name, resourceType, systemData) - { - Properties = properties; - ETag = eTag; - } - - /// - /// Dataset properties. - /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. - /// The available derived classes include , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , and . - /// - public DataFactoryDatasetProperties Properties { get; set; } - /// Etag identifies change in the resource. - public ETag? ETag { get; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/DataFactoryDatasetResource.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/DataFactoryDatasetResource.cs deleted file mode 100644 index 33d3c87f..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/DataFactoryDatasetResource.cs +++ /dev/null @@ -1,293 +0,0 @@ -// - -#nullable disable - -using System.Globalization; -using Azure.Core; -using Azure.Core.Pipeline; - -namespace Azure.ResourceManager.DataFactory -{ - /// - /// A Class representing a DataFactoryDataset along with the instance operations that can be performed on it. - /// If you have a you can construct a - /// from an instance of using the GetDataFactoryDatasetResource method. - /// Otherwise you can get one from its parent resource using the GetDataFactoryDataset method. - /// - public partial class DataFactoryDatasetResource : ArmResource - { - /// Generate the resource identifier of a instance. - public static ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string factoryName, string datasetName) - { - var resourceId = $"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName}/datasets/{datasetName}"; - return new ResourceIdentifier(resourceId); - } - - private readonly ClientDiagnostics _dataFactoryDatasetDatasetsClientDiagnostics; - private readonly DatasetsRestOperations _dataFactoryDatasetDatasetsRestClient; - private readonly DataFactoryDatasetData _data; - - /// Initializes a new instance of the class for mocking. - protected DataFactoryDatasetResource() - { - } - - /// Initializes a new instance of the class. - /// The client parameters to use in these operations. - /// The resource that is the target of operations. - internal DataFactoryDatasetResource(ArmClient client, DataFactoryDatasetData data) : this(client, data.Id) - { - HasData = true; - _data = data; - } - - /// Initializes a new instance of the class. - /// The client parameters to use in these operations. - /// The identifier of the resource that is the target of operations. - internal DataFactoryDatasetResource(ArmClient client, ResourceIdentifier id) : base(client, id) - { - _dataFactoryDatasetDatasetsClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.DataFactory", ResourceType.Namespace, Diagnostics); - TryGetApiVersion(ResourceType, out string dataFactoryDatasetDatasetsApiVersion); - _dataFactoryDatasetDatasetsRestClient = new DatasetsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, dataFactoryDatasetDatasetsApiVersion); -#if DEBUG - ValidateResourceId(Id); -#endif - } - - /// Gets the resource type for the operations. - public static readonly ResourceType ResourceType = "Microsoft.DataFactory/factories/datasets"; - - /// Gets whether or not the current instance has data. - public virtual bool HasData { get; } - - /// Gets the data representing this Feature. - /// Throws if there is no data loaded in the current instance. - public virtual DataFactoryDatasetData Data - { - get - { - if (!HasData) - throw new InvalidOperationException("The current instance does not have data, you must call Get first."); - return _data; - } - } - - internal static void ValidateResourceId(ResourceIdentifier id) - { - if (id.ResourceType != ResourceType) - throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, ResourceType), nameof(id)); - } - - /// - /// Gets a dataset. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName}/datasets/{datasetName} - /// - /// - /// Operation Id - /// Datasets_Get - /// - /// - /// - /// ETag of the dataset entity. Should only be specified for get. If the ETag matches the existing entity tag, or if * was provided, then no content will be returned. - /// The cancellation token to use. - public virtual async Task> GetAsync(string ifNoneMatch = null, CancellationToken cancellationToken = default) - { - using var scope = _dataFactoryDatasetDatasetsClientDiagnostics.CreateScope("DataFactoryDatasetResource.Get"); - scope.Start(); - try - { - var response = await _dataFactoryDatasetDatasetsRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, ifNoneMatch, cancellationToken).ConfigureAwait(false); - if (response.Value == null) - throw new RequestFailedException(response.GetRawResponse()); - return Response.FromValue(new DataFactoryDatasetResource(Client, response.Value), response.GetRawResponse()); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Gets a dataset. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName}/datasets/{datasetName} - /// - /// - /// Operation Id - /// Datasets_Get - /// - /// - /// - /// ETag of the dataset entity. Should only be specified for get. If the ETag matches the existing entity tag, or if * was provided, then no content will be returned. - /// The cancellation token to use. - public virtual Response Get(string ifNoneMatch = null, CancellationToken cancellationToken = default) - { - using var scope = _dataFactoryDatasetDatasetsClientDiagnostics.CreateScope("DataFactoryDatasetResource.Get"); - scope.Start(); - try - { - var response = _dataFactoryDatasetDatasetsRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, ifNoneMatch, cancellationToken); - if (response.Value == null) - throw new RequestFailedException(response.GetRawResponse()); - return Response.FromValue(new DataFactoryDatasetResource(Client, response.Value), response.GetRawResponse()); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Deletes a dataset. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName}/datasets/{datasetName} - /// - /// - /// Operation Id - /// Datasets_Delete - /// - /// - /// - /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. - /// The cancellation token to use. - public virtual async Task DeleteAsync(WaitUntil waitUntil, CancellationToken cancellationToken = default) - { - using var scope = _dataFactoryDatasetDatasetsClientDiagnostics.CreateScope("DataFactoryDatasetResource.Delete"); - scope.Start(); - try - { - var response = await _dataFactoryDatasetDatasetsRestClient.DeleteAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); - var operation = new DataFactoryArmOperation(response); - if (waitUntil == WaitUntil.Completed) - await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false); - return operation; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Deletes a dataset. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName}/datasets/{datasetName} - /// - /// - /// Operation Id - /// Datasets_Delete - /// - /// - /// - /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. - /// The cancellation token to use. - public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancellationToken = default) - { - using var scope = _dataFactoryDatasetDatasetsClientDiagnostics.CreateScope("DataFactoryDatasetResource.Delete"); - scope.Start(); - try - { - var response = _dataFactoryDatasetDatasetsRestClient.Delete(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); - var operation = new DataFactoryArmOperation(response); - if (waitUntil == WaitUntil.Completed) - operation.WaitForCompletionResponse(cancellationToken); - return operation; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Creates or updates a dataset. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName}/datasets/{datasetName} - /// - /// - /// Operation Id - /// Datasets_CreateOrUpdate - /// - /// - /// - /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. - /// Dataset resource definition. - /// ETag of the dataset entity. Should only be specified for update, for which it should match existing entity or can be * for unconditional update. - /// The cancellation token to use. - /// is null. - public virtual async Task> UpdateAsync(WaitUntil waitUntil, DataFactoryDatasetData data, string ifMatch = null, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(data, nameof(data)); - - using var scope = _dataFactoryDatasetDatasetsClientDiagnostics.CreateScope("DataFactoryDatasetResource.Update"); - scope.Start(); - try - { - var response = await _dataFactoryDatasetDatasetsRestClient.CreateOrUpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data, ifMatch, cancellationToken).ConfigureAwait(false); - var operation = new DataFactoryArmOperation(Response.FromValue(new DataFactoryDatasetResource(Client, response), response.GetRawResponse())); - if (waitUntil == WaitUntil.Completed) - await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); - return operation; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Creates or updates a dataset. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName}/datasets/{datasetName} - /// - /// - /// Operation Id - /// Datasets_CreateOrUpdate - /// - /// - /// - /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. - /// Dataset resource definition. - /// ETag of the dataset entity. Should only be specified for update, for which it should match existing entity or can be * for unconditional update. - /// The cancellation token to use. - /// is null. - public virtual ArmOperation Update(WaitUntil waitUntil, DataFactoryDatasetData data, string ifMatch = null, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(data, nameof(data)); - - using var scope = _dataFactoryDatasetDatasetsClientDiagnostics.CreateScope("DataFactoryDatasetResource.Update"); - scope.Start(); - try - { - var response = _dataFactoryDatasetDatasetsRestClient.CreateOrUpdate(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data, ifMatch, cancellationToken); - var operation = new DataFactoryArmOperation(Response.FromValue(new DataFactoryDatasetResource(Client, response), response.GetRawResponse())); - if (waitUntil == WaitUntil.Completed) - operation.WaitForCompletion(cancellationToken); - return operation; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/DataFactoryGlobalParameterCollection.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/DataFactoryGlobalParameterCollection.cs deleted file mode 100644 index 611c8035..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/DataFactoryGlobalParameterCollection.cs +++ /dev/null @@ -1,331 +0,0 @@ -// - -#nullable disable - -using System.Collections; -using System.Globalization; -using Azure.Core; -using Azure.Core.Pipeline; - -namespace Azure.ResourceManager.DataFactory -{ - /// - /// A class representing a collection of and their operations. - /// Each in the collection will belong to the same instance of . - /// To get a instance call the GetDataFactoryGlobalParameters method from an instance of . - /// - public partial class DataFactoryGlobalParameterCollection : ArmCollection, IEnumerable, IAsyncEnumerable - { - private readonly ClientDiagnostics _dataFactoryGlobalParameterGlobalParametersClientDiagnostics; - private readonly GlobalParametersRestOperations _dataFactoryGlobalParameterGlobalParametersRestClient; - - /// Initializes a new instance of the class for mocking. - protected DataFactoryGlobalParameterCollection() - { - } - - /// Initializes a new instance of the class. - /// The client parameters to use in these operations. - /// The identifier of the parent resource that is the target of operations. - internal DataFactoryGlobalParameterCollection(ArmClient client, ResourceIdentifier id) : base(client, id) - { - _dataFactoryGlobalParameterGlobalParametersClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.DataFactory", DataFactoryGlobalParameterResource.ResourceType.Namespace, Diagnostics); - TryGetApiVersion(DataFactoryGlobalParameterResource.ResourceType, out string dataFactoryGlobalParameterGlobalParametersApiVersion); - _dataFactoryGlobalParameterGlobalParametersRestClient = new GlobalParametersRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, dataFactoryGlobalParameterGlobalParametersApiVersion); -#if DEBUG - ValidateResourceId(Id); -#endif - } - - internal static void ValidateResourceId(ResourceIdentifier id) - { - if (id.ResourceType != DataFactoryResource.ResourceType) - throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, DataFactoryResource.ResourceType), nameof(id)); - } - - /// - /// Creates or updates a Global parameter - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName}/globalParameters/{globalParameterName} - /// - /// - /// Operation Id - /// GlobalParameters_CreateOrUpdate - /// - /// - /// - /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. - /// The global parameter name. - /// Global parameter resource definition. - /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// or is null. - public virtual async Task> CreateOrUpdateAsync(WaitUntil waitUntil, string globalParameterName, DataFactoryGlobalParameterData data, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(globalParameterName, nameof(globalParameterName)); - Argument.AssertNotNull(data, nameof(data)); - - using var scope = _dataFactoryGlobalParameterGlobalParametersClientDiagnostics.CreateScope("DataFactoryGlobalParameterCollection.CreateOrUpdate"); - scope.Start(); - try - { - var response = await _dataFactoryGlobalParameterGlobalParametersRestClient.CreateOrUpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, globalParameterName, data, cancellationToken).ConfigureAwait(false); - var operation = new DataFactoryArmOperation(Response.FromValue(new DataFactoryGlobalParameterResource(Client, response), response.GetRawResponse())); - if (waitUntil == WaitUntil.Completed) - await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); - return operation; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Creates or updates a Global parameter - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName}/globalParameters/{globalParameterName} - /// - /// - /// Operation Id - /// GlobalParameters_CreateOrUpdate - /// - /// - /// - /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. - /// The global parameter name. - /// Global parameter resource definition. - /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// or is null. - public virtual ArmOperation CreateOrUpdate(WaitUntil waitUntil, string globalParameterName, DataFactoryGlobalParameterData data, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(globalParameterName, nameof(globalParameterName)); - Argument.AssertNotNull(data, nameof(data)); - - using var scope = _dataFactoryGlobalParameterGlobalParametersClientDiagnostics.CreateScope("DataFactoryGlobalParameterCollection.CreateOrUpdate"); - scope.Start(); - try - { - var response = _dataFactoryGlobalParameterGlobalParametersRestClient.CreateOrUpdate(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, globalParameterName, data, cancellationToken); - var operation = new DataFactoryArmOperation(Response.FromValue(new DataFactoryGlobalParameterResource(Client, response), response.GetRawResponse())); - if (waitUntil == WaitUntil.Completed) - operation.WaitForCompletion(cancellationToken); - return operation; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Gets a Global parameter - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName}/globalParameters/{globalParameterName} - /// - /// - /// Operation Id - /// GlobalParameters_Get - /// - /// - /// - /// The global parameter name. - /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// is null. - public virtual async Task> GetAsync(string globalParameterName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(globalParameterName, nameof(globalParameterName)); - - using var scope = _dataFactoryGlobalParameterGlobalParametersClientDiagnostics.CreateScope("DataFactoryGlobalParameterCollection.Get"); - scope.Start(); - try - { - var response = await _dataFactoryGlobalParameterGlobalParametersRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, globalParameterName, cancellationToken).ConfigureAwait(false); - if (response.Value == null) - throw new RequestFailedException(response.GetRawResponse()); - return Response.FromValue(new DataFactoryGlobalParameterResource(Client, response.Value), response.GetRawResponse()); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Gets a Global parameter - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName}/globalParameters/{globalParameterName} - /// - /// - /// Operation Id - /// GlobalParameters_Get - /// - /// - /// - /// The global parameter name. - /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// is null. - public virtual Response Get(string globalParameterName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(globalParameterName, nameof(globalParameterName)); - - using var scope = _dataFactoryGlobalParameterGlobalParametersClientDiagnostics.CreateScope("DataFactoryGlobalParameterCollection.Get"); - scope.Start(); - try - { - var response = _dataFactoryGlobalParameterGlobalParametersRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, globalParameterName, cancellationToken); - if (response.Value == null) - throw new RequestFailedException(response.GetRawResponse()); - return Response.FromValue(new DataFactoryGlobalParameterResource(Client, response.Value), response.GetRawResponse()); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Lists Global parameters - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName}/globalParameters - /// - /// - /// Operation Id - /// GlobalParameters_ListByFactory - /// - /// - /// - /// The cancellation token to use. - /// An async collection of that may take multiple service requests to iterate over. - public virtual AsyncPageable GetAllAsync(CancellationToken cancellationToken = default) - { - HttpMessage FirstPageRequest(int? pageSizeHint) => _dataFactoryGlobalParameterGlobalParametersRestClient.CreateListByFactoryRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name); - HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _dataFactoryGlobalParameterGlobalParametersRestClient.CreateListByFactoryNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name); - return PageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new DataFactoryGlobalParameterResource(Client, DataFactoryGlobalParameterData.DeserializeDataFactoryGlobalParameterData(e)), _dataFactoryGlobalParameterGlobalParametersClientDiagnostics, Pipeline, "DataFactoryGlobalParameterCollection.GetAll", "value", "nextLink", cancellationToken); - } - - /// - /// Lists Global parameters - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName}/globalParameters - /// - /// - /// Operation Id - /// GlobalParameters_ListByFactory - /// - /// - /// - /// The cancellation token to use. - /// A collection of that may take multiple service requests to iterate over. - public virtual Pageable GetAll(CancellationToken cancellationToken = default) - { - HttpMessage FirstPageRequest(int? pageSizeHint) => _dataFactoryGlobalParameterGlobalParametersRestClient.CreateListByFactoryRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name); - HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _dataFactoryGlobalParameterGlobalParametersRestClient.CreateListByFactoryNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name); - return PageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new DataFactoryGlobalParameterResource(Client, DataFactoryGlobalParameterData.DeserializeDataFactoryGlobalParameterData(e)), _dataFactoryGlobalParameterGlobalParametersClientDiagnostics, Pipeline, "DataFactoryGlobalParameterCollection.GetAll", "value", "nextLink", cancellationToken); - } - - /// - /// Checks to see if the resource exists in azure. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName}/globalParameters/{globalParameterName} - /// - /// - /// Operation Id - /// GlobalParameters_Get - /// - /// - /// - /// The global parameter name. - /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// is null. - public virtual async Task> ExistsAsync(string globalParameterName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(globalParameterName, nameof(globalParameterName)); - - using var scope = _dataFactoryGlobalParameterGlobalParametersClientDiagnostics.CreateScope("DataFactoryGlobalParameterCollection.Exists"); - scope.Start(); - try - { - var response = await _dataFactoryGlobalParameterGlobalParametersRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, globalParameterName, cancellationToken: cancellationToken).ConfigureAwait(false); - return Response.FromValue(response.Value != null, response.GetRawResponse()); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Checks to see if the resource exists in azure. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName}/globalParameters/{globalParameterName} - /// - /// - /// Operation Id - /// GlobalParameters_Get - /// - /// - /// - /// The global parameter name. - /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// is null. - public virtual Response Exists(string globalParameterName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(globalParameterName, nameof(globalParameterName)); - - using var scope = _dataFactoryGlobalParameterGlobalParametersClientDiagnostics.CreateScope("DataFactoryGlobalParameterCollection.Exists"); - scope.Start(); - try - { - var response = _dataFactoryGlobalParameterGlobalParametersRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, globalParameterName, cancellationToken: cancellationToken); - return Response.FromValue(response.Value != null, response.GetRawResponse()); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - IEnumerator IEnumerable.GetEnumerator() - { - return GetAll().GetEnumerator(); - } - - IEnumerator IEnumerable.GetEnumerator() - { - return GetAll().GetEnumerator(); - } - - IAsyncEnumerator IAsyncEnumerable.GetAsyncEnumerator(CancellationToken cancellationToken) - { - return GetAllAsync(cancellationToken: cancellationToken).GetAsyncEnumerator(cancellationToken); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/DataFactoryGlobalParameterData.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/DataFactoryGlobalParameterData.cs deleted file mode 100644 index acb878b1..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/DataFactoryGlobalParameterData.cs +++ /dev/null @@ -1,45 +0,0 @@ -// - -#nullable disable - -using Azure.Core; -using AzureDataFactory.TestingFramework.Models; -using Azure.ResourceManager.Models; - -namespace Azure.ResourceManager.DataFactory -{ - /// - /// A class representing the DataFactoryGlobalParameter data model. - /// Global parameters resource type. - /// - public partial class DataFactoryGlobalParameterData : ResourceData - { - /// Initializes a new instance of DataFactoryGlobalParameterData. - /// Properties of the global parameter. - /// is null. - public DataFactoryGlobalParameterData(IDictionary properties) - { - Argument.AssertNotNull(properties, nameof(properties)); - - Properties = properties; - } - - /// Initializes a new instance of DataFactoryGlobalParameterData. - /// The id. - /// The name. - /// The resourceType. - /// The systemData. - /// Properties of the global parameter. - /// Etag identifies change in the resource. - internal DataFactoryGlobalParameterData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary properties, ETag? eTag) : base(id, name, resourceType, systemData) - { - Properties = properties; - ETag = eTag; - } - - /// Properties of the global parameter. - public IDictionary Properties { get; } - /// Etag identifies change in the resource. - public ETag? ETag { get; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/DataFactoryGlobalParameterResource.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/DataFactoryGlobalParameterResource.cs deleted file mode 100644 index 47cd7ba3..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/DataFactoryGlobalParameterResource.cs +++ /dev/null @@ -1,289 +0,0 @@ -// - -#nullable disable - -using System.Globalization; -using Azure.Core; -using Azure.Core.Pipeline; - -namespace Azure.ResourceManager.DataFactory -{ - /// - /// A Class representing a DataFactoryGlobalParameter along with the instance operations that can be performed on it. - /// If you have a you can construct a - /// from an instance of using the GetDataFactoryGlobalParameterResource method. - /// Otherwise you can get one from its parent resource using the GetDataFactoryGlobalParameter method. - /// - public partial class DataFactoryGlobalParameterResource : ArmResource - { - /// Generate the resource identifier of a instance. - public static ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string factoryName, string globalParameterName) - { - var resourceId = $"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName}/globalParameters/{globalParameterName}"; - return new ResourceIdentifier(resourceId); - } - - private readonly ClientDiagnostics _dataFactoryGlobalParameterGlobalParametersClientDiagnostics; - private readonly GlobalParametersRestOperations _dataFactoryGlobalParameterGlobalParametersRestClient; - private readonly DataFactoryGlobalParameterData _data; - - /// Initializes a new instance of the class for mocking. - protected DataFactoryGlobalParameterResource() - { - } - - /// Initializes a new instance of the class. - /// The client parameters to use in these operations. - /// The resource that is the target of operations. - internal DataFactoryGlobalParameterResource(ArmClient client, DataFactoryGlobalParameterData data) : this(client, data.Id) - { - HasData = true; - _data = data; - } - - /// Initializes a new instance of the class. - /// The client parameters to use in these operations. - /// The identifier of the resource that is the target of operations. - internal DataFactoryGlobalParameterResource(ArmClient client, ResourceIdentifier id) : base(client, id) - { - _dataFactoryGlobalParameterGlobalParametersClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.DataFactory", ResourceType.Namespace, Diagnostics); - TryGetApiVersion(ResourceType, out string dataFactoryGlobalParameterGlobalParametersApiVersion); - _dataFactoryGlobalParameterGlobalParametersRestClient = new GlobalParametersRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, dataFactoryGlobalParameterGlobalParametersApiVersion); -#if DEBUG - ValidateResourceId(Id); -#endif - } - - /// Gets the resource type for the operations. - public static readonly ResourceType ResourceType = "Microsoft.DataFactory/factories/globalParameters"; - - /// Gets whether or not the current instance has data. - public virtual bool HasData { get; } - - /// Gets the data representing this Feature. - /// Throws if there is no data loaded in the current instance. - public virtual DataFactoryGlobalParameterData Data - { - get - { - if (!HasData) - throw new InvalidOperationException("The current instance does not have data, you must call Get first."); - return _data; - } - } - - internal static void ValidateResourceId(ResourceIdentifier id) - { - if (id.ResourceType != ResourceType) - throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, ResourceType), nameof(id)); - } - - /// - /// Gets a Global parameter - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName}/globalParameters/{globalParameterName} - /// - /// - /// Operation Id - /// GlobalParameters_Get - /// - /// - /// - /// The cancellation token to use. - public virtual async Task> GetAsync(CancellationToken cancellationToken = default) - { - using var scope = _dataFactoryGlobalParameterGlobalParametersClientDiagnostics.CreateScope("DataFactoryGlobalParameterResource.Get"); - scope.Start(); - try - { - var response = await _dataFactoryGlobalParameterGlobalParametersRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); - if (response.Value == null) - throw new RequestFailedException(response.GetRawResponse()); - return Response.FromValue(new DataFactoryGlobalParameterResource(Client, response.Value), response.GetRawResponse()); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Gets a Global parameter - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName}/globalParameters/{globalParameterName} - /// - /// - /// Operation Id - /// GlobalParameters_Get - /// - /// - /// - /// The cancellation token to use. - public virtual Response Get(CancellationToken cancellationToken = default) - { - using var scope = _dataFactoryGlobalParameterGlobalParametersClientDiagnostics.CreateScope("DataFactoryGlobalParameterResource.Get"); - scope.Start(); - try - { - var response = _dataFactoryGlobalParameterGlobalParametersRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); - if (response.Value == null) - throw new RequestFailedException(response.GetRawResponse()); - return Response.FromValue(new DataFactoryGlobalParameterResource(Client, response.Value), response.GetRawResponse()); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Deletes a Global parameter - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName}/globalParameters/{globalParameterName} - /// - /// - /// Operation Id - /// GlobalParameters_Delete - /// - /// - /// - /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. - /// The cancellation token to use. - public virtual async Task DeleteAsync(WaitUntil waitUntil, CancellationToken cancellationToken = default) - { - using var scope = _dataFactoryGlobalParameterGlobalParametersClientDiagnostics.CreateScope("DataFactoryGlobalParameterResource.Delete"); - scope.Start(); - try - { - var response = await _dataFactoryGlobalParameterGlobalParametersRestClient.DeleteAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); - var operation = new DataFactoryArmOperation(response); - if (waitUntil == WaitUntil.Completed) - await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false); - return operation; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Deletes a Global parameter - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName}/globalParameters/{globalParameterName} - /// - /// - /// Operation Id - /// GlobalParameters_Delete - /// - /// - /// - /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. - /// The cancellation token to use. - public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancellationToken = default) - { - using var scope = _dataFactoryGlobalParameterGlobalParametersClientDiagnostics.CreateScope("DataFactoryGlobalParameterResource.Delete"); - scope.Start(); - try - { - var response = _dataFactoryGlobalParameterGlobalParametersRestClient.Delete(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); - var operation = new DataFactoryArmOperation(response); - if (waitUntil == WaitUntil.Completed) - operation.WaitForCompletionResponse(cancellationToken); - return operation; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Creates or updates a Global parameter - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName}/globalParameters/{globalParameterName} - /// - /// - /// Operation Id - /// GlobalParameters_CreateOrUpdate - /// - /// - /// - /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. - /// Global parameter resource definition. - /// The cancellation token to use. - /// is null. - public virtual async Task> UpdateAsync(WaitUntil waitUntil, DataFactoryGlobalParameterData data, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(data, nameof(data)); - - using var scope = _dataFactoryGlobalParameterGlobalParametersClientDiagnostics.CreateScope("DataFactoryGlobalParameterResource.Update"); - scope.Start(); - try - { - var response = await _dataFactoryGlobalParameterGlobalParametersRestClient.CreateOrUpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data, cancellationToken).ConfigureAwait(false); - var operation = new DataFactoryArmOperation(Response.FromValue(new DataFactoryGlobalParameterResource(Client, response), response.GetRawResponse())); - if (waitUntil == WaitUntil.Completed) - await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); - return operation; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Creates or updates a Global parameter - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName}/globalParameters/{globalParameterName} - /// - /// - /// Operation Id - /// GlobalParameters_CreateOrUpdate - /// - /// - /// - /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. - /// Global parameter resource definition. - /// The cancellation token to use. - /// is null. - public virtual ArmOperation Update(WaitUntil waitUntil, DataFactoryGlobalParameterData data, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(data, nameof(data)); - - using var scope = _dataFactoryGlobalParameterGlobalParametersClientDiagnostics.CreateScope("DataFactoryGlobalParameterResource.Update"); - scope.Start(); - try - { - var response = _dataFactoryGlobalParameterGlobalParametersRestClient.CreateOrUpdate(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data, cancellationToken); - var operation = new DataFactoryArmOperation(Response.FromValue(new DataFactoryGlobalParameterResource(Client, response), response.GetRawResponse())); - if (waitUntil == WaitUntil.Completed) - operation.WaitForCompletion(cancellationToken); - return operation; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/DataFactoryIntegrationRuntimeCollection.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/DataFactoryIntegrationRuntimeCollection.cs deleted file mode 100644 index c0113093..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/DataFactoryIntegrationRuntimeCollection.cs +++ /dev/null @@ -1,337 +0,0 @@ -// - -#nullable disable - -using System.Collections; -using System.Globalization; -using Azure.Core; -using Azure.Core.Pipeline; - -namespace Azure.ResourceManager.DataFactory -{ - /// - /// A class representing a collection of and their operations. - /// Each in the collection will belong to the same instance of . - /// To get a instance call the GetDataFactoryIntegrationRuntimes method from an instance of . - /// - public partial class DataFactoryIntegrationRuntimeCollection : ArmCollection, IEnumerable, IAsyncEnumerable - { - private readonly ClientDiagnostics _dataFactoryIntegrationRuntimeIntegrationRuntimesClientDiagnostics; - private readonly IntegrationRuntimesRestOperations _dataFactoryIntegrationRuntimeIntegrationRuntimesRestClient; - - /// Initializes a new instance of the class for mocking. - protected DataFactoryIntegrationRuntimeCollection() - { - } - - /// Initializes a new instance of the class. - /// The client parameters to use in these operations. - /// The identifier of the parent resource that is the target of operations. - internal DataFactoryIntegrationRuntimeCollection(ArmClient client, ResourceIdentifier id) : base(client, id) - { - _dataFactoryIntegrationRuntimeIntegrationRuntimesClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.DataFactory", DataFactoryIntegrationRuntimeResource.ResourceType.Namespace, Diagnostics); - TryGetApiVersion(DataFactoryIntegrationRuntimeResource.ResourceType, out string dataFactoryIntegrationRuntimeIntegrationRuntimesApiVersion); - _dataFactoryIntegrationRuntimeIntegrationRuntimesRestClient = new IntegrationRuntimesRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, dataFactoryIntegrationRuntimeIntegrationRuntimesApiVersion); -#if DEBUG - ValidateResourceId(Id); -#endif - } - - internal static void ValidateResourceId(ResourceIdentifier id) - { - if (id.ResourceType != DataFactoryResource.ResourceType) - throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, DataFactoryResource.ResourceType), nameof(id)); - } - - /// - /// Creates or updates an integration runtime. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName}/integrationRuntimes/{integrationRuntimeName} - /// - /// - /// Operation Id - /// IntegrationRuntimes_CreateOrUpdate - /// - /// - /// - /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. - /// The integration runtime name. - /// Integration runtime resource definition. - /// ETag of the integration runtime entity. Should only be specified for update, for which it should match existing entity or can be * for unconditional update. - /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// or is null. - public virtual async Task> CreateOrUpdateAsync(WaitUntil waitUntil, string integrationRuntimeName, DataFactoryIntegrationRuntimeData data, string ifMatch = null, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(integrationRuntimeName, nameof(integrationRuntimeName)); - Argument.AssertNotNull(data, nameof(data)); - - using var scope = _dataFactoryIntegrationRuntimeIntegrationRuntimesClientDiagnostics.CreateScope("DataFactoryIntegrationRuntimeCollection.CreateOrUpdate"); - scope.Start(); - try - { - var response = await _dataFactoryIntegrationRuntimeIntegrationRuntimesRestClient.CreateOrUpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, integrationRuntimeName, data, ifMatch, cancellationToken).ConfigureAwait(false); - var operation = new DataFactoryArmOperation(Response.FromValue(new DataFactoryIntegrationRuntimeResource(Client, response), response.GetRawResponse())); - if (waitUntil == WaitUntil.Completed) - await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); - return operation; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Creates or updates an integration runtime. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName}/integrationRuntimes/{integrationRuntimeName} - /// - /// - /// Operation Id - /// IntegrationRuntimes_CreateOrUpdate - /// - /// - /// - /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. - /// The integration runtime name. - /// Integration runtime resource definition. - /// ETag of the integration runtime entity. Should only be specified for update, for which it should match existing entity or can be * for unconditional update. - /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// or is null. - public virtual ArmOperation CreateOrUpdate(WaitUntil waitUntil, string integrationRuntimeName, DataFactoryIntegrationRuntimeData data, string ifMatch = null, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(integrationRuntimeName, nameof(integrationRuntimeName)); - Argument.AssertNotNull(data, nameof(data)); - - using var scope = _dataFactoryIntegrationRuntimeIntegrationRuntimesClientDiagnostics.CreateScope("DataFactoryIntegrationRuntimeCollection.CreateOrUpdate"); - scope.Start(); - try - { - var response = _dataFactoryIntegrationRuntimeIntegrationRuntimesRestClient.CreateOrUpdate(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, integrationRuntimeName, data, ifMatch, cancellationToken); - var operation = new DataFactoryArmOperation(Response.FromValue(new DataFactoryIntegrationRuntimeResource(Client, response), response.GetRawResponse())); - if (waitUntil == WaitUntil.Completed) - operation.WaitForCompletion(cancellationToken); - return operation; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Gets an integration runtime. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName}/integrationRuntimes/{integrationRuntimeName} - /// - /// - /// Operation Id - /// IntegrationRuntimes_Get - /// - /// - /// - /// The integration runtime name. - /// ETag of the integration runtime entity. Should only be specified for get. If the ETag matches the existing entity tag, or if * was provided, then no content will be returned. - /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// is null. - public virtual async Task> GetAsync(string integrationRuntimeName, string ifNoneMatch = null, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(integrationRuntimeName, nameof(integrationRuntimeName)); - - using var scope = _dataFactoryIntegrationRuntimeIntegrationRuntimesClientDiagnostics.CreateScope("DataFactoryIntegrationRuntimeCollection.Get"); - scope.Start(); - try - { - var response = await _dataFactoryIntegrationRuntimeIntegrationRuntimesRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, integrationRuntimeName, ifNoneMatch, cancellationToken).ConfigureAwait(false); - if (response.Value == null) - throw new RequestFailedException(response.GetRawResponse()); - return Response.FromValue(new DataFactoryIntegrationRuntimeResource(Client, response.Value), response.GetRawResponse()); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Gets an integration runtime. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName}/integrationRuntimes/{integrationRuntimeName} - /// - /// - /// Operation Id - /// IntegrationRuntimes_Get - /// - /// - /// - /// The integration runtime name. - /// ETag of the integration runtime entity. Should only be specified for get. If the ETag matches the existing entity tag, or if * was provided, then no content will be returned. - /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// is null. - public virtual Response Get(string integrationRuntimeName, string ifNoneMatch = null, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(integrationRuntimeName, nameof(integrationRuntimeName)); - - using var scope = _dataFactoryIntegrationRuntimeIntegrationRuntimesClientDiagnostics.CreateScope("DataFactoryIntegrationRuntimeCollection.Get"); - scope.Start(); - try - { - var response = _dataFactoryIntegrationRuntimeIntegrationRuntimesRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, integrationRuntimeName, ifNoneMatch, cancellationToken); - if (response.Value == null) - throw new RequestFailedException(response.GetRawResponse()); - return Response.FromValue(new DataFactoryIntegrationRuntimeResource(Client, response.Value), response.GetRawResponse()); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Lists integration runtimes. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName}/integrationRuntimes - /// - /// - /// Operation Id - /// IntegrationRuntimes_ListByFactory - /// - /// - /// - /// The cancellation token to use. - /// An async collection of that may take multiple service requests to iterate over. - public virtual AsyncPageable GetAllAsync(CancellationToken cancellationToken = default) - { - HttpMessage FirstPageRequest(int? pageSizeHint) => _dataFactoryIntegrationRuntimeIntegrationRuntimesRestClient.CreateListByFactoryRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name); - HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _dataFactoryIntegrationRuntimeIntegrationRuntimesRestClient.CreateListByFactoryNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name); - return PageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new DataFactoryIntegrationRuntimeResource(Client, DataFactoryIntegrationRuntimeData.DeserializeDataFactoryIntegrationRuntimeData(e)), _dataFactoryIntegrationRuntimeIntegrationRuntimesClientDiagnostics, Pipeline, "DataFactoryIntegrationRuntimeCollection.GetAll", "value", "nextLink", cancellationToken); - } - - /// - /// Lists integration runtimes. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName}/integrationRuntimes - /// - /// - /// Operation Id - /// IntegrationRuntimes_ListByFactory - /// - /// - /// - /// The cancellation token to use. - /// A collection of that may take multiple service requests to iterate over. - public virtual Pageable GetAll(CancellationToken cancellationToken = default) - { - HttpMessage FirstPageRequest(int? pageSizeHint) => _dataFactoryIntegrationRuntimeIntegrationRuntimesRestClient.CreateListByFactoryRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name); - HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _dataFactoryIntegrationRuntimeIntegrationRuntimesRestClient.CreateListByFactoryNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name); - return PageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new DataFactoryIntegrationRuntimeResource(Client, DataFactoryIntegrationRuntimeData.DeserializeDataFactoryIntegrationRuntimeData(e)), _dataFactoryIntegrationRuntimeIntegrationRuntimesClientDiagnostics, Pipeline, "DataFactoryIntegrationRuntimeCollection.GetAll", "value", "nextLink", cancellationToken); - } - - /// - /// Checks to see if the resource exists in azure. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName}/integrationRuntimes/{integrationRuntimeName} - /// - /// - /// Operation Id - /// IntegrationRuntimes_Get - /// - /// - /// - /// The integration runtime name. - /// ETag of the integration runtime entity. Should only be specified for get. If the ETag matches the existing entity tag, or if * was provided, then no content will be returned. - /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// is null. - public virtual async Task> ExistsAsync(string integrationRuntimeName, string ifNoneMatch = null, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(integrationRuntimeName, nameof(integrationRuntimeName)); - - using var scope = _dataFactoryIntegrationRuntimeIntegrationRuntimesClientDiagnostics.CreateScope("DataFactoryIntegrationRuntimeCollection.Exists"); - scope.Start(); - try - { - var response = await _dataFactoryIntegrationRuntimeIntegrationRuntimesRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, integrationRuntimeName, ifNoneMatch, cancellationToken: cancellationToken).ConfigureAwait(false); - return Response.FromValue(response.Value != null, response.GetRawResponse()); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Checks to see if the resource exists in azure. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName}/integrationRuntimes/{integrationRuntimeName} - /// - /// - /// Operation Id - /// IntegrationRuntimes_Get - /// - /// - /// - /// The integration runtime name. - /// ETag of the integration runtime entity. Should only be specified for get. If the ETag matches the existing entity tag, or if * was provided, then no content will be returned. - /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// is null. - public virtual Response Exists(string integrationRuntimeName, string ifNoneMatch = null, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(integrationRuntimeName, nameof(integrationRuntimeName)); - - using var scope = _dataFactoryIntegrationRuntimeIntegrationRuntimesClientDiagnostics.CreateScope("DataFactoryIntegrationRuntimeCollection.Exists"); - scope.Start(); - try - { - var response = _dataFactoryIntegrationRuntimeIntegrationRuntimesRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, integrationRuntimeName, ifNoneMatch, cancellationToken: cancellationToken); - return Response.FromValue(response.Value != null, response.GetRawResponse()); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - IEnumerator IEnumerable.GetEnumerator() - { - return GetAll().GetEnumerator(); - } - - IEnumerator IEnumerable.GetEnumerator() - { - return GetAll().GetEnumerator(); - } - - IAsyncEnumerator IAsyncEnumerable.GetAsyncEnumerator(CancellationToken cancellationToken) - { - return GetAllAsync(cancellationToken: cancellationToken).GetAsyncEnumerator(cancellationToken); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/DataFactoryIntegrationRuntimeData.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/DataFactoryIntegrationRuntimeData.cs deleted file mode 100644 index 25ae0971..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/DataFactoryIntegrationRuntimeData.cs +++ /dev/null @@ -1,57 +0,0 @@ -// - -#nullable disable - -using Azure.Core; -using AzureDataFactory.TestingFramework.Models; -using Azure.ResourceManager.Models; - -namespace Azure.ResourceManager.DataFactory -{ - /// - /// A class representing the DataFactoryIntegrationRuntime data model. - /// Integration runtime resource type. - /// - public partial class DataFactoryIntegrationRuntimeData : ResourceData - { - /// Initializes a new instance of DataFactoryIntegrationRuntimeData. - /// - /// Integration runtime properties. - /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. - /// The available derived classes include and . - /// - /// is null. - public DataFactoryIntegrationRuntimeData(DataFactoryIntegrationRuntimeProperties properties) - { - Argument.AssertNotNull(properties, nameof(properties)); - - Properties = properties; - } - - /// Initializes a new instance of DataFactoryIntegrationRuntimeData. - /// The id. - /// The name. - /// The resourceType. - /// The systemData. - /// - /// Integration runtime properties. - /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. - /// The available derived classes include and . - /// - /// Etag identifies change in the resource. - internal DataFactoryIntegrationRuntimeData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, DataFactoryIntegrationRuntimeProperties properties, ETag? eTag) : base(id, name, resourceType, systemData) - { - Properties = properties; - ETag = eTag; - } - - /// - /// Integration runtime properties. - /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. - /// The available derived classes include and . - /// - public DataFactoryIntegrationRuntimeProperties Properties { get; set; } - /// Etag identifies change in the resource. - public ETag? ETag { get; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/DataFactoryIntegrationRuntimeResource.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/DataFactoryIntegrationRuntimeResource.cs deleted file mode 100644 index c1fe6563..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/DataFactoryIntegrationRuntimeResource.cs +++ /dev/null @@ -1,1430 +0,0 @@ -// - -#nullable disable - -using System.Globalization; -using Azure.Core; -using Azure.Core.Pipeline; -using AzureDataFactory.TestingFramework.Models; - -namespace Azure.ResourceManager.DataFactory -{ - /// - /// A Class representing a DataFactoryIntegrationRuntime along with the instance operations that can be performed on it. - /// If you have a you can construct a - /// from an instance of using the GetDataFactoryIntegrationRuntimeResource method. - /// Otherwise you can get one from its parent resource using the GetDataFactoryIntegrationRuntime method. - /// - public partial class DataFactoryIntegrationRuntimeResource : ArmResource - { - /// Generate the resource identifier of a instance. - public static ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string factoryName, string integrationRuntimeName) - { - var resourceId = $"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName}/integrationRuntimes/{integrationRuntimeName}"; - return new ResourceIdentifier(resourceId); - } - - private readonly ClientDiagnostics _dataFactoryIntegrationRuntimeIntegrationRuntimesClientDiagnostics; - private readonly IntegrationRuntimesRestOperations _dataFactoryIntegrationRuntimeIntegrationRuntimesRestClient; - private readonly ClientDiagnostics _integrationRuntimeObjectMetadataClientDiagnostics; - private readonly IntegrationRuntimeObjectMetadataRestOperations _integrationRuntimeObjectMetadataRestClient; - private readonly ClientDiagnostics _integrationRuntimeNodesClientDiagnostics; - private readonly IntegrationRuntimeNodesRestOperations _integrationRuntimeNodesRestClient; - private readonly DataFactoryIntegrationRuntimeData _data; - - /// Initializes a new instance of the class for mocking. - protected DataFactoryIntegrationRuntimeResource() - { - } - - /// Initializes a new instance of the class. - /// The client parameters to use in these operations. - /// The resource that is the target of operations. - internal DataFactoryIntegrationRuntimeResource(ArmClient client, DataFactoryIntegrationRuntimeData data) : this(client, data.Id) - { - HasData = true; - _data = data; - } - - /// Initializes a new instance of the class. - /// The client parameters to use in these operations. - /// The identifier of the resource that is the target of operations. - internal DataFactoryIntegrationRuntimeResource(ArmClient client, ResourceIdentifier id) : base(client, id) - { - _dataFactoryIntegrationRuntimeIntegrationRuntimesClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.DataFactory", ResourceType.Namespace, Diagnostics); - TryGetApiVersion(ResourceType, out string dataFactoryIntegrationRuntimeIntegrationRuntimesApiVersion); - _dataFactoryIntegrationRuntimeIntegrationRuntimesRestClient = new IntegrationRuntimesRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, dataFactoryIntegrationRuntimeIntegrationRuntimesApiVersion); - _integrationRuntimeObjectMetadataClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.DataFactory", ProviderConstants.DefaultProviderNamespace, Diagnostics); - _integrationRuntimeObjectMetadataRestClient = new IntegrationRuntimeObjectMetadataRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint); - _integrationRuntimeNodesClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.DataFactory", ProviderConstants.DefaultProviderNamespace, Diagnostics); - _integrationRuntimeNodesRestClient = new IntegrationRuntimeNodesRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint); -#if DEBUG - ValidateResourceId(Id); -#endif - } - - /// Gets the resource type for the operations. - public static readonly ResourceType ResourceType = "Microsoft.DataFactory/factories/integrationRuntimes"; - - /// Gets whether or not the current instance has data. - public virtual bool HasData { get; } - - /// Gets the data representing this Feature. - /// Throws if there is no data loaded in the current instance. - public virtual DataFactoryIntegrationRuntimeData Data - { - get - { - if (!HasData) - throw new InvalidOperationException("The current instance does not have data, you must call Get first."); - return _data; - } - } - - internal static void ValidateResourceId(ResourceIdentifier id) - { - if (id.ResourceType != ResourceType) - throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, ResourceType), nameof(id)); - } - - /// - /// Gets an integration runtime. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName}/integrationRuntimes/{integrationRuntimeName} - /// - /// - /// Operation Id - /// IntegrationRuntimes_Get - /// - /// - /// - /// ETag of the integration runtime entity. Should only be specified for get. If the ETag matches the existing entity tag, or if * was provided, then no content will be returned. - /// The cancellation token to use. - public virtual async Task> GetAsync(string ifNoneMatch = null, CancellationToken cancellationToken = default) - { - using var scope = _dataFactoryIntegrationRuntimeIntegrationRuntimesClientDiagnostics.CreateScope("DataFactoryIntegrationRuntimeResource.Get"); - scope.Start(); - try - { - var response = await _dataFactoryIntegrationRuntimeIntegrationRuntimesRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, ifNoneMatch, cancellationToken).ConfigureAwait(false); - if (response.Value == null) - throw new RequestFailedException(response.GetRawResponse()); - return Response.FromValue(new DataFactoryIntegrationRuntimeResource(Client, response.Value), response.GetRawResponse()); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Gets an integration runtime. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName}/integrationRuntimes/{integrationRuntimeName} - /// - /// - /// Operation Id - /// IntegrationRuntimes_Get - /// - /// - /// - /// ETag of the integration runtime entity. Should only be specified for get. If the ETag matches the existing entity tag, or if * was provided, then no content will be returned. - /// The cancellation token to use. - public virtual Response Get(string ifNoneMatch = null, CancellationToken cancellationToken = default) - { - using var scope = _dataFactoryIntegrationRuntimeIntegrationRuntimesClientDiagnostics.CreateScope("DataFactoryIntegrationRuntimeResource.Get"); - scope.Start(); - try - { - var response = _dataFactoryIntegrationRuntimeIntegrationRuntimesRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, ifNoneMatch, cancellationToken); - if (response.Value == null) - throw new RequestFailedException(response.GetRawResponse()); - return Response.FromValue(new DataFactoryIntegrationRuntimeResource(Client, response.Value), response.GetRawResponse()); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Deletes an integration runtime. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName}/integrationRuntimes/{integrationRuntimeName} - /// - /// - /// Operation Id - /// IntegrationRuntimes_Delete - /// - /// - /// - /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. - /// The cancellation token to use. - public virtual async Task DeleteAsync(WaitUntil waitUntil, CancellationToken cancellationToken = default) - { - using var scope = _dataFactoryIntegrationRuntimeIntegrationRuntimesClientDiagnostics.CreateScope("DataFactoryIntegrationRuntimeResource.Delete"); - scope.Start(); - try - { - var response = await _dataFactoryIntegrationRuntimeIntegrationRuntimesRestClient.DeleteAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); - var operation = new DataFactoryArmOperation(response); - if (waitUntil == WaitUntil.Completed) - await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false); - return operation; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Deletes an integration runtime. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName}/integrationRuntimes/{integrationRuntimeName} - /// - /// - /// Operation Id - /// IntegrationRuntimes_Delete - /// - /// - /// - /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. - /// The cancellation token to use. - public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancellationToken = default) - { - using var scope = _dataFactoryIntegrationRuntimeIntegrationRuntimesClientDiagnostics.CreateScope("DataFactoryIntegrationRuntimeResource.Delete"); - scope.Start(); - try - { - var response = _dataFactoryIntegrationRuntimeIntegrationRuntimesRestClient.Delete(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); - var operation = new DataFactoryArmOperation(response); - if (waitUntil == WaitUntil.Completed) - operation.WaitForCompletionResponse(cancellationToken); - return operation; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Updates an integration runtime. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName}/integrationRuntimes/{integrationRuntimeName} - /// - /// - /// Operation Id - /// IntegrationRuntimes_Update - /// - /// - /// - /// The parameters for updating an integration runtime. - /// The cancellation token to use. - /// is null. - public virtual async Task> UpdateAsync(DataFactoryIntegrationRuntimePatch patch, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(patch, nameof(patch)); - - using var scope = _dataFactoryIntegrationRuntimeIntegrationRuntimesClientDiagnostics.CreateScope("DataFactoryIntegrationRuntimeResource.Update"); - scope.Start(); - try - { - var response = await _dataFactoryIntegrationRuntimeIntegrationRuntimesRestClient.UpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, patch, cancellationToken).ConfigureAwait(false); - return Response.FromValue(new DataFactoryIntegrationRuntimeResource(Client, response.Value), response.GetRawResponse()); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Updates an integration runtime. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName}/integrationRuntimes/{integrationRuntimeName} - /// - /// - /// Operation Id - /// IntegrationRuntimes_Update - /// - /// - /// - /// The parameters for updating an integration runtime. - /// The cancellation token to use. - /// is null. - public virtual Response Update(DataFactoryIntegrationRuntimePatch patch, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(patch, nameof(patch)); - - using var scope = _dataFactoryIntegrationRuntimeIntegrationRuntimesClientDiagnostics.CreateScope("DataFactoryIntegrationRuntimeResource.Update"); - scope.Start(); - try - { - var response = _dataFactoryIntegrationRuntimeIntegrationRuntimesRestClient.Update(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, patch, cancellationToken); - return Response.FromValue(new DataFactoryIntegrationRuntimeResource(Client, response.Value), response.GetRawResponse()); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Gets detailed status information for an integration runtime. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName}/integrationRuntimes/{integrationRuntimeName}/getStatus - /// - /// - /// Operation Id - /// IntegrationRuntimes_GetStatus - /// - /// - /// - /// The cancellation token to use. - public virtual async Task> GetStatusAsync(CancellationToken cancellationToken = default) - { - using var scope = _dataFactoryIntegrationRuntimeIntegrationRuntimesClientDiagnostics.CreateScope("DataFactoryIntegrationRuntimeResource.GetStatus"); - scope.Start(); - try - { - var response = await _dataFactoryIntegrationRuntimeIntegrationRuntimesRestClient.GetStatusAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); - return response; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Gets detailed status information for an integration runtime. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName}/integrationRuntimes/{integrationRuntimeName}/getStatus - /// - /// - /// Operation Id - /// IntegrationRuntimes_GetStatus - /// - /// - /// - /// The cancellation token to use. - public virtual Response GetStatus(CancellationToken cancellationToken = default) - { - using var scope = _dataFactoryIntegrationRuntimeIntegrationRuntimesClientDiagnostics.CreateScope("DataFactoryIntegrationRuntimeResource.GetStatus"); - scope.Start(); - try - { - var response = _dataFactoryIntegrationRuntimeIntegrationRuntimesRestClient.GetStatus(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); - return response; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Gets the list of outbound network dependencies for a given Azure-SSIS integration runtime. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName}/integrationRuntimes/{integrationRuntimeName}/outboundNetworkDependenciesEndpoints - /// - /// - /// Operation Id - /// IntegrationRuntimes_ListOutboundNetworkDependenciesEndpoints - /// - /// - /// - /// The cancellation token to use. - /// An async collection of that may take multiple service requests to iterate over. - public virtual AsyncPageable GetOutboundNetworkDependenciesAsync(CancellationToken cancellationToken = default) - { - HttpMessage FirstPageRequest(int? pageSizeHint) => _dataFactoryIntegrationRuntimeIntegrationRuntimesRestClient.CreateListOutboundNetworkDependenciesEndpointsRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name); - return PageableHelpers.CreateAsyncPageable(FirstPageRequest, null, IntegrationRuntimeOutboundNetworkDependenciesCategoryEndpoint.DeserializeIntegrationRuntimeOutboundNetworkDependenciesCategoryEndpoint, _dataFactoryIntegrationRuntimeIntegrationRuntimesClientDiagnostics, Pipeline, "DataFactoryIntegrationRuntimeResource.GetOutboundNetworkDependencies", "value", null, cancellationToken); - } - - /// - /// Gets the list of outbound network dependencies for a given Azure-SSIS integration runtime. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName}/integrationRuntimes/{integrationRuntimeName}/outboundNetworkDependenciesEndpoints - /// - /// - /// Operation Id - /// IntegrationRuntimes_ListOutboundNetworkDependenciesEndpoints - /// - /// - /// - /// The cancellation token to use. - /// A collection of that may take multiple service requests to iterate over. - public virtual Pageable GetOutboundNetworkDependencies(CancellationToken cancellationToken = default) - { - HttpMessage FirstPageRequest(int? pageSizeHint) => _dataFactoryIntegrationRuntimeIntegrationRuntimesRestClient.CreateListOutboundNetworkDependenciesEndpointsRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name); - return PageableHelpers.CreatePageable(FirstPageRequest, null, IntegrationRuntimeOutboundNetworkDependenciesCategoryEndpoint.DeserializeIntegrationRuntimeOutboundNetworkDependenciesCategoryEndpoint, _dataFactoryIntegrationRuntimeIntegrationRuntimesClientDiagnostics, Pipeline, "DataFactoryIntegrationRuntimeResource.GetOutboundNetworkDependencies", "value", null, cancellationToken); - } - - /// - /// Gets the on-premises integration runtime connection information for encrypting the on-premises data source credentials. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName}/integrationRuntimes/{integrationRuntimeName}/getConnectionInfo - /// - /// - /// Operation Id - /// IntegrationRuntimes_GetConnectionInfo - /// - /// - /// - /// The cancellation token to use. - public virtual async Task> GetConnectionInfoAsync(CancellationToken cancellationToken = default) - { - using var scope = _dataFactoryIntegrationRuntimeIntegrationRuntimesClientDiagnostics.CreateScope("DataFactoryIntegrationRuntimeResource.GetConnectionInfo"); - scope.Start(); - try - { - var response = await _dataFactoryIntegrationRuntimeIntegrationRuntimesRestClient.GetConnectionInfoAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); - return response; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Gets the on-premises integration runtime connection information for encrypting the on-premises data source credentials. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName}/integrationRuntimes/{integrationRuntimeName}/getConnectionInfo - /// - /// - /// Operation Id - /// IntegrationRuntimes_GetConnectionInfo - /// - /// - /// - /// The cancellation token to use. - public virtual Response GetConnectionInfo(CancellationToken cancellationToken = default) - { - using var scope = _dataFactoryIntegrationRuntimeIntegrationRuntimesClientDiagnostics.CreateScope("DataFactoryIntegrationRuntimeResource.GetConnectionInfo"); - scope.Start(); - try - { - var response = _dataFactoryIntegrationRuntimeIntegrationRuntimesRestClient.GetConnectionInfo(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); - return response; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Regenerates the authentication key for an integration runtime. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName}/integrationRuntimes/{integrationRuntimeName}/regenerateAuthKey - /// - /// - /// Operation Id - /// IntegrationRuntimes_RegenerateAuthKey - /// - /// - /// - /// The parameters for regenerating integration runtime authentication key. - /// The cancellation token to use. - /// is null. - public virtual async Task> RegenerateAuthKeyAsync(IntegrationRuntimeRegenerateKeyContent content, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(content, nameof(content)); - - using var scope = _dataFactoryIntegrationRuntimeIntegrationRuntimesClientDiagnostics.CreateScope("DataFactoryIntegrationRuntimeResource.RegenerateAuthKey"); - scope.Start(); - try - { - var response = await _dataFactoryIntegrationRuntimeIntegrationRuntimesRestClient.RegenerateAuthKeyAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, content, cancellationToken).ConfigureAwait(false); - return response; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Regenerates the authentication key for an integration runtime. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName}/integrationRuntimes/{integrationRuntimeName}/regenerateAuthKey - /// - /// - /// Operation Id - /// IntegrationRuntimes_RegenerateAuthKey - /// - /// - /// - /// The parameters for regenerating integration runtime authentication key. - /// The cancellation token to use. - /// is null. - public virtual Response RegenerateAuthKey(IntegrationRuntimeRegenerateKeyContent content, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(content, nameof(content)); - - using var scope = _dataFactoryIntegrationRuntimeIntegrationRuntimesClientDiagnostics.CreateScope("DataFactoryIntegrationRuntimeResource.RegenerateAuthKey"); - scope.Start(); - try - { - var response = _dataFactoryIntegrationRuntimeIntegrationRuntimesRestClient.RegenerateAuthKey(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, content, cancellationToken); - return response; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Retrieves the authentication keys for an integration runtime. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName}/integrationRuntimes/{integrationRuntimeName}/listAuthKeys - /// - /// - /// Operation Id - /// IntegrationRuntimes_ListAuthKeys - /// - /// - /// - /// The cancellation token to use. - public virtual async Task> GetAuthKeysAsync(CancellationToken cancellationToken = default) - { - using var scope = _dataFactoryIntegrationRuntimeIntegrationRuntimesClientDiagnostics.CreateScope("DataFactoryIntegrationRuntimeResource.GetAuthKeys"); - scope.Start(); - try - { - var response = await _dataFactoryIntegrationRuntimeIntegrationRuntimesRestClient.ListAuthKeysAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); - return response; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Retrieves the authentication keys for an integration runtime. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName}/integrationRuntimes/{integrationRuntimeName}/listAuthKeys - /// - /// - /// Operation Id - /// IntegrationRuntimes_ListAuthKeys - /// - /// - /// - /// The cancellation token to use. - public virtual Response GetAuthKeys(CancellationToken cancellationToken = default) - { - using var scope = _dataFactoryIntegrationRuntimeIntegrationRuntimesClientDiagnostics.CreateScope("DataFactoryIntegrationRuntimeResource.GetAuthKeys"); - scope.Start(); - try - { - var response = _dataFactoryIntegrationRuntimeIntegrationRuntimesRestClient.ListAuthKeys(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); - return response; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Starts a ManagedReserved type integration runtime. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName}/integrationRuntimes/{integrationRuntimeName}/start - /// - /// - /// Operation Id - /// IntegrationRuntimes_Start - /// - /// - /// - /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. - /// The cancellation token to use. - public virtual async Task> StartAsync(WaitUntil waitUntil, CancellationToken cancellationToken = default) - { - using var scope = _dataFactoryIntegrationRuntimeIntegrationRuntimesClientDiagnostics.CreateScope("DataFactoryIntegrationRuntimeResource.Start"); - scope.Start(); - try - { - var response = await _dataFactoryIntegrationRuntimeIntegrationRuntimesRestClient.StartAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); - var operation = new DataFactoryArmOperation(new DataFactoryIntegrationRuntimeStatusResultOperationSource(), _dataFactoryIntegrationRuntimeIntegrationRuntimesClientDiagnostics, Pipeline, _dataFactoryIntegrationRuntimeIntegrationRuntimesRestClient.CreateStartRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name).Request, response, OperationFinalStateVia.Location); - if (waitUntil == WaitUntil.Completed) - await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); - return operation; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Starts a ManagedReserved type integration runtime. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName}/integrationRuntimes/{integrationRuntimeName}/start - /// - /// - /// Operation Id - /// IntegrationRuntimes_Start - /// - /// - /// - /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. - /// The cancellation token to use. - public virtual ArmOperation Start(WaitUntil waitUntil, CancellationToken cancellationToken = default) - { - using var scope = _dataFactoryIntegrationRuntimeIntegrationRuntimesClientDiagnostics.CreateScope("DataFactoryIntegrationRuntimeResource.Start"); - scope.Start(); - try - { - var response = _dataFactoryIntegrationRuntimeIntegrationRuntimesRestClient.Start(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); - var operation = new DataFactoryArmOperation(new DataFactoryIntegrationRuntimeStatusResultOperationSource(), _dataFactoryIntegrationRuntimeIntegrationRuntimesClientDiagnostics, Pipeline, _dataFactoryIntegrationRuntimeIntegrationRuntimesRestClient.CreateStartRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name).Request, response, OperationFinalStateVia.Location); - if (waitUntil == WaitUntil.Completed) - operation.WaitForCompletion(cancellationToken); - return operation; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Stops a ManagedReserved type integration runtime. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName}/integrationRuntimes/{integrationRuntimeName}/stop - /// - /// - /// Operation Id - /// IntegrationRuntimes_Stop - /// - /// - /// - /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. - /// The cancellation token to use. - public virtual async Task StopAsync(WaitUntil waitUntil, CancellationToken cancellationToken = default) - { - using var scope = _dataFactoryIntegrationRuntimeIntegrationRuntimesClientDiagnostics.CreateScope("DataFactoryIntegrationRuntimeResource.Stop"); - scope.Start(); - try - { - var response = await _dataFactoryIntegrationRuntimeIntegrationRuntimesRestClient.StopAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); - var operation = new DataFactoryArmOperation(_dataFactoryIntegrationRuntimeIntegrationRuntimesClientDiagnostics, Pipeline, _dataFactoryIntegrationRuntimeIntegrationRuntimesRestClient.CreateStopRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name).Request, response, OperationFinalStateVia.Location); - if (waitUntil == WaitUntil.Completed) - await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false); - return operation; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Stops a ManagedReserved type integration runtime. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName}/integrationRuntimes/{integrationRuntimeName}/stop - /// - /// - /// Operation Id - /// IntegrationRuntimes_Stop - /// - /// - /// - /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. - /// The cancellation token to use. - public virtual ArmOperation Stop(WaitUntil waitUntil, CancellationToken cancellationToken = default) - { - using var scope = _dataFactoryIntegrationRuntimeIntegrationRuntimesClientDiagnostics.CreateScope("DataFactoryIntegrationRuntimeResource.Stop"); - scope.Start(); - try - { - var response = _dataFactoryIntegrationRuntimeIntegrationRuntimesRestClient.Stop(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); - var operation = new DataFactoryArmOperation(_dataFactoryIntegrationRuntimeIntegrationRuntimesClientDiagnostics, Pipeline, _dataFactoryIntegrationRuntimeIntegrationRuntimesRestClient.CreateStopRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name).Request, response, OperationFinalStateVia.Location); - if (waitUntil == WaitUntil.Completed) - operation.WaitForCompletionResponse(cancellationToken); - return operation; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Force the integration runtime to synchronize credentials across integration runtime nodes, and this will override the credentials across all worker nodes with those available on the dispatcher node. If you already have the latest credential backup file, you should manually import it (preferred) on any self-hosted integration runtime node than using this API directly. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName}/integrationRuntimes/{integrationRuntimeName}/syncCredentials - /// - /// - /// Operation Id - /// IntegrationRuntimes_SyncCredentials - /// - /// - /// - /// The cancellation token to use. - public virtual async Task SyncCredentialsAsync(CancellationToken cancellationToken = default) - { - using var scope = _dataFactoryIntegrationRuntimeIntegrationRuntimesClientDiagnostics.CreateScope("DataFactoryIntegrationRuntimeResource.SyncCredentials"); - scope.Start(); - try - { - var response = await _dataFactoryIntegrationRuntimeIntegrationRuntimesRestClient.SyncCredentialsAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); - return response; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Force the integration runtime to synchronize credentials across integration runtime nodes, and this will override the credentials across all worker nodes with those available on the dispatcher node. If you already have the latest credential backup file, you should manually import it (preferred) on any self-hosted integration runtime node than using this API directly. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName}/integrationRuntimes/{integrationRuntimeName}/syncCredentials - /// - /// - /// Operation Id - /// IntegrationRuntimes_SyncCredentials - /// - /// - /// - /// The cancellation token to use. - public virtual Response SyncCredentials(CancellationToken cancellationToken = default) - { - using var scope = _dataFactoryIntegrationRuntimeIntegrationRuntimesClientDiagnostics.CreateScope("DataFactoryIntegrationRuntimeResource.SyncCredentials"); - scope.Start(); - try - { - var response = _dataFactoryIntegrationRuntimeIntegrationRuntimesRestClient.SyncCredentials(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); - return response; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Get the integration runtime monitoring data, which includes the monitor data for all the nodes under this integration runtime. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName}/integrationRuntimes/{integrationRuntimeName}/monitoringData - /// - /// - /// Operation Id - /// IntegrationRuntimes_GetMonitoringData - /// - /// - /// - /// The cancellation token to use. - public virtual async Task> GetMonitoringDataAsync(CancellationToken cancellationToken = default) - { - using var scope = _dataFactoryIntegrationRuntimeIntegrationRuntimesClientDiagnostics.CreateScope("DataFactoryIntegrationRuntimeResource.GetMonitoringData"); - scope.Start(); - try - { - var response = await _dataFactoryIntegrationRuntimeIntegrationRuntimesRestClient.GetMonitoringDataAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); - return response; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Get the integration runtime monitoring data, which includes the monitor data for all the nodes under this integration runtime. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName}/integrationRuntimes/{integrationRuntimeName}/monitoringData - /// - /// - /// Operation Id - /// IntegrationRuntimes_GetMonitoringData - /// - /// - /// - /// The cancellation token to use. - public virtual Response GetMonitoringData(CancellationToken cancellationToken = default) - { - using var scope = _dataFactoryIntegrationRuntimeIntegrationRuntimesClientDiagnostics.CreateScope("DataFactoryIntegrationRuntimeResource.GetMonitoringData"); - scope.Start(); - try - { - var response = _dataFactoryIntegrationRuntimeIntegrationRuntimesRestClient.GetMonitoringData(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); - return response; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Upgrade self-hosted integration runtime to latest version if availability. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName}/integrationRuntimes/{integrationRuntimeName}/upgrade - /// - /// - /// Operation Id - /// IntegrationRuntimes_Upgrade - /// - /// - /// - /// The cancellation token to use. - public virtual async Task UpgradeAsync(CancellationToken cancellationToken = default) - { - using var scope = _dataFactoryIntegrationRuntimeIntegrationRuntimesClientDiagnostics.CreateScope("DataFactoryIntegrationRuntimeResource.Upgrade"); - scope.Start(); - try - { - var response = await _dataFactoryIntegrationRuntimeIntegrationRuntimesRestClient.UpgradeAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); - return response; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Upgrade self-hosted integration runtime to latest version if availability. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName}/integrationRuntimes/{integrationRuntimeName}/upgrade - /// - /// - /// Operation Id - /// IntegrationRuntimes_Upgrade - /// - /// - /// - /// The cancellation token to use. - public virtual Response Upgrade(CancellationToken cancellationToken = default) - { - using var scope = _dataFactoryIntegrationRuntimeIntegrationRuntimesClientDiagnostics.CreateScope("DataFactoryIntegrationRuntimeResource.Upgrade"); - scope.Start(); - try - { - var response = _dataFactoryIntegrationRuntimeIntegrationRuntimesRestClient.Upgrade(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); - return response; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Remove all linked integration runtimes under specific data factory in a self-hosted integration runtime. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName}/integrationRuntimes/{integrationRuntimeName}/removeLinks - /// - /// - /// Operation Id - /// IntegrationRuntimes_RemoveLinks - /// - /// - /// - /// The data factory name for the linked integration runtime. - /// The cancellation token to use. - /// is null. - public virtual async Task RemoveLinksAsync(LinkedIntegrationRuntimeContent content, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(content, nameof(content)); - - using var scope = _dataFactoryIntegrationRuntimeIntegrationRuntimesClientDiagnostics.CreateScope("DataFactoryIntegrationRuntimeResource.RemoveLinks"); - scope.Start(); - try - { - var response = await _dataFactoryIntegrationRuntimeIntegrationRuntimesRestClient.RemoveLinksAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, content, cancellationToken).ConfigureAwait(false); - return response; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Remove all linked integration runtimes under specific data factory in a self-hosted integration runtime. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName}/integrationRuntimes/{integrationRuntimeName}/removeLinks - /// - /// - /// Operation Id - /// IntegrationRuntimes_RemoveLinks - /// - /// - /// - /// The data factory name for the linked integration runtime. - /// The cancellation token to use. - /// is null. - public virtual Response RemoveLinks(LinkedIntegrationRuntimeContent content, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(content, nameof(content)); - - using var scope = _dataFactoryIntegrationRuntimeIntegrationRuntimesClientDiagnostics.CreateScope("DataFactoryIntegrationRuntimeResource.RemoveLinks"); - scope.Start(); - try - { - var response = _dataFactoryIntegrationRuntimeIntegrationRuntimesRestClient.RemoveLinks(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, content, cancellationToken); - return response; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Create a linked integration runtime entry in a shared integration runtime. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName}/integrationRuntimes/{integrationRuntimeName}/linkedIntegrationRuntime - /// - /// - /// Operation Id - /// IntegrationRuntimes_CreateLinkedIntegrationRuntime - /// - /// - /// - /// The linked integration runtime properties. - /// The cancellation token to use. - /// is null. - public virtual async Task> CreateLinkedIntegrationRuntimeAsync(CreateLinkedIntegrationRuntimeContent content, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(content, nameof(content)); - - using var scope = _dataFactoryIntegrationRuntimeIntegrationRuntimesClientDiagnostics.CreateScope("DataFactoryIntegrationRuntimeResource.CreateLinkedIntegrationRuntime"); - scope.Start(); - try - { - var response = await _dataFactoryIntegrationRuntimeIntegrationRuntimesRestClient.CreateLinkedIntegrationRuntimeAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, content, cancellationToken).ConfigureAwait(false); - return response; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Create a linked integration runtime entry in a shared integration runtime. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName}/integrationRuntimes/{integrationRuntimeName}/linkedIntegrationRuntime - /// - /// - /// Operation Id - /// IntegrationRuntimes_CreateLinkedIntegrationRuntime - /// - /// - /// - /// The linked integration runtime properties. - /// The cancellation token to use. - /// is null. - public virtual Response CreateLinkedIntegrationRuntime(CreateLinkedIntegrationRuntimeContent content, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(content, nameof(content)); - - using var scope = _dataFactoryIntegrationRuntimeIntegrationRuntimesClientDiagnostics.CreateScope("DataFactoryIntegrationRuntimeResource.CreateLinkedIntegrationRuntime"); - scope.Start(); - try - { - var response = _dataFactoryIntegrationRuntimeIntegrationRuntimesRestClient.CreateLinkedIntegrationRuntime(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, content, cancellationToken); - return response; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Refresh a SSIS integration runtime object metadata. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName}/integrationRuntimes/{integrationRuntimeName}/refreshObjectMetadata - /// - /// - /// Operation Id - /// IntegrationRuntimeObjectMetadata_Refresh - /// - /// - /// - /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. - /// The cancellation token to use. - public virtual async Task> RefreshIntegrationRuntimeObjectMetadataAsync(WaitUntil waitUntil, CancellationToken cancellationToken = default) - { - using var scope = _integrationRuntimeObjectMetadataClientDiagnostics.CreateScope("DataFactoryIntegrationRuntimeResource.RefreshIntegrationRuntimeObjectMetadata"); - scope.Start(); - try - { - var response = await _integrationRuntimeObjectMetadataRestClient.RefreshAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); - var operation = new DataFactoryArmOperation(new SsisObjectMetadataStatusResultOperationSource(), _integrationRuntimeObjectMetadataClientDiagnostics, Pipeline, _integrationRuntimeObjectMetadataRestClient.CreateRefreshRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name).Request, response, OperationFinalStateVia.Location); - if (waitUntil == WaitUntil.Completed) - await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); - return operation; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Refresh a SSIS integration runtime object metadata. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName}/integrationRuntimes/{integrationRuntimeName}/refreshObjectMetadata - /// - /// - /// Operation Id - /// IntegrationRuntimeObjectMetadata_Refresh - /// - /// - /// - /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. - /// The cancellation token to use. - public virtual ArmOperation RefreshIntegrationRuntimeObjectMetadata(WaitUntil waitUntil, CancellationToken cancellationToken = default) - { - using var scope = _integrationRuntimeObjectMetadataClientDiagnostics.CreateScope("DataFactoryIntegrationRuntimeResource.RefreshIntegrationRuntimeObjectMetadata"); - scope.Start(); - try - { - var response = _integrationRuntimeObjectMetadataRestClient.Refresh(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); - var operation = new DataFactoryArmOperation(new SsisObjectMetadataStatusResultOperationSource(), _integrationRuntimeObjectMetadataClientDiagnostics, Pipeline, _integrationRuntimeObjectMetadataRestClient.CreateRefreshRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name).Request, response, OperationFinalStateVia.Location); - if (waitUntil == WaitUntil.Completed) - operation.WaitForCompletion(cancellationToken); - return operation; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Get a SSIS integration runtime object metadata by specified path. The return is pageable metadata list. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName}/integrationRuntimes/{integrationRuntimeName}/getObjectMetadata - /// - /// - /// Operation Id - /// IntegrationRuntimeObjectMetadata_Get - /// - /// - /// - /// The parameters for getting a SSIS object metadata. - /// The cancellation token to use. - /// An async collection of that may take multiple service requests to iterate over. - public virtual AsyncPageable GetAllIntegrationRuntimeObjectMetadataAsync(GetSsisObjectMetadataContent content = null, CancellationToken cancellationToken = default) - { - HttpMessage FirstPageRequest(int? pageSizeHint) => _integrationRuntimeObjectMetadataRestClient.CreateGetRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, content); - return PageableHelpers.CreateAsyncPageable(FirstPageRequest, null, SsisObjectMetadata.DeserializeSsisObjectMetadata, _integrationRuntimeObjectMetadataClientDiagnostics, Pipeline, "DataFactoryIntegrationRuntimeResource.GetAllIntegrationRuntimeObjectMetadata", "value", null, cancellationToken); - } - - /// - /// Get a SSIS integration runtime object metadata by specified path. The return is pageable metadata list. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName}/integrationRuntimes/{integrationRuntimeName}/getObjectMetadata - /// - /// - /// Operation Id - /// IntegrationRuntimeObjectMetadata_Get - /// - /// - /// - /// The parameters for getting a SSIS object metadata. - /// The cancellation token to use. - /// A collection of that may take multiple service requests to iterate over. - public virtual Pageable GetAllIntegrationRuntimeObjectMetadata(GetSsisObjectMetadataContent content = null, CancellationToken cancellationToken = default) - { - HttpMessage FirstPageRequest(int? pageSizeHint) => _integrationRuntimeObjectMetadataRestClient.CreateGetRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, content); - return PageableHelpers.CreatePageable(FirstPageRequest, null, SsisObjectMetadata.DeserializeSsisObjectMetadata, _integrationRuntimeObjectMetadataClientDiagnostics, Pipeline, "DataFactoryIntegrationRuntimeResource.GetAllIntegrationRuntimeObjectMetadata", "value", null, cancellationToken); - } - - /// - /// Gets a self-hosted integration runtime node. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName}/integrationRuntimes/{integrationRuntimeName}/nodes/{nodeName} - /// - /// - /// Operation Id - /// IntegrationRuntimeNodes_Get - /// - /// - /// - /// The integration runtime node name. - /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// is null. - public virtual async Task> GetIntegrationRuntimeNodeAsync(string nodeName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(nodeName, nameof(nodeName)); - - using var scope = _integrationRuntimeNodesClientDiagnostics.CreateScope("DataFactoryIntegrationRuntimeResource.GetIntegrationRuntimeNode"); - scope.Start(); - try - { - var response = await _integrationRuntimeNodesRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, nodeName, cancellationToken).ConfigureAwait(false); - return response; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Gets a self-hosted integration runtime node. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName}/integrationRuntimes/{integrationRuntimeName}/nodes/{nodeName} - /// - /// - /// Operation Id - /// IntegrationRuntimeNodes_Get - /// - /// - /// - /// The integration runtime node name. - /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// is null. - public virtual Response GetIntegrationRuntimeNode(string nodeName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(nodeName, nameof(nodeName)); - - using var scope = _integrationRuntimeNodesClientDiagnostics.CreateScope("DataFactoryIntegrationRuntimeResource.GetIntegrationRuntimeNode"); - scope.Start(); - try - { - var response = _integrationRuntimeNodesRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, nodeName, cancellationToken); - return response; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Deletes a self-hosted integration runtime node. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName}/integrationRuntimes/{integrationRuntimeName}/nodes/{nodeName} - /// - /// - /// Operation Id - /// IntegrationRuntimeNodes_Delete - /// - /// - /// - /// The integration runtime node name. - /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// is null. - public virtual async Task DeleteIntegrationRuntimeNodeAsync(string nodeName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(nodeName, nameof(nodeName)); - - using var scope = _integrationRuntimeNodesClientDiagnostics.CreateScope("DataFactoryIntegrationRuntimeResource.DeleteIntegrationRuntimeNode"); - scope.Start(); - try - { - var response = await _integrationRuntimeNodesRestClient.DeleteAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, nodeName, cancellationToken).ConfigureAwait(false); - return response; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Deletes a self-hosted integration runtime node. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName}/integrationRuntimes/{integrationRuntimeName}/nodes/{nodeName} - /// - /// - /// Operation Id - /// IntegrationRuntimeNodes_Delete - /// - /// - /// - /// The integration runtime node name. - /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// is null. - public virtual Response DeleteIntegrationRuntimeNode(string nodeName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(nodeName, nameof(nodeName)); - - using var scope = _integrationRuntimeNodesClientDiagnostics.CreateScope("DataFactoryIntegrationRuntimeResource.DeleteIntegrationRuntimeNode"); - scope.Start(); - try - { - var response = _integrationRuntimeNodesRestClient.Delete(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, nodeName, cancellationToken); - return response; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Updates a self-hosted integration runtime node. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName}/integrationRuntimes/{integrationRuntimeName}/nodes/{nodeName} - /// - /// - /// Operation Id - /// IntegrationRuntimeNodes_Update - /// - /// - /// - /// The integration runtime node name. - /// The parameters for updating an integration runtime node. - /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// or is null. - public virtual async Task> UpdateIntegrationRuntimeNodeAsync(string nodeName, UpdateIntegrationRuntimeNodeContent content, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(nodeName, nameof(nodeName)); - Argument.AssertNotNull(content, nameof(content)); - - using var scope = _integrationRuntimeNodesClientDiagnostics.CreateScope("DataFactoryIntegrationRuntimeResource.UpdateIntegrationRuntimeNode"); - scope.Start(); - try - { - var response = await _integrationRuntimeNodesRestClient.UpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, nodeName, content, cancellationToken).ConfigureAwait(false); - return response; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Updates a self-hosted integration runtime node. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName}/integrationRuntimes/{integrationRuntimeName}/nodes/{nodeName} - /// - /// - /// Operation Id - /// IntegrationRuntimeNodes_Update - /// - /// - /// - /// The integration runtime node name. - /// The parameters for updating an integration runtime node. - /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// or is null. - public virtual Response UpdateIntegrationRuntimeNode(string nodeName, UpdateIntegrationRuntimeNodeContent content, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(nodeName, nameof(nodeName)); - Argument.AssertNotNull(content, nameof(content)); - - using var scope = _integrationRuntimeNodesClientDiagnostics.CreateScope("DataFactoryIntegrationRuntimeResource.UpdateIntegrationRuntimeNode"); - scope.Start(); - try - { - var response = _integrationRuntimeNodesRestClient.Update(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, nodeName, content, cancellationToken); - return response; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Get the IP address of self-hosted integration runtime node. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName}/integrationRuntimes/{integrationRuntimeName}/nodes/{nodeName}/ipAddress - /// - /// - /// Operation Id - /// IntegrationRuntimeNodes_GetIpAddress - /// - /// - /// - /// The integration runtime node name. - /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// is null. - public virtual async Task> GetIPAddressIntegrationRuntimeNodeAsync(string nodeName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(nodeName, nameof(nodeName)); - - using var scope = _integrationRuntimeNodesClientDiagnostics.CreateScope("DataFactoryIntegrationRuntimeResource.GetIPAddressIntegrationRuntimeNode"); - scope.Start(); - try - { - var response = await _integrationRuntimeNodesRestClient.GetIPAddressAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, nodeName, cancellationToken).ConfigureAwait(false); - return response; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Get the IP address of self-hosted integration runtime node. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName}/integrationRuntimes/{integrationRuntimeName}/nodes/{nodeName}/ipAddress - /// - /// - /// Operation Id - /// IntegrationRuntimeNodes_GetIpAddress - /// - /// - /// - /// The integration runtime node name. - /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// is null. - public virtual Response GetIPAddressIntegrationRuntimeNode(string nodeName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(nodeName, nameof(nodeName)); - - using var scope = _integrationRuntimeNodesClientDiagnostics.CreateScope("DataFactoryIntegrationRuntimeResource.GetIPAddressIntegrationRuntimeNode"); - scope.Start(); - try - { - var response = _integrationRuntimeNodesRestClient.GetIPAddress(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, nodeName, cancellationToken); - return response; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/DataFactoryLinkedServiceCollection.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/DataFactoryLinkedServiceCollection.cs deleted file mode 100644 index 60185128..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/DataFactoryLinkedServiceCollection.cs +++ /dev/null @@ -1,337 +0,0 @@ -// - -#nullable disable - -using System.Collections; -using System.Globalization; -using Azure.Core; -using Azure.Core.Pipeline; - -namespace Azure.ResourceManager.DataFactory -{ - /// - /// A class representing a collection of and their operations. - /// Each in the collection will belong to the same instance of . - /// To get a instance call the GetDataFactoryLinkedServices method from an instance of . - /// - public partial class DataFactoryLinkedServiceCollection : ArmCollection, IEnumerable, IAsyncEnumerable - { - private readonly ClientDiagnostics _dataFactoryLinkedServiceLinkedServicesClientDiagnostics; - private readonly LinkedServicesRestOperations _dataFactoryLinkedServiceLinkedServicesRestClient; - - /// Initializes a new instance of the class for mocking. - protected DataFactoryLinkedServiceCollection() - { - } - - /// Initializes a new instance of the class. - /// The client parameters to use in these operations. - /// The identifier of the parent resource that is the target of operations. - internal DataFactoryLinkedServiceCollection(ArmClient client, ResourceIdentifier id) : base(client, id) - { - _dataFactoryLinkedServiceLinkedServicesClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.DataFactory", DataFactoryLinkedServiceResource.ResourceType.Namespace, Diagnostics); - TryGetApiVersion(DataFactoryLinkedServiceResource.ResourceType, out string dataFactoryLinkedServiceLinkedServicesApiVersion); - _dataFactoryLinkedServiceLinkedServicesRestClient = new LinkedServicesRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, dataFactoryLinkedServiceLinkedServicesApiVersion); -#if DEBUG - ValidateResourceId(Id); -#endif - } - - internal static void ValidateResourceId(ResourceIdentifier id) - { - if (id.ResourceType != DataFactoryResource.ResourceType) - throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, DataFactoryResource.ResourceType), nameof(id)); - } - - /// - /// Creates or updates a linked service. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName}/linkedservices/{linkedServiceName} - /// - /// - /// Operation Id - /// LinkedServices_CreateOrUpdate - /// - /// - /// - /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. - /// The linked service name. - /// Linked service resource definition. - /// ETag of the linkedService entity. Should only be specified for update, for which it should match existing entity or can be * for unconditional update. - /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// or is null. - public virtual async Task> CreateOrUpdateAsync(WaitUntil waitUntil, string linkedServiceName, DataFactoryLinkedServiceData data, string ifMatch = null, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(linkedServiceName, nameof(linkedServiceName)); - Argument.AssertNotNull(data, nameof(data)); - - using var scope = _dataFactoryLinkedServiceLinkedServicesClientDiagnostics.CreateScope("DataFactoryLinkedServiceCollection.CreateOrUpdate"); - scope.Start(); - try - { - var response = await _dataFactoryLinkedServiceLinkedServicesRestClient.CreateOrUpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, linkedServiceName, data, ifMatch, cancellationToken).ConfigureAwait(false); - var operation = new DataFactoryArmOperation(Response.FromValue(new DataFactoryLinkedServiceResource(Client, response), response.GetRawResponse())); - if (waitUntil == WaitUntil.Completed) - await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); - return operation; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Creates or updates a linked service. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName}/linkedservices/{linkedServiceName} - /// - /// - /// Operation Id - /// LinkedServices_CreateOrUpdate - /// - /// - /// - /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. - /// The linked service name. - /// Linked service resource definition. - /// ETag of the linkedService entity. Should only be specified for update, for which it should match existing entity or can be * for unconditional update. - /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// or is null. - public virtual ArmOperation CreateOrUpdate(WaitUntil waitUntil, string linkedServiceName, DataFactoryLinkedServiceData data, string ifMatch = null, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(linkedServiceName, nameof(linkedServiceName)); - Argument.AssertNotNull(data, nameof(data)); - - using var scope = _dataFactoryLinkedServiceLinkedServicesClientDiagnostics.CreateScope("DataFactoryLinkedServiceCollection.CreateOrUpdate"); - scope.Start(); - try - { - var response = _dataFactoryLinkedServiceLinkedServicesRestClient.CreateOrUpdate(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, linkedServiceName, data, ifMatch, cancellationToken); - var operation = new DataFactoryArmOperation(Response.FromValue(new DataFactoryLinkedServiceResource(Client, response), response.GetRawResponse())); - if (waitUntil == WaitUntil.Completed) - operation.WaitForCompletion(cancellationToken); - return operation; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Gets a linked service. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName}/linkedservices/{linkedServiceName} - /// - /// - /// Operation Id - /// LinkedServices_Get - /// - /// - /// - /// The linked service name. - /// ETag of the linked service entity. Should only be specified for get. If the ETag matches the existing entity tag, or if * was provided, then no content will be returned. - /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// is null. - public virtual async Task> GetAsync(string linkedServiceName, string ifNoneMatch = null, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(linkedServiceName, nameof(linkedServiceName)); - - using var scope = _dataFactoryLinkedServiceLinkedServicesClientDiagnostics.CreateScope("DataFactoryLinkedServiceCollection.Get"); - scope.Start(); - try - { - var response = await _dataFactoryLinkedServiceLinkedServicesRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, linkedServiceName, ifNoneMatch, cancellationToken).ConfigureAwait(false); - if (response.Value == null) - throw new RequestFailedException(response.GetRawResponse()); - return Response.FromValue(new DataFactoryLinkedServiceResource(Client, response.Value), response.GetRawResponse()); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Gets a linked service. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName}/linkedservices/{linkedServiceName} - /// - /// - /// Operation Id - /// LinkedServices_Get - /// - /// - /// - /// The linked service name. - /// ETag of the linked service entity. Should only be specified for get. If the ETag matches the existing entity tag, or if * was provided, then no content will be returned. - /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// is null. - public virtual Response Get(string linkedServiceName, string ifNoneMatch = null, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(linkedServiceName, nameof(linkedServiceName)); - - using var scope = _dataFactoryLinkedServiceLinkedServicesClientDiagnostics.CreateScope("DataFactoryLinkedServiceCollection.Get"); - scope.Start(); - try - { - var response = _dataFactoryLinkedServiceLinkedServicesRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, linkedServiceName, ifNoneMatch, cancellationToken); - if (response.Value == null) - throw new RequestFailedException(response.GetRawResponse()); - return Response.FromValue(new DataFactoryLinkedServiceResource(Client, response.Value), response.GetRawResponse()); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Lists linked services. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName}/linkedservices - /// - /// - /// Operation Id - /// LinkedServices_ListByFactory - /// - /// - /// - /// The cancellation token to use. - /// An async collection of that may take multiple service requests to iterate over. - public virtual AsyncPageable GetAllAsync(CancellationToken cancellationToken = default) - { - HttpMessage FirstPageRequest(int? pageSizeHint) => _dataFactoryLinkedServiceLinkedServicesRestClient.CreateListByFactoryRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name); - HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _dataFactoryLinkedServiceLinkedServicesRestClient.CreateListByFactoryNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name); - return PageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new DataFactoryLinkedServiceResource(Client, DataFactoryLinkedServiceData.DeserializeDataFactoryLinkedServiceData(e)), _dataFactoryLinkedServiceLinkedServicesClientDiagnostics, Pipeline, "DataFactoryLinkedServiceCollection.GetAll", "value", "nextLink", cancellationToken); - } - - /// - /// Lists linked services. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName}/linkedservices - /// - /// - /// Operation Id - /// LinkedServices_ListByFactory - /// - /// - /// - /// The cancellation token to use. - /// A collection of that may take multiple service requests to iterate over. - public virtual Pageable GetAll(CancellationToken cancellationToken = default) - { - HttpMessage FirstPageRequest(int? pageSizeHint) => _dataFactoryLinkedServiceLinkedServicesRestClient.CreateListByFactoryRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name); - HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _dataFactoryLinkedServiceLinkedServicesRestClient.CreateListByFactoryNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name); - return PageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new DataFactoryLinkedServiceResource(Client, DataFactoryLinkedServiceData.DeserializeDataFactoryLinkedServiceData(e)), _dataFactoryLinkedServiceLinkedServicesClientDiagnostics, Pipeline, "DataFactoryLinkedServiceCollection.GetAll", "value", "nextLink", cancellationToken); - } - - /// - /// Checks to see if the resource exists in azure. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName}/linkedservices/{linkedServiceName} - /// - /// - /// Operation Id - /// LinkedServices_Get - /// - /// - /// - /// The linked service name. - /// ETag of the linked service entity. Should only be specified for get. If the ETag matches the existing entity tag, or if * was provided, then no content will be returned. - /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// is null. - public virtual async Task> ExistsAsync(string linkedServiceName, string ifNoneMatch = null, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(linkedServiceName, nameof(linkedServiceName)); - - using var scope = _dataFactoryLinkedServiceLinkedServicesClientDiagnostics.CreateScope("DataFactoryLinkedServiceCollection.Exists"); - scope.Start(); - try - { - var response = await _dataFactoryLinkedServiceLinkedServicesRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, linkedServiceName, ifNoneMatch, cancellationToken: cancellationToken).ConfigureAwait(false); - return Response.FromValue(response.Value != null, response.GetRawResponse()); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Checks to see if the resource exists in azure. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName}/linkedservices/{linkedServiceName} - /// - /// - /// Operation Id - /// LinkedServices_Get - /// - /// - /// - /// The linked service name. - /// ETag of the linked service entity. Should only be specified for get. If the ETag matches the existing entity tag, or if * was provided, then no content will be returned. - /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// is null. - public virtual Response Exists(string linkedServiceName, string ifNoneMatch = null, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(linkedServiceName, nameof(linkedServiceName)); - - using var scope = _dataFactoryLinkedServiceLinkedServicesClientDiagnostics.CreateScope("DataFactoryLinkedServiceCollection.Exists"); - scope.Start(); - try - { - var response = _dataFactoryLinkedServiceLinkedServicesRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, linkedServiceName, ifNoneMatch, cancellationToken: cancellationToken); - return Response.FromValue(response.Value != null, response.GetRawResponse()); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - IEnumerator IEnumerable.GetEnumerator() - { - return GetAll().GetEnumerator(); - } - - IEnumerator IEnumerable.GetEnumerator() - { - return GetAll().GetEnumerator(); - } - - IAsyncEnumerator IAsyncEnumerable.GetAsyncEnumerator(CancellationToken cancellationToken) - { - return GetAllAsync(cancellationToken: cancellationToken).GetAsyncEnumerator(cancellationToken); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/DataFactoryLinkedServiceData.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/DataFactoryLinkedServiceData.cs deleted file mode 100644 index ca8a6606..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/DataFactoryLinkedServiceData.cs +++ /dev/null @@ -1,57 +0,0 @@ -// - -#nullable disable - -using Azure.Core; -using AzureDataFactory.TestingFramework.Models; -using Azure.ResourceManager.Models; - -namespace Azure.ResourceManager.DataFactory -{ - /// - /// A class representing the DataFactoryLinkedService data model. - /// Linked service resource type. - /// - public partial class DataFactoryLinkedServiceData : ResourceData - { - /// Initializes a new instance of DataFactoryLinkedServiceData. - /// - /// Properties of linked service. - /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. - /// The available derived classes include , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , and . - /// - /// is null. - public DataFactoryLinkedServiceData(DataFactoryLinkedServiceProperties properties) - { - Argument.AssertNotNull(properties, nameof(properties)); - - Properties = properties; - } - - /// Initializes a new instance of DataFactoryLinkedServiceData. - /// The id. - /// The name. - /// The resourceType. - /// The systemData. - /// - /// Properties of linked service. - /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. - /// The available derived classes include , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , and . - /// - /// Etag identifies change in the resource. - internal DataFactoryLinkedServiceData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, DataFactoryLinkedServiceProperties properties, ETag? eTag) : base(id, name, resourceType, systemData) - { - Properties = properties; - ETag = eTag; - } - - /// - /// Properties of linked service. - /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. - /// The available derived classes include , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , and . - /// - public DataFactoryLinkedServiceProperties Properties { get; set; } - /// Etag identifies change in the resource. - public ETag? ETag { get; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/DataFactoryLinkedServiceResource.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/DataFactoryLinkedServiceResource.cs deleted file mode 100644 index 7a430683..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/DataFactoryLinkedServiceResource.cs +++ /dev/null @@ -1,293 +0,0 @@ -// - -#nullable disable - -using System.Globalization; -using Azure.Core; -using Azure.Core.Pipeline; - -namespace Azure.ResourceManager.DataFactory -{ - /// - /// A Class representing a DataFactoryLinkedService along with the instance operations that can be performed on it. - /// If you have a you can construct a - /// from an instance of using the GetDataFactoryLinkedServiceResource method. - /// Otherwise you can get one from its parent resource using the GetDataFactoryLinkedService method. - /// - public partial class DataFactoryLinkedServiceResource : ArmResource - { - /// Generate the resource identifier of a instance. - public static ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string factoryName, string linkedServiceName) - { - var resourceId = $"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName}/linkedservices/{linkedServiceName}"; - return new ResourceIdentifier(resourceId); - } - - private readonly ClientDiagnostics _dataFactoryLinkedServiceLinkedServicesClientDiagnostics; - private readonly LinkedServicesRestOperations _dataFactoryLinkedServiceLinkedServicesRestClient; - private readonly DataFactoryLinkedServiceData _data; - - /// Initializes a new instance of the class for mocking. - protected DataFactoryLinkedServiceResource() - { - } - - /// Initializes a new instance of the class. - /// The client parameters to use in these operations. - /// The resource that is the target of operations. - internal DataFactoryLinkedServiceResource(ArmClient client, DataFactoryLinkedServiceData data) : this(client, data.Id) - { - HasData = true; - _data = data; - } - - /// Initializes a new instance of the class. - /// The client parameters to use in these operations. - /// The identifier of the resource that is the target of operations. - internal DataFactoryLinkedServiceResource(ArmClient client, ResourceIdentifier id) : base(client, id) - { - _dataFactoryLinkedServiceLinkedServicesClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.DataFactory", ResourceType.Namespace, Diagnostics); - TryGetApiVersion(ResourceType, out string dataFactoryLinkedServiceLinkedServicesApiVersion); - _dataFactoryLinkedServiceLinkedServicesRestClient = new LinkedServicesRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, dataFactoryLinkedServiceLinkedServicesApiVersion); -#if DEBUG - ValidateResourceId(Id); -#endif - } - - /// Gets the resource type for the operations. - public static readonly ResourceType ResourceType = "Microsoft.DataFactory/factories/linkedservices"; - - /// Gets whether or not the current instance has data. - public virtual bool HasData { get; } - - /// Gets the data representing this Feature. - /// Throws if there is no data loaded in the current instance. - public virtual DataFactoryLinkedServiceData Data - { - get - { - if (!HasData) - throw new InvalidOperationException("The current instance does not have data, you must call Get first."); - return _data; - } - } - - internal static void ValidateResourceId(ResourceIdentifier id) - { - if (id.ResourceType != ResourceType) - throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, ResourceType), nameof(id)); - } - - /// - /// Gets a linked service. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName}/linkedservices/{linkedServiceName} - /// - /// - /// Operation Id - /// LinkedServices_Get - /// - /// - /// - /// ETag of the linked service entity. Should only be specified for get. If the ETag matches the existing entity tag, or if * was provided, then no content will be returned. - /// The cancellation token to use. - public virtual async Task> GetAsync(string ifNoneMatch = null, CancellationToken cancellationToken = default) - { - using var scope = _dataFactoryLinkedServiceLinkedServicesClientDiagnostics.CreateScope("DataFactoryLinkedServiceResource.Get"); - scope.Start(); - try - { - var response = await _dataFactoryLinkedServiceLinkedServicesRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, ifNoneMatch, cancellationToken).ConfigureAwait(false); - if (response.Value == null) - throw new RequestFailedException(response.GetRawResponse()); - return Response.FromValue(new DataFactoryLinkedServiceResource(Client, response.Value), response.GetRawResponse()); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Gets a linked service. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName}/linkedservices/{linkedServiceName} - /// - /// - /// Operation Id - /// LinkedServices_Get - /// - /// - /// - /// ETag of the linked service entity. Should only be specified for get. If the ETag matches the existing entity tag, or if * was provided, then no content will be returned. - /// The cancellation token to use. - public virtual Response Get(string ifNoneMatch = null, CancellationToken cancellationToken = default) - { - using var scope = _dataFactoryLinkedServiceLinkedServicesClientDiagnostics.CreateScope("DataFactoryLinkedServiceResource.Get"); - scope.Start(); - try - { - var response = _dataFactoryLinkedServiceLinkedServicesRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, ifNoneMatch, cancellationToken); - if (response.Value == null) - throw new RequestFailedException(response.GetRawResponse()); - return Response.FromValue(new DataFactoryLinkedServiceResource(Client, response.Value), response.GetRawResponse()); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Deletes a linked service. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName}/linkedservices/{linkedServiceName} - /// - /// - /// Operation Id - /// LinkedServices_Delete - /// - /// - /// - /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. - /// The cancellation token to use. - public virtual async Task DeleteAsync(WaitUntil waitUntil, CancellationToken cancellationToken = default) - { - using var scope = _dataFactoryLinkedServiceLinkedServicesClientDiagnostics.CreateScope("DataFactoryLinkedServiceResource.Delete"); - scope.Start(); - try - { - var response = await _dataFactoryLinkedServiceLinkedServicesRestClient.DeleteAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); - var operation = new DataFactoryArmOperation(response); - if (waitUntil == WaitUntil.Completed) - await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false); - return operation; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Deletes a linked service. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName}/linkedservices/{linkedServiceName} - /// - /// - /// Operation Id - /// LinkedServices_Delete - /// - /// - /// - /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. - /// The cancellation token to use. - public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancellationToken = default) - { - using var scope = _dataFactoryLinkedServiceLinkedServicesClientDiagnostics.CreateScope("DataFactoryLinkedServiceResource.Delete"); - scope.Start(); - try - { - var response = _dataFactoryLinkedServiceLinkedServicesRestClient.Delete(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); - var operation = new DataFactoryArmOperation(response); - if (waitUntil == WaitUntil.Completed) - operation.WaitForCompletionResponse(cancellationToken); - return operation; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Creates or updates a linked service. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName}/linkedservices/{linkedServiceName} - /// - /// - /// Operation Id - /// LinkedServices_CreateOrUpdate - /// - /// - /// - /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. - /// Linked service resource definition. - /// ETag of the linkedService entity. Should only be specified for update, for which it should match existing entity or can be * for unconditional update. - /// The cancellation token to use. - /// is null. - public virtual async Task> UpdateAsync(WaitUntil waitUntil, DataFactoryLinkedServiceData data, string ifMatch = null, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(data, nameof(data)); - - using var scope = _dataFactoryLinkedServiceLinkedServicesClientDiagnostics.CreateScope("DataFactoryLinkedServiceResource.Update"); - scope.Start(); - try - { - var response = await _dataFactoryLinkedServiceLinkedServicesRestClient.CreateOrUpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data, ifMatch, cancellationToken).ConfigureAwait(false); - var operation = new DataFactoryArmOperation(Response.FromValue(new DataFactoryLinkedServiceResource(Client, response), response.GetRawResponse())); - if (waitUntil == WaitUntil.Completed) - await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); - return operation; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Creates or updates a linked service. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName}/linkedservices/{linkedServiceName} - /// - /// - /// Operation Id - /// LinkedServices_CreateOrUpdate - /// - /// - /// - /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. - /// Linked service resource definition. - /// ETag of the linkedService entity. Should only be specified for update, for which it should match existing entity or can be * for unconditional update. - /// The cancellation token to use. - /// is null. - public virtual ArmOperation Update(WaitUntil waitUntil, DataFactoryLinkedServiceData data, string ifMatch = null, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(data, nameof(data)); - - using var scope = _dataFactoryLinkedServiceLinkedServicesClientDiagnostics.CreateScope("DataFactoryLinkedServiceResource.Update"); - scope.Start(); - try - { - var response = _dataFactoryLinkedServiceLinkedServicesRestClient.CreateOrUpdate(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data, ifMatch, cancellationToken); - var operation = new DataFactoryArmOperation(Response.FromValue(new DataFactoryLinkedServiceResource(Client, response), response.GetRawResponse())); - if (waitUntil == WaitUntil.Completed) - operation.WaitForCompletion(cancellationToken); - return operation; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/DataFactoryManagedIdentityCredentialCollection.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/DataFactoryManagedIdentityCredentialCollection.cs deleted file mode 100644 index 3875622a..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/DataFactoryManagedIdentityCredentialCollection.cs +++ /dev/null @@ -1,337 +0,0 @@ -// - -#nullable disable - -using System.Collections; -using System.Globalization; -using Azure.Core; -using Azure.Core.Pipeline; - -namespace Azure.ResourceManager.DataFactory -{ - /// - /// A class representing a collection of and their operations. - /// Each in the collection will belong to the same instance of . - /// To get a instance call the GetDataFactoryManagedIdentityCredentials method from an instance of . - /// - public partial class DataFactoryManagedIdentityCredentialCollection : ArmCollection, IEnumerable, IAsyncEnumerable - { - private readonly ClientDiagnostics _dataFactoryManagedIdentityCredentialCredentialOperationsClientDiagnostics; - private readonly CredentialRestOperations _dataFactoryManagedIdentityCredentialCredentialOperationsRestClient; - - /// Initializes a new instance of the class for mocking. - protected DataFactoryManagedIdentityCredentialCollection() - { - } - - /// Initializes a new instance of the class. - /// The client parameters to use in these operations. - /// The identifier of the parent resource that is the target of operations. - internal DataFactoryManagedIdentityCredentialCollection(ArmClient client, ResourceIdentifier id) : base(client, id) - { - _dataFactoryManagedIdentityCredentialCredentialOperationsClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.DataFactory", DataFactoryManagedIdentityCredentialResource.ResourceType.Namespace, Diagnostics); - TryGetApiVersion(DataFactoryManagedIdentityCredentialResource.ResourceType, out string dataFactoryManagedIdentityCredentialCredentialOperationsApiVersion); - _dataFactoryManagedIdentityCredentialCredentialOperationsRestClient = new CredentialRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, dataFactoryManagedIdentityCredentialCredentialOperationsApiVersion); -#if DEBUG - ValidateResourceId(Id); -#endif - } - - internal static void ValidateResourceId(ResourceIdentifier id) - { - if (id.ResourceType != DataFactoryResource.ResourceType) - throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, DataFactoryResource.ResourceType), nameof(id)); - } - - /// - /// Creates or updates a credential. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName}/credentials/{credentialName} - /// - /// - /// Operation Id - /// CredentialOperations_CreateOrUpdate - /// - /// - /// - /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. - /// Credential name. - /// Credential resource definition. - /// ETag of the credential entity. Should only be specified for update, for which it should match existing entity or can be * for unconditional update. - /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// or is null. - public virtual async Task> CreateOrUpdateAsync(WaitUntil waitUntil, string credentialName, DataFactoryManagedIdentityCredentialData data, string ifMatch = null, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(credentialName, nameof(credentialName)); - Argument.AssertNotNull(data, nameof(data)); - - using var scope = _dataFactoryManagedIdentityCredentialCredentialOperationsClientDiagnostics.CreateScope("DataFactoryManagedIdentityCredentialCollection.CreateOrUpdate"); - scope.Start(); - try - { - var response = await _dataFactoryManagedIdentityCredentialCredentialOperationsRestClient.CreateOrUpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, credentialName, data, ifMatch, cancellationToken).ConfigureAwait(false); - var operation = new DataFactoryArmOperation(Response.FromValue(new DataFactoryManagedIdentityCredentialResource(Client, response), response.GetRawResponse())); - if (waitUntil == WaitUntil.Completed) - await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); - return operation; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Creates or updates a credential. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName}/credentials/{credentialName} - /// - /// - /// Operation Id - /// CredentialOperations_CreateOrUpdate - /// - /// - /// - /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. - /// Credential name. - /// Credential resource definition. - /// ETag of the credential entity. Should only be specified for update, for which it should match existing entity or can be * for unconditional update. - /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// or is null. - public virtual ArmOperation CreateOrUpdate(WaitUntil waitUntil, string credentialName, DataFactoryManagedIdentityCredentialData data, string ifMatch = null, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(credentialName, nameof(credentialName)); - Argument.AssertNotNull(data, nameof(data)); - - using var scope = _dataFactoryManagedIdentityCredentialCredentialOperationsClientDiagnostics.CreateScope("DataFactoryManagedIdentityCredentialCollection.CreateOrUpdate"); - scope.Start(); - try - { - var response = _dataFactoryManagedIdentityCredentialCredentialOperationsRestClient.CreateOrUpdate(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, credentialName, data, ifMatch, cancellationToken); - var operation = new DataFactoryArmOperation(Response.FromValue(new DataFactoryManagedIdentityCredentialResource(Client, response), response.GetRawResponse())); - if (waitUntil == WaitUntil.Completed) - operation.WaitForCompletion(cancellationToken); - return operation; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Gets a credential. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName}/credentials/{credentialName} - /// - /// - /// Operation Id - /// CredentialOperations_Get - /// - /// - /// - /// Credential name. - /// ETag of the credential entity. Should only be specified for get. If the ETag matches the existing entity tag, or if * was provided, then no content will be returned. - /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// is null. - public virtual async Task> GetAsync(string credentialName, string ifNoneMatch = null, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(credentialName, nameof(credentialName)); - - using var scope = _dataFactoryManagedIdentityCredentialCredentialOperationsClientDiagnostics.CreateScope("DataFactoryManagedIdentityCredentialCollection.Get"); - scope.Start(); - try - { - var response = await _dataFactoryManagedIdentityCredentialCredentialOperationsRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, credentialName, ifNoneMatch, cancellationToken).ConfigureAwait(false); - if (response.Value == null) - throw new RequestFailedException(response.GetRawResponse()); - return Response.FromValue(new DataFactoryManagedIdentityCredentialResource(Client, response.Value), response.GetRawResponse()); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Gets a credential. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName}/credentials/{credentialName} - /// - /// - /// Operation Id - /// CredentialOperations_Get - /// - /// - /// - /// Credential name. - /// ETag of the credential entity. Should only be specified for get. If the ETag matches the existing entity tag, or if * was provided, then no content will be returned. - /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// is null. - public virtual Response Get(string credentialName, string ifNoneMatch = null, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(credentialName, nameof(credentialName)); - - using var scope = _dataFactoryManagedIdentityCredentialCredentialOperationsClientDiagnostics.CreateScope("DataFactoryManagedIdentityCredentialCollection.Get"); - scope.Start(); - try - { - var response = _dataFactoryManagedIdentityCredentialCredentialOperationsRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, credentialName, ifNoneMatch, cancellationToken); - if (response.Value == null) - throw new RequestFailedException(response.GetRawResponse()); - return Response.FromValue(new DataFactoryManagedIdentityCredentialResource(Client, response.Value), response.GetRawResponse()); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// List credentials. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName}/credentials - /// - /// - /// Operation Id - /// CredentialOperations_ListByFactory - /// - /// - /// - /// The cancellation token to use. - /// An async collection of that may take multiple service requests to iterate over. - public virtual AsyncPageable GetAllAsync(CancellationToken cancellationToken = default) - { - HttpMessage FirstPageRequest(int? pageSizeHint) => _dataFactoryManagedIdentityCredentialCredentialOperationsRestClient.CreateListByFactoryRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name); - HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _dataFactoryManagedIdentityCredentialCredentialOperationsRestClient.CreateListByFactoryNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name); - return PageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new DataFactoryManagedIdentityCredentialResource(Client, DataFactoryManagedIdentityCredentialData.DeserializeDataFactoryManagedIdentityCredentialData(e)), _dataFactoryManagedIdentityCredentialCredentialOperationsClientDiagnostics, Pipeline, "DataFactoryManagedIdentityCredentialCollection.GetAll", "value", "nextLink", cancellationToken); - } - - /// - /// List credentials. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName}/credentials - /// - /// - /// Operation Id - /// CredentialOperations_ListByFactory - /// - /// - /// - /// The cancellation token to use. - /// A collection of that may take multiple service requests to iterate over. - public virtual Pageable GetAll(CancellationToken cancellationToken = default) - { - HttpMessage FirstPageRequest(int? pageSizeHint) => _dataFactoryManagedIdentityCredentialCredentialOperationsRestClient.CreateListByFactoryRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name); - HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _dataFactoryManagedIdentityCredentialCredentialOperationsRestClient.CreateListByFactoryNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name); - return PageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new DataFactoryManagedIdentityCredentialResource(Client, DataFactoryManagedIdentityCredentialData.DeserializeDataFactoryManagedIdentityCredentialData(e)), _dataFactoryManagedIdentityCredentialCredentialOperationsClientDiagnostics, Pipeline, "DataFactoryManagedIdentityCredentialCollection.GetAll", "value", "nextLink", cancellationToken); - } - - /// - /// Checks to see if the resource exists in azure. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName}/credentials/{credentialName} - /// - /// - /// Operation Id - /// CredentialOperations_Get - /// - /// - /// - /// Credential name. - /// ETag of the credential entity. Should only be specified for get. If the ETag matches the existing entity tag, or if * was provided, then no content will be returned. - /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// is null. - public virtual async Task> ExistsAsync(string credentialName, string ifNoneMatch = null, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(credentialName, nameof(credentialName)); - - using var scope = _dataFactoryManagedIdentityCredentialCredentialOperationsClientDiagnostics.CreateScope("DataFactoryManagedIdentityCredentialCollection.Exists"); - scope.Start(); - try - { - var response = await _dataFactoryManagedIdentityCredentialCredentialOperationsRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, credentialName, ifNoneMatch, cancellationToken: cancellationToken).ConfigureAwait(false); - return Response.FromValue(response.Value != null, response.GetRawResponse()); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Checks to see if the resource exists in azure. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName}/credentials/{credentialName} - /// - /// - /// Operation Id - /// CredentialOperations_Get - /// - /// - /// - /// Credential name. - /// ETag of the credential entity. Should only be specified for get. If the ETag matches the existing entity tag, or if * was provided, then no content will be returned. - /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// is null. - public virtual Response Exists(string credentialName, string ifNoneMatch = null, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(credentialName, nameof(credentialName)); - - using var scope = _dataFactoryManagedIdentityCredentialCredentialOperationsClientDiagnostics.CreateScope("DataFactoryManagedIdentityCredentialCollection.Exists"); - scope.Start(); - try - { - var response = _dataFactoryManagedIdentityCredentialCredentialOperationsRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, credentialName, ifNoneMatch, cancellationToken: cancellationToken); - return Response.FromValue(response.Value != null, response.GetRawResponse()); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - IEnumerator IEnumerable.GetEnumerator() - { - return GetAll().GetEnumerator(); - } - - IEnumerator IEnumerable.GetEnumerator() - { - return GetAll().GetEnumerator(); - } - - IAsyncEnumerator IAsyncEnumerable.GetAsyncEnumerator(CancellationToken cancellationToken) - { - return GetAllAsync(cancellationToken: cancellationToken).GetAsyncEnumerator(cancellationToken); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/DataFactoryManagedIdentityCredentialData.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/DataFactoryManagedIdentityCredentialData.cs deleted file mode 100644 index a21a74ab..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/DataFactoryManagedIdentityCredentialData.cs +++ /dev/null @@ -1,45 +0,0 @@ -// - -#nullable disable - -using Azure.Core; -using AzureDataFactory.TestingFramework.Models; -using Azure.ResourceManager.Models; - -namespace Azure.ResourceManager.DataFactory -{ - /// - /// A class representing the DataFactoryManagedIdentityCredential data model. - /// Credential resource type. - /// - public partial class DataFactoryManagedIdentityCredentialData : ResourceData - { - /// Initializes a new instance of DataFactoryManagedIdentityCredentialData. - /// Managed Identity Credential properties. - /// is null. - public DataFactoryManagedIdentityCredentialData(DataFactoryManagedIdentityCredentialProperties properties) - { - Argument.AssertNotNull(properties, nameof(properties)); - - Properties = properties; - } - - /// Initializes a new instance of DataFactoryManagedIdentityCredentialData. - /// The id. - /// The name. - /// The resourceType. - /// The systemData. - /// Managed Identity Credential properties. - /// Etag identifies change in the resource. - internal DataFactoryManagedIdentityCredentialData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, DataFactoryManagedIdentityCredentialProperties properties, ETag? eTag) : base(id, name, resourceType, systemData) - { - Properties = properties; - ETag = eTag; - } - - /// Managed Identity Credential properties. - public DataFactoryManagedIdentityCredentialProperties Properties { get; set; } - /// Etag identifies change in the resource. - public ETag? ETag { get; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/DataFactoryManagedIdentityCredentialResource.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/DataFactoryManagedIdentityCredentialResource.cs deleted file mode 100644 index 9698973e..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/DataFactoryManagedIdentityCredentialResource.cs +++ /dev/null @@ -1,293 +0,0 @@ -// - -#nullable disable - -using System.Globalization; -using Azure.Core; -using Azure.Core.Pipeline; - -namespace Azure.ResourceManager.DataFactory -{ - /// - /// A Class representing a DataFactoryManagedIdentityCredential along with the instance operations that can be performed on it. - /// If you have a you can construct a - /// from an instance of using the GetDataFactoryManagedIdentityCredentialResource method. - /// Otherwise you can get one from its parent resource using the GetDataFactoryManagedIdentityCredential method. - /// - public partial class DataFactoryManagedIdentityCredentialResource : ArmResource - { - /// Generate the resource identifier of a instance. - public static ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string factoryName, string credentialName) - { - var resourceId = $"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName}/credentials/{credentialName}"; - return new ResourceIdentifier(resourceId); - } - - private readonly ClientDiagnostics _dataFactoryManagedIdentityCredentialCredentialOperationsClientDiagnostics; - private readonly CredentialRestOperations _dataFactoryManagedIdentityCredentialCredentialOperationsRestClient; - private readonly DataFactoryManagedIdentityCredentialData _data; - - /// Initializes a new instance of the class for mocking. - protected DataFactoryManagedIdentityCredentialResource() - { - } - - /// Initializes a new instance of the class. - /// The client parameters to use in these operations. - /// The resource that is the target of operations. - internal DataFactoryManagedIdentityCredentialResource(ArmClient client, DataFactoryManagedIdentityCredentialData data) : this(client, data.Id) - { - HasData = true; - _data = data; - } - - /// Initializes a new instance of the class. - /// The client parameters to use in these operations. - /// The identifier of the resource that is the target of operations. - internal DataFactoryManagedIdentityCredentialResource(ArmClient client, ResourceIdentifier id) : base(client, id) - { - _dataFactoryManagedIdentityCredentialCredentialOperationsClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.DataFactory", ResourceType.Namespace, Diagnostics); - TryGetApiVersion(ResourceType, out string dataFactoryManagedIdentityCredentialCredentialOperationsApiVersion); - _dataFactoryManagedIdentityCredentialCredentialOperationsRestClient = new CredentialRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, dataFactoryManagedIdentityCredentialCredentialOperationsApiVersion); -#if DEBUG - ValidateResourceId(Id); -#endif - } - - /// Gets the resource type for the operations. - public static readonly ResourceType ResourceType = "Microsoft.DataFactory/factories/credentials"; - - /// Gets whether or not the current instance has data. - public virtual bool HasData { get; } - - /// Gets the data representing this Feature. - /// Throws if there is no data loaded in the current instance. - public virtual DataFactoryManagedIdentityCredentialData Data - { - get - { - if (!HasData) - throw new InvalidOperationException("The current instance does not have data, you must call Get first."); - return _data; - } - } - - internal static void ValidateResourceId(ResourceIdentifier id) - { - if (id.ResourceType != ResourceType) - throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, ResourceType), nameof(id)); - } - - /// - /// Gets a credential. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName}/credentials/{credentialName} - /// - /// - /// Operation Id - /// CredentialOperations_Get - /// - /// - /// - /// ETag of the credential entity. Should only be specified for get. If the ETag matches the existing entity tag, or if * was provided, then no content will be returned. - /// The cancellation token to use. - public virtual async Task> GetAsync(string ifNoneMatch = null, CancellationToken cancellationToken = default) - { - using var scope = _dataFactoryManagedIdentityCredentialCredentialOperationsClientDiagnostics.CreateScope("DataFactoryManagedIdentityCredentialResource.Get"); - scope.Start(); - try - { - var response = await _dataFactoryManagedIdentityCredentialCredentialOperationsRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, ifNoneMatch, cancellationToken).ConfigureAwait(false); - if (response.Value == null) - throw new RequestFailedException(response.GetRawResponse()); - return Response.FromValue(new DataFactoryManagedIdentityCredentialResource(Client, response.Value), response.GetRawResponse()); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Gets a credential. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName}/credentials/{credentialName} - /// - /// - /// Operation Id - /// CredentialOperations_Get - /// - /// - /// - /// ETag of the credential entity. Should only be specified for get. If the ETag matches the existing entity tag, or if * was provided, then no content will be returned. - /// The cancellation token to use. - public virtual Response Get(string ifNoneMatch = null, CancellationToken cancellationToken = default) - { - using var scope = _dataFactoryManagedIdentityCredentialCredentialOperationsClientDiagnostics.CreateScope("DataFactoryManagedIdentityCredentialResource.Get"); - scope.Start(); - try - { - var response = _dataFactoryManagedIdentityCredentialCredentialOperationsRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, ifNoneMatch, cancellationToken); - if (response.Value == null) - throw new RequestFailedException(response.GetRawResponse()); - return Response.FromValue(new DataFactoryManagedIdentityCredentialResource(Client, response.Value), response.GetRawResponse()); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Deletes a credential. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName}/credentials/{credentialName} - /// - /// - /// Operation Id - /// CredentialOperations_Delete - /// - /// - /// - /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. - /// The cancellation token to use. - public virtual async Task DeleteAsync(WaitUntil waitUntil, CancellationToken cancellationToken = default) - { - using var scope = _dataFactoryManagedIdentityCredentialCredentialOperationsClientDiagnostics.CreateScope("DataFactoryManagedIdentityCredentialResource.Delete"); - scope.Start(); - try - { - var response = await _dataFactoryManagedIdentityCredentialCredentialOperationsRestClient.DeleteAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); - var operation = new DataFactoryArmOperation(response); - if (waitUntil == WaitUntil.Completed) - await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false); - return operation; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Deletes a credential. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName}/credentials/{credentialName} - /// - /// - /// Operation Id - /// CredentialOperations_Delete - /// - /// - /// - /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. - /// The cancellation token to use. - public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancellationToken = default) - { - using var scope = _dataFactoryManagedIdentityCredentialCredentialOperationsClientDiagnostics.CreateScope("DataFactoryManagedIdentityCredentialResource.Delete"); - scope.Start(); - try - { - var response = _dataFactoryManagedIdentityCredentialCredentialOperationsRestClient.Delete(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); - var operation = new DataFactoryArmOperation(response); - if (waitUntil == WaitUntil.Completed) - operation.WaitForCompletionResponse(cancellationToken); - return operation; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Creates or updates a credential. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName}/credentials/{credentialName} - /// - /// - /// Operation Id - /// CredentialOperations_CreateOrUpdate - /// - /// - /// - /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. - /// Credential resource definition. - /// ETag of the credential entity. Should only be specified for update, for which it should match existing entity or can be * for unconditional update. - /// The cancellation token to use. - /// is null. - public virtual async Task> UpdateAsync(WaitUntil waitUntil, DataFactoryManagedIdentityCredentialData data, string ifMatch = null, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(data, nameof(data)); - - using var scope = _dataFactoryManagedIdentityCredentialCredentialOperationsClientDiagnostics.CreateScope("DataFactoryManagedIdentityCredentialResource.Update"); - scope.Start(); - try - { - var response = await _dataFactoryManagedIdentityCredentialCredentialOperationsRestClient.CreateOrUpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data, ifMatch, cancellationToken).ConfigureAwait(false); - var operation = new DataFactoryArmOperation(Response.FromValue(new DataFactoryManagedIdentityCredentialResource(Client, response), response.GetRawResponse())); - if (waitUntil == WaitUntil.Completed) - await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); - return operation; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Creates or updates a credential. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName}/credentials/{credentialName} - /// - /// - /// Operation Id - /// CredentialOperations_CreateOrUpdate - /// - /// - /// - /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. - /// Credential resource definition. - /// ETag of the credential entity. Should only be specified for update, for which it should match existing entity or can be * for unconditional update. - /// The cancellation token to use. - /// is null. - public virtual ArmOperation Update(WaitUntil waitUntil, DataFactoryManagedIdentityCredentialData data, string ifMatch = null, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(data, nameof(data)); - - using var scope = _dataFactoryManagedIdentityCredentialCredentialOperationsClientDiagnostics.CreateScope("DataFactoryManagedIdentityCredentialResource.Update"); - scope.Start(); - try - { - var response = _dataFactoryManagedIdentityCredentialCredentialOperationsRestClient.CreateOrUpdate(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data, ifMatch, cancellationToken); - var operation = new DataFactoryArmOperation(Response.FromValue(new DataFactoryManagedIdentityCredentialResource(Client, response), response.GetRawResponse())); - if (waitUntil == WaitUntil.Completed) - operation.WaitForCompletion(cancellationToken); - return operation; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/DataFactoryManagedVirtualNetworkCollection.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/DataFactoryManagedVirtualNetworkCollection.cs deleted file mode 100644 index 54f63316..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/DataFactoryManagedVirtualNetworkCollection.cs +++ /dev/null @@ -1,337 +0,0 @@ -// - -#nullable disable - -using System.Collections; -using System.Globalization; -using Azure.Core; -using Azure.Core.Pipeline; - -namespace Azure.ResourceManager.DataFactory -{ - /// - /// A class representing a collection of and their operations. - /// Each in the collection will belong to the same instance of . - /// To get a instance call the GetDataFactoryManagedVirtualNetworks method from an instance of . - /// - public partial class DataFactoryManagedVirtualNetworkCollection : ArmCollection, IEnumerable, IAsyncEnumerable - { - private readonly ClientDiagnostics _dataFactoryManagedVirtualNetworkManagedVirtualNetworksClientDiagnostics; - private readonly ManagedVirtualNetworksRestOperations _dataFactoryManagedVirtualNetworkManagedVirtualNetworksRestClient; - - /// Initializes a new instance of the class for mocking. - protected DataFactoryManagedVirtualNetworkCollection() - { - } - - /// Initializes a new instance of the class. - /// The client parameters to use in these operations. - /// The identifier of the parent resource that is the target of operations. - internal DataFactoryManagedVirtualNetworkCollection(ArmClient client, ResourceIdentifier id) : base(client, id) - { - _dataFactoryManagedVirtualNetworkManagedVirtualNetworksClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.DataFactory", DataFactoryManagedVirtualNetworkResource.ResourceType.Namespace, Diagnostics); - TryGetApiVersion(DataFactoryManagedVirtualNetworkResource.ResourceType, out string dataFactoryManagedVirtualNetworkManagedVirtualNetworksApiVersion); - _dataFactoryManagedVirtualNetworkManagedVirtualNetworksRestClient = new ManagedVirtualNetworksRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, dataFactoryManagedVirtualNetworkManagedVirtualNetworksApiVersion); -#if DEBUG - ValidateResourceId(Id); -#endif - } - - internal static void ValidateResourceId(ResourceIdentifier id) - { - if (id.ResourceType != DataFactoryResource.ResourceType) - throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, DataFactoryResource.ResourceType), nameof(id)); - } - - /// - /// Creates or updates a managed Virtual Network. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName}/managedVirtualNetworks/{managedVirtualNetworkName} - /// - /// - /// Operation Id - /// ManagedVirtualNetworks_CreateOrUpdate - /// - /// - /// - /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. - /// Managed virtual network name. - /// Managed Virtual Network resource definition. - /// ETag of the managed Virtual Network entity. Should only be specified for update, for which it should match existing entity or can be * for unconditional update. - /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// or is null. - public virtual async Task> CreateOrUpdateAsync(WaitUntil waitUntil, string managedVirtualNetworkName, DataFactoryManagedVirtualNetworkData data, string ifMatch = null, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(managedVirtualNetworkName, nameof(managedVirtualNetworkName)); - Argument.AssertNotNull(data, nameof(data)); - - using var scope = _dataFactoryManagedVirtualNetworkManagedVirtualNetworksClientDiagnostics.CreateScope("DataFactoryManagedVirtualNetworkCollection.CreateOrUpdate"); - scope.Start(); - try - { - var response = await _dataFactoryManagedVirtualNetworkManagedVirtualNetworksRestClient.CreateOrUpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, managedVirtualNetworkName, data, ifMatch, cancellationToken).ConfigureAwait(false); - var operation = new DataFactoryArmOperation(Response.FromValue(new DataFactoryManagedVirtualNetworkResource(Client, response), response.GetRawResponse())); - if (waitUntil == WaitUntil.Completed) - await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); - return operation; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Creates or updates a managed Virtual Network. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName}/managedVirtualNetworks/{managedVirtualNetworkName} - /// - /// - /// Operation Id - /// ManagedVirtualNetworks_CreateOrUpdate - /// - /// - /// - /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. - /// Managed virtual network name. - /// Managed Virtual Network resource definition. - /// ETag of the managed Virtual Network entity. Should only be specified for update, for which it should match existing entity or can be * for unconditional update. - /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// or is null. - public virtual ArmOperation CreateOrUpdate(WaitUntil waitUntil, string managedVirtualNetworkName, DataFactoryManagedVirtualNetworkData data, string ifMatch = null, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(managedVirtualNetworkName, nameof(managedVirtualNetworkName)); - Argument.AssertNotNull(data, nameof(data)); - - using var scope = _dataFactoryManagedVirtualNetworkManagedVirtualNetworksClientDiagnostics.CreateScope("DataFactoryManagedVirtualNetworkCollection.CreateOrUpdate"); - scope.Start(); - try - { - var response = _dataFactoryManagedVirtualNetworkManagedVirtualNetworksRestClient.CreateOrUpdate(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, managedVirtualNetworkName, data, ifMatch, cancellationToken); - var operation = new DataFactoryArmOperation(Response.FromValue(new DataFactoryManagedVirtualNetworkResource(Client, response), response.GetRawResponse())); - if (waitUntil == WaitUntil.Completed) - operation.WaitForCompletion(cancellationToken); - return operation; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Gets a managed Virtual Network. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName}/managedVirtualNetworks/{managedVirtualNetworkName} - /// - /// - /// Operation Id - /// ManagedVirtualNetworks_Get - /// - /// - /// - /// Managed virtual network name. - /// ETag of the managed Virtual Network entity. Should only be specified for get. If the ETag matches the existing entity tag, or if * was provided, then no content will be returned. - /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// is null. - public virtual async Task> GetAsync(string managedVirtualNetworkName, string ifNoneMatch = null, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(managedVirtualNetworkName, nameof(managedVirtualNetworkName)); - - using var scope = _dataFactoryManagedVirtualNetworkManagedVirtualNetworksClientDiagnostics.CreateScope("DataFactoryManagedVirtualNetworkCollection.Get"); - scope.Start(); - try - { - var response = await _dataFactoryManagedVirtualNetworkManagedVirtualNetworksRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, managedVirtualNetworkName, ifNoneMatch, cancellationToken).ConfigureAwait(false); - if (response.Value == null) - throw new RequestFailedException(response.GetRawResponse()); - return Response.FromValue(new DataFactoryManagedVirtualNetworkResource(Client, response.Value), response.GetRawResponse()); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Gets a managed Virtual Network. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName}/managedVirtualNetworks/{managedVirtualNetworkName} - /// - /// - /// Operation Id - /// ManagedVirtualNetworks_Get - /// - /// - /// - /// Managed virtual network name. - /// ETag of the managed Virtual Network entity. Should only be specified for get. If the ETag matches the existing entity tag, or if * was provided, then no content will be returned. - /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// is null. - public virtual Response Get(string managedVirtualNetworkName, string ifNoneMatch = null, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(managedVirtualNetworkName, nameof(managedVirtualNetworkName)); - - using var scope = _dataFactoryManagedVirtualNetworkManagedVirtualNetworksClientDiagnostics.CreateScope("DataFactoryManagedVirtualNetworkCollection.Get"); - scope.Start(); - try - { - var response = _dataFactoryManagedVirtualNetworkManagedVirtualNetworksRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, managedVirtualNetworkName, ifNoneMatch, cancellationToken); - if (response.Value == null) - throw new RequestFailedException(response.GetRawResponse()); - return Response.FromValue(new DataFactoryManagedVirtualNetworkResource(Client, response.Value), response.GetRawResponse()); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Lists managed Virtual Networks. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName}/managedVirtualNetworks - /// - /// - /// Operation Id - /// ManagedVirtualNetworks_ListByFactory - /// - /// - /// - /// The cancellation token to use. - /// An async collection of that may take multiple service requests to iterate over. - public virtual AsyncPageable GetAllAsync(CancellationToken cancellationToken = default) - { - HttpMessage FirstPageRequest(int? pageSizeHint) => _dataFactoryManagedVirtualNetworkManagedVirtualNetworksRestClient.CreateListByFactoryRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name); - HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _dataFactoryManagedVirtualNetworkManagedVirtualNetworksRestClient.CreateListByFactoryNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name); - return PageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new DataFactoryManagedVirtualNetworkResource(Client, DataFactoryManagedVirtualNetworkData.DeserializeDataFactoryManagedVirtualNetworkData(e)), _dataFactoryManagedVirtualNetworkManagedVirtualNetworksClientDiagnostics, Pipeline, "DataFactoryManagedVirtualNetworkCollection.GetAll", "value", "nextLink", cancellationToken); - } - - /// - /// Lists managed Virtual Networks. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName}/managedVirtualNetworks - /// - /// - /// Operation Id - /// ManagedVirtualNetworks_ListByFactory - /// - /// - /// - /// The cancellation token to use. - /// A collection of that may take multiple service requests to iterate over. - public virtual Pageable GetAll(CancellationToken cancellationToken = default) - { - HttpMessage FirstPageRequest(int? pageSizeHint) => _dataFactoryManagedVirtualNetworkManagedVirtualNetworksRestClient.CreateListByFactoryRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name); - HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _dataFactoryManagedVirtualNetworkManagedVirtualNetworksRestClient.CreateListByFactoryNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name); - return PageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new DataFactoryManagedVirtualNetworkResource(Client, DataFactoryManagedVirtualNetworkData.DeserializeDataFactoryManagedVirtualNetworkData(e)), _dataFactoryManagedVirtualNetworkManagedVirtualNetworksClientDiagnostics, Pipeline, "DataFactoryManagedVirtualNetworkCollection.GetAll", "value", "nextLink", cancellationToken); - } - - /// - /// Checks to see if the resource exists in azure. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName}/managedVirtualNetworks/{managedVirtualNetworkName} - /// - /// - /// Operation Id - /// ManagedVirtualNetworks_Get - /// - /// - /// - /// Managed virtual network name. - /// ETag of the managed Virtual Network entity. Should only be specified for get. If the ETag matches the existing entity tag, or if * was provided, then no content will be returned. - /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// is null. - public virtual async Task> ExistsAsync(string managedVirtualNetworkName, string ifNoneMatch = null, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(managedVirtualNetworkName, nameof(managedVirtualNetworkName)); - - using var scope = _dataFactoryManagedVirtualNetworkManagedVirtualNetworksClientDiagnostics.CreateScope("DataFactoryManagedVirtualNetworkCollection.Exists"); - scope.Start(); - try - { - var response = await _dataFactoryManagedVirtualNetworkManagedVirtualNetworksRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, managedVirtualNetworkName, ifNoneMatch, cancellationToken: cancellationToken).ConfigureAwait(false); - return Response.FromValue(response.Value != null, response.GetRawResponse()); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Checks to see if the resource exists in azure. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName}/managedVirtualNetworks/{managedVirtualNetworkName} - /// - /// - /// Operation Id - /// ManagedVirtualNetworks_Get - /// - /// - /// - /// Managed virtual network name. - /// ETag of the managed Virtual Network entity. Should only be specified for get. If the ETag matches the existing entity tag, or if * was provided, then no content will be returned. - /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// is null. - public virtual Response Exists(string managedVirtualNetworkName, string ifNoneMatch = null, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(managedVirtualNetworkName, nameof(managedVirtualNetworkName)); - - using var scope = _dataFactoryManagedVirtualNetworkManagedVirtualNetworksClientDiagnostics.CreateScope("DataFactoryManagedVirtualNetworkCollection.Exists"); - scope.Start(); - try - { - var response = _dataFactoryManagedVirtualNetworkManagedVirtualNetworksRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, managedVirtualNetworkName, ifNoneMatch, cancellationToken: cancellationToken); - return Response.FromValue(response.Value != null, response.GetRawResponse()); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - IEnumerator IEnumerable.GetEnumerator() - { - return GetAll().GetEnumerator(); - } - - IEnumerator IEnumerable.GetEnumerator() - { - return GetAll().GetEnumerator(); - } - - IAsyncEnumerator IAsyncEnumerable.GetAsyncEnumerator(CancellationToken cancellationToken) - { - return GetAllAsync(cancellationToken: cancellationToken).GetAsyncEnumerator(cancellationToken); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/DataFactoryManagedVirtualNetworkData.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/DataFactoryManagedVirtualNetworkData.cs deleted file mode 100644 index 4a801329..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/DataFactoryManagedVirtualNetworkData.cs +++ /dev/null @@ -1,45 +0,0 @@ -// - -#nullable disable - -using Azure.Core; -using AzureDataFactory.TestingFramework.Models; -using Azure.ResourceManager.Models; - -namespace Azure.ResourceManager.DataFactory -{ - /// - /// A class representing the DataFactoryManagedVirtualNetwork data model. - /// Managed Virtual Network resource type. - /// - public partial class DataFactoryManagedVirtualNetworkData : ResourceData - { - /// Initializes a new instance of DataFactoryManagedVirtualNetworkData. - /// Managed Virtual Network properties. - /// is null. - public DataFactoryManagedVirtualNetworkData(DataFactoryManagedVirtualNetworkProperties properties) - { - Argument.AssertNotNull(properties, nameof(properties)); - - Properties = properties; - } - - /// Initializes a new instance of DataFactoryManagedVirtualNetworkData. - /// The id. - /// The name. - /// The resourceType. - /// The systemData. - /// Managed Virtual Network properties. - /// Etag identifies change in the resource. - internal DataFactoryManagedVirtualNetworkData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, DataFactoryManagedVirtualNetworkProperties properties, ETag? eTag) : base(id, name, resourceType, systemData) - { - Properties = properties; - ETag = eTag; - } - - /// Managed Virtual Network properties. - public DataFactoryManagedVirtualNetworkProperties Properties { get; set; } - /// Etag identifies change in the resource. - public ETag? ETag { get; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/DataFactoryManagedVirtualNetworkResource.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/DataFactoryManagedVirtualNetworkResource.cs deleted file mode 100644 index d54f2bbc..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/DataFactoryManagedVirtualNetworkResource.cs +++ /dev/null @@ -1,280 +0,0 @@ -// - -#nullable disable - -using System.Globalization; -using Azure.Core; -using Azure.Core.Pipeline; - -namespace Azure.ResourceManager.DataFactory -{ - /// - /// A Class representing a DataFactoryManagedVirtualNetwork along with the instance operations that can be performed on it. - /// If you have a you can construct a - /// from an instance of using the GetDataFactoryManagedVirtualNetworkResource method. - /// Otherwise you can get one from its parent resource using the GetDataFactoryManagedVirtualNetwork method. - /// - public partial class DataFactoryManagedVirtualNetworkResource : ArmResource - { - /// Generate the resource identifier of a instance. - public static ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string factoryName, string managedVirtualNetworkName) - { - var resourceId = $"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName}/managedVirtualNetworks/{managedVirtualNetworkName}"; - return new ResourceIdentifier(resourceId); - } - - private readonly ClientDiagnostics _dataFactoryManagedVirtualNetworkManagedVirtualNetworksClientDiagnostics; - private readonly ManagedVirtualNetworksRestOperations _dataFactoryManagedVirtualNetworkManagedVirtualNetworksRestClient; - private readonly DataFactoryManagedVirtualNetworkData _data; - - /// Initializes a new instance of the class for mocking. - protected DataFactoryManagedVirtualNetworkResource() - { - } - - /// Initializes a new instance of the class. - /// The client parameters to use in these operations. - /// The resource that is the target of operations. - internal DataFactoryManagedVirtualNetworkResource(ArmClient client, DataFactoryManagedVirtualNetworkData data) : this(client, data.Id) - { - HasData = true; - _data = data; - } - - /// Initializes a new instance of the class. - /// The client parameters to use in these operations. - /// The identifier of the resource that is the target of operations. - internal DataFactoryManagedVirtualNetworkResource(ArmClient client, ResourceIdentifier id) : base(client, id) - { - _dataFactoryManagedVirtualNetworkManagedVirtualNetworksClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.DataFactory", ResourceType.Namespace, Diagnostics); - TryGetApiVersion(ResourceType, out string dataFactoryManagedVirtualNetworkManagedVirtualNetworksApiVersion); - _dataFactoryManagedVirtualNetworkManagedVirtualNetworksRestClient = new ManagedVirtualNetworksRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, dataFactoryManagedVirtualNetworkManagedVirtualNetworksApiVersion); -#if DEBUG - ValidateResourceId(Id); -#endif - } - - /// Gets the resource type for the operations. - public static readonly ResourceType ResourceType = "Microsoft.DataFactory/factories/managedVirtualNetworks"; - - /// Gets whether or not the current instance has data. - public virtual bool HasData { get; } - - /// Gets the data representing this Feature. - /// Throws if there is no data loaded in the current instance. - public virtual DataFactoryManagedVirtualNetworkData Data - { - get - { - if (!HasData) - throw new InvalidOperationException("The current instance does not have data, you must call Get first."); - return _data; - } - } - - internal static void ValidateResourceId(ResourceIdentifier id) - { - if (id.ResourceType != ResourceType) - throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, ResourceType), nameof(id)); - } - - /// Gets a collection of DataFactoryPrivateEndpointResources in the DataFactoryManagedVirtualNetwork. - /// An object representing collection of DataFactoryPrivateEndpointResources and their operations over a DataFactoryPrivateEndpointResource. - public virtual DataFactoryPrivateEndpointCollection GetDataFactoryPrivateEndpoints() - { - return GetCachedClient(Client => new DataFactoryPrivateEndpointCollection(Client, Id)); - } - - /// - /// Gets a managed private endpoint. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName}/managedVirtualNetworks/{managedVirtualNetworkName}/managedPrivateEndpoints/{managedPrivateEndpointName} - /// - /// - /// Operation Id - /// ManagedPrivateEndpoints_Get - /// - /// - /// - /// Managed private endpoint name. - /// ETag of the managed private endpoint entity. Should only be specified for get. If the ETag matches the existing entity tag, or if * was provided, then no content will be returned. - /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// is null. - [ForwardsClientCalls] - public virtual async Task> GetDataFactoryPrivateEndpointAsync(string managedPrivateEndpointName, string ifNoneMatch = null, CancellationToken cancellationToken = default) - { - return await GetDataFactoryPrivateEndpoints().GetAsync(managedPrivateEndpointName, ifNoneMatch, cancellationToken).ConfigureAwait(false); - } - - /// - /// Gets a managed private endpoint. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName}/managedVirtualNetworks/{managedVirtualNetworkName}/managedPrivateEndpoints/{managedPrivateEndpointName} - /// - /// - /// Operation Id - /// ManagedPrivateEndpoints_Get - /// - /// - /// - /// Managed private endpoint name. - /// ETag of the managed private endpoint entity. Should only be specified for get. If the ETag matches the existing entity tag, or if * was provided, then no content will be returned. - /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// is null. - [ForwardsClientCalls] - public virtual Response GetDataFactoryPrivateEndpoint(string managedPrivateEndpointName, string ifNoneMatch = null, CancellationToken cancellationToken = default) - { - return GetDataFactoryPrivateEndpoints().Get(managedPrivateEndpointName, ifNoneMatch, cancellationToken); - } - - /// - /// Gets a managed Virtual Network. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName}/managedVirtualNetworks/{managedVirtualNetworkName} - /// - /// - /// Operation Id - /// ManagedVirtualNetworks_Get - /// - /// - /// - /// ETag of the managed Virtual Network entity. Should only be specified for get. If the ETag matches the existing entity tag, or if * was provided, then no content will be returned. - /// The cancellation token to use. - public virtual async Task> GetAsync(string ifNoneMatch = null, CancellationToken cancellationToken = default) - { - using var scope = _dataFactoryManagedVirtualNetworkManagedVirtualNetworksClientDiagnostics.CreateScope("DataFactoryManagedVirtualNetworkResource.Get"); - scope.Start(); - try - { - var response = await _dataFactoryManagedVirtualNetworkManagedVirtualNetworksRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, ifNoneMatch, cancellationToken).ConfigureAwait(false); - if (response.Value == null) - throw new RequestFailedException(response.GetRawResponse()); - return Response.FromValue(new DataFactoryManagedVirtualNetworkResource(Client, response.Value), response.GetRawResponse()); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Gets a managed Virtual Network. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName}/managedVirtualNetworks/{managedVirtualNetworkName} - /// - /// - /// Operation Id - /// ManagedVirtualNetworks_Get - /// - /// - /// - /// ETag of the managed Virtual Network entity. Should only be specified for get. If the ETag matches the existing entity tag, or if * was provided, then no content will be returned. - /// The cancellation token to use. - public virtual Response Get(string ifNoneMatch = null, CancellationToken cancellationToken = default) - { - using var scope = _dataFactoryManagedVirtualNetworkManagedVirtualNetworksClientDiagnostics.CreateScope("DataFactoryManagedVirtualNetworkResource.Get"); - scope.Start(); - try - { - var response = _dataFactoryManagedVirtualNetworkManagedVirtualNetworksRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, ifNoneMatch, cancellationToken); - if (response.Value == null) - throw new RequestFailedException(response.GetRawResponse()); - return Response.FromValue(new DataFactoryManagedVirtualNetworkResource(Client, response.Value), response.GetRawResponse()); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Creates or updates a managed Virtual Network. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName}/managedVirtualNetworks/{managedVirtualNetworkName} - /// - /// - /// Operation Id - /// ManagedVirtualNetworks_CreateOrUpdate - /// - /// - /// - /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. - /// Managed Virtual Network resource definition. - /// ETag of the managed Virtual Network entity. Should only be specified for update, for which it should match existing entity or can be * for unconditional update. - /// The cancellation token to use. - /// is null. - public virtual async Task> UpdateAsync(WaitUntil waitUntil, DataFactoryManagedVirtualNetworkData data, string ifMatch = null, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(data, nameof(data)); - - using var scope = _dataFactoryManagedVirtualNetworkManagedVirtualNetworksClientDiagnostics.CreateScope("DataFactoryManagedVirtualNetworkResource.Update"); - scope.Start(); - try - { - var response = await _dataFactoryManagedVirtualNetworkManagedVirtualNetworksRestClient.CreateOrUpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data, ifMatch, cancellationToken).ConfigureAwait(false); - var operation = new DataFactoryArmOperation(Response.FromValue(new DataFactoryManagedVirtualNetworkResource(Client, response), response.GetRawResponse())); - if (waitUntil == WaitUntil.Completed) - await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); - return operation; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Creates or updates a managed Virtual Network. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName}/managedVirtualNetworks/{managedVirtualNetworkName} - /// - /// - /// Operation Id - /// ManagedVirtualNetworks_CreateOrUpdate - /// - /// - /// - /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. - /// Managed Virtual Network resource definition. - /// ETag of the managed Virtual Network entity. Should only be specified for update, for which it should match existing entity or can be * for unconditional update. - /// The cancellation token to use. - /// is null. - public virtual ArmOperation Update(WaitUntil waitUntil, DataFactoryManagedVirtualNetworkData data, string ifMatch = null, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(data, nameof(data)); - - using var scope = _dataFactoryManagedVirtualNetworkManagedVirtualNetworksClientDiagnostics.CreateScope("DataFactoryManagedVirtualNetworkResource.Update"); - scope.Start(); - try - { - var response = _dataFactoryManagedVirtualNetworkManagedVirtualNetworksRestClient.CreateOrUpdate(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data, ifMatch, cancellationToken); - var operation = new DataFactoryArmOperation(Response.FromValue(new DataFactoryManagedVirtualNetworkResource(Client, response), response.GetRawResponse())); - if (waitUntil == WaitUntil.Completed) - operation.WaitForCompletion(cancellationToken); - return operation; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/DataFactoryPipelineCollection.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/DataFactoryPipelineCollection.cs deleted file mode 100644 index e3b9d49f..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/DataFactoryPipelineCollection.cs +++ /dev/null @@ -1,337 +0,0 @@ -// - -#nullable disable - -using System.Collections; -using System.Globalization; -using Azure.Core; -using Azure.Core.Pipeline; - -namespace Azure.ResourceManager.DataFactory -{ - /// - /// A class representing a collection of and their operations. - /// Each in the collection will belong to the same instance of . - /// To get a instance call the GetDataFactoryPipelines method from an instance of . - /// - public partial class DataFactoryPipelineCollection : ArmCollection, IEnumerable, IAsyncEnumerable - { - private readonly ClientDiagnostics _dataFactoryPipelinePipelinesClientDiagnostics; - private readonly PipelinesRestOperations _dataFactoryPipelinePipelinesRestClient; - - /// Initializes a new instance of the class for mocking. - protected DataFactoryPipelineCollection() - { - } - - /// Initializes a new instance of the class. - /// The client parameters to use in these operations. - /// The identifier of the parent resource that is the target of operations. - internal DataFactoryPipelineCollection(ArmClient client, ResourceIdentifier id) : base(client, id) - { - _dataFactoryPipelinePipelinesClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.DataFactory", DataFactoryPipelineResource.ResourceType.Namespace, Diagnostics); - TryGetApiVersion(DataFactoryPipelineResource.ResourceType, out string dataFactoryPipelinePipelinesApiVersion); - _dataFactoryPipelinePipelinesRestClient = new PipelinesRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, dataFactoryPipelinePipelinesApiVersion); -#if DEBUG - ValidateResourceId(Id); -#endif - } - - internal static void ValidateResourceId(ResourceIdentifier id) - { - if (id.ResourceType != DataFactoryResource.ResourceType) - throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, DataFactoryResource.ResourceType), nameof(id)); - } - - /// - /// Creates or updates a pipeline. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName}/pipelines/{pipelineName} - /// - /// - /// Operation Id - /// Pipelines_CreateOrUpdate - /// - /// - /// - /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. - /// The pipeline name. - /// Pipeline resource definition. - /// ETag of the pipeline entity. Should only be specified for update, for which it should match existing entity or can be * for unconditional update. - /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// or is null. - public virtual async Task> CreateOrUpdateAsync(WaitUntil waitUntil, string pipelineName, Pipeline data, string ifMatch = null, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(pipelineName, nameof(pipelineName)); - Argument.AssertNotNull(data, nameof(data)); - - using var scope = _dataFactoryPipelinePipelinesClientDiagnostics.CreateScope("DataFactoryPipelineCollection.CreateOrUpdate"); - scope.Start(); - try - { - var response = await _dataFactoryPipelinePipelinesRestClient.CreateOrUpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, pipelineName, data, ifMatch, cancellationToken).ConfigureAwait(false); - var operation = new DataFactoryArmOperation(Response.FromValue(new DataFactoryPipelineResource(Client, response), response.GetRawResponse())); - if (waitUntil == WaitUntil.Completed) - await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); - return operation; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Creates or updates a pipeline. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName}/pipelines/{pipelineName} - /// - /// - /// Operation Id - /// Pipelines_CreateOrUpdate - /// - /// - /// - /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. - /// The pipeline name. - /// Pipeline resource definition. - /// ETag of the pipeline entity. Should only be specified for update, for which it should match existing entity or can be * for unconditional update. - /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// or is null. - public virtual ArmOperation CreateOrUpdate(WaitUntil waitUntil, string pipelineName, Pipeline data, string ifMatch = null, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(pipelineName, nameof(pipelineName)); - Argument.AssertNotNull(data, nameof(data)); - - using var scope = _dataFactoryPipelinePipelinesClientDiagnostics.CreateScope("DataFactoryPipelineCollection.CreateOrUpdate"); - scope.Start(); - try - { - var response = _dataFactoryPipelinePipelinesRestClient.CreateOrUpdate(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, pipelineName, data, ifMatch, cancellationToken); - var operation = new DataFactoryArmOperation(Response.FromValue(new DataFactoryPipelineResource(Client, response), response.GetRawResponse())); - if (waitUntil == WaitUntil.Completed) - operation.WaitForCompletion(cancellationToken); - return operation; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Gets a pipeline. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName}/pipelines/{pipelineName} - /// - /// - /// Operation Id - /// Pipelines_Get - /// - /// - /// - /// The pipeline name. - /// ETag of the pipeline entity. Should only be specified for get. If the ETag matches the existing entity tag, or if * was provided, then no content will be returned. - /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// is null. - public virtual async Task> GetAsync(string pipelineName, string ifNoneMatch = null, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(pipelineName, nameof(pipelineName)); - - using var scope = _dataFactoryPipelinePipelinesClientDiagnostics.CreateScope("DataFactoryPipelineCollection.Get"); - scope.Start(); - try - { - var response = await _dataFactoryPipelinePipelinesRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, pipelineName, ifNoneMatch, cancellationToken).ConfigureAwait(false); - if (response.Value == null) - throw new RequestFailedException(response.GetRawResponse()); - return Response.FromValue(new DataFactoryPipelineResource(Client, response.Value), response.GetRawResponse()); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Gets a pipeline. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName}/pipelines/{pipelineName} - /// - /// - /// Operation Id - /// Pipelines_Get - /// - /// - /// - /// The pipeline name. - /// ETag of the pipeline entity. Should only be specified for get. If the ETag matches the existing entity tag, or if * was provided, then no content will be returned. - /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// is null. - public virtual Response Get(string pipelineName, string ifNoneMatch = null, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(pipelineName, nameof(pipelineName)); - - using var scope = _dataFactoryPipelinePipelinesClientDiagnostics.CreateScope("DataFactoryPipelineCollection.Get"); - scope.Start(); - try - { - var response = _dataFactoryPipelinePipelinesRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, pipelineName, ifNoneMatch, cancellationToken); - if (response.Value == null) - throw new RequestFailedException(response.GetRawResponse()); - return Response.FromValue(new DataFactoryPipelineResource(Client, response.Value), response.GetRawResponse()); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Lists pipelines. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName}/pipelines - /// - /// - /// Operation Id - /// Pipelines_ListByFactory - /// - /// - /// - /// The cancellation token to use. - /// An async collection of that may take multiple service requests to iterate over. - public virtual AsyncPageable GetAllAsync(CancellationToken cancellationToken = default) - { - HttpMessage FirstPageRequest(int? pageSizeHint) => _dataFactoryPipelinePipelinesRestClient.CreateListByFactoryRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name); - HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _dataFactoryPipelinePipelinesRestClient.CreateListByFactoryNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name); - return PageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new DataFactoryPipelineResource(Client, DataFactory.Pipeline.DeserializeDataFactoryPipelineData(e)), _dataFactoryPipelinePipelinesClientDiagnostics, Pipeline, "DataFactoryPipelineCollection.GetAll", "value", "nextLink", cancellationToken); - } - - /// - /// Lists pipelines. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName}/pipelines - /// - /// - /// Operation Id - /// Pipelines_ListByFactory - /// - /// - /// - /// The cancellation token to use. - /// A collection of that may take multiple service requests to iterate over. - public virtual Pageable GetAll(CancellationToken cancellationToken = default) - { - HttpMessage FirstPageRequest(int? pageSizeHint) => _dataFactoryPipelinePipelinesRestClient.CreateListByFactoryRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name); - HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _dataFactoryPipelinePipelinesRestClient.CreateListByFactoryNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name); - return PageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new DataFactoryPipelineResource(Client, DataFactory.Pipeline.DeserializeDataFactoryPipelineData(e)), _dataFactoryPipelinePipelinesClientDiagnostics, Pipeline, "DataFactoryPipelineCollection.GetAll", "value", "nextLink", cancellationToken); - } - - /// - /// Checks to see if the resource exists in azure. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName}/pipelines/{pipelineName} - /// - /// - /// Operation Id - /// Pipelines_Get - /// - /// - /// - /// The pipeline name. - /// ETag of the pipeline entity. Should only be specified for get. If the ETag matches the existing entity tag, or if * was provided, then no content will be returned. - /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// is null. - public virtual async Task> ExistsAsync(string pipelineName, string ifNoneMatch = null, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(pipelineName, nameof(pipelineName)); - - using var scope = _dataFactoryPipelinePipelinesClientDiagnostics.CreateScope("DataFactoryPipelineCollection.Exists"); - scope.Start(); - try - { - var response = await _dataFactoryPipelinePipelinesRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, pipelineName, ifNoneMatch, cancellationToken: cancellationToken).ConfigureAwait(false); - return Response.FromValue(response.Value != null, response.GetRawResponse()); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Checks to see if the resource exists in azure. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName}/pipelines/{pipelineName} - /// - /// - /// Operation Id - /// Pipelines_Get - /// - /// - /// - /// The pipeline name. - /// ETag of the pipeline entity. Should only be specified for get. If the ETag matches the existing entity tag, or if * was provided, then no content will be returned. - /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// is null. - public virtual Response Exists(string pipelineName, string ifNoneMatch = null, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(pipelineName, nameof(pipelineName)); - - using var scope = _dataFactoryPipelinePipelinesClientDiagnostics.CreateScope("DataFactoryPipelineCollection.Exists"); - scope.Start(); - try - { - var response = _dataFactoryPipelinePipelinesRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, pipelineName, ifNoneMatch, cancellationToken: cancellationToken); - return Response.FromValue(response.Value != null, response.GetRawResponse()); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - IEnumerator IEnumerable.GetEnumerator() - { - return GetAll().GetEnumerator(); - } - - IEnumerator IEnumerable.GetEnumerator() - { - return GetAll().GetEnumerator(); - } - - IAsyncEnumerator IAsyncEnumerable.GetAsyncEnumerator(CancellationToken cancellationToken) - { - return GetAllAsync(cancellationToken: cancellationToken).GetAsyncEnumerator(cancellationToken); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/DataFactoryPipelineResource.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/DataFactoryPipelineResource.cs deleted file mode 100644 index 294089e1..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/DataFactoryPipelineResource.cs +++ /dev/null @@ -1,365 +0,0 @@ -// - -#nullable disable - -using System.Globalization; -using Azure.Core; -using Azure.Core.Expressions.DataFactory; -using Azure.Core.Pipeline; -using AzureDataFactory.TestingFramework.Models; - -namespace Azure.ResourceManager.DataFactory -{ - /// - /// A Class representing a DataFactoryPipeline along with the instance operations that can be performed on it. - /// If you have a you can construct a - /// from an instance of using the GetDataFactoryPipelineResource method. - /// Otherwise you can get one from its parent resource using the GetDataFactoryPipeline method. - /// - public partial class DataFactoryPipelineResource : ArmResource - { - /// Generate the resource identifier of a instance. - public static ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string factoryName, string pipelineName) - { - var resourceId = $"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName}/pipelines/{pipelineName}"; - return new ResourceIdentifier(resourceId); - } - - private readonly ClientDiagnostics _dataFactoryPipelinePipelinesClientDiagnostics; - private readonly PipelinesRestOperations _dataFactoryPipelinePipelinesRestClient; - private readonly Pipeline _data; - - /// Initializes a new instance of the class for mocking. - protected DataFactoryPipelineResource() - { - } - - /// Initializes a new instance of the class. - /// The client parameters to use in these operations. - /// The resource that is the target of operations. - internal DataFactoryPipelineResource(ArmClient client, Pipeline data) : this(client, data.Id) - { - HasData = true; - _data = data; - } - - /// Initializes a new instance of the class. - /// The client parameters to use in these operations. - /// The identifier of the resource that is the target of operations. - internal DataFactoryPipelineResource(ArmClient client, ResourceIdentifier id) : base(client, id) - { - _dataFactoryPipelinePipelinesClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.DataFactory", ResourceType.Namespace, Diagnostics); - TryGetApiVersion(ResourceType, out string dataFactoryPipelinePipelinesApiVersion); - _dataFactoryPipelinePipelinesRestClient = new PipelinesRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, dataFactoryPipelinePipelinesApiVersion); -#if DEBUG - ValidateResourceId(Id); -#endif - } - - /// Gets the resource type for the operations. - public static readonly ResourceType ResourceType = "Microsoft.DataFactory/factories/pipelines"; - - /// Gets whether or not the current instance has data. - public virtual bool HasData { get; } - - /// Gets the data representing this Feature. - /// Throws if there is no data loaded in the current instance. - public virtual Pipeline Data - { - get - { - if (!HasData) - throw new InvalidOperationException("The current instance does not have data, you must call Get first."); - return _data; - } - } - - internal static void ValidateResourceId(ResourceIdentifier id) - { - if (id.ResourceType != ResourceType) - throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, ResourceType), nameof(id)); - } - - /// - /// Gets a pipeline. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName}/pipelines/{pipelineName} - /// - /// - /// Operation Id - /// Pipelines_Get - /// - /// - /// - /// ETag of the pipeline entity. Should only be specified for get. If the ETag matches the existing entity tag, or if * was provided, then no content will be returned. - /// The cancellation token to use. - public virtual async Task> GetAsync(string ifNoneMatch = null, CancellationToken cancellationToken = default) - { - using var scope = _dataFactoryPipelinePipelinesClientDiagnostics.CreateScope("DataFactoryPipelineResource.Get"); - scope.Start(); - try - { - var response = await _dataFactoryPipelinePipelinesRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, ifNoneMatch, cancellationToken).ConfigureAwait(false); - if (response.Value == null) - throw new RequestFailedException(response.GetRawResponse()); - return Response.FromValue(new DataFactoryPipelineResource(Client, response.Value), response.GetRawResponse()); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Gets a pipeline. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName}/pipelines/{pipelineName} - /// - /// - /// Operation Id - /// Pipelines_Get - /// - /// - /// - /// ETag of the pipeline entity. Should only be specified for get. If the ETag matches the existing entity tag, or if * was provided, then no content will be returned. - /// The cancellation token to use. - public virtual Response Get(string ifNoneMatch = null, CancellationToken cancellationToken = default) - { - using var scope = _dataFactoryPipelinePipelinesClientDiagnostics.CreateScope("DataFactoryPipelineResource.Get"); - scope.Start(); - try - { - var response = _dataFactoryPipelinePipelinesRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, ifNoneMatch, cancellationToken); - if (response.Value == null) - throw new RequestFailedException(response.GetRawResponse()); - return Response.FromValue(new DataFactoryPipelineResource(Client, response.Value), response.GetRawResponse()); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Deletes a pipeline. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName}/pipelines/{pipelineName} - /// - /// - /// Operation Id - /// Pipelines_Delete - /// - /// - /// - /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. - /// The cancellation token to use. - public virtual async Task DeleteAsync(WaitUntil waitUntil, CancellationToken cancellationToken = default) - { - using var scope = _dataFactoryPipelinePipelinesClientDiagnostics.CreateScope("DataFactoryPipelineResource.Delete"); - scope.Start(); - try - { - var response = await _dataFactoryPipelinePipelinesRestClient.DeleteAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); - var operation = new DataFactoryArmOperation(response); - if (waitUntil == WaitUntil.Completed) - await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false); - return operation; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Deletes a pipeline. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName}/pipelines/{pipelineName} - /// - /// - /// Operation Id - /// Pipelines_Delete - /// - /// - /// - /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. - /// The cancellation token to use. - public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancellationToken = default) - { - using var scope = _dataFactoryPipelinePipelinesClientDiagnostics.CreateScope("DataFactoryPipelineResource.Delete"); - scope.Start(); - try - { - var response = _dataFactoryPipelinePipelinesRestClient.Delete(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); - var operation = new DataFactoryArmOperation(response); - if (waitUntil == WaitUntil.Completed) - operation.WaitForCompletionResponse(cancellationToken); - return operation; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Creates or updates a pipeline. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName}/pipelines/{pipelineName} - /// - /// - /// Operation Id - /// Pipelines_CreateOrUpdate - /// - /// - /// - /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. - /// Pipeline resource definition. - /// ETag of the pipeline entity. Should only be specified for update, for which it should match existing entity or can be * for unconditional update. - /// The cancellation token to use. - /// is null. - public virtual async Task> UpdateAsync(WaitUntil waitUntil, Pipeline data, string ifMatch = null, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(data, nameof(data)); - - using var scope = _dataFactoryPipelinePipelinesClientDiagnostics.CreateScope("DataFactoryPipelineResource.Update"); - scope.Start(); - try - { - var response = await _dataFactoryPipelinePipelinesRestClient.CreateOrUpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data, ifMatch, cancellationToken).ConfigureAwait(false); - var operation = new DataFactoryArmOperation(Response.FromValue(new DataFactoryPipelineResource(Client, response), response.GetRawResponse())); - if (waitUntil == WaitUntil.Completed) - await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); - return operation; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Creates or updates a pipeline. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName}/pipelines/{pipelineName} - /// - /// - /// Operation Id - /// Pipelines_CreateOrUpdate - /// - /// - /// - /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. - /// Pipeline resource definition. - /// ETag of the pipeline entity. Should only be specified for update, for which it should match existing entity or can be * for unconditional update. - /// The cancellation token to use. - /// is null. - public virtual ArmOperation Update(WaitUntil waitUntil, Pipeline data, string ifMatch = null, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(data, nameof(data)); - - using var scope = _dataFactoryPipelinePipelinesClientDiagnostics.CreateScope("DataFactoryPipelineResource.Update"); - scope.Start(); - try - { - var response = _dataFactoryPipelinePipelinesRestClient.CreateOrUpdate(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data, ifMatch, cancellationToken); - var operation = new DataFactoryArmOperation(Response.FromValue(new DataFactoryPipelineResource(Client, response), response.GetRawResponse())); - if (waitUntil == WaitUntil.Completed) - operation.WaitForCompletion(cancellationToken); - return operation; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Creates a run of a pipeline. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName}/pipelines/{pipelineName}/createRun - /// - /// - /// Operation Id - /// Pipelines_CreateRun - /// - /// - /// - /// Parameters of the pipeline run. These parameters will be used only if the runId is not specified. - /// The pipeline run identifier. If run ID is specified the parameters of the specified run will be used to create a new run. - /// Recovery mode flag. If recovery mode is set to true, the specified referenced pipeline run and the new run will be grouped under the same groupId. - /// In recovery mode, the rerun will start from this activity. If not specified, all activities will run. - /// 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. - /// The cancellation token to use. - public virtual async Task> CreateRunAsync(IDictionary> 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(); - try - { - var response = await _dataFactoryPipelinePipelinesRestClient.CreateRunAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, parameterValueSpecification, referencePipelineRunId, isRecovery, startActivityName, startFromFailure, cancellationToken).ConfigureAwait(false); - return response; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Creates a run of a pipeline. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName}/pipelines/{pipelineName}/createRun - /// - /// - /// Operation Id - /// Pipelines_CreateRun - /// - /// - /// - /// Parameters of the pipeline run. These parameters will be used only if the runId is not specified. - /// The pipeline run identifier. If run ID is specified the parameters of the specified run will be used to create a new run. - /// Recovery mode flag. If recovery mode is set to true, the specified referenced pipeline run and the new run will be grouped under the same groupId. - /// In recovery mode, the rerun will start from this activity. If not specified, all activities will run. - /// 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. - /// The cancellation token to use. - public virtual Response CreateRun(IDictionary> 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(); - try - { - var response = _dataFactoryPipelinePipelinesRestClient.CreateRun(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, parameterValueSpecification, referencePipelineRunId, isRecovery, startActivityName, startFromFailure, cancellationToken); - return response; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/DataFactoryPrivateEndpointCollection.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/DataFactoryPrivateEndpointCollection.cs deleted file mode 100644 index b655a839..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/DataFactoryPrivateEndpointCollection.cs +++ /dev/null @@ -1,337 +0,0 @@ -// - -#nullable disable - -using System.Collections; -using System.Globalization; -using Azure.Core; -using Azure.Core.Pipeline; - -namespace Azure.ResourceManager.DataFactory -{ - /// - /// A class representing a collection of and their operations. - /// Each in the collection will belong to the same instance of . - /// To get a instance call the GetDataFactoryPrivateEndpoints method from an instance of . - /// - public partial class DataFactoryPrivateEndpointCollection : ArmCollection, IEnumerable, IAsyncEnumerable - { - private readonly ClientDiagnostics _dataFactoryPrivateEndpointManagedPrivateEndpointsClientDiagnostics; - private readonly ManagedPrivateEndpointsRestOperations _dataFactoryPrivateEndpointManagedPrivateEndpointsRestClient; - - /// Initializes a new instance of the class for mocking. - protected DataFactoryPrivateEndpointCollection() - { - } - - /// Initializes a new instance of the class. - /// The client parameters to use in these operations. - /// The identifier of the parent resource that is the target of operations. - internal DataFactoryPrivateEndpointCollection(ArmClient client, ResourceIdentifier id) : base(client, id) - { - _dataFactoryPrivateEndpointManagedPrivateEndpointsClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.DataFactory", DataFactoryPrivateEndpointResource.ResourceType.Namespace, Diagnostics); - TryGetApiVersion(DataFactoryPrivateEndpointResource.ResourceType, out string dataFactoryPrivateEndpointManagedPrivateEndpointsApiVersion); - _dataFactoryPrivateEndpointManagedPrivateEndpointsRestClient = new ManagedPrivateEndpointsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, dataFactoryPrivateEndpointManagedPrivateEndpointsApiVersion); -#if DEBUG - ValidateResourceId(Id); -#endif - } - - internal static void ValidateResourceId(ResourceIdentifier id) - { - if (id.ResourceType != DataFactoryManagedVirtualNetworkResource.ResourceType) - throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, DataFactoryManagedVirtualNetworkResource.ResourceType), nameof(id)); - } - - /// - /// Creates or updates a managed private endpoint. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName}/managedVirtualNetworks/{managedVirtualNetworkName}/managedPrivateEndpoints/{managedPrivateEndpointName} - /// - /// - /// Operation Id - /// ManagedPrivateEndpoints_CreateOrUpdate - /// - /// - /// - /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. - /// Managed private endpoint name. - /// Managed private endpoint resource definition. - /// ETag of the managed private endpoint entity. Should only be specified for update, for which it should match existing entity or can be * for unconditional update. - /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// or is null. - public virtual async Task> CreateOrUpdateAsync(WaitUntil waitUntil, string managedPrivateEndpointName, DataFactoryPrivateEndpointData data, string ifMatch = null, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(managedPrivateEndpointName, nameof(managedPrivateEndpointName)); - Argument.AssertNotNull(data, nameof(data)); - - using var scope = _dataFactoryPrivateEndpointManagedPrivateEndpointsClientDiagnostics.CreateScope("DataFactoryPrivateEndpointCollection.CreateOrUpdate"); - scope.Start(); - try - { - var response = await _dataFactoryPrivateEndpointManagedPrivateEndpointsRestClient.CreateOrUpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, managedPrivateEndpointName, data, ifMatch, cancellationToken).ConfigureAwait(false); - var operation = new DataFactoryArmOperation(Response.FromValue(new DataFactoryPrivateEndpointResource(Client, response), response.GetRawResponse())); - if (waitUntil == WaitUntil.Completed) - await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); - return operation; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Creates or updates a managed private endpoint. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName}/managedVirtualNetworks/{managedVirtualNetworkName}/managedPrivateEndpoints/{managedPrivateEndpointName} - /// - /// - /// Operation Id - /// ManagedPrivateEndpoints_CreateOrUpdate - /// - /// - /// - /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. - /// Managed private endpoint name. - /// Managed private endpoint resource definition. - /// ETag of the managed private endpoint entity. Should only be specified for update, for which it should match existing entity or can be * for unconditional update. - /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// or is null. - public virtual ArmOperation CreateOrUpdate(WaitUntil waitUntil, string managedPrivateEndpointName, DataFactoryPrivateEndpointData data, string ifMatch = null, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(managedPrivateEndpointName, nameof(managedPrivateEndpointName)); - Argument.AssertNotNull(data, nameof(data)); - - using var scope = _dataFactoryPrivateEndpointManagedPrivateEndpointsClientDiagnostics.CreateScope("DataFactoryPrivateEndpointCollection.CreateOrUpdate"); - scope.Start(); - try - { - var response = _dataFactoryPrivateEndpointManagedPrivateEndpointsRestClient.CreateOrUpdate(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, managedPrivateEndpointName, data, ifMatch, cancellationToken); - var operation = new DataFactoryArmOperation(Response.FromValue(new DataFactoryPrivateEndpointResource(Client, response), response.GetRawResponse())); - if (waitUntil == WaitUntil.Completed) - operation.WaitForCompletion(cancellationToken); - return operation; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Gets a managed private endpoint. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName}/managedVirtualNetworks/{managedVirtualNetworkName}/managedPrivateEndpoints/{managedPrivateEndpointName} - /// - /// - /// Operation Id - /// ManagedPrivateEndpoints_Get - /// - /// - /// - /// Managed private endpoint name. - /// ETag of the managed private endpoint entity. Should only be specified for get. If the ETag matches the existing entity tag, or if * was provided, then no content will be returned. - /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// is null. - public virtual async Task> GetAsync(string managedPrivateEndpointName, string ifNoneMatch = null, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(managedPrivateEndpointName, nameof(managedPrivateEndpointName)); - - using var scope = _dataFactoryPrivateEndpointManagedPrivateEndpointsClientDiagnostics.CreateScope("DataFactoryPrivateEndpointCollection.Get"); - scope.Start(); - try - { - var response = await _dataFactoryPrivateEndpointManagedPrivateEndpointsRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, managedPrivateEndpointName, ifNoneMatch, cancellationToken).ConfigureAwait(false); - if (response.Value == null) - throw new RequestFailedException(response.GetRawResponse()); - return Response.FromValue(new DataFactoryPrivateEndpointResource(Client, response.Value), response.GetRawResponse()); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Gets a managed private endpoint. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName}/managedVirtualNetworks/{managedVirtualNetworkName}/managedPrivateEndpoints/{managedPrivateEndpointName} - /// - /// - /// Operation Id - /// ManagedPrivateEndpoints_Get - /// - /// - /// - /// Managed private endpoint name. - /// ETag of the managed private endpoint entity. Should only be specified for get. If the ETag matches the existing entity tag, or if * was provided, then no content will be returned. - /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// is null. - public virtual Response Get(string managedPrivateEndpointName, string ifNoneMatch = null, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(managedPrivateEndpointName, nameof(managedPrivateEndpointName)); - - using var scope = _dataFactoryPrivateEndpointManagedPrivateEndpointsClientDiagnostics.CreateScope("DataFactoryPrivateEndpointCollection.Get"); - scope.Start(); - try - { - var response = _dataFactoryPrivateEndpointManagedPrivateEndpointsRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, managedPrivateEndpointName, ifNoneMatch, cancellationToken); - if (response.Value == null) - throw new RequestFailedException(response.GetRawResponse()); - return Response.FromValue(new DataFactoryPrivateEndpointResource(Client, response.Value), response.GetRawResponse()); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Lists managed private endpoints. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName}/managedVirtualNetworks/{managedVirtualNetworkName}/managedPrivateEndpoints - /// - /// - /// Operation Id - /// ManagedPrivateEndpoints_ListByFactory - /// - /// - /// - /// The cancellation token to use. - /// An async collection of that may take multiple service requests to iterate over. - public virtual AsyncPageable GetAllAsync(CancellationToken cancellationToken = default) - { - HttpMessage FirstPageRequest(int? pageSizeHint) => _dataFactoryPrivateEndpointManagedPrivateEndpointsRestClient.CreateListByFactoryRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name); - HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _dataFactoryPrivateEndpointManagedPrivateEndpointsRestClient.CreateListByFactoryNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name); - return PageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new DataFactoryPrivateEndpointResource(Client, DataFactoryPrivateEndpointData.DeserializeDataFactoryPrivateEndpointData(e)), _dataFactoryPrivateEndpointManagedPrivateEndpointsClientDiagnostics, Pipeline, "DataFactoryPrivateEndpointCollection.GetAll", "value", "nextLink", cancellationToken); - } - - /// - /// Lists managed private endpoints. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName}/managedVirtualNetworks/{managedVirtualNetworkName}/managedPrivateEndpoints - /// - /// - /// Operation Id - /// ManagedPrivateEndpoints_ListByFactory - /// - /// - /// - /// The cancellation token to use. - /// A collection of that may take multiple service requests to iterate over. - public virtual Pageable GetAll(CancellationToken cancellationToken = default) - { - HttpMessage FirstPageRequest(int? pageSizeHint) => _dataFactoryPrivateEndpointManagedPrivateEndpointsRestClient.CreateListByFactoryRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name); - HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _dataFactoryPrivateEndpointManagedPrivateEndpointsRestClient.CreateListByFactoryNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name); - return PageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new DataFactoryPrivateEndpointResource(Client, DataFactoryPrivateEndpointData.DeserializeDataFactoryPrivateEndpointData(e)), _dataFactoryPrivateEndpointManagedPrivateEndpointsClientDiagnostics, Pipeline, "DataFactoryPrivateEndpointCollection.GetAll", "value", "nextLink", cancellationToken); - } - - /// - /// Checks to see if the resource exists in azure. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName}/managedVirtualNetworks/{managedVirtualNetworkName}/managedPrivateEndpoints/{managedPrivateEndpointName} - /// - /// - /// Operation Id - /// ManagedPrivateEndpoints_Get - /// - /// - /// - /// Managed private endpoint name. - /// ETag of the managed private endpoint entity. Should only be specified for get. If the ETag matches the existing entity tag, or if * was provided, then no content will be returned. - /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// is null. - public virtual async Task> ExistsAsync(string managedPrivateEndpointName, string ifNoneMatch = null, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(managedPrivateEndpointName, nameof(managedPrivateEndpointName)); - - using var scope = _dataFactoryPrivateEndpointManagedPrivateEndpointsClientDiagnostics.CreateScope("DataFactoryPrivateEndpointCollection.Exists"); - scope.Start(); - try - { - var response = await _dataFactoryPrivateEndpointManagedPrivateEndpointsRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, managedPrivateEndpointName, ifNoneMatch, cancellationToken: cancellationToken).ConfigureAwait(false); - return Response.FromValue(response.Value != null, response.GetRawResponse()); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Checks to see if the resource exists in azure. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName}/managedVirtualNetworks/{managedVirtualNetworkName}/managedPrivateEndpoints/{managedPrivateEndpointName} - /// - /// - /// Operation Id - /// ManagedPrivateEndpoints_Get - /// - /// - /// - /// Managed private endpoint name. - /// ETag of the managed private endpoint entity. Should only be specified for get. If the ETag matches the existing entity tag, or if * was provided, then no content will be returned. - /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// is null. - public virtual Response Exists(string managedPrivateEndpointName, string ifNoneMatch = null, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(managedPrivateEndpointName, nameof(managedPrivateEndpointName)); - - using var scope = _dataFactoryPrivateEndpointManagedPrivateEndpointsClientDiagnostics.CreateScope("DataFactoryPrivateEndpointCollection.Exists"); - scope.Start(); - try - { - var response = _dataFactoryPrivateEndpointManagedPrivateEndpointsRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, managedPrivateEndpointName, ifNoneMatch, cancellationToken: cancellationToken); - return Response.FromValue(response.Value != null, response.GetRawResponse()); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - IEnumerator IEnumerable.GetEnumerator() - { - return GetAll().GetEnumerator(); - } - - IEnumerator IEnumerable.GetEnumerator() - { - return GetAll().GetEnumerator(); - } - - IAsyncEnumerator IAsyncEnumerable.GetAsyncEnumerator(CancellationToken cancellationToken) - { - return GetAllAsync(cancellationToken: cancellationToken).GetAsyncEnumerator(cancellationToken); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/DataFactoryPrivateEndpointConnectionCollection.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/DataFactoryPrivateEndpointConnectionCollection.cs deleted file mode 100644 index 515a7f76..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/DataFactoryPrivateEndpointConnectionCollection.cs +++ /dev/null @@ -1,343 +0,0 @@ -// - -#nullable disable - -using System.Collections; -using System.Globalization; -using Azure.Core; -using Azure.Core.Pipeline; -using AzureDataFactory.TestingFramework.Models; - -namespace Azure.ResourceManager.DataFactory -{ - /// - /// A class representing a collection of and their operations. - /// Each in the collection will belong to the same instance of . - /// To get a instance call the GetDataFactoryPrivateEndpointConnections method from an instance of . - /// - public partial class DataFactoryPrivateEndpointConnectionCollection : ArmCollection, IEnumerable, IAsyncEnumerable - { - private readonly ClientDiagnostics _dataFactoryPrivateEndpointConnectionPrivateEndpointConnectionClientDiagnostics; - private readonly PrivateEndpointConnectionRestOperations _dataFactoryPrivateEndpointConnectionPrivateEndpointConnectionRestClient; - private readonly ClientDiagnostics _dataFactoryPrivateEndpointConnectionprivateEndPointConnectionsClientDiagnostics; - private readonly PrivateEndPointConnectionsRestOperations _dataFactoryPrivateEndpointConnectionprivateEndPointConnectionsRestClient; - - /// Initializes a new instance of the class for mocking. - protected DataFactoryPrivateEndpointConnectionCollection() - { - } - - /// Initializes a new instance of the class. - /// The client parameters to use in these operations. - /// The identifier of the parent resource that is the target of operations. - internal DataFactoryPrivateEndpointConnectionCollection(ArmClient client, ResourceIdentifier id) : base(client, id) - { - _dataFactoryPrivateEndpointConnectionPrivateEndpointConnectionClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.DataFactory", DataFactoryPrivateEndpointConnectionResource.ResourceType.Namespace, Diagnostics); - TryGetApiVersion(DataFactoryPrivateEndpointConnectionResource.ResourceType, out string dataFactoryPrivateEndpointConnectionPrivateEndpointConnectionApiVersion); - _dataFactoryPrivateEndpointConnectionPrivateEndpointConnectionRestClient = new PrivateEndpointConnectionRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, dataFactoryPrivateEndpointConnectionPrivateEndpointConnectionApiVersion); - _dataFactoryPrivateEndpointConnectionprivateEndPointConnectionsClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.DataFactory", DataFactoryPrivateEndpointConnectionResource.ResourceType.Namespace, Diagnostics); - TryGetApiVersion(DataFactoryPrivateEndpointConnectionResource.ResourceType, out string dataFactoryPrivateEndpointConnectionprivateEndPointConnectionsApiVersion); - _dataFactoryPrivateEndpointConnectionprivateEndPointConnectionsRestClient = new PrivateEndPointConnectionsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, dataFactoryPrivateEndpointConnectionprivateEndPointConnectionsApiVersion); -#if DEBUG - ValidateResourceId(Id); -#endif - } - - internal static void ValidateResourceId(ResourceIdentifier id) - { - if (id.ResourceType != DataFactoryResource.ResourceType) - throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, DataFactoryResource.ResourceType), nameof(id)); - } - - /// - /// Approves or rejects a private endpoint connection - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName}/privateEndpointConnections/{privateEndpointConnectionName} - /// - /// - /// Operation Id - /// PrivateEndpointConnection_CreateOrUpdate - /// - /// - /// - /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. - /// The private endpoint connection name. - /// The DataFactoryPrivateEndpointConnectionCreateOrUpdateContent to use. - /// ETag of the private endpoint connection entity. Should only be specified for update, for which it should match existing entity or can be * for unconditional update. - /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// or is null. - public virtual async Task> CreateOrUpdateAsync(WaitUntil waitUntil, string privateEndpointConnectionName, DataFactoryPrivateEndpointConnectionCreateOrUpdateContent content, string ifMatch = null, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(privateEndpointConnectionName, nameof(privateEndpointConnectionName)); - Argument.AssertNotNull(content, nameof(content)); - - using var scope = _dataFactoryPrivateEndpointConnectionPrivateEndpointConnectionClientDiagnostics.CreateScope("DataFactoryPrivateEndpointConnectionCollection.CreateOrUpdate"); - scope.Start(); - try - { - var response = await _dataFactoryPrivateEndpointConnectionPrivateEndpointConnectionRestClient.CreateOrUpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, privateEndpointConnectionName, content, ifMatch, cancellationToken).ConfigureAwait(false); - var operation = new DataFactoryArmOperation(Response.FromValue(new DataFactoryPrivateEndpointConnectionResource(Client, response), response.GetRawResponse())); - if (waitUntil == WaitUntil.Completed) - await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); - return operation; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Approves or rejects a private endpoint connection - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName}/privateEndpointConnections/{privateEndpointConnectionName} - /// - /// - /// Operation Id - /// PrivateEndpointConnection_CreateOrUpdate - /// - /// - /// - /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. - /// The private endpoint connection name. - /// The DataFactoryPrivateEndpointConnectionCreateOrUpdateContent to use. - /// ETag of the private endpoint connection entity. Should only be specified for update, for which it should match existing entity or can be * for unconditional update. - /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// or is null. - public virtual ArmOperation CreateOrUpdate(WaitUntil waitUntil, string privateEndpointConnectionName, DataFactoryPrivateEndpointConnectionCreateOrUpdateContent content, string ifMatch = null, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(privateEndpointConnectionName, nameof(privateEndpointConnectionName)); - Argument.AssertNotNull(content, nameof(content)); - - using var scope = _dataFactoryPrivateEndpointConnectionPrivateEndpointConnectionClientDiagnostics.CreateScope("DataFactoryPrivateEndpointConnectionCollection.CreateOrUpdate"); - scope.Start(); - try - { - var response = _dataFactoryPrivateEndpointConnectionPrivateEndpointConnectionRestClient.CreateOrUpdate(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, privateEndpointConnectionName, content, ifMatch, cancellationToken); - var operation = new DataFactoryArmOperation(Response.FromValue(new DataFactoryPrivateEndpointConnectionResource(Client, response), response.GetRawResponse())); - if (waitUntil == WaitUntil.Completed) - operation.WaitForCompletion(cancellationToken); - return operation; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Gets a private endpoint connection - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName}/privateEndpointConnections/{privateEndpointConnectionName} - /// - /// - /// Operation Id - /// PrivateEndpointConnection_Get - /// - /// - /// - /// The private endpoint connection name. - /// ETag of the private endpoint connection entity. Should only be specified for get. If the ETag matches the existing entity tag, or if * was provided, then no content will be returned. - /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// is null. - public virtual async Task> GetAsync(string privateEndpointConnectionName, string ifNoneMatch = null, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(privateEndpointConnectionName, nameof(privateEndpointConnectionName)); - - using var scope = _dataFactoryPrivateEndpointConnectionPrivateEndpointConnectionClientDiagnostics.CreateScope("DataFactoryPrivateEndpointConnectionCollection.Get"); - scope.Start(); - try - { - var response = await _dataFactoryPrivateEndpointConnectionPrivateEndpointConnectionRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, privateEndpointConnectionName, ifNoneMatch, cancellationToken).ConfigureAwait(false); - if (response.Value == null) - throw new RequestFailedException(response.GetRawResponse()); - return Response.FromValue(new DataFactoryPrivateEndpointConnectionResource(Client, response.Value), response.GetRawResponse()); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Gets a private endpoint connection - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName}/privateEndpointConnections/{privateEndpointConnectionName} - /// - /// - /// Operation Id - /// PrivateEndpointConnection_Get - /// - /// - /// - /// The private endpoint connection name. - /// ETag of the private endpoint connection entity. Should only be specified for get. If the ETag matches the existing entity tag, or if * was provided, then no content will be returned. - /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// is null. - public virtual Response Get(string privateEndpointConnectionName, string ifNoneMatch = null, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(privateEndpointConnectionName, nameof(privateEndpointConnectionName)); - - using var scope = _dataFactoryPrivateEndpointConnectionPrivateEndpointConnectionClientDiagnostics.CreateScope("DataFactoryPrivateEndpointConnectionCollection.Get"); - scope.Start(); - try - { - var response = _dataFactoryPrivateEndpointConnectionPrivateEndpointConnectionRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, privateEndpointConnectionName, ifNoneMatch, cancellationToken); - if (response.Value == null) - throw new RequestFailedException(response.GetRawResponse()); - return Response.FromValue(new DataFactoryPrivateEndpointConnectionResource(Client, response.Value), response.GetRawResponse()); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Lists Private endpoint connections - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName}/privateEndPointConnections - /// - /// - /// Operation Id - /// privateEndPointConnections_ListByFactory - /// - /// - /// - /// The cancellation token to use. - /// An async collection of that may take multiple service requests to iterate over. - public virtual AsyncPageable GetAllAsync(CancellationToken cancellationToken = default) - { - HttpMessage FirstPageRequest(int? pageSizeHint) => _dataFactoryPrivateEndpointConnectionprivateEndPointConnectionsRestClient.CreateListByFactoryRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name); - HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _dataFactoryPrivateEndpointConnectionprivateEndPointConnectionsRestClient.CreateListByFactoryNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name); - return PageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new DataFactoryPrivateEndpointConnectionResource(Client, DataFactoryPrivateEndpointConnectionData.DeserializeDataFactoryPrivateEndpointConnectionData(e)), _dataFactoryPrivateEndpointConnectionprivateEndPointConnectionsClientDiagnostics, Pipeline, "DataFactoryPrivateEndpointConnectionCollection.GetAll", "value", "nextLink", cancellationToken); - } - - /// - /// Lists Private endpoint connections - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName}/privateEndPointConnections - /// - /// - /// Operation Id - /// privateEndPointConnections_ListByFactory - /// - /// - /// - /// The cancellation token to use. - /// A collection of that may take multiple service requests to iterate over. - public virtual Pageable GetAll(CancellationToken cancellationToken = default) - { - HttpMessage FirstPageRequest(int? pageSizeHint) => _dataFactoryPrivateEndpointConnectionprivateEndPointConnectionsRestClient.CreateListByFactoryRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name); - HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _dataFactoryPrivateEndpointConnectionprivateEndPointConnectionsRestClient.CreateListByFactoryNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name); - return PageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new DataFactoryPrivateEndpointConnectionResource(Client, DataFactoryPrivateEndpointConnectionData.DeserializeDataFactoryPrivateEndpointConnectionData(e)), _dataFactoryPrivateEndpointConnectionprivateEndPointConnectionsClientDiagnostics, Pipeline, "DataFactoryPrivateEndpointConnectionCollection.GetAll", "value", "nextLink", cancellationToken); - } - - /// - /// Checks to see if the resource exists in azure. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName}/privateEndpointConnections/{privateEndpointConnectionName} - /// - /// - /// Operation Id - /// PrivateEndpointConnection_Get - /// - /// - /// - /// The private endpoint connection name. - /// ETag of the private endpoint connection entity. Should only be specified for get. If the ETag matches the existing entity tag, or if * was provided, then no content will be returned. - /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// is null. - public virtual async Task> ExistsAsync(string privateEndpointConnectionName, string ifNoneMatch = null, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(privateEndpointConnectionName, nameof(privateEndpointConnectionName)); - - using var scope = _dataFactoryPrivateEndpointConnectionPrivateEndpointConnectionClientDiagnostics.CreateScope("DataFactoryPrivateEndpointConnectionCollection.Exists"); - scope.Start(); - try - { - var response = await _dataFactoryPrivateEndpointConnectionPrivateEndpointConnectionRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, privateEndpointConnectionName, ifNoneMatch, cancellationToken: cancellationToken).ConfigureAwait(false); - return Response.FromValue(response.Value != null, response.GetRawResponse()); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Checks to see if the resource exists in azure. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName}/privateEndpointConnections/{privateEndpointConnectionName} - /// - /// - /// Operation Id - /// PrivateEndpointConnection_Get - /// - /// - /// - /// The private endpoint connection name. - /// ETag of the private endpoint connection entity. Should only be specified for get. If the ETag matches the existing entity tag, or if * was provided, then no content will be returned. - /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// is null. - public virtual Response Exists(string privateEndpointConnectionName, string ifNoneMatch = null, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(privateEndpointConnectionName, nameof(privateEndpointConnectionName)); - - using var scope = _dataFactoryPrivateEndpointConnectionPrivateEndpointConnectionClientDiagnostics.CreateScope("DataFactoryPrivateEndpointConnectionCollection.Exists"); - scope.Start(); - try - { - var response = _dataFactoryPrivateEndpointConnectionPrivateEndpointConnectionRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, privateEndpointConnectionName, ifNoneMatch, cancellationToken: cancellationToken); - return Response.FromValue(response.Value != null, response.GetRawResponse()); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - IEnumerator IEnumerable.GetEnumerator() - { - return GetAll().GetEnumerator(); - } - - IEnumerator IEnumerable.GetEnumerator() - { - return GetAll().GetEnumerator(); - } - - IAsyncEnumerator IAsyncEnumerable.GetAsyncEnumerator(CancellationToken cancellationToken) - { - return GetAllAsync(cancellationToken: cancellationToken).GetAsyncEnumerator(cancellationToken); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/DataFactoryPrivateEndpointConnectionData.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/DataFactoryPrivateEndpointConnectionData.cs deleted file mode 100644 index cd85e9fd..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/DataFactoryPrivateEndpointConnectionData.cs +++ /dev/null @@ -1,40 +0,0 @@ -// - -#nullable disable - -using Azure.Core; -using AzureDataFactory.TestingFramework.Models; -using Azure.ResourceManager.Models; - -namespace Azure.ResourceManager.DataFactory -{ - /// - /// A class representing the DataFactoryPrivateEndpointConnection data model. - /// Private Endpoint Connection ARM resource. - /// - public partial class DataFactoryPrivateEndpointConnectionData : ResourceData - { - /// Initializes a new instance of DataFactoryPrivateEndpointConnectionData. - public DataFactoryPrivateEndpointConnectionData() - { - } - - /// Initializes a new instance of DataFactoryPrivateEndpointConnectionData. - /// The id. - /// The name. - /// The resourceType. - /// The systemData. - /// Core resource properties. - /// Etag identifies change in the resource. - internal DataFactoryPrivateEndpointConnectionData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, DataFactoryPrivateEndpointConnectionProperties properties, ETag? eTag) : base(id, name, resourceType, systemData) - { - Properties = properties; - ETag = eTag; - } - - /// Core resource properties. - public DataFactoryPrivateEndpointConnectionProperties Properties { get; set; } - /// Etag identifies change in the resource. - public ETag? ETag { get; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/DataFactoryPrivateEndpointConnectionResource.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/DataFactoryPrivateEndpointConnectionResource.cs deleted file mode 100644 index 7daaeb37..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/DataFactoryPrivateEndpointConnectionResource.cs +++ /dev/null @@ -1,294 +0,0 @@ -// - -#nullable disable - -using System.Globalization; -using Azure.Core; -using Azure.Core.Pipeline; -using AzureDataFactory.TestingFramework.Models; - -namespace Azure.ResourceManager.DataFactory -{ - /// - /// A Class representing a DataFactoryPrivateEndpointConnection along with the instance operations that can be performed on it. - /// If you have a you can construct a - /// from an instance of using the GetDataFactoryPrivateEndpointConnectionResource method. - /// Otherwise you can get one from its parent resource using the GetDataFactoryPrivateEndpointConnection method. - /// - public partial class DataFactoryPrivateEndpointConnectionResource : ArmResource - { - /// Generate the resource identifier of a instance. - public static ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string factoryName, string privateEndpointConnectionName) - { - var resourceId = $"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName}/privateEndpointConnections/{privateEndpointConnectionName}"; - return new ResourceIdentifier(resourceId); - } - - private readonly ClientDiagnostics _dataFactoryPrivateEndpointConnectionPrivateEndpointConnectionClientDiagnostics; - private readonly PrivateEndpointConnectionRestOperations _dataFactoryPrivateEndpointConnectionPrivateEndpointConnectionRestClient; - private readonly DataFactoryPrivateEndpointConnectionData _data; - - /// Initializes a new instance of the class for mocking. - protected DataFactoryPrivateEndpointConnectionResource() - { - } - - /// Initializes a new instance of the class. - /// The client parameters to use in these operations. - /// The resource that is the target of operations. - internal DataFactoryPrivateEndpointConnectionResource(ArmClient client, DataFactoryPrivateEndpointConnectionData data) : this(client, data.Id) - { - HasData = true; - _data = data; - } - - /// Initializes a new instance of the class. - /// The client parameters to use in these operations. - /// The identifier of the resource that is the target of operations. - internal DataFactoryPrivateEndpointConnectionResource(ArmClient client, ResourceIdentifier id) : base(client, id) - { - _dataFactoryPrivateEndpointConnectionPrivateEndpointConnectionClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.DataFactory", ResourceType.Namespace, Diagnostics); - TryGetApiVersion(ResourceType, out string dataFactoryPrivateEndpointConnectionPrivateEndpointConnectionApiVersion); - _dataFactoryPrivateEndpointConnectionPrivateEndpointConnectionRestClient = new PrivateEndpointConnectionRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, dataFactoryPrivateEndpointConnectionPrivateEndpointConnectionApiVersion); -#if DEBUG - ValidateResourceId(Id); -#endif - } - - /// Gets the resource type for the operations. - public static readonly ResourceType ResourceType = "Microsoft.DataFactory/factories/privateEndpointConnections"; - - /// Gets whether or not the current instance has data. - public virtual bool HasData { get; } - - /// Gets the data representing this Feature. - /// Throws if there is no data loaded in the current instance. - public virtual DataFactoryPrivateEndpointConnectionData Data - { - get - { - if (!HasData) - throw new InvalidOperationException("The current instance does not have data, you must call Get first."); - return _data; - } - } - - internal static void ValidateResourceId(ResourceIdentifier id) - { - if (id.ResourceType != ResourceType) - throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, ResourceType), nameof(id)); - } - - /// - /// Gets a private endpoint connection - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName}/privateEndpointConnections/{privateEndpointConnectionName} - /// - /// - /// Operation Id - /// PrivateEndpointConnection_Get - /// - /// - /// - /// ETag of the private endpoint connection entity. Should only be specified for get. If the ETag matches the existing entity tag, or if * was provided, then no content will be returned. - /// The cancellation token to use. - public virtual async Task> GetAsync(string ifNoneMatch = null, CancellationToken cancellationToken = default) - { - using var scope = _dataFactoryPrivateEndpointConnectionPrivateEndpointConnectionClientDiagnostics.CreateScope("DataFactoryPrivateEndpointConnectionResource.Get"); - scope.Start(); - try - { - var response = await _dataFactoryPrivateEndpointConnectionPrivateEndpointConnectionRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, ifNoneMatch, cancellationToken).ConfigureAwait(false); - if (response.Value == null) - throw new RequestFailedException(response.GetRawResponse()); - return Response.FromValue(new DataFactoryPrivateEndpointConnectionResource(Client, response.Value), response.GetRawResponse()); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Gets a private endpoint connection - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName}/privateEndpointConnections/{privateEndpointConnectionName} - /// - /// - /// Operation Id - /// PrivateEndpointConnection_Get - /// - /// - /// - /// ETag of the private endpoint connection entity. Should only be specified for get. If the ETag matches the existing entity tag, or if * was provided, then no content will be returned. - /// The cancellation token to use. - public virtual Response Get(string ifNoneMatch = null, CancellationToken cancellationToken = default) - { - using var scope = _dataFactoryPrivateEndpointConnectionPrivateEndpointConnectionClientDiagnostics.CreateScope("DataFactoryPrivateEndpointConnectionResource.Get"); - scope.Start(); - try - { - var response = _dataFactoryPrivateEndpointConnectionPrivateEndpointConnectionRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, ifNoneMatch, cancellationToken); - if (response.Value == null) - throw new RequestFailedException(response.GetRawResponse()); - return Response.FromValue(new DataFactoryPrivateEndpointConnectionResource(Client, response.Value), response.GetRawResponse()); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Deletes a private endpoint connection - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName}/privateEndpointConnections/{privateEndpointConnectionName} - /// - /// - /// Operation Id - /// PrivateEndpointConnection_Delete - /// - /// - /// - /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. - /// The cancellation token to use. - public virtual async Task DeleteAsync(WaitUntil waitUntil, CancellationToken cancellationToken = default) - { - using var scope = _dataFactoryPrivateEndpointConnectionPrivateEndpointConnectionClientDiagnostics.CreateScope("DataFactoryPrivateEndpointConnectionResource.Delete"); - scope.Start(); - try - { - var response = await _dataFactoryPrivateEndpointConnectionPrivateEndpointConnectionRestClient.DeleteAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); - var operation = new DataFactoryArmOperation(response); - if (waitUntil == WaitUntil.Completed) - await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false); - return operation; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Deletes a private endpoint connection - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName}/privateEndpointConnections/{privateEndpointConnectionName} - /// - /// - /// Operation Id - /// PrivateEndpointConnection_Delete - /// - /// - /// - /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. - /// The cancellation token to use. - public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancellationToken = default) - { - using var scope = _dataFactoryPrivateEndpointConnectionPrivateEndpointConnectionClientDiagnostics.CreateScope("DataFactoryPrivateEndpointConnectionResource.Delete"); - scope.Start(); - try - { - var response = _dataFactoryPrivateEndpointConnectionPrivateEndpointConnectionRestClient.Delete(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); - var operation = new DataFactoryArmOperation(response); - if (waitUntil == WaitUntil.Completed) - operation.WaitForCompletionResponse(cancellationToken); - return operation; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Approves or rejects a private endpoint connection - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName}/privateEndpointConnections/{privateEndpointConnectionName} - /// - /// - /// Operation Id - /// PrivateEndpointConnection_CreateOrUpdate - /// - /// - /// - /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. - /// The DataFactoryPrivateEndpointConnectionCreateOrUpdateContent to use. - /// ETag of the private endpoint connection entity. Should only be specified for update, for which it should match existing entity or can be * for unconditional update. - /// The cancellation token to use. - /// is null. - public virtual async Task> UpdateAsync(WaitUntil waitUntil, DataFactoryPrivateEndpointConnectionCreateOrUpdateContent content, string ifMatch = null, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(content, nameof(content)); - - using var scope = _dataFactoryPrivateEndpointConnectionPrivateEndpointConnectionClientDiagnostics.CreateScope("DataFactoryPrivateEndpointConnectionResource.Update"); - scope.Start(); - try - { - var response = await _dataFactoryPrivateEndpointConnectionPrivateEndpointConnectionRestClient.CreateOrUpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, content, ifMatch, cancellationToken).ConfigureAwait(false); - var operation = new DataFactoryArmOperation(Response.FromValue(new DataFactoryPrivateEndpointConnectionResource(Client, response), response.GetRawResponse())); - if (waitUntil == WaitUntil.Completed) - await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); - return operation; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Approves or rejects a private endpoint connection - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName}/privateEndpointConnections/{privateEndpointConnectionName} - /// - /// - /// Operation Id - /// PrivateEndpointConnection_CreateOrUpdate - /// - /// - /// - /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. - /// The DataFactoryPrivateEndpointConnectionCreateOrUpdateContent to use. - /// ETag of the private endpoint connection entity. Should only be specified for update, for which it should match existing entity or can be * for unconditional update. - /// The cancellation token to use. - /// is null. - public virtual ArmOperation Update(WaitUntil waitUntil, DataFactoryPrivateEndpointConnectionCreateOrUpdateContent content, string ifMatch = null, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(content, nameof(content)); - - using var scope = _dataFactoryPrivateEndpointConnectionPrivateEndpointConnectionClientDiagnostics.CreateScope("DataFactoryPrivateEndpointConnectionResource.Update"); - scope.Start(); - try - { - var response = _dataFactoryPrivateEndpointConnectionPrivateEndpointConnectionRestClient.CreateOrUpdate(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, content, ifMatch, cancellationToken); - var operation = new DataFactoryArmOperation(Response.FromValue(new DataFactoryPrivateEndpointConnectionResource(Client, response), response.GetRawResponse())); - if (waitUntil == WaitUntil.Completed) - operation.WaitForCompletion(cancellationToken); - return operation; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/DataFactoryPrivateEndpointData.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/DataFactoryPrivateEndpointData.cs deleted file mode 100644 index b2df636b..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/DataFactoryPrivateEndpointData.cs +++ /dev/null @@ -1,45 +0,0 @@ -// - -#nullable disable - -using Azure.Core; -using AzureDataFactory.TestingFramework.Models; -using Azure.ResourceManager.Models; - -namespace Azure.ResourceManager.DataFactory -{ - /// - /// A class representing the DataFactoryPrivateEndpoint data model. - /// Managed private endpoint resource type. - /// - public partial class DataFactoryPrivateEndpointData : ResourceData - { - /// Initializes a new instance of DataFactoryPrivateEndpointData. - /// Managed private endpoint properties. - /// is null. - public DataFactoryPrivateEndpointData(DataFactoryPrivateEndpointProperties properties) - { - Argument.AssertNotNull(properties, nameof(properties)); - - Properties = properties; - } - - /// Initializes a new instance of DataFactoryPrivateEndpointData. - /// The id. - /// The name. - /// The resourceType. - /// The systemData. - /// Managed private endpoint properties. - /// Etag identifies change in the resource. - internal DataFactoryPrivateEndpointData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, DataFactoryPrivateEndpointProperties properties, ETag? eTag) : base(id, name, resourceType, systemData) - { - Properties = properties; - ETag = eTag; - } - - /// Managed private endpoint properties. - public DataFactoryPrivateEndpointProperties Properties { get; set; } - /// Etag identifies change in the resource. - public ETag? ETag { get; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/DataFactoryPrivateEndpointResource.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/DataFactoryPrivateEndpointResource.cs deleted file mode 100644 index 228ebb86..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/DataFactoryPrivateEndpointResource.cs +++ /dev/null @@ -1,293 +0,0 @@ -// - -#nullable disable - -using System.Globalization; -using Azure.Core; -using Azure.Core.Pipeline; - -namespace Azure.ResourceManager.DataFactory -{ - /// - /// A Class representing a DataFactoryPrivateEndpoint along with the instance operations that can be performed on it. - /// If you have a you can construct a - /// from an instance of using the GetDataFactoryPrivateEndpointResource method. - /// Otherwise you can get one from its parent resource using the GetDataFactoryPrivateEndpoint method. - /// - public partial class DataFactoryPrivateEndpointResource : ArmResource - { - /// Generate the resource identifier of a instance. - public static ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string factoryName, string managedVirtualNetworkName, string managedPrivateEndpointName) - { - var resourceId = $"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName}/managedVirtualNetworks/{managedVirtualNetworkName}/managedPrivateEndpoints/{managedPrivateEndpointName}"; - return new ResourceIdentifier(resourceId); - } - - private readonly ClientDiagnostics _dataFactoryPrivateEndpointManagedPrivateEndpointsClientDiagnostics; - private readonly ManagedPrivateEndpointsRestOperations _dataFactoryPrivateEndpointManagedPrivateEndpointsRestClient; - private readonly DataFactoryPrivateEndpointData _data; - - /// Initializes a new instance of the class for mocking. - protected DataFactoryPrivateEndpointResource() - { - } - - /// Initializes a new instance of the class. - /// The client parameters to use in these operations. - /// The resource that is the target of operations. - internal DataFactoryPrivateEndpointResource(ArmClient client, DataFactoryPrivateEndpointData data) : this(client, data.Id) - { - HasData = true; - _data = data; - } - - /// Initializes a new instance of the class. - /// The client parameters to use in these operations. - /// The identifier of the resource that is the target of operations. - internal DataFactoryPrivateEndpointResource(ArmClient client, ResourceIdentifier id) : base(client, id) - { - _dataFactoryPrivateEndpointManagedPrivateEndpointsClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.DataFactory", ResourceType.Namespace, Diagnostics); - TryGetApiVersion(ResourceType, out string dataFactoryPrivateEndpointManagedPrivateEndpointsApiVersion); - _dataFactoryPrivateEndpointManagedPrivateEndpointsRestClient = new ManagedPrivateEndpointsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, dataFactoryPrivateEndpointManagedPrivateEndpointsApiVersion); -#if DEBUG - ValidateResourceId(Id); -#endif - } - - /// Gets the resource type for the operations. - public static readonly ResourceType ResourceType = "Microsoft.DataFactory/factories/managedVirtualNetworks/managedPrivateEndpoints"; - - /// Gets whether or not the current instance has data. - public virtual bool HasData { get; } - - /// Gets the data representing this Feature. - /// Throws if there is no data loaded in the current instance. - public virtual DataFactoryPrivateEndpointData Data - { - get - { - if (!HasData) - throw new InvalidOperationException("The current instance does not have data, you must call Get first."); - return _data; - } - } - - internal static void ValidateResourceId(ResourceIdentifier id) - { - if (id.ResourceType != ResourceType) - throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, ResourceType), nameof(id)); - } - - /// - /// Gets a managed private endpoint. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName}/managedVirtualNetworks/{managedVirtualNetworkName}/managedPrivateEndpoints/{managedPrivateEndpointName} - /// - /// - /// Operation Id - /// ManagedPrivateEndpoints_Get - /// - /// - /// - /// ETag of the managed private endpoint entity. Should only be specified for get. If the ETag matches the existing entity tag, or if * was provided, then no content will be returned. - /// The cancellation token to use. - public virtual async Task> GetAsync(string ifNoneMatch = null, CancellationToken cancellationToken = default) - { - using var scope = _dataFactoryPrivateEndpointManagedPrivateEndpointsClientDiagnostics.CreateScope("DataFactoryPrivateEndpointResource.Get"); - scope.Start(); - try - { - var response = await _dataFactoryPrivateEndpointManagedPrivateEndpointsRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, ifNoneMatch, cancellationToken).ConfigureAwait(false); - if (response.Value == null) - throw new RequestFailedException(response.GetRawResponse()); - return Response.FromValue(new DataFactoryPrivateEndpointResource(Client, response.Value), response.GetRawResponse()); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Gets a managed private endpoint. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName}/managedVirtualNetworks/{managedVirtualNetworkName}/managedPrivateEndpoints/{managedPrivateEndpointName} - /// - /// - /// Operation Id - /// ManagedPrivateEndpoints_Get - /// - /// - /// - /// ETag of the managed private endpoint entity. Should only be specified for get. If the ETag matches the existing entity tag, or if * was provided, then no content will be returned. - /// The cancellation token to use. - public virtual Response Get(string ifNoneMatch = null, CancellationToken cancellationToken = default) - { - using var scope = _dataFactoryPrivateEndpointManagedPrivateEndpointsClientDiagnostics.CreateScope("DataFactoryPrivateEndpointResource.Get"); - scope.Start(); - try - { - var response = _dataFactoryPrivateEndpointManagedPrivateEndpointsRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, ifNoneMatch, cancellationToken); - if (response.Value == null) - throw new RequestFailedException(response.GetRawResponse()); - return Response.FromValue(new DataFactoryPrivateEndpointResource(Client, response.Value), response.GetRawResponse()); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Deletes a managed private endpoint. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName}/managedVirtualNetworks/{managedVirtualNetworkName}/managedPrivateEndpoints/{managedPrivateEndpointName} - /// - /// - /// Operation Id - /// ManagedPrivateEndpoints_Delete - /// - /// - /// - /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. - /// The cancellation token to use. - public virtual async Task DeleteAsync(WaitUntil waitUntil, CancellationToken cancellationToken = default) - { - using var scope = _dataFactoryPrivateEndpointManagedPrivateEndpointsClientDiagnostics.CreateScope("DataFactoryPrivateEndpointResource.Delete"); - scope.Start(); - try - { - var response = await _dataFactoryPrivateEndpointManagedPrivateEndpointsRestClient.DeleteAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); - var operation = new DataFactoryArmOperation(response); - if (waitUntil == WaitUntil.Completed) - await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false); - return operation; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Deletes a managed private endpoint. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName}/managedVirtualNetworks/{managedVirtualNetworkName}/managedPrivateEndpoints/{managedPrivateEndpointName} - /// - /// - /// Operation Id - /// ManagedPrivateEndpoints_Delete - /// - /// - /// - /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. - /// The cancellation token to use. - public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancellationToken = default) - { - using var scope = _dataFactoryPrivateEndpointManagedPrivateEndpointsClientDiagnostics.CreateScope("DataFactoryPrivateEndpointResource.Delete"); - scope.Start(); - try - { - var response = _dataFactoryPrivateEndpointManagedPrivateEndpointsRestClient.Delete(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, cancellationToken); - var operation = new DataFactoryArmOperation(response); - if (waitUntil == WaitUntil.Completed) - operation.WaitForCompletionResponse(cancellationToken); - return operation; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Creates or updates a managed private endpoint. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName}/managedVirtualNetworks/{managedVirtualNetworkName}/managedPrivateEndpoints/{managedPrivateEndpointName} - /// - /// - /// Operation Id - /// ManagedPrivateEndpoints_CreateOrUpdate - /// - /// - /// - /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. - /// Managed private endpoint resource definition. - /// ETag of the managed private endpoint entity. Should only be specified for update, for which it should match existing entity or can be * for unconditional update. - /// The cancellation token to use. - /// is null. - public virtual async Task> UpdateAsync(WaitUntil waitUntil, DataFactoryPrivateEndpointData data, string ifMatch = null, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(data, nameof(data)); - - using var scope = _dataFactoryPrivateEndpointManagedPrivateEndpointsClientDiagnostics.CreateScope("DataFactoryPrivateEndpointResource.Update"); - scope.Start(); - try - { - var response = await _dataFactoryPrivateEndpointManagedPrivateEndpointsRestClient.CreateOrUpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, data, ifMatch, cancellationToken).ConfigureAwait(false); - var operation = new DataFactoryArmOperation(Response.FromValue(new DataFactoryPrivateEndpointResource(Client, response), response.GetRawResponse())); - if (waitUntil == WaitUntil.Completed) - await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); - return operation; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Creates or updates a managed private endpoint. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName}/managedVirtualNetworks/{managedVirtualNetworkName}/managedPrivateEndpoints/{managedPrivateEndpointName} - /// - /// - /// Operation Id - /// ManagedPrivateEndpoints_CreateOrUpdate - /// - /// - /// - /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. - /// Managed private endpoint resource definition. - /// ETag of the managed private endpoint entity. Should only be specified for update, for which it should match existing entity or can be * for unconditional update. - /// The cancellation token to use. - /// is null. - public virtual ArmOperation Update(WaitUntil waitUntil, DataFactoryPrivateEndpointData data, string ifMatch = null, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(data, nameof(data)); - - using var scope = _dataFactoryPrivateEndpointManagedPrivateEndpointsClientDiagnostics.CreateScope("DataFactoryPrivateEndpointResource.Update"); - scope.Start(); - try - { - var response = _dataFactoryPrivateEndpointManagedPrivateEndpointsRestClient.CreateOrUpdate(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, data, ifMatch, cancellationToken); - var operation = new DataFactoryArmOperation(Response.FromValue(new DataFactoryPrivateEndpointResource(Client, response), response.GetRawResponse())); - if (waitUntil == WaitUntil.Completed) - operation.WaitForCompletion(cancellationToken); - return operation; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/DataFactoryResource.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/DataFactoryResource.cs deleted file mode 100644 index 7bb915ab..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/DataFactoryResource.cs +++ /dev/null @@ -1,2221 +0,0 @@ -// - -#nullable disable - -using System.Globalization; -using Azure.Core; -using Azure.Core.Pipeline; -using AzureDataFactory.TestingFramework.Models; -using Azure.ResourceManager.Resources; - -namespace Azure.ResourceManager.DataFactory -{ - /// - /// A Class representing a DataFactory along with the instance operations that can be performed on it. - /// If you have a you can construct a - /// from an instance of using the GetDataFactoryResource method. - /// Otherwise you can get one from its parent resource using the GetDataFactory method. - /// - public partial class DataFactoryResource : ArmResource - { - /// Generate the resource identifier of a instance. - public static ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string factoryName) - { - var resourceId = $"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName}"; - return new ResourceIdentifier(resourceId); - } - - private readonly ClientDiagnostics _dataFactoryFactoriesClientDiagnostics; - private readonly FactoriesRestOperations _dataFactoryFactoriesRestClient; - private readonly ClientDiagnostics _exposureControlClientDiagnostics; - private readonly ExposureControlRestOperations _exposureControlRestClient; - private readonly ClientDiagnostics _pipelineRunsClientDiagnostics; - private readonly PipelineRunsRestOperations _pipelineRunsRestClient; - private readonly ClientDiagnostics _activityRunsClientDiagnostics; - private readonly ActivityRunsRestOperations _activityRunsRestClient; - private readonly ClientDiagnostics _dataFactoryTriggerTriggersClientDiagnostics; - private readonly TriggersRestOperations _dataFactoryTriggerTriggersRestClient; - private readonly ClientDiagnostics _triggerRunsClientDiagnostics; - private readonly TriggerRunsRestOperations _triggerRunsRestClient; - private readonly ClientDiagnostics _dataFlowDebugSessionClientDiagnostics; - private readonly DataFlowDebugSessionRestOperations _dataFlowDebugSessionRestClient; - private readonly ClientDiagnostics _privateLinkResourcesClientDiagnostics; - private readonly PrivateLinkResourcesRestOperations _privateLinkResourcesRestClient; - private readonly DataFactoryData _data; - - /// Initializes a new instance of the class for mocking. - protected DataFactoryResource() - { - } - - /// Initializes a new instance of the class. - /// The client parameters to use in these operations. - /// The resource that is the target of operations. - internal DataFactoryResource(ArmClient client, DataFactoryData data) : this(client, data.Id) - { - HasData = true; - _data = data; - } - - /// Initializes a new instance of the class. - /// The client parameters to use in these operations. - /// The identifier of the resource that is the target of operations. - internal DataFactoryResource(ArmClient client, ResourceIdentifier id) : base(client, id) - { - _dataFactoryFactoriesClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.DataFactory", ResourceType.Namespace, Diagnostics); - TryGetApiVersion(ResourceType, out string dataFactoryFactoriesApiVersion); - _dataFactoryFactoriesRestClient = new FactoriesRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, dataFactoryFactoriesApiVersion); - _exposureControlClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.DataFactory", ProviderConstants.DefaultProviderNamespace, Diagnostics); - _exposureControlRestClient = new ExposureControlRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint); - _pipelineRunsClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.DataFactory", ProviderConstants.DefaultProviderNamespace, Diagnostics); - _pipelineRunsRestClient = new PipelineRunsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint); - _activityRunsClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.DataFactory", ProviderConstants.DefaultProviderNamespace, Diagnostics); - _activityRunsRestClient = new ActivityRunsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint); - _dataFactoryTriggerTriggersClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.DataFactory", DataFactoryTriggerResource.ResourceType.Namespace, Diagnostics); - TryGetApiVersion(DataFactoryTriggerResource.ResourceType, out string dataFactoryTriggerTriggersApiVersion); - _dataFactoryTriggerTriggersRestClient = new TriggersRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, dataFactoryTriggerTriggersApiVersion); - _triggerRunsClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.DataFactory", ProviderConstants.DefaultProviderNamespace, Diagnostics); - _triggerRunsRestClient = new TriggerRunsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint); - _dataFlowDebugSessionClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.DataFactory", ProviderConstants.DefaultProviderNamespace, Diagnostics); - _dataFlowDebugSessionRestClient = new DataFlowDebugSessionRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint); - _privateLinkResourcesClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.DataFactory", ProviderConstants.DefaultProviderNamespace, Diagnostics); - _privateLinkResourcesRestClient = new PrivateLinkResourcesRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint); -#if DEBUG - ValidateResourceId(Id); -#endif - } - - /// Gets the resource type for the operations. - public static readonly ResourceType ResourceType = "Microsoft.DataFactory/factories"; - - /// Gets whether or not the current instance has data. - public virtual bool HasData { get; } - - /// Gets the data representing this Feature. - /// Throws if there is no data loaded in the current instance. - public virtual DataFactoryData Data - { - get - { - if (!HasData) - throw new InvalidOperationException("The current instance does not have data, you must call Get first."); - return _data; - } - } - - internal static void ValidateResourceId(ResourceIdentifier id) - { - if (id.ResourceType != ResourceType) - throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, ResourceType), nameof(id)); - } - - /// Gets a collection of DataFactoryIntegrationRuntimeResources in the DataFactory. - /// An object representing collection of DataFactoryIntegrationRuntimeResources and their operations over a DataFactoryIntegrationRuntimeResource. - public virtual DataFactoryIntegrationRuntimeCollection GetDataFactoryIntegrationRuntimes() - { - return GetCachedClient(Client => new DataFactoryIntegrationRuntimeCollection(Client, Id)); - } - - /// - /// Gets an integration runtime. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName}/integrationRuntimes/{integrationRuntimeName} - /// - /// - /// Operation Id - /// IntegrationRuntimes_Get - /// - /// - /// - /// The integration runtime name. - /// ETag of the integration runtime entity. Should only be specified for get. If the ETag matches the existing entity tag, or if * was provided, then no content will be returned. - /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// is null. - [ForwardsClientCalls] - public virtual async Task> GetDataFactoryIntegrationRuntimeAsync(string integrationRuntimeName, string ifNoneMatch = null, CancellationToken cancellationToken = default) - { - return await GetDataFactoryIntegrationRuntimes().GetAsync(integrationRuntimeName, ifNoneMatch, cancellationToken).ConfigureAwait(false); - } - - /// - /// Gets an integration runtime. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName}/integrationRuntimes/{integrationRuntimeName} - /// - /// - /// Operation Id - /// IntegrationRuntimes_Get - /// - /// - /// - /// The integration runtime name. - /// ETag of the integration runtime entity. Should only be specified for get. If the ETag matches the existing entity tag, or if * was provided, then no content will be returned. - /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// is null. - [ForwardsClientCalls] - public virtual Response GetDataFactoryIntegrationRuntime(string integrationRuntimeName, string ifNoneMatch = null, CancellationToken cancellationToken = default) - { - return GetDataFactoryIntegrationRuntimes().Get(integrationRuntimeName, ifNoneMatch, cancellationToken); - } - - /// Gets a collection of DataFactoryLinkedServiceResources in the DataFactory. - /// An object representing collection of DataFactoryLinkedServiceResources and their operations over a DataFactoryLinkedServiceResource. - public virtual DataFactoryLinkedServiceCollection GetDataFactoryLinkedServices() - { - return GetCachedClient(Client => new DataFactoryLinkedServiceCollection(Client, Id)); - } - - /// - /// Gets a linked service. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName}/linkedservices/{linkedServiceName} - /// - /// - /// Operation Id - /// LinkedServices_Get - /// - /// - /// - /// The linked service name. - /// ETag of the linked service entity. Should only be specified for get. If the ETag matches the existing entity tag, or if * was provided, then no content will be returned. - /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// is null. - [ForwardsClientCalls] - public virtual async Task> GetDataFactoryLinkedServiceAsync(string linkedServiceName, string ifNoneMatch = null, CancellationToken cancellationToken = default) - { - return await GetDataFactoryLinkedServices().GetAsync(linkedServiceName, ifNoneMatch, cancellationToken).ConfigureAwait(false); - } - - /// - /// Gets a linked service. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName}/linkedservices/{linkedServiceName} - /// - /// - /// Operation Id - /// LinkedServices_Get - /// - /// - /// - /// The linked service name. - /// ETag of the linked service entity. Should only be specified for get. If the ETag matches the existing entity tag, or if * was provided, then no content will be returned. - /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// is null. - [ForwardsClientCalls] - public virtual Response GetDataFactoryLinkedService(string linkedServiceName, string ifNoneMatch = null, CancellationToken cancellationToken = default) - { - return GetDataFactoryLinkedServices().Get(linkedServiceName, ifNoneMatch, cancellationToken); - } - - /// Gets a collection of DataFactoryDatasetResources in the DataFactory. - /// An object representing collection of DataFactoryDatasetResources and their operations over a DataFactoryDatasetResource. - public virtual DataFactoryDatasetCollection GetDataFactoryDatasets() - { - return GetCachedClient(Client => new DataFactoryDatasetCollection(Client, Id)); - } - - /// - /// Gets a dataset. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName}/datasets/{datasetName} - /// - /// - /// Operation Id - /// Datasets_Get - /// - /// - /// - /// The dataset name. - /// ETag of the dataset entity. Should only be specified for get. If the ETag matches the existing entity tag, or if * was provided, then no content will be returned. - /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// is null. - [ForwardsClientCalls] - public virtual async Task> GetDataFactoryDatasetAsync(string datasetName, string ifNoneMatch = null, CancellationToken cancellationToken = default) - { - return await GetDataFactoryDatasets().GetAsync(datasetName, ifNoneMatch, cancellationToken).ConfigureAwait(false); - } - - /// - /// Gets a dataset. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName}/datasets/{datasetName} - /// - /// - /// Operation Id - /// Datasets_Get - /// - /// - /// - /// The dataset name. - /// ETag of the dataset entity. Should only be specified for get. If the ETag matches the existing entity tag, or if * was provided, then no content will be returned. - /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// is null. - [ForwardsClientCalls] - public virtual Response GetDataFactoryDataset(string datasetName, string ifNoneMatch = null, CancellationToken cancellationToken = default) - { - return GetDataFactoryDatasets().Get(datasetName, ifNoneMatch, cancellationToken); - } - - /// Gets a collection of DataFactoryPipelineResources in the DataFactory. - /// An object representing collection of DataFactoryPipelineResources and their operations over a DataFactoryPipelineResource. - public virtual DataFactoryPipelineCollection GetDataFactoryPipelines() - { - return GetCachedClient(Client => new DataFactoryPipelineCollection(Client, Id)); - } - - /// - /// Gets a pipeline. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName}/pipelines/{pipelineName} - /// - /// - /// Operation Id - /// Pipelines_Get - /// - /// - /// - /// The pipeline name. - /// ETag of the pipeline entity. Should only be specified for get. If the ETag matches the existing entity tag, or if * was provided, then no content will be returned. - /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// is null. - [ForwardsClientCalls] - public virtual async Task> GetDataFactoryPipelineAsync(string pipelineName, string ifNoneMatch = null, CancellationToken cancellationToken = default) - { - return await GetDataFactoryPipelines().GetAsync(pipelineName, ifNoneMatch, cancellationToken).ConfigureAwait(false); - } - - /// - /// Gets a pipeline. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName}/pipelines/{pipelineName} - /// - /// - /// Operation Id - /// Pipelines_Get - /// - /// - /// - /// The pipeline name. - /// ETag of the pipeline entity. Should only be specified for get. If the ETag matches the existing entity tag, or if * was provided, then no content will be returned. - /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// is null. - [ForwardsClientCalls] - public virtual Response GetDataFactoryPipeline(string pipelineName, string ifNoneMatch = null, CancellationToken cancellationToken = default) - { - return GetDataFactoryPipelines().Get(pipelineName, ifNoneMatch, cancellationToken); - } - - /// Gets a collection of DataFactoryTriggerResources in the DataFactory. - /// An object representing collection of DataFactoryTriggerResources and their operations over a DataFactoryTriggerResource. - public virtual DataFactoryTriggerCollection GetDataFactoryTriggers() - { - return GetCachedClient(Client => new DataFactoryTriggerCollection(Client, Id)); - } - - /// - /// Gets a trigger. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName}/triggers/{triggerName} - /// - /// - /// Operation Id - /// Triggers_Get - /// - /// - /// - /// The trigger name. - /// ETag of the trigger entity. Should only be specified for get. If the ETag matches the existing entity tag, or if * was provided, then no content will be returned. - /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// is null. - [ForwardsClientCalls] - public virtual async Task> GetDataFactoryTriggerAsync(string triggerName, string ifNoneMatch = null, CancellationToken cancellationToken = default) - { - return await GetDataFactoryTriggers().GetAsync(triggerName, ifNoneMatch, cancellationToken).ConfigureAwait(false); - } - - /// - /// Gets a trigger. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName}/triggers/{triggerName} - /// - /// - /// Operation Id - /// Triggers_Get - /// - /// - /// - /// The trigger name. - /// ETag of the trigger entity. Should only be specified for get. If the ETag matches the existing entity tag, or if * was provided, then no content will be returned. - /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// is null. - [ForwardsClientCalls] - public virtual Response GetDataFactoryTrigger(string triggerName, string ifNoneMatch = null, CancellationToken cancellationToken = default) - { - return GetDataFactoryTriggers().Get(triggerName, ifNoneMatch, cancellationToken); - } - - /// Gets a collection of DataFactoryDataFlowResources in the DataFactory. - /// An object representing collection of DataFactoryDataFlowResources and their operations over a DataFactoryDataFlowResource. - public virtual DataFactoryDataFlowCollection GetDataFactoryDataFlows() - { - return GetCachedClient(Client => new DataFactoryDataFlowCollection(Client, Id)); - } - - /// - /// Gets a data flow. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName}/dataflows/{dataFlowName} - /// - /// - /// Operation Id - /// DataFlows_Get - /// - /// - /// - /// The data flow name. - /// ETag of the data flow entity. Should only be specified for get. If the ETag matches the existing entity tag, or if * was provided, then no content will be returned. - /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// is null. - [ForwardsClientCalls] - public virtual async Task> GetDataFactoryDataFlowAsync(string dataFlowName, string ifNoneMatch = null, CancellationToken cancellationToken = default) - { - return await GetDataFactoryDataFlows().GetAsync(dataFlowName, ifNoneMatch, cancellationToken).ConfigureAwait(false); - } - - /// - /// Gets a data flow. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName}/dataflows/{dataFlowName} - /// - /// - /// Operation Id - /// DataFlows_Get - /// - /// - /// - /// The data flow name. - /// ETag of the data flow entity. Should only be specified for get. If the ETag matches the existing entity tag, or if * was provided, then no content will be returned. - /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// is null. - [ForwardsClientCalls] - public virtual Response GetDataFactoryDataFlow(string dataFlowName, string ifNoneMatch = null, CancellationToken cancellationToken = default) - { - return GetDataFactoryDataFlows().Get(dataFlowName, ifNoneMatch, cancellationToken); - } - - /// Gets a collection of DataFactoryManagedVirtualNetworkResources in the DataFactory. - /// An object representing collection of DataFactoryManagedVirtualNetworkResources and their operations over a DataFactoryManagedVirtualNetworkResource. - public virtual DataFactoryManagedVirtualNetworkCollection GetDataFactoryManagedVirtualNetworks() - { - return GetCachedClient(Client => new DataFactoryManagedVirtualNetworkCollection(Client, Id)); - } - - /// - /// Gets a managed Virtual Network. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName}/managedVirtualNetworks/{managedVirtualNetworkName} - /// - /// - /// Operation Id - /// ManagedVirtualNetworks_Get - /// - /// - /// - /// Managed virtual network name. - /// ETag of the managed Virtual Network entity. Should only be specified for get. If the ETag matches the existing entity tag, or if * was provided, then no content will be returned. - /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// is null. - [ForwardsClientCalls] - public virtual async Task> GetDataFactoryManagedVirtualNetworkAsync(string managedVirtualNetworkName, string ifNoneMatch = null, CancellationToken cancellationToken = default) - { - return await GetDataFactoryManagedVirtualNetworks().GetAsync(managedVirtualNetworkName, ifNoneMatch, cancellationToken).ConfigureAwait(false); - } - - /// - /// Gets a managed Virtual Network. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName}/managedVirtualNetworks/{managedVirtualNetworkName} - /// - /// - /// Operation Id - /// ManagedVirtualNetworks_Get - /// - /// - /// - /// Managed virtual network name. - /// ETag of the managed Virtual Network entity. Should only be specified for get. If the ETag matches the existing entity tag, or if * was provided, then no content will be returned. - /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// is null. - [ForwardsClientCalls] - public virtual Response GetDataFactoryManagedVirtualNetwork(string managedVirtualNetworkName, string ifNoneMatch = null, CancellationToken cancellationToken = default) - { - return GetDataFactoryManagedVirtualNetworks().Get(managedVirtualNetworkName, ifNoneMatch, cancellationToken); - } - - /// Gets a collection of DataFactoryManagedIdentityCredentialResources in the DataFactory. - /// An object representing collection of DataFactoryManagedIdentityCredentialResources and their operations over a DataFactoryManagedIdentityCredentialResource. - public virtual DataFactoryManagedIdentityCredentialCollection GetDataFactoryManagedIdentityCredentials() - { - return GetCachedClient(Client => new DataFactoryManagedIdentityCredentialCollection(Client, Id)); - } - - /// - /// Gets a credential. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName}/credentials/{credentialName} - /// - /// - /// Operation Id - /// CredentialOperations_Get - /// - /// - /// - /// Credential name. - /// ETag of the credential entity. Should only be specified for get. If the ETag matches the existing entity tag, or if * was provided, then no content will be returned. - /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// is null. - [ForwardsClientCalls] - public virtual async Task> GetDataFactoryManagedIdentityCredentialAsync(string credentialName, string ifNoneMatch = null, CancellationToken cancellationToken = default) - { - return await GetDataFactoryManagedIdentityCredentials().GetAsync(credentialName, ifNoneMatch, cancellationToken).ConfigureAwait(false); - } - - /// - /// Gets a credential. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName}/credentials/{credentialName} - /// - /// - /// Operation Id - /// CredentialOperations_Get - /// - /// - /// - /// Credential name. - /// ETag of the credential entity. Should only be specified for get. If the ETag matches the existing entity tag, or if * was provided, then no content will be returned. - /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// is null. - [ForwardsClientCalls] - public virtual Response GetDataFactoryManagedIdentityCredential(string credentialName, string ifNoneMatch = null, CancellationToken cancellationToken = default) - { - return GetDataFactoryManagedIdentityCredentials().Get(credentialName, ifNoneMatch, cancellationToken); - } - - /// Gets a collection of DataFactoryPrivateEndpointConnectionResources in the DataFactory. - /// An object representing collection of DataFactoryPrivateEndpointConnectionResources and their operations over a DataFactoryPrivateEndpointConnectionResource. - public virtual DataFactoryPrivateEndpointConnectionCollection GetDataFactoryPrivateEndpointConnections() - { - return GetCachedClient(Client => new DataFactoryPrivateEndpointConnectionCollection(Client, Id)); - } - - /// - /// Gets a private endpoint connection - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName}/privateEndpointConnections/{privateEndpointConnectionName} - /// - /// - /// Operation Id - /// PrivateEndpointConnection_Get - /// - /// - /// - /// The private endpoint connection name. - /// ETag of the private endpoint connection entity. Should only be specified for get. If the ETag matches the existing entity tag, or if * was provided, then no content will be returned. - /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// is null. - [ForwardsClientCalls] - public virtual async Task> GetDataFactoryPrivateEndpointConnectionAsync(string privateEndpointConnectionName, string ifNoneMatch = null, CancellationToken cancellationToken = default) - { - return await GetDataFactoryPrivateEndpointConnections().GetAsync(privateEndpointConnectionName, ifNoneMatch, cancellationToken).ConfigureAwait(false); - } - - /// - /// Gets a private endpoint connection - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName}/privateEndpointConnections/{privateEndpointConnectionName} - /// - /// - /// Operation Id - /// PrivateEndpointConnection_Get - /// - /// - /// - /// The private endpoint connection name. - /// ETag of the private endpoint connection entity. Should only be specified for get. If the ETag matches the existing entity tag, or if * was provided, then no content will be returned. - /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// is null. - [ForwardsClientCalls] - public virtual Response GetDataFactoryPrivateEndpointConnection(string privateEndpointConnectionName, string ifNoneMatch = null, CancellationToken cancellationToken = default) - { - return GetDataFactoryPrivateEndpointConnections().Get(privateEndpointConnectionName, ifNoneMatch, cancellationToken); - } - - /// Gets a collection of DataFactoryGlobalParameterResources in the DataFactory. - /// An object representing collection of DataFactoryGlobalParameterResources and their operations over a DataFactoryGlobalParameterResource. - public virtual DataFactoryGlobalParameterCollection GetDataFactoryGlobalParameters() - { - return GetCachedClient(Client => new DataFactoryGlobalParameterCollection(Client, Id)); - } - - /// - /// Gets a Global parameter - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName}/globalParameters/{globalParameterName} - /// - /// - /// Operation Id - /// GlobalParameters_Get - /// - /// - /// - /// The global parameter name. - /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// is null. - [ForwardsClientCalls] - public virtual async Task> GetDataFactoryGlobalParameterAsync(string globalParameterName, CancellationToken cancellationToken = default) - { - return await GetDataFactoryGlobalParameters().GetAsync(globalParameterName, cancellationToken).ConfigureAwait(false); - } - - /// - /// Gets a Global parameter - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName}/globalParameters/{globalParameterName} - /// - /// - /// Operation Id - /// GlobalParameters_Get - /// - /// - /// - /// The global parameter name. - /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// is null. - [ForwardsClientCalls] - public virtual Response GetDataFactoryGlobalParameter(string globalParameterName, CancellationToken cancellationToken = default) - { - return GetDataFactoryGlobalParameters().Get(globalParameterName, cancellationToken); - } - - /// Gets a collection of DataFactoryChangeDataCaptureResources in the DataFactory. - /// An object representing collection of DataFactoryChangeDataCaptureResources and their operations over a DataFactoryChangeDataCaptureResource. - public virtual DataFactoryChangeDataCaptureCollection GetDataFactoryChangeDataCaptures() - { - return GetCachedClient(Client => new DataFactoryChangeDataCaptureCollection(Client, Id)); - } - - /// - /// Gets a change data capture. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName}/adfcdcs/{changeDataCaptureName} - /// - /// - /// Operation Id - /// ChangeDataCapture_Get - /// - /// - /// - /// The change data capture name. - /// ETag of the change data capture entity. Should only be specified for get. If the ETag matches the existing entity tag, or if * was provided, then no content will be returned. - /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// is null. - [ForwardsClientCalls] - public virtual async Task> GetDataFactoryChangeDataCaptureAsync(string changeDataCaptureName, string ifNoneMatch = null, CancellationToken cancellationToken = default) - { - return await GetDataFactoryChangeDataCaptures().GetAsync(changeDataCaptureName, ifNoneMatch, cancellationToken).ConfigureAwait(false); - } - - /// - /// Gets a change data capture. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName}/adfcdcs/{changeDataCaptureName} - /// - /// - /// Operation Id - /// ChangeDataCapture_Get - /// - /// - /// - /// The change data capture name. - /// ETag of the change data capture entity. Should only be specified for get. If the ETag matches the existing entity tag, or if * was provided, then no content will be returned. - /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// is null. - [ForwardsClientCalls] - public virtual Response GetDataFactoryChangeDataCapture(string changeDataCaptureName, string ifNoneMatch = null, CancellationToken cancellationToken = default) - { - return GetDataFactoryChangeDataCaptures().Get(changeDataCaptureName, ifNoneMatch, cancellationToken); - } - - /// - /// Gets a factory. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName} - /// - /// - /// Operation Id - /// Factories_Get - /// - /// - /// - /// ETag of the factory entity. Should only be specified for get. If the ETag matches the existing entity tag, or if * was provided, then no content will be returned. - /// The cancellation token to use. - public virtual async Task> GetAsync(string ifNoneMatch = null, CancellationToken cancellationToken = default) - { - using var scope = _dataFactoryFactoriesClientDiagnostics.CreateScope("DataFactoryResource.Get"); - scope.Start(); - try - { - var response = await _dataFactoryFactoriesRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, ifNoneMatch, cancellationToken).ConfigureAwait(false); - if (response.Value == null) - throw new RequestFailedException(response.GetRawResponse()); - return Response.FromValue(new DataFactoryResource(Client, response.Value), response.GetRawResponse()); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Gets a factory. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName} - /// - /// - /// Operation Id - /// Factories_Get - /// - /// - /// - /// ETag of the factory entity. Should only be specified for get. If the ETag matches the existing entity tag, or if * was provided, then no content will be returned. - /// The cancellation token to use. - public virtual Response Get(string ifNoneMatch = null, CancellationToken cancellationToken = default) - { - using var scope = _dataFactoryFactoriesClientDiagnostics.CreateScope("DataFactoryResource.Get"); - scope.Start(); - try - { - var response = _dataFactoryFactoriesRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, ifNoneMatch, cancellationToken); - if (response.Value == null) - throw new RequestFailedException(response.GetRawResponse()); - return Response.FromValue(new DataFactoryResource(Client, response.Value), response.GetRawResponse()); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Deletes a factory. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName} - /// - /// - /// Operation Id - /// Factories_Delete - /// - /// - /// - /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. - /// The cancellation token to use. - public virtual async Task DeleteAsync(WaitUntil waitUntil, CancellationToken cancellationToken = default) - { - using var scope = _dataFactoryFactoriesClientDiagnostics.CreateScope("DataFactoryResource.Delete"); - scope.Start(); - try - { - var response = await _dataFactoryFactoriesRestClient.DeleteAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); - var operation = new DataFactoryArmOperation(response); - if (waitUntil == WaitUntil.Completed) - await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false); - return operation; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Deletes a factory. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName} - /// - /// - /// Operation Id - /// Factories_Delete - /// - /// - /// - /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. - /// The cancellation token to use. - public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancellationToken = default) - { - using var scope = _dataFactoryFactoriesClientDiagnostics.CreateScope("DataFactoryResource.Delete"); - scope.Start(); - try - { - var response = _dataFactoryFactoriesRestClient.Delete(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); - var operation = new DataFactoryArmOperation(response); - if (waitUntil == WaitUntil.Completed) - operation.WaitForCompletionResponse(cancellationToken); - return operation; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Updates a factory. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName} - /// - /// - /// Operation Id - /// Factories_Update - /// - /// - /// - /// The parameters for updating a factory. - /// The cancellation token to use. - /// is null. - public virtual async Task> UpdateAsync(DataFactoryPatch patch, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(patch, nameof(patch)); - - using var scope = _dataFactoryFactoriesClientDiagnostics.CreateScope("DataFactoryResource.Update"); - scope.Start(); - try - { - var response = await _dataFactoryFactoriesRestClient.UpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, patch, cancellationToken).ConfigureAwait(false); - return Response.FromValue(new DataFactoryResource(Client, response.Value), response.GetRawResponse()); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Updates a factory. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName} - /// - /// - /// Operation Id - /// Factories_Update - /// - /// - /// - /// The parameters for updating a factory. - /// The cancellation token to use. - /// is null. - public virtual Response Update(DataFactoryPatch patch, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(patch, nameof(patch)); - - using var scope = _dataFactoryFactoriesClientDiagnostics.CreateScope("DataFactoryResource.Update"); - scope.Start(); - try - { - var response = _dataFactoryFactoriesRestClient.Update(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, patch, cancellationToken); - return Response.FromValue(new DataFactoryResource(Client, response.Value), response.GetRawResponse()); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Get GitHub Access Token. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName}/getGitHubAccessToken - /// - /// - /// Operation Id - /// Factories_GetGitHubAccessToken - /// - /// - /// - /// Get GitHub access token request definition. - /// The cancellation token to use. - /// is null. - public virtual async Task> GetGitHubAccessTokenAsync(GitHubAccessTokenContent content, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(content, nameof(content)); - - using var scope = _dataFactoryFactoriesClientDiagnostics.CreateScope("DataFactoryResource.GetGitHubAccessToken"); - scope.Start(); - try - { - var response = await _dataFactoryFactoriesRestClient.GetGitHubAccessTokenAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, content, cancellationToken).ConfigureAwait(false); - return response; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Get GitHub Access Token. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName}/getGitHubAccessToken - /// - /// - /// Operation Id - /// Factories_GetGitHubAccessToken - /// - /// - /// - /// Get GitHub access token request definition. - /// The cancellation token to use. - /// is null. - public virtual Response GetGitHubAccessToken(GitHubAccessTokenContent content, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(content, nameof(content)); - - using var scope = _dataFactoryFactoriesClientDiagnostics.CreateScope("DataFactoryResource.GetGitHubAccessToken"); - scope.Start(); - try - { - var response = _dataFactoryFactoriesRestClient.GetGitHubAccessToken(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, content, cancellationToken); - return response; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Get Data Plane access. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName}/getDataPlaneAccess - /// - /// - /// Operation Id - /// Factories_GetDataPlaneAccess - /// - /// - /// - /// Data Plane user access policy definition. - /// The cancellation token to use. - /// is null. - public virtual async Task> GetDataPlaneAccessAsync(DataFactoryDataPlaneUserAccessPolicy policy, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(policy, nameof(policy)); - - using var scope = _dataFactoryFactoriesClientDiagnostics.CreateScope("DataFactoryResource.GetDataPlaneAccess"); - scope.Start(); - try - { - var response = await _dataFactoryFactoriesRestClient.GetDataPlaneAccessAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, policy, cancellationToken).ConfigureAwait(false); - return response; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Get Data Plane access. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName}/getDataPlaneAccess - /// - /// - /// Operation Id - /// Factories_GetDataPlaneAccess - /// - /// - /// - /// Data Plane user access policy definition. - /// The cancellation token to use. - /// is null. - public virtual Response GetDataPlaneAccess(DataFactoryDataPlaneUserAccessPolicy policy, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(policy, nameof(policy)); - - using var scope = _dataFactoryFactoriesClientDiagnostics.CreateScope("DataFactoryResource.GetDataPlaneAccess"); - scope.Start(); - try - { - var response = _dataFactoryFactoriesRestClient.GetDataPlaneAccess(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, policy, cancellationToken); - return response; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Get exposure control feature for specific factory. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName}/getFeatureValue - /// - /// - /// Operation Id - /// ExposureControl_GetFeatureValueByFactory - /// - /// - /// - /// The exposure control request. - /// The cancellation token to use. - /// is null. - public virtual async Task> GetExposureControlFeatureAsync(ExposureControlContent content, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(content, nameof(content)); - - using var scope = _exposureControlClientDiagnostics.CreateScope("DataFactoryResource.GetExposureControlFeature"); - scope.Start(); - try - { - var response = await _exposureControlRestClient.GetFeatureValueByFactoryAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, content, cancellationToken).ConfigureAwait(false); - return response; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Get exposure control feature for specific factory. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName}/getFeatureValue - /// - /// - /// Operation Id - /// ExposureControl_GetFeatureValueByFactory - /// - /// - /// - /// The exposure control request. - /// The cancellation token to use. - /// is null. - public virtual Response GetExposureControlFeature(ExposureControlContent content, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(content, nameof(content)); - - using var scope = _exposureControlClientDiagnostics.CreateScope("DataFactoryResource.GetExposureControlFeature"); - scope.Start(); - try - { - var response = _exposureControlRestClient.GetFeatureValueByFactory(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, content, cancellationToken); - return response; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Get list of exposure control features for specific factory. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName}/queryFeaturesValue - /// - /// - /// Operation Id - /// ExposureControl_QueryFeatureValuesByFactory - /// - /// - /// - /// The exposure control request for list of features. - /// The cancellation token to use. - /// is null. - public virtual async Task> GetExposureControlFeaturesAsync(ExposureControlBatchContent content, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(content, nameof(content)); - - using var scope = _exposureControlClientDiagnostics.CreateScope("DataFactoryResource.GetExposureControlFeatures"); - scope.Start(); - try - { - var response = await _exposureControlRestClient.QueryFeatureValuesByFactoryAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, content, cancellationToken).ConfigureAwait(false); - return response; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Get list of exposure control features for specific factory. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName}/queryFeaturesValue - /// - /// - /// Operation Id - /// ExposureControl_QueryFeatureValuesByFactory - /// - /// - /// - /// The exposure control request for list of features. - /// The cancellation token to use. - /// is null. - public virtual Response GetExposureControlFeatures(ExposureControlBatchContent content, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(content, nameof(content)); - - using var scope = _exposureControlClientDiagnostics.CreateScope("DataFactoryResource.GetExposureControlFeatures"); - scope.Start(); - try - { - var response = _exposureControlRestClient.QueryFeatureValuesByFactory(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, content, cancellationToken); - return response; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Query pipeline runs in the factory based on input filter conditions. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName}/queryPipelineRuns - /// - /// - /// Operation Id - /// PipelineRuns_QueryByFactory - /// - /// - /// - /// Parameters to filter the pipeline run. - /// The cancellation token to use. - /// is null. - /// An async collection of that may take multiple service requests to iterate over. - public virtual AsyncPageable GetPipelineRunsAsync(RunFilterContent content, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(content, nameof(content)); - - HttpMessage FirstPageRequest(int? pageSizeHint) => _pipelineRunsRestClient.CreateQueryByFactoryRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, content); - return PageableHelpers.CreateAsyncPageable(FirstPageRequest, null, DataFactoryPipelineRunInfo.DeserializeDataFactoryPipelineRunInfo, _pipelineRunsClientDiagnostics, Pipeline, "DataFactoryResource.GetPipelineRuns", "value", null, cancellationToken); - } - - /// - /// Query pipeline runs in the factory based on input filter conditions. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName}/queryPipelineRuns - /// - /// - /// Operation Id - /// PipelineRuns_QueryByFactory - /// - /// - /// - /// Parameters to filter the pipeline run. - /// The cancellation token to use. - /// is null. - /// A collection of that may take multiple service requests to iterate over. - public virtual Pageable GetPipelineRuns(RunFilterContent content, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(content, nameof(content)); - - HttpMessage FirstPageRequest(int? pageSizeHint) => _pipelineRunsRestClient.CreateQueryByFactoryRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, content); - return PageableHelpers.CreatePageable(FirstPageRequest, null, DataFactoryPipelineRunInfo.DeserializeDataFactoryPipelineRunInfo, _pipelineRunsClientDiagnostics, Pipeline, "DataFactoryResource.GetPipelineRuns", "value", null, cancellationToken); - } - - /// - /// Get a pipeline run by its run ID. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName}/pipelineruns/{runId} - /// - /// - /// Operation Id - /// PipelineRuns_Get - /// - /// - /// - /// The pipeline run identifier. - /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// is null. - public virtual async Task> GetPipelineRunAsync(string runId, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(runId, nameof(runId)); - - using var scope = _pipelineRunsClientDiagnostics.CreateScope("DataFactoryResource.GetPipelineRun"); - scope.Start(); - try - { - var response = await _pipelineRunsRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, runId, cancellationToken).ConfigureAwait(false); - return response; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Get a pipeline run by its run ID. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName}/pipelineruns/{runId} - /// - /// - /// Operation Id - /// PipelineRuns_Get - /// - /// - /// - /// The pipeline run identifier. - /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// is null. - public virtual Response GetPipelineRun(string runId, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(runId, nameof(runId)); - - using var scope = _pipelineRunsClientDiagnostics.CreateScope("DataFactoryResource.GetPipelineRun"); - scope.Start(); - try - { - var response = _pipelineRunsRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, runId, cancellationToken); - return response; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Cancel a pipeline run by its run ID. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName}/pipelineruns/{runId}/cancel - /// - /// - /// Operation Id - /// PipelineRuns_Cancel - /// - /// - /// - /// The pipeline run identifier. - /// If true, cancel all the Child pipelines that are triggered by the current pipeline. - /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// is null. - public virtual async Task CancelPipelineRunAsync(string runId, bool? isRecursive = null, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(runId, nameof(runId)); - - using var scope = _pipelineRunsClientDiagnostics.CreateScope("DataFactoryResource.CancelPipelineRun"); - scope.Start(); - try - { - var response = await _pipelineRunsRestClient.CancelAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, runId, isRecursive, cancellationToken).ConfigureAwait(false); - return response; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Cancel a pipeline run by its run ID. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName}/pipelineruns/{runId}/cancel - /// - /// - /// Operation Id - /// PipelineRuns_Cancel - /// - /// - /// - /// The pipeline run identifier. - /// If true, cancel all the Child pipelines that are triggered by the current pipeline. - /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// is null. - public virtual Response CancelPipelineRun(string runId, bool? isRecursive = null, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(runId, nameof(runId)); - - using var scope = _pipelineRunsClientDiagnostics.CreateScope("DataFactoryResource.CancelPipelineRun"); - scope.Start(); - try - { - var response = _pipelineRunsRestClient.Cancel(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, runId, isRecursive, cancellationToken); - return response; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Query activity runs based on input filter conditions. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName}/pipelineruns/{runId}/queryActivityruns - /// - /// - /// Operation Id - /// ActivityRuns_QueryByPipelineRun - /// - /// - /// - /// The pipeline run identifier. - /// Parameters to filter the activity runs. - /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// or is null. - /// An async collection of that may take multiple service requests to iterate over. - public virtual AsyncPageable GetActivityRunAsync(string runId, RunFilterContent content, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(runId, nameof(runId)); - Argument.AssertNotNull(content, nameof(content)); - - HttpMessage FirstPageRequest(int? pageSizeHint) => _activityRunsRestClient.CreateQueryByPipelineRunRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, runId, content); - return PageableHelpers.CreateAsyncPageable(FirstPageRequest, null, PipelineActivityRunInformation.DeserializePipelineActivityRunInformation, _activityRunsClientDiagnostics, Pipeline, "DataFactoryResource.GetActivityRun", "value", null, cancellationToken); - } - - /// - /// Query activity runs based on input filter conditions. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName}/pipelineruns/{runId}/queryActivityruns - /// - /// - /// Operation Id - /// ActivityRuns_QueryByPipelineRun - /// - /// - /// - /// The pipeline run identifier. - /// Parameters to filter the activity runs. - /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// or is null. - /// A collection of that may take multiple service requests to iterate over. - public virtual Pageable GetActivityRun(string runId, RunFilterContent content, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(runId, nameof(runId)); - Argument.AssertNotNull(content, nameof(content)); - - HttpMessage FirstPageRequest(int? pageSizeHint) => _activityRunsRestClient.CreateQueryByPipelineRunRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, runId, content); - return PageableHelpers.CreatePageable(FirstPageRequest, null, PipelineActivityRunInformation.DeserializePipelineActivityRunInformation, _activityRunsClientDiagnostics, Pipeline, "DataFactoryResource.GetActivityRun", "value", null, cancellationToken); - } - - /// - /// Query triggers. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName}/querytriggers - /// - /// - /// Operation Id - /// Triggers_QueryByFactory - /// - /// - /// - /// Parameters to filter the triggers. - /// The cancellation token to use. - /// is null. - /// An async collection of that may take multiple service requests to iterate over. - public virtual AsyncPageable GetTriggersAsync(TriggerFilterContent content, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(content, nameof(content)); - - HttpMessage FirstPageRequest(int? pageSizeHint) => _dataFactoryTriggerTriggersRestClient.CreateQueryByFactoryRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, content); - return PageableHelpers.CreateAsyncPageable(FirstPageRequest, null, e => new DataFactoryTriggerResource(Client, DataFactoryTriggerData.DeserializeDataFactoryTriggerData(e)), _dataFactoryTriggerTriggersClientDiagnostics, Pipeline, "DataFactoryResource.GetTriggers", "value", null, cancellationToken); - } - - /// - /// Query triggers. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName}/querytriggers - /// - /// - /// Operation Id - /// Triggers_QueryByFactory - /// - /// - /// - /// Parameters to filter the triggers. - /// The cancellation token to use. - /// is null. - /// A collection of that may take multiple service requests to iterate over. - public virtual Pageable GetTriggers(TriggerFilterContent content, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(content, nameof(content)); - - HttpMessage FirstPageRequest(int? pageSizeHint) => _dataFactoryTriggerTriggersRestClient.CreateQueryByFactoryRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, content); - return PageableHelpers.CreatePageable(FirstPageRequest, null, e => new DataFactoryTriggerResource(Client, DataFactoryTriggerData.DeserializeDataFactoryTriggerData(e)), _dataFactoryTriggerTriggersClientDiagnostics, Pipeline, "DataFactoryResource.GetTriggers", "value", null, cancellationToken); - } - - /// - /// Query trigger runs. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName}/queryTriggerRuns - /// - /// - /// Operation Id - /// TriggerRuns_QueryByFactory - /// - /// - /// - /// Parameters to filter the pipeline run. - /// The cancellation token to use. - /// is null. - /// An async collection of that may take multiple service requests to iterate over. - public virtual AsyncPageable GetTriggerRunsAsync(RunFilterContent content, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(content, nameof(content)); - - HttpMessage FirstPageRequest(int? pageSizeHint) => _triggerRunsRestClient.CreateQueryByFactoryRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, content); - return PageableHelpers.CreateAsyncPageable(FirstPageRequest, null, DataFactoryTriggerRun.DeserializeDataFactoryTriggerRun, _triggerRunsClientDiagnostics, Pipeline, "DataFactoryResource.GetTriggerRuns", "value", null, cancellationToken); - } - - /// - /// Query trigger runs. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName}/queryTriggerRuns - /// - /// - /// Operation Id - /// TriggerRuns_QueryByFactory - /// - /// - /// - /// Parameters to filter the pipeline run. - /// The cancellation token to use. - /// is null. - /// A collection of that may take multiple service requests to iterate over. - public virtual Pageable GetTriggerRuns(RunFilterContent content, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(content, nameof(content)); - - HttpMessage FirstPageRequest(int? pageSizeHint) => _triggerRunsRestClient.CreateQueryByFactoryRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, content); - return PageableHelpers.CreatePageable(FirstPageRequest, null, DataFactoryTriggerRun.DeserializeDataFactoryTriggerRun, _triggerRunsClientDiagnostics, Pipeline, "DataFactoryResource.GetTriggerRuns", "value", null, cancellationToken); - } - - /// - /// Creates a data flow debug session. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName}/createDataFlowDebugSession - /// - /// - /// Operation Id - /// DataFlowDebugSession_Create - /// - /// - /// - /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. - /// Data flow debug session definition. - /// The cancellation token to use. - /// is null. - public virtual async Task> CreateDataFlowDebugSessionAsync(WaitUntil waitUntil, DataFactoryDataFlowDebugSessionContent content, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(content, nameof(content)); - - using var scope = _dataFlowDebugSessionClientDiagnostics.CreateScope("DataFactoryResource.CreateDataFlowDebugSession"); - scope.Start(); - try - { - var response = await _dataFlowDebugSessionRestClient.CreateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, content, cancellationToken).ConfigureAwait(false); - var operation = new DataFactoryArmOperation(new DataFactoryDataFlowCreateDebugSessionResultOperationSource(), _dataFlowDebugSessionClientDiagnostics, Pipeline, _dataFlowDebugSessionRestClient.CreateCreateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, content).Request, response, OperationFinalStateVia.Location); - if (waitUntil == WaitUntil.Completed) - await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); - return operation; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Creates a data flow debug session. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName}/createDataFlowDebugSession - /// - /// - /// Operation Id - /// DataFlowDebugSession_Create - /// - /// - /// - /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. - /// Data flow debug session definition. - /// The cancellation token to use. - /// is null. - public virtual ArmOperation CreateDataFlowDebugSession(WaitUntil waitUntil, DataFactoryDataFlowDebugSessionContent content, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(content, nameof(content)); - - using var scope = _dataFlowDebugSessionClientDiagnostics.CreateScope("DataFactoryResource.CreateDataFlowDebugSession"); - scope.Start(); - try - { - var response = _dataFlowDebugSessionRestClient.Create(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, content, cancellationToken); - var operation = new DataFactoryArmOperation(new DataFactoryDataFlowCreateDebugSessionResultOperationSource(), _dataFlowDebugSessionClientDiagnostics, Pipeline, _dataFlowDebugSessionRestClient.CreateCreateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, content).Request, response, OperationFinalStateVia.Location); - if (waitUntil == WaitUntil.Completed) - operation.WaitForCompletion(cancellationToken); - return operation; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Query all active data flow debug sessions. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName}/queryDataFlowDebugSessions - /// - /// - /// Operation Id - /// DataFlowDebugSession_QueryByFactory - /// - /// - /// - /// The cancellation token to use. - /// An async collection of that may take multiple service requests to iterate over. - public virtual AsyncPageable GetDataFlowDebugSessionsAsync(CancellationToken cancellationToken = default) - { - HttpMessage FirstPageRequest(int? pageSizeHint) => _dataFlowDebugSessionRestClient.CreateQueryByFactoryRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name); - HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _dataFlowDebugSessionRestClient.CreateQueryByFactoryNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name); - return PageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, DataFlowDebugSessionInfo.DeserializeDataFlowDebugSessionInfo, _dataFlowDebugSessionClientDiagnostics, Pipeline, "DataFactoryResource.GetDataFlowDebugSessions", "value", "nextLink", cancellationToken); - } - - /// - /// Query all active data flow debug sessions. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName}/queryDataFlowDebugSessions - /// - /// - /// Operation Id - /// DataFlowDebugSession_QueryByFactory - /// - /// - /// - /// The cancellation token to use. - /// A collection of that may take multiple service requests to iterate over. - public virtual Pageable GetDataFlowDebugSessions(CancellationToken cancellationToken = default) - { - HttpMessage FirstPageRequest(int? pageSizeHint) => _dataFlowDebugSessionRestClient.CreateQueryByFactoryRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name); - HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _dataFlowDebugSessionRestClient.CreateQueryByFactoryNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name); - return PageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, DataFlowDebugSessionInfo.DeserializeDataFlowDebugSessionInfo, _dataFlowDebugSessionClientDiagnostics, Pipeline, "DataFactoryResource.GetDataFlowDebugSessions", "value", "nextLink", cancellationToken); - } - - /// - /// Add a data flow into debug session. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName}/addDataFlowToDebugSession - /// - /// - /// Operation Id - /// DataFlowDebugSession_AddDataFlow - /// - /// - /// - /// Data flow debug session definition with debug content. - /// The cancellation token to use. - /// is null. - public virtual async Task> AddDataFlowToDebugSessionAsync(DataFactoryDataFlowDebugPackageContent content, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(content, nameof(content)); - - using var scope = _dataFlowDebugSessionClientDiagnostics.CreateScope("DataFactoryResource.AddDataFlowToDebugSession"); - scope.Start(); - try - { - var response = await _dataFlowDebugSessionRestClient.AddDataFlowAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, content, cancellationToken).ConfigureAwait(false); - return response; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Add a data flow into debug session. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName}/addDataFlowToDebugSession - /// - /// - /// Operation Id - /// DataFlowDebugSession_AddDataFlow - /// - /// - /// - /// Data flow debug session definition with debug content. - /// The cancellation token to use. - /// is null. - public virtual Response AddDataFlowToDebugSession(DataFactoryDataFlowDebugPackageContent content, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(content, nameof(content)); - - using var scope = _dataFlowDebugSessionClientDiagnostics.CreateScope("DataFactoryResource.AddDataFlowToDebugSession"); - scope.Start(); - try - { - var response = _dataFlowDebugSessionRestClient.AddDataFlow(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, content, cancellationToken); - return response; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Deletes a data flow debug session. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName}/deleteDataFlowDebugSession - /// - /// - /// Operation Id - /// DataFlowDebugSession_Delete - /// - /// - /// - /// Data flow debug session definition for deletion. - /// The cancellation token to use. - /// is null. - public virtual async Task DeleteDataFlowDebugSessionAsync(DeleteDataFlowDebugSessionContent content, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(content, nameof(content)); - - using var scope = _dataFlowDebugSessionClientDiagnostics.CreateScope("DataFactoryResource.DeleteDataFlowDebugSession"); - scope.Start(); - try - { - var response = await _dataFlowDebugSessionRestClient.DeleteAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, content, cancellationToken).ConfigureAwait(false); - return response; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Deletes a data flow debug session. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName}/deleteDataFlowDebugSession - /// - /// - /// Operation Id - /// DataFlowDebugSession_Delete - /// - /// - /// - /// Data flow debug session definition for deletion. - /// The cancellation token to use. - /// is null. - public virtual Response DeleteDataFlowDebugSession(DeleteDataFlowDebugSessionContent content, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(content, nameof(content)); - - using var scope = _dataFlowDebugSessionClientDiagnostics.CreateScope("DataFactoryResource.DeleteDataFlowDebugSession"); - scope.Start(); - try - { - var response = _dataFlowDebugSessionRestClient.Delete(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, content, cancellationToken); - return response; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Execute a data flow debug command. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName}/executeDataFlowDebugCommand - /// - /// - /// Operation Id - /// DataFlowDebugSession_ExecuteCommand - /// - /// - /// - /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. - /// Data flow debug command definition. - /// The cancellation token to use. - /// is null. - public virtual async Task> ExecuteDataFlowDebugSessionCommandAsync(WaitUntil waitUntil, DataFlowDebugCommandContent content, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(content, nameof(content)); - - using var scope = _dataFlowDebugSessionClientDiagnostics.CreateScope("DataFactoryResource.ExecuteDataFlowDebugSessionCommand"); - scope.Start(); - try - { - var response = await _dataFlowDebugSessionRestClient.ExecuteCommandAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, content, cancellationToken).ConfigureAwait(false); - var operation = new DataFactoryArmOperation(new DataFactoryDataFlowDebugCommandResultOperationSource(), _dataFlowDebugSessionClientDiagnostics, Pipeline, _dataFlowDebugSessionRestClient.CreateExecuteCommandRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, content).Request, response, OperationFinalStateVia.Location); - if (waitUntil == WaitUntil.Completed) - await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); - return operation; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Execute a data flow debug command. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName}/executeDataFlowDebugCommand - /// - /// - /// Operation Id - /// DataFlowDebugSession_ExecuteCommand - /// - /// - /// - /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. - /// Data flow debug command definition. - /// The cancellation token to use. - /// is null. - public virtual ArmOperation ExecuteDataFlowDebugSessionCommand(WaitUntil waitUntil, DataFlowDebugCommandContent content, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(content, nameof(content)); - - using var scope = _dataFlowDebugSessionClientDiagnostics.CreateScope("DataFactoryResource.ExecuteDataFlowDebugSessionCommand"); - scope.Start(); - try - { - var response = _dataFlowDebugSessionRestClient.ExecuteCommand(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, content, cancellationToken); - var operation = new DataFactoryArmOperation(new DataFactoryDataFlowDebugCommandResultOperationSource(), _dataFlowDebugSessionClientDiagnostics, Pipeline, _dataFlowDebugSessionRestClient.CreateExecuteCommandRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, content).Request, response, OperationFinalStateVia.Location); - if (waitUntil == WaitUntil.Completed) - operation.WaitForCompletion(cancellationToken); - return operation; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Gets the private link resources - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName}/privateLinkResources - /// - /// - /// Operation Id - /// privateLinkResources_Get - /// - /// - /// - /// The cancellation token to use. - /// An async collection of that may take multiple service requests to iterate over. - public virtual AsyncPageable GetPrivateLinkResourcesAsync(CancellationToken cancellationToken = default) - { - HttpMessage FirstPageRequest(int? pageSizeHint) => _privateLinkResourcesRestClient.CreateGetRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name); - return PageableHelpers.CreateAsyncPageable(FirstPageRequest, null, DataFactoryPrivateLinkResource.DeserializeDataFactoryPrivateLinkResource, _privateLinkResourcesClientDiagnostics, Pipeline, "DataFactoryResource.GetPrivateLinkResources", "value", null, cancellationToken); - } - - /// - /// Gets the private link resources - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName}/privateLinkResources - /// - /// - /// Operation Id - /// privateLinkResources_Get - /// - /// - /// - /// The cancellation token to use. - /// A collection of that may take multiple service requests to iterate over. - public virtual Pageable GetPrivateLinkResources(CancellationToken cancellationToken = default) - { - HttpMessage FirstPageRequest(int? pageSizeHint) => _privateLinkResourcesRestClient.CreateGetRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name); - return PageableHelpers.CreatePageable(FirstPageRequest, null, DataFactoryPrivateLinkResource.DeserializeDataFactoryPrivateLinkResource, _privateLinkResourcesClientDiagnostics, Pipeline, "DataFactoryResource.GetPrivateLinkResources", "value", null, cancellationToken); - } - - /// - /// Add a tag to the current resource. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName} - /// - /// - /// Operation Id - /// Factories_Get - /// - /// - /// - /// The key for the tag. - /// The value for the tag. - /// The cancellation token to use. - /// or is null. - public virtual async Task> AddTagAsync(string key, string value, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(key, nameof(key)); - Argument.AssertNotNull(value, nameof(value)); - - using var scope = _dataFactoryFactoriesClientDiagnostics.CreateScope("DataFactoryResource.AddTag"); - scope.Start(); - try - { - if (await CanUseTagResourceAsync(cancellationToken: cancellationToken).ConfigureAwait(false)) - { - var originalTags = await GetTagResource().GetAsync(cancellationToken).ConfigureAwait(false); - originalTags.Value.Data.TagValues[key] = value; - await GetTagResource().CreateOrUpdateAsync(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken).ConfigureAwait(false); - var originalResponse = await _dataFactoryFactoriesRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, null, cancellationToken).ConfigureAwait(false); - return Response.FromValue(new DataFactoryResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); - } - else - { - var current = (await GetAsync(cancellationToken: cancellationToken).ConfigureAwait(false)).Value.Data; - var patch = new DataFactoryPatch(); - foreach (var tag in current.Tags) - { - patch.Tags.Add(tag); - } - patch.Tags[key] = value; - var result = await UpdateAsync(patch, cancellationToken: cancellationToken).ConfigureAwait(false); - return result; - } - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Add a tag to the current resource. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName} - /// - /// - /// Operation Id - /// Factories_Get - /// - /// - /// - /// The key for the tag. - /// The value for the tag. - /// The cancellation token to use. - /// or is null. - public virtual Response AddTag(string key, string value, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(key, nameof(key)); - Argument.AssertNotNull(value, nameof(value)); - - using var scope = _dataFactoryFactoriesClientDiagnostics.CreateScope("DataFactoryResource.AddTag"); - scope.Start(); - try - { - if (CanUseTagResource(cancellationToken: cancellationToken)) - { - var originalTags = GetTagResource().Get(cancellationToken); - originalTags.Value.Data.TagValues[key] = value; - GetTagResource().CreateOrUpdate(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken); - var originalResponse = _dataFactoryFactoriesRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, null, cancellationToken); - return Response.FromValue(new DataFactoryResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); - } - else - { - var current = Get(cancellationToken: cancellationToken).Value.Data; - var patch = new DataFactoryPatch(); - foreach (var tag in current.Tags) - { - patch.Tags.Add(tag); - } - patch.Tags[key] = value; - var result = Update(patch, cancellationToken: cancellationToken); - return result; - } - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Replace the tags on the resource with the given set. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName} - /// - /// - /// Operation Id - /// Factories_Get - /// - /// - /// - /// The set of tags to use as replacement. - /// The cancellation token to use. - /// is null. - public virtual async Task> SetTagsAsync(IDictionary tags, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(tags, nameof(tags)); - - using var scope = _dataFactoryFactoriesClientDiagnostics.CreateScope("DataFactoryResource.SetTags"); - scope.Start(); - try - { - if (await CanUseTagResourceAsync(cancellationToken: cancellationToken).ConfigureAwait(false)) - { - await GetTagResource().DeleteAsync(WaitUntil.Completed, cancellationToken: cancellationToken).ConfigureAwait(false); - var originalTags = await GetTagResource().GetAsync(cancellationToken).ConfigureAwait(false); - originalTags.Value.Data.TagValues.ReplaceWith(tags); - await GetTagResource().CreateOrUpdateAsync(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken).ConfigureAwait(false); - var originalResponse = await _dataFactoryFactoriesRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, null, cancellationToken).ConfigureAwait(false); - return Response.FromValue(new DataFactoryResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); - } - else - { - var current = (await GetAsync(cancellationToken: cancellationToken).ConfigureAwait(false)).Value.Data; - var patch = new DataFactoryPatch(); - patch.Tags.ReplaceWith(tags); - var result = await UpdateAsync(patch, cancellationToken: cancellationToken).ConfigureAwait(false); - return result; - } - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Replace the tags on the resource with the given set. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName} - /// - /// - /// Operation Id - /// Factories_Get - /// - /// - /// - /// The set of tags to use as replacement. - /// The cancellation token to use. - /// is null. - public virtual Response SetTags(IDictionary tags, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(tags, nameof(tags)); - - using var scope = _dataFactoryFactoriesClientDiagnostics.CreateScope("DataFactoryResource.SetTags"); - scope.Start(); - try - { - if (CanUseTagResource(cancellationToken: cancellationToken)) - { - GetTagResource().Delete(WaitUntil.Completed, cancellationToken: cancellationToken); - var originalTags = GetTagResource().Get(cancellationToken); - originalTags.Value.Data.TagValues.ReplaceWith(tags); - GetTagResource().CreateOrUpdate(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken); - var originalResponse = _dataFactoryFactoriesRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, null, cancellationToken); - return Response.FromValue(new DataFactoryResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); - } - else - { - var current = Get(cancellationToken: cancellationToken).Value.Data; - var patch = new DataFactoryPatch(); - patch.Tags.ReplaceWith(tags); - var result = Update(patch, cancellationToken: cancellationToken); - return result; - } - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Removes a tag by key from the resource. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName} - /// - /// - /// Operation Id - /// Factories_Get - /// - /// - /// - /// The key for the tag. - /// The cancellation token to use. - /// is null. - public virtual async Task> RemoveTagAsync(string key, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(key, nameof(key)); - - using var scope = _dataFactoryFactoriesClientDiagnostics.CreateScope("DataFactoryResource.RemoveTag"); - scope.Start(); - try - { - if (await CanUseTagResourceAsync(cancellationToken: cancellationToken).ConfigureAwait(false)) - { - var originalTags = await GetTagResource().GetAsync(cancellationToken).ConfigureAwait(false); - originalTags.Value.Data.TagValues.Remove(key); - await GetTagResource().CreateOrUpdateAsync(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken).ConfigureAwait(false); - var originalResponse = await _dataFactoryFactoriesRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, null, cancellationToken).ConfigureAwait(false); - return Response.FromValue(new DataFactoryResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); - } - else - { - var current = (await GetAsync(cancellationToken: cancellationToken).ConfigureAwait(false)).Value.Data; - var patch = new DataFactoryPatch(); - foreach (var tag in current.Tags) - { - patch.Tags.Add(tag); - } - patch.Tags.Remove(key); - var result = await UpdateAsync(patch, cancellationToken: cancellationToken).ConfigureAwait(false); - return result; - } - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Removes a tag by key from the resource. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName} - /// - /// - /// Operation Id - /// Factories_Get - /// - /// - /// - /// The key for the tag. - /// The cancellation token to use. - /// is null. - public virtual Response RemoveTag(string key, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(key, nameof(key)); - - using var scope = _dataFactoryFactoriesClientDiagnostics.CreateScope("DataFactoryResource.RemoveTag"); - scope.Start(); - try - { - if (CanUseTagResource(cancellationToken: cancellationToken)) - { - var originalTags = GetTagResource().Get(cancellationToken); - originalTags.Value.Data.TagValues.Remove(key); - GetTagResource().CreateOrUpdate(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken); - var originalResponse = _dataFactoryFactoriesRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, null, cancellationToken); - return Response.FromValue(new DataFactoryResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); - } - else - { - var current = Get(cancellationToken: cancellationToken).Value.Data; - var patch = new DataFactoryPatch(); - foreach (var tag in current.Tags) - { - patch.Tags.Add(tag); - } - patch.Tags.Remove(key); - var result = Update(patch, cancellationToken: cancellationToken); - return result; - } - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/DataFactoryTriggerCollection.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/DataFactoryTriggerCollection.cs deleted file mode 100644 index d49193e6..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/DataFactoryTriggerCollection.cs +++ /dev/null @@ -1,337 +0,0 @@ -// - -#nullable disable - -using System.Collections; -using System.Globalization; -using Azure.Core; -using Azure.Core.Pipeline; - -namespace Azure.ResourceManager.DataFactory -{ - /// - /// A class representing a collection of and their operations. - /// Each in the collection will belong to the same instance of . - /// To get a instance call the GetDataFactoryTriggers method from an instance of . - /// - public partial class DataFactoryTriggerCollection : ArmCollection, IEnumerable, IAsyncEnumerable - { - private readonly ClientDiagnostics _dataFactoryTriggerTriggersClientDiagnostics; - private readonly TriggersRestOperations _dataFactoryTriggerTriggersRestClient; - - /// Initializes a new instance of the class for mocking. - protected DataFactoryTriggerCollection() - { - } - - /// Initializes a new instance of the class. - /// The client parameters to use in these operations. - /// The identifier of the parent resource that is the target of operations. - internal DataFactoryTriggerCollection(ArmClient client, ResourceIdentifier id) : base(client, id) - { - _dataFactoryTriggerTriggersClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.DataFactory", DataFactoryTriggerResource.ResourceType.Namespace, Diagnostics); - TryGetApiVersion(DataFactoryTriggerResource.ResourceType, out string dataFactoryTriggerTriggersApiVersion); - _dataFactoryTriggerTriggersRestClient = new TriggersRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, dataFactoryTriggerTriggersApiVersion); -#if DEBUG - ValidateResourceId(Id); -#endif - } - - internal static void ValidateResourceId(ResourceIdentifier id) - { - if (id.ResourceType != DataFactoryResource.ResourceType) - throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, DataFactoryResource.ResourceType), nameof(id)); - } - - /// - /// Creates or updates a trigger. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName}/triggers/{triggerName} - /// - /// - /// Operation Id - /// Triggers_CreateOrUpdate - /// - /// - /// - /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. - /// The trigger name. - /// Trigger resource definition. - /// ETag of the trigger entity. Should only be specified for update, for which it should match existing entity or can be * for unconditional update. - /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// or is null. - public virtual async Task> CreateOrUpdateAsync(WaitUntil waitUntil, string triggerName, DataFactoryTriggerData data, string ifMatch = null, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(triggerName, nameof(triggerName)); - Argument.AssertNotNull(data, nameof(data)); - - using var scope = _dataFactoryTriggerTriggersClientDiagnostics.CreateScope("DataFactoryTriggerCollection.CreateOrUpdate"); - scope.Start(); - try - { - var response = await _dataFactoryTriggerTriggersRestClient.CreateOrUpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, triggerName, data, ifMatch, cancellationToken).ConfigureAwait(false); - var operation = new DataFactoryArmOperation(Response.FromValue(new DataFactoryTriggerResource(Client, response), response.GetRawResponse())); - if (waitUntil == WaitUntil.Completed) - await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); - return operation; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Creates or updates a trigger. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName}/triggers/{triggerName} - /// - /// - /// Operation Id - /// Triggers_CreateOrUpdate - /// - /// - /// - /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. - /// The trigger name. - /// Trigger resource definition. - /// ETag of the trigger entity. Should only be specified for update, for which it should match existing entity or can be * for unconditional update. - /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// or is null. - public virtual ArmOperation CreateOrUpdate(WaitUntil waitUntil, string triggerName, DataFactoryTriggerData data, string ifMatch = null, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(triggerName, nameof(triggerName)); - Argument.AssertNotNull(data, nameof(data)); - - using var scope = _dataFactoryTriggerTriggersClientDiagnostics.CreateScope("DataFactoryTriggerCollection.CreateOrUpdate"); - scope.Start(); - try - { - var response = _dataFactoryTriggerTriggersRestClient.CreateOrUpdate(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, triggerName, data, ifMatch, cancellationToken); - var operation = new DataFactoryArmOperation(Response.FromValue(new DataFactoryTriggerResource(Client, response), response.GetRawResponse())); - if (waitUntil == WaitUntil.Completed) - operation.WaitForCompletion(cancellationToken); - return operation; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Gets a trigger. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName}/triggers/{triggerName} - /// - /// - /// Operation Id - /// Triggers_Get - /// - /// - /// - /// The trigger name. - /// ETag of the trigger entity. Should only be specified for get. If the ETag matches the existing entity tag, or if * was provided, then no content will be returned. - /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// is null. - public virtual async Task> GetAsync(string triggerName, string ifNoneMatch = null, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(triggerName, nameof(triggerName)); - - using var scope = _dataFactoryTriggerTriggersClientDiagnostics.CreateScope("DataFactoryTriggerCollection.Get"); - scope.Start(); - try - { - var response = await _dataFactoryTriggerTriggersRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, triggerName, ifNoneMatch, cancellationToken).ConfigureAwait(false); - if (response.Value == null) - throw new RequestFailedException(response.GetRawResponse()); - return Response.FromValue(new DataFactoryTriggerResource(Client, response.Value), response.GetRawResponse()); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Gets a trigger. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName}/triggers/{triggerName} - /// - /// - /// Operation Id - /// Triggers_Get - /// - /// - /// - /// The trigger name. - /// ETag of the trigger entity. Should only be specified for get. If the ETag matches the existing entity tag, or if * was provided, then no content will be returned. - /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// is null. - public virtual Response Get(string triggerName, string ifNoneMatch = null, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(triggerName, nameof(triggerName)); - - using var scope = _dataFactoryTriggerTriggersClientDiagnostics.CreateScope("DataFactoryTriggerCollection.Get"); - scope.Start(); - try - { - var response = _dataFactoryTriggerTriggersRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, triggerName, ifNoneMatch, cancellationToken); - if (response.Value == null) - throw new RequestFailedException(response.GetRawResponse()); - return Response.FromValue(new DataFactoryTriggerResource(Client, response.Value), response.GetRawResponse()); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Lists triggers. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName}/triggers - /// - /// - /// Operation Id - /// Triggers_ListByFactory - /// - /// - /// - /// The cancellation token to use. - /// An async collection of that may take multiple service requests to iterate over. - public virtual AsyncPageable GetAllAsync(CancellationToken cancellationToken = default) - { - HttpMessage FirstPageRequest(int? pageSizeHint) => _dataFactoryTriggerTriggersRestClient.CreateListByFactoryRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name); - HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _dataFactoryTriggerTriggersRestClient.CreateListByFactoryNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name); - return PageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new DataFactoryTriggerResource(Client, DataFactoryTriggerData.DeserializeDataFactoryTriggerData(e)), _dataFactoryTriggerTriggersClientDiagnostics, Pipeline, "DataFactoryTriggerCollection.GetAll", "value", "nextLink", cancellationToken); - } - - /// - /// Lists triggers. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName}/triggers - /// - /// - /// Operation Id - /// Triggers_ListByFactory - /// - /// - /// - /// The cancellation token to use. - /// A collection of that may take multiple service requests to iterate over. - public virtual Pageable GetAll(CancellationToken cancellationToken = default) - { - HttpMessage FirstPageRequest(int? pageSizeHint) => _dataFactoryTriggerTriggersRestClient.CreateListByFactoryRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name); - HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _dataFactoryTriggerTriggersRestClient.CreateListByFactoryNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name); - return PageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new DataFactoryTriggerResource(Client, DataFactoryTriggerData.DeserializeDataFactoryTriggerData(e)), _dataFactoryTriggerTriggersClientDiagnostics, Pipeline, "DataFactoryTriggerCollection.GetAll", "value", "nextLink", cancellationToken); - } - - /// - /// Checks to see if the resource exists in azure. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName}/triggers/{triggerName} - /// - /// - /// Operation Id - /// Triggers_Get - /// - /// - /// - /// The trigger name. - /// ETag of the trigger entity. Should only be specified for get. If the ETag matches the existing entity tag, or if * was provided, then no content will be returned. - /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// is null. - public virtual async Task> ExistsAsync(string triggerName, string ifNoneMatch = null, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(triggerName, nameof(triggerName)); - - using var scope = _dataFactoryTriggerTriggersClientDiagnostics.CreateScope("DataFactoryTriggerCollection.Exists"); - scope.Start(); - try - { - var response = await _dataFactoryTriggerTriggersRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, triggerName, ifNoneMatch, cancellationToken: cancellationToken).ConfigureAwait(false); - return Response.FromValue(response.Value != null, response.GetRawResponse()); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Checks to see if the resource exists in azure. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName}/triggers/{triggerName} - /// - /// - /// Operation Id - /// Triggers_Get - /// - /// - /// - /// The trigger name. - /// ETag of the trigger entity. Should only be specified for get. If the ETag matches the existing entity tag, or if * was provided, then no content will be returned. - /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// is null. - public virtual Response Exists(string triggerName, string ifNoneMatch = null, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(triggerName, nameof(triggerName)); - - using var scope = _dataFactoryTriggerTriggersClientDiagnostics.CreateScope("DataFactoryTriggerCollection.Exists"); - scope.Start(); - try - { - var response = _dataFactoryTriggerTriggersRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, triggerName, ifNoneMatch, cancellationToken: cancellationToken); - return Response.FromValue(response.Value != null, response.GetRawResponse()); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - IEnumerator IEnumerable.GetEnumerator() - { - return GetAll().GetEnumerator(); - } - - IEnumerator IEnumerable.GetEnumerator() - { - return GetAll().GetEnumerator(); - } - - IAsyncEnumerator IAsyncEnumerable.GetAsyncEnumerator(CancellationToken cancellationToken) - { - return GetAllAsync(cancellationToken: cancellationToken).GetAsyncEnumerator(cancellationToken); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/DataFactoryTriggerData.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/DataFactoryTriggerData.cs deleted file mode 100644 index cdef537e..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/DataFactoryTriggerData.cs +++ /dev/null @@ -1,57 +0,0 @@ -// - -#nullable disable - -using Azure.Core; -using AzureDataFactory.TestingFramework.Models; -using Azure.ResourceManager.Models; - -namespace Azure.ResourceManager.DataFactory -{ - /// - /// A class representing the DataFactoryTrigger data model. - /// Trigger resource type. - /// - public partial class DataFactoryTriggerData : ResourceData - { - /// Initializes a new instance of DataFactoryTriggerData. - /// - /// Properties of the trigger. - /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. - /// The available derived classes include , , , , , , and . - /// - /// is null. - public DataFactoryTriggerData(DataFactoryTriggerProperties properties) - { - Argument.AssertNotNull(properties, nameof(properties)); - - Properties = properties; - } - - /// Initializes a new instance of DataFactoryTriggerData. - /// The id. - /// The name. - /// The resourceType. - /// The systemData. - /// - /// Properties of the trigger. - /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. - /// The available derived classes include , , , , , , and . - /// - /// Etag identifies change in the resource. - internal DataFactoryTriggerData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, DataFactoryTriggerProperties properties, ETag? eTag) : base(id, name, resourceType, systemData) - { - Properties = properties; - ETag = eTag; - } - - /// - /// Properties of the trigger. - /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. - /// The available derived classes include , , , , , , and . - /// - public DataFactoryTriggerProperties Properties { get; set; } - /// Etag identifies change in the resource. - public ETag? ETag { get; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/DataFactoryTriggerResource.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/DataFactoryTriggerResource.cs deleted file mode 100644 index 3b51f335..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/DataFactoryTriggerResource.cs +++ /dev/null @@ -1,770 +0,0 @@ -// - -#nullable disable - -using System.Globalization; -using Azure.Core; -using Azure.Core.Pipeline; -using AzureDataFactory.TestingFramework.Models; - -namespace Azure.ResourceManager.DataFactory -{ - /// - /// A Class representing a DataFactoryTrigger along with the instance operations that can be performed on it. - /// If you have a you can construct a - /// from an instance of using the GetDataFactoryTriggerResource method. - /// Otherwise you can get one from its parent resource using the GetDataFactoryTrigger method. - /// - public partial class DataFactoryTriggerResource : ArmResource - { - /// Generate the resource identifier of a instance. - public static ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string factoryName, string triggerName) - { - var resourceId = $"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName}/triggers/{triggerName}"; - return new ResourceIdentifier(resourceId); - } - - private readonly ClientDiagnostics _dataFactoryTriggerTriggersClientDiagnostics; - private readonly TriggersRestOperations _dataFactoryTriggerTriggersRestClient; - private readonly ClientDiagnostics _triggerRunsClientDiagnostics; - private readonly TriggerRunsRestOperations _triggerRunsRestClient; - private readonly DataFactoryTriggerData _data; - - /// Initializes a new instance of the class for mocking. - protected DataFactoryTriggerResource() - { - } - - /// Initializes a new instance of the class. - /// The client parameters to use in these operations. - /// The resource that is the target of operations. - internal DataFactoryTriggerResource(ArmClient client, DataFactoryTriggerData data) : this(client, data.Id) - { - HasData = true; - _data = data; - } - - /// Initializes a new instance of the class. - /// The client parameters to use in these operations. - /// The identifier of the resource that is the target of operations. - internal DataFactoryTriggerResource(ArmClient client, ResourceIdentifier id) : base(client, id) - { - _dataFactoryTriggerTriggersClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.DataFactory", ResourceType.Namespace, Diagnostics); - TryGetApiVersion(ResourceType, out string dataFactoryTriggerTriggersApiVersion); - _dataFactoryTriggerTriggersRestClient = new TriggersRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, dataFactoryTriggerTriggersApiVersion); - _triggerRunsClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.DataFactory", ProviderConstants.DefaultProviderNamespace, Diagnostics); - _triggerRunsRestClient = new TriggerRunsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint); -#if DEBUG - ValidateResourceId(Id); -#endif - } - - /// Gets the resource type for the operations. - public static readonly ResourceType ResourceType = "Microsoft.DataFactory/factories/triggers"; - - /// Gets whether or not the current instance has data. - public virtual bool HasData { get; } - - /// Gets the data representing this Feature. - /// Throws if there is no data loaded in the current instance. - public virtual DataFactoryTriggerData Data - { - get - { - if (!HasData) - throw new InvalidOperationException("The current instance does not have data, you must call Get first."); - return _data; - } - } - - internal static void ValidateResourceId(ResourceIdentifier id) - { - if (id.ResourceType != ResourceType) - throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, ResourceType), nameof(id)); - } - - /// - /// Gets a trigger. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName}/triggers/{triggerName} - /// - /// - /// Operation Id - /// Triggers_Get - /// - /// - /// - /// ETag of the trigger entity. Should only be specified for get. If the ETag matches the existing entity tag, or if * was provided, then no content will be returned. - /// The cancellation token to use. - public virtual async Task> GetAsync(string ifNoneMatch = null, CancellationToken cancellationToken = default) - { - using var scope = _dataFactoryTriggerTriggersClientDiagnostics.CreateScope("DataFactoryTriggerResource.Get"); - scope.Start(); - try - { - var response = await _dataFactoryTriggerTriggersRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, ifNoneMatch, cancellationToken).ConfigureAwait(false); - if (response.Value == null) - throw new RequestFailedException(response.GetRawResponse()); - return Response.FromValue(new DataFactoryTriggerResource(Client, response.Value), response.GetRawResponse()); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Gets a trigger. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName}/triggers/{triggerName} - /// - /// - /// Operation Id - /// Triggers_Get - /// - /// - /// - /// ETag of the trigger entity. Should only be specified for get. If the ETag matches the existing entity tag, or if * was provided, then no content will be returned. - /// The cancellation token to use. - public virtual Response Get(string ifNoneMatch = null, CancellationToken cancellationToken = default) - { - using var scope = _dataFactoryTriggerTriggersClientDiagnostics.CreateScope("DataFactoryTriggerResource.Get"); - scope.Start(); - try - { - var response = _dataFactoryTriggerTriggersRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, ifNoneMatch, cancellationToken); - if (response.Value == null) - throw new RequestFailedException(response.GetRawResponse()); - return Response.FromValue(new DataFactoryTriggerResource(Client, response.Value), response.GetRawResponse()); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Deletes a trigger. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName}/triggers/{triggerName} - /// - /// - /// Operation Id - /// Triggers_Delete - /// - /// - /// - /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. - /// The cancellation token to use. - public virtual async Task DeleteAsync(WaitUntil waitUntil, CancellationToken cancellationToken = default) - { - using var scope = _dataFactoryTriggerTriggersClientDiagnostics.CreateScope("DataFactoryTriggerResource.Delete"); - scope.Start(); - try - { - var response = await _dataFactoryTriggerTriggersRestClient.DeleteAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); - var operation = new DataFactoryArmOperation(response); - if (waitUntil == WaitUntil.Completed) - await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false); - return operation; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Deletes a trigger. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName}/triggers/{triggerName} - /// - /// - /// Operation Id - /// Triggers_Delete - /// - /// - /// - /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. - /// The cancellation token to use. - public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancellationToken = default) - { - using var scope = _dataFactoryTriggerTriggersClientDiagnostics.CreateScope("DataFactoryTriggerResource.Delete"); - scope.Start(); - try - { - var response = _dataFactoryTriggerTriggersRestClient.Delete(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); - var operation = new DataFactoryArmOperation(response); - if (waitUntil == WaitUntil.Completed) - operation.WaitForCompletionResponse(cancellationToken); - return operation; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Creates or updates a trigger. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName}/triggers/{triggerName} - /// - /// - /// Operation Id - /// Triggers_CreateOrUpdate - /// - /// - /// - /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. - /// Trigger resource definition. - /// ETag of the trigger entity. Should only be specified for update, for which it should match existing entity or can be * for unconditional update. - /// The cancellation token to use. - /// is null. - public virtual async Task> UpdateAsync(WaitUntil waitUntil, DataFactoryTriggerData data, string ifMatch = null, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(data, nameof(data)); - - using var scope = _dataFactoryTriggerTriggersClientDiagnostics.CreateScope("DataFactoryTriggerResource.Update"); - scope.Start(); - try - { - var response = await _dataFactoryTriggerTriggersRestClient.CreateOrUpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data, ifMatch, cancellationToken).ConfigureAwait(false); - var operation = new DataFactoryArmOperation(Response.FromValue(new DataFactoryTriggerResource(Client, response), response.GetRawResponse())); - if (waitUntil == WaitUntil.Completed) - await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); - return operation; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Creates or updates a trigger. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName}/triggers/{triggerName} - /// - /// - /// Operation Id - /// Triggers_CreateOrUpdate - /// - /// - /// - /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. - /// Trigger resource definition. - /// ETag of the trigger entity. Should only be specified for update, for which it should match existing entity or can be * for unconditional update. - /// The cancellation token to use. - /// is null. - public virtual ArmOperation Update(WaitUntil waitUntil, DataFactoryTriggerData data, string ifMatch = null, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(data, nameof(data)); - - using var scope = _dataFactoryTriggerTriggersClientDiagnostics.CreateScope("DataFactoryTriggerResource.Update"); - scope.Start(); - try - { - var response = _dataFactoryTriggerTriggersRestClient.CreateOrUpdate(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data, ifMatch, cancellationToken); - var operation = new DataFactoryArmOperation(Response.FromValue(new DataFactoryTriggerResource(Client, response), response.GetRawResponse())); - if (waitUntil == WaitUntil.Completed) - operation.WaitForCompletion(cancellationToken); - return operation; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Subscribe event trigger to events. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName}/triggers/{triggerName}/subscribeToEvents - /// - /// - /// Operation Id - /// Triggers_SubscribeToEvents - /// - /// - /// - /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. - /// The cancellation token to use. - public virtual async Task> SubscribeToEventsAsync(WaitUntil waitUntil, CancellationToken cancellationToken = default) - { - using var scope = _dataFactoryTriggerTriggersClientDiagnostics.CreateScope("DataFactoryTriggerResource.SubscribeToEvents"); - scope.Start(); - try - { - var response = await _dataFactoryTriggerTriggersRestClient.SubscribeToEventsAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); - var operation = new DataFactoryArmOperation(new DataFactoryTriggerSubscriptionOperationResultOperationSource(), _dataFactoryTriggerTriggersClientDiagnostics, Pipeline, _dataFactoryTriggerTriggersRestClient.CreateSubscribeToEventsRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name).Request, response, OperationFinalStateVia.Location); - if (waitUntil == WaitUntil.Completed) - await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); - return operation; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Subscribe event trigger to events. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName}/triggers/{triggerName}/subscribeToEvents - /// - /// - /// Operation Id - /// Triggers_SubscribeToEvents - /// - /// - /// - /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. - /// The cancellation token to use. - public virtual ArmOperation SubscribeToEvents(WaitUntil waitUntil, CancellationToken cancellationToken = default) - { - using var scope = _dataFactoryTriggerTriggersClientDiagnostics.CreateScope("DataFactoryTriggerResource.SubscribeToEvents"); - scope.Start(); - try - { - var response = _dataFactoryTriggerTriggersRestClient.SubscribeToEvents(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); - var operation = new DataFactoryArmOperation(new DataFactoryTriggerSubscriptionOperationResultOperationSource(), _dataFactoryTriggerTriggersClientDiagnostics, Pipeline, _dataFactoryTriggerTriggersRestClient.CreateSubscribeToEventsRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name).Request, response, OperationFinalStateVia.Location); - if (waitUntil == WaitUntil.Completed) - operation.WaitForCompletion(cancellationToken); - return operation; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Get a trigger's event subscription status. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName}/triggers/{triggerName}/getEventSubscriptionStatus - /// - /// - /// Operation Id - /// Triggers_GetEventSubscriptionStatus - /// - /// - /// - /// The cancellation token to use. - public virtual async Task> GetEventSubscriptionStatusAsync(CancellationToken cancellationToken = default) - { - using var scope = _dataFactoryTriggerTriggersClientDiagnostics.CreateScope("DataFactoryTriggerResource.GetEventSubscriptionStatus"); - scope.Start(); - try - { - var response = await _dataFactoryTriggerTriggersRestClient.GetEventSubscriptionStatusAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); - return response; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Get a trigger's event subscription status. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName}/triggers/{triggerName}/getEventSubscriptionStatus - /// - /// - /// Operation Id - /// Triggers_GetEventSubscriptionStatus - /// - /// - /// - /// The cancellation token to use. - public virtual Response GetEventSubscriptionStatus(CancellationToken cancellationToken = default) - { - using var scope = _dataFactoryTriggerTriggersClientDiagnostics.CreateScope("DataFactoryTriggerResource.GetEventSubscriptionStatus"); - scope.Start(); - try - { - var response = _dataFactoryTriggerTriggersRestClient.GetEventSubscriptionStatus(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); - return response; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Unsubscribe event trigger from events. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName}/triggers/{triggerName}/unsubscribeFromEvents - /// - /// - /// Operation Id - /// Triggers_UnsubscribeFromEvents - /// - /// - /// - /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. - /// The cancellation token to use. - public virtual async Task> UnsubscribeFromEventsAsync(WaitUntil waitUntil, CancellationToken cancellationToken = default) - { - using var scope = _dataFactoryTriggerTriggersClientDiagnostics.CreateScope("DataFactoryTriggerResource.UnsubscribeFromEvents"); - scope.Start(); - try - { - var response = await _dataFactoryTriggerTriggersRestClient.UnsubscribeFromEventsAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); - var operation = new DataFactoryArmOperation(new DataFactoryTriggerSubscriptionOperationResultOperationSource(), _dataFactoryTriggerTriggersClientDiagnostics, Pipeline, _dataFactoryTriggerTriggersRestClient.CreateUnsubscribeFromEventsRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name).Request, response, OperationFinalStateVia.Location); - if (waitUntil == WaitUntil.Completed) - await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); - return operation; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Unsubscribe event trigger from events. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName}/triggers/{triggerName}/unsubscribeFromEvents - /// - /// - /// Operation Id - /// Triggers_UnsubscribeFromEvents - /// - /// - /// - /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. - /// The cancellation token to use. - public virtual ArmOperation UnsubscribeFromEvents(WaitUntil waitUntil, CancellationToken cancellationToken = default) - { - using var scope = _dataFactoryTriggerTriggersClientDiagnostics.CreateScope("DataFactoryTriggerResource.UnsubscribeFromEvents"); - scope.Start(); - try - { - var response = _dataFactoryTriggerTriggersRestClient.UnsubscribeFromEvents(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); - var operation = new DataFactoryArmOperation(new DataFactoryTriggerSubscriptionOperationResultOperationSource(), _dataFactoryTriggerTriggersClientDiagnostics, Pipeline, _dataFactoryTriggerTriggersRestClient.CreateUnsubscribeFromEventsRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name).Request, response, OperationFinalStateVia.Location); - if (waitUntil == WaitUntil.Completed) - operation.WaitForCompletion(cancellationToken); - return operation; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Starts a trigger. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName}/triggers/{triggerName}/start - /// - /// - /// Operation Id - /// Triggers_Start - /// - /// - /// - /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. - /// The cancellation token to use. - public virtual async Task StartAsync(WaitUntil waitUntil, CancellationToken cancellationToken = default) - { - using var scope = _dataFactoryTriggerTriggersClientDiagnostics.CreateScope("DataFactoryTriggerResource.Start"); - scope.Start(); - try - { - var response = await _dataFactoryTriggerTriggersRestClient.StartAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); - var operation = new DataFactoryArmOperation(_dataFactoryTriggerTriggersClientDiagnostics, Pipeline, _dataFactoryTriggerTriggersRestClient.CreateStartRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name).Request, response, OperationFinalStateVia.Location); - if (waitUntil == WaitUntil.Completed) - await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false); - return operation; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Starts a trigger. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName}/triggers/{triggerName}/start - /// - /// - /// Operation Id - /// Triggers_Start - /// - /// - /// - /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. - /// The cancellation token to use. - public virtual ArmOperation Start(WaitUntil waitUntil, CancellationToken cancellationToken = default) - { - using var scope = _dataFactoryTriggerTriggersClientDiagnostics.CreateScope("DataFactoryTriggerResource.Start"); - scope.Start(); - try - { - var response = _dataFactoryTriggerTriggersRestClient.Start(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); - var operation = new DataFactoryArmOperation(_dataFactoryTriggerTriggersClientDiagnostics, Pipeline, _dataFactoryTriggerTriggersRestClient.CreateStartRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name).Request, response, OperationFinalStateVia.Location); - if (waitUntil == WaitUntil.Completed) - operation.WaitForCompletionResponse(cancellationToken); - return operation; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Stops a trigger. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName}/triggers/{triggerName}/stop - /// - /// - /// Operation Id - /// Triggers_Stop - /// - /// - /// - /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. - /// The cancellation token to use. - public virtual async Task StopAsync(WaitUntil waitUntil, CancellationToken cancellationToken = default) - { - using var scope = _dataFactoryTriggerTriggersClientDiagnostics.CreateScope("DataFactoryTriggerResource.Stop"); - scope.Start(); - try - { - var response = await _dataFactoryTriggerTriggersRestClient.StopAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); - var operation = new DataFactoryArmOperation(_dataFactoryTriggerTriggersClientDiagnostics, Pipeline, _dataFactoryTriggerTriggersRestClient.CreateStopRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name).Request, response, OperationFinalStateVia.Location); - if (waitUntil == WaitUntil.Completed) - await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false); - return operation; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Stops a trigger. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName}/triggers/{triggerName}/stop - /// - /// - /// Operation Id - /// Triggers_Stop - /// - /// - /// - /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. - /// The cancellation token to use. - public virtual ArmOperation Stop(WaitUntil waitUntil, CancellationToken cancellationToken = default) - { - using var scope = _dataFactoryTriggerTriggersClientDiagnostics.CreateScope("DataFactoryTriggerResource.Stop"); - scope.Start(); - try - { - var response = _dataFactoryTriggerTriggersRestClient.Stop(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); - var operation = new DataFactoryArmOperation(_dataFactoryTriggerTriggersClientDiagnostics, Pipeline, _dataFactoryTriggerTriggersRestClient.CreateStopRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name).Request, response, OperationFinalStateVia.Location); - if (waitUntil == WaitUntil.Completed) - operation.WaitForCompletionResponse(cancellationToken); - return operation; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Rerun single trigger instance by runId. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName}/triggers/{triggerName}/triggerRuns/{runId}/rerun - /// - /// - /// Operation Id - /// TriggerRuns_Rerun - /// - /// - /// - /// The pipeline run identifier. - /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// is null. - public virtual async Task RerunTriggerRunAsync(string runId, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(runId, nameof(runId)); - - using var scope = _triggerRunsClientDiagnostics.CreateScope("DataFactoryTriggerResource.RerunTriggerRun"); - scope.Start(); - try - { - var response = await _triggerRunsRestClient.RerunAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, runId, cancellationToken).ConfigureAwait(false); - return response; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Rerun single trigger instance by runId. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName}/triggers/{triggerName}/triggerRuns/{runId}/rerun - /// - /// - /// Operation Id - /// TriggerRuns_Rerun - /// - /// - /// - /// The pipeline run identifier. - /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// is null. - public virtual Response RerunTriggerRun(string runId, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(runId, nameof(runId)); - - using var scope = _triggerRunsClientDiagnostics.CreateScope("DataFactoryTriggerResource.RerunTriggerRun"); - scope.Start(); - try - { - var response = _triggerRunsRestClient.Rerun(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, runId, cancellationToken); - return response; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Cancel a single trigger instance by runId. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName}/triggers/{triggerName}/triggerRuns/{runId}/cancel - /// - /// - /// Operation Id - /// TriggerRuns_Cancel - /// - /// - /// - /// The pipeline run identifier. - /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// is null. - public virtual async Task CancelTriggerRunAsync(string runId, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(runId, nameof(runId)); - - using var scope = _triggerRunsClientDiagnostics.CreateScope("DataFactoryTriggerResource.CancelTriggerRun"); - scope.Start(); - try - { - var response = await _triggerRunsRestClient.CancelAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, runId, cancellationToken).ConfigureAwait(false); - return response; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Cancel a single trigger instance by runId. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName}/triggers/{triggerName}/triggerRuns/{runId}/cancel - /// - /// - /// Operation Id - /// TriggerRuns_Cancel - /// - /// - /// - /// The pipeline run identifier. - /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// is null. - public virtual Response CancelTriggerRun(string runId, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(runId, nameof(runId)); - - using var scope = _triggerRunsClientDiagnostics.CreateScope("DataFactoryTriggerResource.CancelTriggerRun"); - scope.Start(); - try - { - var response = _triggerRunsRestClient.Cancel(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, runId, cancellationToken); - return response; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Extensions/DataFactoryExtensions.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Extensions/DataFactoryExtensions.cs deleted file mode 100644 index 97da692a..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Extensions/DataFactoryExtensions.cs +++ /dev/null @@ -1,492 +0,0 @@ -// - -#nullable disable - -using Azure.Core; -using AzureDataFactory.TestingFramework.Models; -using Azure.ResourceManager.Resources; - -namespace Azure.ResourceManager.DataFactory -{ - /// A class to add extension methods to Azure.ResourceManager.DataFactory. - public static partial class DataFactoryExtensions - { - private static ResourceGroupResourceExtensionClient GetResourceGroupResourceExtensionClient(ArmResource resource) - { - return resource.GetCachedClient(client => - { - return new ResourceGroupResourceExtensionClient(client, resource.Id); - }); - } - - private static ResourceGroupResourceExtensionClient GetResourceGroupResourceExtensionClient(ArmClient client, ResourceIdentifier scope) - { - return client.GetResourceClient(() => - { - return new ResourceGroupResourceExtensionClient(client, scope); - }); - } - - private static SubscriptionResourceExtensionClient GetSubscriptionResourceExtensionClient(ArmResource resource) - { - return resource.GetCachedClient(client => - { - return new SubscriptionResourceExtensionClient(client, resource.Id); - }); - } - - private static SubscriptionResourceExtensionClient GetSubscriptionResourceExtensionClient(ArmClient client, ResourceIdentifier scope) - { - return client.GetResourceClient(() => - { - return new SubscriptionResourceExtensionClient(client, scope); - }); - } - #region DataFactoryResource - /// - /// Gets an object representing a along with the instance operations that can be performed on it but with no data. - /// You can use to create a from its components. - /// - /// The instance the method will execute against. - /// The resource ID of the resource to get. - /// Returns a object. - public static DataFactoryResource GetDataFactoryResource(this ArmClient client, ResourceIdentifier id) - { - return client.GetResourceClient(() => - { - DataFactoryResource.ValidateResourceId(id); - return new DataFactoryResource(client, id); - } - ); - } - #endregion - - #region DataFactoryIntegrationRuntimeResource - /// - /// Gets an object representing a along with the instance operations that can be performed on it but with no data. - /// You can use to create a from its components. - /// - /// The instance the method will execute against. - /// The resource ID of the resource to get. - /// Returns a object. - public static DataFactoryIntegrationRuntimeResource GetDataFactoryIntegrationRuntimeResource(this ArmClient client, ResourceIdentifier id) - { - return client.GetResourceClient(() => - { - DataFactoryIntegrationRuntimeResource.ValidateResourceId(id); - return new DataFactoryIntegrationRuntimeResource(client, id); - } - ); - } - #endregion - - #region DataFactoryLinkedServiceResource - /// - /// Gets an object representing a along with the instance operations that can be performed on it but with no data. - /// You can use to create a from its components. - /// - /// The instance the method will execute against. - /// The resource ID of the resource to get. - /// Returns a object. - public static DataFactoryLinkedServiceResource GetDataFactoryLinkedServiceResource(this ArmClient client, ResourceIdentifier id) - { - return client.GetResourceClient(() => - { - DataFactoryLinkedServiceResource.ValidateResourceId(id); - return new DataFactoryLinkedServiceResource(client, id); - } - ); - } - #endregion - - #region DataFactoryDatasetResource - /// - /// Gets an object representing a along with the instance operations that can be performed on it but with no data. - /// You can use to create a from its components. - /// - /// The instance the method will execute against. - /// The resource ID of the resource to get. - /// Returns a object. - public static DataFactoryDatasetResource GetDataFactoryDatasetResource(this ArmClient client, ResourceIdentifier id) - { - return client.GetResourceClient(() => - { - DataFactoryDatasetResource.ValidateResourceId(id); - return new DataFactoryDatasetResource(client, id); - } - ); - } - #endregion - - #region DataFactoryPipelineResource - /// - /// Gets an object representing a along with the instance operations that can be performed on it but with no data. - /// You can use to create a from its components. - /// - /// The instance the method will execute against. - /// The resource ID of the resource to get. - /// Returns a object. - public static DataFactoryPipelineResource GetDataFactoryPipelineResource(this ArmClient client, ResourceIdentifier id) - { - return client.GetResourceClient(() => - { - DataFactoryPipelineResource.ValidateResourceId(id); - return new DataFactoryPipelineResource(client, id); - } - ); - } - #endregion - - #region DataFactoryTriggerResource - /// - /// Gets an object representing a along with the instance operations that can be performed on it but with no data. - /// You can use to create a from its components. - /// - /// The instance the method will execute against. - /// The resource ID of the resource to get. - /// Returns a object. - public static DataFactoryTriggerResource GetDataFactoryTriggerResource(this ArmClient client, ResourceIdentifier id) - { - return client.GetResourceClient(() => - { - DataFactoryTriggerResource.ValidateResourceId(id); - return new DataFactoryTriggerResource(client, id); - } - ); - } - #endregion - - #region DataFactoryDataFlowResource - /// - /// Gets an object representing a along with the instance operations that can be performed on it but with no data. - /// You can use to create a from its components. - /// - /// The instance the method will execute against. - /// The resource ID of the resource to get. - /// Returns a object. - public static DataFactoryDataFlowResource GetDataFactoryDataFlowResource(this ArmClient client, ResourceIdentifier id) - { - return client.GetResourceClient(() => - { - DataFactoryDataFlowResource.ValidateResourceId(id); - return new DataFactoryDataFlowResource(client, id); - } - ); - } - #endregion - - #region DataFactoryManagedVirtualNetworkResource - /// - /// Gets an object representing a along with the instance operations that can be performed on it but with no data. - /// You can use to create a from its components. - /// - /// The instance the method will execute against. - /// The resource ID of the resource to get. - /// Returns a object. - public static DataFactoryManagedVirtualNetworkResource GetDataFactoryManagedVirtualNetworkResource(this ArmClient client, ResourceIdentifier id) - { - return client.GetResourceClient(() => - { - DataFactoryManagedVirtualNetworkResource.ValidateResourceId(id); - return new DataFactoryManagedVirtualNetworkResource(client, id); - } - ); - } - #endregion - - #region DataFactoryPrivateEndpointResource - /// - /// Gets an object representing a along with the instance operations that can be performed on it but with no data. - /// You can use to create a from its components. - /// - /// The instance the method will execute against. - /// The resource ID of the resource to get. - /// Returns a object. - public static DataFactoryPrivateEndpointResource GetDataFactoryPrivateEndpointResource(this ArmClient client, ResourceIdentifier id) - { - return client.GetResourceClient(() => - { - DataFactoryPrivateEndpointResource.ValidateResourceId(id); - return new DataFactoryPrivateEndpointResource(client, id); - } - ); - } - #endregion - - #region DataFactoryManagedIdentityCredentialResource - /// - /// Gets an object representing a along with the instance operations that can be performed on it but with no data. - /// You can use to create a from its components. - /// - /// The instance the method will execute against. - /// The resource ID of the resource to get. - /// Returns a object. - public static DataFactoryManagedIdentityCredentialResource GetDataFactoryManagedIdentityCredentialResource(this ArmClient client, ResourceIdentifier id) - { - return client.GetResourceClient(() => - { - DataFactoryManagedIdentityCredentialResource.ValidateResourceId(id); - return new DataFactoryManagedIdentityCredentialResource(client, id); - } - ); - } - #endregion - - #region DataFactoryPrivateEndpointConnectionResource - /// - /// Gets an object representing a along with the instance operations that can be performed on it but with no data. - /// You can use to create a from its components. - /// - /// The instance the method will execute against. - /// The resource ID of the resource to get. - /// Returns a object. - public static DataFactoryPrivateEndpointConnectionResource GetDataFactoryPrivateEndpointConnectionResource(this ArmClient client, ResourceIdentifier id) - { - return client.GetResourceClient(() => - { - DataFactoryPrivateEndpointConnectionResource.ValidateResourceId(id); - return new DataFactoryPrivateEndpointConnectionResource(client, id); - } - ); - } - #endregion - - #region DataFactoryGlobalParameterResource - /// - /// Gets an object representing a along with the instance operations that can be performed on it but with no data. - /// You can use to create a from its components. - /// - /// The instance the method will execute against. - /// The resource ID of the resource to get. - /// Returns a object. - public static DataFactoryGlobalParameterResource GetDataFactoryGlobalParameterResource(this ArmClient client, ResourceIdentifier id) - { - return client.GetResourceClient(() => - { - DataFactoryGlobalParameterResource.ValidateResourceId(id); - return new DataFactoryGlobalParameterResource(client, id); - } - ); - } - #endregion - - #region DataFactoryChangeDataCaptureResource - /// - /// Gets an object representing a along with the instance operations that can be performed on it but with no data. - /// You can use to create a from its components. - /// - /// The instance the method will execute against. - /// The resource ID of the resource to get. - /// Returns a object. - public static DataFactoryChangeDataCaptureResource GetDataFactoryChangeDataCaptureResource(this ArmClient client, ResourceIdentifier id) - { - return client.GetResourceClient(() => - { - DataFactoryChangeDataCaptureResource.ValidateResourceId(id); - return new DataFactoryChangeDataCaptureResource(client, id); - } - ); - } - #endregion - - /// Gets a collection of DataFactoryResources in the ResourceGroupResource. - /// The instance the method will execute against. - /// An object representing collection of DataFactoryResources and their operations over a DataFactoryResource. - public static DataFactoryCollection GetDataFactories(this ResourceGroupResource resourceGroupResource) - { - return GetResourceGroupResourceExtensionClient(resourceGroupResource).GetDataFactories(); - } - - /// - /// Gets a factory. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName} - /// - /// - /// Operation Id - /// Factories_Get - /// - /// - /// - /// The instance the method will execute against. - /// The factory name. - /// ETag of the factory entity. Should only be specified for get. If the ETag matches the existing entity tag, or if * was provided, then no content will be returned. - /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// is null. - [ForwardsClientCalls] - public static async Task> GetDataFactoryAsync(this ResourceGroupResource resourceGroupResource, string factoryName, string ifNoneMatch = null, CancellationToken cancellationToken = default) - { - return await resourceGroupResource.GetDataFactories().GetAsync(factoryName, ifNoneMatch, cancellationToken).ConfigureAwait(false); - } - - /// - /// Gets a factory. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName} - /// - /// - /// Operation Id - /// Factories_Get - /// - /// - /// - /// The instance the method will execute against. - /// The factory name. - /// ETag of the factory entity. Should only be specified for get. If the ETag matches the existing entity tag, or if * was provided, then no content will be returned. - /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// is null. - [ForwardsClientCalls] - public static Response GetDataFactory(this ResourceGroupResource resourceGroupResource, string factoryName, string ifNoneMatch = null, CancellationToken cancellationToken = default) - { - return resourceGroupResource.GetDataFactories().Get(factoryName, ifNoneMatch, cancellationToken); - } - - /// - /// Lists factories under the specified subscription. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/providers/Microsoft.DataFactory/factories - /// - /// - /// Operation Id - /// Factories_List - /// - /// - /// - /// The instance the method will execute against. - /// The cancellation token to use. - /// An async collection of that may take multiple service requests to iterate over. - public static AsyncPageable GetDataFactoriesAsync(this SubscriptionResource subscriptionResource, CancellationToken cancellationToken = default) - { - return GetSubscriptionResourceExtensionClient(subscriptionResource).GetDataFactoriesAsync(cancellationToken); - } - - /// - /// Lists factories under the specified subscription. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/providers/Microsoft.DataFactory/factories - /// - /// - /// Operation Id - /// Factories_List - /// - /// - /// - /// The instance the method will execute against. - /// The cancellation token to use. - /// A collection of that may take multiple service requests to iterate over. - public static Pageable GetDataFactories(this SubscriptionResource subscriptionResource, CancellationToken cancellationToken = default) - { - return GetSubscriptionResourceExtensionClient(subscriptionResource).GetDataFactories(cancellationToken); - } - - /// - /// Updates a factory's repo information. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/providers/Microsoft.DataFactory/locations/{locationId}/configureFactoryRepo - /// - /// - /// Operation Id - /// Factories_ConfigureFactoryRepo - /// - /// - /// - /// The instance the method will execute against. - /// The location identifier. - /// Update factory repo request definition. - /// The cancellation token to use. - /// is null. - public static async Task> ConfigureFactoryRepoInformationAsync(this SubscriptionResource subscriptionResource, AzureLocation locationId, FactoryRepoContent content, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(content, nameof(content)); - - return await GetSubscriptionResourceExtensionClient(subscriptionResource).ConfigureFactoryRepoInformationAsync(locationId, content, cancellationToken).ConfigureAwait(false); - } - - /// - /// Updates a factory's repo information. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/providers/Microsoft.DataFactory/locations/{locationId}/configureFactoryRepo - /// - /// - /// Operation Id - /// Factories_ConfigureFactoryRepo - /// - /// - /// - /// The instance the method will execute against. - /// The location identifier. - /// Update factory repo request definition. - /// The cancellation token to use. - /// is null. - public static Response ConfigureFactoryRepoInformation(this SubscriptionResource subscriptionResource, AzureLocation locationId, FactoryRepoContent content, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(content, nameof(content)); - - return GetSubscriptionResourceExtensionClient(subscriptionResource).ConfigureFactoryRepoInformation(locationId, content, cancellationToken); - } - - /// - /// Get exposure control feature for specific location. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/providers/Microsoft.DataFactory/locations/{locationId}/getFeatureValue - /// - /// - /// Operation Id - /// ExposureControl_GetFeatureValue - /// - /// - /// - /// The instance the method will execute against. - /// The location identifier. - /// The exposure control request. - /// The cancellation token to use. - /// is null. - public static async Task> GetFeatureValueExposureControlAsync(this SubscriptionResource subscriptionResource, AzureLocation locationId, ExposureControlContent content, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(content, nameof(content)); - - return await GetSubscriptionResourceExtensionClient(subscriptionResource).GetFeatureValueExposureControlAsync(locationId, content, cancellationToken).ConfigureAwait(false); - } - - /// - /// Get exposure control feature for specific location. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/providers/Microsoft.DataFactory/locations/{locationId}/getFeatureValue - /// - /// - /// Operation Id - /// ExposureControl_GetFeatureValue - /// - /// - /// - /// The instance the method will execute against. - /// The location identifier. - /// The exposure control request. - /// The cancellation token to use. - /// is null. - public static Response GetFeatureValueExposureControl(this SubscriptionResource subscriptionResource, AzureLocation locationId, ExposureControlContent content, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(content, nameof(content)); - - return GetSubscriptionResourceExtensionClient(subscriptionResource).GetFeatureValueExposureControl(locationId, content, cancellationToken); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Extensions/ResourceGroupResourceExtensionClient.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Extensions/ResourceGroupResourceExtensionClient.cs deleted file mode 100644 index a59cfac0..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Extensions/ResourceGroupResourceExtensionClient.cs +++ /dev/null @@ -1,37 +0,0 @@ -// - -#nullable disable - -using Azure.Core; - -namespace Azure.ResourceManager.DataFactory -{ - /// A class to add extension methods to ResourceGroupResource. - internal partial class ResourceGroupResourceExtensionClient : ArmResource - { - /// Initializes a new instance of the class for mocking. - protected ResourceGroupResourceExtensionClient() - { - } - - /// Initializes a new instance of the class. - /// The client parameters to use in these operations. - /// The identifier of the resource that is the target of operations. - internal ResourceGroupResourceExtensionClient(ArmClient client, ResourceIdentifier id) : base(client, id) - { - } - - private string GetApiVersionOrNull(ResourceType resourceType) - { - TryGetApiVersion(resourceType, out string apiVersion); - return apiVersion; - } - - /// Gets a collection of DataFactoryResources in the ResourceGroupResource. - /// An object representing collection of DataFactoryResources and their operations over a DataFactoryResource. - public virtual DataFactoryCollection GetDataFactories() - { - return GetCachedClient(Client => new DataFactoryCollection(Client, Id)); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Extensions/SubscriptionResourceExtensionClient.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Extensions/SubscriptionResourceExtensionClient.cs deleted file mode 100644 index 1b7741eb..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Extensions/SubscriptionResourceExtensionClient.cs +++ /dev/null @@ -1,214 +0,0 @@ -// - -#nullable disable - -using Azure.Core; -using Azure.Core.Pipeline; -using AzureDataFactory.TestingFramework.Models; - -namespace Azure.ResourceManager.DataFactory -{ - /// A class to add extension methods to SubscriptionResource. - internal partial class SubscriptionResourceExtensionClient : ArmResource - { - private ClientDiagnostics _dataFactoryFactoriesClientDiagnostics; - private FactoriesRestOperations _dataFactoryFactoriesRestClient; - private ClientDiagnostics _exposureControlClientDiagnostics; - private ExposureControlRestOperations _exposureControlRestClient; - - /// Initializes a new instance of the class for mocking. - protected SubscriptionResourceExtensionClient() - { - } - - /// Initializes a new instance of the class. - /// The client parameters to use in these operations. - /// The identifier of the resource that is the target of operations. - internal SubscriptionResourceExtensionClient(ArmClient client, ResourceIdentifier id) : base(client, id) - { - } - - private ClientDiagnostics DataFactoryFactoriesClientDiagnostics => _dataFactoryFactoriesClientDiagnostics ??= new ClientDiagnostics("Azure.ResourceManager.DataFactory", DataFactoryResource.ResourceType.Namespace, Diagnostics); - private FactoriesRestOperations DataFactoryFactoriesRestClient => _dataFactoryFactoriesRestClient ??= new FactoriesRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, GetApiVersionOrNull(DataFactoryResource.ResourceType)); - private ClientDiagnostics ExposureControlClientDiagnostics => _exposureControlClientDiagnostics ??= new ClientDiagnostics("Azure.ResourceManager.DataFactory", ProviderConstants.DefaultProviderNamespace, Diagnostics); - private ExposureControlRestOperations ExposureControlRestClient => _exposureControlRestClient ??= new ExposureControlRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint); - - private string GetApiVersionOrNull(ResourceType resourceType) - { - TryGetApiVersion(resourceType, out string apiVersion); - return apiVersion; - } - - /// - /// Lists factories under the specified subscription. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/providers/Microsoft.DataFactory/factories - /// - /// - /// Operation Id - /// Factories_List - /// - /// - /// - /// The cancellation token to use. - /// An async collection of that may take multiple service requests to iterate over. - public virtual AsyncPageable GetDataFactoriesAsync(CancellationToken cancellationToken = default) - { - HttpMessage FirstPageRequest(int? pageSizeHint) => DataFactoryFactoriesRestClient.CreateListRequest(Id.SubscriptionId); - HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => DataFactoryFactoriesRestClient.CreateListNextPageRequest(nextLink, Id.SubscriptionId); - return PageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new DataFactoryResource(Client, DataFactoryData.DeserializeDataFactoryData(e)), DataFactoryFactoriesClientDiagnostics, Pipeline, "SubscriptionResourceExtensionClient.GetDataFactories", "value", "nextLink", cancellationToken); - } - - /// - /// Lists factories under the specified subscription. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/providers/Microsoft.DataFactory/factories - /// - /// - /// Operation Id - /// Factories_List - /// - /// - /// - /// The cancellation token to use. - /// A collection of that may take multiple service requests to iterate over. - public virtual Pageable GetDataFactories(CancellationToken cancellationToken = default) - { - HttpMessage FirstPageRequest(int? pageSizeHint) => DataFactoryFactoriesRestClient.CreateListRequest(Id.SubscriptionId); - HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => DataFactoryFactoriesRestClient.CreateListNextPageRequest(nextLink, Id.SubscriptionId); - return PageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new DataFactoryResource(Client, DataFactoryData.DeserializeDataFactoryData(e)), DataFactoryFactoriesClientDiagnostics, Pipeline, "SubscriptionResourceExtensionClient.GetDataFactories", "value", "nextLink", cancellationToken); - } - - /// - /// Updates a factory's repo information. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/providers/Microsoft.DataFactory/locations/{locationId}/configureFactoryRepo - /// - /// - /// Operation Id - /// Factories_ConfigureFactoryRepo - /// - /// - /// - /// The location identifier. - /// Update factory repo request definition. - /// The cancellation token to use. - public virtual async Task> ConfigureFactoryRepoInformationAsync(AzureLocation locationId, FactoryRepoContent content, CancellationToken cancellationToken = default) - { - using var scope = DataFactoryFactoriesClientDiagnostics.CreateScope("SubscriptionResourceExtensionClient.ConfigureFactoryRepoInformation"); - scope.Start(); - try - { - var response = await DataFactoryFactoriesRestClient.ConfigureFactoryRepoAsync(Id.SubscriptionId, locationId, content, cancellationToken).ConfigureAwait(false); - return Response.FromValue(new DataFactoryResource(Client, response.Value), response.GetRawResponse()); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Updates a factory's repo information. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/providers/Microsoft.DataFactory/locations/{locationId}/configureFactoryRepo - /// - /// - /// Operation Id - /// Factories_ConfigureFactoryRepo - /// - /// - /// - /// The location identifier. - /// Update factory repo request definition. - /// The cancellation token to use. - public virtual Response ConfigureFactoryRepoInformation(AzureLocation locationId, FactoryRepoContent content, CancellationToken cancellationToken = default) - { - using var scope = DataFactoryFactoriesClientDiagnostics.CreateScope("SubscriptionResourceExtensionClient.ConfigureFactoryRepoInformation"); - scope.Start(); - try - { - var response = DataFactoryFactoriesRestClient.ConfigureFactoryRepo(Id.SubscriptionId, locationId, content, cancellationToken); - return Response.FromValue(new DataFactoryResource(Client, response.Value), response.GetRawResponse()); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Get exposure control feature for specific location. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/providers/Microsoft.DataFactory/locations/{locationId}/getFeatureValue - /// - /// - /// Operation Id - /// ExposureControl_GetFeatureValue - /// - /// - /// - /// The location identifier. - /// The exposure control request. - /// The cancellation token to use. - public virtual async Task> GetFeatureValueExposureControlAsync(AzureLocation locationId, ExposureControlContent content, CancellationToken cancellationToken = default) - { - using var scope = ExposureControlClientDiagnostics.CreateScope("SubscriptionResourceExtensionClient.GetFeatureValueExposureControl"); - scope.Start(); - try - { - var response = await ExposureControlRestClient.GetFeatureValueAsync(Id.SubscriptionId, locationId, content, cancellationToken).ConfigureAwait(false); - return response; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Get exposure control feature for specific location. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/providers/Microsoft.DataFactory/locations/{locationId}/getFeatureValue - /// - /// - /// Operation Id - /// ExposureControl_GetFeatureValue - /// - /// - /// - /// The location identifier. - /// The exposure control request. - /// The cancellation token to use. - public virtual Response GetFeatureValueExposureControl(AzureLocation locationId, ExposureControlContent content, CancellationToken cancellationToken = default) - { - using var scope = ExposureControlClientDiagnostics.CreateScope("SubscriptionResourceExtensionClient.GetFeatureValueExposureControl"); - scope.Start(); - try - { - var response = ExposureControlRestClient.GetFeatureValue(Id.SubscriptionId, locationId, content, cancellationToken); - return response; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/LongRunningOperation/DataFactoryArmOperation.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/LongRunningOperation/DataFactoryArmOperation.cs deleted file mode 100644 index c9605c81..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/LongRunningOperation/DataFactoryArmOperation.cs +++ /dev/null @@ -1,62 +0,0 @@ -// - -#nullable disable - -using Azure.Core; -using Azure.Core.Pipeline; - -namespace Azure.ResourceManager.DataFactory -{ -#pragma warning disable SA1649 // File name should match first type name - internal class DataFactoryArmOperation : ArmOperation -#pragma warning restore SA1649 // File name should match first type name - { - private readonly OperationInternal _operation; - - /// Initializes a new instance of DataFactoryArmOperation for mocking. - protected DataFactoryArmOperation() - { - } - - internal DataFactoryArmOperation(Response response) - { - _operation = OperationInternal.Succeeded(response); - } - - internal DataFactoryArmOperation(ClientDiagnostics clientDiagnostics, HttpPipeline pipeline, Request request, Response response, OperationFinalStateVia finalStateVia, bool skipApiVersionOverride = false, string apiVersionOverrideValue = null) - { - var nextLinkOperation = NextLinkOperationImplementation.Create(pipeline, request.Method, request.Uri.ToUri(), response, finalStateVia, skipApiVersionOverride, apiVersionOverrideValue); - _operation = new OperationInternal(nextLinkOperation, clientDiagnostics, response, "DataFactoryArmOperation", fallbackStrategy: new SequentialDelayStrategy()); - } - - /// -#pragma warning disable CA1822 - [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] - public override string Id => throw new NotImplementedException(); -#pragma warning restore CA1822 - - /// - public override bool HasCompleted => _operation.HasCompleted; - - /// - public override Response GetRawResponse() => _operation.RawResponse; - - /// - public override Response UpdateStatus(CancellationToken cancellationToken = default) => _operation.UpdateStatus(cancellationToken); - - /// - public override ValueTask UpdateStatusAsync(CancellationToken cancellationToken = default) => _operation.UpdateStatusAsync(cancellationToken); - - /// - public override Response WaitForCompletionResponse(CancellationToken cancellationToken = default) => _operation.WaitForCompletionResponse(cancellationToken); - - /// - public override Response WaitForCompletionResponse(TimeSpan pollingInterval, CancellationToken cancellationToken = default) => _operation.WaitForCompletionResponse(pollingInterval, cancellationToken); - - /// - public override ValueTask WaitForCompletionResponseAsync(CancellationToken cancellationToken = default) => _operation.WaitForCompletionResponseAsync(cancellationToken); - - /// - public override ValueTask WaitForCompletionResponseAsync(TimeSpan pollingInterval, CancellationToken cancellationToken = default) => _operation.WaitForCompletionResponseAsync(pollingInterval, cancellationToken); - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/LongRunningOperation/DataFactoryArmOperationOfT.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/LongRunningOperation/DataFactoryArmOperationOfT.cs deleted file mode 100644 index bcdd420b..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/LongRunningOperation/DataFactoryArmOperationOfT.cs +++ /dev/null @@ -1,68 +0,0 @@ -// - -#nullable disable - -using Azure.Core; -using Azure.Core.Pipeline; - -namespace Azure.ResourceManager.DataFactory -{ -#pragma warning disable SA1649 // File name should match first type name - internal class DataFactoryArmOperation : ArmOperation -#pragma warning restore SA1649 // File name should match first type name - { - private readonly OperationInternal _operation; - - /// Initializes a new instance of DataFactoryArmOperation for mocking. - protected DataFactoryArmOperation() - { - } - - internal DataFactoryArmOperation(Response response) - { - _operation = OperationInternal.Succeeded(response.GetRawResponse(), response.Value); - } - - internal DataFactoryArmOperation(IOperationSource source, ClientDiagnostics clientDiagnostics, HttpPipeline pipeline, Request request, Response response, OperationFinalStateVia finalStateVia, bool skipApiVersionOverride = false, string apiVersionOverrideValue = null) - { - var nextLinkOperation = NextLinkOperationImplementation.Create(source, pipeline, request.Method, request.Uri.ToUri(), response, finalStateVia, skipApiVersionOverride, apiVersionOverrideValue); - _operation = new OperationInternal(nextLinkOperation, clientDiagnostics, response, "DataFactoryArmOperation", fallbackStrategy: new SequentialDelayStrategy()); - } - - /// -#pragma warning disable CA1822 - [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] - public override string Id => throw new NotImplementedException(); -#pragma warning restore CA1822 - - /// - public override T Value => _operation.Value; - - /// - public override bool HasValue => _operation.HasValue; - - /// - public override bool HasCompleted => _operation.HasCompleted; - - /// - public override Response GetRawResponse() => _operation.RawResponse; - - /// - public override Response UpdateStatus(CancellationToken cancellationToken = default) => _operation.UpdateStatus(cancellationToken); - - /// - public override ValueTask UpdateStatusAsync(CancellationToken cancellationToken = default) => _operation.UpdateStatusAsync(cancellationToken); - - /// - public override Response WaitForCompletion(CancellationToken cancellationToken = default) => _operation.WaitForCompletion(cancellationToken); - - /// - public override Response WaitForCompletion(TimeSpan pollingInterval, CancellationToken cancellationToken = default) => _operation.WaitForCompletion(pollingInterval, cancellationToken); - - /// - public override ValueTask> WaitForCompletionAsync(CancellationToken cancellationToken = default) => _operation.WaitForCompletionAsync(cancellationToken); - - /// - public override ValueTask> WaitForCompletionAsync(TimeSpan pollingInterval, CancellationToken cancellationToken = default) => _operation.WaitForCompletionAsync(pollingInterval, cancellationToken); - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/LongRunningOperation/DataFactoryDataFlowCreateDebugSessionResultOperationSource.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/LongRunningOperation/DataFactoryDataFlowCreateDebugSessionResultOperationSource.cs deleted file mode 100644 index 3ff1e123..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/LongRunningOperation/DataFactoryDataFlowCreateDebugSessionResultOperationSource.cs +++ /dev/null @@ -1,25 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; -using AzureDataFactory.TestingFramework.Models; - -namespace Azure.ResourceManager.DataFactory -{ - internal class DataFactoryDataFlowCreateDebugSessionResultOperationSource : IOperationSource - { - DataFactoryDataFlowCreateDebugSessionResult IOperationSource.CreateResult(Response response, CancellationToken cancellationToken) - { - using var document = JsonDocument.Parse(response.ContentStream); - return DataFactoryDataFlowCreateDebugSessionResult.DeserializeDataFactoryDataFlowCreateDebugSessionResult(document.RootElement); - } - - async ValueTask IOperationSource.CreateResultAsync(Response response, CancellationToken cancellationToken) - { - using var document = await JsonDocument.ParseAsync(response.ContentStream, default, cancellationToken).ConfigureAwait(false); - return DataFactoryDataFlowCreateDebugSessionResult.DeserializeDataFactoryDataFlowCreateDebugSessionResult(document.RootElement); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/LongRunningOperation/DataFactoryDataFlowDebugCommandResultOperationSource.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/LongRunningOperation/DataFactoryDataFlowDebugCommandResultOperationSource.cs deleted file mode 100644 index a669fac6..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/LongRunningOperation/DataFactoryDataFlowDebugCommandResultOperationSource.cs +++ /dev/null @@ -1,25 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; -using AzureDataFactory.TestingFramework.Models; - -namespace Azure.ResourceManager.DataFactory -{ - internal class DataFactoryDataFlowDebugCommandResultOperationSource : IOperationSource - { - DataFactoryDataFlowDebugCommandResult IOperationSource.CreateResult(Response response, CancellationToken cancellationToken) - { - using var document = JsonDocument.Parse(response.ContentStream); - return DataFactoryDataFlowDebugCommandResult.DeserializeDataFactoryDataFlowDebugCommandResult(document.RootElement); - } - - async ValueTask IOperationSource.CreateResultAsync(Response response, CancellationToken cancellationToken) - { - using var document = await JsonDocument.ParseAsync(response.ContentStream, default, cancellationToken).ConfigureAwait(false); - return DataFactoryDataFlowDebugCommandResult.DeserializeDataFactoryDataFlowDebugCommandResult(document.RootElement); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/LongRunningOperation/DataFactoryIntegrationRuntimeStatusResultOperationSource.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/LongRunningOperation/DataFactoryIntegrationRuntimeStatusResultOperationSource.cs deleted file mode 100644 index 9846f9a4..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/LongRunningOperation/DataFactoryIntegrationRuntimeStatusResultOperationSource.cs +++ /dev/null @@ -1,25 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; -using AzureDataFactory.TestingFramework.Models; - -namespace Azure.ResourceManager.DataFactory -{ - internal class DataFactoryIntegrationRuntimeStatusResultOperationSource : IOperationSource - { - DataFactoryIntegrationRuntimeStatusResult IOperationSource.CreateResult(Response response, CancellationToken cancellationToken) - { - using var document = JsonDocument.Parse(response.ContentStream); - return DataFactoryIntegrationRuntimeStatusResult.DeserializeDataFactoryIntegrationRuntimeStatusResult(document.RootElement); - } - - async ValueTask IOperationSource.CreateResultAsync(Response response, CancellationToken cancellationToken) - { - using var document = await JsonDocument.ParseAsync(response.ContentStream, default, cancellationToken).ConfigureAwait(false); - return DataFactoryIntegrationRuntimeStatusResult.DeserializeDataFactoryIntegrationRuntimeStatusResult(document.RootElement); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/LongRunningOperation/DataFactoryTriggerSubscriptionOperationResultOperationSource.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/LongRunningOperation/DataFactoryTriggerSubscriptionOperationResultOperationSource.cs deleted file mode 100644 index e1c3d2f5..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/LongRunningOperation/DataFactoryTriggerSubscriptionOperationResultOperationSource.cs +++ /dev/null @@ -1,25 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; -using AzureDataFactory.TestingFramework.Models; - -namespace Azure.ResourceManager.DataFactory -{ - internal class DataFactoryTriggerSubscriptionOperationResultOperationSource : IOperationSource - { - DataFactoryTriggerSubscriptionOperationResult IOperationSource.CreateResult(Response response, CancellationToken cancellationToken) - { - using var document = JsonDocument.Parse(response.ContentStream); - return DataFactoryTriggerSubscriptionOperationResult.DeserializeDataFactoryTriggerSubscriptionOperationResult(document.RootElement); - } - - async ValueTask IOperationSource.CreateResultAsync(Response response, CancellationToken cancellationToken) - { - using var document = await JsonDocument.ParseAsync(response.ContentStream, default, cancellationToken).ConfigureAwait(false); - return DataFactoryTriggerSubscriptionOperationResult.DeserializeDataFactoryTriggerSubscriptionOperationResult(document.RootElement); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/LongRunningOperation/SsisObjectMetadataStatusResultOperationSource.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/LongRunningOperation/SsisObjectMetadataStatusResultOperationSource.cs deleted file mode 100644 index 792e60cc..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/LongRunningOperation/SsisObjectMetadataStatusResultOperationSource.cs +++ /dev/null @@ -1,25 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; -using AzureDataFactory.TestingFramework.Models; - -namespace Azure.ResourceManager.DataFactory -{ - internal class SsisObjectMetadataStatusResultOperationSource : IOperationSource - { - SsisObjectMetadataStatusResult IOperationSource.CreateResult(Response response, CancellationToken cancellationToken) - { - using var document = JsonDocument.Parse(response.ContentStream); - return SsisObjectMetadataStatusResult.DeserializeSsisObjectMetadataStatusResult(document.RootElement); - } - - async ValueTask IOperationSource.CreateResultAsync(Response response, CancellationToken cancellationToken) - { - using var document = await JsonDocument.ParseAsync(response.ContentStream, default, cancellationToken).ConfigureAwait(false); - return SsisObjectMetadataStatusResult.DeserializeSsisObjectMetadataStatusResult(document.RootElement); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/ActivityOnInactiveMarkAs.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/ActivityOnInactiveMarkAs.cs deleted file mode 100644 index 9432ecae..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/ActivityOnInactiveMarkAs.cs +++ /dev/null @@ -1,50 +0,0 @@ -// - -#nullable disable - -using System.ComponentModel; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// 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. - public readonly partial struct ActivityOnInactiveMarkAs : IEquatable - { - private readonly string _value; - - /// Initializes a new instance of . - /// is null. - public ActivityOnInactiveMarkAs(string value) - { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } - - private const string SucceededValue = "Succeeded"; - private const string FailedValue = "Failed"; - private const string SkippedValue = "Skipped"; - - /// Succeeded. - public static ActivityOnInactiveMarkAs Succeeded { get; } = new ActivityOnInactiveMarkAs(SucceededValue); - /// Failed. - public static ActivityOnInactiveMarkAs Failed { get; } = new ActivityOnInactiveMarkAs(FailedValue); - /// Skipped. - public static ActivityOnInactiveMarkAs Skipped { get; } = new ActivityOnInactiveMarkAs(SkippedValue); - /// Determines if two values are the same. - public static bool operator ==(ActivityOnInactiveMarkAs left, ActivityOnInactiveMarkAs right) => left.Equals(right); - /// Determines if two values are not the same. - public static bool operator !=(ActivityOnInactiveMarkAs left, ActivityOnInactiveMarkAs right) => !left.Equals(right); - /// Converts a string to a . - public static implicit operator ActivityOnInactiveMarkAs(string value) => new ActivityOnInactiveMarkAs(value); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override bool Equals(object obj) => obj is ActivityOnInactiveMarkAs other && Equals(other); - /// - public bool Equals(ActivityOnInactiveMarkAs other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override int GetHashCode() => _value?.GetHashCode() ?? 0; - /// - public override string ToString() => _value; - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/AmazonMwsLinkedService.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/AmazonMwsLinkedService.Serialization.cs deleted file mode 100644 index c6f7197c..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/AmazonMwsLinkedService.Serialization.cs +++ /dev/null @@ -1,278 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class AmazonMwsLinkedService : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - writer.WritePropertyName("type"u8); - writer.WriteStringValue(LinkedServiceType); - if (Optional.IsDefined(ConnectVia)) - { - writer.WritePropertyName("connectVia"u8); - writer.WriteObjectValue(ConnectVia); - } - if (Optional.IsDefined(Description)) - { - writer.WritePropertyName("description"u8); - writer.WriteStringValue(Description); - } - if (Optional.IsCollectionDefined(Parameters)) - { - writer.WritePropertyName("parameters"u8); - writer.WriteStartObject(); - foreach (var item in Parameters) - { - writer.WritePropertyName(item.Key); - writer.WriteObjectValue(item.Value); - } - writer.WriteEndObject(); - } - if (Optional.IsCollectionDefined(Annotations)) - { - writer.WritePropertyName("annotations"u8); - writer.WriteStartArray(); - foreach (var item in Annotations) - { - if (item == null) - { - writer.WriteNullValue(); - continue; - } -#if NET6_0_OR_GREATER - writer.WriteRawValue(item); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.ToString()).RootElement); -#endif - } - writer.WriteEndArray(); - } - writer.WritePropertyName("typeProperties"u8); - writer.WriteStartObject(); - writer.WritePropertyName("endpoint"u8); - JsonSerializer.Serialize(writer, Endpoint); - writer.WritePropertyName("marketplaceID"u8); - JsonSerializer.Serialize(writer, MarketplaceId); - writer.WritePropertyName("sellerID"u8); - JsonSerializer.Serialize(writer, SellerId); - if (Optional.IsDefined(MwsAuthToken)) - { - writer.WritePropertyName("mwsAuthToken"u8); - JsonSerializer.Serialize(writer, MwsAuthToken); - } - writer.WritePropertyName("accessKeyId"u8); - JsonSerializer.Serialize(writer, AccessKeyId); - if (Optional.IsDefined(SecretKey)) - { - writer.WritePropertyName("secretKey"u8); - JsonSerializer.Serialize(writer, SecretKey); - } - if (Optional.IsDefined(UseEncryptedEndpoints)) - { - writer.WritePropertyName("useEncryptedEndpoints"u8); - JsonSerializer.Serialize(writer, UseEncryptedEndpoints); - } - if (Optional.IsDefined(UseHostVerification)) - { - writer.WritePropertyName("useHostVerification"u8); - JsonSerializer.Serialize(writer, UseHostVerification); - } - if (Optional.IsDefined(UsePeerVerification)) - { - writer.WritePropertyName("usePeerVerification"u8); - JsonSerializer.Serialize(writer, UsePeerVerification); - } - if (Optional.IsDefined(EncryptedCredential)) - { - writer.WritePropertyName("encryptedCredential"u8); - writer.WriteStringValue(EncryptedCredential); - } - writer.WriteEndObject(); - foreach (var item in AdditionalProperties) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.Value.ToString()).RootElement); -#endif - } - writer.WriteEndObject(); - } - - internal static AmazonMwsLinkedService DeserializeAmazonMwsLinkedService(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - string type = default; - Optional connectVia = default; - Optional description = default; - Optional> parameters = default; - Optional> annotations = default; - DataFactoryElement endpoint = default; - DataFactoryElement marketplaceId = default; - DataFactoryElement sellerId = default; - Optional mwsAuthToken = default; - DataFactoryElement accessKeyId = default; - Optional secretKey = default; - Optional> useEncryptedEndpoints = default; - Optional> useHostVerification = default; - Optional> usePeerVerification = default; - Optional encryptedCredential = default; - IDictionary> additionalProperties = default; - Dictionary> additionalPropertiesDictionary = new Dictionary>(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("type"u8)) - { - type = property.Value.GetString(); - continue; - } - if (property.NameEquals("connectVia"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - connectVia = IntegrationRuntimeReference.DeserializeIntegrationRuntimeReference(property.Value); - continue; - } - if (property.NameEquals("description"u8)) - { - description = property.Value.GetString(); - continue; - } - if (property.NameEquals("parameters"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - Dictionary dictionary = new Dictionary(); - foreach (var property0 in property.Value.EnumerateObject()) - { - dictionary.Add(property0.Name, EntityParameterSpecification.DeserializeEntityParameterSpecification(property0.Value)); - } - parameters = dictionary; - continue; - } - if (property.NameEquals("annotations"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - if (item.ValueKind == JsonValueKind.Null) - { - array.Add(null); - } - else - { - array.Add(BinaryData.FromString(item.GetRawText())); - } - } - annotations = array; - continue; - } - if (property.NameEquals("typeProperties"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - foreach (var property0 in property.Value.EnumerateObject()) - { - if (property0.NameEquals("endpoint"u8)) - { - endpoint = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("marketplaceID"u8)) - { - marketplaceId = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("sellerID"u8)) - { - sellerId = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("mwsAuthToken"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - mwsAuthToken = JsonSerializer.Deserialize(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("accessKeyId"u8)) - { - accessKeyId = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("secretKey"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - secretKey = JsonSerializer.Deserialize(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("useEncryptedEndpoints"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - useEncryptedEndpoints = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("useHostVerification"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - useHostVerification = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("usePeerVerification"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - usePeerVerification = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("encryptedCredential"u8)) - { - encryptedCredential = property0.Value.GetString(); - continue; - } - } - continue; - } - additionalPropertiesDictionary.Add(property.Name, JsonSerializer.Deserialize>(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); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/AmazonMwsLinkedService.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/AmazonMwsLinkedService.cs deleted file mode 100644 index 5d2e2ad7..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/AmazonMwsLinkedService.cs +++ /dev/null @@ -1,86 +0,0 @@ -// - -#nullable disable - -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// Amazon Marketplace Web Service linked service. - public partial class AmazonMwsLinkedService : DataFactoryLinkedServiceProperties - { - /// Initializes a new instance of AmazonMwsLinkedService. - /// The endpoint of the Amazon MWS server, (i.e. mws.amazonservices.com). - /// The Amazon Marketplace ID you want to retrieve data from. To retrieve data from multiple Marketplace IDs, separate them with a comma (,). (i.e. A2EUQ1WTGCTBG2). - /// The Amazon seller ID. - /// The access key id used to access data. - /// , , or is null. - public AmazonMwsLinkedService(DataFactoryElement endpoint, DataFactoryElement marketplaceId, DataFactoryElement sellerId, DataFactoryElement accessKeyId) - { - Argument.AssertNotNull(endpoint, nameof(endpoint)); - Argument.AssertNotNull(marketplaceId, nameof(marketplaceId)); - Argument.AssertNotNull(sellerId, nameof(sellerId)); - Argument.AssertNotNull(accessKeyId, nameof(accessKeyId)); - - Endpoint = endpoint; - MarketplaceId = marketplaceId; - SellerId = sellerId; - AccessKeyId = accessKeyId; - LinkedServiceType = "AmazonMWS"; - } - - /// Initializes a new instance of AmazonMwsLinkedService. - /// Type of linked service. - /// The integration runtime reference. - /// Linked service description. - /// Parameters for linked service. - /// List of tags that can be used for describing the linked service. - /// Additional Properties. - /// The endpoint of the Amazon MWS server, (i.e. mws.amazonservices.com). - /// The Amazon Marketplace ID you want to retrieve data from. To retrieve data from multiple Marketplace IDs, separate them with a comma (,). (i.e. A2EUQ1WTGCTBG2). - /// The Amazon seller ID. - /// The Amazon MWS authentication token. - /// The access key id used to access data. - /// The secret key used to access data. - /// Specifies whether the data source endpoints are encrypted using HTTPS. The default value is true. - /// 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. - /// Specifies whether to verify the identity of the server when connecting over SSL. The default value is true. - /// The encrypted credential used for authentication. Credentials are encrypted using the integration runtime credential manager. Type: string. - internal AmazonMwsLinkedService(string linkedServiceType, IntegrationRuntimeReference connectVia, string description, IDictionary parameters, IList annotations, IDictionary> additionalProperties, DataFactoryElement endpoint, DataFactoryElement marketplaceId, DataFactoryElement sellerId, DataFactorySecretBaseDefinition mwsAuthToken, DataFactoryElement accessKeyId, DataFactorySecretBaseDefinition secretKey, DataFactoryElement useEncryptedEndpoints, DataFactoryElement useHostVerification, DataFactoryElement usePeerVerification, string encryptedCredential) : base(linkedServiceType, connectVia, description, parameters, annotations, additionalProperties) - { - Endpoint = endpoint; - MarketplaceId = marketplaceId; - SellerId = sellerId; - MwsAuthToken = mwsAuthToken; - AccessKeyId = accessKeyId; - SecretKey = secretKey; - UseEncryptedEndpoints = useEncryptedEndpoints; - UseHostVerification = useHostVerification; - UsePeerVerification = usePeerVerification; - EncryptedCredential = encryptedCredential; - LinkedServiceType = linkedServiceType ?? "AmazonMWS"; - } - - /// The endpoint of the Amazon MWS server, (i.e. mws.amazonservices.com). - public DataFactoryElement Endpoint { get; set; } - /// The Amazon Marketplace ID you want to retrieve data from. To retrieve data from multiple Marketplace IDs, separate them with a comma (,). (i.e. A2EUQ1WTGCTBG2). - public DataFactoryElement MarketplaceId { get; set; } - /// The Amazon seller ID. - public DataFactoryElement SellerId { get; set; } - /// The Amazon MWS authentication token. - public DataFactorySecretBaseDefinition MwsAuthToken { get; set; } - /// The access key id used to access data. - public DataFactoryElement AccessKeyId { get; set; } - /// The secret key used to access data. - public DataFactorySecretBaseDefinition SecretKey { get; set; } - /// Specifies whether the data source endpoints are encrypted using HTTPS. The default value is true. - public DataFactoryElement UseEncryptedEndpoints { get; set; } - /// 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. - public DataFactoryElement UseHostVerification { get; set; } - /// Specifies whether to verify the identity of the server when connecting over SSL. The default value is true. - public DataFactoryElement UsePeerVerification { get; set; } - /// The encrypted credential used for authentication. Credentials are encrypted using the integration runtime credential manager. Type: string. - public string EncryptedCredential { get; set; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/AmazonMwsObjectDataset.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/AmazonMwsObjectDataset.Serialization.cs deleted file mode 100644 index 683768ec..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/AmazonMwsObjectDataset.Serialization.cs +++ /dev/null @@ -1,212 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class AmazonMwsObjectDataset : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - writer.WritePropertyName("type"u8); - writer.WriteStringValue(DatasetType); - if (Optional.IsDefined(Description)) - { - writer.WritePropertyName("description"u8); - writer.WriteStringValue(Description); - } - if (Optional.IsDefined(Structure)) - { - writer.WritePropertyName("structure"u8); - JsonSerializer.Serialize(writer, Structure); - } - if (Optional.IsDefined(Schema)) - { - writer.WritePropertyName("schema"u8); - JsonSerializer.Serialize(writer, Schema); - } - writer.WritePropertyName("linkedServiceName"u8); - JsonSerializer.Serialize(writer, LinkedServiceName); if (Optional.IsCollectionDefined(Parameters)) - { - writer.WritePropertyName("parameters"u8); - writer.WriteStartObject(); - foreach (var item in Parameters) - { - writer.WritePropertyName(item.Key); - writer.WriteObjectValue(item.Value); - } - writer.WriteEndObject(); - } - if (Optional.IsCollectionDefined(Annotations)) - { - writer.WritePropertyName("annotations"u8); - writer.WriteStartArray(); - foreach (var item in Annotations) - { - if (item == null) - { - writer.WriteNullValue(); - continue; - } -#if NET6_0_OR_GREATER - writer.WriteRawValue(item); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.ToString()).RootElement); -#endif - } - writer.WriteEndArray(); - } - if (Optional.IsDefined(Folder)) - { - writer.WritePropertyName("folder"u8); - writer.WriteObjectValue(Folder); - } - writer.WritePropertyName("typeProperties"u8); - writer.WriteStartObject(); - if (Optional.IsDefined(TableName)) - { - writer.WritePropertyName("tableName"u8); - JsonSerializer.Serialize(writer, TableName); - } - writer.WriteEndObject(); - foreach (var item in AdditionalProperties) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.Value.ToString()).RootElement); -#endif - } - writer.WriteEndObject(); - } - - internal static AmazonMwsObjectDataset DeserializeAmazonMwsObjectDataset(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - string type = default; - Optional description = default; - Optional>> structure = default; - Optional>> schema = default; - DataFactoryLinkedServiceReference linkedServiceName = default; - Optional> parameters = default; - Optional> annotations = default; - Optional folder = default; - Optional> tableName = default; - IDictionary> additionalProperties = default; - Dictionary> additionalPropertiesDictionary = new Dictionary>(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("type"u8)) - { - type = property.Value.GetString(); - continue; - } - if (property.NameEquals("description"u8)) - { - description = property.Value.GetString(); - continue; - } - if (property.NameEquals("structure"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - structure = JsonSerializer.Deserialize>>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("schema"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - schema = JsonSerializer.Deserialize>>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("linkedServiceName"u8)) - { - linkedServiceName = JsonSerializer.Deserialize(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("parameters"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - Dictionary dictionary = new Dictionary(); - foreach (var property0 in property.Value.EnumerateObject()) - { - dictionary.Add(property0.Name, EntityParameterSpecification.DeserializeEntityParameterSpecification(property0.Value)); - } - parameters = dictionary; - continue; - } - if (property.NameEquals("annotations"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - if (item.ValueKind == JsonValueKind.Null) - { - array.Add(null); - } - else - { - array.Add(BinaryData.FromString(item.GetRawText())); - } - } - annotations = array; - continue; - } - if (property.NameEquals("folder"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - folder = DatasetFolder.DeserializeDatasetFolder(property.Value); - continue; - } - if (property.NameEquals("typeProperties"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - foreach (var property0 in property.Value.EnumerateObject()) - { - if (property0.NameEquals("tableName"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - tableName = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - } - continue; - } - additionalPropertiesDictionary.Add(property.Name, JsonSerializer.Deserialize>(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); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/AmazonMwsObjectDataset.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/AmazonMwsObjectDataset.cs deleted file mode 100644 index 8a08bb3a..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/AmazonMwsObjectDataset.cs +++ /dev/null @@ -1,43 +0,0 @@ -// - -#nullable disable - -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// Amazon Marketplace Web Service dataset. - public partial class AmazonMwsObjectDataset : DataFactoryDatasetProperties - { - /// Initializes a new instance of AmazonMwsObjectDataset. - /// Linked service reference. - /// is null. - public AmazonMwsObjectDataset(DataFactoryLinkedServiceReference linkedServiceName) : base(linkedServiceName) - { - Argument.AssertNotNull(linkedServiceName, nameof(linkedServiceName)); - - DatasetType = "AmazonMWSObject"; - } - - /// Initializes a new instance of AmazonMwsObjectDataset. - /// Type of dataset. - /// Dataset description. - /// Columns that define the structure of the dataset. Type: array (or Expression with resultType array), itemType: DatasetDataElement. - /// Columns that define the physical type schema of the dataset. Type: array (or Expression with resultType array), itemType: DatasetSchemaDataElement. - /// Linked service reference. - /// Parameters for dataset. - /// List of tags that can be used for describing the Dataset. - /// The folder that this Dataset is in. If not specified, Dataset will appear at the root level. - /// Additional Properties. - /// The table name. Type: string (or Expression with resultType string). - internal AmazonMwsObjectDataset(string datasetType, string description, DataFactoryElement> structure, DataFactoryElement> schema, DataFactoryLinkedServiceReference linkedServiceName, IDictionary parameters, IList annotations, DatasetFolder folder, IDictionary> additionalProperties, DataFactoryElement tableName) : base(datasetType, description, structure, schema, linkedServiceName, parameters, annotations, folder, additionalProperties) - { - TableName = tableName; - DatasetType = datasetType ?? "AmazonMWSObject"; - } - - /// The table name. Type: string (or Expression with resultType string). - public DataFactoryElement TableName { get; set; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/AmazonMwsSource.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/AmazonMwsSource.Serialization.cs deleted file mode 100644 index 027a223f..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/AmazonMwsSource.Serialization.cs +++ /dev/null @@ -1,161 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class AmazonMwsSource : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - if (Optional.IsDefined(Query)) - { - writer.WritePropertyName("query"u8); - JsonSerializer.Serialize(writer, Query); - } - if (Optional.IsDefined(QueryTimeout)) - { - writer.WritePropertyName("queryTimeout"u8); - JsonSerializer.Serialize(writer, QueryTimeout); - } - if (Optional.IsDefined(AdditionalColumns)) - { - writer.WritePropertyName("additionalColumns"u8); -#if NET6_0_OR_GREATER - writer.WriteRawValue(AdditionalColumns); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(AdditionalColumns.ToString()).RootElement); -#endif - } - writer.WritePropertyName("type"u8); - writer.WriteStringValue(CopySourceType); - if (Optional.IsDefined(SourceRetryCount)) - { - writer.WritePropertyName("sourceRetryCount"u8); - JsonSerializer.Serialize(writer, SourceRetryCount); - } - if (Optional.IsDefined(SourceRetryWait)) - { - writer.WritePropertyName("sourceRetryWait"u8); - JsonSerializer.Serialize(writer, SourceRetryWait); - } - if (Optional.IsDefined(MaxConcurrentConnections)) - { - writer.WritePropertyName("maxConcurrentConnections"u8); - JsonSerializer.Serialize(writer, MaxConcurrentConnections); - } - if (Optional.IsDefined(DisableMetricsCollection)) - { - writer.WritePropertyName("disableMetricsCollection"u8); - JsonSerializer.Serialize(writer, DisableMetricsCollection); - } - foreach (var item in AdditionalProperties) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.Value.ToString()).RootElement); -#endif - } - writer.WriteEndObject(); - } - - internal static AmazonMwsSource DeserializeAmazonMwsSource(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - Optional> query = default; - Optional> queryTimeout = default; - Optional additionalColumns = default; - string type = default; - Optional> sourceRetryCount = default; - Optional> sourceRetryWait = default; - Optional> maxConcurrentConnections = default; - Optional> disableMetricsCollection = default; - IDictionary> additionalProperties = default; - Dictionary> additionalPropertiesDictionary = new Dictionary>(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("query"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - query = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("queryTimeout"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - queryTimeout = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("additionalColumns"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - additionalColumns = BinaryData.FromString(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("type"u8)) - { - type = property.Value.GetString(); - continue; - } - if (property.NameEquals("sourceRetryCount"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - sourceRetryCount = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("sourceRetryWait"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - sourceRetryWait = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("maxConcurrentConnections"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - maxConcurrentConnections = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("disableMetricsCollection"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - disableMetricsCollection = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - additionalPropertiesDictionary.Add(property.Name, JsonSerializer.Deserialize>(property.Value.GetRawText())); - } - additionalProperties = additionalPropertiesDictionary; - return new AmazonMwsSource(type, sourceRetryCount.Value, sourceRetryWait.Value, maxConcurrentConnections.Value, disableMetricsCollection.Value, additionalProperties, queryTimeout.Value, additionalColumns.Value, query.Value); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/AmazonMwsSource.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/AmazonMwsSource.cs deleted file mode 100644 index a6ade747..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/AmazonMwsSource.cs +++ /dev/null @@ -1,37 +0,0 @@ -// - -#nullable disable - -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// A copy activity Amazon Marketplace Web Service source. - public partial class AmazonMwsSource : TabularSource - { - /// Initializes a new instance of AmazonMwsSource. - public AmazonMwsSource() - { - CopySourceType = "AmazonMWSSource"; - } - - /// Initializes a new instance of AmazonMwsSource. - /// Copy source type. - /// Source retry count. Type: integer (or Expression with resultType integer). - /// Source retry wait. Type: string (or Expression with resultType string), pattern: ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). - /// The maximum concurrent connection count for the source data store. Type: integer (or Expression with resultType integer). - /// If true, disable data store metrics collection. Default is false. Type: boolean (or Expression with resultType boolean). - /// Additional Properties. - /// 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). - /// A query to retrieve data from source. Type: string (or Expression with resultType string). - internal AmazonMwsSource(string copySourceType, DataFactoryElement sourceRetryCount, DataFactoryElement sourceRetryWait, DataFactoryElement maxConcurrentConnections, DataFactoryElement disableMetricsCollection, IDictionary> additionalProperties, DataFactoryElement queryTimeout, BinaryData additionalColumns, DataFactoryElement query) : base(copySourceType, sourceRetryCount, sourceRetryWait, maxConcurrentConnections, disableMetricsCollection, additionalProperties, queryTimeout, additionalColumns) - { - Query = query; - CopySourceType = copySourceType ?? "AmazonMWSSource"; - } - - /// A query to retrieve data from source. Type: string (or Expression with resultType string). - public DataFactoryElement Query { get; set; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/AmazonRdsForOracleLinkedService.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/AmazonRdsForOracleLinkedService.Serialization.cs deleted file mode 100644 index 36c16333..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/AmazonRdsForOracleLinkedService.Serialization.cs +++ /dev/null @@ -1,194 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class AmazonRdsForOracleLinkedService : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - writer.WritePropertyName("type"u8); - writer.WriteStringValue(LinkedServiceType); - if (Optional.IsDefined(ConnectVia)) - { - writer.WritePropertyName("connectVia"u8); - writer.WriteObjectValue(ConnectVia); - } - if (Optional.IsDefined(Description)) - { - writer.WritePropertyName("description"u8); - writer.WriteStringValue(Description); - } - if (Optional.IsCollectionDefined(Parameters)) - { - writer.WritePropertyName("parameters"u8); - writer.WriteStartObject(); - foreach (var item in Parameters) - { - writer.WritePropertyName(item.Key); - writer.WriteObjectValue(item.Value); - } - writer.WriteEndObject(); - } - if (Optional.IsCollectionDefined(Annotations)) - { - writer.WritePropertyName("annotations"u8); - writer.WriteStartArray(); - foreach (var item in Annotations) - { - if (item == null) - { - writer.WriteNullValue(); - continue; - } -#if NET6_0_OR_GREATER - writer.WriteRawValue(item); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.ToString()).RootElement); -#endif - } - writer.WriteEndArray(); - } - writer.WritePropertyName("typeProperties"u8); - writer.WriteStartObject(); - writer.WritePropertyName("connectionString"u8); - JsonSerializer.Serialize(writer, ConnectionString); - if (Optional.IsDefined(Password)) - { - writer.WritePropertyName("password"u8); - JsonSerializer.Serialize(writer, Password); - } - if (Optional.IsDefined(EncryptedCredential)) - { - writer.WritePropertyName("encryptedCredential"u8); - writer.WriteStringValue(EncryptedCredential); - } - writer.WriteEndObject(); - foreach (var item in AdditionalProperties) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.Value.ToString()).RootElement); -#endif - } - writer.WriteEndObject(); - } - - internal static AmazonRdsForOracleLinkedService DeserializeAmazonRdsForOracleLinkedService(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - string type = default; - Optional connectVia = default; - Optional description = default; - Optional> parameters = default; - Optional> annotations = default; - DataFactoryElement connectionString = default; - Optional password = default; - Optional encryptedCredential = default; - IDictionary> additionalProperties = default; - Dictionary> additionalPropertiesDictionary = new Dictionary>(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("type"u8)) - { - type = property.Value.GetString(); - continue; - } - if (property.NameEquals("connectVia"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - connectVia = IntegrationRuntimeReference.DeserializeIntegrationRuntimeReference(property.Value); - continue; - } - if (property.NameEquals("description"u8)) - { - description = property.Value.GetString(); - continue; - } - if (property.NameEquals("parameters"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - Dictionary dictionary = new Dictionary(); - foreach (var property0 in property.Value.EnumerateObject()) - { - dictionary.Add(property0.Name, EntityParameterSpecification.DeserializeEntityParameterSpecification(property0.Value)); - } - parameters = dictionary; - continue; - } - if (property.NameEquals("annotations"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - if (item.ValueKind == JsonValueKind.Null) - { - array.Add(null); - } - else - { - array.Add(BinaryData.FromString(item.GetRawText())); - } - } - annotations = array; - continue; - } - if (property.NameEquals("typeProperties"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - foreach (var property0 in property.Value.EnumerateObject()) - { - if (property0.NameEquals("connectionString"u8)) - { - connectionString = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("password"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - password = JsonSerializer.Deserialize(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("encryptedCredential"u8)) - { - encryptedCredential = property0.Value.GetString(); - continue; - } - } - continue; - } - additionalPropertiesDictionary.Add(property.Name, JsonSerializer.Deserialize>(property.Value.GetRawText())); - } - additionalProperties = additionalPropertiesDictionary; - return new AmazonRdsForOracleLinkedService(type, connectVia.Value, description.Value, Optional.ToDictionary(parameters), Optional.ToList(annotations), additionalProperties, connectionString, password, encryptedCredential.Value); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/AmazonRdsForOracleLinkedService.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/AmazonRdsForOracleLinkedService.cs deleted file mode 100644 index 8bf01b11..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/AmazonRdsForOracleLinkedService.cs +++ /dev/null @@ -1,49 +0,0 @@ -// - -#nullable disable - -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// AmazonRdsForOracle database. - public partial class AmazonRdsForOracleLinkedService : DataFactoryLinkedServiceProperties - { - /// Initializes a new instance of AmazonRdsForOracleLinkedService. - /// The connection string. Type: string, SecureString or AzureKeyVaultSecretReference. - /// is null. - public AmazonRdsForOracleLinkedService(DataFactoryElement connectionString) - { - Argument.AssertNotNull(connectionString, nameof(connectionString)); - - ConnectionString = connectionString; - LinkedServiceType = "AmazonRdsForOracle"; - } - - /// Initializes a new instance of AmazonRdsForOracleLinkedService. - /// Type of linked service. - /// The integration runtime reference. - /// Linked service description. - /// Parameters for linked service. - /// List of tags that can be used for describing the linked service. - /// Additional Properties. - /// The connection string. Type: string, SecureString or AzureKeyVaultSecretReference. - /// The Azure key vault secret reference of password in connection string. - /// The encrypted credential used for authentication. Credentials are encrypted using the integration runtime credential manager. Type: string. - internal AmazonRdsForOracleLinkedService(string linkedServiceType, IntegrationRuntimeReference connectVia, string description, IDictionary parameters, IList annotations, IDictionary> additionalProperties, DataFactoryElement connectionString, DataFactorySecretBaseDefinition password, string encryptedCredential) : base(linkedServiceType, connectVia, description, parameters, annotations, additionalProperties) - { - ConnectionString = connectionString; - Password = password; - EncryptedCredential = encryptedCredential; - LinkedServiceType = linkedServiceType ?? "AmazonRdsForOracle"; - } - - /// The connection string. Type: string, SecureString or AzureKeyVaultSecretReference. - public DataFactoryElement ConnectionString { get; set; } - /// The Azure key vault secret reference of password in connection string. - public DataFactorySecretBaseDefinition Password { get; set; } - /// The encrypted credential used for authentication. Credentials are encrypted using the integration runtime credential manager. Type: string. - public string EncryptedCredential { get; set; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/AmazonRdsForOraclePartitionSettings.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/AmazonRdsForOraclePartitionSettings.Serialization.cs deleted file mode 100644 index 055a83e2..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/AmazonRdsForOraclePartitionSettings.Serialization.cs +++ /dev/null @@ -1,95 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class AmazonRdsForOraclePartitionSettings : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - if (Optional.IsDefined(PartitionNames)) - { - writer.WritePropertyName("partitionNames"u8); -#if NET6_0_OR_GREATER - writer.WriteRawValue(PartitionNames); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(PartitionNames.ToString()).RootElement); -#endif - } - if (Optional.IsDefined(PartitionColumnName)) - { - writer.WritePropertyName("partitionColumnName"u8); - JsonSerializer.Serialize(writer, PartitionColumnName); - } - if (Optional.IsDefined(PartitionUpperBound)) - { - writer.WritePropertyName("partitionUpperBound"u8); - JsonSerializer.Serialize(writer, PartitionUpperBound); - } - if (Optional.IsDefined(PartitionLowerBound)) - { - writer.WritePropertyName("partitionLowerBound"u8); - JsonSerializer.Serialize(writer, PartitionLowerBound); - } - writer.WriteEndObject(); - } - - internal static AmazonRdsForOraclePartitionSettings DeserializeAmazonRdsForOraclePartitionSettings(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - Optional partitionNames = default; - Optional> partitionColumnName = default; - Optional> partitionUpperBound = default; - Optional> partitionLowerBound = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("partitionNames"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - partitionNames = BinaryData.FromString(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("partitionColumnName"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - partitionColumnName = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("partitionUpperBound"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - partitionUpperBound = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("partitionLowerBound"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - partitionLowerBound = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - } - return new AmazonRdsForOraclePartitionSettings(partitionNames.Value, partitionColumnName.Value, partitionUpperBound.Value, partitionLowerBound.Value); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/AmazonRdsForOraclePartitionSettings.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/AmazonRdsForOraclePartitionSettings.cs deleted file mode 100644 index 4393b7e1..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/AmazonRdsForOraclePartitionSettings.cs +++ /dev/null @@ -1,68 +0,0 @@ -// - -#nullable disable - -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// The settings that will be leveraged for AmazonRdsForOracle source partitioning. - public partial class AmazonRdsForOraclePartitionSettings - { - /// Initializes a new instance of AmazonRdsForOraclePartitionSettings. - public AmazonRdsForOraclePartitionSettings() - { - } - - /// Initializes a new instance of AmazonRdsForOraclePartitionSettings. - /// Names of the physical partitions of AmazonRdsForOracle table. - /// The name of the column in integer type that will be used for proceeding range partitioning. Type: string (or Expression with resultType string). - /// The maximum value of column specified in partitionColumnName that will be used for proceeding range partitioning. Type: string (or Expression with resultType string). - /// The minimum value of column specified in partitionColumnName that will be used for proceeding range partitioning. Type: string (or Expression with resultType string). - internal AmazonRdsForOraclePartitionSettings(BinaryData partitionNames, DataFactoryElement partitionColumnName, DataFactoryElement partitionUpperBound, DataFactoryElement partitionLowerBound) - { - PartitionNames = partitionNames; - PartitionColumnName = partitionColumnName; - PartitionUpperBound = partitionUpperBound; - PartitionLowerBound = partitionLowerBound; - } - - /// - /// Names of the physical partitions of AmazonRdsForOracle table. - /// - /// To assign an object to this property use . - /// - /// - /// To assign an already formated json string to this property use . - /// - /// - /// Examples: - /// - /// - /// BinaryData.FromObjectAsJson("foo") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromString("\"foo\"") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromObjectAsJson(new { key = "value" }) - /// Creates a payload of { "key": "value" }. - /// - /// - /// BinaryData.FromString("{\"key\": \"value\"}") - /// Creates a payload of { "key": "value" }. - /// - /// - /// - /// - public BinaryData PartitionNames { get; set; } - /// The name of the column in integer type that will be used for proceeding range partitioning. Type: string (or Expression with resultType string). - public DataFactoryElement PartitionColumnName { get; set; } - /// The maximum value of column specified in partitionColumnName that will be used for proceeding range partitioning. Type: string (or Expression with resultType string). - public DataFactoryElement PartitionUpperBound { get; set; } - /// The minimum value of column specified in partitionColumnName that will be used for proceeding range partitioning. Type: string (or Expression with resultType string). - public DataFactoryElement PartitionLowerBound { get; set; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/AmazonRdsForOracleSource.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/AmazonRdsForOracleSource.Serialization.cs deleted file mode 100644 index 263c0538..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/AmazonRdsForOracleSource.Serialization.cs +++ /dev/null @@ -1,191 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class AmazonRdsForOracleSource : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - if (Optional.IsDefined(OracleReaderQuery)) - { - writer.WritePropertyName("oracleReaderQuery"u8); - JsonSerializer.Serialize(writer, OracleReaderQuery); - } - if (Optional.IsDefined(QueryTimeout)) - { - writer.WritePropertyName("queryTimeout"u8); - JsonSerializer.Serialize(writer, QueryTimeout); - } - if (Optional.IsDefined(PartitionOption)) - { - writer.WritePropertyName("partitionOption"u8); - JsonSerializer.Serialize(writer, PartitionOption); - } - if (Optional.IsDefined(PartitionSettings)) - { - writer.WritePropertyName("partitionSettings"u8); - writer.WriteObjectValue(PartitionSettings); - } - if (Optional.IsDefined(AdditionalColumns)) - { - writer.WritePropertyName("additionalColumns"u8); -#if NET6_0_OR_GREATER - writer.WriteRawValue(AdditionalColumns); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(AdditionalColumns.ToString()).RootElement); -#endif - } - writer.WritePropertyName("type"u8); - writer.WriteStringValue(CopySourceType); - if (Optional.IsDefined(SourceRetryCount)) - { - writer.WritePropertyName("sourceRetryCount"u8); - JsonSerializer.Serialize(writer, SourceRetryCount); - } - if (Optional.IsDefined(SourceRetryWait)) - { - writer.WritePropertyName("sourceRetryWait"u8); - JsonSerializer.Serialize(writer, SourceRetryWait); - } - if (Optional.IsDefined(MaxConcurrentConnections)) - { - writer.WritePropertyName("maxConcurrentConnections"u8); - JsonSerializer.Serialize(writer, MaxConcurrentConnections); - } - if (Optional.IsDefined(DisableMetricsCollection)) - { - writer.WritePropertyName("disableMetricsCollection"u8); - JsonSerializer.Serialize(writer, DisableMetricsCollection); - } - foreach (var item in AdditionalProperties) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.Value.ToString()).RootElement); -#endif - } - writer.WriteEndObject(); - } - - internal static AmazonRdsForOracleSource DeserializeAmazonRdsForOracleSource(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - Optional> oracleReaderQuery = default; - Optional> queryTimeout = default; - Optional> partitionOption = default; - Optional partitionSettings = default; - Optional additionalColumns = default; - string type = default; - Optional> sourceRetryCount = default; - Optional> sourceRetryWait = default; - Optional> maxConcurrentConnections = default; - Optional> disableMetricsCollection = default; - IDictionary> additionalProperties = default; - Dictionary> additionalPropertiesDictionary = new Dictionary>(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("oracleReaderQuery"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - oracleReaderQuery = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("queryTimeout"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - queryTimeout = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("partitionOption"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - partitionOption = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("partitionSettings"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - partitionSettings = AmazonRdsForOraclePartitionSettings.DeserializeAmazonRdsForOraclePartitionSettings(property.Value); - continue; - } - if (property.NameEquals("additionalColumns"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - additionalColumns = BinaryData.FromString(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("type"u8)) - { - type = property.Value.GetString(); - continue; - } - if (property.NameEquals("sourceRetryCount"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - sourceRetryCount = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("sourceRetryWait"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - sourceRetryWait = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("maxConcurrentConnections"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - maxConcurrentConnections = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("disableMetricsCollection"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - disableMetricsCollection = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - additionalPropertiesDictionary.Add(property.Name, JsonSerializer.Deserialize>(property.Value.GetRawText())); - } - additionalProperties = additionalPropertiesDictionary; - return new AmazonRdsForOracleSource(type, sourceRetryCount.Value, sourceRetryWait.Value, maxConcurrentConnections.Value, disableMetricsCollection.Value, additionalProperties, oracleReaderQuery.Value, queryTimeout.Value, partitionOption.Value, partitionSettings.Value, additionalColumns.Value); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/AmazonRdsForOracleSource.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/AmazonRdsForOracleSource.cs deleted file mode 100644 index a0c36233..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/AmazonRdsForOracleSource.cs +++ /dev/null @@ -1,80 +0,0 @@ -// - -#nullable disable - -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// A copy activity AmazonRdsForOracle source. - public partial class AmazonRdsForOracleSource : CopyActivitySource - { - /// Initializes a new instance of AmazonRdsForOracleSource. - public AmazonRdsForOracleSource() - { - CopySourceType = "AmazonRdsForOracleSource"; - } - - /// Initializes a new instance of AmazonRdsForOracleSource. - /// Copy source type. - /// Source retry count. Type: integer (or Expression with resultType integer). - /// Source retry wait. Type: string (or Expression with resultType string), pattern: ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). - /// The maximum concurrent connection count for the source data store. Type: integer (or Expression with resultType integer). - /// If true, disable data store metrics collection. Default is false. Type: boolean (or Expression with resultType boolean). - /// Additional Properties. - /// AmazonRdsForOracle reader query. Type: string (or Expression with resultType string). - /// Query timeout. Type: string (or Expression with resultType string), pattern: ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). - /// The partition mechanism that will be used for AmazonRdsForOracle read in parallel. Type: string (or Expression with resultType string). - /// The settings that will be leveraged for AmazonRdsForOracle source partitioning. - /// Specifies the additional columns to be added to source data. Type: array of objects(AdditionalColumns) (or Expression with resultType array of objects). - internal AmazonRdsForOracleSource(string copySourceType, DataFactoryElement sourceRetryCount, DataFactoryElement sourceRetryWait, DataFactoryElement maxConcurrentConnections, DataFactoryElement disableMetricsCollection, IDictionary> additionalProperties, DataFactoryElement oracleReaderQuery, DataFactoryElement queryTimeout, DataFactoryElement partitionOption, AmazonRdsForOraclePartitionSettings partitionSettings, BinaryData additionalColumns) : base(copySourceType, sourceRetryCount, sourceRetryWait, maxConcurrentConnections, disableMetricsCollection, additionalProperties) - { - OracleReaderQuery = oracleReaderQuery; - QueryTimeout = queryTimeout; - PartitionOption = partitionOption; - PartitionSettings = partitionSettings; - AdditionalColumns = additionalColumns; - CopySourceType = copySourceType ?? "AmazonRdsForOracleSource"; - } - - /// AmazonRdsForOracle reader query. Type: string (or Expression with resultType string). - public DataFactoryElement OracleReaderQuery { get; set; } - /// Query timeout. Type: string (or Expression with resultType string), pattern: ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). - public DataFactoryElement QueryTimeout { get; set; } - /// The partition mechanism that will be used for AmazonRdsForOracle read in parallel. Type: string (or Expression with resultType string). - public DataFactoryElement PartitionOption { get; set; } - /// The settings that will be leveraged for AmazonRdsForOracle source partitioning. - public AmazonRdsForOraclePartitionSettings PartitionSettings { get; set; } - /// - /// Specifies the additional columns to be added to source data. Type: array of objects(AdditionalColumns) (or Expression with resultType array of objects). - /// - /// To assign an object to this property use . - /// - /// - /// To assign an already formated json string to this property use . - /// - /// - /// Examples: - /// - /// - /// BinaryData.FromObjectAsJson("foo") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromString("\"foo\"") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromObjectAsJson(new { key = "value" }) - /// Creates a payload of { "key": "value" }. - /// - /// - /// BinaryData.FromString("{\"key\": \"value\"}") - /// Creates a payload of { "key": "value" }. - /// - /// - /// - /// - public BinaryData AdditionalColumns { get; set; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/AmazonRdsForOracleTableDataset.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/AmazonRdsForOracleTableDataset.Serialization.cs deleted file mode 100644 index 94f373f9..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/AmazonRdsForOracleTableDataset.Serialization.cs +++ /dev/null @@ -1,227 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class AmazonRdsForOracleTableDataset : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - writer.WritePropertyName("type"u8); - writer.WriteStringValue(DatasetType); - if (Optional.IsDefined(Description)) - { - writer.WritePropertyName("description"u8); - writer.WriteStringValue(Description); - } - if (Optional.IsDefined(Structure)) - { - writer.WritePropertyName("structure"u8); - JsonSerializer.Serialize(writer, Structure); - } - if (Optional.IsDefined(Schema)) - { - writer.WritePropertyName("schema"u8); - JsonSerializer.Serialize(writer, Schema); - } - writer.WritePropertyName("linkedServiceName"u8); - JsonSerializer.Serialize(writer, LinkedServiceName); if (Optional.IsCollectionDefined(Parameters)) - { - writer.WritePropertyName("parameters"u8); - writer.WriteStartObject(); - foreach (var item in Parameters) - { - writer.WritePropertyName(item.Key); - writer.WriteObjectValue(item.Value); - } - writer.WriteEndObject(); - } - if (Optional.IsCollectionDefined(Annotations)) - { - writer.WritePropertyName("annotations"u8); - writer.WriteStartArray(); - foreach (var item in Annotations) - { - if (item == null) - { - writer.WriteNullValue(); - continue; - } -#if NET6_0_OR_GREATER - writer.WriteRawValue(item); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.ToString()).RootElement); -#endif - } - writer.WriteEndArray(); - } - if (Optional.IsDefined(Folder)) - { - writer.WritePropertyName("folder"u8); - writer.WriteObjectValue(Folder); - } - writer.WritePropertyName("typeProperties"u8); - writer.WriteStartObject(); - if (Optional.IsDefined(SchemaTypePropertiesSchema)) - { - writer.WritePropertyName("schema"u8); - JsonSerializer.Serialize(writer, SchemaTypePropertiesSchema); - } - if (Optional.IsDefined(Table)) - { - writer.WritePropertyName("table"u8); - JsonSerializer.Serialize(writer, Table); - } - writer.WriteEndObject(); - foreach (var item in AdditionalProperties) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.Value.ToString()).RootElement); -#endif - } - writer.WriteEndObject(); - } - - internal static AmazonRdsForOracleTableDataset DeserializeAmazonRdsForOracleTableDataset(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - string type = default; - Optional description = default; - Optional>> structure = default; - Optional>> schema = default; - DataFactoryLinkedServiceReference linkedServiceName = default; - Optional> parameters = default; - Optional> annotations = default; - Optional folder = default; - Optional> schema0 = default; - Optional> table = default; - IDictionary> additionalProperties = default; - Dictionary> additionalPropertiesDictionary = new Dictionary>(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("type"u8)) - { - type = property.Value.GetString(); - continue; - } - if (property.NameEquals("description"u8)) - { - description = property.Value.GetString(); - continue; - } - if (property.NameEquals("structure"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - structure = JsonSerializer.Deserialize>>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("schema"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - schema = JsonSerializer.Deserialize>>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("linkedServiceName"u8)) - { - linkedServiceName = JsonSerializer.Deserialize(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("parameters"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - Dictionary dictionary = new Dictionary(); - foreach (var property0 in property.Value.EnumerateObject()) - { - dictionary.Add(property0.Name, EntityParameterSpecification.DeserializeEntityParameterSpecification(property0.Value)); - } - parameters = dictionary; - continue; - } - if (property.NameEquals("annotations"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - if (item.ValueKind == JsonValueKind.Null) - { - array.Add(null); - } - else - { - array.Add(BinaryData.FromString(item.GetRawText())); - } - } - annotations = array; - continue; - } - if (property.NameEquals("folder"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - folder = DatasetFolder.DeserializeDatasetFolder(property.Value); - continue; - } - if (property.NameEquals("typeProperties"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - foreach (var property0 in property.Value.EnumerateObject()) - { - if (property0.NameEquals("schema"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - schema0 = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("table"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - table = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - } - continue; - } - additionalPropertiesDictionary.Add(property.Name, JsonSerializer.Deserialize>(property.Value.GetRawText())); - } - additionalProperties = additionalPropertiesDictionary; - return new AmazonRdsForOracleTableDataset(type, description.Value, structure.Value, schema.Value, linkedServiceName, Optional.ToDictionary(parameters), Optional.ToList(annotations), folder.Value, additionalProperties, schema0.Value, table.Value); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/AmazonRdsForOracleTableDataset.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/AmazonRdsForOracleTableDataset.cs deleted file mode 100644 index d3922140..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/AmazonRdsForOracleTableDataset.cs +++ /dev/null @@ -1,47 +0,0 @@ -// - -#nullable disable - -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// The AmazonRdsForOracle database dataset. - public partial class AmazonRdsForOracleTableDataset : DataFactoryDatasetProperties - { - /// Initializes a new instance of AmazonRdsForOracleTableDataset. - /// Linked service reference. - /// is null. - public AmazonRdsForOracleTableDataset(DataFactoryLinkedServiceReference linkedServiceName) : base(linkedServiceName) - { - Argument.AssertNotNull(linkedServiceName, nameof(linkedServiceName)); - - DatasetType = "AmazonRdsForOracleTable"; - } - - /// Initializes a new instance of AmazonRdsForOracleTableDataset. - /// Type of dataset. - /// Dataset description. - /// Columns that define the structure of the dataset. Type: array (or Expression with resultType array), itemType: DatasetDataElement. - /// Columns that define the physical type schema of the dataset. Type: array (or Expression with resultType array), itemType: DatasetSchemaDataElement. - /// Linked service reference. - /// Parameters for dataset. - /// List of tags that can be used for describing the Dataset. - /// The folder that this Dataset is in. If not specified, Dataset will appear at the root level. - /// Additional Properties. - /// The schema name of the AmazonRdsForOracle database. Type: string (or Expression with resultType string). - /// The table name of the AmazonRdsForOracle database. Type: string (or Expression with resultType string). - internal AmazonRdsForOracleTableDataset(string datasetType, string description, DataFactoryElement> structure, DataFactoryElement> schema, DataFactoryLinkedServiceReference linkedServiceName, IDictionary parameters, IList annotations, DatasetFolder folder, IDictionary> additionalProperties, DataFactoryElement schemaTypePropertiesSchema, DataFactoryElement table) : base(datasetType, description, structure, schema, linkedServiceName, parameters, annotations, folder, additionalProperties) - { - SchemaTypePropertiesSchema = schemaTypePropertiesSchema; - Table = table; - DatasetType = datasetType ?? "AmazonRdsForOracleTable"; - } - - /// The schema name of the AmazonRdsForOracle database. Type: string (or Expression with resultType string). - public DataFactoryElement SchemaTypePropertiesSchema { get; set; } - /// The table name of the AmazonRdsForOracle database. Type: string (or Expression with resultType string). - public DataFactoryElement Table { get; set; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/AmazonRdsForSqlServerLinkedService.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/AmazonRdsForSqlServerLinkedService.Serialization.cs deleted file mode 100644 index 08c33929..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/AmazonRdsForSqlServerLinkedService.Serialization.cs +++ /dev/null @@ -1,224 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class AmazonRdsForSqlServerLinkedService : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - writer.WritePropertyName("type"u8); - writer.WriteStringValue(LinkedServiceType); - if (Optional.IsDefined(ConnectVia)) - { - writer.WritePropertyName("connectVia"u8); - writer.WriteObjectValue(ConnectVia); - } - if (Optional.IsDefined(Description)) - { - writer.WritePropertyName("description"u8); - writer.WriteStringValue(Description); - } - if (Optional.IsCollectionDefined(Parameters)) - { - writer.WritePropertyName("parameters"u8); - writer.WriteStartObject(); - foreach (var item in Parameters) - { - writer.WritePropertyName(item.Key); - writer.WriteObjectValue(item.Value); - } - writer.WriteEndObject(); - } - if (Optional.IsCollectionDefined(Annotations)) - { - writer.WritePropertyName("annotations"u8); - writer.WriteStartArray(); - foreach (var item in Annotations) - { - if (item == null) - { - writer.WriteNullValue(); - continue; - } -#if NET6_0_OR_GREATER - writer.WriteRawValue(item); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.ToString()).RootElement); -#endif - } - writer.WriteEndArray(); - } - writer.WritePropertyName("typeProperties"u8); - writer.WriteStartObject(); - writer.WritePropertyName("connectionString"u8); - JsonSerializer.Serialize(writer, ConnectionString); - if (Optional.IsDefined(UserName)) - { - writer.WritePropertyName("userName"u8); - JsonSerializer.Serialize(writer, UserName); - } - if (Optional.IsDefined(Password)) - { - writer.WritePropertyName("password"u8); - JsonSerializer.Serialize(writer, Password); - } - if (Optional.IsDefined(EncryptedCredential)) - { - writer.WritePropertyName("encryptedCredential"u8); - writer.WriteStringValue(EncryptedCredential); - } - if (Optional.IsDefined(AlwaysEncryptedSettings)) - { - writer.WritePropertyName("alwaysEncryptedSettings"u8); - writer.WriteObjectValue(AlwaysEncryptedSettings); - } - writer.WriteEndObject(); - foreach (var item in AdditionalProperties) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.Value.ToString()).RootElement); -#endif - } - writer.WriteEndObject(); - } - - internal static AmazonRdsForSqlServerLinkedService DeserializeAmazonRdsForSqlServerLinkedService(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - string type = default; - Optional connectVia = default; - Optional description = default; - Optional> parameters = default; - Optional> annotations = default; - DataFactoryElement connectionString = default; - Optional> userName = default; - Optional password = default; - Optional encryptedCredential = default; - Optional alwaysEncryptedSettings = default; - IDictionary> additionalProperties = default; - Dictionary> additionalPropertiesDictionary = new Dictionary>(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("type"u8)) - { - type = property.Value.GetString(); - continue; - } - if (property.NameEquals("connectVia"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - connectVia = IntegrationRuntimeReference.DeserializeIntegrationRuntimeReference(property.Value); - continue; - } - if (property.NameEquals("description"u8)) - { - description = property.Value.GetString(); - continue; - } - if (property.NameEquals("parameters"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - Dictionary dictionary = new Dictionary(); - foreach (var property0 in property.Value.EnumerateObject()) - { - dictionary.Add(property0.Name, EntityParameterSpecification.DeserializeEntityParameterSpecification(property0.Value)); - } - parameters = dictionary; - continue; - } - if (property.NameEquals("annotations"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - if (item.ValueKind == JsonValueKind.Null) - { - array.Add(null); - } - else - { - array.Add(BinaryData.FromString(item.GetRawText())); - } - } - annotations = array; - continue; - } - if (property.NameEquals("typeProperties"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - foreach (var property0 in property.Value.EnumerateObject()) - { - if (property0.NameEquals("connectionString"u8)) - { - connectionString = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("userName"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - userName = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("password"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - password = JsonSerializer.Deserialize(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("encryptedCredential"u8)) - { - encryptedCredential = property0.Value.GetString(); - continue; - } - if (property0.NameEquals("alwaysEncryptedSettings"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - alwaysEncryptedSettings = SqlAlwaysEncryptedProperties.DeserializeSqlAlwaysEncryptedProperties(property0.Value); - continue; - } - } - continue; - } - additionalPropertiesDictionary.Add(property.Name, JsonSerializer.Deserialize>(property.Value.GetRawText())); - } - additionalProperties = additionalPropertiesDictionary; - return new AmazonRdsForSqlServerLinkedService(type, connectVia.Value, description.Value, Optional.ToDictionary(parameters), Optional.ToList(annotations), additionalProperties, connectionString, userName.Value, password, encryptedCredential.Value, alwaysEncryptedSettings.Value); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/AmazonRdsForSqlServerLinkedService.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/AmazonRdsForSqlServerLinkedService.cs deleted file mode 100644 index 2cb89ba1..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/AmazonRdsForSqlServerLinkedService.cs +++ /dev/null @@ -1,57 +0,0 @@ -// - -#nullable disable - -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// Amazon RDS for SQL Server linked service. - public partial class AmazonRdsForSqlServerLinkedService : DataFactoryLinkedServiceProperties - { - /// Initializes a new instance of AmazonRdsForSqlServerLinkedService. - /// The connection string. Type: string, SecureString or AzureKeyVaultSecretReference. - /// is null. - public AmazonRdsForSqlServerLinkedService(DataFactoryElement connectionString) - { - Argument.AssertNotNull(connectionString, nameof(connectionString)); - - ConnectionString = connectionString; - LinkedServiceType = "AmazonRdsForSqlServer"; - } - - /// Initializes a new instance of AmazonRdsForSqlServerLinkedService. - /// Type of linked service. - /// The integration runtime reference. - /// Linked service description. - /// Parameters for linked service. - /// List of tags that can be used for describing the linked service. - /// Additional Properties. - /// The connection string. Type: string, SecureString or AzureKeyVaultSecretReference. - /// The on-premises Windows authentication user name. Type: string (or Expression with resultType string). - /// The on-premises Windows authentication password. - /// The encrypted credential used for authentication. Credentials are encrypted using the integration runtime credential manager. Type: string. - /// Sql always encrypted properties. - internal AmazonRdsForSqlServerLinkedService(string linkedServiceType, IntegrationRuntimeReference connectVia, string description, IDictionary parameters, IList annotations, IDictionary> additionalProperties, DataFactoryElement connectionString, DataFactoryElement userName, DataFactorySecretBaseDefinition password, string encryptedCredential, SqlAlwaysEncryptedProperties alwaysEncryptedSettings) : base(linkedServiceType, connectVia, description, parameters, annotations, additionalProperties) - { - ConnectionString = connectionString; - UserName = userName; - Password = password; - EncryptedCredential = encryptedCredential; - AlwaysEncryptedSettings = alwaysEncryptedSettings; - LinkedServiceType = linkedServiceType ?? "AmazonRdsForSqlServer"; - } - - /// The connection string. Type: string, SecureString or AzureKeyVaultSecretReference. - public DataFactoryElement ConnectionString { get; set; } - /// The on-premises Windows authentication user name. Type: string (or Expression with resultType string). - public DataFactoryElement UserName { get; set; } - /// The on-premises Windows authentication password. - public DataFactorySecretBaseDefinition Password { get; set; } - /// The encrypted credential used for authentication. Credentials are encrypted using the integration runtime credential manager. Type: string. - public string EncryptedCredential { get; set; } - /// Sql always encrypted properties. - public SqlAlwaysEncryptedProperties AlwaysEncryptedSettings { get; set; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/AmazonRdsForSqlServerSource.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/AmazonRdsForSqlServerSource.Serialization.cs deleted file mode 100644 index 691397fd..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/AmazonRdsForSqlServerSource.Serialization.cs +++ /dev/null @@ -1,263 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class AmazonRdsForSqlServerSource : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - if (Optional.IsDefined(SqlReaderQuery)) - { - writer.WritePropertyName("sqlReaderQuery"u8); - JsonSerializer.Serialize(writer, SqlReaderQuery); - } - if (Optional.IsDefined(SqlReaderStoredProcedureName)) - { - writer.WritePropertyName("sqlReaderStoredProcedureName"u8); - JsonSerializer.Serialize(writer, SqlReaderStoredProcedureName); - } - if (Optional.IsDefined(StoredProcedureParameters)) - { - writer.WritePropertyName("storedProcedureParameters"u8); -#if NET6_0_OR_GREATER - writer.WriteRawValue(StoredProcedureParameters); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(StoredProcedureParameters.ToString()).RootElement); -#endif - } - if (Optional.IsDefined(IsolationLevel)) - { - writer.WritePropertyName("isolationLevel"u8); - JsonSerializer.Serialize(writer, IsolationLevel); - } - if (Optional.IsDefined(ProduceAdditionalTypes)) - { - writer.WritePropertyName("produceAdditionalTypes"u8); -#if NET6_0_OR_GREATER - writer.WriteRawValue(ProduceAdditionalTypes); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(ProduceAdditionalTypes.ToString()).RootElement); -#endif - } - if (Optional.IsDefined(PartitionOption)) - { - writer.WritePropertyName("partitionOption"u8); -#if NET6_0_OR_GREATER - writer.WriteRawValue(PartitionOption); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(PartitionOption.ToString()).RootElement); -#endif - } - if (Optional.IsDefined(PartitionSettings)) - { - writer.WritePropertyName("partitionSettings"u8); - writer.WriteObjectValue(PartitionSettings); - } - if (Optional.IsDefined(QueryTimeout)) - { - writer.WritePropertyName("queryTimeout"u8); - JsonSerializer.Serialize(writer, QueryTimeout); - } - if (Optional.IsDefined(AdditionalColumns)) - { - writer.WritePropertyName("additionalColumns"u8); -#if NET6_0_OR_GREATER - writer.WriteRawValue(AdditionalColumns); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(AdditionalColumns.ToString()).RootElement); -#endif - } - writer.WritePropertyName("type"u8); - writer.WriteStringValue(CopySourceType); - if (Optional.IsDefined(SourceRetryCount)) - { - writer.WritePropertyName("sourceRetryCount"u8); - JsonSerializer.Serialize(writer, SourceRetryCount); - } - if (Optional.IsDefined(SourceRetryWait)) - { - writer.WritePropertyName("sourceRetryWait"u8); - JsonSerializer.Serialize(writer, SourceRetryWait); - } - if (Optional.IsDefined(MaxConcurrentConnections)) - { - writer.WritePropertyName("maxConcurrentConnections"u8); - JsonSerializer.Serialize(writer, MaxConcurrentConnections); - } - if (Optional.IsDefined(DisableMetricsCollection)) - { - writer.WritePropertyName("disableMetricsCollection"u8); - JsonSerializer.Serialize(writer, DisableMetricsCollection); - } - foreach (var item in AdditionalProperties) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.Value.ToString()).RootElement); -#endif - } - writer.WriteEndObject(); - } - - internal static AmazonRdsForSqlServerSource DeserializeAmazonRdsForSqlServerSource(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - Optional> sqlReaderQuery = default; - Optional> sqlReaderStoredProcedureName = default; - Optional storedProcedureParameters = default; - Optional> isolationLevel = default; - Optional produceAdditionalTypes = default; - Optional partitionOption = default; - Optional partitionSettings = default; - Optional> queryTimeout = default; - Optional additionalColumns = default; - string type = default; - Optional> sourceRetryCount = default; - Optional> sourceRetryWait = default; - Optional> maxConcurrentConnections = default; - Optional> disableMetricsCollection = default; - IDictionary> additionalProperties = default; - Dictionary> additionalPropertiesDictionary = new Dictionary>(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("sqlReaderQuery"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - sqlReaderQuery = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("sqlReaderStoredProcedureName"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - sqlReaderStoredProcedureName = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("storedProcedureParameters"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - storedProcedureParameters = BinaryData.FromString(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("isolationLevel"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - isolationLevel = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("produceAdditionalTypes"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - produceAdditionalTypes = BinaryData.FromString(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("partitionOption"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - partitionOption = BinaryData.FromString(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("partitionSettings"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - partitionSettings = SqlPartitionSettings.DeserializeSqlPartitionSettings(property.Value); - continue; - } - if (property.NameEquals("queryTimeout"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - queryTimeout = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("additionalColumns"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - additionalColumns = BinaryData.FromString(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("type"u8)) - { - type = property.Value.GetString(); - continue; - } - if (property.NameEquals("sourceRetryCount"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - sourceRetryCount = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("sourceRetryWait"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - sourceRetryWait = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("maxConcurrentConnections"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - maxConcurrentConnections = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("disableMetricsCollection"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - disableMetricsCollection = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - additionalPropertiesDictionary.Add(property.Name, JsonSerializer.Deserialize>(property.Value.GetRawText())); - } - additionalProperties = additionalPropertiesDictionary; - return new AmazonRdsForSqlServerSource(type, sourceRetryCount.Value, sourceRetryWait.Value, maxConcurrentConnections.Value, disableMetricsCollection.Value, additionalProperties, queryTimeout.Value, additionalColumns.Value, sqlReaderQuery.Value, sqlReaderStoredProcedureName.Value, storedProcedureParameters.Value, isolationLevel.Value, produceAdditionalTypes.Value, partitionOption.Value, partitionSettings.Value); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/AmazonRdsForSqlServerSource.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/AmazonRdsForSqlServerSource.cs deleted file mode 100644 index 5ae8fb23..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/AmazonRdsForSqlServerSource.cs +++ /dev/null @@ -1,148 +0,0 @@ -// - -#nullable disable - -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// A copy activity Amazon RDS for SQL Server source. - public partial class AmazonRdsForSqlServerSource : TabularSource - { - /// Initializes a new instance of AmazonRdsForSqlServerSource. - public AmazonRdsForSqlServerSource() - { - CopySourceType = "AmazonRdsForSqlServerSource"; - } - - /// Initializes a new instance of AmazonRdsForSqlServerSource. - /// Copy source type. - /// Source retry count. Type: integer (or Expression with resultType integer). - /// Source retry wait. Type: string (or Expression with resultType string), pattern: ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). - /// The maximum concurrent connection count for the source data store. Type: integer (or Expression with resultType integer). - /// If true, disable data store metrics collection. Default is false. Type: boolean (or Expression with resultType boolean). - /// Additional Properties. - /// 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). - /// SQL reader query. Type: string (or Expression with resultType string). - /// Name of the stored procedure for a SQL Database source. This cannot be used at the same time as SqlReaderQuery. Type: string (or Expression with resultType string). - /// Value and type setting for stored procedure parameters. Example: "{Parameter1: {value: "1", type: "int"}}". - /// Specifies the transaction locking behavior for the SQL source. Allowed values: ReadCommitted/ReadUncommitted/RepeatableRead/Serializable/Snapshot. The default value is ReadCommitted. Type: string (or Expression with resultType string). - /// Which additional types to produce. - /// The partition mechanism that will be used for Sql read in parallel. Possible values include: "None", "PhysicalPartitionsOfTable", "DynamicRange". - /// The settings that will be leveraged for Sql source partitioning. - internal AmazonRdsForSqlServerSource(string copySourceType, DataFactoryElement sourceRetryCount, DataFactoryElement sourceRetryWait, DataFactoryElement maxConcurrentConnections, DataFactoryElement disableMetricsCollection, IDictionary> additionalProperties, DataFactoryElement queryTimeout, BinaryData additionalColumns, DataFactoryElement sqlReaderQuery, DataFactoryElement sqlReaderStoredProcedureName, BinaryData storedProcedureParameters, DataFactoryElement isolationLevel, BinaryData produceAdditionalTypes, BinaryData partitionOption, SqlPartitionSettings partitionSettings) : base(copySourceType, sourceRetryCount, sourceRetryWait, maxConcurrentConnections, disableMetricsCollection, additionalProperties, queryTimeout, additionalColumns) - { - SqlReaderQuery = sqlReaderQuery; - SqlReaderStoredProcedureName = sqlReaderStoredProcedureName; - StoredProcedureParameters = storedProcedureParameters; - IsolationLevel = isolationLevel; - ProduceAdditionalTypes = produceAdditionalTypes; - PartitionOption = partitionOption; - PartitionSettings = partitionSettings; - CopySourceType = copySourceType ?? "AmazonRdsForSqlServerSource"; - } - - /// SQL reader query. Type: string (or Expression with resultType string). - public DataFactoryElement SqlReaderQuery { get; set; } - /// Name of the stored procedure for a SQL Database source. This cannot be used at the same time as SqlReaderQuery. Type: string (or Expression with resultType string). - public DataFactoryElement SqlReaderStoredProcedureName { get; set; } - /// - /// Value and type setting for stored procedure parameters. Example: "{Parameter1: {value: "1", type: "int"}}". - /// - /// To assign an object to this property use . - /// - /// - /// To assign an already formated json string to this property use . - /// - /// - /// Examples: - /// - /// - /// BinaryData.FromObjectAsJson("foo") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromString("\"foo\"") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromObjectAsJson(new { key = "value" }) - /// Creates a payload of { "key": "value" }. - /// - /// - /// BinaryData.FromString("{\"key\": \"value\"}") - /// Creates a payload of { "key": "value" }. - /// - /// - /// - /// - public BinaryData StoredProcedureParameters { get; set; } - /// Specifies the transaction locking behavior for the SQL source. Allowed values: ReadCommitted/ReadUncommitted/RepeatableRead/Serializable/Snapshot. The default value is ReadCommitted. Type: string (or Expression with resultType string). - public DataFactoryElement IsolationLevel { get; set; } - /// - /// Which additional types to produce. - /// - /// To assign an object to this property use . - /// - /// - /// To assign an already formated json string to this property use . - /// - /// - /// Examples: - /// - /// - /// BinaryData.FromObjectAsJson("foo") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromString("\"foo\"") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromObjectAsJson(new { key = "value" }) - /// Creates a payload of { "key": "value" }. - /// - /// - /// BinaryData.FromString("{\"key\": \"value\"}") - /// Creates a payload of { "key": "value" }. - /// - /// - /// - /// - public BinaryData ProduceAdditionalTypes { get; set; } - /// - /// The partition mechanism that will be used for Sql read in parallel. Possible values include: "None", "PhysicalPartitionsOfTable", "DynamicRange". - /// - /// To assign an object to this property use . - /// - /// - /// To assign an already formated json string to this property use . - /// - /// - /// Examples: - /// - /// - /// BinaryData.FromObjectAsJson("foo") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromString("\"foo\"") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromObjectAsJson(new { key = "value" }) - /// Creates a payload of { "key": "value" }. - /// - /// - /// BinaryData.FromString("{\"key\": \"value\"}") - /// Creates a payload of { "key": "value" }. - /// - /// - /// - /// - public BinaryData PartitionOption { get; set; } - /// The settings that will be leveraged for Sql source partitioning. - public SqlPartitionSettings PartitionSettings { get; set; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/AmazonRdsForSqlServerTableDataset.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/AmazonRdsForSqlServerTableDataset.Serialization.cs deleted file mode 100644 index 436a5661..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/AmazonRdsForSqlServerTableDataset.Serialization.cs +++ /dev/null @@ -1,227 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class AmazonRdsForSqlServerTableDataset : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - writer.WritePropertyName("type"u8); - writer.WriteStringValue(DatasetType); - if (Optional.IsDefined(Description)) - { - writer.WritePropertyName("description"u8); - writer.WriteStringValue(Description); - } - if (Optional.IsDefined(Structure)) - { - writer.WritePropertyName("structure"u8); - JsonSerializer.Serialize(writer, Structure); - } - if (Optional.IsDefined(Schema)) - { - writer.WritePropertyName("schema"u8); - JsonSerializer.Serialize(writer, Schema); - } - writer.WritePropertyName("linkedServiceName"u8); - JsonSerializer.Serialize(writer, LinkedServiceName); if (Optional.IsCollectionDefined(Parameters)) - { - writer.WritePropertyName("parameters"u8); - writer.WriteStartObject(); - foreach (var item in Parameters) - { - writer.WritePropertyName(item.Key); - writer.WriteObjectValue(item.Value); - } - writer.WriteEndObject(); - } - if (Optional.IsCollectionDefined(Annotations)) - { - writer.WritePropertyName("annotations"u8); - writer.WriteStartArray(); - foreach (var item in Annotations) - { - if (item == null) - { - writer.WriteNullValue(); - continue; - } -#if NET6_0_OR_GREATER - writer.WriteRawValue(item); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.ToString()).RootElement); -#endif - } - writer.WriteEndArray(); - } - if (Optional.IsDefined(Folder)) - { - writer.WritePropertyName("folder"u8); - writer.WriteObjectValue(Folder); - } - writer.WritePropertyName("typeProperties"u8); - writer.WriteStartObject(); - if (Optional.IsDefined(SchemaTypePropertiesSchema)) - { - writer.WritePropertyName("schema"u8); - JsonSerializer.Serialize(writer, SchemaTypePropertiesSchema); - } - if (Optional.IsDefined(Table)) - { - writer.WritePropertyName("table"u8); - JsonSerializer.Serialize(writer, Table); - } - writer.WriteEndObject(); - foreach (var item in AdditionalProperties) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.Value.ToString()).RootElement); -#endif - } - writer.WriteEndObject(); - } - - internal static AmazonRdsForSqlServerTableDataset DeserializeAmazonRdsForSqlServerTableDataset(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - string type = default; - Optional description = default; - Optional>> structure = default; - Optional>> schema = default; - DataFactoryLinkedServiceReference linkedServiceName = default; - Optional> parameters = default; - Optional> annotations = default; - Optional folder = default; - Optional> schema0 = default; - Optional> table = default; - IDictionary> additionalProperties = default; - Dictionary> additionalPropertiesDictionary = new Dictionary>(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("type"u8)) - { - type = property.Value.GetString(); - continue; - } - if (property.NameEquals("description"u8)) - { - description = property.Value.GetString(); - continue; - } - if (property.NameEquals("structure"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - structure = JsonSerializer.Deserialize>>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("schema"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - schema = JsonSerializer.Deserialize>>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("linkedServiceName"u8)) - { - linkedServiceName = JsonSerializer.Deserialize(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("parameters"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - Dictionary dictionary = new Dictionary(); - foreach (var property0 in property.Value.EnumerateObject()) - { - dictionary.Add(property0.Name, EntityParameterSpecification.DeserializeEntityParameterSpecification(property0.Value)); - } - parameters = dictionary; - continue; - } - if (property.NameEquals("annotations"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - if (item.ValueKind == JsonValueKind.Null) - { - array.Add(null); - } - else - { - array.Add(BinaryData.FromString(item.GetRawText())); - } - } - annotations = array; - continue; - } - if (property.NameEquals("folder"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - folder = DatasetFolder.DeserializeDatasetFolder(property.Value); - continue; - } - if (property.NameEquals("typeProperties"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - foreach (var property0 in property.Value.EnumerateObject()) - { - if (property0.NameEquals("schema"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - schema0 = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("table"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - table = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - } - continue; - } - additionalPropertiesDictionary.Add(property.Name, JsonSerializer.Deserialize>(property.Value.GetRawText())); - } - additionalProperties = additionalPropertiesDictionary; - return new AmazonRdsForSqlServerTableDataset(type, description.Value, structure.Value, schema.Value, linkedServiceName, Optional.ToDictionary(parameters), Optional.ToList(annotations), folder.Value, additionalProperties, schema0.Value, table.Value); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/AmazonRdsForSqlServerTableDataset.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/AmazonRdsForSqlServerTableDataset.cs deleted file mode 100644 index 5a9e44c2..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/AmazonRdsForSqlServerTableDataset.cs +++ /dev/null @@ -1,47 +0,0 @@ -// - -#nullable disable - -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// The Amazon RDS for SQL Server dataset. - public partial class AmazonRdsForSqlServerTableDataset : DataFactoryDatasetProperties - { - /// Initializes a new instance of AmazonRdsForSqlServerTableDataset. - /// Linked service reference. - /// is null. - public AmazonRdsForSqlServerTableDataset(DataFactoryLinkedServiceReference linkedServiceName) : base(linkedServiceName) - { - Argument.AssertNotNull(linkedServiceName, nameof(linkedServiceName)); - - DatasetType = "AmazonRdsForSqlServerTable"; - } - - /// Initializes a new instance of AmazonRdsForSqlServerTableDataset. - /// Type of dataset. - /// Dataset description. - /// Columns that define the structure of the dataset. Type: array (or Expression with resultType array), itemType: DatasetDataElement. - /// Columns that define the physical type schema of the dataset. Type: array (or Expression with resultType array), itemType: DatasetSchemaDataElement. - /// Linked service reference. - /// Parameters for dataset. - /// List of tags that can be used for describing the Dataset. - /// The folder that this Dataset is in. If not specified, Dataset will appear at the root level. - /// Additional Properties. - /// The schema name of the SQL Server dataset. Type: string (or Expression with resultType string). - /// The table name of the SQL Server dataset. Type: string (or Expression with resultType string). - internal AmazonRdsForSqlServerTableDataset(string datasetType, string description, DataFactoryElement> structure, DataFactoryElement> schema, DataFactoryLinkedServiceReference linkedServiceName, IDictionary parameters, IList annotations, DatasetFolder folder, IDictionary> additionalProperties, DataFactoryElement schemaTypePropertiesSchema, DataFactoryElement table) : base(datasetType, description, structure, schema, linkedServiceName, parameters, annotations, folder, additionalProperties) - { - SchemaTypePropertiesSchema = schemaTypePropertiesSchema; - Table = table; - DatasetType = datasetType ?? "AmazonRdsForSqlServerTable"; - } - - /// The schema name of the SQL Server dataset. Type: string (or Expression with resultType string). - public DataFactoryElement SchemaTypePropertiesSchema { get; set; } - /// The table name of the SQL Server dataset. Type: string (or Expression with resultType string). - public DataFactoryElement Table { get; set; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/AmazonRedshiftLinkedService.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/AmazonRedshiftLinkedService.Serialization.cs deleted file mode 100644 index 753d27a7..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/AmazonRedshiftLinkedService.Serialization.cs +++ /dev/null @@ -1,232 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class AmazonRedshiftLinkedService : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - writer.WritePropertyName("type"u8); - writer.WriteStringValue(LinkedServiceType); - if (Optional.IsDefined(ConnectVia)) - { - writer.WritePropertyName("connectVia"u8); - writer.WriteObjectValue(ConnectVia); - } - if (Optional.IsDefined(Description)) - { - writer.WritePropertyName("description"u8); - writer.WriteStringValue(Description); - } - if (Optional.IsCollectionDefined(Parameters)) - { - writer.WritePropertyName("parameters"u8); - writer.WriteStartObject(); - foreach (var item in Parameters) - { - writer.WritePropertyName(item.Key); - writer.WriteObjectValue(item.Value); - } - writer.WriteEndObject(); - } - if (Optional.IsCollectionDefined(Annotations)) - { - writer.WritePropertyName("annotations"u8); - writer.WriteStartArray(); - foreach (var item in Annotations) - { - if (item == null) - { - writer.WriteNullValue(); - continue; - } -#if NET6_0_OR_GREATER - writer.WriteRawValue(item); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.ToString()).RootElement); -#endif - } - writer.WriteEndArray(); - } - writer.WritePropertyName("typeProperties"u8); - writer.WriteStartObject(); - writer.WritePropertyName("server"u8); - JsonSerializer.Serialize(writer, Server); - if (Optional.IsDefined(Username)) - { - writer.WritePropertyName("username"u8); - JsonSerializer.Serialize(writer, Username); - } - if (Optional.IsDefined(Password)) - { - writer.WritePropertyName("password"u8); - JsonSerializer.Serialize(writer, Password); - } - writer.WritePropertyName("database"u8); - JsonSerializer.Serialize(writer, Database); - if (Optional.IsDefined(Port)) - { - writer.WritePropertyName("port"u8); - JsonSerializer.Serialize(writer, Port); - } - if (Optional.IsDefined(EncryptedCredential)) - { - writer.WritePropertyName("encryptedCredential"u8); - writer.WriteStringValue(EncryptedCredential); - } - writer.WriteEndObject(); - foreach (var item in AdditionalProperties) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.Value.ToString()).RootElement); -#endif - } - writer.WriteEndObject(); - } - - internal static AmazonRedshiftLinkedService DeserializeAmazonRedshiftLinkedService(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - string type = default; - Optional connectVia = default; - Optional description = default; - Optional> parameters = default; - Optional> annotations = default; - DataFactoryElement server = default; - Optional> username = default; - Optional password = default; - DataFactoryElement database = default; - Optional> port = default; - Optional encryptedCredential = default; - IDictionary> additionalProperties = default; - Dictionary> additionalPropertiesDictionary = new Dictionary>(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("type"u8)) - { - type = property.Value.GetString(); - continue; - } - if (property.NameEquals("connectVia"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - connectVia = IntegrationRuntimeReference.DeserializeIntegrationRuntimeReference(property.Value); - continue; - } - if (property.NameEquals("description"u8)) - { - description = property.Value.GetString(); - continue; - } - if (property.NameEquals("parameters"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - Dictionary dictionary = new Dictionary(); - foreach (var property0 in property.Value.EnumerateObject()) - { - dictionary.Add(property0.Name, EntityParameterSpecification.DeserializeEntityParameterSpecification(property0.Value)); - } - parameters = dictionary; - continue; - } - if (property.NameEquals("annotations"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - if (item.ValueKind == JsonValueKind.Null) - { - array.Add(null); - } - else - { - array.Add(BinaryData.FromString(item.GetRawText())); - } - } - annotations = array; - continue; - } - if (property.NameEquals("typeProperties"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - foreach (var property0 in property.Value.EnumerateObject()) - { - if (property0.NameEquals("server"u8)) - { - server = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("username"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - username = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("password"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - password = JsonSerializer.Deserialize(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("database"u8)) - { - database = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("port"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - port = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("encryptedCredential"u8)) - { - encryptedCredential = property0.Value.GetString(); - continue; - } - } - continue; - } - additionalPropertiesDictionary.Add(property.Name, JsonSerializer.Deserialize>(property.Value.GetRawText())); - } - additionalProperties = additionalPropertiesDictionary; - return new AmazonRedshiftLinkedService(type, connectVia.Value, description.Value, Optional.ToDictionary(parameters), Optional.ToList(annotations), additionalProperties, server, username.Value, password, database, port.Value, encryptedCredential.Value); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/AmazonRedshiftLinkedService.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/AmazonRedshiftLinkedService.cs deleted file mode 100644 index d7b33346..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/AmazonRedshiftLinkedService.cs +++ /dev/null @@ -1,64 +0,0 @@ -// - -#nullable disable - -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// Linked service for Amazon Redshift. - public partial class AmazonRedshiftLinkedService : DataFactoryLinkedServiceProperties - { - /// Initializes a new instance of AmazonRedshiftLinkedService. - /// The name of the Amazon Redshift server. Type: string (or Expression with resultType string). - /// The database name of the Amazon Redshift source. Type: string (or Expression with resultType string). - /// or is null. - public AmazonRedshiftLinkedService(DataFactoryElement server, DataFactoryElement database) - { - Argument.AssertNotNull(server, nameof(server)); - Argument.AssertNotNull(database, nameof(database)); - - Server = server; - Database = database; - LinkedServiceType = "AmazonRedshift"; - } - - /// Initializes a new instance of AmazonRedshiftLinkedService. - /// Type of linked service. - /// The integration runtime reference. - /// Linked service description. - /// Parameters for linked service. - /// List of tags that can be used for describing the linked service. - /// Additional Properties. - /// The name of the Amazon Redshift server. Type: string (or Expression with resultType string). - /// The username of the Amazon Redshift source. Type: string (or Expression with resultType string). - /// The password of the Amazon Redshift source. - /// The database name of the Amazon Redshift source. Type: string (or Expression with resultType string). - /// The TCP port number that the Amazon Redshift server uses to listen for client connections. The default value is 5439. Type: integer (or Expression with resultType integer). - /// The encrypted credential used for authentication. Credentials are encrypted using the integration runtime credential manager. Type: string. - internal AmazonRedshiftLinkedService(string linkedServiceType, IntegrationRuntimeReference connectVia, string description, IDictionary parameters, IList annotations, IDictionary> additionalProperties, DataFactoryElement server, DataFactoryElement username, DataFactorySecretBaseDefinition password, DataFactoryElement database, DataFactoryElement port, string encryptedCredential) : base(linkedServiceType, connectVia, description, parameters, annotations, additionalProperties) - { - Server = server; - Username = username; - Password = password; - Database = database; - Port = port; - EncryptedCredential = encryptedCredential; - LinkedServiceType = linkedServiceType ?? "AmazonRedshift"; - } - - /// The name of the Amazon Redshift server. Type: string (or Expression with resultType string). - public DataFactoryElement Server { get; set; } - /// The username of the Amazon Redshift source. Type: string (or Expression with resultType string). - public DataFactoryElement Username { get; set; } - /// The password of the Amazon Redshift source. - public DataFactorySecretBaseDefinition Password { get; set; } - /// The database name of the Amazon Redshift source. Type: string (or Expression with resultType string). - public DataFactoryElement Database { get; set; } - /// The TCP port number that the Amazon Redshift server uses to listen for client connections. The default value is 5439. Type: integer (or Expression with resultType integer). - public DataFactoryElement Port { get; set; } - /// The encrypted credential used for authentication. Credentials are encrypted using the integration runtime credential manager. Type: string. - public string EncryptedCredential { get; set; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/AmazonRedshiftSource.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/AmazonRedshiftSource.Serialization.cs deleted file mode 100644 index 5b54f413..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/AmazonRedshiftSource.Serialization.cs +++ /dev/null @@ -1,176 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class AmazonRedshiftSource : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - if (Optional.IsDefined(Query)) - { - writer.WritePropertyName("query"u8); - JsonSerializer.Serialize(writer, Query); - } - if (Optional.IsDefined(RedshiftUnloadSettings)) - { - writer.WritePropertyName("redshiftUnloadSettings"u8); - writer.WriteObjectValue(RedshiftUnloadSettings); - } - if (Optional.IsDefined(QueryTimeout)) - { - writer.WritePropertyName("queryTimeout"u8); - JsonSerializer.Serialize(writer, QueryTimeout); - } - if (Optional.IsDefined(AdditionalColumns)) - { - writer.WritePropertyName("additionalColumns"u8); -#if NET6_0_OR_GREATER - writer.WriteRawValue(AdditionalColumns); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(AdditionalColumns.ToString()).RootElement); -#endif - } - writer.WritePropertyName("type"u8); - writer.WriteStringValue(CopySourceType); - if (Optional.IsDefined(SourceRetryCount)) - { - writer.WritePropertyName("sourceRetryCount"u8); - JsonSerializer.Serialize(writer, SourceRetryCount); - } - if (Optional.IsDefined(SourceRetryWait)) - { - writer.WritePropertyName("sourceRetryWait"u8); - JsonSerializer.Serialize(writer, SourceRetryWait); - } - if (Optional.IsDefined(MaxConcurrentConnections)) - { - writer.WritePropertyName("maxConcurrentConnections"u8); - JsonSerializer.Serialize(writer, MaxConcurrentConnections); - } - if (Optional.IsDefined(DisableMetricsCollection)) - { - writer.WritePropertyName("disableMetricsCollection"u8); - JsonSerializer.Serialize(writer, DisableMetricsCollection); - } - foreach (var item in AdditionalProperties) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.Value.ToString()).RootElement); -#endif - } - writer.WriteEndObject(); - } - - internal static AmazonRedshiftSource DeserializeAmazonRedshiftSource(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - Optional> query = default; - Optional redshiftUnloadSettings = default; - Optional> queryTimeout = default; - Optional additionalColumns = default; - string type = default; - Optional> sourceRetryCount = default; - Optional> sourceRetryWait = default; - Optional> maxConcurrentConnections = default; - Optional> disableMetricsCollection = default; - IDictionary> additionalProperties = default; - Dictionary> additionalPropertiesDictionary = new Dictionary>(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("query"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - query = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("redshiftUnloadSettings"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - redshiftUnloadSettings = RedshiftUnloadSettings.DeserializeRedshiftUnloadSettings(property.Value); - continue; - } - if (property.NameEquals("queryTimeout"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - queryTimeout = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("additionalColumns"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - additionalColumns = BinaryData.FromString(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("type"u8)) - { - type = property.Value.GetString(); - continue; - } - if (property.NameEquals("sourceRetryCount"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - sourceRetryCount = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("sourceRetryWait"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - sourceRetryWait = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("maxConcurrentConnections"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - maxConcurrentConnections = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("disableMetricsCollection"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - disableMetricsCollection = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - additionalPropertiesDictionary.Add(property.Name, JsonSerializer.Deserialize>(property.Value.GetRawText())); - } - additionalProperties = additionalPropertiesDictionary; - return new AmazonRedshiftSource(type, sourceRetryCount.Value, sourceRetryWait.Value, maxConcurrentConnections.Value, disableMetricsCollection.Value, additionalProperties, queryTimeout.Value, additionalColumns.Value, query.Value, redshiftUnloadSettings.Value); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/AmazonRedshiftSource.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/AmazonRedshiftSource.cs deleted file mode 100644 index 77ea1305..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/AmazonRedshiftSource.cs +++ /dev/null @@ -1,41 +0,0 @@ -// - -#nullable disable - -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// A copy activity source for Amazon Redshift Source. - public partial class AmazonRedshiftSource : TabularSource - { - /// Initializes a new instance of AmazonRedshiftSource. - public AmazonRedshiftSource() - { - CopySourceType = "AmazonRedshiftSource"; - } - - /// Initializes a new instance of AmazonRedshiftSource. - /// Copy source type. - /// Source retry count. Type: integer (or Expression with resultType integer). - /// Source retry wait. Type: string (or Expression with resultType string), pattern: ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). - /// The maximum concurrent connection count for the source data store. Type: integer (or Expression with resultType integer). - /// If true, disable data store metrics collection. Default is false. Type: boolean (or Expression with resultType boolean). - /// Additional Properties. - /// 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). - /// Database query. Type: string (or Expression with resultType string). - /// The Amazon S3 settings needed for the interim Amazon S3 when copying from Amazon Redshift with unload. With this, data from Amazon Redshift source will be unloaded into S3 first and then copied into the targeted sink from the interim S3. - internal AmazonRedshiftSource(string copySourceType, DataFactoryElement sourceRetryCount, DataFactoryElement sourceRetryWait, DataFactoryElement maxConcurrentConnections, DataFactoryElement disableMetricsCollection, IDictionary> additionalProperties, DataFactoryElement queryTimeout, BinaryData additionalColumns, DataFactoryElement query, RedshiftUnloadSettings redshiftUnloadSettings) : base(copySourceType, sourceRetryCount, sourceRetryWait, maxConcurrentConnections, disableMetricsCollection, additionalProperties, queryTimeout, additionalColumns) - { - Query = query; - RedshiftUnloadSettings = redshiftUnloadSettings; - CopySourceType = copySourceType ?? "AmazonRedshiftSource"; - } - - /// Database query. Type: string (or Expression with resultType string). - public DataFactoryElement Query { get; set; } - /// The Amazon S3 settings needed for the interim Amazon S3 when copying from Amazon Redshift with unload. With this, data from Amazon Redshift source will be unloaded into S3 first and then copied into the targeted sink from the interim S3. - public RedshiftUnloadSettings RedshiftUnloadSettings { get; set; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/AmazonRedshiftTableDataset.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/AmazonRedshiftTableDataset.Serialization.cs deleted file mode 100644 index e07cbd9c..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/AmazonRedshiftTableDataset.Serialization.cs +++ /dev/null @@ -1,246 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class AmazonRedshiftTableDataset : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - writer.WritePropertyName("type"u8); - writer.WriteStringValue(DatasetType); - if (Optional.IsDefined(Description)) - { - writer.WritePropertyName("description"u8); - writer.WriteStringValue(Description); - } - if (Optional.IsDefined(Structure)) - { - writer.WritePropertyName("structure"u8); - JsonSerializer.Serialize(writer, Structure); - } - if (Optional.IsDefined(Schema)) - { - writer.WritePropertyName("schema"u8); - JsonSerializer.Serialize(writer, Schema); - } - writer.WritePropertyName("linkedServiceName"u8); - JsonSerializer.Serialize(writer, LinkedServiceName); if (Optional.IsCollectionDefined(Parameters)) - { - writer.WritePropertyName("parameters"u8); - writer.WriteStartObject(); - foreach (var item in Parameters) - { - writer.WritePropertyName(item.Key); - writer.WriteObjectValue(item.Value); - } - writer.WriteEndObject(); - } - if (Optional.IsCollectionDefined(Annotations)) - { - writer.WritePropertyName("annotations"u8); - writer.WriteStartArray(); - foreach (var item in Annotations) - { - if (item == null) - { - writer.WriteNullValue(); - continue; - } -#if NET6_0_OR_GREATER - writer.WriteRawValue(item); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.ToString()).RootElement); -#endif - } - writer.WriteEndArray(); - } - if (Optional.IsDefined(Folder)) - { - writer.WritePropertyName("folder"u8); - writer.WriteObjectValue(Folder); - } - writer.WritePropertyName("typeProperties"u8); - writer.WriteStartObject(); - if (Optional.IsDefined(TableName)) - { - writer.WritePropertyName("tableName"u8); -#if NET6_0_OR_GREATER - writer.WriteRawValue(TableName); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(TableName.ToString()).RootElement); -#endif - } - if (Optional.IsDefined(Table)) - { - writer.WritePropertyName("table"u8); - JsonSerializer.Serialize(writer, Table); - } - if (Optional.IsDefined(SchemaTypePropertiesSchema)) - { - writer.WritePropertyName("schema"u8); - JsonSerializer.Serialize(writer, SchemaTypePropertiesSchema); - } - writer.WriteEndObject(); - foreach (var item in AdditionalProperties) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.Value.ToString()).RootElement); -#endif - } - writer.WriteEndObject(); - } - - internal static AmazonRedshiftTableDataset DeserializeAmazonRedshiftTableDataset(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - string type = default; - Optional description = default; - Optional>> structure = default; - Optional>> schema = default; - DataFactoryLinkedServiceReference linkedServiceName = default; - Optional> parameters = default; - Optional> annotations = default; - Optional folder = default; - Optional tableName = default; - Optional> table = default; - Optional> schema0 = default; - IDictionary> additionalProperties = default; - Dictionary> additionalPropertiesDictionary = new Dictionary>(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("type"u8)) - { - type = property.Value.GetString(); - continue; - } - if (property.NameEquals("description"u8)) - { - description = property.Value.GetString(); - continue; - } - if (property.NameEquals("structure"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - structure = JsonSerializer.Deserialize>>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("schema"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - schema = JsonSerializer.Deserialize>>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("linkedServiceName"u8)) - { - linkedServiceName = JsonSerializer.Deserialize(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("parameters"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - Dictionary dictionary = new Dictionary(); - foreach (var property0 in property.Value.EnumerateObject()) - { - dictionary.Add(property0.Name, EntityParameterSpecification.DeserializeEntityParameterSpecification(property0.Value)); - } - parameters = dictionary; - continue; - } - if (property.NameEquals("annotations"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - if (item.ValueKind == JsonValueKind.Null) - { - array.Add(null); - } - else - { - array.Add(BinaryData.FromString(item.GetRawText())); - } - } - annotations = array; - continue; - } - if (property.NameEquals("folder"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - folder = DatasetFolder.DeserializeDatasetFolder(property.Value); - continue; - } - if (property.NameEquals("typeProperties"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - foreach (var property0 in property.Value.EnumerateObject()) - { - if (property0.NameEquals("tableName"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - tableName = BinaryData.FromString(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("table"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - table = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("schema"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - schema0 = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - } - continue; - } - additionalPropertiesDictionary.Add(property.Name, JsonSerializer.Deserialize>(property.Value.GetRawText())); - } - additionalProperties = additionalPropertiesDictionary; - return new AmazonRedshiftTableDataset(type, description.Value, structure.Value, schema.Value, linkedServiceName, Optional.ToDictionary(parameters), Optional.ToList(annotations), folder.Value, additionalProperties, tableName.Value, table.Value, schema0.Value); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/AmazonRedshiftTableDataset.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/AmazonRedshiftTableDataset.cs deleted file mode 100644 index cc4bde52..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/AmazonRedshiftTableDataset.cs +++ /dev/null @@ -1,80 +0,0 @@ -// - -#nullable disable - -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// The Amazon Redshift table dataset. - public partial class AmazonRedshiftTableDataset : DataFactoryDatasetProperties - { - /// Initializes a new instance of AmazonRedshiftTableDataset. - /// Linked service reference. - /// is null. - public AmazonRedshiftTableDataset(DataFactoryLinkedServiceReference linkedServiceName) : base(linkedServiceName) - { - Argument.AssertNotNull(linkedServiceName, nameof(linkedServiceName)); - - DatasetType = "AmazonRedshiftTable"; - } - - /// Initializes a new instance of AmazonRedshiftTableDataset. - /// Type of dataset. - /// Dataset description. - /// Columns that define the structure of the dataset. Type: array (or Expression with resultType array), itemType: DatasetDataElement. - /// Columns that define the physical type schema of the dataset. Type: array (or Expression with resultType array), itemType: DatasetSchemaDataElement. - /// Linked service reference. - /// Parameters for dataset. - /// List of tags that can be used for describing the Dataset. - /// The folder that this Dataset is in. If not specified, Dataset will appear at the root level. - /// Additional Properties. - /// This property will be retired. Please consider using schema + table properties instead. - /// The Amazon Redshift table name. Type: string (or Expression with resultType string). - /// The Amazon Redshift schema name. Type: string (or Expression with resultType string). - internal AmazonRedshiftTableDataset(string datasetType, string description, DataFactoryElement> structure, DataFactoryElement> schema, DataFactoryLinkedServiceReference linkedServiceName, IDictionary parameters, IList annotations, DatasetFolder folder, IDictionary> additionalProperties, BinaryData tableName, DataFactoryElement table, DataFactoryElement schemaTypePropertiesSchema) : base(datasetType, description, structure, schema, linkedServiceName, parameters, annotations, folder, additionalProperties) - { - TableName = tableName; - Table = table; - SchemaTypePropertiesSchema = schemaTypePropertiesSchema; - DatasetType = datasetType ?? "AmazonRedshiftTable"; - } - - /// - /// This property will be retired. Please consider using schema + table properties instead. - /// - /// To assign an object to this property use . - /// - /// - /// To assign an already formated json string to this property use . - /// - /// - /// Examples: - /// - /// - /// BinaryData.FromObjectAsJson("foo") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromString("\"foo\"") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromObjectAsJson(new { key = "value" }) - /// Creates a payload of { "key": "value" }. - /// - /// - /// BinaryData.FromString("{\"key\": \"value\"}") - /// Creates a payload of { "key": "value" }. - /// - /// - /// - /// - public BinaryData TableName { get; set; } - /// The Amazon Redshift table name. Type: string (or Expression with resultType string). - public DataFactoryElement Table { get; set; } - /// The Amazon Redshift schema name. Type: string (or Expression with resultType string). - public DataFactoryElement SchemaTypePropertiesSchema { get; set; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/AmazonS3CompatibleLinkedService.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/AmazonS3CompatibleLinkedService.Serialization.cs deleted file mode 100644 index 1ef0f460..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/AmazonS3CompatibleLinkedService.Serialization.cs +++ /dev/null @@ -1,231 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class AmazonS3CompatibleLinkedService : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - writer.WritePropertyName("type"u8); - writer.WriteStringValue(LinkedServiceType); - if (Optional.IsDefined(ConnectVia)) - { - writer.WritePropertyName("connectVia"u8); - writer.WriteObjectValue(ConnectVia); - } - if (Optional.IsDefined(Description)) - { - writer.WritePropertyName("description"u8); - writer.WriteStringValue(Description); - } - if (Optional.IsCollectionDefined(Parameters)) - { - writer.WritePropertyName("parameters"u8); - writer.WriteStartObject(); - foreach (var item in Parameters) - { - writer.WritePropertyName(item.Key); - writer.WriteObjectValue(item.Value); - } - writer.WriteEndObject(); - } - if (Optional.IsCollectionDefined(Annotations)) - { - writer.WritePropertyName("annotations"u8); - writer.WriteStartArray(); - foreach (var item in Annotations) - { - if (item == null) - { - writer.WriteNullValue(); - continue; - } -#if NET6_0_OR_GREATER - writer.WriteRawValue(item); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.ToString()).RootElement); -#endif - } - writer.WriteEndArray(); - } - writer.WritePropertyName("typeProperties"u8); - writer.WriteStartObject(); - if (Optional.IsDefined(AccessKeyId)) - { - writer.WritePropertyName("accessKeyId"u8); - JsonSerializer.Serialize(writer, AccessKeyId); - } - if (Optional.IsDefined(SecretAccessKey)) - { - writer.WritePropertyName("secretAccessKey"u8); - JsonSerializer.Serialize(writer, SecretAccessKey); - } - if (Optional.IsDefined(ServiceUri)) - { - writer.WritePropertyName("serviceUrl"u8); - JsonSerializer.Serialize(writer, ServiceUri); - } - if (Optional.IsDefined(ForcePathStyle)) - { - writer.WritePropertyName("forcePathStyle"u8); - JsonSerializer.Serialize(writer, ForcePathStyle); - } - if (Optional.IsDefined(EncryptedCredential)) - { - writer.WritePropertyName("encryptedCredential"u8); - writer.WriteStringValue(EncryptedCredential); - } - writer.WriteEndObject(); - foreach (var item in AdditionalProperties) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.Value.ToString()).RootElement); -#endif - } - writer.WriteEndObject(); - } - - internal static AmazonS3CompatibleLinkedService DeserializeAmazonS3CompatibleLinkedService(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - string type = default; - Optional connectVia = default; - Optional description = default; - Optional> parameters = default; - Optional> annotations = default; - Optional> accessKeyId = default; - Optional secretAccessKey = default; - Optional> serviceUrl = default; - Optional> forcePathStyle = default; - Optional encryptedCredential = default; - IDictionary> additionalProperties = default; - Dictionary> additionalPropertiesDictionary = new Dictionary>(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("type"u8)) - { - type = property.Value.GetString(); - continue; - } - if (property.NameEquals("connectVia"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - connectVia = IntegrationRuntimeReference.DeserializeIntegrationRuntimeReference(property.Value); - continue; - } - if (property.NameEquals("description"u8)) - { - description = property.Value.GetString(); - continue; - } - if (property.NameEquals("parameters"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - Dictionary dictionary = new Dictionary(); - foreach (var property0 in property.Value.EnumerateObject()) - { - dictionary.Add(property0.Name, EntityParameterSpecification.DeserializeEntityParameterSpecification(property0.Value)); - } - parameters = dictionary; - continue; - } - if (property.NameEquals("annotations"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - if (item.ValueKind == JsonValueKind.Null) - { - array.Add(null); - } - else - { - array.Add(BinaryData.FromString(item.GetRawText())); - } - } - annotations = array; - continue; - } - if (property.NameEquals("typeProperties"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - foreach (var property0 in property.Value.EnumerateObject()) - { - if (property0.NameEquals("accessKeyId"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - accessKeyId = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("secretAccessKey"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - secretAccessKey = JsonSerializer.Deserialize(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("serviceUrl"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - serviceUrl = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("forcePathStyle"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - forcePathStyle = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("encryptedCredential"u8)) - { - encryptedCredential = property0.Value.GetString(); - continue; - } - } - continue; - } - additionalPropertiesDictionary.Add(property.Name, JsonSerializer.Deserialize>(property.Value.GetRawText())); - } - additionalProperties = additionalPropertiesDictionary; - return new AmazonS3CompatibleLinkedService(type, connectVia.Value, description.Value, Optional.ToDictionary(parameters), Optional.ToList(annotations), additionalProperties, accessKeyId.Value, secretAccessKey, serviceUrl.Value, forcePathStyle.Value, encryptedCredential.Value); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/AmazonS3CompatibleLinkedService.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/AmazonS3CompatibleLinkedService.cs deleted file mode 100644 index aaade2f3..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/AmazonS3CompatibleLinkedService.cs +++ /dev/null @@ -1,51 +0,0 @@ -// - -#nullable disable - -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// Linked service for Amazon S3 Compatible. - public partial class AmazonS3CompatibleLinkedService : DataFactoryLinkedServiceProperties - { - /// Initializes a new instance of AmazonS3CompatibleLinkedService. - public AmazonS3CompatibleLinkedService() - { - LinkedServiceType = "AmazonS3Compatible"; - } - - /// Initializes a new instance of AmazonS3CompatibleLinkedService. - /// Type of linked service. - /// The integration runtime reference. - /// Linked service description. - /// Parameters for linked service. - /// List of tags that can be used for describing the linked service. - /// Additional Properties. - /// The access key identifier of the Amazon S3 Compatible Identity and Access Management (IAM) user. Type: string (or Expression with resultType string). - /// The secret access key of the Amazon S3 Compatible Identity and Access Management (IAM) user. - /// This value specifies the endpoint to access with the Amazon S3 Compatible Connector. This is an optional property; change it only if you want to try a different service endpoint or want to switch between https and http. Type: string (or Expression with resultType string). - /// If true, use S3 path-style access instead of virtual hosted-style access. Default value is false. Type: boolean (or Expression with resultType boolean). - /// The encrypted credential used for authentication. Credentials are encrypted using the integration runtime credential manager. Type: string. - internal AmazonS3CompatibleLinkedService(string linkedServiceType, IntegrationRuntimeReference connectVia, string description, IDictionary parameters, IList annotations, IDictionary> additionalProperties, DataFactoryElement accessKeyId, DataFactorySecretBaseDefinition secretAccessKey, DataFactoryElement serviceUri, DataFactoryElement forcePathStyle, string encryptedCredential) : base(linkedServiceType, connectVia, description, parameters, annotations, additionalProperties) - { - AccessKeyId = accessKeyId; - SecretAccessKey = secretAccessKey; - ServiceUri = serviceUri; - ForcePathStyle = forcePathStyle; - EncryptedCredential = encryptedCredential; - LinkedServiceType = linkedServiceType ?? "AmazonS3Compatible"; - } - - /// The access key identifier of the Amazon S3 Compatible Identity and Access Management (IAM) user. Type: string (or Expression with resultType string). - public DataFactoryElement AccessKeyId { get; set; } - /// The secret access key of the Amazon S3 Compatible Identity and Access Management (IAM) user. - public DataFactorySecretBaseDefinition SecretAccessKey { get; set; } - /// This value specifies the endpoint to access with the Amazon S3 Compatible Connector. This is an optional property; change it only if you want to try a different service endpoint or want to switch between https and http. Type: string (or Expression with resultType string). - public DataFactoryElement ServiceUri { get; set; } - /// If true, use S3 path-style access instead of virtual hosted-style access. Default value is false. Type: boolean (or Expression with resultType boolean). - public DataFactoryElement ForcePathStyle { get; set; } - /// The encrypted credential used for authentication. Credentials are encrypted using the integration runtime credential manager. Type: string. - public string EncryptedCredential { get; set; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/AmazonS3CompatibleLocation.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/AmazonS3CompatibleLocation.Serialization.cs deleted file mode 100644 index 853f4435..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/AmazonS3CompatibleLocation.Serialization.cs +++ /dev/null @@ -1,112 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class AmazonS3CompatibleLocation : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - if (Optional.IsDefined(BucketName)) - { - writer.WritePropertyName("bucketName"u8); - JsonSerializer.Serialize(writer, BucketName); - } - if (Optional.IsDefined(Version)) - { - writer.WritePropertyName("version"u8); - JsonSerializer.Serialize(writer, Version); - } - writer.WritePropertyName("type"u8); - writer.WriteStringValue(DatasetLocationType); - if (Optional.IsDefined(FolderPath)) - { - writer.WritePropertyName("folderPath"u8); - JsonSerializer.Serialize(writer, FolderPath); - } - if (Optional.IsDefined(FileName)) - { - writer.WritePropertyName("fileName"u8); - JsonSerializer.Serialize(writer, FileName); - } - foreach (var item in AdditionalProperties) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.Value.ToString()).RootElement); -#endif - } - writer.WriteEndObject(); - } - - internal static AmazonS3CompatibleLocation DeserializeAmazonS3CompatibleLocation(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - Optional> bucketName = default; - Optional> version = default; - string type = default; - Optional> folderPath = default; - Optional> fileName = default; - IDictionary> additionalProperties = default; - Dictionary> additionalPropertiesDictionary = new Dictionary>(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("bucketName"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - bucketName = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("version"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - version = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("type"u8)) - { - type = property.Value.GetString(); - continue; - } - if (property.NameEquals("folderPath"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - folderPath = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("fileName"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - fileName = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - additionalPropertiesDictionary.Add(property.Name, JsonSerializer.Deserialize>(property.Value.GetRawText())); - } - additionalProperties = additionalPropertiesDictionary; - return new AmazonS3CompatibleLocation(type, folderPath.Value, fileName.Value, additionalProperties, bucketName.Value, version.Value); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/AmazonS3CompatibleLocation.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/AmazonS3CompatibleLocation.cs deleted file mode 100644 index 17ec74f7..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/AmazonS3CompatibleLocation.cs +++ /dev/null @@ -1,37 +0,0 @@ -// - -#nullable disable - -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// The location of Amazon S3 Compatible dataset. - public partial class AmazonS3CompatibleLocation : DatasetLocation - { - /// Initializes a new instance of AmazonS3CompatibleLocation. - public AmazonS3CompatibleLocation() - { - DatasetLocationType = "AmazonS3CompatibleLocation"; - } - - /// Initializes a new instance of AmazonS3CompatibleLocation. - /// Type of dataset storage location. - /// Specify the folder path of dataset. Type: string (or Expression with resultType string). - /// Specify the file name of dataset. Type: string (or Expression with resultType string). - /// Additional Properties. - /// Specify the bucketName of Amazon S3 Compatible. Type: string (or Expression with resultType string). - /// Specify the version of Amazon S3 Compatible. Type: string (or Expression with resultType string). - internal AmazonS3CompatibleLocation(string datasetLocationType, DataFactoryElement folderPath, DataFactoryElement fileName, IDictionary> additionalProperties, DataFactoryElement bucketName, DataFactoryElement version) : base(datasetLocationType, folderPath, fileName, additionalProperties) - { - BucketName = bucketName; - Version = version; - DatasetLocationType = datasetLocationType ?? "AmazonS3CompatibleLocation"; - } - - /// Specify the bucketName of Amazon S3 Compatible. Type: string (or Expression with resultType string). - public DataFactoryElement BucketName { get; set; } - /// Specify the version of Amazon S3 Compatible. Type: string (or Expression with resultType string). - public DataFactoryElement Version { get; set; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/AmazonS3CompatibleReadSettings.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/AmazonS3CompatibleReadSettings.Serialization.cs deleted file mode 100644 index a12a808e..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/AmazonS3CompatibleReadSettings.Serialization.cs +++ /dev/null @@ -1,232 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class AmazonS3CompatibleReadSettings : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - if (Optional.IsDefined(Recursive)) - { - writer.WritePropertyName("recursive"u8); - JsonSerializer.Serialize(writer, Recursive); - } - if (Optional.IsDefined(WildcardFolderPath)) - { - writer.WritePropertyName("wildcardFolderPath"u8); - JsonSerializer.Serialize(writer, WildcardFolderPath); - } - if (Optional.IsDefined(WildcardFileName)) - { - writer.WritePropertyName("wildcardFileName"u8); - JsonSerializer.Serialize(writer, WildcardFileName); - } - if (Optional.IsDefined(Prefix)) - { - writer.WritePropertyName("prefix"u8); - JsonSerializer.Serialize(writer, Prefix); - } - if (Optional.IsDefined(FileListPath)) - { - writer.WritePropertyName("fileListPath"u8); - JsonSerializer.Serialize(writer, FileListPath); - } - if (Optional.IsDefined(EnablePartitionDiscovery)) - { - writer.WritePropertyName("enablePartitionDiscovery"u8); - JsonSerializer.Serialize(writer, EnablePartitionDiscovery); - } - if (Optional.IsDefined(PartitionRootPath)) - { - writer.WritePropertyName("partitionRootPath"u8); - JsonSerializer.Serialize(writer, PartitionRootPath); - } - if (Optional.IsDefined(DeleteFilesAfterCompletion)) - { - writer.WritePropertyName("deleteFilesAfterCompletion"u8); - JsonSerializer.Serialize(writer, DeleteFilesAfterCompletion); - } - if (Optional.IsDefined(ModifiedDatetimeStart)) - { - writer.WritePropertyName("modifiedDatetimeStart"u8); - JsonSerializer.Serialize(writer, ModifiedDatetimeStart); - } - if (Optional.IsDefined(ModifiedDatetimeEnd)) - { - writer.WritePropertyName("modifiedDatetimeEnd"u8); - JsonSerializer.Serialize(writer, ModifiedDatetimeEnd); - } - writer.WritePropertyName("type"u8); - writer.WriteStringValue(StoreReadSettingsType); - if (Optional.IsDefined(MaxConcurrentConnections)) - { - writer.WritePropertyName("maxConcurrentConnections"u8); - JsonSerializer.Serialize(writer, MaxConcurrentConnections); - } - if (Optional.IsDefined(DisableMetricsCollection)) - { - writer.WritePropertyName("disableMetricsCollection"u8); - JsonSerializer.Serialize(writer, DisableMetricsCollection); - } - foreach (var item in AdditionalProperties) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.Value.ToString()).RootElement); -#endif - } - writer.WriteEndObject(); - } - - internal static AmazonS3CompatibleReadSettings DeserializeAmazonS3CompatibleReadSettings(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - Optional> recursive = default; - Optional> wildcardFolderPath = default; - Optional> wildcardFileName = default; - Optional> prefix = default; - Optional> fileListPath = default; - Optional> enablePartitionDiscovery = default; - Optional> partitionRootPath = default; - Optional> deleteFilesAfterCompletion = default; - Optional> modifiedDatetimeStart = default; - Optional> modifiedDatetimeEnd = default; - string type = default; - Optional> maxConcurrentConnections = default; - Optional> disableMetricsCollection = default; - IDictionary> additionalProperties = default; - Dictionary> additionalPropertiesDictionary = new Dictionary>(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("recursive"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - recursive = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("wildcardFolderPath"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - wildcardFolderPath = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("wildcardFileName"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - wildcardFileName = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("prefix"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - prefix = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("fileListPath"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - fileListPath = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("enablePartitionDiscovery"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - enablePartitionDiscovery = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("partitionRootPath"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - partitionRootPath = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("deleteFilesAfterCompletion"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - deleteFilesAfterCompletion = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("modifiedDatetimeStart"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - modifiedDatetimeStart = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("modifiedDatetimeEnd"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - modifiedDatetimeEnd = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("type"u8)) - { - type = property.Value.GetString(); - continue; - } - if (property.NameEquals("maxConcurrentConnections"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - maxConcurrentConnections = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("disableMetricsCollection"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - disableMetricsCollection = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - additionalPropertiesDictionary.Add(property.Name, JsonSerializer.Deserialize>(property.Value.GetRawText())); - } - additionalProperties = additionalPropertiesDictionary; - return new AmazonS3CompatibleReadSettings(type, maxConcurrentConnections.Value, disableMetricsCollection.Value, additionalProperties, recursive.Value, wildcardFolderPath.Value, wildcardFileName.Value, prefix.Value, fileListPath.Value, enablePartitionDiscovery.Value, partitionRootPath.Value, deleteFilesAfterCompletion.Value, modifiedDatetimeStart.Value, modifiedDatetimeEnd.Value); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/AmazonS3CompatibleReadSettings.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/AmazonS3CompatibleReadSettings.cs deleted file mode 100644 index dfe84ffb..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/AmazonS3CompatibleReadSettings.cs +++ /dev/null @@ -1,69 +0,0 @@ -// - -#nullable disable - -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// Amazon S3 Compatible read settings. - public partial class AmazonS3CompatibleReadSettings : StoreReadSettings - { - /// Initializes a new instance of AmazonS3CompatibleReadSettings. - public AmazonS3CompatibleReadSettings() - { - StoreReadSettingsType = "AmazonS3CompatibleReadSettings"; - } - - /// Initializes a new instance of AmazonS3CompatibleReadSettings. - /// The read setting type. - /// The maximum concurrent connection count for the source data store. Type: integer (or Expression with resultType integer). - /// If true, disable data store metrics collection. Default is false. Type: boolean (or Expression with resultType boolean). - /// Additional Properties. - /// If true, files under the folder path will be read recursively. Default is true. Type: boolean (or Expression with resultType boolean). - /// Amazon S3 Compatible wildcardFolderPath. Type: string (or Expression with resultType string). - /// Amazon S3 Compatible wildcardFileName. Type: string (or Expression with resultType string). - /// The prefix filter for the S3 Compatible object name. Type: string (or Expression with resultType string). - /// Point to a text file that lists each file (relative path to the path configured in the dataset) that you want to copy. Type: string (or Expression with resultType string). - /// Indicates whether to enable partition discovery. Type: boolean (or Expression with resultType boolean). - /// Specify the root path where partition discovery starts from. Type: string (or Expression with resultType string). - /// Indicates whether the source files need to be deleted after copy completion. Default is false. Type: boolean (or Expression with resultType boolean). - /// The start of file's modified datetime. Type: string (or Expression with resultType string). - /// The end of file's modified datetime. Type: string (or Expression with resultType string). - internal AmazonS3CompatibleReadSettings(string storeReadSettingsType, DataFactoryElement maxConcurrentConnections, DataFactoryElement disableMetricsCollection, IDictionary> additionalProperties, DataFactoryElement recursive, DataFactoryElement wildcardFolderPath, DataFactoryElement wildcardFileName, DataFactoryElement prefix, DataFactoryElement fileListPath, DataFactoryElement enablePartitionDiscovery, DataFactoryElement partitionRootPath, DataFactoryElement deleteFilesAfterCompletion, DataFactoryElement modifiedDatetimeStart, DataFactoryElement modifiedDatetimeEnd) : base(storeReadSettingsType, maxConcurrentConnections, disableMetricsCollection, additionalProperties) - { - Recursive = recursive; - WildcardFolderPath = wildcardFolderPath; - WildcardFileName = wildcardFileName; - Prefix = prefix; - FileListPath = fileListPath; - EnablePartitionDiscovery = enablePartitionDiscovery; - PartitionRootPath = partitionRootPath; - DeleteFilesAfterCompletion = deleteFilesAfterCompletion; - ModifiedDatetimeStart = modifiedDatetimeStart; - ModifiedDatetimeEnd = modifiedDatetimeEnd; - StoreReadSettingsType = storeReadSettingsType ?? "AmazonS3CompatibleReadSettings"; - } - - /// If true, files under the folder path will be read recursively. Default is true. Type: boolean (or Expression with resultType boolean). - public DataFactoryElement Recursive { get; set; } - /// Amazon S3 Compatible wildcardFolderPath. Type: string (or Expression with resultType string). - public DataFactoryElement WildcardFolderPath { get; set; } - /// Amazon S3 Compatible wildcardFileName. Type: string (or Expression with resultType string). - public DataFactoryElement WildcardFileName { get; set; } - /// The prefix filter for the S3 Compatible object name. Type: string (or Expression with resultType string). - public DataFactoryElement Prefix { get; set; } - /// Point to a text file that lists each file (relative path to the path configured in the dataset) that you want to copy. Type: string (or Expression with resultType string). - public DataFactoryElement FileListPath { get; set; } - /// Indicates whether to enable partition discovery. Type: boolean (or Expression with resultType boolean). - public DataFactoryElement EnablePartitionDiscovery { get; set; } - /// Specify the root path where partition discovery starts from. Type: string (or Expression with resultType string). - public DataFactoryElement PartitionRootPath { get; set; } - /// Indicates whether the source files need to be deleted after copy completion. Default is false. Type: boolean (or Expression with resultType boolean). - public DataFactoryElement DeleteFilesAfterCompletion { get; set; } - /// The start of file's modified datetime. Type: string (or Expression with resultType string). - public DataFactoryElement ModifiedDatetimeStart { get; set; } - /// The end of file's modified datetime. Type: string (or Expression with resultType string). - public DataFactoryElement ModifiedDatetimeEnd { get; set; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/AmazonS3Dataset.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/AmazonS3Dataset.Serialization.cs deleted file mode 100644 index 2cca6ccb..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/AmazonS3Dataset.Serialization.cs +++ /dev/null @@ -1,310 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class AmazonS3Dataset : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - writer.WritePropertyName("type"u8); - writer.WriteStringValue(DatasetType); - if (Optional.IsDefined(Description)) - { - writer.WritePropertyName("description"u8); - writer.WriteStringValue(Description); - } - if (Optional.IsDefined(Structure)) - { - writer.WritePropertyName("structure"u8); - JsonSerializer.Serialize(writer, Structure); - } - if (Optional.IsDefined(Schema)) - { - writer.WritePropertyName("schema"u8); - JsonSerializer.Serialize(writer, Schema); - } - writer.WritePropertyName("linkedServiceName"u8); - JsonSerializer.Serialize(writer, LinkedServiceName); if (Optional.IsCollectionDefined(Parameters)) - { - writer.WritePropertyName("parameters"u8); - writer.WriteStartObject(); - foreach (var item in Parameters) - { - writer.WritePropertyName(item.Key); - writer.WriteObjectValue(item.Value); - } - writer.WriteEndObject(); - } - if (Optional.IsCollectionDefined(Annotations)) - { - writer.WritePropertyName("annotations"u8); - writer.WriteStartArray(); - foreach (var item in Annotations) - { - if (item == null) - { - writer.WriteNullValue(); - continue; - } -#if NET6_0_OR_GREATER - writer.WriteRawValue(item); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.ToString()).RootElement); -#endif - } - writer.WriteEndArray(); - } - if (Optional.IsDefined(Folder)) - { - writer.WritePropertyName("folder"u8); - writer.WriteObjectValue(Folder); - } - writer.WritePropertyName("typeProperties"u8); - writer.WriteStartObject(); - writer.WritePropertyName("bucketName"u8); - JsonSerializer.Serialize(writer, BucketName); - if (Optional.IsDefined(Key)) - { - writer.WritePropertyName("key"u8); - JsonSerializer.Serialize(writer, Key); - } - if (Optional.IsDefined(Prefix)) - { - writer.WritePropertyName("prefix"u8); - JsonSerializer.Serialize(writer, Prefix); - } - if (Optional.IsDefined(Version)) - { - writer.WritePropertyName("version"u8); - JsonSerializer.Serialize(writer, Version); - } - if (Optional.IsDefined(ModifiedDatetimeStart)) - { - writer.WritePropertyName("modifiedDatetimeStart"u8); - JsonSerializer.Serialize(writer, ModifiedDatetimeStart); - } - if (Optional.IsDefined(ModifiedDatetimeEnd)) - { - writer.WritePropertyName("modifiedDatetimeEnd"u8); - JsonSerializer.Serialize(writer, ModifiedDatetimeEnd); - } - if (Optional.IsDefined(Format)) - { - writer.WritePropertyName("format"u8); - writer.WriteObjectValue(Format); - } - if (Optional.IsDefined(Compression)) - { - writer.WritePropertyName("compression"u8); - writer.WriteObjectValue(Compression); - } - writer.WriteEndObject(); - foreach (var item in AdditionalProperties) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.Value.ToString()).RootElement); -#endif - } - writer.WriteEndObject(); - } - - internal static AmazonS3Dataset DeserializeAmazonS3Dataset(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - string type = default; - Optional description = default; - Optional>> structure = default; - Optional>> schema = default; - DataFactoryLinkedServiceReference linkedServiceName = default; - Optional> parameters = default; - Optional> annotations = default; - Optional folder = default; - DataFactoryElement bucketName = default; - Optional> key = default; - Optional> prefix = default; - Optional> version = default; - Optional> modifiedDatetimeStart = default; - Optional> modifiedDatetimeEnd = default; - Optional format = default; - Optional compression = default; - IDictionary> additionalProperties = default; - Dictionary> additionalPropertiesDictionary = new Dictionary>(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("type"u8)) - { - type = property.Value.GetString(); - continue; - } - if (property.NameEquals("description"u8)) - { - description = property.Value.GetString(); - continue; - } - if (property.NameEquals("structure"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - structure = JsonSerializer.Deserialize>>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("schema"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - schema = JsonSerializer.Deserialize>>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("linkedServiceName"u8)) - { - linkedServiceName = JsonSerializer.Deserialize(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("parameters"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - Dictionary dictionary = new Dictionary(); - foreach (var property0 in property.Value.EnumerateObject()) - { - dictionary.Add(property0.Name, EntityParameterSpecification.DeserializeEntityParameterSpecification(property0.Value)); - } - parameters = dictionary; - continue; - } - if (property.NameEquals("annotations"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - if (item.ValueKind == JsonValueKind.Null) - { - array.Add(null); - } - else - { - array.Add(BinaryData.FromString(item.GetRawText())); - } - } - annotations = array; - continue; - } - if (property.NameEquals("folder"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - folder = DatasetFolder.DeserializeDatasetFolder(property.Value); - continue; - } - if (property.NameEquals("typeProperties"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - foreach (var property0 in property.Value.EnumerateObject()) - { - if (property0.NameEquals("bucketName"u8)) - { - bucketName = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("key"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - key = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("prefix"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - prefix = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("version"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - version = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("modifiedDatetimeStart"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - modifiedDatetimeStart = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("modifiedDatetimeEnd"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - modifiedDatetimeEnd = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("format"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - format = DatasetStorageFormat.DeserializeDatasetStorageFormat(property0.Value); - continue; - } - if (property0.NameEquals("compression"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - compression = DatasetCompression.DeserializeDatasetCompression(property0.Value); - continue; - } - } - continue; - } - additionalPropertiesDictionary.Add(property.Name, JsonSerializer.Deserialize>(property.Value.GetRawText())); - } - additionalProperties = additionalPropertiesDictionary; - return new AmazonS3Dataset(type, description.Value, structure.Value, schema.Value, linkedServiceName, Optional.ToDictionary(parameters), Optional.ToList(annotations), folder.Value, additionalProperties, bucketName, key.Value, prefix.Value, version.Value, modifiedDatetimeStart.Value, modifiedDatetimeEnd.Value, format.Value, compression.Value); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/AmazonS3Dataset.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/AmazonS3Dataset.cs deleted file mode 100644 index 3e7b4bff..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/AmazonS3Dataset.cs +++ /dev/null @@ -1,82 +0,0 @@ -// - -#nullable disable - -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// A single Amazon Simple Storage Service (S3) object or a set of S3 objects. - public partial class AmazonS3Dataset : DataFactoryDatasetProperties - { - /// Initializes a new instance of AmazonS3Dataset. - /// Linked service reference. - /// The name of the Amazon S3 bucket. Type: string (or Expression with resultType string). - /// or is null. - public AmazonS3Dataset(DataFactoryLinkedServiceReference linkedServiceName, DataFactoryElement bucketName) : base(linkedServiceName) - { - Argument.AssertNotNull(linkedServiceName, nameof(linkedServiceName)); - Argument.AssertNotNull(bucketName, nameof(bucketName)); - - BucketName = bucketName; - DatasetType = "AmazonS3Object"; - } - - /// Initializes a new instance of AmazonS3Dataset. - /// Type of dataset. - /// Dataset description. - /// Columns that define the structure of the dataset. Type: array (or Expression with resultType array), itemType: DatasetDataElement. - /// Columns that define the physical type schema of the dataset. Type: array (or Expression with resultType array), itemType: DatasetSchemaDataElement. - /// Linked service reference. - /// Parameters for dataset. - /// List of tags that can be used for describing the Dataset. - /// The folder that this Dataset is in. If not specified, Dataset will appear at the root level. - /// Additional Properties. - /// The name of the Amazon S3 bucket. Type: string (or Expression with resultType string). - /// The key of the Amazon S3 object. Type: string (or Expression with resultType string). - /// The prefix filter for the S3 object name. Type: string (or Expression with resultType string). - /// The version for the S3 object. Type: string (or Expression with resultType string). - /// The start of S3 object's modified datetime. Type: string (or Expression with resultType string). - /// The end of S3 object's modified datetime. Type: string (or Expression with resultType string). - /// - /// The format of files. - /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. - /// The available derived classes include , , , and . - /// - /// The data compression method used for the Amazon S3 object. - internal AmazonS3Dataset(string datasetType, string description, DataFactoryElement> structure, DataFactoryElement> schema, DataFactoryLinkedServiceReference linkedServiceName, IDictionary parameters, IList annotations, DatasetFolder folder, IDictionary> additionalProperties, DataFactoryElement bucketName, DataFactoryElement key, DataFactoryElement prefix, DataFactoryElement version, DataFactoryElement modifiedDatetimeStart, DataFactoryElement modifiedDatetimeEnd, DatasetStorageFormat format, DatasetCompression compression) : base(datasetType, description, structure, schema, linkedServiceName, parameters, annotations, folder, additionalProperties) - { - BucketName = bucketName; - Key = key; - Prefix = prefix; - Version = version; - ModifiedDatetimeStart = modifiedDatetimeStart; - ModifiedDatetimeEnd = modifiedDatetimeEnd; - Format = format; - Compression = compression; - DatasetType = datasetType ?? "AmazonS3Object"; - } - - /// The name of the Amazon S3 bucket. Type: string (or Expression with resultType string). - public DataFactoryElement BucketName { get; set; } - /// The key of the Amazon S3 object. Type: string (or Expression with resultType string). - public DataFactoryElement Key { get; set; } - /// The prefix filter for the S3 object name. Type: string (or Expression with resultType string). - public DataFactoryElement Prefix { get; set; } - /// The version for the S3 object. Type: string (or Expression with resultType string). - public DataFactoryElement Version { get; set; } - /// The start of S3 object's modified datetime. Type: string (or Expression with resultType string). - public DataFactoryElement ModifiedDatetimeStart { get; set; } - /// The end of S3 object's modified datetime. Type: string (or Expression with resultType string). - public DataFactoryElement ModifiedDatetimeEnd { get; set; } - /// - /// The format of files. - /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. - /// The available derived classes include , , , and . - /// - public DatasetStorageFormat Format { get; set; } - /// The data compression method used for the Amazon S3 object. - public DatasetCompression Compression { get; set; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/AmazonS3LinkedService.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/AmazonS3LinkedService.Serialization.cs deleted file mode 100644 index e0684982..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/AmazonS3LinkedService.Serialization.cs +++ /dev/null @@ -1,246 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class AmazonS3LinkedService : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - writer.WritePropertyName("type"u8); - writer.WriteStringValue(LinkedServiceType); - if (Optional.IsDefined(ConnectVia)) - { - writer.WritePropertyName("connectVia"u8); - writer.WriteObjectValue(ConnectVia); - } - if (Optional.IsDefined(Description)) - { - writer.WritePropertyName("description"u8); - writer.WriteStringValue(Description); - } - if (Optional.IsCollectionDefined(Parameters)) - { - writer.WritePropertyName("parameters"u8); - writer.WriteStartObject(); - foreach (var item in Parameters) - { - writer.WritePropertyName(item.Key); - writer.WriteObjectValue(item.Value); - } - writer.WriteEndObject(); - } - if (Optional.IsCollectionDefined(Annotations)) - { - writer.WritePropertyName("annotations"u8); - writer.WriteStartArray(); - foreach (var item in Annotations) - { - if (item == null) - { - writer.WriteNullValue(); - continue; - } -#if NET6_0_OR_GREATER - writer.WriteRawValue(item); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.ToString()).RootElement); -#endif - } - writer.WriteEndArray(); - } - writer.WritePropertyName("typeProperties"u8); - writer.WriteStartObject(); - if (Optional.IsDefined(AuthenticationType)) - { - writer.WritePropertyName("authenticationType"u8); - JsonSerializer.Serialize(writer, AuthenticationType); - } - if (Optional.IsDefined(AccessKeyId)) - { - writer.WritePropertyName("accessKeyId"u8); - JsonSerializer.Serialize(writer, AccessKeyId); - } - if (Optional.IsDefined(SecretAccessKey)) - { - writer.WritePropertyName("secretAccessKey"u8); - JsonSerializer.Serialize(writer, SecretAccessKey); - } - if (Optional.IsDefined(ServiceUri)) - { - writer.WritePropertyName("serviceUrl"u8); - JsonSerializer.Serialize(writer, ServiceUri); - } - if (Optional.IsDefined(SessionToken)) - { - writer.WritePropertyName("sessionToken"u8); - JsonSerializer.Serialize(writer, SessionToken); - } - if (Optional.IsDefined(EncryptedCredential)) - { - writer.WritePropertyName("encryptedCredential"u8); - writer.WriteStringValue(EncryptedCredential); - } - writer.WriteEndObject(); - foreach (var item in AdditionalProperties) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.Value.ToString()).RootElement); -#endif - } - writer.WriteEndObject(); - } - - internal static AmazonS3LinkedService DeserializeAmazonS3LinkedService(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - string type = default; - Optional connectVia = default; - Optional description = default; - Optional> parameters = default; - Optional> annotations = default; - Optional> authenticationType = default; - Optional> accessKeyId = default; - Optional secretAccessKey = default; - Optional> serviceUrl = default; - Optional sessionToken = default; - Optional encryptedCredential = default; - IDictionary> additionalProperties = default; - Dictionary> additionalPropertiesDictionary = new Dictionary>(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("type"u8)) - { - type = property.Value.GetString(); - continue; - } - if (property.NameEquals("connectVia"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - connectVia = IntegrationRuntimeReference.DeserializeIntegrationRuntimeReference(property.Value); - continue; - } - if (property.NameEquals("description"u8)) - { - description = property.Value.GetString(); - continue; - } - if (property.NameEquals("parameters"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - Dictionary dictionary = new Dictionary(); - foreach (var property0 in property.Value.EnumerateObject()) - { - dictionary.Add(property0.Name, EntityParameterSpecification.DeserializeEntityParameterSpecification(property0.Value)); - } - parameters = dictionary; - continue; - } - if (property.NameEquals("annotations"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - if (item.ValueKind == JsonValueKind.Null) - { - array.Add(null); - } - else - { - array.Add(BinaryData.FromString(item.GetRawText())); - } - } - annotations = array; - continue; - } - if (property.NameEquals("typeProperties"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - foreach (var property0 in property.Value.EnumerateObject()) - { - if (property0.NameEquals("authenticationType"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - authenticationType = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("accessKeyId"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - accessKeyId = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("secretAccessKey"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - secretAccessKey = JsonSerializer.Deserialize(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("serviceUrl"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - serviceUrl = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("sessionToken"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - sessionToken = JsonSerializer.Deserialize(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("encryptedCredential"u8)) - { - encryptedCredential = property0.Value.GetString(); - continue; - } - } - continue; - } - additionalPropertiesDictionary.Add(property.Name, JsonSerializer.Deserialize>(property.Value.GetRawText())); - } - additionalProperties = additionalPropertiesDictionary; - return new AmazonS3LinkedService(type, connectVia.Value, description.Value, Optional.ToDictionary(parameters), Optional.ToList(annotations), additionalProperties, authenticationType.Value, accessKeyId.Value, secretAccessKey, serviceUrl.Value, sessionToken, encryptedCredential.Value); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/AmazonS3LinkedService.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/AmazonS3LinkedService.cs deleted file mode 100644 index a067fa90..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/AmazonS3LinkedService.cs +++ /dev/null @@ -1,55 +0,0 @@ -// - -#nullable disable - -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// Linked service for Amazon S3. - public partial class AmazonS3LinkedService : DataFactoryLinkedServiceProperties - { - /// Initializes a new instance of AmazonS3LinkedService. - public AmazonS3LinkedService() - { - LinkedServiceType = "AmazonS3"; - } - - /// Initializes a new instance of AmazonS3LinkedService. - /// Type of linked service. - /// The integration runtime reference. - /// Linked service description. - /// Parameters for linked service. - /// List of tags that can be used for describing the linked service. - /// Additional Properties. - /// The authentication type of S3. Allowed value: AccessKey (default) or TemporarySecurityCredentials. Type: string (or Expression with resultType string). - /// The access key identifier of the Amazon S3 Identity and Access Management (IAM) user. Type: string (or Expression with resultType string). - /// The secret access key of the Amazon S3 Identity and Access Management (IAM) user. - /// This value specifies the endpoint to access with the S3 Connector. This is an optional property; change it only if you want to try a different service endpoint or want to switch between https and http. Type: string (or Expression with resultType string). - /// The session token for the S3 temporary security credential. - /// The encrypted credential used for authentication. Credentials are encrypted using the integration runtime credential manager. Type: string. - internal AmazonS3LinkedService(string linkedServiceType, IntegrationRuntimeReference connectVia, string description, IDictionary parameters, IList annotations, IDictionary> additionalProperties, DataFactoryElement authenticationType, DataFactoryElement accessKeyId, DataFactorySecretBaseDefinition secretAccessKey, DataFactoryElement serviceUri, DataFactorySecretBaseDefinition sessionToken, string encryptedCredential) : base(linkedServiceType, connectVia, description, parameters, annotations, additionalProperties) - { - AuthenticationType = authenticationType; - AccessKeyId = accessKeyId; - SecretAccessKey = secretAccessKey; - ServiceUri = serviceUri; - SessionToken = sessionToken; - EncryptedCredential = encryptedCredential; - LinkedServiceType = linkedServiceType ?? "AmazonS3"; - } - - /// The authentication type of S3. Allowed value: AccessKey (default) or TemporarySecurityCredentials. Type: string (or Expression with resultType string). - public DataFactoryElement AuthenticationType { get; set; } - /// The access key identifier of the Amazon S3 Identity and Access Management (IAM) user. Type: string (or Expression with resultType string). - public DataFactoryElement AccessKeyId { get; set; } - /// The secret access key of the Amazon S3 Identity and Access Management (IAM) user. - public DataFactorySecretBaseDefinition SecretAccessKey { get; set; } - /// This value specifies the endpoint to access with the S3 Connector. This is an optional property; change it only if you want to try a different service endpoint or want to switch between https and http. Type: string (or Expression with resultType string). - public DataFactoryElement ServiceUri { get; set; } - /// The session token for the S3 temporary security credential. - public DataFactorySecretBaseDefinition SessionToken { get; set; } - /// The encrypted credential used for authentication. Credentials are encrypted using the integration runtime credential manager. Type: string. - public string EncryptedCredential { get; set; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/AmazonS3Location.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/AmazonS3Location.Serialization.cs deleted file mode 100644 index 0c3e6d2f..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/AmazonS3Location.Serialization.cs +++ /dev/null @@ -1,112 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class AmazonS3Location : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - if (Optional.IsDefined(BucketName)) - { - writer.WritePropertyName("bucketName"u8); - JsonSerializer.Serialize(writer, BucketName); - } - if (Optional.IsDefined(Version)) - { - writer.WritePropertyName("version"u8); - JsonSerializer.Serialize(writer, Version); - } - writer.WritePropertyName("type"u8); - writer.WriteStringValue(DatasetLocationType); - if (Optional.IsDefined(FolderPath)) - { - writer.WritePropertyName("folderPath"u8); - JsonSerializer.Serialize(writer, FolderPath); - } - if (Optional.IsDefined(FileName)) - { - writer.WritePropertyName("fileName"u8); - JsonSerializer.Serialize(writer, FileName); - } - foreach (var item in AdditionalProperties) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.Value.ToString()).RootElement); -#endif - } - writer.WriteEndObject(); - } - - internal static AmazonS3Location DeserializeAmazonS3Location(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - Optional> bucketName = default; - Optional> version = default; - string type = default; - Optional> folderPath = default; - Optional> fileName = default; - IDictionary> additionalProperties = default; - Dictionary> additionalPropertiesDictionary = new Dictionary>(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("bucketName"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - bucketName = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("version"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - version = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("type"u8)) - { - type = property.Value.GetString(); - continue; - } - if (property.NameEquals("folderPath"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - folderPath = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("fileName"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - fileName = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - additionalPropertiesDictionary.Add(property.Name, JsonSerializer.Deserialize>(property.Value.GetRawText())); - } - additionalProperties = additionalPropertiesDictionary; - return new AmazonS3Location(type, folderPath.Value, fileName.Value, additionalProperties, bucketName.Value, version.Value); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/AmazonS3Location.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/AmazonS3Location.cs deleted file mode 100644 index 0113bf2b..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/AmazonS3Location.cs +++ /dev/null @@ -1,37 +0,0 @@ -// - -#nullable disable - -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// The location of amazon S3 dataset. - public partial class AmazonS3Location : DatasetLocation - { - /// Initializes a new instance of AmazonS3Location. - public AmazonS3Location() - { - DatasetLocationType = "AmazonS3Location"; - } - - /// Initializes a new instance of AmazonS3Location. - /// Type of dataset storage location. - /// Specify the folder path of dataset. Type: string (or Expression with resultType string). - /// Specify the file name of dataset. Type: string (or Expression with resultType string). - /// Additional Properties. - /// Specify the bucketName of amazon S3. Type: string (or Expression with resultType string). - /// Specify the version of amazon S3. Type: string (or Expression with resultType string). - internal AmazonS3Location(string datasetLocationType, DataFactoryElement folderPath, DataFactoryElement fileName, IDictionary> additionalProperties, DataFactoryElement bucketName, DataFactoryElement version) : base(datasetLocationType, folderPath, fileName, additionalProperties) - { - BucketName = bucketName; - Version = version; - DatasetLocationType = datasetLocationType ?? "AmazonS3Location"; - } - - /// Specify the bucketName of amazon S3. Type: string (or Expression with resultType string). - public DataFactoryElement BucketName { get; set; } - /// Specify the version of amazon S3. Type: string (or Expression with resultType string). - public DataFactoryElement Version { get; set; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/AmazonS3ReadSettings.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/AmazonS3ReadSettings.Serialization.cs deleted file mode 100644 index 82484585..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/AmazonS3ReadSettings.Serialization.cs +++ /dev/null @@ -1,232 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class AmazonS3ReadSettings : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - if (Optional.IsDefined(Recursive)) - { - writer.WritePropertyName("recursive"u8); - JsonSerializer.Serialize(writer, Recursive); - } - if (Optional.IsDefined(WildcardFolderPath)) - { - writer.WritePropertyName("wildcardFolderPath"u8); - JsonSerializer.Serialize(writer, WildcardFolderPath); - } - if (Optional.IsDefined(WildcardFileName)) - { - writer.WritePropertyName("wildcardFileName"u8); - JsonSerializer.Serialize(writer, WildcardFileName); - } - if (Optional.IsDefined(Prefix)) - { - writer.WritePropertyName("prefix"u8); - JsonSerializer.Serialize(writer, Prefix); - } - if (Optional.IsDefined(FileListPath)) - { - writer.WritePropertyName("fileListPath"u8); - JsonSerializer.Serialize(writer, FileListPath); - } - if (Optional.IsDefined(EnablePartitionDiscovery)) - { - writer.WritePropertyName("enablePartitionDiscovery"u8); - JsonSerializer.Serialize(writer, EnablePartitionDiscovery); - } - if (Optional.IsDefined(PartitionRootPath)) - { - writer.WritePropertyName("partitionRootPath"u8); - JsonSerializer.Serialize(writer, PartitionRootPath); - } - if (Optional.IsDefined(DeleteFilesAfterCompletion)) - { - writer.WritePropertyName("deleteFilesAfterCompletion"u8); - JsonSerializer.Serialize(writer, DeleteFilesAfterCompletion); - } - if (Optional.IsDefined(ModifiedDatetimeStart)) - { - writer.WritePropertyName("modifiedDatetimeStart"u8); - JsonSerializer.Serialize(writer, ModifiedDatetimeStart); - } - if (Optional.IsDefined(ModifiedDatetimeEnd)) - { - writer.WritePropertyName("modifiedDatetimeEnd"u8); - JsonSerializer.Serialize(writer, ModifiedDatetimeEnd); - } - writer.WritePropertyName("type"u8); - writer.WriteStringValue(StoreReadSettingsType); - if (Optional.IsDefined(MaxConcurrentConnections)) - { - writer.WritePropertyName("maxConcurrentConnections"u8); - JsonSerializer.Serialize(writer, MaxConcurrentConnections); - } - if (Optional.IsDefined(DisableMetricsCollection)) - { - writer.WritePropertyName("disableMetricsCollection"u8); - JsonSerializer.Serialize(writer, DisableMetricsCollection); - } - foreach (var item in AdditionalProperties) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.Value.ToString()).RootElement); -#endif - } - writer.WriteEndObject(); - } - - internal static AmazonS3ReadSettings DeserializeAmazonS3ReadSettings(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - Optional> recursive = default; - Optional> wildcardFolderPath = default; - Optional> wildcardFileName = default; - Optional> prefix = default; - Optional> fileListPath = default; - Optional> enablePartitionDiscovery = default; - Optional> partitionRootPath = default; - Optional> deleteFilesAfterCompletion = default; - Optional> modifiedDatetimeStart = default; - Optional> modifiedDatetimeEnd = default; - string type = default; - Optional> maxConcurrentConnections = default; - Optional> disableMetricsCollection = default; - IDictionary> additionalProperties = default; - Dictionary> additionalPropertiesDictionary = new Dictionary>(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("recursive"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - recursive = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("wildcardFolderPath"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - wildcardFolderPath = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("wildcardFileName"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - wildcardFileName = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("prefix"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - prefix = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("fileListPath"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - fileListPath = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("enablePartitionDiscovery"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - enablePartitionDiscovery = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("partitionRootPath"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - partitionRootPath = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("deleteFilesAfterCompletion"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - deleteFilesAfterCompletion = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("modifiedDatetimeStart"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - modifiedDatetimeStart = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("modifiedDatetimeEnd"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - modifiedDatetimeEnd = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("type"u8)) - { - type = property.Value.GetString(); - continue; - } - if (property.NameEquals("maxConcurrentConnections"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - maxConcurrentConnections = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("disableMetricsCollection"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - disableMetricsCollection = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - additionalPropertiesDictionary.Add(property.Name, JsonSerializer.Deserialize>(property.Value.GetRawText())); - } - additionalProperties = additionalPropertiesDictionary; - return new AmazonS3ReadSettings(type, maxConcurrentConnections.Value, disableMetricsCollection.Value, additionalProperties, recursive.Value, wildcardFolderPath.Value, wildcardFileName.Value, prefix.Value, fileListPath.Value, enablePartitionDiscovery.Value, partitionRootPath.Value, deleteFilesAfterCompletion.Value, modifiedDatetimeStart.Value, modifiedDatetimeEnd.Value); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/AmazonS3ReadSettings.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/AmazonS3ReadSettings.cs deleted file mode 100644 index 615eb140..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/AmazonS3ReadSettings.cs +++ /dev/null @@ -1,69 +0,0 @@ -// - -#nullable disable - -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// Amazon S3 read settings. - public partial class AmazonS3ReadSettings : StoreReadSettings - { - /// Initializes a new instance of AmazonS3ReadSettings. - public AmazonS3ReadSettings() - { - StoreReadSettingsType = "AmazonS3ReadSettings"; - } - - /// Initializes a new instance of AmazonS3ReadSettings. - /// The read setting type. - /// The maximum concurrent connection count for the source data store. Type: integer (or Expression with resultType integer). - /// If true, disable data store metrics collection. Default is false. Type: boolean (or Expression with resultType boolean). - /// Additional Properties. - /// If true, files under the folder path will be read recursively. Default is true. Type: boolean (or Expression with resultType boolean). - /// AmazonS3 wildcardFolderPath. Type: string (or Expression with resultType string). - /// AmazonS3 wildcardFileName. Type: string (or Expression with resultType string). - /// The prefix filter for the S3 object name. Type: string (or Expression with resultType string). - /// Point to a text file that lists each file (relative path to the path configured in the dataset) that you want to copy. Type: string (or Expression with resultType string). - /// Indicates whether to enable partition discovery. Type: boolean (or Expression with resultType boolean). - /// Specify the root path where partition discovery starts from. Type: string (or Expression with resultType string). - /// Indicates whether the source files need to be deleted after copy completion. Default is false. Type: boolean (or Expression with resultType boolean). - /// The start of file's modified datetime. Type: string (or Expression with resultType string). - /// The end of file's modified datetime. Type: string (or Expression with resultType string). - internal AmazonS3ReadSettings(string storeReadSettingsType, DataFactoryElement maxConcurrentConnections, DataFactoryElement disableMetricsCollection, IDictionary> additionalProperties, DataFactoryElement recursive, DataFactoryElement wildcardFolderPath, DataFactoryElement wildcardFileName, DataFactoryElement prefix, DataFactoryElement fileListPath, DataFactoryElement enablePartitionDiscovery, DataFactoryElement partitionRootPath, DataFactoryElement deleteFilesAfterCompletion, DataFactoryElement modifiedDatetimeStart, DataFactoryElement modifiedDatetimeEnd) : base(storeReadSettingsType, maxConcurrentConnections, disableMetricsCollection, additionalProperties) - { - Recursive = recursive; - WildcardFolderPath = wildcardFolderPath; - WildcardFileName = wildcardFileName; - Prefix = prefix; - FileListPath = fileListPath; - EnablePartitionDiscovery = enablePartitionDiscovery; - PartitionRootPath = partitionRootPath; - DeleteFilesAfterCompletion = deleteFilesAfterCompletion; - ModifiedDatetimeStart = modifiedDatetimeStart; - ModifiedDatetimeEnd = modifiedDatetimeEnd; - StoreReadSettingsType = storeReadSettingsType ?? "AmazonS3ReadSettings"; - } - - /// If true, files under the folder path will be read recursively. Default is true. Type: boolean (or Expression with resultType boolean). - public DataFactoryElement Recursive { get; set; } - /// AmazonS3 wildcardFolderPath. Type: string (or Expression with resultType string). - public DataFactoryElement WildcardFolderPath { get; set; } - /// AmazonS3 wildcardFileName. Type: string (or Expression with resultType string). - public DataFactoryElement WildcardFileName { get; set; } - /// The prefix filter for the S3 object name. Type: string (or Expression with resultType string). - public DataFactoryElement Prefix { get; set; } - /// Point to a text file that lists each file (relative path to the path configured in the dataset) that you want to copy. Type: string (or Expression with resultType string). - public DataFactoryElement FileListPath { get; set; } - /// Indicates whether to enable partition discovery. Type: boolean (or Expression with resultType boolean). - public DataFactoryElement EnablePartitionDiscovery { get; set; } - /// Specify the root path where partition discovery starts from. Type: string (or Expression with resultType string). - public DataFactoryElement PartitionRootPath { get; set; } - /// Indicates whether the source files need to be deleted after copy completion. Default is false. Type: boolean (or Expression with resultType boolean). - public DataFactoryElement DeleteFilesAfterCompletion { get; set; } - /// The start of file's modified datetime. Type: string (or Expression with resultType string). - public DataFactoryElement ModifiedDatetimeStart { get; set; } - /// The end of file's modified datetime. Type: string (or Expression with resultType string). - public DataFactoryElement ModifiedDatetimeEnd { get; set; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/AppFiguresLinkedService.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/AppFiguresLinkedService.Serialization.cs deleted file mode 100644 index 845fdd12..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/AppFiguresLinkedService.Serialization.cs +++ /dev/null @@ -1,182 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class AppFiguresLinkedService : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - writer.WritePropertyName("type"u8); - writer.WriteStringValue(LinkedServiceType); - if (Optional.IsDefined(ConnectVia)) - { - writer.WritePropertyName("connectVia"u8); - writer.WriteObjectValue(ConnectVia); - } - if (Optional.IsDefined(Description)) - { - writer.WritePropertyName("description"u8); - writer.WriteStringValue(Description); - } - if (Optional.IsCollectionDefined(Parameters)) - { - writer.WritePropertyName("parameters"u8); - writer.WriteStartObject(); - foreach (var item in Parameters) - { - writer.WritePropertyName(item.Key); - writer.WriteObjectValue(item.Value); - } - writer.WriteEndObject(); - } - if (Optional.IsCollectionDefined(Annotations)) - { - writer.WritePropertyName("annotations"u8); - writer.WriteStartArray(); - foreach (var item in Annotations) - { - if (item == null) - { - writer.WriteNullValue(); - continue; - } -#if NET6_0_OR_GREATER - writer.WriteRawValue(item); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.ToString()).RootElement); -#endif - } - writer.WriteEndArray(); - } - writer.WritePropertyName("typeProperties"u8); - writer.WriteStartObject(); - writer.WritePropertyName("userName"u8); - JsonSerializer.Serialize(writer, UserName); - writer.WritePropertyName("password"u8); - JsonSerializer.Serialize(writer, Password); writer.WritePropertyName("clientKey"u8); - JsonSerializer.Serialize(writer, ClientKey); writer.WriteEndObject(); - foreach (var item in AdditionalProperties) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.Value.ToString()).RootElement); -#endif - } - writer.WriteEndObject(); - } - - internal static AppFiguresLinkedService DeserializeAppFiguresLinkedService(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - string type = default; - Optional connectVia = default; - Optional description = default; - Optional> parameters = default; - Optional> annotations = default; - DataFactoryElement userName = default; - DataFactorySecretBaseDefinition password = default; - DataFactorySecretBaseDefinition clientKey = default; - IDictionary> additionalProperties = default; - Dictionary> additionalPropertiesDictionary = new Dictionary>(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("type"u8)) - { - type = property.Value.GetString(); - continue; - } - if (property.NameEquals("connectVia"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - connectVia = IntegrationRuntimeReference.DeserializeIntegrationRuntimeReference(property.Value); - continue; - } - if (property.NameEquals("description"u8)) - { - description = property.Value.GetString(); - continue; - } - if (property.NameEquals("parameters"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - Dictionary dictionary = new Dictionary(); - foreach (var property0 in property.Value.EnumerateObject()) - { - dictionary.Add(property0.Name, EntityParameterSpecification.DeserializeEntityParameterSpecification(property0.Value)); - } - parameters = dictionary; - continue; - } - if (property.NameEquals("annotations"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - if (item.ValueKind == JsonValueKind.Null) - { - array.Add(null); - } - else - { - array.Add(BinaryData.FromString(item.GetRawText())); - } - } - annotations = array; - continue; - } - if (property.NameEquals("typeProperties"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - foreach (var property0 in property.Value.EnumerateObject()) - { - if (property0.NameEquals("userName"u8)) - { - userName = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("password"u8)) - { - password = JsonSerializer.Deserialize(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("clientKey"u8)) - { - clientKey = JsonSerializer.Deserialize(property0.Value.GetRawText()); - continue; - } - } - continue; - } - additionalPropertiesDictionary.Add(property.Name, JsonSerializer.Deserialize>(property.Value.GetRawText())); - } - additionalProperties = additionalPropertiesDictionary; - return new AppFiguresLinkedService(type, connectVia.Value, description.Value, Optional.ToDictionary(parameters), Optional.ToList(annotations), additionalProperties, userName, password, clientKey); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/AppFiguresLinkedService.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/AppFiguresLinkedService.cs deleted file mode 100644 index 70547126..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/AppFiguresLinkedService.cs +++ /dev/null @@ -1,55 +0,0 @@ -// - -#nullable disable - -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// Linked service for AppFigures. - public partial class AppFiguresLinkedService : DataFactoryLinkedServiceProperties - { - /// Initializes a new instance of AppFiguresLinkedService. - /// The username of the Appfigures source. Type: string (or Expression with resultType string). - /// The password of the AppFigures source. - /// The client key for the AppFigures source. - /// , or is null. - public AppFiguresLinkedService(DataFactoryElement userName, DataFactorySecretBaseDefinition password, DataFactorySecretBaseDefinition clientKey) - { - Argument.AssertNotNull(userName, nameof(userName)); - Argument.AssertNotNull(password, nameof(password)); - Argument.AssertNotNull(clientKey, nameof(clientKey)); - - UserName = userName; - Password = password; - ClientKey = clientKey; - LinkedServiceType = "AppFigures"; - } - - /// Initializes a new instance of AppFiguresLinkedService. - /// Type of linked service. - /// The integration runtime reference. - /// Linked service description. - /// Parameters for linked service. - /// List of tags that can be used for describing the linked service. - /// Additional Properties. - /// The username of the Appfigures source. Type: string (or Expression with resultType string). - /// The password of the AppFigures source. - /// The client key for the AppFigures source. - internal AppFiguresLinkedService(string linkedServiceType, IntegrationRuntimeReference connectVia, string description, IDictionary parameters, IList annotations, IDictionary> additionalProperties, DataFactoryElement userName, DataFactorySecretBaseDefinition password, DataFactorySecretBaseDefinition clientKey) : base(linkedServiceType, connectVia, description, parameters, annotations, additionalProperties) - { - UserName = userName; - Password = password; - ClientKey = clientKey; - LinkedServiceType = linkedServiceType ?? "AppFigures"; - } - - /// The username of the Appfigures source. Type: string (or Expression with resultType string). - public DataFactoryElement UserName { get; set; } - /// The password of the AppFigures source. - public DataFactorySecretBaseDefinition Password { get; set; } - /// The client key for the AppFigures source. - public DataFactorySecretBaseDefinition ClientKey { get; set; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/AppendVariableActivity.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/AppendVariableActivity.Serialization.cs deleted file mode 100644 index 79e5c17d..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/AppendVariableActivity.Serialization.cs +++ /dev/null @@ -1,192 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class AppendVariableActivity : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ActivityType); - if (Optional.IsDefined(Description)) - { - writer.WritePropertyName("description"u8); - writer.WriteStringValue(Description); - } - if (Optional.IsDefined(State)) - { - writer.WritePropertyName("state"u8); - writer.WriteStringValue(State.Value.ToString()); - } - if (Optional.IsDefined(OnInactiveMarkAs)) - { - writer.WritePropertyName("onInactiveMarkAs"u8); - writer.WriteStringValue(OnInactiveMarkAs.Value.ToString()); - } - if (Optional.IsCollectionDefined(DependsOn)) - { - writer.WritePropertyName("dependsOn"u8); - writer.WriteStartArray(); - foreach (var item in DependsOn) - { - writer.WriteObjectValue(item); - } - writer.WriteEndArray(); - } - if (Optional.IsCollectionDefined(UserProperties)) - { - writer.WritePropertyName("userProperties"u8); - writer.WriteStartArray(); - foreach (var item in UserProperties) - { - writer.WriteObjectValue(item); - } - writer.WriteEndArray(); - } - writer.WritePropertyName("typeProperties"u8); - writer.WriteStartObject(); - if (Optional.IsDefined(VariableName)) - { - writer.WritePropertyName("variableName"u8); - writer.WriteStringValue(VariableName); - } - if (Optional.IsDefined(Value)) - { - writer.WritePropertyName("value"u8); - JsonSerializer.Serialize(writer, Value); - } - writer.WriteEndObject(); - foreach (var item in AdditionalProperties) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.Value.ToString()).RootElement); -#endif - } - writer.WriteEndObject(); - } - - internal static AppendVariableActivity DeserializeAppendVariableActivity(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - string name = default; - string type = default; - Optional description = default; - Optional state = default; - Optional onInactiveMarkAs = default; - Optional> dependsOn = default; - Optional> userProperties = default; - Optional variableName = default; - Optional> value = default; - IDictionary> additionalProperties = default; - Dictionary> additionalPropertiesDictionary = new Dictionary>(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("name"u8)) - { - name = property.Value.GetString(); - continue; - } - if (property.NameEquals("type"u8)) - { - type = property.Value.GetString(); - continue; - } - if (property.NameEquals("description"u8)) - { - description = property.Value.GetString(); - continue; - } - if (property.NameEquals("state"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - state = new PipelineActivityState(property.Value.GetString()); - continue; - } - if (property.NameEquals("onInactiveMarkAs"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - onInactiveMarkAs = new ActivityOnInactiveMarkAs(property.Value.GetString()); - continue; - } - if (property.NameEquals("dependsOn"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - array.Add(PipelineActivityDependency.DeserializePipelineActivityDependency(item)); - } - dependsOn = array; - continue; - } - if (property.NameEquals("userProperties"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - array.Add(PipelineActivityUserProperty.DeserializePipelineActivityUserProperty(item)); - } - userProperties = array; - continue; - } - if (property.NameEquals("typeProperties"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - foreach (var property0 in property.Value.EnumerateObject()) - { - if (property0.NameEquals("variableName"u8)) - { - variableName = property0.Value.GetString(); - continue; - } - if (property0.NameEquals("value"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - value = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - } - continue; - } - additionalPropertiesDictionary.Add(property.Name, JsonSerializer.Deserialize>(property.Value.GetRawText())); - } - additionalProperties = additionalPropertiesDictionary; - return new AppendVariableActivity(name, type, description.Value, Optional.ToNullable(state), Optional.ToNullable(onInactiveMarkAs), Optional.ToList(dependsOn), Optional.ToList(userProperties), additionalProperties, variableName.Value, value.Value); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/AppendVariableActivity.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/AppendVariableActivity.cs deleted file mode 100644 index d91c58fd..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/AppendVariableActivity.cs +++ /dev/null @@ -1,46 +0,0 @@ -// - -#nullable disable - -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// Append value for a Variable of type Array. - public partial class AppendVariableActivity : ControlActivity - { - /// Initializes a new instance of AppendVariableActivity. - /// Activity name. - /// is null. - public AppendVariableActivity(string name) : base(name) - { - Argument.AssertNotNull(name, nameof(name)); - - ActivityType = "AppendVariable"; - } - - /// Initializes a new instance of AppendVariableActivity. - /// Activity name. - /// Type of activity. - /// Activity description. - /// Activity state. This is an optional property and if not provided, the state will be Active by default. - /// 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. - /// Activity depends on condition. - /// Activity user properties. - /// Additional Properties. - /// Name of the variable whose value needs to be appended to. - /// Value to be appended. Type: could be a static value matching type of the variable item or Expression with resultType matching type of the variable item. - internal AppendVariableActivity(string name, string activityType, string description, PipelineActivityState? state, ActivityOnInactiveMarkAs? onInactiveMarkAs, IList dependsOn, IList userProperties, IDictionary> additionalProperties, string variableName, DataFactoryElement value) : base(name, activityType, description, state, onInactiveMarkAs, dependsOn, userProperties, additionalProperties) - { - VariableName = variableName; - Value = value; - ActivityType = activityType ?? "AppendVariable"; - } - - /// Name of the variable whose value needs to be appended to. - public string VariableName { get; set; } - /// Value to be appended. Type: could be a static value matching type of the variable item or Expression with resultType matching type of the variable item. - public DataFactoryElement Value { get; set; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/AsanaLinkedService.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/AsanaLinkedService.Serialization.cs deleted file mode 100644 index 7447f7ec..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/AsanaLinkedService.Serialization.cs +++ /dev/null @@ -1,178 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class AsanaLinkedService : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - writer.WritePropertyName("type"u8); - writer.WriteStringValue(LinkedServiceType); - if (Optional.IsDefined(ConnectVia)) - { - writer.WritePropertyName("connectVia"u8); - writer.WriteObjectValue(ConnectVia); - } - if (Optional.IsDefined(Description)) - { - writer.WritePropertyName("description"u8); - writer.WriteStringValue(Description); - } - if (Optional.IsCollectionDefined(Parameters)) - { - writer.WritePropertyName("parameters"u8); - writer.WriteStartObject(); - foreach (var item in Parameters) - { - writer.WritePropertyName(item.Key); - writer.WriteObjectValue(item.Value); - } - writer.WriteEndObject(); - } - if (Optional.IsCollectionDefined(Annotations)) - { - writer.WritePropertyName("annotations"u8); - writer.WriteStartArray(); - foreach (var item in Annotations) - { - if (item == null) - { - writer.WriteNullValue(); - continue; - } -#if NET6_0_OR_GREATER - writer.WriteRawValue(item); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.ToString()).RootElement); -#endif - } - writer.WriteEndArray(); - } - writer.WritePropertyName("typeProperties"u8); - writer.WriteStartObject(); - writer.WritePropertyName("apiToken"u8); - JsonSerializer.Serialize(writer, ApiToken); if (Optional.IsDefined(EncryptedCredential)) - { - writer.WritePropertyName("encryptedCredential"u8); - writer.WriteStringValue(EncryptedCredential); - } - writer.WriteEndObject(); - foreach (var item in AdditionalProperties) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.Value.ToString()).RootElement); -#endif - } - writer.WriteEndObject(); - } - - internal static AsanaLinkedService DeserializeAsanaLinkedService(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - string type = default; - Optional connectVia = default; - Optional description = default; - Optional> parameters = default; - Optional> annotations = default; - DataFactorySecretBaseDefinition apiToken = default; - Optional encryptedCredential = default; - IDictionary> additionalProperties = default; - Dictionary> additionalPropertiesDictionary = new Dictionary>(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("type"u8)) - { - type = property.Value.GetString(); - continue; - } - if (property.NameEquals("connectVia"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - connectVia = IntegrationRuntimeReference.DeserializeIntegrationRuntimeReference(property.Value); - continue; - } - if (property.NameEquals("description"u8)) - { - description = property.Value.GetString(); - continue; - } - if (property.NameEquals("parameters"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - Dictionary dictionary = new Dictionary(); - foreach (var property0 in property.Value.EnumerateObject()) - { - dictionary.Add(property0.Name, EntityParameterSpecification.DeserializeEntityParameterSpecification(property0.Value)); - } - parameters = dictionary; - continue; - } - if (property.NameEquals("annotations"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - if (item.ValueKind == JsonValueKind.Null) - { - array.Add(null); - } - else - { - array.Add(BinaryData.FromString(item.GetRawText())); - } - } - annotations = array; - continue; - } - if (property.NameEquals("typeProperties"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - foreach (var property0 in property.Value.EnumerateObject()) - { - if (property0.NameEquals("apiToken"u8)) - { - apiToken = JsonSerializer.Deserialize(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("encryptedCredential"u8)) - { - encryptedCredential = property0.Value.GetString(); - continue; - } - } - continue; - } - additionalPropertiesDictionary.Add(property.Name, JsonSerializer.Deserialize>(property.Value.GetRawText())); - } - additionalProperties = additionalPropertiesDictionary; - return new AsanaLinkedService(type, connectVia.Value, description.Value, Optional.ToDictionary(parameters), Optional.ToList(annotations), additionalProperties, apiToken, encryptedCredential.Value); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/AsanaLinkedService.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/AsanaLinkedService.cs deleted file mode 100644 index 17ddc915..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/AsanaLinkedService.cs +++ /dev/null @@ -1,45 +0,0 @@ -// - -#nullable disable - -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// Linked service for Asana. - public partial class AsanaLinkedService : DataFactoryLinkedServiceProperties - { - /// Initializes a new instance of AsanaLinkedService. - /// The api token for the Asana source. - /// is null. - public AsanaLinkedService(DataFactorySecretBaseDefinition apiToken) - { - Argument.AssertNotNull(apiToken, nameof(apiToken)); - - ApiToken = apiToken; - LinkedServiceType = "Asana"; - } - - /// Initializes a new instance of AsanaLinkedService. - /// Type of linked service. - /// The integration runtime reference. - /// Linked service description. - /// Parameters for linked service. - /// List of tags that can be used for describing the linked service. - /// Additional Properties. - /// The api token for the Asana source. - /// The encrypted credential used for authentication. Credentials are encrypted using the integration runtime credential manager. Type: string. - internal AsanaLinkedService(string linkedServiceType, IntegrationRuntimeReference connectVia, string description, IDictionary parameters, IList annotations, IDictionary> additionalProperties, DataFactorySecretBaseDefinition apiToken, string encryptedCredential) : base(linkedServiceType, connectVia, description, parameters, annotations, additionalProperties) - { - ApiToken = apiToken; - EncryptedCredential = encryptedCredential; - LinkedServiceType = linkedServiceType ?? "Asana"; - } - - /// The api token for the Asana source. - public DataFactorySecretBaseDefinition ApiToken { get; set; } - /// The encrypted credential used for authentication. Credentials are encrypted using the integration runtime credential manager. Type: string. - public string EncryptedCredential { get; set; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/AvroDataset.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/AvroDataset.Serialization.cs deleted file mode 100644 index 222a6e1b..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/AvroDataset.Serialization.cs +++ /dev/null @@ -1,242 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class AvroDataset : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - writer.WritePropertyName("type"u8); - writer.WriteStringValue(DatasetType); - if (Optional.IsDefined(Description)) - { - writer.WritePropertyName("description"u8); - writer.WriteStringValue(Description); - } - if (Optional.IsDefined(Structure)) - { - writer.WritePropertyName("structure"u8); - JsonSerializer.Serialize(writer, Structure); - } - if (Optional.IsDefined(Schema)) - { - writer.WritePropertyName("schema"u8); - JsonSerializer.Serialize(writer, Schema); - } - writer.WritePropertyName("linkedServiceName"u8); - JsonSerializer.Serialize(writer, LinkedServiceName); if (Optional.IsCollectionDefined(Parameters)) - { - writer.WritePropertyName("parameters"u8); - writer.WriteStartObject(); - foreach (var item in Parameters) - { - writer.WritePropertyName(item.Key); - writer.WriteObjectValue(item.Value); - } - writer.WriteEndObject(); - } - if (Optional.IsCollectionDefined(Annotations)) - { - writer.WritePropertyName("annotations"u8); - writer.WriteStartArray(); - foreach (var item in Annotations) - { - if (item == null) - { - writer.WriteNullValue(); - continue; - } -#if NET6_0_OR_GREATER - writer.WriteRawValue(item); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.ToString()).RootElement); -#endif - } - writer.WriteEndArray(); - } - if (Optional.IsDefined(Folder)) - { - writer.WritePropertyName("folder"u8); - writer.WriteObjectValue(Folder); - } - writer.WritePropertyName("typeProperties"u8); - writer.WriteStartObject(); - if (Optional.IsDefined(DataLocation)) - { - writer.WritePropertyName("location"u8); - writer.WriteObjectValue(DataLocation); - } - if (Optional.IsDefined(AvroCompressionCodec)) - { - writer.WritePropertyName("avroCompressionCodec"u8); - JsonSerializer.Serialize(writer, AvroCompressionCodec); - } - if (Optional.IsDefined(AvroCompressionLevel)) - { - writer.WritePropertyName("avroCompressionLevel"u8); - writer.WriteNumberValue(AvroCompressionLevel.Value); - } - writer.WriteEndObject(); - foreach (var item in AdditionalProperties) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.Value.ToString()).RootElement); -#endif - } - writer.WriteEndObject(); - } - - internal static AvroDataset DeserializeAvroDataset(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - string type = default; - Optional description = default; - Optional>> structure = default; - Optional>> schema = default; - DataFactoryLinkedServiceReference linkedServiceName = default; - Optional> parameters = default; - Optional> annotations = default; - Optional folder = default; - Optional location = default; - Optional> avroCompressionCodec = default; - Optional avroCompressionLevel = default; - IDictionary> additionalProperties = default; - Dictionary> additionalPropertiesDictionary = new Dictionary>(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("type"u8)) - { - type = property.Value.GetString(); - continue; - } - if (property.NameEquals("description"u8)) - { - description = property.Value.GetString(); - continue; - } - if (property.NameEquals("structure"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - structure = JsonSerializer.Deserialize>>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("schema"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - schema = JsonSerializer.Deserialize>>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("linkedServiceName"u8)) - { - linkedServiceName = JsonSerializer.Deserialize(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("parameters"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - Dictionary dictionary = new Dictionary(); - foreach (var property0 in property.Value.EnumerateObject()) - { - dictionary.Add(property0.Name, EntityParameterSpecification.DeserializeEntityParameterSpecification(property0.Value)); - } - parameters = dictionary; - continue; - } - if (property.NameEquals("annotations"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - if (item.ValueKind == JsonValueKind.Null) - { - array.Add(null); - } - else - { - array.Add(BinaryData.FromString(item.GetRawText())); - } - } - annotations = array; - continue; - } - if (property.NameEquals("folder"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - folder = DatasetFolder.DeserializeDatasetFolder(property.Value); - continue; - } - if (property.NameEquals("typeProperties"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - foreach (var property0 in property.Value.EnumerateObject()) - { - if (property0.NameEquals("location"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - location = DatasetLocation.DeserializeDatasetLocation(property0.Value); - continue; - } - if (property0.NameEquals("avroCompressionCodec"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - avroCompressionCodec = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("avroCompressionLevel"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - avroCompressionLevel = property0.Value.GetInt32(); - continue; - } - } - continue; - } - additionalPropertiesDictionary.Add(property.Name, JsonSerializer.Deserialize>(property.Value.GetRawText())); - } - additionalProperties = additionalPropertiesDictionary; - return new AvroDataset(type, description.Value, structure.Value, schema.Value, linkedServiceName, Optional.ToDictionary(parameters), Optional.ToList(annotations), folder.Value, additionalProperties, location.Value, avroCompressionCodec.Value, Optional.ToNullable(avroCompressionLevel)); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/AvroDataset.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/AvroDataset.cs deleted file mode 100644 index a9870d97..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/AvroDataset.cs +++ /dev/null @@ -1,59 +0,0 @@ -// - -#nullable disable - -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// Avro dataset. - public partial class AvroDataset : DataFactoryDatasetProperties - { - /// Initializes a new instance of AvroDataset. - /// Linked service reference. - /// is null. - public AvroDataset(DataFactoryLinkedServiceReference linkedServiceName) : base(linkedServiceName) - { - Argument.AssertNotNull(linkedServiceName, nameof(linkedServiceName)); - - DatasetType = "Avro"; - } - - /// Initializes a new instance of AvroDataset. - /// Type of dataset. - /// Dataset description. - /// Columns that define the structure of the dataset. Type: array (or Expression with resultType array), itemType: DatasetDataElement. - /// Columns that define the physical type schema of the dataset. Type: array (or Expression with resultType array), itemType: DatasetSchemaDataElement. - /// Linked service reference. - /// Parameters for dataset. - /// List of tags that can be used for describing the Dataset. - /// The folder that this Dataset is in. If not specified, Dataset will appear at the root level. - /// Additional Properties. - /// - /// The location of the avro storage. - /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. - /// The available derived classes include , , , , , , , , , , , and . - /// - /// The data avroCompressionCodec. Type: string (or Expression with resultType string). - /// - internal AvroDataset(string datasetType, string description, DataFactoryElement> structure, DataFactoryElement> schema, DataFactoryLinkedServiceReference linkedServiceName, IDictionary parameters, IList annotations, DatasetFolder folder, IDictionary> additionalProperties, DatasetLocation dataLocation, DataFactoryElement avroCompressionCodec, int? avroCompressionLevel) : base(datasetType, description, structure, schema, linkedServiceName, parameters, annotations, folder, additionalProperties) - { - DataLocation = dataLocation; - AvroCompressionCodec = avroCompressionCodec; - AvroCompressionLevel = avroCompressionLevel; - DatasetType = datasetType ?? "Avro"; - } - - /// - /// The location of the avro storage. - /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. - /// The available derived classes include , , , , , , , , , , , and . - /// - public DatasetLocation DataLocation { get; set; } - /// The data avroCompressionCodec. Type: string (or Expression with resultType string). - public DataFactoryElement AvroCompressionCodec { get; set; } - /// Gets or sets the avro compression level. - public int? AvroCompressionLevel { get; set; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/AvroSink.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/AvroSink.Serialization.cs deleted file mode 100644 index 9b6f615b..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/AvroSink.Serialization.cs +++ /dev/null @@ -1,172 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class AvroSink : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - if (Optional.IsDefined(StoreSettings)) - { - writer.WritePropertyName("storeSettings"u8); - writer.WriteObjectValue(StoreSettings); - } - if (Optional.IsDefined(FormatSettings)) - { - writer.WritePropertyName("formatSettings"u8); - writer.WriteObjectValue(FormatSettings); - } - writer.WritePropertyName("type"u8); - writer.WriteStringValue(CopySinkType); - if (Optional.IsDefined(WriteBatchSize)) - { - writer.WritePropertyName("writeBatchSize"u8); - JsonSerializer.Serialize(writer, WriteBatchSize); - } - if (Optional.IsDefined(WriteBatchTimeout)) - { - writer.WritePropertyName("writeBatchTimeout"u8); - JsonSerializer.Serialize(writer, WriteBatchTimeout); - } - if (Optional.IsDefined(SinkRetryCount)) - { - writer.WritePropertyName("sinkRetryCount"u8); - JsonSerializer.Serialize(writer, SinkRetryCount); - } - if (Optional.IsDefined(SinkRetryWait)) - { - writer.WritePropertyName("sinkRetryWait"u8); - JsonSerializer.Serialize(writer, SinkRetryWait); - } - if (Optional.IsDefined(MaxConcurrentConnections)) - { - writer.WritePropertyName("maxConcurrentConnections"u8); - JsonSerializer.Serialize(writer, MaxConcurrentConnections); - } - if (Optional.IsDefined(DisableMetricsCollection)) - { - writer.WritePropertyName("disableMetricsCollection"u8); - JsonSerializer.Serialize(writer, DisableMetricsCollection); - } - foreach (var item in AdditionalProperties) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.Value.ToString()).RootElement); -#endif - } - writer.WriteEndObject(); - } - - internal static AvroSink DeserializeAvroSink(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - Optional storeSettings = default; - Optional formatSettings = default; - string type = default; - Optional> writeBatchSize = default; - Optional> writeBatchTimeout = default; - Optional> sinkRetryCount = default; - Optional> sinkRetryWait = default; - Optional> maxConcurrentConnections = default; - Optional> disableMetricsCollection = default; - IDictionary> additionalProperties = default; - Dictionary> additionalPropertiesDictionary = new Dictionary>(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("storeSettings"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - storeSettings = StoreWriteSettings.DeserializeStoreWriteSettings(property.Value); - continue; - } - if (property.NameEquals("formatSettings"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - formatSettings = AvroWriteSettings.DeserializeAvroWriteSettings(property.Value); - continue; - } - if (property.NameEquals("type"u8)) - { - type = property.Value.GetString(); - continue; - } - if (property.NameEquals("writeBatchSize"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - writeBatchSize = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("writeBatchTimeout"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - writeBatchTimeout = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("sinkRetryCount"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - sinkRetryCount = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("sinkRetryWait"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - sinkRetryWait = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("maxConcurrentConnections"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - maxConcurrentConnections = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("disableMetricsCollection"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - disableMetricsCollection = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - additionalPropertiesDictionary.Add(property.Name, JsonSerializer.Deserialize>(property.Value.GetRawText())); - } - additionalProperties = additionalPropertiesDictionary; - return new AvroSink(type, writeBatchSize.Value, writeBatchTimeout.Value, sinkRetryCount.Value, sinkRetryWait.Value, maxConcurrentConnections.Value, disableMetricsCollection.Value, additionalProperties, storeSettings.Value, formatSettings.Value); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/AvroSink.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/AvroSink.cs deleted file mode 100644 index 578b60d4..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/AvroSink.cs +++ /dev/null @@ -1,49 +0,0 @@ -// - -#nullable disable - -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// A copy activity Avro sink. - public partial class AvroSink : CopySink - { - /// Initializes a new instance of AvroSink. - public AvroSink() - { - CopySinkType = "AvroSink"; - } - - /// Initializes a new instance of AvroSink. - /// Copy sink type. - /// Write batch size. Type: integer (or Expression with resultType integer), minimum: 0. - /// Write batch timeout. Type: string (or Expression with resultType string), pattern: ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). - /// Sink retry count. Type: integer (or Expression with resultType integer). - /// Sink retry wait. Type: string (or Expression with resultType string), pattern: ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). - /// The maximum concurrent connection count for the sink data store. Type: integer (or Expression with resultType integer). - /// If true, disable data store metrics collection. Default is false. Type: boolean (or Expression with resultType boolean). - /// Additional Properties. - /// - /// Avro store settings. - /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. - /// The available derived classes include , , , , and . - /// - /// Avro format settings. - internal AvroSink(string copySinkType, DataFactoryElement writeBatchSize, DataFactoryElement writeBatchTimeout, DataFactoryElement sinkRetryCount, DataFactoryElement sinkRetryWait, DataFactoryElement maxConcurrentConnections, DataFactoryElement disableMetricsCollection, IDictionary> additionalProperties, StoreWriteSettings storeSettings, AvroWriteSettings formatSettings) : base(copySinkType, writeBatchSize, writeBatchTimeout, sinkRetryCount, sinkRetryWait, maxConcurrentConnections, disableMetricsCollection, additionalProperties) - { - StoreSettings = storeSettings; - FormatSettings = formatSettings; - CopySinkType = copySinkType ?? "AvroSink"; - } - - /// - /// Avro store settings. - /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. - /// The available derived classes include , , , , and . - /// - public StoreWriteSettings StoreSettings { get; set; } - /// Avro format settings. - public AvroWriteSettings FormatSettings { get; set; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/AvroSource.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/AvroSource.Serialization.cs deleted file mode 100644 index f3a01e8f..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/AvroSource.Serialization.cs +++ /dev/null @@ -1,146 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class AvroSource : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - if (Optional.IsDefined(StoreSettings)) - { - writer.WritePropertyName("storeSettings"u8); - writer.WriteObjectValue(StoreSettings); - } - if (Optional.IsDefined(AdditionalColumns)) - { - writer.WritePropertyName("additionalColumns"u8); -#if NET6_0_OR_GREATER - writer.WriteRawValue(AdditionalColumns); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(AdditionalColumns.ToString()).RootElement); -#endif - } - writer.WritePropertyName("type"u8); - writer.WriteStringValue(CopySourceType); - if (Optional.IsDefined(SourceRetryCount)) - { - writer.WritePropertyName("sourceRetryCount"u8); - JsonSerializer.Serialize(writer, SourceRetryCount); - } - if (Optional.IsDefined(SourceRetryWait)) - { - writer.WritePropertyName("sourceRetryWait"u8); - JsonSerializer.Serialize(writer, SourceRetryWait); - } - if (Optional.IsDefined(MaxConcurrentConnections)) - { - writer.WritePropertyName("maxConcurrentConnections"u8); - JsonSerializer.Serialize(writer, MaxConcurrentConnections); - } - if (Optional.IsDefined(DisableMetricsCollection)) - { - writer.WritePropertyName("disableMetricsCollection"u8); - JsonSerializer.Serialize(writer, DisableMetricsCollection); - } - foreach (var item in AdditionalProperties) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.Value.ToString()).RootElement); -#endif - } - writer.WriteEndObject(); - } - - internal static AvroSource DeserializeAvroSource(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - Optional storeSettings = default; - Optional additionalColumns = default; - string type = default; - Optional> sourceRetryCount = default; - Optional> sourceRetryWait = default; - Optional> maxConcurrentConnections = default; - Optional> disableMetricsCollection = default; - IDictionary> additionalProperties = default; - Dictionary> additionalPropertiesDictionary = new Dictionary>(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("storeSettings"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - storeSettings = StoreReadSettings.DeserializeStoreReadSettings(property.Value); - continue; - } - if (property.NameEquals("additionalColumns"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - additionalColumns = BinaryData.FromString(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("type"u8)) - { - type = property.Value.GetString(); - continue; - } - if (property.NameEquals("sourceRetryCount"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - sourceRetryCount = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("sourceRetryWait"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - sourceRetryWait = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("maxConcurrentConnections"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - maxConcurrentConnections = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("disableMetricsCollection"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - disableMetricsCollection = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - additionalPropertiesDictionary.Add(property.Name, JsonSerializer.Deserialize>(property.Value.GetRawText())); - } - additionalProperties = additionalPropertiesDictionary; - return new AvroSource(type, sourceRetryCount.Value, sourceRetryWait.Value, maxConcurrentConnections.Value, disableMetricsCollection.Value, additionalProperties, storeSettings.Value, additionalColumns.Value); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/AvroSource.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/AvroSource.cs deleted file mode 100644 index 3e46aeb8..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/AvroSource.cs +++ /dev/null @@ -1,76 +0,0 @@ -// - -#nullable disable - -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// A copy activity Avro source. - public partial class AvroSource : CopyActivitySource - { - /// Initializes a new instance of AvroSource. - public AvroSource() - { - CopySourceType = "AvroSource"; - } - - /// Initializes a new instance of AvroSource. - /// Copy source type. - /// Source retry count. Type: integer (or Expression with resultType integer). - /// Source retry wait. Type: string (or Expression with resultType string), pattern: ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). - /// The maximum concurrent connection count for the source data store. Type: integer (or Expression with resultType integer). - /// If true, disable data store metrics collection. Default is false. Type: boolean (or Expression with resultType boolean). - /// Additional Properties. - /// - /// Avro store settings. - /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. - /// The available derived classes include , , , , , , , , , , , and . - /// - /// Specifies the additional columns to be added to source data. Type: array of objects(AdditionalColumns) (or Expression with resultType array of objects). - internal AvroSource(string copySourceType, DataFactoryElement sourceRetryCount, DataFactoryElement sourceRetryWait, DataFactoryElement maxConcurrentConnections, DataFactoryElement disableMetricsCollection, IDictionary> additionalProperties, StoreReadSettings storeSettings, BinaryData additionalColumns) : base(copySourceType, sourceRetryCount, sourceRetryWait, maxConcurrentConnections, disableMetricsCollection, additionalProperties) - { - StoreSettings = storeSettings; - AdditionalColumns = additionalColumns; - CopySourceType = copySourceType ?? "AvroSource"; - } - - /// - /// Avro store settings. - /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. - /// The available derived classes include , , , , , , , , , , , and . - /// - public StoreReadSettings StoreSettings { get; set; } - /// - /// Specifies the additional columns to be added to source data. Type: array of objects(AdditionalColumns) (or Expression with resultType array of objects). - /// - /// To assign an object to this property use . - /// - /// - /// To assign an already formated json string to this property use . - /// - /// - /// Examples: - /// - /// - /// BinaryData.FromObjectAsJson("foo") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromString("\"foo\"") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromObjectAsJson(new { key = "value" }) - /// Creates a payload of { "key": "value" }. - /// - /// - /// BinaryData.FromString("{\"key\": \"value\"}") - /// Creates a payload of { "key": "value" }. - /// - /// - /// - /// - public BinaryData AdditionalColumns { get; set; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/AvroWriteSettings.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/AvroWriteSettings.Serialization.cs deleted file mode 100644 index 1fa70f9b..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/AvroWriteSettings.Serialization.cs +++ /dev/null @@ -1,104 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class AvroWriteSettings : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - if (Optional.IsDefined(RecordName)) - { - writer.WritePropertyName("recordName"u8); - writer.WriteStringValue(RecordName); - } - if (Optional.IsDefined(RecordNamespace)) - { - writer.WritePropertyName("recordNamespace"u8); - writer.WriteStringValue(RecordNamespace); - } - if (Optional.IsDefined(MaxRowsPerFile)) - { - writer.WritePropertyName("maxRowsPerFile"u8); - JsonSerializer.Serialize(writer, MaxRowsPerFile); - } - if (Optional.IsDefined(FileNamePrefix)) - { - writer.WritePropertyName("fileNamePrefix"u8); - JsonSerializer.Serialize(writer, FileNamePrefix); - } - writer.WritePropertyName("type"u8); - writer.WriteStringValue(FormatWriteSettingsType); - foreach (var item in AdditionalProperties) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.Value.ToString()).RootElement); -#endif - } - writer.WriteEndObject(); - } - - internal static AvroWriteSettings DeserializeAvroWriteSettings(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - Optional recordName = default; - Optional recordNamespace = default; - Optional> maxRowsPerFile = default; - Optional> fileNamePrefix = default; - string type = default; - IDictionary> additionalProperties = default; - Dictionary> additionalPropertiesDictionary = new Dictionary>(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("recordName"u8)) - { - recordName = property.Value.GetString(); - continue; - } - if (property.NameEquals("recordNamespace"u8)) - { - recordNamespace = property.Value.GetString(); - continue; - } - if (property.NameEquals("maxRowsPerFile"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - maxRowsPerFile = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("fileNamePrefix"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - fileNamePrefix = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("type"u8)) - { - type = property.Value.GetString(); - continue; - } - additionalPropertiesDictionary.Add(property.Name, JsonSerializer.Deserialize>(property.Value.GetRawText())); - } - additionalProperties = additionalPropertiesDictionary; - return new AvroWriteSettings(type, additionalProperties, recordName.Value, recordNamespace.Value, maxRowsPerFile.Value, fileNamePrefix.Value); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/AvroWriteSettings.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/AvroWriteSettings.cs deleted file mode 100644 index 98fff1f0..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/AvroWriteSettings.cs +++ /dev/null @@ -1,43 +0,0 @@ -// - -#nullable disable - -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// Avro write settings. - public partial class AvroWriteSettings : FormatWriteSettings - { - /// Initializes a new instance of AvroWriteSettings. - public AvroWriteSettings() - { - FormatWriteSettingsType = "AvroWriteSettings"; - } - - /// Initializes a new instance of AvroWriteSettings. - /// The write setting type. - /// Additional Properties. - /// Top level record name in write result, which is required in AVRO spec. - /// Record namespace in the write result. - /// Limit the written file's row count to be smaller than or equal to the specified count. Type: integer (or Expression with resultType integer). - /// Specifies the file name pattern <fileNamePrefix>_<fileIndex>.<fileExtension> when copy from non-file based store without partitionOptions. Type: string (or Expression with resultType string). - internal AvroWriteSettings(string formatWriteSettingsType, IDictionary> additionalProperties, string recordName, string recordNamespace, DataFactoryElement maxRowsPerFile, DataFactoryElement fileNamePrefix) : base(formatWriteSettingsType, additionalProperties) - { - RecordName = recordName; - RecordNamespace = recordNamespace; - MaxRowsPerFile = maxRowsPerFile; - FileNamePrefix = fileNamePrefix; - FormatWriteSettingsType = formatWriteSettingsType ?? "AvroWriteSettings"; - } - - /// Top level record name in write result, which is required in AVRO spec. - public string RecordName { get; set; } - /// Record namespace in the write result. - public string RecordNamespace { get; set; } - /// Limit the written file's row count to be smaller than or equal to the specified count. Type: integer (or Expression with resultType integer). - public DataFactoryElement MaxRowsPerFile { get; set; } - /// Specifies the file name pattern <fileNamePrefix>_<fileIndex>.<fileExtension> when copy from non-file based store without partitionOptions. Type: string (or Expression with resultType string). - public DataFactoryElement FileNamePrefix { get; set; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/AzPowerShellSetup.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/AzPowerShellSetup.Serialization.cs deleted file mode 100644 index 45cc3fb6..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/AzPowerShellSetup.Serialization.cs +++ /dev/null @@ -1,61 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class AzPowerShellSetup : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - writer.WritePropertyName("type"u8); - writer.WriteStringValue(CustomSetupBaseType); - writer.WritePropertyName("typeProperties"u8); - writer.WriteStartObject(); - writer.WritePropertyName("version"u8); - writer.WriteStringValue(Version); - writer.WriteEndObject(); - writer.WriteEndObject(); - } - - internal static AzPowerShellSetup DeserializeAzPowerShellSetup(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - string type = default; - string version = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("type"u8)) - { - type = property.Value.GetString(); - continue; - } - if (property.NameEquals("typeProperties"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - foreach (var property0 in property.Value.EnumerateObject()) - { - if (property0.NameEquals("version"u8)) - { - version = property0.Value.GetString(); - continue; - } - } - continue; - } - } - return new AzPowerShellSetup(type, version); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/AzPowerShellSetup.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/AzPowerShellSetup.cs deleted file mode 100644 index 0f3be1cc..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/AzPowerShellSetup.cs +++ /dev/null @@ -1,35 +0,0 @@ -// - -#nullable disable - -using Azure.Core; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// The express custom setup of installing Azure PowerShell. - public partial class AzPowerShellSetup : CustomSetupBase - { - /// Initializes a new instance of AzPowerShellSetup. - /// The required version of Azure PowerShell to install. - /// is null. - public AzPowerShellSetup(string version) - { - Argument.AssertNotNull(version, nameof(version)); - - Version = version; - CustomSetupBaseType = "AzPowerShellSetup"; - } - - /// Initializes a new instance of AzPowerShellSetup. - /// The type of custom setup. - /// The required version of Azure PowerShell to install. - internal AzPowerShellSetup(string customSetupBaseType, string version) : base(customSetupBaseType) - { - Version = version; - CustomSetupBaseType = customSetupBaseType ?? "AzPowerShellSetup"; - } - - /// The required version of Azure PowerShell to install. - public string Version { get; set; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/AzureBatchLinkedService.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/AzureBatchLinkedService.Serialization.cs deleted file mode 100644 index 14ee39bb..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/AzureBatchLinkedService.Serialization.cs +++ /dev/null @@ -1,232 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class AzureBatchLinkedService : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - writer.WritePropertyName("type"u8); - writer.WriteStringValue(LinkedServiceType); - if (Optional.IsDefined(ConnectVia)) - { - writer.WritePropertyName("connectVia"u8); - writer.WriteObjectValue(ConnectVia); - } - if (Optional.IsDefined(Description)) - { - writer.WritePropertyName("description"u8); - writer.WriteStringValue(Description); - } - if (Optional.IsCollectionDefined(Parameters)) - { - writer.WritePropertyName("parameters"u8); - writer.WriteStartObject(); - foreach (var item in Parameters) - { - writer.WritePropertyName(item.Key); - writer.WriteObjectValue(item.Value); - } - writer.WriteEndObject(); - } - if (Optional.IsCollectionDefined(Annotations)) - { - writer.WritePropertyName("annotations"u8); - writer.WriteStartArray(); - foreach (var item in Annotations) - { - if (item == null) - { - writer.WriteNullValue(); - continue; - } -#if NET6_0_OR_GREATER - writer.WriteRawValue(item); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.ToString()).RootElement); -#endif - } - writer.WriteEndArray(); - } - writer.WritePropertyName("typeProperties"u8); - writer.WriteStartObject(); - writer.WritePropertyName("accountName"u8); - JsonSerializer.Serialize(writer, AccountName); - if (Optional.IsDefined(AccessKey)) - { - writer.WritePropertyName("accessKey"u8); - JsonSerializer.Serialize(writer, AccessKey); - } - writer.WritePropertyName("batchUri"u8); - JsonSerializer.Serialize(writer, BatchUri); - writer.WritePropertyName("poolName"u8); - JsonSerializer.Serialize(writer, PoolName); - writer.WritePropertyName("linkedServiceName"u8); - JsonSerializer.Serialize(writer, LinkedServiceName); if (Optional.IsDefined(EncryptedCredential)) - { - writer.WritePropertyName("encryptedCredential"u8); - writer.WriteStringValue(EncryptedCredential); - } - if (Optional.IsDefined(Credential)) - { - writer.WritePropertyName("credential"u8); - writer.WriteObjectValue(Credential); - } - writer.WriteEndObject(); - foreach (var item in AdditionalProperties) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.Value.ToString()).RootElement); -#endif - } - writer.WriteEndObject(); - } - - internal static AzureBatchLinkedService DeserializeAzureBatchLinkedService(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - string type = default; - Optional connectVia = default; - Optional description = default; - Optional> parameters = default; - Optional> annotations = default; - DataFactoryElement accountName = default; - Optional accessKey = default; - DataFactoryElement batchUri = default; - DataFactoryElement poolName = default; - DataFactoryLinkedServiceReference linkedServiceName = default; - Optional encryptedCredential = default; - Optional credential = default; - IDictionary> additionalProperties = default; - Dictionary> additionalPropertiesDictionary = new Dictionary>(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("type"u8)) - { - type = property.Value.GetString(); - continue; - } - if (property.NameEquals("connectVia"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - connectVia = IntegrationRuntimeReference.DeserializeIntegrationRuntimeReference(property.Value); - continue; - } - if (property.NameEquals("description"u8)) - { - description = property.Value.GetString(); - continue; - } - if (property.NameEquals("parameters"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - Dictionary dictionary = new Dictionary(); - foreach (var property0 in property.Value.EnumerateObject()) - { - dictionary.Add(property0.Name, EntityParameterSpecification.DeserializeEntityParameterSpecification(property0.Value)); - } - parameters = dictionary; - continue; - } - if (property.NameEquals("annotations"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - if (item.ValueKind == JsonValueKind.Null) - { - array.Add(null); - } - else - { - array.Add(BinaryData.FromString(item.GetRawText())); - } - } - annotations = array; - continue; - } - if (property.NameEquals("typeProperties"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - foreach (var property0 in property.Value.EnumerateObject()) - { - if (property0.NameEquals("accountName"u8)) - { - accountName = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("accessKey"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - accessKey = JsonSerializer.Deserialize(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("batchUri"u8)) - { - batchUri = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("poolName"u8)) - { - poolName = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("linkedServiceName"u8)) - { - linkedServiceName = JsonSerializer.Deserialize(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("encryptedCredential"u8)) - { - encryptedCredential = property0.Value.GetString(); - continue; - } - if (property0.NameEquals("credential"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - credential = DataFactoryCredentialReference.DeserializeDataFactoryCredentialReference(property0.Value); - continue; - } - } - continue; - } - additionalPropertiesDictionary.Add(property.Name, JsonSerializer.Deserialize>(property.Value.GetRawText())); - } - additionalProperties = additionalPropertiesDictionary; - return new AzureBatchLinkedService(type, connectVia.Value, description.Value, Optional.ToDictionary(parameters), Optional.ToList(annotations), additionalProperties, accountName, accessKey, batchUri, poolName, linkedServiceName, encryptedCredential.Value, credential.Value); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/AzureBatchLinkedService.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/AzureBatchLinkedService.cs deleted file mode 100644 index 86b79684..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/AzureBatchLinkedService.cs +++ /dev/null @@ -1,74 +0,0 @@ -// - -#nullable disable - -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// Azure Batch linked service. - public partial class AzureBatchLinkedService : DataFactoryLinkedServiceProperties - { - /// Initializes a new instance of AzureBatchLinkedService. - /// The Azure Batch account name. Type: string (or Expression with resultType string). - /// The Azure Batch URI. Type: string (or Expression with resultType string). - /// The Azure Batch pool name. Type: string (or Expression with resultType string). - /// The Azure Storage linked service reference. - /// , , or is null. - public AzureBatchLinkedService(DataFactoryElement accountName, DataFactoryElement batchUri, DataFactoryElement poolName, DataFactoryLinkedServiceReference linkedServiceName) - { - Argument.AssertNotNull(accountName, nameof(accountName)); - Argument.AssertNotNull(batchUri, nameof(batchUri)); - Argument.AssertNotNull(poolName, nameof(poolName)); - Argument.AssertNotNull(linkedServiceName, nameof(linkedServiceName)); - - AccountName = accountName; - BatchUri = batchUri; - PoolName = poolName; - LinkedServiceName = linkedServiceName; - LinkedServiceType = "AzureBatch"; - } - - /// Initializes a new instance of AzureBatchLinkedService. - /// Type of linked service. - /// The integration runtime reference. - /// Linked service description. - /// Parameters for linked service. - /// List of tags that can be used for describing the linked service. - /// Additional Properties. - /// The Azure Batch account name. Type: string (or Expression with resultType string). - /// The Azure Batch account access key. - /// The Azure Batch URI. Type: string (or Expression with resultType string). - /// The Azure Batch pool name. Type: string (or Expression with resultType string). - /// The Azure Storage linked service reference. - /// The encrypted credential used for authentication. Credentials are encrypted using the integration runtime credential manager. Type: string. - /// The credential reference containing authentication information. - internal AzureBatchLinkedService(string linkedServiceType, IntegrationRuntimeReference connectVia, string description, IDictionary parameters, IList annotations, IDictionary> additionalProperties, DataFactoryElement accountName, DataFactorySecretBaseDefinition accessKey, DataFactoryElement batchUri, DataFactoryElement poolName, DataFactoryLinkedServiceReference linkedServiceName, string encryptedCredential, DataFactoryCredentialReference credential) : base(linkedServiceType, connectVia, description, parameters, annotations, additionalProperties) - { - AccountName = accountName; - AccessKey = accessKey; - BatchUri = batchUri; - PoolName = poolName; - LinkedServiceName = linkedServiceName; - EncryptedCredential = encryptedCredential; - Credential = credential; - LinkedServiceType = linkedServiceType ?? "AzureBatch"; - } - - /// The Azure Batch account name. Type: string (or Expression with resultType string). - public DataFactoryElement AccountName { get; set; } - /// The Azure Batch account access key. - public DataFactorySecretBaseDefinition AccessKey { get; set; } - /// The Azure Batch URI. Type: string (or Expression with resultType string). - public DataFactoryElement BatchUri { get; set; } - /// The Azure Batch pool name. Type: string (or Expression with resultType string). - public DataFactoryElement PoolName { get; set; } - /// The Azure Storage linked service reference. - public DataFactoryLinkedServiceReference LinkedServiceName { get; set; } - /// The encrypted credential used for authentication. Credentials are encrypted using the integration runtime credential manager. Type: string. - public string EncryptedCredential { get; set; } - /// The credential reference containing authentication information. - public DataFactoryCredentialReference Credential { get; set; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/AzureBlobDataset.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/AzureBlobDataset.Serialization.cs deleted file mode 100644 index fdc9b880..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/AzureBlobDataset.Serialization.cs +++ /dev/null @@ -1,302 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class AzureBlobDataset : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - writer.WritePropertyName("type"u8); - writer.WriteStringValue(DatasetType); - if (Optional.IsDefined(Description)) - { - writer.WritePropertyName("description"u8); - writer.WriteStringValue(Description); - } - if (Optional.IsDefined(Structure)) - { - writer.WritePropertyName("structure"u8); - JsonSerializer.Serialize(writer, Structure); - } - if (Optional.IsDefined(Schema)) - { - writer.WritePropertyName("schema"u8); - JsonSerializer.Serialize(writer, Schema); - } - writer.WritePropertyName("linkedServiceName"u8); - JsonSerializer.Serialize(writer, LinkedServiceName); if (Optional.IsCollectionDefined(Parameters)) - { - writer.WritePropertyName("parameters"u8); - writer.WriteStartObject(); - foreach (var item in Parameters) - { - writer.WritePropertyName(item.Key); - writer.WriteObjectValue(item.Value); - } - writer.WriteEndObject(); - } - if (Optional.IsCollectionDefined(Annotations)) - { - writer.WritePropertyName("annotations"u8); - writer.WriteStartArray(); - foreach (var item in Annotations) - { - if (item == null) - { - writer.WriteNullValue(); - continue; - } -#if NET6_0_OR_GREATER - writer.WriteRawValue(item); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.ToString()).RootElement); -#endif - } - writer.WriteEndArray(); - } - if (Optional.IsDefined(Folder)) - { - writer.WritePropertyName("folder"u8); - writer.WriteObjectValue(Folder); - } - writer.WritePropertyName("typeProperties"u8); - writer.WriteStartObject(); - if (Optional.IsDefined(FolderPath)) - { - writer.WritePropertyName("folderPath"u8); - JsonSerializer.Serialize(writer, FolderPath); - } - if (Optional.IsDefined(TableRootLocation)) - { - writer.WritePropertyName("tableRootLocation"u8); - JsonSerializer.Serialize(writer, TableRootLocation); - } - if (Optional.IsDefined(FileName)) - { - writer.WritePropertyName("fileName"u8); - JsonSerializer.Serialize(writer, FileName); - } - if (Optional.IsDefined(ModifiedDatetimeStart)) - { - writer.WritePropertyName("modifiedDatetimeStart"u8); - JsonSerializer.Serialize(writer, ModifiedDatetimeStart); - } - if (Optional.IsDefined(ModifiedDatetimeEnd)) - { - writer.WritePropertyName("modifiedDatetimeEnd"u8); - JsonSerializer.Serialize(writer, ModifiedDatetimeEnd); - } - if (Optional.IsDefined(Format)) - { - writer.WritePropertyName("format"u8); - writer.WriteObjectValue(Format); - } - if (Optional.IsDefined(Compression)) - { - writer.WritePropertyName("compression"u8); - writer.WriteObjectValue(Compression); - } - writer.WriteEndObject(); - foreach (var item in AdditionalProperties) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.Value.ToString()).RootElement); -#endif - } - writer.WriteEndObject(); - } - - internal static AzureBlobDataset DeserializeAzureBlobDataset(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - string type = default; - Optional description = default; - Optional>> structure = default; - Optional>> schema = default; - DataFactoryLinkedServiceReference linkedServiceName = default; - Optional> parameters = default; - Optional> annotations = default; - Optional folder = default; - Optional> folderPath = default; - Optional> tableRootLocation = default; - Optional> fileName = default; - Optional> modifiedDatetimeStart = default; - Optional> modifiedDatetimeEnd = default; - Optional format = default; - Optional compression = default; - IDictionary> additionalProperties = default; - Dictionary> additionalPropertiesDictionary = new Dictionary>(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("type"u8)) - { - type = property.Value.GetString(); - continue; - } - if (property.NameEquals("description"u8)) - { - description = property.Value.GetString(); - continue; - } - if (property.NameEquals("structure"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - structure = JsonSerializer.Deserialize>>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("schema"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - schema = JsonSerializer.Deserialize>>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("linkedServiceName"u8)) - { - linkedServiceName = JsonSerializer.Deserialize(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("parameters"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - Dictionary dictionary = new Dictionary(); - foreach (var property0 in property.Value.EnumerateObject()) - { - dictionary.Add(property0.Name, EntityParameterSpecification.DeserializeEntityParameterSpecification(property0.Value)); - } - parameters = dictionary; - continue; - } - if (property.NameEquals("annotations"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - if (item.ValueKind == JsonValueKind.Null) - { - array.Add(null); - } - else - { - array.Add(BinaryData.FromString(item.GetRawText())); - } - } - annotations = array; - continue; - } - if (property.NameEquals("folder"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - folder = DatasetFolder.DeserializeDatasetFolder(property.Value); - continue; - } - if (property.NameEquals("typeProperties"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - foreach (var property0 in property.Value.EnumerateObject()) - { - if (property0.NameEquals("folderPath"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - folderPath = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("tableRootLocation"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - tableRootLocation = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("fileName"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - fileName = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("modifiedDatetimeStart"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - modifiedDatetimeStart = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("modifiedDatetimeEnd"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - modifiedDatetimeEnd = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("format"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - format = DatasetStorageFormat.DeserializeDatasetStorageFormat(property0.Value); - continue; - } - if (property0.NameEquals("compression"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - compression = DatasetCompression.DeserializeDatasetCompression(property0.Value); - continue; - } - } - continue; - } - additionalPropertiesDictionary.Add(property.Name, JsonSerializer.Deserialize>(property.Value.GetRawText())); - } - additionalProperties = additionalPropertiesDictionary; - return new AzureBlobDataset(type, description.Value, structure.Value, schema.Value, linkedServiceName, Optional.ToDictionary(parameters), Optional.ToList(annotations), folder.Value, additionalProperties, folderPath.Value, tableRootLocation.Value, fileName.Value, modifiedDatetimeStart.Value, modifiedDatetimeEnd.Value, format.Value, compression.Value); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/AzureBlobDataset.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/AzureBlobDataset.cs deleted file mode 100644 index 30534be4..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/AzureBlobDataset.cs +++ /dev/null @@ -1,75 +0,0 @@ -// - -#nullable disable - -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// The Azure Blob storage. - public partial class AzureBlobDataset : DataFactoryDatasetProperties - { - /// Initializes a new instance of AzureBlobDataset. - /// Linked service reference. - /// is null. - public AzureBlobDataset(DataFactoryLinkedServiceReference linkedServiceName) : base(linkedServiceName) - { - Argument.AssertNotNull(linkedServiceName, nameof(linkedServiceName)); - - DatasetType = "AzureBlob"; - } - - /// Initializes a new instance of AzureBlobDataset. - /// Type of dataset. - /// Dataset description. - /// Columns that define the structure of the dataset. Type: array (or Expression with resultType array), itemType: DatasetDataElement. - /// Columns that define the physical type schema of the dataset. Type: array (or Expression with resultType array), itemType: DatasetSchemaDataElement. - /// Linked service reference. - /// Parameters for dataset. - /// List of tags that can be used for describing the Dataset. - /// The folder that this Dataset is in. If not specified, Dataset will appear at the root level. - /// Additional Properties. - /// The path of the Azure Blob storage. Type: string (or Expression with resultType string). - /// The root of blob path. Type: string (or Expression with resultType string). - /// The name of the Azure Blob. Type: string (or Expression with resultType string). - /// The start of Azure Blob's modified datetime. Type: string (or Expression with resultType string). - /// The end of Azure Blob's modified datetime. Type: string (or Expression with resultType string). - /// - /// The format of the Azure Blob storage. - /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. - /// The available derived classes include , , , and . - /// - /// The data compression method used for the blob storage. - internal AzureBlobDataset(string datasetType, string description, DataFactoryElement> structure, DataFactoryElement> schema, DataFactoryLinkedServiceReference linkedServiceName, IDictionary parameters, IList annotations, DatasetFolder folder, IDictionary> additionalProperties, DataFactoryElement folderPath, DataFactoryElement tableRootLocation, DataFactoryElement fileName, DataFactoryElement modifiedDatetimeStart, DataFactoryElement modifiedDatetimeEnd, DatasetStorageFormat format, DatasetCompression compression) : base(datasetType, description, structure, schema, linkedServiceName, parameters, annotations, folder, additionalProperties) - { - FolderPath = folderPath; - TableRootLocation = tableRootLocation; - FileName = fileName; - ModifiedDatetimeStart = modifiedDatetimeStart; - ModifiedDatetimeEnd = modifiedDatetimeEnd; - Format = format; - Compression = compression; - DatasetType = datasetType ?? "AzureBlob"; - } - - /// The path of the Azure Blob storage. Type: string (or Expression with resultType string). - public DataFactoryElement FolderPath { get; set; } - /// The root of blob path. Type: string (or Expression with resultType string). - public DataFactoryElement TableRootLocation { get; set; } - /// The name of the Azure Blob. Type: string (or Expression with resultType string). - public DataFactoryElement FileName { get; set; } - /// The start of Azure Blob's modified datetime. Type: string (or Expression with resultType string). - public DataFactoryElement ModifiedDatetimeStart { get; set; } - /// The end of Azure Blob's modified datetime. Type: string (or Expression with resultType string). - public DataFactoryElement ModifiedDatetimeEnd { get; set; } - /// - /// The format of the Azure Blob storage. - /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. - /// The available derived classes include , , , and . - /// - public DatasetStorageFormat Format { get; set; } - /// The data compression method used for the blob storage. - public DatasetCompression Compression { get; set; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/AzureBlobFSDataset.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/AzureBlobFSDataset.Serialization.cs deleted file mode 100644 index 11cffc84..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/AzureBlobFSDataset.Serialization.cs +++ /dev/null @@ -1,257 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class AzureBlobFSDataset : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - writer.WritePropertyName("type"u8); - writer.WriteStringValue(DatasetType); - if (Optional.IsDefined(Description)) - { - writer.WritePropertyName("description"u8); - writer.WriteStringValue(Description); - } - if (Optional.IsDefined(Structure)) - { - writer.WritePropertyName("structure"u8); - JsonSerializer.Serialize(writer, Structure); - } - if (Optional.IsDefined(Schema)) - { - writer.WritePropertyName("schema"u8); - JsonSerializer.Serialize(writer, Schema); - } - writer.WritePropertyName("linkedServiceName"u8); - JsonSerializer.Serialize(writer, LinkedServiceName); if (Optional.IsCollectionDefined(Parameters)) - { - writer.WritePropertyName("parameters"u8); - writer.WriteStartObject(); - foreach (var item in Parameters) - { - writer.WritePropertyName(item.Key); - writer.WriteObjectValue(item.Value); - } - writer.WriteEndObject(); - } - if (Optional.IsCollectionDefined(Annotations)) - { - writer.WritePropertyName("annotations"u8); - writer.WriteStartArray(); - foreach (var item in Annotations) - { - if (item == null) - { - writer.WriteNullValue(); - continue; - } -#if NET6_0_OR_GREATER - writer.WriteRawValue(item); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.ToString()).RootElement); -#endif - } - writer.WriteEndArray(); - } - if (Optional.IsDefined(Folder)) - { - writer.WritePropertyName("folder"u8); - writer.WriteObjectValue(Folder); - } - writer.WritePropertyName("typeProperties"u8); - writer.WriteStartObject(); - if (Optional.IsDefined(FolderPath)) - { - writer.WritePropertyName("folderPath"u8); - JsonSerializer.Serialize(writer, FolderPath); - } - if (Optional.IsDefined(FileName)) - { - writer.WritePropertyName("fileName"u8); - JsonSerializer.Serialize(writer, FileName); - } - if (Optional.IsDefined(Format)) - { - writer.WritePropertyName("format"u8); - writer.WriteObjectValue(Format); - } - if (Optional.IsDefined(Compression)) - { - writer.WritePropertyName("compression"u8); - writer.WriteObjectValue(Compression); - } - writer.WriteEndObject(); - foreach (var item in AdditionalProperties) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.Value.ToString()).RootElement); -#endif - } - writer.WriteEndObject(); - } - - internal static AzureBlobFSDataset DeserializeAzureBlobFSDataset(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - string type = default; - Optional description = default; - Optional>> structure = default; - Optional>> schema = default; - DataFactoryLinkedServiceReference linkedServiceName = default; - Optional> parameters = default; - Optional> annotations = default; - Optional folder = default; - Optional> folderPath = default; - Optional> fileName = default; - Optional format = default; - Optional compression = default; - IDictionary> additionalProperties = default; - Dictionary> additionalPropertiesDictionary = new Dictionary>(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("type"u8)) - { - type = property.Value.GetString(); - continue; - } - if (property.NameEquals("description"u8)) - { - description = property.Value.GetString(); - continue; - } - if (property.NameEquals("structure"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - structure = JsonSerializer.Deserialize>>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("schema"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - schema = JsonSerializer.Deserialize>>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("linkedServiceName"u8)) - { - linkedServiceName = JsonSerializer.Deserialize(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("parameters"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - Dictionary dictionary = new Dictionary(); - foreach (var property0 in property.Value.EnumerateObject()) - { - dictionary.Add(property0.Name, EntityParameterSpecification.DeserializeEntityParameterSpecification(property0.Value)); - } - parameters = dictionary; - continue; - } - if (property.NameEquals("annotations"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - if (item.ValueKind == JsonValueKind.Null) - { - array.Add(null); - } - else - { - array.Add(BinaryData.FromString(item.GetRawText())); - } - } - annotations = array; - continue; - } - if (property.NameEquals("folder"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - folder = DatasetFolder.DeserializeDatasetFolder(property.Value); - continue; - } - if (property.NameEquals("typeProperties"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - foreach (var property0 in property.Value.EnumerateObject()) - { - if (property0.NameEquals("folderPath"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - folderPath = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("fileName"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - fileName = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("format"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - format = DatasetStorageFormat.DeserializeDatasetStorageFormat(property0.Value); - continue; - } - if (property0.NameEquals("compression"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - compression = DatasetCompression.DeserializeDatasetCompression(property0.Value); - continue; - } - } - continue; - } - additionalPropertiesDictionary.Add(property.Name, JsonSerializer.Deserialize>(property.Value.GetRawText())); - } - additionalProperties = additionalPropertiesDictionary; - return new AzureBlobFSDataset(type, description.Value, structure.Value, schema.Value, linkedServiceName, Optional.ToDictionary(parameters), Optional.ToList(annotations), folder.Value, additionalProperties, folderPath.Value, fileName.Value, format.Value, compression.Value); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/AzureBlobFSDataset.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/AzureBlobFSDataset.cs deleted file mode 100644 index 4ba174f4..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/AzureBlobFSDataset.cs +++ /dev/null @@ -1,63 +0,0 @@ -// - -#nullable disable - -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// The Azure Data Lake Storage Gen2 storage. - public partial class AzureBlobFSDataset : DataFactoryDatasetProperties - { - /// Initializes a new instance of AzureBlobFSDataset. - /// Linked service reference. - /// is null. - public AzureBlobFSDataset(DataFactoryLinkedServiceReference linkedServiceName) : base(linkedServiceName) - { - Argument.AssertNotNull(linkedServiceName, nameof(linkedServiceName)); - - DatasetType = "AzureBlobFSFile"; - } - - /// Initializes a new instance of AzureBlobFSDataset. - /// Type of dataset. - /// Dataset description. - /// Columns that define the structure of the dataset. Type: array (or Expression with resultType array), itemType: DatasetDataElement. - /// Columns that define the physical type schema of the dataset. Type: array (or Expression with resultType array), itemType: DatasetSchemaDataElement. - /// Linked service reference. - /// Parameters for dataset. - /// List of tags that can be used for describing the Dataset. - /// The folder that this Dataset is in. If not specified, Dataset will appear at the root level. - /// Additional Properties. - /// The path of the Azure Data Lake Storage Gen2 storage. Type: string (or Expression with resultType string). - /// The name of the Azure Data Lake Storage Gen2. Type: string (or Expression with resultType string). - /// - /// The format of the Azure Data Lake Storage Gen2 storage. - /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. - /// The available derived classes include , , , and . - /// - /// The data compression method used for the blob storage. - internal AzureBlobFSDataset(string datasetType, string description, DataFactoryElement> structure, DataFactoryElement> schema, DataFactoryLinkedServiceReference linkedServiceName, IDictionary parameters, IList annotations, DatasetFolder folder, IDictionary> additionalProperties, DataFactoryElement folderPath, DataFactoryElement fileName, DatasetStorageFormat format, DatasetCompression compression) : base(datasetType, description, structure, schema, linkedServiceName, parameters, annotations, folder, additionalProperties) - { - FolderPath = folderPath; - FileName = fileName; - Format = format; - Compression = compression; - DatasetType = datasetType ?? "AzureBlobFSFile"; - } - - /// The path of the Azure Data Lake Storage Gen2 storage. Type: string (or Expression with resultType string). - public DataFactoryElement FolderPath { get; set; } - /// The name of the Azure Data Lake Storage Gen2. Type: string (or Expression with resultType string). - public DataFactoryElement FileName { get; set; } - /// - /// The format of the Azure Data Lake Storage Gen2 storage. - /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. - /// The available derived classes include , , , and . - /// - public DatasetStorageFormat Format { get; set; } - /// The data compression method used for the blob storage. - public DatasetCompression Compression { get; set; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/AzureBlobFSLinkedService.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/AzureBlobFSLinkedService.Serialization.cs deleted file mode 100644 index 37d0c2a3..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/AzureBlobFSLinkedService.Serialization.cs +++ /dev/null @@ -1,336 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class AzureBlobFSLinkedService : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - writer.WritePropertyName("type"u8); - writer.WriteStringValue(LinkedServiceType); - if (Optional.IsDefined(ConnectVia)) - { - writer.WritePropertyName("connectVia"u8); - writer.WriteObjectValue(ConnectVia); - } - if (Optional.IsDefined(Description)) - { - writer.WritePropertyName("description"u8); - writer.WriteStringValue(Description); - } - if (Optional.IsCollectionDefined(Parameters)) - { - writer.WritePropertyName("parameters"u8); - writer.WriteStartObject(); - foreach (var item in Parameters) - { - writer.WritePropertyName(item.Key); - writer.WriteObjectValue(item.Value); - } - writer.WriteEndObject(); - } - if (Optional.IsCollectionDefined(Annotations)) - { - writer.WritePropertyName("annotations"u8); - writer.WriteStartArray(); - foreach (var item in Annotations) - { - if (item == null) - { - writer.WriteNullValue(); - continue; - } -#if NET6_0_OR_GREATER - writer.WriteRawValue(item); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.ToString()).RootElement); -#endif - } - writer.WriteEndArray(); - } - writer.WritePropertyName("typeProperties"u8); - writer.WriteStartObject(); - if (Optional.IsDefined(Uri)) - { - writer.WritePropertyName("url"u8); - JsonSerializer.Serialize(writer, Uri); - } - if (Optional.IsDefined(AccountKey)) - { - writer.WritePropertyName("accountKey"u8); - JsonSerializer.Serialize(writer, AccountKey); - } - if (Optional.IsDefined(ServicePrincipalId)) - { - writer.WritePropertyName("servicePrincipalId"u8); - JsonSerializer.Serialize(writer, ServicePrincipalId); - } - if (Optional.IsDefined(ServicePrincipalKey)) - { - writer.WritePropertyName("servicePrincipalKey"u8); - JsonSerializer.Serialize(writer, ServicePrincipalKey); - } - if (Optional.IsDefined(Tenant)) - { - writer.WritePropertyName("tenant"u8); - JsonSerializer.Serialize(writer, Tenant); - } - if (Optional.IsDefined(AzureCloudType)) - { - writer.WritePropertyName("azureCloudType"u8); - JsonSerializer.Serialize(writer, AzureCloudType); - } - if (Optional.IsDefined(EncryptedCredential)) - { - writer.WritePropertyName("encryptedCredential"u8); - writer.WriteStringValue(EncryptedCredential); - } - if (Optional.IsDefined(Credential)) - { - writer.WritePropertyName("credential"u8); - writer.WriteObjectValue(Credential); - } - if (Optional.IsDefined(ServicePrincipalCredentialType)) - { - writer.WritePropertyName("servicePrincipalCredentialType"u8); - JsonSerializer.Serialize(writer, ServicePrincipalCredentialType); - } - if (Optional.IsDefined(ServicePrincipalCredential)) - { - writer.WritePropertyName("servicePrincipalCredential"u8); - JsonSerializer.Serialize(writer, ServicePrincipalCredential); - } - if (Optional.IsDefined(SasUri)) - { - writer.WritePropertyName("sasUri"u8); - JsonSerializer.Serialize(writer, SasUri); - } - if (Optional.IsDefined(SasToken)) - { - writer.WritePropertyName("sasToken"u8); - JsonSerializer.Serialize(writer, SasToken); - } - writer.WriteEndObject(); - foreach (var item in AdditionalProperties) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.Value.ToString()).RootElement); -#endif - } - writer.WriteEndObject(); - } - - internal static AzureBlobFSLinkedService DeserializeAzureBlobFSLinkedService(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - string type = default; - Optional connectVia = default; - Optional description = default; - Optional> parameters = default; - Optional> annotations = default; - Optional> url = default; - Optional> accountKey = default; - Optional> servicePrincipalId = default; - Optional servicePrincipalKey = default; - Optional> tenant = default; - Optional> azureCloudType = default; - Optional encryptedCredential = default; - Optional credential = default; - Optional> servicePrincipalCredentialType = default; - Optional servicePrincipalCredential = default; - Optional> sasUri = default; - Optional sasToken = default; - IDictionary> additionalProperties = default; - Dictionary> additionalPropertiesDictionary = new Dictionary>(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("type"u8)) - { - type = property.Value.GetString(); - continue; - } - if (property.NameEquals("connectVia"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - connectVia = IntegrationRuntimeReference.DeserializeIntegrationRuntimeReference(property.Value); - continue; - } - if (property.NameEquals("description"u8)) - { - description = property.Value.GetString(); - continue; - } - if (property.NameEquals("parameters"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - Dictionary dictionary = new Dictionary(); - foreach (var property0 in property.Value.EnumerateObject()) - { - dictionary.Add(property0.Name, EntityParameterSpecification.DeserializeEntityParameterSpecification(property0.Value)); - } - parameters = dictionary; - continue; - } - if (property.NameEquals("annotations"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - if (item.ValueKind == JsonValueKind.Null) - { - array.Add(null); - } - else - { - array.Add(BinaryData.FromString(item.GetRawText())); - } - } - annotations = array; - continue; - } - if (property.NameEquals("typeProperties"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - foreach (var property0 in property.Value.EnumerateObject()) - { - if (property0.NameEquals("url"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - url = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("accountKey"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - accountKey = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("servicePrincipalId"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - servicePrincipalId = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("servicePrincipalKey"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - servicePrincipalKey = JsonSerializer.Deserialize(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("tenant"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - tenant = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("azureCloudType"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - azureCloudType = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("encryptedCredential"u8)) - { - encryptedCredential = property0.Value.GetString(); - continue; - } - if (property0.NameEquals("credential"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - credential = DataFactoryCredentialReference.DeserializeDataFactoryCredentialReference(property0.Value); - continue; - } - if (property0.NameEquals("servicePrincipalCredentialType"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - servicePrincipalCredentialType = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("servicePrincipalCredential"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - servicePrincipalCredential = JsonSerializer.Deserialize(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("sasUri"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - sasUri = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("sasToken"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - sasToken = JsonSerializer.Deserialize(property0.Value.GetRawText()); - continue; - } - } - continue; - } - additionalPropertiesDictionary.Add(property.Name, JsonSerializer.Deserialize>(property.Value.GetRawText())); - } - additionalProperties = additionalPropertiesDictionary; - return new AzureBlobFSLinkedService(type, connectVia.Value, description.Value, Optional.ToDictionary(parameters), Optional.ToList(annotations), additionalProperties, url.Value, accountKey.Value, servicePrincipalId.Value, servicePrincipalKey, tenant.Value, azureCloudType.Value, encryptedCredential.Value, credential.Value, servicePrincipalCredentialType.Value, servicePrincipalCredential, sasUri.Value, sasToken); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/AzureBlobFSLinkedService.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/AzureBlobFSLinkedService.cs deleted file mode 100644 index 6312508f..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/AzureBlobFSLinkedService.cs +++ /dev/null @@ -1,79 +0,0 @@ -// - -#nullable disable - -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// Azure Data Lake Storage Gen2 linked service. - public partial class AzureBlobFSLinkedService : DataFactoryLinkedServiceProperties - { - /// Initializes a new instance of AzureBlobFSLinkedService. - public AzureBlobFSLinkedService() - { - LinkedServiceType = "AzureBlobFS"; - } - - /// Initializes a new instance of AzureBlobFSLinkedService. - /// Type of linked service. - /// The integration runtime reference. - /// Linked service description. - /// Parameters for linked service. - /// List of tags that can be used for describing the linked service. - /// Additional Properties. - /// Endpoint for the Azure Data Lake Storage Gen2 service. Type: string (or Expression with resultType string). - /// Account key for the Azure Data Lake Storage Gen2 service. Type: string (or Expression with resultType string). - /// The ID of the application used to authenticate against the Azure Data Lake Storage Gen2 account. Type: string (or Expression with resultType string). - /// The Key of the application used to authenticate against the Azure Data Lake Storage Gen2 account. - /// The name or ID of the tenant to which the service principal belongs. Type: string (or Expression with resultType string). - /// Indicates the azure cloud type of the service principle auth. Allowed values are AzurePublic, AzureChina, AzureUsGovernment, AzureGermany. Default value is the data factory regions’ cloud type. Type: string (or Expression with resultType string). - /// The encrypted credential used for authentication. Credentials are encrypted using the integration runtime credential manager. Type: string. - /// The credential reference containing authentication information. - /// The service principal credential type to use in Server-To-Server authentication. 'ServicePrincipalKey' for key/secret, 'ServicePrincipalCert' for certificate. Type: string (or Expression with resultType string). - /// The credential of the service principal object in Azure Active Directory. If servicePrincipalCredentialType is 'ServicePrincipalKey', servicePrincipalCredential can be SecureString or AzureKeyVaultSecretReference. If servicePrincipalCredentialType is 'ServicePrincipalCert', servicePrincipalCredential can only be AzureKeyVaultSecretReference. - /// SAS URI of the Azure Data Lake Storage Gen2 service. Type: string, SecureString or AzureKeyVaultSecretReference. - /// The Azure key vault secret reference of sasToken in sas uri. - internal AzureBlobFSLinkedService(string linkedServiceType, IntegrationRuntimeReference connectVia, string description, IDictionary parameters, IList annotations, IDictionary> additionalProperties, DataFactoryElement uri, DataFactoryElement accountKey, DataFactoryElement servicePrincipalId, DataFactorySecretBaseDefinition servicePrincipalKey, DataFactoryElement tenant, DataFactoryElement azureCloudType, string encryptedCredential, DataFactoryCredentialReference credential, DataFactoryElement servicePrincipalCredentialType, DataFactorySecretBaseDefinition servicePrincipalCredential, DataFactoryElement sasUri, DataFactorySecretBaseDefinition sasToken) : base(linkedServiceType, connectVia, description, parameters, annotations, additionalProperties) - { - Uri = uri; - AccountKey = accountKey; - ServicePrincipalId = servicePrincipalId; - ServicePrincipalKey = servicePrincipalKey; - Tenant = tenant; - AzureCloudType = azureCloudType; - EncryptedCredential = encryptedCredential; - Credential = credential; - ServicePrincipalCredentialType = servicePrincipalCredentialType; - ServicePrincipalCredential = servicePrincipalCredential; - SasUri = sasUri; - SasToken = sasToken; - LinkedServiceType = linkedServiceType ?? "AzureBlobFS"; - } - - /// Endpoint for the Azure Data Lake Storage Gen2 service. Type: string (or Expression with resultType string). - public DataFactoryElement Uri { get; set; } - /// Account key for the Azure Data Lake Storage Gen2 service. Type: string (or Expression with resultType string). - public DataFactoryElement AccountKey { get; set; } - /// The ID of the application used to authenticate against the Azure Data Lake Storage Gen2 account. Type: string (or Expression with resultType string). - public DataFactoryElement ServicePrincipalId { get; set; } - /// The Key of the application used to authenticate against the Azure Data Lake Storage Gen2 account. - public DataFactorySecretBaseDefinition ServicePrincipalKey { get; set; } - /// The name or ID of the tenant to which the service principal belongs. Type: string (or Expression with resultType string). - public DataFactoryElement Tenant { get; set; } - /// Indicates the azure cloud type of the service principle auth. Allowed values are AzurePublic, AzureChina, AzureUsGovernment, AzureGermany. Default value is the data factory regions’ cloud type. Type: string (or Expression with resultType string). - public DataFactoryElement AzureCloudType { get; set; } - /// The encrypted credential used for authentication. Credentials are encrypted using the integration runtime credential manager. Type: string. - public string EncryptedCredential { get; set; } - /// The credential reference containing authentication information. - public DataFactoryCredentialReference Credential { get; set; } - /// The service principal credential type to use in Server-To-Server authentication. 'ServicePrincipalKey' for key/secret, 'ServicePrincipalCert' for certificate. Type: string (or Expression with resultType string). - public DataFactoryElement ServicePrincipalCredentialType { get; set; } - /// The credential of the service principal object in Azure Active Directory. If servicePrincipalCredentialType is 'ServicePrincipalKey', servicePrincipalCredential can be SecureString or AzureKeyVaultSecretReference. If servicePrincipalCredentialType is 'ServicePrincipalCert', servicePrincipalCredential can only be AzureKeyVaultSecretReference. - public DataFactorySecretBaseDefinition ServicePrincipalCredential { get; set; } - /// SAS URI of the Azure Data Lake Storage Gen2 service. Type: string, SecureString or AzureKeyVaultSecretReference. - public DataFactoryElement SasUri { get; set; } - /// The Azure key vault secret reference of sasToken in sas uri. - public DataFactorySecretBaseDefinition SasToken { get; set; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/AzureBlobFSLocation.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/AzureBlobFSLocation.Serialization.cs deleted file mode 100644 index 32ff8bd8..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/AzureBlobFSLocation.Serialization.cs +++ /dev/null @@ -1,97 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class AzureBlobFSLocation : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - if (Optional.IsDefined(FileSystem)) - { - writer.WritePropertyName("fileSystem"u8); - JsonSerializer.Serialize(writer, FileSystem); - } - writer.WritePropertyName("type"u8); - writer.WriteStringValue(DatasetLocationType); - if (Optional.IsDefined(FolderPath)) - { - writer.WritePropertyName("folderPath"u8); - JsonSerializer.Serialize(writer, FolderPath); - } - if (Optional.IsDefined(FileName)) - { - writer.WritePropertyName("fileName"u8); - JsonSerializer.Serialize(writer, FileName); - } - foreach (var item in AdditionalProperties) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.Value.ToString()).RootElement); -#endif - } - writer.WriteEndObject(); - } - - internal static AzureBlobFSLocation DeserializeAzureBlobFSLocation(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - Optional> fileSystem = default; - string type = default; - Optional> folderPath = default; - Optional> fileName = default; - IDictionary> additionalProperties = default; - Dictionary> additionalPropertiesDictionary = new Dictionary>(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("fileSystem"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - fileSystem = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("type"u8)) - { - type = property.Value.GetString(); - continue; - } - if (property.NameEquals("folderPath"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - folderPath = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("fileName"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - fileName = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - additionalPropertiesDictionary.Add(property.Name, JsonSerializer.Deserialize>(property.Value.GetRawText())); - } - additionalProperties = additionalPropertiesDictionary; - return new AzureBlobFSLocation(type, folderPath.Value, fileName.Value, additionalProperties, fileSystem.Value); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/AzureBlobFSLocation.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/AzureBlobFSLocation.cs deleted file mode 100644 index e028f0d3..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/AzureBlobFSLocation.cs +++ /dev/null @@ -1,33 +0,0 @@ -// - -#nullable disable - -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// The location of azure blobFS dataset. - public partial class AzureBlobFSLocation : DatasetLocation - { - /// Initializes a new instance of AzureBlobFSLocation. - public AzureBlobFSLocation() - { - DatasetLocationType = "AzureBlobFSLocation"; - } - - /// Initializes a new instance of AzureBlobFSLocation. - /// Type of dataset storage location. - /// Specify the folder path of dataset. Type: string (or Expression with resultType string). - /// Specify the file name of dataset. Type: string (or Expression with resultType string). - /// Additional Properties. - /// Specify the fileSystem of azure blobFS. Type: string (or Expression with resultType string). - internal AzureBlobFSLocation(string datasetLocationType, DataFactoryElement folderPath, DataFactoryElement fileName, IDictionary> additionalProperties, DataFactoryElement fileSystem) : base(datasetLocationType, folderPath, fileName, additionalProperties) - { - FileSystem = fileSystem; - DatasetLocationType = datasetLocationType ?? "AzureBlobFSLocation"; - } - - /// Specify the fileSystem of azure blobFS. Type: string (or Expression with resultType string). - public DataFactoryElement FileSystem { get; set; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/AzureBlobFSReadSettings.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/AzureBlobFSReadSettings.Serialization.cs deleted file mode 100644 index e07289e3..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/AzureBlobFSReadSettings.Serialization.cs +++ /dev/null @@ -1,217 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class AzureBlobFSReadSettings : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - if (Optional.IsDefined(Recursive)) - { - writer.WritePropertyName("recursive"u8); - JsonSerializer.Serialize(writer, Recursive); - } - if (Optional.IsDefined(WildcardFolderPath)) - { - writer.WritePropertyName("wildcardFolderPath"u8); - JsonSerializer.Serialize(writer, WildcardFolderPath); - } - if (Optional.IsDefined(WildcardFileName)) - { - writer.WritePropertyName("wildcardFileName"u8); - JsonSerializer.Serialize(writer, WildcardFileName); - } - if (Optional.IsDefined(FileListPath)) - { - writer.WritePropertyName("fileListPath"u8); - JsonSerializer.Serialize(writer, FileListPath); - } - if (Optional.IsDefined(EnablePartitionDiscovery)) - { - writer.WritePropertyName("enablePartitionDiscovery"u8); - JsonSerializer.Serialize(writer, EnablePartitionDiscovery); - } - if (Optional.IsDefined(PartitionRootPath)) - { - writer.WritePropertyName("partitionRootPath"u8); - JsonSerializer.Serialize(writer, PartitionRootPath); - } - if (Optional.IsDefined(DeleteFilesAfterCompletion)) - { - writer.WritePropertyName("deleteFilesAfterCompletion"u8); - JsonSerializer.Serialize(writer, DeleteFilesAfterCompletion); - } - if (Optional.IsDefined(ModifiedDatetimeStart)) - { - writer.WritePropertyName("modifiedDatetimeStart"u8); - JsonSerializer.Serialize(writer, ModifiedDatetimeStart); - } - if (Optional.IsDefined(ModifiedDatetimeEnd)) - { - writer.WritePropertyName("modifiedDatetimeEnd"u8); - JsonSerializer.Serialize(writer, ModifiedDatetimeEnd); - } - writer.WritePropertyName("type"u8); - writer.WriteStringValue(StoreReadSettingsType); - if (Optional.IsDefined(MaxConcurrentConnections)) - { - writer.WritePropertyName("maxConcurrentConnections"u8); - JsonSerializer.Serialize(writer, MaxConcurrentConnections); - } - if (Optional.IsDefined(DisableMetricsCollection)) - { - writer.WritePropertyName("disableMetricsCollection"u8); - JsonSerializer.Serialize(writer, DisableMetricsCollection); - } - foreach (var item in AdditionalProperties) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.Value.ToString()).RootElement); -#endif - } - writer.WriteEndObject(); - } - - internal static AzureBlobFSReadSettings DeserializeAzureBlobFSReadSettings(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - Optional> recursive = default; - Optional> wildcardFolderPath = default; - Optional> wildcardFileName = default; - Optional> fileListPath = default; - Optional> enablePartitionDiscovery = default; - Optional> partitionRootPath = default; - Optional> deleteFilesAfterCompletion = default; - Optional> modifiedDatetimeStart = default; - Optional> modifiedDatetimeEnd = default; - string type = default; - Optional> maxConcurrentConnections = default; - Optional> disableMetricsCollection = default; - IDictionary> additionalProperties = default; - Dictionary> additionalPropertiesDictionary = new Dictionary>(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("recursive"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - recursive = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("wildcardFolderPath"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - wildcardFolderPath = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("wildcardFileName"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - wildcardFileName = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("fileListPath"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - fileListPath = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("enablePartitionDiscovery"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - enablePartitionDiscovery = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("partitionRootPath"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - partitionRootPath = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("deleteFilesAfterCompletion"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - deleteFilesAfterCompletion = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("modifiedDatetimeStart"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - modifiedDatetimeStart = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("modifiedDatetimeEnd"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - modifiedDatetimeEnd = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("type"u8)) - { - type = property.Value.GetString(); - continue; - } - if (property.NameEquals("maxConcurrentConnections"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - maxConcurrentConnections = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("disableMetricsCollection"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - disableMetricsCollection = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - additionalPropertiesDictionary.Add(property.Name, JsonSerializer.Deserialize>(property.Value.GetRawText())); - } - additionalProperties = additionalPropertiesDictionary; - return new AzureBlobFSReadSettings(type, maxConcurrentConnections.Value, disableMetricsCollection.Value, additionalProperties, recursive.Value, wildcardFolderPath.Value, wildcardFileName.Value, fileListPath.Value, enablePartitionDiscovery.Value, partitionRootPath.Value, deleteFilesAfterCompletion.Value, modifiedDatetimeStart.Value, modifiedDatetimeEnd.Value); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/AzureBlobFSReadSettings.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/AzureBlobFSReadSettings.cs deleted file mode 100644 index 6b7547fd..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/AzureBlobFSReadSettings.cs +++ /dev/null @@ -1,65 +0,0 @@ -// - -#nullable disable - -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// Azure blobFS read settings. - public partial class AzureBlobFSReadSettings : StoreReadSettings - { - /// Initializes a new instance of AzureBlobFSReadSettings. - public AzureBlobFSReadSettings() - { - StoreReadSettingsType = "AzureBlobFSReadSettings"; - } - - /// Initializes a new instance of AzureBlobFSReadSettings. - /// The read setting type. - /// The maximum concurrent connection count for the source data store. Type: integer (or Expression with resultType integer). - /// If true, disable data store metrics collection. Default is false. Type: boolean (or Expression with resultType boolean). - /// Additional Properties. - /// If true, files under the folder path will be read recursively. Default is true. Type: boolean (or Expression with resultType boolean). - /// Azure blobFS wildcardFolderPath. Type: string (or Expression with resultType string). - /// Azure blobFS wildcardFileName. Type: string (or Expression with resultType string). - /// Point to a text file that lists each file (relative path to the path configured in the dataset) that you want to copy. Type: string (or Expression with resultType string). - /// Indicates whether to enable partition discovery. Type: boolean (or Expression with resultType boolean). - /// Specify the root path where partition discovery starts from. Type: string (or Expression with resultType string). - /// Indicates whether the source files need to be deleted after copy completion. Default is false. Type: boolean (or Expression with resultType boolean). - /// The start of file's modified datetime. Type: string (or Expression with resultType string). - /// The end of file's modified datetime. Type: string (or Expression with resultType string). - internal AzureBlobFSReadSettings(string storeReadSettingsType, DataFactoryElement maxConcurrentConnections, DataFactoryElement disableMetricsCollection, IDictionary> additionalProperties, DataFactoryElement recursive, DataFactoryElement wildcardFolderPath, DataFactoryElement wildcardFileName, DataFactoryElement fileListPath, DataFactoryElement enablePartitionDiscovery, DataFactoryElement partitionRootPath, DataFactoryElement deleteFilesAfterCompletion, DataFactoryElement modifiedDatetimeStart, DataFactoryElement modifiedDatetimeEnd) : base(storeReadSettingsType, maxConcurrentConnections, disableMetricsCollection, additionalProperties) - { - Recursive = recursive; - WildcardFolderPath = wildcardFolderPath; - WildcardFileName = wildcardFileName; - FileListPath = fileListPath; - EnablePartitionDiscovery = enablePartitionDiscovery; - PartitionRootPath = partitionRootPath; - DeleteFilesAfterCompletion = deleteFilesAfterCompletion; - ModifiedDatetimeStart = modifiedDatetimeStart; - ModifiedDatetimeEnd = modifiedDatetimeEnd; - StoreReadSettingsType = storeReadSettingsType ?? "AzureBlobFSReadSettings"; - } - - /// If true, files under the folder path will be read recursively. Default is true. Type: boolean (or Expression with resultType boolean). - public DataFactoryElement Recursive { get; set; } - /// Azure blobFS wildcardFolderPath. Type: string (or Expression with resultType string). - public DataFactoryElement WildcardFolderPath { get; set; } - /// Azure blobFS wildcardFileName. Type: string (or Expression with resultType string). - public DataFactoryElement WildcardFileName { get; set; } - /// Point to a text file that lists each file (relative path to the path configured in the dataset) that you want to copy. Type: string (or Expression with resultType string). - public DataFactoryElement FileListPath { get; set; } - /// Indicates whether to enable partition discovery. Type: boolean (or Expression with resultType boolean). - public DataFactoryElement EnablePartitionDiscovery { get; set; } - /// Specify the root path where partition discovery starts from. Type: string (or Expression with resultType string). - public DataFactoryElement PartitionRootPath { get; set; } - /// Indicates whether the source files need to be deleted after copy completion. Default is false. Type: boolean (or Expression with resultType boolean). - public DataFactoryElement DeleteFilesAfterCompletion { get; set; } - /// The start of file's modified datetime. Type: string (or Expression with resultType string). - public DataFactoryElement ModifiedDatetimeStart { get; set; } - /// The end of file's modified datetime. Type: string (or Expression with resultType string). - public DataFactoryElement ModifiedDatetimeEnd { get; set; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/AzureBlobFSSink.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/AzureBlobFSSink.Serialization.cs deleted file mode 100644 index 254fc807..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/AzureBlobFSSink.Serialization.cs +++ /dev/null @@ -1,182 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class AzureBlobFSSink : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - if (Optional.IsDefined(CopyBehavior)) - { - writer.WritePropertyName("copyBehavior"u8); - JsonSerializer.Serialize(writer, CopyBehavior); - } - if (Optional.IsCollectionDefined(Metadata)) - { - writer.WritePropertyName("metadata"u8); - writer.WriteStartArray(); - foreach (var item in Metadata) - { - writer.WriteObjectValue(item); - } - writer.WriteEndArray(); - } - writer.WritePropertyName("type"u8); - writer.WriteStringValue(CopySinkType); - if (Optional.IsDefined(WriteBatchSize)) - { - writer.WritePropertyName("writeBatchSize"u8); - JsonSerializer.Serialize(writer, WriteBatchSize); - } - if (Optional.IsDefined(WriteBatchTimeout)) - { - writer.WritePropertyName("writeBatchTimeout"u8); - JsonSerializer.Serialize(writer, WriteBatchTimeout); - } - if (Optional.IsDefined(SinkRetryCount)) - { - writer.WritePropertyName("sinkRetryCount"u8); - JsonSerializer.Serialize(writer, SinkRetryCount); - } - if (Optional.IsDefined(SinkRetryWait)) - { - writer.WritePropertyName("sinkRetryWait"u8); - JsonSerializer.Serialize(writer, SinkRetryWait); - } - if (Optional.IsDefined(MaxConcurrentConnections)) - { - writer.WritePropertyName("maxConcurrentConnections"u8); - JsonSerializer.Serialize(writer, MaxConcurrentConnections); - } - if (Optional.IsDefined(DisableMetricsCollection)) - { - writer.WritePropertyName("disableMetricsCollection"u8); - JsonSerializer.Serialize(writer, DisableMetricsCollection); - } - foreach (var item in AdditionalProperties) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.Value.ToString()).RootElement); -#endif - } - writer.WriteEndObject(); - } - - internal static AzureBlobFSSink DeserializeAzureBlobFSSink(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - Optional> copyBehavior = default; - Optional> metadata = default; - string type = default; - Optional> writeBatchSize = default; - Optional> writeBatchTimeout = default; - Optional> sinkRetryCount = default; - Optional> sinkRetryWait = default; - Optional> maxConcurrentConnections = default; - Optional> disableMetricsCollection = default; - IDictionary> additionalProperties = default; - Dictionary> additionalPropertiesDictionary = new Dictionary>(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("copyBehavior"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - copyBehavior = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("metadata"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - array.Add(DataFactoryMetadataItemInfo.DeserializeDataFactoryMetadataItemInfo(item)); - } - metadata = array; - continue; - } - if (property.NameEquals("type"u8)) - { - type = property.Value.GetString(); - continue; - } - if (property.NameEquals("writeBatchSize"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - writeBatchSize = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("writeBatchTimeout"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - writeBatchTimeout = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("sinkRetryCount"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - sinkRetryCount = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("sinkRetryWait"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - sinkRetryWait = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("maxConcurrentConnections"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - maxConcurrentConnections = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("disableMetricsCollection"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - disableMetricsCollection = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - additionalPropertiesDictionary.Add(property.Name, JsonSerializer.Deserialize>(property.Value.GetRawText())); - } - additionalProperties = additionalPropertiesDictionary; - return new AzureBlobFSSink(type, writeBatchSize.Value, writeBatchTimeout.Value, sinkRetryCount.Value, sinkRetryWait.Value, maxConcurrentConnections.Value, disableMetricsCollection.Value, additionalProperties, copyBehavior.Value, Optional.ToList(metadata)); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/AzureBlobFSSink.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/AzureBlobFSSink.cs deleted file mode 100644 index 7b9e083d..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/AzureBlobFSSink.cs +++ /dev/null @@ -1,43 +0,0 @@ -// - -#nullable disable - -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// A copy activity Azure Data Lake Storage Gen2 sink. - public partial class AzureBlobFSSink : CopySink - { - /// Initializes a new instance of AzureBlobFSSink. - public AzureBlobFSSink() - { - Metadata = new ChangeTrackingList(); - CopySinkType = "AzureBlobFSSink"; - } - - /// Initializes a new instance of AzureBlobFSSink. - /// Copy sink type. - /// Write batch size. Type: integer (or Expression with resultType integer), minimum: 0. - /// Write batch timeout. Type: string (or Expression with resultType string), pattern: ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). - /// Sink retry count. Type: integer (or Expression with resultType integer). - /// Sink retry wait. Type: string (or Expression with resultType string), pattern: ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). - /// The maximum concurrent connection count for the sink data store. Type: integer (or Expression with resultType integer). - /// If true, disable data store metrics collection. Default is false. Type: boolean (or Expression with resultType boolean). - /// Additional Properties. - /// The type of copy behavior for copy sink. Type: string (or Expression with resultType string). - /// Specify the custom metadata to be added to sink data. Type: array of objects (or Expression with resultType array of objects). - internal AzureBlobFSSink(string copySinkType, DataFactoryElement writeBatchSize, DataFactoryElement writeBatchTimeout, DataFactoryElement sinkRetryCount, DataFactoryElement sinkRetryWait, DataFactoryElement maxConcurrentConnections, DataFactoryElement disableMetricsCollection, IDictionary> additionalProperties, DataFactoryElement copyBehavior, IList metadata) : base(copySinkType, writeBatchSize, writeBatchTimeout, sinkRetryCount, sinkRetryWait, maxConcurrentConnections, disableMetricsCollection, additionalProperties) - { - CopyBehavior = copyBehavior; - Metadata = metadata; - CopySinkType = copySinkType ?? "AzureBlobFSSink"; - } - - /// The type of copy behavior for copy sink. Type: string (or Expression with resultType string). - public DataFactoryElement CopyBehavior { get; set; } - /// Specify the custom metadata to be added to sink data. Type: array of objects (or Expression with resultType array of objects). - public IList Metadata { get; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/AzureBlobFSSource.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/AzureBlobFSSource.Serialization.cs deleted file mode 100644 index 28eafe83..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/AzureBlobFSSource.Serialization.cs +++ /dev/null @@ -1,157 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class AzureBlobFSSource : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - if (Optional.IsDefined(TreatEmptyAsNull)) - { - writer.WritePropertyName("treatEmptyAsNull"u8); - JsonSerializer.Serialize(writer, TreatEmptyAsNull); - } - if (Optional.IsDefined(SkipHeaderLineCount)) - { - writer.WritePropertyName("skipHeaderLineCount"u8); - JsonSerializer.Serialize(writer, SkipHeaderLineCount); - } - if (Optional.IsDefined(Recursive)) - { - writer.WritePropertyName("recursive"u8); - JsonSerializer.Serialize(writer, Recursive); - } - writer.WritePropertyName("type"u8); - writer.WriteStringValue(CopySourceType); - if (Optional.IsDefined(SourceRetryCount)) - { - writer.WritePropertyName("sourceRetryCount"u8); - JsonSerializer.Serialize(writer, SourceRetryCount); - } - if (Optional.IsDefined(SourceRetryWait)) - { - writer.WritePropertyName("sourceRetryWait"u8); - JsonSerializer.Serialize(writer, SourceRetryWait); - } - if (Optional.IsDefined(MaxConcurrentConnections)) - { - writer.WritePropertyName("maxConcurrentConnections"u8); - JsonSerializer.Serialize(writer, MaxConcurrentConnections); - } - if (Optional.IsDefined(DisableMetricsCollection)) - { - writer.WritePropertyName("disableMetricsCollection"u8); - JsonSerializer.Serialize(writer, DisableMetricsCollection); - } - foreach (var item in AdditionalProperties) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.Value.ToString()).RootElement); -#endif - } - writer.WriteEndObject(); - } - - internal static AzureBlobFSSource DeserializeAzureBlobFSSource(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - Optional> treatEmptyAsNull = default; - Optional> skipHeaderLineCount = default; - Optional> recursive = default; - string type = default; - Optional> sourceRetryCount = default; - Optional> sourceRetryWait = default; - Optional> maxConcurrentConnections = default; - Optional> disableMetricsCollection = default; - IDictionary> additionalProperties = default; - Dictionary> additionalPropertiesDictionary = new Dictionary>(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("treatEmptyAsNull"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - treatEmptyAsNull = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("skipHeaderLineCount"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - skipHeaderLineCount = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("recursive"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - recursive = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("type"u8)) - { - type = property.Value.GetString(); - continue; - } - if (property.NameEquals("sourceRetryCount"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - sourceRetryCount = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("sourceRetryWait"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - sourceRetryWait = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("maxConcurrentConnections"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - maxConcurrentConnections = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("disableMetricsCollection"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - disableMetricsCollection = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - additionalPropertiesDictionary.Add(property.Name, JsonSerializer.Deserialize>(property.Value.GetRawText())); - } - additionalProperties = additionalPropertiesDictionary; - return new AzureBlobFSSource(type, sourceRetryCount.Value, sourceRetryWait.Value, maxConcurrentConnections.Value, disableMetricsCollection.Value, additionalProperties, treatEmptyAsNull.Value, skipHeaderLineCount.Value, recursive.Value); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/AzureBlobFSSource.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/AzureBlobFSSource.cs deleted file mode 100644 index 641ede1d..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/AzureBlobFSSource.cs +++ /dev/null @@ -1,43 +0,0 @@ -// - -#nullable disable - -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// A copy activity Azure BlobFS source. - public partial class AzureBlobFSSource : CopyActivitySource - { - /// Initializes a new instance of AzureBlobFSSource. - public AzureBlobFSSource() - { - CopySourceType = "AzureBlobFSSource"; - } - - /// Initializes a new instance of AzureBlobFSSource. - /// Copy source type. - /// Source retry count. Type: integer (or Expression with resultType integer). - /// Source retry wait. Type: string (or Expression with resultType string), pattern: ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). - /// The maximum concurrent connection count for the source data store. Type: integer (or Expression with resultType integer). - /// If true, disable data store metrics collection. Default is false. Type: boolean (or Expression with resultType boolean). - /// Additional Properties. - /// Treat empty as null. Type: boolean (or Expression with resultType boolean). - /// Number of header lines to skip from each blob. Type: integer (or Expression with resultType integer). - /// If true, files under the folder path will be read recursively. Default is true. Type: boolean (or Expression with resultType boolean). - internal AzureBlobFSSource(string copySourceType, DataFactoryElement sourceRetryCount, DataFactoryElement sourceRetryWait, DataFactoryElement maxConcurrentConnections, DataFactoryElement disableMetricsCollection, IDictionary> additionalProperties, DataFactoryElement treatEmptyAsNull, DataFactoryElement skipHeaderLineCount, DataFactoryElement recursive) : base(copySourceType, sourceRetryCount, sourceRetryWait, maxConcurrentConnections, disableMetricsCollection, additionalProperties) - { - TreatEmptyAsNull = treatEmptyAsNull; - SkipHeaderLineCount = skipHeaderLineCount; - Recursive = recursive; - CopySourceType = copySourceType ?? "AzureBlobFSSource"; - } - - /// Treat empty as null. Type: boolean (or Expression with resultType boolean). - public DataFactoryElement TreatEmptyAsNull { get; set; } - /// Number of header lines to skip from each blob. Type: integer (or Expression with resultType integer). - public DataFactoryElement SkipHeaderLineCount { get; set; } - /// If true, files under the folder path will be read recursively. Default is true. Type: boolean (or Expression with resultType boolean). - public DataFactoryElement Recursive { get; set; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/AzureBlobFSWriteSettings.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/AzureBlobFSWriteSettings.Serialization.cs deleted file mode 100644 index ec042d3a..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/AzureBlobFSWriteSettings.Serialization.cs +++ /dev/null @@ -1,116 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class AzureBlobFSWriteSettings : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - if (Optional.IsDefined(BlockSizeInMB)) - { - writer.WritePropertyName("blockSizeInMB"u8); - JsonSerializer.Serialize(writer, BlockSizeInMB); - } - writer.WritePropertyName("type"u8); - writer.WriteStringValue(StoreWriteSettingsType); - if (Optional.IsDefined(MaxConcurrentConnections)) - { - writer.WritePropertyName("maxConcurrentConnections"u8); - JsonSerializer.Serialize(writer, MaxConcurrentConnections); - } - if (Optional.IsDefined(DisableMetricsCollection)) - { - writer.WritePropertyName("disableMetricsCollection"u8); - JsonSerializer.Serialize(writer, DisableMetricsCollection); - } - if (Optional.IsDefined(CopyBehavior)) - { - writer.WritePropertyName("copyBehavior"u8); -#if NET6_0_OR_GREATER - writer.WriteRawValue(CopyBehavior); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(CopyBehavior.ToString()).RootElement); -#endif - } - foreach (var item in AdditionalProperties) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.Value.ToString()).RootElement); -#endif - } - writer.WriteEndObject(); - } - - internal static AzureBlobFSWriteSettings DeserializeAzureBlobFSWriteSettings(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - Optional> blockSizeInMB = default; - string type = default; - Optional> maxConcurrentConnections = default; - Optional> disableMetricsCollection = default; - Optional copyBehavior = default; - IDictionary> additionalProperties = default; - Dictionary> additionalPropertiesDictionary = new Dictionary>(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("blockSizeInMB"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - blockSizeInMB = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("type"u8)) - { - type = property.Value.GetString(); - continue; - } - if (property.NameEquals("maxConcurrentConnections"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - maxConcurrentConnections = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("disableMetricsCollection"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - disableMetricsCollection = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("copyBehavior"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - copyBehavior = BinaryData.FromString(property.Value.GetRawText()); - continue; - } - additionalPropertiesDictionary.Add(property.Name, JsonSerializer.Deserialize>(property.Value.GetRawText())); - } - additionalProperties = additionalPropertiesDictionary; - return new AzureBlobFSWriteSettings(type, maxConcurrentConnections.Value, disableMetricsCollection.Value, copyBehavior.Value, additionalProperties, blockSizeInMB.Value); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/AzureBlobFSWriteSettings.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/AzureBlobFSWriteSettings.cs deleted file mode 100644 index 5cacb9f8..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/AzureBlobFSWriteSettings.cs +++ /dev/null @@ -1,34 +0,0 @@ -// - -#nullable disable - -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// Azure blobFS write settings. - public partial class AzureBlobFSWriteSettings : StoreWriteSettings - { - /// Initializes a new instance of AzureBlobFSWriteSettings. - public AzureBlobFSWriteSettings() - { - StoreWriteSettingsType = "AzureBlobFSWriteSettings"; - } - - /// Initializes a new instance of AzureBlobFSWriteSettings. - /// The write setting type. - /// The maximum concurrent connection count for the source data store. Type: integer (or Expression with resultType integer). - /// If true, disable data store metrics collection. Default is false. Type: boolean (or Expression with resultType boolean). - /// The type of copy behavior for copy sink. - /// Additional Properties. - /// Indicates the block size(MB) when writing data to blob. Type: integer (or Expression with resultType integer). - internal AzureBlobFSWriteSettings(string storeWriteSettingsType, DataFactoryElement maxConcurrentConnections, DataFactoryElement disableMetricsCollection, BinaryData copyBehavior, IDictionary> additionalProperties, DataFactoryElement blockSizeInMB) : base(storeWriteSettingsType, maxConcurrentConnections, disableMetricsCollection, copyBehavior, additionalProperties) - { - BlockSizeInMB = blockSizeInMB; - StoreWriteSettingsType = storeWriteSettingsType ?? "AzureBlobFSWriteSettings"; - } - - /// Indicates the block size(MB) when writing data to blob. Type: integer (or Expression with resultType integer). - public DataFactoryElement BlockSizeInMB { get; set; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/AzureBlobStorageLinkedService.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/AzureBlobStorageLinkedService.Serialization.cs deleted file mode 100644 index 4d8e6108..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/AzureBlobStorageLinkedService.Serialization.cs +++ /dev/null @@ -1,366 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class AzureBlobStorageLinkedService : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - writer.WritePropertyName("type"u8); - writer.WriteStringValue(LinkedServiceType); - if (Optional.IsDefined(ConnectVia)) - { - writer.WritePropertyName("connectVia"u8); - writer.WriteObjectValue(ConnectVia); - } - if (Optional.IsDefined(Description)) - { - writer.WritePropertyName("description"u8); - writer.WriteStringValue(Description); - } - if (Optional.IsCollectionDefined(Parameters)) - { - writer.WritePropertyName("parameters"u8); - writer.WriteStartObject(); - foreach (var item in Parameters) - { - writer.WritePropertyName(item.Key); - writer.WriteObjectValue(item.Value); - } - writer.WriteEndObject(); - } - if (Optional.IsCollectionDefined(Annotations)) - { - writer.WritePropertyName("annotations"u8); - writer.WriteStartArray(); - foreach (var item in Annotations) - { - if (item == null) - { - writer.WriteNullValue(); - continue; - } -#if NET6_0_OR_GREATER - writer.WriteRawValue(item); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.ToString()).RootElement); -#endif - } - writer.WriteEndArray(); - } - writer.WritePropertyName("typeProperties"u8); - writer.WriteStartObject(); - if (Optional.IsDefined(ConnectionString)) - { - writer.WritePropertyName("connectionString"u8); - JsonSerializer.Serialize(writer, ConnectionString); - } - if (Optional.IsDefined(AccountKey)) - { - writer.WritePropertyName("accountKey"u8); - JsonSerializer.Serialize(writer, AccountKey); - } - if (Optional.IsDefined(SasUri)) - { - writer.WritePropertyName("sasUri"u8); - JsonSerializer.Serialize(writer, SasUri); - } - if (Optional.IsDefined(SasToken)) - { - writer.WritePropertyName("sasToken"u8); - JsonSerializer.Serialize(writer, SasToken); - } - if (Optional.IsDefined(ServiceEndpoint)) - { - writer.WritePropertyName("serviceEndpoint"u8); - JsonSerializer.Serialize(writer, ServiceEndpoint); - } - if (Optional.IsDefined(ServicePrincipalId)) - { - writer.WritePropertyName("servicePrincipalId"u8); - JsonSerializer.Serialize(writer, ServicePrincipalId); - } - if (Optional.IsDefined(ServicePrincipalKey)) - { - writer.WritePropertyName("servicePrincipalKey"u8); - JsonSerializer.Serialize(writer, ServicePrincipalKey); - } - if (Optional.IsDefined(Tenant)) - { - writer.WritePropertyName("tenant"u8); - JsonSerializer.Serialize(writer, Tenant); - } - if (Optional.IsDefined(AzureCloudType)) - { - writer.WritePropertyName("azureCloudType"u8); - JsonSerializer.Serialize(writer, AzureCloudType); - } - if (Optional.IsDefined(AccountKind)) - { - writer.WritePropertyName("accountKind"u8); - JsonSerializer.Serialize(writer, AccountKind); - } - if (Optional.IsDefined(EncryptedCredential)) - { - writer.WritePropertyName("encryptedCredential"u8); - writer.WriteStringValue(EncryptedCredential); - } - if (Optional.IsDefined(Credential)) - { - writer.WritePropertyName("credential"u8); - writer.WriteObjectValue(Credential); - } - if (Optional.IsDefined(AuthenticationType)) - { - writer.WritePropertyName("authenticationType"u8); - writer.WriteStringValue(AuthenticationType.Value.ToString()); - } - if (Optional.IsDefined(ContainerUri)) - { - writer.WritePropertyName("containerUri"u8); - JsonSerializer.Serialize(writer, ContainerUri); - } - writer.WriteEndObject(); - foreach (var item in AdditionalProperties) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.Value.ToString()).RootElement); -#endif - } - writer.WriteEndObject(); - } - - internal static AzureBlobStorageLinkedService DeserializeAzureBlobStorageLinkedService(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - string type = default; - Optional connectVia = default; - Optional description = default; - Optional> parameters = default; - Optional> annotations = default; - Optional> connectionString = default; - Optional accountKey = default; - Optional> sasUri = default; - Optional sasToken = default; - Optional> serviceEndpoint = default; - Optional> servicePrincipalId = default; - Optional servicePrincipalKey = default; - Optional> tenant = default; - Optional> azureCloudType = default; - Optional> accountKind = default; - Optional encryptedCredential = default; - Optional credential = default; - Optional authenticationType = default; - Optional> containerUri = default; - IDictionary> additionalProperties = default; - Dictionary> additionalPropertiesDictionary = new Dictionary>(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("type"u8)) - { - type = property.Value.GetString(); - continue; - } - if (property.NameEquals("connectVia"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - connectVia = IntegrationRuntimeReference.DeserializeIntegrationRuntimeReference(property.Value); - continue; - } - if (property.NameEquals("description"u8)) - { - description = property.Value.GetString(); - continue; - } - if (property.NameEquals("parameters"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - Dictionary dictionary = new Dictionary(); - foreach (var property0 in property.Value.EnumerateObject()) - { - dictionary.Add(property0.Name, EntityParameterSpecification.DeserializeEntityParameterSpecification(property0.Value)); - } - parameters = dictionary; - continue; - } - if (property.NameEquals("annotations"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - if (item.ValueKind == JsonValueKind.Null) - { - array.Add(null); - } - else - { - array.Add(BinaryData.FromString(item.GetRawText())); - } - } - annotations = array; - continue; - } - if (property.NameEquals("typeProperties"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - foreach (var property0 in property.Value.EnumerateObject()) - { - if (property0.NameEquals("connectionString"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - connectionString = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("accountKey"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - accountKey = JsonSerializer.Deserialize(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("sasUri"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - sasUri = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("sasToken"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - sasToken = JsonSerializer.Deserialize(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("serviceEndpoint"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - serviceEndpoint = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("servicePrincipalId"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - servicePrincipalId = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("servicePrincipalKey"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - servicePrincipalKey = JsonSerializer.Deserialize(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("tenant"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - tenant = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("azureCloudType"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - azureCloudType = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("accountKind"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - accountKind = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("encryptedCredential"u8)) - { - encryptedCredential = property0.Value.GetString(); - continue; - } - if (property0.NameEquals("credential"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - credential = DataFactoryCredentialReference.DeserializeDataFactoryCredentialReference(property0.Value); - continue; - } - if (property0.NameEquals("authenticationType"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - authenticationType = new AzureStorageAuthenticationType(property0.Value.GetString()); - continue; - } - if (property0.NameEquals("containerUri"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - containerUri = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - } - continue; - } - additionalPropertiesDictionary.Add(property.Name, JsonSerializer.Deserialize>(property.Value.GetRawText())); - } - additionalProperties = additionalPropertiesDictionary; - return new AzureBlobStorageLinkedService(type, connectVia.Value, description.Value, Optional.ToDictionary(parameters), Optional.ToList(annotations), additionalProperties, connectionString.Value, accountKey, sasUri.Value, sasToken, serviceEndpoint.Value, servicePrincipalId.Value, servicePrincipalKey, tenant.Value, azureCloudType.Value, accountKind.Value, encryptedCredential.Value, credential.Value, Optional.ToNullable(authenticationType), containerUri.Value); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/AzureBlobStorageLinkedService.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/AzureBlobStorageLinkedService.cs deleted file mode 100644 index d4610b91..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/AzureBlobStorageLinkedService.cs +++ /dev/null @@ -1,87 +0,0 @@ -// - -#nullable disable - -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// The azure blob storage linked service. - public partial class AzureBlobStorageLinkedService : DataFactoryLinkedServiceProperties - { - /// Initializes a new instance of AzureBlobStorageLinkedService. - public AzureBlobStorageLinkedService() - { - LinkedServiceType = "AzureBlobStorage"; - } - - /// Initializes a new instance of AzureBlobStorageLinkedService. - /// Type of linked service. - /// The integration runtime reference. - /// Linked service description. - /// Parameters for linked service. - /// List of tags that can be used for describing the linked service. - /// Additional Properties. - /// The connection string. It is mutually exclusive with sasUri, serviceEndpoint property. Type: string, SecureString or AzureKeyVaultSecretReference. - /// The Azure key vault secret reference of accountKey in connection string. - /// SAS URI of the Azure Blob Storage resource. It is mutually exclusive with connectionString, serviceEndpoint property. Type: string, SecureString or AzureKeyVaultSecretReference. - /// The Azure key vault secret reference of sasToken in sas uri. - /// Blob service endpoint of the Azure Blob Storage resource. It is mutually exclusive with connectionString, sasUri property. - /// The ID of the service principal used to authenticate against Azure SQL Data Warehouse. Type: string (or Expression with resultType string). - /// The key of the service principal used to authenticate against Azure SQL Data Warehouse. - /// The name or ID of the tenant to which the service principal belongs. Type: string (or Expression with resultType string). - /// Indicates the azure cloud type of the service principle auth. Allowed values are AzurePublic, AzureChina, AzureUsGovernment, AzureGermany. Default value is the data factory regions’ cloud type. Type: string (or Expression with resultType string). - /// Specify the kind of your storage account. Allowed values are: Storage (general purpose v1), StorageV2 (general purpose v2), BlobStorage, or BlockBlobStorage. Type: string (or Expression with resultType string). - /// The encrypted credential used for authentication. Credentials are encrypted using the integration runtime credential manager. Type: string. - /// The credential reference containing authentication information. - /// The type used for authentication. Type: string. - /// Container uri of the Azure Blob Storage resource only support for anonymous access. Type: string (or Expression with resultType string). - internal AzureBlobStorageLinkedService(string linkedServiceType, IntegrationRuntimeReference connectVia, string description, IDictionary parameters, IList annotations, IDictionary> additionalProperties, DataFactoryElement connectionString, DataFactoryKeyVaultSecretReference accountKey, DataFactoryElement sasUri, DataFactoryKeyVaultSecretReference sasToken, DataFactoryElement serviceEndpoint, DataFactoryElement servicePrincipalId, DataFactorySecretBaseDefinition servicePrincipalKey, DataFactoryElement tenant, DataFactoryElement azureCloudType, DataFactoryElement accountKind, string encryptedCredential, DataFactoryCredentialReference credential, AzureStorageAuthenticationType? authenticationType, DataFactoryElement containerUri) : base(linkedServiceType, connectVia, description, parameters, annotations, additionalProperties) - { - ConnectionString = connectionString; - AccountKey = accountKey; - SasUri = sasUri; - SasToken = sasToken; - ServiceEndpoint = serviceEndpoint; - ServicePrincipalId = servicePrincipalId; - ServicePrincipalKey = servicePrincipalKey; - Tenant = tenant; - AzureCloudType = azureCloudType; - AccountKind = accountKind; - EncryptedCredential = encryptedCredential; - Credential = credential; - AuthenticationType = authenticationType; - ContainerUri = containerUri; - LinkedServiceType = linkedServiceType ?? "AzureBlobStorage"; - } - - /// The connection string. It is mutually exclusive with sasUri, serviceEndpoint property. Type: string, SecureString or AzureKeyVaultSecretReference. - public DataFactoryElement ConnectionString { get; set; } - /// The Azure key vault secret reference of accountKey in connection string. - public DataFactoryKeyVaultSecretReference AccountKey { get; set; } - /// SAS URI of the Azure Blob Storage resource. It is mutually exclusive with connectionString, serviceEndpoint property. Type: string, SecureString or AzureKeyVaultSecretReference. - public DataFactoryElement SasUri { get; set; } - /// The Azure key vault secret reference of sasToken in sas uri. - public DataFactoryKeyVaultSecretReference SasToken { get; set; } - /// Blob service endpoint of the Azure Blob Storage resource. It is mutually exclusive with connectionString, sasUri property. - public DataFactoryElement ServiceEndpoint { get; set; } - /// The ID of the service principal used to authenticate against Azure SQL Data Warehouse. Type: string (or Expression with resultType string). - public DataFactoryElement ServicePrincipalId { get; set; } - /// The key of the service principal used to authenticate against Azure SQL Data Warehouse. - public DataFactorySecretBaseDefinition ServicePrincipalKey { get; set; } - /// The name or ID of the tenant to which the service principal belongs. Type: string (or Expression with resultType string). - public DataFactoryElement Tenant { get; set; } - /// Indicates the azure cloud type of the service principle auth. Allowed values are AzurePublic, AzureChina, AzureUsGovernment, AzureGermany. Default value is the data factory regions’ cloud type. Type: string (or Expression with resultType string). - public DataFactoryElement AzureCloudType { get; set; } - /// Specify the kind of your storage account. Allowed values are: Storage (general purpose v1), StorageV2 (general purpose v2), BlobStorage, or BlockBlobStorage. Type: string (or Expression with resultType string). - public DataFactoryElement AccountKind { get; set; } - /// The encrypted credential used for authentication. Credentials are encrypted using the integration runtime credential manager. Type: string. - public string EncryptedCredential { get; set; } - /// The credential reference containing authentication information. - public DataFactoryCredentialReference Credential { get; set; } - /// The type used for authentication. Type: string. - public AzureStorageAuthenticationType? AuthenticationType { get; set; } - /// Container uri of the Azure Blob Storage resource only support for anonymous access. Type: string (or Expression with resultType string). - public DataFactoryElement ContainerUri { get; set; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/AzureBlobStorageLocation.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/AzureBlobStorageLocation.Serialization.cs deleted file mode 100644 index 8b7f6cc8..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/AzureBlobStorageLocation.Serialization.cs +++ /dev/null @@ -1,97 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class AzureBlobStorageLocation : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - if (Optional.IsDefined(Container)) - { - writer.WritePropertyName("container"u8); - JsonSerializer.Serialize(writer, Container); - } - writer.WritePropertyName("type"u8); - writer.WriteStringValue(DatasetLocationType); - if (Optional.IsDefined(FolderPath)) - { - writer.WritePropertyName("folderPath"u8); - JsonSerializer.Serialize(writer, FolderPath); - } - if (Optional.IsDefined(FileName)) - { - writer.WritePropertyName("fileName"u8); - JsonSerializer.Serialize(writer, FileName); - } - foreach (var item in AdditionalProperties) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.Value.ToString()).RootElement); -#endif - } - writer.WriteEndObject(); - } - - internal static AzureBlobStorageLocation DeserializeAzureBlobStorageLocation(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - Optional> container = default; - string type = default; - Optional> folderPath = default; - Optional> fileName = default; - IDictionary> additionalProperties = default; - Dictionary> additionalPropertiesDictionary = new Dictionary>(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("container"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - container = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("type"u8)) - { - type = property.Value.GetString(); - continue; - } - if (property.NameEquals("folderPath"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - folderPath = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("fileName"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - fileName = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - additionalPropertiesDictionary.Add(property.Name, JsonSerializer.Deserialize>(property.Value.GetRawText())); - } - additionalProperties = additionalPropertiesDictionary; - return new AzureBlobStorageLocation(type, folderPath.Value, fileName.Value, additionalProperties, container.Value); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/AzureBlobStorageLocation.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/AzureBlobStorageLocation.cs deleted file mode 100644 index 748bc244..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/AzureBlobStorageLocation.cs +++ /dev/null @@ -1,33 +0,0 @@ -// - -#nullable disable - -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// The location of azure blob dataset. - public partial class AzureBlobStorageLocation : DatasetLocation - { - /// Initializes a new instance of AzureBlobStorageLocation. - public AzureBlobStorageLocation() - { - DatasetLocationType = "AzureBlobStorageLocation"; - } - - /// Initializes a new instance of AzureBlobStorageLocation. - /// Type of dataset storage location. - /// Specify the folder path of dataset. Type: string (or Expression with resultType string). - /// Specify the file name of dataset. Type: string (or Expression with resultType string). - /// Additional Properties. - /// Specify the container of azure blob. Type: string (or Expression with resultType string). - internal AzureBlobStorageLocation(string datasetLocationType, DataFactoryElement folderPath, DataFactoryElement fileName, IDictionary> additionalProperties, DataFactoryElement container) : base(datasetLocationType, folderPath, fileName, additionalProperties) - { - Container = container; - DatasetLocationType = datasetLocationType ?? "AzureBlobStorageLocation"; - } - - /// Specify the container of azure blob. Type: string (or Expression with resultType string). - public DataFactoryElement Container { get; set; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/AzureBlobStorageReadSettings.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/AzureBlobStorageReadSettings.Serialization.cs deleted file mode 100644 index 3cf2ad9a..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/AzureBlobStorageReadSettings.Serialization.cs +++ /dev/null @@ -1,232 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class AzureBlobStorageReadSettings : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - if (Optional.IsDefined(Recursive)) - { - writer.WritePropertyName("recursive"u8); - JsonSerializer.Serialize(writer, Recursive); - } - if (Optional.IsDefined(WildcardFolderPath)) - { - writer.WritePropertyName("wildcardFolderPath"u8); - JsonSerializer.Serialize(writer, WildcardFolderPath); - } - if (Optional.IsDefined(WildcardFileName)) - { - writer.WritePropertyName("wildcardFileName"u8); - JsonSerializer.Serialize(writer, WildcardFileName); - } - if (Optional.IsDefined(Prefix)) - { - writer.WritePropertyName("prefix"u8); - JsonSerializer.Serialize(writer, Prefix); - } - if (Optional.IsDefined(FileListPath)) - { - writer.WritePropertyName("fileListPath"u8); - JsonSerializer.Serialize(writer, FileListPath); - } - if (Optional.IsDefined(EnablePartitionDiscovery)) - { - writer.WritePropertyName("enablePartitionDiscovery"u8); - JsonSerializer.Serialize(writer, EnablePartitionDiscovery); - } - if (Optional.IsDefined(PartitionRootPath)) - { - writer.WritePropertyName("partitionRootPath"u8); - JsonSerializer.Serialize(writer, PartitionRootPath); - } - if (Optional.IsDefined(DeleteFilesAfterCompletion)) - { - writer.WritePropertyName("deleteFilesAfterCompletion"u8); - JsonSerializer.Serialize(writer, DeleteFilesAfterCompletion); - } - if (Optional.IsDefined(ModifiedDatetimeStart)) - { - writer.WritePropertyName("modifiedDatetimeStart"u8); - JsonSerializer.Serialize(writer, ModifiedDatetimeStart); - } - if (Optional.IsDefined(ModifiedDatetimeEnd)) - { - writer.WritePropertyName("modifiedDatetimeEnd"u8); - JsonSerializer.Serialize(writer, ModifiedDatetimeEnd); - } - writer.WritePropertyName("type"u8); - writer.WriteStringValue(StoreReadSettingsType); - if (Optional.IsDefined(MaxConcurrentConnections)) - { - writer.WritePropertyName("maxConcurrentConnections"u8); - JsonSerializer.Serialize(writer, MaxConcurrentConnections); - } - if (Optional.IsDefined(DisableMetricsCollection)) - { - writer.WritePropertyName("disableMetricsCollection"u8); - JsonSerializer.Serialize(writer, DisableMetricsCollection); - } - foreach (var item in AdditionalProperties) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.Value.ToString()).RootElement); -#endif - } - writer.WriteEndObject(); - } - - internal static AzureBlobStorageReadSettings DeserializeAzureBlobStorageReadSettings(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - Optional> recursive = default; - Optional> wildcardFolderPath = default; - Optional> wildcardFileName = default; - Optional> prefix = default; - Optional> fileListPath = default; - Optional> enablePartitionDiscovery = default; - Optional> partitionRootPath = default; - Optional> deleteFilesAfterCompletion = default; - Optional> modifiedDatetimeStart = default; - Optional> modifiedDatetimeEnd = default; - string type = default; - Optional> maxConcurrentConnections = default; - Optional> disableMetricsCollection = default; - IDictionary> additionalProperties = default; - Dictionary> additionalPropertiesDictionary = new Dictionary>(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("recursive"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - recursive = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("wildcardFolderPath"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - wildcardFolderPath = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("wildcardFileName"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - wildcardFileName = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("prefix"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - prefix = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("fileListPath"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - fileListPath = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("enablePartitionDiscovery"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - enablePartitionDiscovery = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("partitionRootPath"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - partitionRootPath = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("deleteFilesAfterCompletion"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - deleteFilesAfterCompletion = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("modifiedDatetimeStart"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - modifiedDatetimeStart = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("modifiedDatetimeEnd"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - modifiedDatetimeEnd = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("type"u8)) - { - type = property.Value.GetString(); - continue; - } - if (property.NameEquals("maxConcurrentConnections"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - maxConcurrentConnections = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("disableMetricsCollection"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - disableMetricsCollection = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - additionalPropertiesDictionary.Add(property.Name, JsonSerializer.Deserialize>(property.Value.GetRawText())); - } - additionalProperties = additionalPropertiesDictionary; - return new AzureBlobStorageReadSettings(type, maxConcurrentConnections.Value, disableMetricsCollection.Value, additionalProperties, recursive.Value, wildcardFolderPath.Value, wildcardFileName.Value, prefix.Value, fileListPath.Value, enablePartitionDiscovery.Value, partitionRootPath.Value, deleteFilesAfterCompletion.Value, modifiedDatetimeStart.Value, modifiedDatetimeEnd.Value); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/AzureBlobStorageReadSettings.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/AzureBlobStorageReadSettings.cs deleted file mode 100644 index c107bce7..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/AzureBlobStorageReadSettings.cs +++ /dev/null @@ -1,69 +0,0 @@ -// - -#nullable disable - -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// Azure blob read settings. - public partial class AzureBlobStorageReadSettings : StoreReadSettings - { - /// Initializes a new instance of AzureBlobStorageReadSettings. - public AzureBlobStorageReadSettings() - { - StoreReadSettingsType = "AzureBlobStorageReadSettings"; - } - - /// Initializes a new instance of AzureBlobStorageReadSettings. - /// The read setting type. - /// The maximum concurrent connection count for the source data store. Type: integer (or Expression with resultType integer). - /// If true, disable data store metrics collection. Default is false. Type: boolean (or Expression with resultType boolean). - /// Additional Properties. - /// If true, files under the folder path will be read recursively. Default is true. Type: boolean (or Expression with resultType boolean). - /// Azure blob wildcardFolderPath. Type: string (or Expression with resultType string). - /// Azure blob wildcardFileName. Type: string (or Expression with resultType string). - /// The prefix filter for the Azure Blob name. Type: string (or Expression with resultType string). - /// Point to a text file that lists each file (relative path to the path configured in the dataset) that you want to copy. Type: string (or Expression with resultType string). - /// Indicates whether to enable partition discovery. Type: boolean (or Expression with resultType boolean). - /// Specify the root path where partition discovery starts from. Type: string (or Expression with resultType string). - /// Indicates whether the source files need to be deleted after copy completion. Default is false. Type: boolean (or Expression with resultType boolean). - /// The start of file's modified datetime. Type: string (or Expression with resultType string). - /// The end of file's modified datetime. Type: string (or Expression with resultType string). - internal AzureBlobStorageReadSettings(string storeReadSettingsType, DataFactoryElement maxConcurrentConnections, DataFactoryElement disableMetricsCollection, IDictionary> additionalProperties, DataFactoryElement recursive, DataFactoryElement wildcardFolderPath, DataFactoryElement wildcardFileName, DataFactoryElement prefix, DataFactoryElement fileListPath, DataFactoryElement enablePartitionDiscovery, DataFactoryElement partitionRootPath, DataFactoryElement deleteFilesAfterCompletion, DataFactoryElement modifiedDatetimeStart, DataFactoryElement modifiedDatetimeEnd) : base(storeReadSettingsType, maxConcurrentConnections, disableMetricsCollection, additionalProperties) - { - Recursive = recursive; - WildcardFolderPath = wildcardFolderPath; - WildcardFileName = wildcardFileName; - Prefix = prefix; - FileListPath = fileListPath; - EnablePartitionDiscovery = enablePartitionDiscovery; - PartitionRootPath = partitionRootPath; - DeleteFilesAfterCompletion = deleteFilesAfterCompletion; - ModifiedDatetimeStart = modifiedDatetimeStart; - ModifiedDatetimeEnd = modifiedDatetimeEnd; - StoreReadSettingsType = storeReadSettingsType ?? "AzureBlobStorageReadSettings"; - } - - /// If true, files under the folder path will be read recursively. Default is true. Type: boolean (or Expression with resultType boolean). - public DataFactoryElement Recursive { get; set; } - /// Azure blob wildcardFolderPath. Type: string (or Expression with resultType string). - public DataFactoryElement WildcardFolderPath { get; set; } - /// Azure blob wildcardFileName. Type: string (or Expression with resultType string). - public DataFactoryElement WildcardFileName { get; set; } - /// The prefix filter for the Azure Blob name. Type: string (or Expression with resultType string). - public DataFactoryElement Prefix { get; set; } - /// Point to a text file that lists each file (relative path to the path configured in the dataset) that you want to copy. Type: string (or Expression with resultType string). - public DataFactoryElement FileListPath { get; set; } - /// Indicates whether to enable partition discovery. Type: boolean (or Expression with resultType boolean). - public DataFactoryElement EnablePartitionDiscovery { get; set; } - /// Specify the root path where partition discovery starts from. Type: string (or Expression with resultType string). - public DataFactoryElement PartitionRootPath { get; set; } - /// Indicates whether the source files need to be deleted after copy completion. Default is false. Type: boolean (or Expression with resultType boolean). - public DataFactoryElement DeleteFilesAfterCompletion { get; set; } - /// The start of file's modified datetime. Type: string (or Expression with resultType string). - public DataFactoryElement ModifiedDatetimeStart { get; set; } - /// The end of file's modified datetime. Type: string (or Expression with resultType string). - public DataFactoryElement ModifiedDatetimeEnd { get; set; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/AzureBlobStorageWriteSettings.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/AzureBlobStorageWriteSettings.Serialization.cs deleted file mode 100644 index ce2e9a27..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/AzureBlobStorageWriteSettings.Serialization.cs +++ /dev/null @@ -1,116 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class AzureBlobStorageWriteSettings : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - if (Optional.IsDefined(BlockSizeInMB)) - { - writer.WritePropertyName("blockSizeInMB"u8); - JsonSerializer.Serialize(writer, BlockSizeInMB); - } - writer.WritePropertyName("type"u8); - writer.WriteStringValue(StoreWriteSettingsType); - if (Optional.IsDefined(MaxConcurrentConnections)) - { - writer.WritePropertyName("maxConcurrentConnections"u8); - JsonSerializer.Serialize(writer, MaxConcurrentConnections); - } - if (Optional.IsDefined(DisableMetricsCollection)) - { - writer.WritePropertyName("disableMetricsCollection"u8); - JsonSerializer.Serialize(writer, DisableMetricsCollection); - } - if (Optional.IsDefined(CopyBehavior)) - { - writer.WritePropertyName("copyBehavior"u8); -#if NET6_0_OR_GREATER - writer.WriteRawValue(CopyBehavior); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(CopyBehavior.ToString()).RootElement); -#endif - } - foreach (var item in AdditionalProperties) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.Value.ToString()).RootElement); -#endif - } - writer.WriteEndObject(); - } - - internal static AzureBlobStorageWriteSettings DeserializeAzureBlobStorageWriteSettings(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - Optional> blockSizeInMB = default; - string type = default; - Optional> maxConcurrentConnections = default; - Optional> disableMetricsCollection = default; - Optional copyBehavior = default; - IDictionary> additionalProperties = default; - Dictionary> additionalPropertiesDictionary = new Dictionary>(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("blockSizeInMB"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - blockSizeInMB = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("type"u8)) - { - type = property.Value.GetString(); - continue; - } - if (property.NameEquals("maxConcurrentConnections"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - maxConcurrentConnections = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("disableMetricsCollection"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - disableMetricsCollection = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("copyBehavior"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - copyBehavior = BinaryData.FromString(property.Value.GetRawText()); - continue; - } - additionalPropertiesDictionary.Add(property.Name, JsonSerializer.Deserialize>(property.Value.GetRawText())); - } - additionalProperties = additionalPropertiesDictionary; - return new AzureBlobStorageWriteSettings(type, maxConcurrentConnections.Value, disableMetricsCollection.Value, copyBehavior.Value, additionalProperties, blockSizeInMB.Value); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/AzureBlobStorageWriteSettings.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/AzureBlobStorageWriteSettings.cs deleted file mode 100644 index caa20360..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/AzureBlobStorageWriteSettings.cs +++ /dev/null @@ -1,34 +0,0 @@ -// - -#nullable disable - -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// Azure blob write settings. - public partial class AzureBlobStorageWriteSettings : StoreWriteSettings - { - /// Initializes a new instance of AzureBlobStorageWriteSettings. - public AzureBlobStorageWriteSettings() - { - StoreWriteSettingsType = "AzureBlobStorageWriteSettings"; - } - - /// Initializes a new instance of AzureBlobStorageWriteSettings. - /// The write setting type. - /// The maximum concurrent connection count for the source data store. Type: integer (or Expression with resultType integer). - /// If true, disable data store metrics collection. Default is false. Type: boolean (or Expression with resultType boolean). - /// The type of copy behavior for copy sink. - /// Additional Properties. - /// Indicates the block size(MB) when writing data to blob. Type: integer (or Expression with resultType integer). - internal AzureBlobStorageWriteSettings(string storeWriteSettingsType, DataFactoryElement maxConcurrentConnections, DataFactoryElement disableMetricsCollection, BinaryData copyBehavior, IDictionary> additionalProperties, DataFactoryElement blockSizeInMB) : base(storeWriteSettingsType, maxConcurrentConnections, disableMetricsCollection, copyBehavior, additionalProperties) - { - BlockSizeInMB = blockSizeInMB; - StoreWriteSettingsType = storeWriteSettingsType ?? "AzureBlobStorageWriteSettings"; - } - - /// Indicates the block size(MB) when writing data to blob. Type: integer (or Expression with resultType integer). - public DataFactoryElement BlockSizeInMB { get; set; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/AzureDataExplorerCommandActivity.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/AzureDataExplorerCommandActivity.Serialization.cs deleted file mode 100644 index 6f5c888f..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/AzureDataExplorerCommandActivity.Serialization.cs +++ /dev/null @@ -1,219 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class AzureDataExplorerCommandActivity : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - if (Optional.IsDefined(LinkedServiceName)) - { - writer.WritePropertyName("linkedServiceName"u8); - JsonSerializer.Serialize(writer, LinkedServiceName); - } - if (Optional.IsDefined(Policy)) - { - writer.WritePropertyName("policy"u8); - writer.WriteObjectValue(Policy); - } - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ActivityType); - if (Optional.IsDefined(Description)) - { - writer.WritePropertyName("description"u8); - writer.WriteStringValue(Description); - } - if (Optional.IsDefined(State)) - { - writer.WritePropertyName("state"u8); - writer.WriteStringValue(State.Value.ToString()); - } - if (Optional.IsDefined(OnInactiveMarkAs)) - { - writer.WritePropertyName("onInactiveMarkAs"u8); - writer.WriteStringValue(OnInactiveMarkAs.Value.ToString()); - } - if (Optional.IsCollectionDefined(DependsOn)) - { - writer.WritePropertyName("dependsOn"u8); - writer.WriteStartArray(); - foreach (var item in DependsOn) - { - writer.WriteObjectValue(item); - } - writer.WriteEndArray(); - } - if (Optional.IsCollectionDefined(UserProperties)) - { - writer.WritePropertyName("userProperties"u8); - writer.WriteStartArray(); - foreach (var item in UserProperties) - { - writer.WriteObjectValue(item); - } - writer.WriteEndArray(); - } - writer.WritePropertyName("typeProperties"u8); - writer.WriteStartObject(); - writer.WritePropertyName("command"u8); - JsonSerializer.Serialize(writer, Command); - if (Optional.IsDefined(CommandTimeout)) - { - writer.WritePropertyName("commandTimeout"u8); - JsonSerializer.Serialize(writer, CommandTimeout); - } - writer.WriteEndObject(); - foreach (var item in AdditionalProperties) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.Value.ToString()).RootElement); -#endif - } - writer.WriteEndObject(); - } - - internal static AzureDataExplorerCommandActivity DeserializeAzureDataExplorerCommandActivity(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - Optional linkedServiceName = default; - Optional policy = default; - string name = default; - string type = default; - Optional description = default; - Optional state = default; - Optional onInactiveMarkAs = default; - Optional> dependsOn = default; - Optional> userProperties = default; - DataFactoryElement command = default; - Optional> commandTimeout = default; - IDictionary> additionalProperties = default; - Dictionary> additionalPropertiesDictionary = new Dictionary>(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("linkedServiceName"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - linkedServiceName = JsonSerializer.Deserialize(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("policy"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - policy = PipelineActivityPolicy.DeserializePipelineActivityPolicy(property.Value); - continue; - } - if (property.NameEquals("name"u8)) - { - name = property.Value.GetString(); - continue; - } - if (property.NameEquals("type"u8)) - { - type = property.Value.GetString(); - continue; - } - if (property.NameEquals("description"u8)) - { - description = property.Value.GetString(); - continue; - } - if (property.NameEquals("state"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - state = new PipelineActivityState(property.Value.GetString()); - continue; - } - if (property.NameEquals("onInactiveMarkAs"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - onInactiveMarkAs = new ActivityOnInactiveMarkAs(property.Value.GetString()); - continue; - } - if (property.NameEquals("dependsOn"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - array.Add(PipelineActivityDependency.DeserializePipelineActivityDependency(item)); - } - dependsOn = array; - continue; - } - if (property.NameEquals("userProperties"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - array.Add(PipelineActivityUserProperty.DeserializePipelineActivityUserProperty(item)); - } - userProperties = array; - continue; - } - if (property.NameEquals("typeProperties"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - foreach (var property0 in property.Value.EnumerateObject()) - { - if (property0.NameEquals("command"u8)) - { - command = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("commandTimeout"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - commandTimeout = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - } - continue; - } - additionalPropertiesDictionary.Add(property.Name, JsonSerializer.Deserialize>(property.Value.GetRawText())); - } - additionalProperties = additionalPropertiesDictionary; - return new AzureDataExplorerCommandActivity(name, type, description.Value, Optional.ToNullable(state), Optional.ToNullable(onInactiveMarkAs), Optional.ToList(dependsOn), Optional.ToList(userProperties), additionalProperties, linkedServiceName, policy.Value, command, commandTimeout.Value); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/AzureDataExplorerCommandActivity.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/AzureDataExplorerCommandActivity.cs deleted file mode 100644 index 207b94a7..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/AzureDataExplorerCommandActivity.cs +++ /dev/null @@ -1,51 +0,0 @@ -// - -#nullable disable - -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// Azure Data Explorer command activity. - public partial class AzureDataExplorerCommandActivity : ExecutionActivity - { - /// Initializes a new instance of AzureDataExplorerCommandActivity. - /// Activity name. - /// A control command, according to the Azure Data Explorer command syntax. Type: string (or Expression with resultType string). - /// or is null. - public AzureDataExplorerCommandActivity(string name, DataFactoryElement command) : base(name) - { - Argument.AssertNotNull(name, nameof(name)); - Argument.AssertNotNull(command, nameof(command)); - - Command = command; - ActivityType = "AzureDataExplorerCommand"; - } - - /// Initializes a new instance of AzureDataExplorerCommandActivity. - /// Activity name. - /// Type of activity. - /// Activity description. - /// Activity state. This is an optional property and if not provided, the state will be Active by default. - /// 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. - /// Activity depends on condition. - /// Activity user properties. - /// Additional Properties. - /// Linked service reference. - /// Activity policy. - /// A control command, according to the Azure Data Explorer command syntax. Type: string (or Expression with resultType string). - /// Control command timeout. Type: string (or Expression with resultType string), pattern: ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9]))..). - internal AzureDataExplorerCommandActivity(string name, string activityType, string description, PipelineActivityState? state, ActivityOnInactiveMarkAs? onInactiveMarkAs, IList dependsOn, IList userProperties, IDictionary> additionalProperties, DataFactoryLinkedServiceReference linkedServiceName, PipelineActivityPolicy policy, DataFactoryElement command, DataFactoryElement commandTimeout) : base(name, activityType, description, state, onInactiveMarkAs, dependsOn, userProperties, additionalProperties, linkedServiceName, policy) - { - Command = command; - CommandTimeout = commandTimeout; - ActivityType = activityType ?? "AzureDataExplorerCommand"; - } - - /// A control command, according to the Azure Data Explorer command syntax. Type: string (or Expression with resultType string). - public DataFactoryElement Command { get; set; } - /// Control command timeout. Type: string (or Expression with resultType string), pattern: ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9]))..). - public DataFactoryElement CommandTimeout { get; set; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/AzureDataExplorerLinkedService.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/AzureDataExplorerLinkedService.Serialization.cs deleted file mode 100644 index 960757ea..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/AzureDataExplorerLinkedService.Serialization.cs +++ /dev/null @@ -1,236 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class AzureDataExplorerLinkedService : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - writer.WritePropertyName("type"u8); - writer.WriteStringValue(LinkedServiceType); - if (Optional.IsDefined(ConnectVia)) - { - writer.WritePropertyName("connectVia"u8); - writer.WriteObjectValue(ConnectVia); - } - if (Optional.IsDefined(Description)) - { - writer.WritePropertyName("description"u8); - writer.WriteStringValue(Description); - } - if (Optional.IsCollectionDefined(Parameters)) - { - writer.WritePropertyName("parameters"u8); - writer.WriteStartObject(); - foreach (var item in Parameters) - { - writer.WritePropertyName(item.Key); - writer.WriteObjectValue(item.Value); - } - writer.WriteEndObject(); - } - if (Optional.IsCollectionDefined(Annotations)) - { - writer.WritePropertyName("annotations"u8); - writer.WriteStartArray(); - foreach (var item in Annotations) - { - if (item == null) - { - writer.WriteNullValue(); - continue; - } -#if NET6_0_OR_GREATER - writer.WriteRawValue(item); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.ToString()).RootElement); -#endif - } - writer.WriteEndArray(); - } - writer.WritePropertyName("typeProperties"u8); - writer.WriteStartObject(); - writer.WritePropertyName("endpoint"u8); - JsonSerializer.Serialize(writer, Endpoint); - if (Optional.IsDefined(ServicePrincipalId)) - { - writer.WritePropertyName("servicePrincipalId"u8); - JsonSerializer.Serialize(writer, ServicePrincipalId); - } - if (Optional.IsDefined(ServicePrincipalKey)) - { - writer.WritePropertyName("servicePrincipalKey"u8); - JsonSerializer.Serialize(writer, ServicePrincipalKey); - } - writer.WritePropertyName("database"u8); - JsonSerializer.Serialize(writer, Database); - if (Optional.IsDefined(Tenant)) - { - writer.WritePropertyName("tenant"u8); - JsonSerializer.Serialize(writer, Tenant); - } - if (Optional.IsDefined(Credential)) - { - writer.WritePropertyName("credential"u8); - writer.WriteObjectValue(Credential); - } - writer.WriteEndObject(); - foreach (var item in AdditionalProperties) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.Value.ToString()).RootElement); -#endif - } - writer.WriteEndObject(); - } - - internal static AzureDataExplorerLinkedService DeserializeAzureDataExplorerLinkedService(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - string type = default; - Optional connectVia = default; - Optional description = default; - Optional> parameters = default; - Optional> annotations = default; - DataFactoryElement endpoint = default; - Optional> servicePrincipalId = default; - Optional servicePrincipalKey = default; - DataFactoryElement database = default; - Optional> tenant = default; - Optional credential = default; - IDictionary> additionalProperties = default; - Dictionary> additionalPropertiesDictionary = new Dictionary>(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("type"u8)) - { - type = property.Value.GetString(); - continue; - } - if (property.NameEquals("connectVia"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - connectVia = IntegrationRuntimeReference.DeserializeIntegrationRuntimeReference(property.Value); - continue; - } - if (property.NameEquals("description"u8)) - { - description = property.Value.GetString(); - continue; - } - if (property.NameEquals("parameters"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - Dictionary dictionary = new Dictionary(); - foreach (var property0 in property.Value.EnumerateObject()) - { - dictionary.Add(property0.Name, EntityParameterSpecification.DeserializeEntityParameterSpecification(property0.Value)); - } - parameters = dictionary; - continue; - } - if (property.NameEquals("annotations"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - if (item.ValueKind == JsonValueKind.Null) - { - array.Add(null); - } - else - { - array.Add(BinaryData.FromString(item.GetRawText())); - } - } - annotations = array; - continue; - } - if (property.NameEquals("typeProperties"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - foreach (var property0 in property.Value.EnumerateObject()) - { - if (property0.NameEquals("endpoint"u8)) - { - endpoint = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("servicePrincipalId"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - servicePrincipalId = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("servicePrincipalKey"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - servicePrincipalKey = JsonSerializer.Deserialize(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("database"u8)) - { - database = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("tenant"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - tenant = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("credential"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - credential = DataFactoryCredentialReference.DeserializeDataFactoryCredentialReference(property0.Value); - continue; - } - } - continue; - } - additionalPropertiesDictionary.Add(property.Name, JsonSerializer.Deserialize>(property.Value.GetRawText())); - } - additionalProperties = additionalPropertiesDictionary; - return new AzureDataExplorerLinkedService(type, connectVia.Value, description.Value, Optional.ToDictionary(parameters), Optional.ToList(annotations), additionalProperties, endpoint, servicePrincipalId.Value, servicePrincipalKey, database, tenant.Value, credential.Value); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/AzureDataExplorerLinkedService.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/AzureDataExplorerLinkedService.cs deleted file mode 100644 index 32937da1..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/AzureDataExplorerLinkedService.cs +++ /dev/null @@ -1,64 +0,0 @@ -// - -#nullable disable - -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// Azure Data Explorer (Kusto) linked service. - public partial class AzureDataExplorerLinkedService : DataFactoryLinkedServiceProperties - { - /// Initializes a new instance of AzureDataExplorerLinkedService. - /// The endpoint of Azure Data Explorer (the engine's endpoint). URL will be in the format https://<clusterName>.<regionName>.kusto.windows.net. Type: string (or Expression with resultType string). - /// Database name for connection. Type: string (or Expression with resultType string). - /// or is null. - public AzureDataExplorerLinkedService(DataFactoryElement endpoint, DataFactoryElement database) - { - Argument.AssertNotNull(endpoint, nameof(endpoint)); - Argument.AssertNotNull(database, nameof(database)); - - Endpoint = endpoint; - Database = database; - LinkedServiceType = "AzureDataExplorer"; - } - - /// Initializes a new instance of AzureDataExplorerLinkedService. - /// Type of linked service. - /// The integration runtime reference. - /// Linked service description. - /// Parameters for linked service. - /// List of tags that can be used for describing the linked service. - /// Additional Properties. - /// The endpoint of Azure Data Explorer (the engine's endpoint). URL will be in the format https://<clusterName>.<regionName>.kusto.windows.net. Type: string (or Expression with resultType string). - /// The ID of the service principal used to authenticate against Azure Data Explorer. Type: string (or Expression with resultType string). - /// The key of the service principal used to authenticate against Kusto. - /// Database name for connection. Type: string (or Expression with resultType string). - /// The name or ID of the tenant to which the service principal belongs. Type: string (or Expression with resultType string). - /// The credential reference containing authentication information. - internal AzureDataExplorerLinkedService(string linkedServiceType, IntegrationRuntimeReference connectVia, string description, IDictionary parameters, IList annotations, IDictionary> additionalProperties, DataFactoryElement endpoint, DataFactoryElement servicePrincipalId, DataFactorySecretBaseDefinition servicePrincipalKey, DataFactoryElement database, DataFactoryElement tenant, DataFactoryCredentialReference credential) : base(linkedServiceType, connectVia, description, parameters, annotations, additionalProperties) - { - Endpoint = endpoint; - ServicePrincipalId = servicePrincipalId; - ServicePrincipalKey = servicePrincipalKey; - Database = database; - Tenant = tenant; - Credential = credential; - LinkedServiceType = linkedServiceType ?? "AzureDataExplorer"; - } - - /// The endpoint of Azure Data Explorer (the engine's endpoint). URL will be in the format https://<clusterName>.<regionName>.kusto.windows.net. Type: string (or Expression with resultType string). - public DataFactoryElement Endpoint { get; set; } - /// The ID of the service principal used to authenticate against Azure Data Explorer. Type: string (or Expression with resultType string). - public DataFactoryElement ServicePrincipalId { get; set; } - /// The key of the service principal used to authenticate against Kusto. - public DataFactorySecretBaseDefinition ServicePrincipalKey { get; set; } - /// Database name for connection. Type: string (or Expression with resultType string). - public DataFactoryElement Database { get; set; } - /// The name or ID of the tenant to which the service principal belongs. Type: string (or Expression with resultType string). - public DataFactoryElement Tenant { get; set; } - /// The credential reference containing authentication information. - public DataFactoryCredentialReference Credential { get; set; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/AzureDataExplorerSink.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/AzureDataExplorerSink.Serialization.cs deleted file mode 100644 index 53fb0e7c..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/AzureDataExplorerSink.Serialization.cs +++ /dev/null @@ -1,187 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class AzureDataExplorerSink : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - if (Optional.IsDefined(IngestionMappingName)) - { - writer.WritePropertyName("ingestionMappingName"u8); - JsonSerializer.Serialize(writer, IngestionMappingName); - } - if (Optional.IsDefined(IngestionMappingAsJson)) - { - writer.WritePropertyName("ingestionMappingAsJson"u8); - JsonSerializer.Serialize(writer, IngestionMappingAsJson); - } - if (Optional.IsDefined(FlushImmediately)) - { - writer.WritePropertyName("flushImmediately"u8); - JsonSerializer.Serialize(writer, FlushImmediately); - } - writer.WritePropertyName("type"u8); - writer.WriteStringValue(CopySinkType); - if (Optional.IsDefined(WriteBatchSize)) - { - writer.WritePropertyName("writeBatchSize"u8); - JsonSerializer.Serialize(writer, WriteBatchSize); - } - if (Optional.IsDefined(WriteBatchTimeout)) - { - writer.WritePropertyName("writeBatchTimeout"u8); - JsonSerializer.Serialize(writer, WriteBatchTimeout); - } - if (Optional.IsDefined(SinkRetryCount)) - { - writer.WritePropertyName("sinkRetryCount"u8); - JsonSerializer.Serialize(writer, SinkRetryCount); - } - if (Optional.IsDefined(SinkRetryWait)) - { - writer.WritePropertyName("sinkRetryWait"u8); - JsonSerializer.Serialize(writer, SinkRetryWait); - } - if (Optional.IsDefined(MaxConcurrentConnections)) - { - writer.WritePropertyName("maxConcurrentConnections"u8); - JsonSerializer.Serialize(writer, MaxConcurrentConnections); - } - if (Optional.IsDefined(DisableMetricsCollection)) - { - writer.WritePropertyName("disableMetricsCollection"u8); - JsonSerializer.Serialize(writer, DisableMetricsCollection); - } - foreach (var item in AdditionalProperties) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.Value.ToString()).RootElement); -#endif - } - writer.WriteEndObject(); - } - - internal static AzureDataExplorerSink DeserializeAzureDataExplorerSink(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - Optional> ingestionMappingName = default; - Optional> ingestionMappingAsJson = default; - Optional> flushImmediately = default; - string type = default; - Optional> writeBatchSize = default; - Optional> writeBatchTimeout = default; - Optional> sinkRetryCount = default; - Optional> sinkRetryWait = default; - Optional> maxConcurrentConnections = default; - Optional> disableMetricsCollection = default; - IDictionary> additionalProperties = default; - Dictionary> additionalPropertiesDictionary = new Dictionary>(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("ingestionMappingName"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - ingestionMappingName = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("ingestionMappingAsJson"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - ingestionMappingAsJson = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("flushImmediately"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - flushImmediately = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("type"u8)) - { - type = property.Value.GetString(); - continue; - } - if (property.NameEquals("writeBatchSize"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - writeBatchSize = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("writeBatchTimeout"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - writeBatchTimeout = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("sinkRetryCount"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - sinkRetryCount = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("sinkRetryWait"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - sinkRetryWait = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("maxConcurrentConnections"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - maxConcurrentConnections = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("disableMetricsCollection"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - disableMetricsCollection = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - additionalPropertiesDictionary.Add(property.Name, JsonSerializer.Deserialize>(property.Value.GetRawText())); - } - additionalProperties = additionalPropertiesDictionary; - return new AzureDataExplorerSink(type, writeBatchSize.Value, writeBatchTimeout.Value, sinkRetryCount.Value, sinkRetryWait.Value, maxConcurrentConnections.Value, disableMetricsCollection.Value, additionalProperties, ingestionMappingName.Value, ingestionMappingAsJson.Value, flushImmediately.Value); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/AzureDataExplorerSink.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/AzureDataExplorerSink.cs deleted file mode 100644 index 7898652e..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/AzureDataExplorerSink.cs +++ /dev/null @@ -1,45 +0,0 @@ -// - -#nullable disable - -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// A copy activity Azure Data Explorer sink. - public partial class AzureDataExplorerSink : CopySink - { - /// Initializes a new instance of AzureDataExplorerSink. - public AzureDataExplorerSink() - { - CopySinkType = "AzureDataExplorerSink"; - } - - /// Initializes a new instance of AzureDataExplorerSink. - /// Copy sink type. - /// Write batch size. Type: integer (or Expression with resultType integer), minimum: 0. - /// Write batch timeout. Type: string (or Expression with resultType string), pattern: ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). - /// Sink retry count. Type: integer (or Expression with resultType integer). - /// Sink retry wait. Type: string (or Expression with resultType string), pattern: ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). - /// The maximum concurrent connection count for the sink data store. Type: integer (or Expression with resultType integer). - /// If true, disable data store metrics collection. Default is false. Type: boolean (or Expression with resultType boolean). - /// Additional Properties. - /// A name of a pre-created csv mapping that was defined on the target Kusto table. Type: string. - /// An explicit column mapping description provided in a json format. Type: string. - /// If set to true, any aggregation will be skipped. Default is false. Type: boolean. - internal AzureDataExplorerSink(string copySinkType, DataFactoryElement writeBatchSize, DataFactoryElement writeBatchTimeout, DataFactoryElement sinkRetryCount, DataFactoryElement sinkRetryWait, DataFactoryElement maxConcurrentConnections, DataFactoryElement disableMetricsCollection, IDictionary> additionalProperties, DataFactoryElement ingestionMappingName, DataFactoryElement ingestionMappingAsJson, DataFactoryElement flushImmediately) : base(copySinkType, writeBatchSize, writeBatchTimeout, sinkRetryCount, sinkRetryWait, maxConcurrentConnections, disableMetricsCollection, additionalProperties) - { - IngestionMappingName = ingestionMappingName; - IngestionMappingAsJson = ingestionMappingAsJson; - FlushImmediately = flushImmediately; - CopySinkType = copySinkType ?? "AzureDataExplorerSink"; - } - - /// A name of a pre-created csv mapping that was defined on the target Kusto table. Type: string. - public DataFactoryElement IngestionMappingName { get; set; } - /// An explicit column mapping description provided in a json format. Type: string. - public DataFactoryElement IngestionMappingAsJson { get; set; } - /// If set to true, any aggregation will be skipped. Default is false. Type: boolean. - public DataFactoryElement FlushImmediately { get; set; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/AzureDataExplorerSource.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/AzureDataExplorerSource.Serialization.cs deleted file mode 100644 index fe8fa65c..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/AzureDataExplorerSource.Serialization.cs +++ /dev/null @@ -1,173 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class AzureDataExplorerSource : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - writer.WritePropertyName("query"u8); - JsonSerializer.Serialize(writer, Query); - if (Optional.IsDefined(NoTruncation)) - { - writer.WritePropertyName("noTruncation"u8); -#if NET6_0_OR_GREATER - writer.WriteRawValue(NoTruncation); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(NoTruncation.ToString()).RootElement); -#endif - } - if (Optional.IsDefined(QueryTimeout)) - { - writer.WritePropertyName("queryTimeout"u8); - JsonSerializer.Serialize(writer, QueryTimeout); - } - if (Optional.IsDefined(AdditionalColumns)) - { - writer.WritePropertyName("additionalColumns"u8); -#if NET6_0_OR_GREATER - writer.WriteRawValue(AdditionalColumns); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(AdditionalColumns.ToString()).RootElement); -#endif - } - writer.WritePropertyName("type"u8); - writer.WriteStringValue(CopySourceType); - if (Optional.IsDefined(SourceRetryCount)) - { - writer.WritePropertyName("sourceRetryCount"u8); - JsonSerializer.Serialize(writer, SourceRetryCount); - } - if (Optional.IsDefined(SourceRetryWait)) - { - writer.WritePropertyName("sourceRetryWait"u8); - JsonSerializer.Serialize(writer, SourceRetryWait); - } - if (Optional.IsDefined(MaxConcurrentConnections)) - { - writer.WritePropertyName("maxConcurrentConnections"u8); - JsonSerializer.Serialize(writer, MaxConcurrentConnections); - } - if (Optional.IsDefined(DisableMetricsCollection)) - { - writer.WritePropertyName("disableMetricsCollection"u8); - JsonSerializer.Serialize(writer, DisableMetricsCollection); - } - foreach (var item in AdditionalProperties) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.Value.ToString()).RootElement); -#endif - } - writer.WriteEndObject(); - } - - internal static AzureDataExplorerSource DeserializeAzureDataExplorerSource(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - DataFactoryElement query = default; - Optional noTruncation = default; - Optional> queryTimeout = default; - Optional additionalColumns = default; - string type = default; - Optional> sourceRetryCount = default; - Optional> sourceRetryWait = default; - Optional> maxConcurrentConnections = default; - Optional> disableMetricsCollection = default; - IDictionary> additionalProperties = default; - Dictionary> additionalPropertiesDictionary = new Dictionary>(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("query"u8)) - { - query = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("noTruncation"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - noTruncation = BinaryData.FromString(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("queryTimeout"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - queryTimeout = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("additionalColumns"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - additionalColumns = BinaryData.FromString(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("type"u8)) - { - type = property.Value.GetString(); - continue; - } - if (property.NameEquals("sourceRetryCount"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - sourceRetryCount = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("sourceRetryWait"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - sourceRetryWait = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("maxConcurrentConnections"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - maxConcurrentConnections = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("disableMetricsCollection"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - disableMetricsCollection = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - additionalPropertiesDictionary.Add(property.Name, JsonSerializer.Deserialize>(property.Value.GetRawText())); - } - additionalProperties = additionalPropertiesDictionary; - return new AzureDataExplorerSource(type, sourceRetryCount.Value, sourceRetryWait.Value, maxConcurrentConnections.Value, disableMetricsCollection.Value, additionalProperties, query, noTruncation.Value, queryTimeout.Value, additionalColumns.Value); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/AzureDataExplorerSource.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/AzureDataExplorerSource.cs deleted file mode 100644 index 4685ab3b..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/AzureDataExplorerSource.cs +++ /dev/null @@ -1,111 +0,0 @@ -// - -#nullable disable - -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// A copy activity Azure Data Explorer (Kusto) source. - public partial class AzureDataExplorerSource : CopyActivitySource - { - /// Initializes a new instance of AzureDataExplorerSource. - /// Database query. Should be a Kusto Query Language (KQL) query. Type: string (or Expression with resultType string). - /// is null. - public AzureDataExplorerSource(DataFactoryElement query) - { - Argument.AssertNotNull(query, nameof(query)); - - Query = query; - CopySourceType = "AzureDataExplorerSource"; - } - - /// Initializes a new instance of AzureDataExplorerSource. - /// Copy source type. - /// Source retry count. Type: integer (or Expression with resultType integer). - /// Source retry wait. Type: string (or Expression with resultType string), pattern: ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). - /// The maximum concurrent connection count for the source data store. Type: integer (or Expression with resultType integer). - /// If true, disable data store metrics collection. Default is false. Type: boolean (or Expression with resultType boolean). - /// Additional Properties. - /// Database query. Should be a Kusto Query Language (KQL) query. Type: string (or Expression with resultType string). - /// The name of the Boolean option that controls whether truncation is applied to result-sets that go beyond a certain row-count limit. - /// 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). - internal AzureDataExplorerSource(string copySourceType, DataFactoryElement sourceRetryCount, DataFactoryElement sourceRetryWait, DataFactoryElement maxConcurrentConnections, DataFactoryElement disableMetricsCollection, IDictionary> additionalProperties, DataFactoryElement query, BinaryData noTruncation, DataFactoryElement queryTimeout, BinaryData additionalColumns) : base(copySourceType, sourceRetryCount, sourceRetryWait, maxConcurrentConnections, disableMetricsCollection, additionalProperties) - { - Query = query; - NoTruncation = noTruncation; - QueryTimeout = queryTimeout; - AdditionalColumns = additionalColumns; - CopySourceType = copySourceType ?? "AzureDataExplorerSource"; - } - - /// Database query. Should be a Kusto Query Language (KQL) query. Type: string (or Expression with resultType string). - public DataFactoryElement Query { get; set; } - /// - /// The name of the Boolean option that controls whether truncation is applied to result-sets that go beyond a certain row-count limit. - /// - /// To assign an object to this property use . - /// - /// - /// To assign an already formated json string to this property use . - /// - /// - /// Examples: - /// - /// - /// BinaryData.FromObjectAsJson("foo") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromString("\"foo\"") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromObjectAsJson(new { key = "value" }) - /// Creates a payload of { "key": "value" }. - /// - /// - /// BinaryData.FromString("{\"key\": \"value\"}") - /// Creates a payload of { "key": "value" }. - /// - /// - /// - /// - public BinaryData NoTruncation { get; set; } - /// Query timeout. Type: string (or Expression with resultType string), pattern: ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])).. - public DataFactoryElement QueryTimeout { get; set; } - /// - /// Specifies the additional columns to be added to source data. Type: array of objects(AdditionalColumns) (or Expression with resultType array of objects). - /// - /// To assign an object to this property use . - /// - /// - /// To assign an already formated json string to this property use . - /// - /// - /// Examples: - /// - /// - /// BinaryData.FromObjectAsJson("foo") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromString("\"foo\"") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromObjectAsJson(new { key = "value" }) - /// Creates a payload of { "key": "value" }. - /// - /// - /// BinaryData.FromString("{\"key\": \"value\"}") - /// Creates a payload of { "key": "value" }. - /// - /// - /// - /// - public BinaryData AdditionalColumns { get; set; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/AzureDataExplorerTableDataset.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/AzureDataExplorerTableDataset.Serialization.cs deleted file mode 100644 index 62e6a089..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/AzureDataExplorerTableDataset.Serialization.cs +++ /dev/null @@ -1,212 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class AzureDataExplorerTableDataset : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - writer.WritePropertyName("type"u8); - writer.WriteStringValue(DatasetType); - if (Optional.IsDefined(Description)) - { - writer.WritePropertyName("description"u8); - writer.WriteStringValue(Description); - } - if (Optional.IsDefined(Structure)) - { - writer.WritePropertyName("structure"u8); - JsonSerializer.Serialize(writer, Structure); - } - if (Optional.IsDefined(Schema)) - { - writer.WritePropertyName("schema"u8); - JsonSerializer.Serialize(writer, Schema); - } - writer.WritePropertyName("linkedServiceName"u8); - JsonSerializer.Serialize(writer, LinkedServiceName); if (Optional.IsCollectionDefined(Parameters)) - { - writer.WritePropertyName("parameters"u8); - writer.WriteStartObject(); - foreach (var item in Parameters) - { - writer.WritePropertyName(item.Key); - writer.WriteObjectValue(item.Value); - } - writer.WriteEndObject(); - } - if (Optional.IsCollectionDefined(Annotations)) - { - writer.WritePropertyName("annotations"u8); - writer.WriteStartArray(); - foreach (var item in Annotations) - { - if (item == null) - { - writer.WriteNullValue(); - continue; - } -#if NET6_0_OR_GREATER - writer.WriteRawValue(item); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.ToString()).RootElement); -#endif - } - writer.WriteEndArray(); - } - if (Optional.IsDefined(Folder)) - { - writer.WritePropertyName("folder"u8); - writer.WriteObjectValue(Folder); - } - writer.WritePropertyName("typeProperties"u8); - writer.WriteStartObject(); - if (Optional.IsDefined(Table)) - { - writer.WritePropertyName("table"u8); - JsonSerializer.Serialize(writer, Table); - } - writer.WriteEndObject(); - foreach (var item in AdditionalProperties) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.Value.ToString()).RootElement); -#endif - } - writer.WriteEndObject(); - } - - internal static AzureDataExplorerTableDataset DeserializeAzureDataExplorerTableDataset(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - string type = default; - Optional description = default; - Optional>> structure = default; - Optional>> schema = default; - DataFactoryLinkedServiceReference linkedServiceName = default; - Optional> parameters = default; - Optional> annotations = default; - Optional folder = default; - Optional> table = default; - IDictionary> additionalProperties = default; - Dictionary> additionalPropertiesDictionary = new Dictionary>(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("type"u8)) - { - type = property.Value.GetString(); - continue; - } - if (property.NameEquals("description"u8)) - { - description = property.Value.GetString(); - continue; - } - if (property.NameEquals("structure"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - structure = JsonSerializer.Deserialize>>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("schema"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - schema = JsonSerializer.Deserialize>>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("linkedServiceName"u8)) - { - linkedServiceName = JsonSerializer.Deserialize(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("parameters"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - Dictionary dictionary = new Dictionary(); - foreach (var property0 in property.Value.EnumerateObject()) - { - dictionary.Add(property0.Name, EntityParameterSpecification.DeserializeEntityParameterSpecification(property0.Value)); - } - parameters = dictionary; - continue; - } - if (property.NameEquals("annotations"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - if (item.ValueKind == JsonValueKind.Null) - { - array.Add(null); - } - else - { - array.Add(BinaryData.FromString(item.GetRawText())); - } - } - annotations = array; - continue; - } - if (property.NameEquals("folder"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - folder = DatasetFolder.DeserializeDatasetFolder(property.Value); - continue; - } - if (property.NameEquals("typeProperties"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - foreach (var property0 in property.Value.EnumerateObject()) - { - if (property0.NameEquals("table"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - table = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - } - continue; - } - additionalPropertiesDictionary.Add(property.Name, JsonSerializer.Deserialize>(property.Value.GetRawText())); - } - additionalProperties = additionalPropertiesDictionary; - return new AzureDataExplorerTableDataset(type, description.Value, structure.Value, schema.Value, linkedServiceName, Optional.ToDictionary(parameters), Optional.ToList(annotations), folder.Value, additionalProperties, table.Value); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/AzureDataExplorerTableDataset.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/AzureDataExplorerTableDataset.cs deleted file mode 100644 index 7c60aa55..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/AzureDataExplorerTableDataset.cs +++ /dev/null @@ -1,43 +0,0 @@ -// - -#nullable disable - -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// The Azure Data Explorer (Kusto) dataset. - public partial class AzureDataExplorerTableDataset : DataFactoryDatasetProperties - { - /// Initializes a new instance of AzureDataExplorerTableDataset. - /// Linked service reference. - /// is null. - public AzureDataExplorerTableDataset(DataFactoryLinkedServiceReference linkedServiceName) : base(linkedServiceName) - { - Argument.AssertNotNull(linkedServiceName, nameof(linkedServiceName)); - - DatasetType = "AzureDataExplorerTable"; - } - - /// Initializes a new instance of AzureDataExplorerTableDataset. - /// Type of dataset. - /// Dataset description. - /// Columns that define the structure of the dataset. Type: array (or Expression with resultType array), itemType: DatasetDataElement. - /// Columns that define the physical type schema of the dataset. Type: array (or Expression with resultType array), itemType: DatasetSchemaDataElement. - /// Linked service reference. - /// Parameters for dataset. - /// List of tags that can be used for describing the Dataset. - /// The folder that this Dataset is in. If not specified, Dataset will appear at the root level. - /// Additional Properties. - /// The table name of the Azure Data Explorer database. Type: string (or Expression with resultType string). - internal AzureDataExplorerTableDataset(string datasetType, string description, DataFactoryElement> structure, DataFactoryElement> schema, DataFactoryLinkedServiceReference linkedServiceName, IDictionary parameters, IList annotations, DatasetFolder folder, IDictionary> additionalProperties, DataFactoryElement table) : base(datasetType, description, structure, schema, linkedServiceName, parameters, annotations, folder, additionalProperties) - { - Table = table; - DatasetType = datasetType ?? "AzureDataExplorerTable"; - } - - /// The table name of the Azure Data Explorer database. Type: string (or Expression with resultType string). - public DataFactoryElement Table { get; set; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/AzureDataLakeAnalyticsLinkedService.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/AzureDataLakeAnalyticsLinkedService.Serialization.cs deleted file mode 100644 index c7e2cbd4..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/AzureDataLakeAnalyticsLinkedService.Serialization.cs +++ /dev/null @@ -1,262 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class AzureDataLakeAnalyticsLinkedService : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - writer.WritePropertyName("type"u8); - writer.WriteStringValue(LinkedServiceType); - if (Optional.IsDefined(ConnectVia)) - { - writer.WritePropertyName("connectVia"u8); - writer.WriteObjectValue(ConnectVia); - } - if (Optional.IsDefined(Description)) - { - writer.WritePropertyName("description"u8); - writer.WriteStringValue(Description); - } - if (Optional.IsCollectionDefined(Parameters)) - { - writer.WritePropertyName("parameters"u8); - writer.WriteStartObject(); - foreach (var item in Parameters) - { - writer.WritePropertyName(item.Key); - writer.WriteObjectValue(item.Value); - } - writer.WriteEndObject(); - } - if (Optional.IsCollectionDefined(Annotations)) - { - writer.WritePropertyName("annotations"u8); - writer.WriteStartArray(); - foreach (var item in Annotations) - { - if (item == null) - { - writer.WriteNullValue(); - continue; - } -#if NET6_0_OR_GREATER - writer.WriteRawValue(item); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.ToString()).RootElement); -#endif - } - writer.WriteEndArray(); - } - writer.WritePropertyName("typeProperties"u8); - writer.WriteStartObject(); - writer.WritePropertyName("accountName"u8); - JsonSerializer.Serialize(writer, AccountName); - if (Optional.IsDefined(ServicePrincipalId)) - { - writer.WritePropertyName("servicePrincipalId"u8); - JsonSerializer.Serialize(writer, ServicePrincipalId); - } - if (Optional.IsDefined(ServicePrincipalKey)) - { - writer.WritePropertyName("servicePrincipalKey"u8); - JsonSerializer.Serialize(writer, ServicePrincipalKey); - } - writer.WritePropertyName("tenant"u8); - JsonSerializer.Serialize(writer, Tenant); - if (Optional.IsDefined(SubscriptionId)) - { - writer.WritePropertyName("subscriptionId"u8); - JsonSerializer.Serialize(writer, SubscriptionId); - } - if (Optional.IsDefined(ResourceGroupName)) - { - writer.WritePropertyName("resourceGroupName"u8); - JsonSerializer.Serialize(writer, ResourceGroupName); - } - if (Optional.IsDefined(DataLakeAnalyticsUri)) - { - writer.WritePropertyName("dataLakeAnalyticsUri"u8); - JsonSerializer.Serialize(writer, DataLakeAnalyticsUri); - } - if (Optional.IsDefined(EncryptedCredential)) - { - writer.WritePropertyName("encryptedCredential"u8); - writer.WriteStringValue(EncryptedCredential); - } - writer.WriteEndObject(); - foreach (var item in AdditionalProperties) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.Value.ToString()).RootElement); -#endif - } - writer.WriteEndObject(); - } - - internal static AzureDataLakeAnalyticsLinkedService DeserializeAzureDataLakeAnalyticsLinkedService(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - string type = default; - Optional connectVia = default; - Optional description = default; - Optional> parameters = default; - Optional> annotations = default; - DataFactoryElement accountName = default; - Optional> servicePrincipalId = default; - Optional servicePrincipalKey = default; - DataFactoryElement tenant = default; - Optional> subscriptionId = default; - Optional> resourceGroupName = default; - Optional> dataLakeAnalyticsUri = default; - Optional encryptedCredential = default; - IDictionary> additionalProperties = default; - Dictionary> additionalPropertiesDictionary = new Dictionary>(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("type"u8)) - { - type = property.Value.GetString(); - continue; - } - if (property.NameEquals("connectVia"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - connectVia = IntegrationRuntimeReference.DeserializeIntegrationRuntimeReference(property.Value); - continue; - } - if (property.NameEquals("description"u8)) - { - description = property.Value.GetString(); - continue; - } - if (property.NameEquals("parameters"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - Dictionary dictionary = new Dictionary(); - foreach (var property0 in property.Value.EnumerateObject()) - { - dictionary.Add(property0.Name, EntityParameterSpecification.DeserializeEntityParameterSpecification(property0.Value)); - } - parameters = dictionary; - continue; - } - if (property.NameEquals("annotations"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - if (item.ValueKind == JsonValueKind.Null) - { - array.Add(null); - } - else - { - array.Add(BinaryData.FromString(item.GetRawText())); - } - } - annotations = array; - continue; - } - if (property.NameEquals("typeProperties"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - foreach (var property0 in property.Value.EnumerateObject()) - { - if (property0.NameEquals("accountName"u8)) - { - accountName = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("servicePrincipalId"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - servicePrincipalId = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("servicePrincipalKey"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - servicePrincipalKey = JsonSerializer.Deserialize(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("tenant"u8)) - { - tenant = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("subscriptionId"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - subscriptionId = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("resourceGroupName"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - resourceGroupName = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("dataLakeAnalyticsUri"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - dataLakeAnalyticsUri = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("encryptedCredential"u8)) - { - encryptedCredential = property0.Value.GetString(); - continue; - } - } - continue; - } - additionalPropertiesDictionary.Add(property.Name, JsonSerializer.Deserialize>(property.Value.GetRawText())); - } - additionalProperties = additionalPropertiesDictionary; - return new AzureDataLakeAnalyticsLinkedService(type, connectVia.Value, description.Value, Optional.ToDictionary(parameters), Optional.ToList(annotations), additionalProperties, accountName, servicePrincipalId.Value, servicePrincipalKey, tenant, subscriptionId.Value, resourceGroupName.Value, dataLakeAnalyticsUri.Value, encryptedCredential.Value); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/AzureDataLakeAnalyticsLinkedService.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/AzureDataLakeAnalyticsLinkedService.cs deleted file mode 100644 index 7827f31b..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/AzureDataLakeAnalyticsLinkedService.cs +++ /dev/null @@ -1,72 +0,0 @@ -// - -#nullable disable - -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// Azure Data Lake Analytics linked service. - public partial class AzureDataLakeAnalyticsLinkedService : DataFactoryLinkedServiceProperties - { - /// Initializes a new instance of AzureDataLakeAnalyticsLinkedService. - /// The Azure Data Lake Analytics account name. Type: string (or Expression with resultType string). - /// The name or ID of the tenant to which the service principal belongs. Type: string (or Expression with resultType string). - /// or is null. - public AzureDataLakeAnalyticsLinkedService(DataFactoryElement accountName, DataFactoryElement tenant) - { - Argument.AssertNotNull(accountName, nameof(accountName)); - Argument.AssertNotNull(tenant, nameof(tenant)); - - AccountName = accountName; - Tenant = tenant; - LinkedServiceType = "AzureDataLakeAnalytics"; - } - - /// Initializes a new instance of AzureDataLakeAnalyticsLinkedService. - /// Type of linked service. - /// The integration runtime reference. - /// Linked service description. - /// Parameters for linked service. - /// List of tags that can be used for describing the linked service. - /// Additional Properties. - /// The Azure Data Lake Analytics account name. Type: string (or Expression with resultType string). - /// The ID of the application used to authenticate against the Azure Data Lake Analytics account. Type: string (or Expression with resultType string). - /// The Key of the application used to authenticate against the Azure Data Lake Analytics account. - /// The name or ID of the tenant to which the service principal belongs. Type: string (or Expression with resultType string). - /// Data Lake Analytics account subscription ID (if different from Data Factory account). Type: string (or Expression with resultType string). - /// Data Lake Analytics account resource group name (if different from Data Factory account). Type: string (or Expression with resultType string). - /// Azure Data Lake Analytics URI Type: string (or Expression with resultType string). - /// The encrypted credential used for authentication. Credentials are encrypted using the integration runtime credential manager. Type: string. - internal AzureDataLakeAnalyticsLinkedService(string linkedServiceType, IntegrationRuntimeReference connectVia, string description, IDictionary parameters, IList annotations, IDictionary> additionalProperties, DataFactoryElement accountName, DataFactoryElement servicePrincipalId, DataFactorySecretBaseDefinition servicePrincipalKey, DataFactoryElement tenant, DataFactoryElement subscriptionId, DataFactoryElement resourceGroupName, DataFactoryElement dataLakeAnalyticsUri, string encryptedCredential) : base(linkedServiceType, connectVia, description, parameters, annotations, additionalProperties) - { - AccountName = accountName; - ServicePrincipalId = servicePrincipalId; - ServicePrincipalKey = servicePrincipalKey; - Tenant = tenant; - SubscriptionId = subscriptionId; - ResourceGroupName = resourceGroupName; - DataLakeAnalyticsUri = dataLakeAnalyticsUri; - EncryptedCredential = encryptedCredential; - LinkedServiceType = linkedServiceType ?? "AzureDataLakeAnalytics"; - } - - /// The Azure Data Lake Analytics account name. Type: string (or Expression with resultType string). - public DataFactoryElement AccountName { get; set; } - /// The ID of the application used to authenticate against the Azure Data Lake Analytics account. Type: string (or Expression with resultType string). - public DataFactoryElement ServicePrincipalId { get; set; } - /// The Key of the application used to authenticate against the Azure Data Lake Analytics account. - public DataFactorySecretBaseDefinition ServicePrincipalKey { get; set; } - /// The name or ID of the tenant to which the service principal belongs. Type: string (or Expression with resultType string). - public DataFactoryElement Tenant { get; set; } - /// Data Lake Analytics account subscription ID (if different from Data Factory account). Type: string (or Expression with resultType string). - public DataFactoryElement SubscriptionId { get; set; } - /// Data Lake Analytics account resource group name (if different from Data Factory account). Type: string (or Expression with resultType string). - public DataFactoryElement ResourceGroupName { get; set; } - /// Azure Data Lake Analytics URI Type: string (or Expression with resultType string). - public DataFactoryElement DataLakeAnalyticsUri { get; set; } - /// The encrypted credential used for authentication. Credentials are encrypted using the integration runtime credential manager. Type: string. - public string EncryptedCredential { get; set; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/AzureDataLakeStoreDataset.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/AzureDataLakeStoreDataset.Serialization.cs deleted file mode 100644 index 180acedb..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/AzureDataLakeStoreDataset.Serialization.cs +++ /dev/null @@ -1,257 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class AzureDataLakeStoreDataset : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - writer.WritePropertyName("type"u8); - writer.WriteStringValue(DatasetType); - if (Optional.IsDefined(Description)) - { - writer.WritePropertyName("description"u8); - writer.WriteStringValue(Description); - } - if (Optional.IsDefined(Structure)) - { - writer.WritePropertyName("structure"u8); - JsonSerializer.Serialize(writer, Structure); - } - if (Optional.IsDefined(Schema)) - { - writer.WritePropertyName("schema"u8); - JsonSerializer.Serialize(writer, Schema); - } - writer.WritePropertyName("linkedServiceName"u8); - JsonSerializer.Serialize(writer, LinkedServiceName); if (Optional.IsCollectionDefined(Parameters)) - { - writer.WritePropertyName("parameters"u8); - writer.WriteStartObject(); - foreach (var item in Parameters) - { - writer.WritePropertyName(item.Key); - writer.WriteObjectValue(item.Value); - } - writer.WriteEndObject(); - } - if (Optional.IsCollectionDefined(Annotations)) - { - writer.WritePropertyName("annotations"u8); - writer.WriteStartArray(); - foreach (var item in Annotations) - { - if (item == null) - { - writer.WriteNullValue(); - continue; - } -#if NET6_0_OR_GREATER - writer.WriteRawValue(item); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.ToString()).RootElement); -#endif - } - writer.WriteEndArray(); - } - if (Optional.IsDefined(Folder)) - { - writer.WritePropertyName("folder"u8); - writer.WriteObjectValue(Folder); - } - writer.WritePropertyName("typeProperties"u8); - writer.WriteStartObject(); - if (Optional.IsDefined(FolderPath)) - { - writer.WritePropertyName("folderPath"u8); - JsonSerializer.Serialize(writer, FolderPath); - } - if (Optional.IsDefined(FileName)) - { - writer.WritePropertyName("fileName"u8); - JsonSerializer.Serialize(writer, FileName); - } - if (Optional.IsDefined(Format)) - { - writer.WritePropertyName("format"u8); - writer.WriteObjectValue(Format); - } - if (Optional.IsDefined(Compression)) - { - writer.WritePropertyName("compression"u8); - writer.WriteObjectValue(Compression); - } - writer.WriteEndObject(); - foreach (var item in AdditionalProperties) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.Value.ToString()).RootElement); -#endif - } - writer.WriteEndObject(); - } - - internal static AzureDataLakeStoreDataset DeserializeAzureDataLakeStoreDataset(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - string type = default; - Optional description = default; - Optional>> structure = default; - Optional>> schema = default; - DataFactoryLinkedServiceReference linkedServiceName = default; - Optional> parameters = default; - Optional> annotations = default; - Optional folder = default; - Optional> folderPath = default; - Optional> fileName = default; - Optional format = default; - Optional compression = default; - IDictionary> additionalProperties = default; - Dictionary> additionalPropertiesDictionary = new Dictionary>(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("type"u8)) - { - type = property.Value.GetString(); - continue; - } - if (property.NameEquals("description"u8)) - { - description = property.Value.GetString(); - continue; - } - if (property.NameEquals("structure"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - structure = JsonSerializer.Deserialize>>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("schema"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - schema = JsonSerializer.Deserialize>>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("linkedServiceName"u8)) - { - linkedServiceName = JsonSerializer.Deserialize(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("parameters"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - Dictionary dictionary = new Dictionary(); - foreach (var property0 in property.Value.EnumerateObject()) - { - dictionary.Add(property0.Name, EntityParameterSpecification.DeserializeEntityParameterSpecification(property0.Value)); - } - parameters = dictionary; - continue; - } - if (property.NameEquals("annotations"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - if (item.ValueKind == JsonValueKind.Null) - { - array.Add(null); - } - else - { - array.Add(BinaryData.FromString(item.GetRawText())); - } - } - annotations = array; - continue; - } - if (property.NameEquals("folder"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - folder = DatasetFolder.DeserializeDatasetFolder(property.Value); - continue; - } - if (property.NameEquals("typeProperties"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - foreach (var property0 in property.Value.EnumerateObject()) - { - if (property0.NameEquals("folderPath"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - folderPath = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("fileName"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - fileName = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("format"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - format = DatasetStorageFormat.DeserializeDatasetStorageFormat(property0.Value); - continue; - } - if (property0.NameEquals("compression"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - compression = DatasetCompression.DeserializeDatasetCompression(property0.Value); - continue; - } - } - continue; - } - additionalPropertiesDictionary.Add(property.Name, JsonSerializer.Deserialize>(property.Value.GetRawText())); - } - additionalProperties = additionalPropertiesDictionary; - return new AzureDataLakeStoreDataset(type, description.Value, structure.Value, schema.Value, linkedServiceName, Optional.ToDictionary(parameters), Optional.ToList(annotations), folder.Value, additionalProperties, folderPath.Value, fileName.Value, format.Value, compression.Value); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/AzureDataLakeStoreDataset.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/AzureDataLakeStoreDataset.cs deleted file mode 100644 index 2a67a5f2..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/AzureDataLakeStoreDataset.cs +++ /dev/null @@ -1,63 +0,0 @@ -// - -#nullable disable - -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// Azure Data Lake Store dataset. - public partial class AzureDataLakeStoreDataset : DataFactoryDatasetProperties - { - /// Initializes a new instance of AzureDataLakeStoreDataset. - /// Linked service reference. - /// is null. - public AzureDataLakeStoreDataset(DataFactoryLinkedServiceReference linkedServiceName) : base(linkedServiceName) - { - Argument.AssertNotNull(linkedServiceName, nameof(linkedServiceName)); - - DatasetType = "AzureDataLakeStoreFile"; - } - - /// Initializes a new instance of AzureDataLakeStoreDataset. - /// Type of dataset. - /// Dataset description. - /// Columns that define the structure of the dataset. Type: array (or Expression with resultType array), itemType: DatasetDataElement. - /// Columns that define the physical type schema of the dataset. Type: array (or Expression with resultType array), itemType: DatasetSchemaDataElement. - /// Linked service reference. - /// Parameters for dataset. - /// List of tags that can be used for describing the Dataset. - /// The folder that this Dataset is in. If not specified, Dataset will appear at the root level. - /// Additional Properties. - /// Path to the folder in the Azure Data Lake Store. Type: string (or Expression with resultType string). - /// The name of the file in the Azure Data Lake Store. Type: string (or Expression with resultType string). - /// - /// The format of the Data Lake Store. - /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. - /// The available derived classes include , , , and . - /// - /// The data compression method used for the item(s) in the Azure Data Lake Store. - internal AzureDataLakeStoreDataset(string datasetType, string description, DataFactoryElement> structure, DataFactoryElement> schema, DataFactoryLinkedServiceReference linkedServiceName, IDictionary parameters, IList annotations, DatasetFolder folder, IDictionary> additionalProperties, DataFactoryElement folderPath, DataFactoryElement fileName, DatasetStorageFormat format, DatasetCompression compression) : base(datasetType, description, structure, schema, linkedServiceName, parameters, annotations, folder, additionalProperties) - { - FolderPath = folderPath; - FileName = fileName; - Format = format; - Compression = compression; - DatasetType = datasetType ?? "AzureDataLakeStoreFile"; - } - - /// Path to the folder in the Azure Data Lake Store. Type: string (or Expression with resultType string). - public DataFactoryElement FolderPath { get; set; } - /// The name of the file in the Azure Data Lake Store. Type: string (or Expression with resultType string). - public DataFactoryElement FileName { get; set; } - /// - /// The format of the Data Lake Store. - /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. - /// The available derived classes include , , , and . - /// - public DatasetStorageFormat Format { get; set; } - /// The data compression method used for the item(s) in the Azure Data Lake Store. - public DatasetCompression Compression { get; set; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/AzureDataLakeStoreLinkedService.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/AzureDataLakeStoreLinkedService.Serialization.cs deleted file mode 100644 index edeaca8a..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/AzureDataLakeStoreLinkedService.Serialization.cs +++ /dev/null @@ -1,299 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class AzureDataLakeStoreLinkedService : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - writer.WritePropertyName("type"u8); - writer.WriteStringValue(LinkedServiceType); - if (Optional.IsDefined(ConnectVia)) - { - writer.WritePropertyName("connectVia"u8); - writer.WriteObjectValue(ConnectVia); - } - if (Optional.IsDefined(Description)) - { - writer.WritePropertyName("description"u8); - writer.WriteStringValue(Description); - } - if (Optional.IsCollectionDefined(Parameters)) - { - writer.WritePropertyName("parameters"u8); - writer.WriteStartObject(); - foreach (var item in Parameters) - { - writer.WritePropertyName(item.Key); - writer.WriteObjectValue(item.Value); - } - writer.WriteEndObject(); - } - if (Optional.IsCollectionDefined(Annotations)) - { - writer.WritePropertyName("annotations"u8); - writer.WriteStartArray(); - foreach (var item in Annotations) - { - if (item == null) - { - writer.WriteNullValue(); - continue; - } -#if NET6_0_OR_GREATER - writer.WriteRawValue(item); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.ToString()).RootElement); -#endif - } - writer.WriteEndArray(); - } - writer.WritePropertyName("typeProperties"u8); - writer.WriteStartObject(); - writer.WritePropertyName("dataLakeStoreUri"u8); - JsonSerializer.Serialize(writer, DataLakeStoreUri); - if (Optional.IsDefined(ServicePrincipalId)) - { - writer.WritePropertyName("servicePrincipalId"u8); - JsonSerializer.Serialize(writer, ServicePrincipalId); - } - if (Optional.IsDefined(ServicePrincipalKey)) - { - writer.WritePropertyName("servicePrincipalKey"u8); - JsonSerializer.Serialize(writer, ServicePrincipalKey); - } - if (Optional.IsDefined(Tenant)) - { - writer.WritePropertyName("tenant"u8); - JsonSerializer.Serialize(writer, Tenant); - } - if (Optional.IsDefined(AzureCloudType)) - { - writer.WritePropertyName("azureCloudType"u8); - JsonSerializer.Serialize(writer, AzureCloudType); - } - if (Optional.IsDefined(AccountName)) - { - writer.WritePropertyName("accountName"u8); - JsonSerializer.Serialize(writer, AccountName); - } - if (Optional.IsDefined(SubscriptionId)) - { - writer.WritePropertyName("subscriptionId"u8); - JsonSerializer.Serialize(writer, SubscriptionId); - } - if (Optional.IsDefined(ResourceGroupName)) - { - writer.WritePropertyName("resourceGroupName"u8); - JsonSerializer.Serialize(writer, ResourceGroupName); - } - if (Optional.IsDefined(EncryptedCredential)) - { - writer.WritePropertyName("encryptedCredential"u8); - writer.WriteStringValue(EncryptedCredential); - } - if (Optional.IsDefined(Credential)) - { - writer.WritePropertyName("credential"u8); - writer.WriteObjectValue(Credential); - } - writer.WriteEndObject(); - foreach (var item in AdditionalProperties) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.Value.ToString()).RootElement); -#endif - } - writer.WriteEndObject(); - } - - internal static AzureDataLakeStoreLinkedService DeserializeAzureDataLakeStoreLinkedService(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - string type = default; - Optional connectVia = default; - Optional description = default; - Optional> parameters = default; - Optional> annotations = default; - DataFactoryElement dataLakeStoreUri = default; - Optional> servicePrincipalId = default; - Optional servicePrincipalKey = default; - Optional> tenant = default; - Optional> azureCloudType = default; - Optional> accountName = default; - Optional> subscriptionId = default; - Optional> resourceGroupName = default; - Optional encryptedCredential = default; - Optional credential = default; - IDictionary> additionalProperties = default; - Dictionary> additionalPropertiesDictionary = new Dictionary>(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("type"u8)) - { - type = property.Value.GetString(); - continue; - } - if (property.NameEquals("connectVia"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - connectVia = IntegrationRuntimeReference.DeserializeIntegrationRuntimeReference(property.Value); - continue; - } - if (property.NameEquals("description"u8)) - { - description = property.Value.GetString(); - continue; - } - if (property.NameEquals("parameters"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - Dictionary dictionary = new Dictionary(); - foreach (var property0 in property.Value.EnumerateObject()) - { - dictionary.Add(property0.Name, EntityParameterSpecification.DeserializeEntityParameterSpecification(property0.Value)); - } - parameters = dictionary; - continue; - } - if (property.NameEquals("annotations"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - if (item.ValueKind == JsonValueKind.Null) - { - array.Add(null); - } - else - { - array.Add(BinaryData.FromString(item.GetRawText())); - } - } - annotations = array; - continue; - } - if (property.NameEquals("typeProperties"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - foreach (var property0 in property.Value.EnumerateObject()) - { - if (property0.NameEquals("dataLakeStoreUri"u8)) - { - dataLakeStoreUri = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("servicePrincipalId"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - servicePrincipalId = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("servicePrincipalKey"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - servicePrincipalKey = JsonSerializer.Deserialize(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("tenant"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - tenant = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("azureCloudType"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - azureCloudType = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("accountName"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - accountName = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("subscriptionId"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - subscriptionId = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("resourceGroupName"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - resourceGroupName = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("encryptedCredential"u8)) - { - encryptedCredential = property0.Value.GetString(); - continue; - } - if (property0.NameEquals("credential"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - credential = DataFactoryCredentialReference.DeserializeDataFactoryCredentialReference(property0.Value); - continue; - } - } - continue; - } - additionalPropertiesDictionary.Add(property.Name, JsonSerializer.Deserialize>(property.Value.GetRawText())); - } - additionalProperties = additionalPropertiesDictionary; - return new AzureDataLakeStoreLinkedService(type, connectVia.Value, description.Value, Optional.ToDictionary(parameters), Optional.ToList(annotations), additionalProperties, dataLakeStoreUri, servicePrincipalId.Value, servicePrincipalKey, tenant.Value, azureCloudType.Value, accountName.Value, subscriptionId.Value, resourceGroupName.Value, encryptedCredential.Value, credential.Value); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/AzureDataLakeStoreLinkedService.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/AzureDataLakeStoreLinkedService.cs deleted file mode 100644 index 7f0a7a74..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/AzureDataLakeStoreLinkedService.cs +++ /dev/null @@ -1,77 +0,0 @@ -// - -#nullable disable - -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// Azure Data Lake Store linked service. - public partial class AzureDataLakeStoreLinkedService : DataFactoryLinkedServiceProperties - { - /// Initializes a new instance of AzureDataLakeStoreLinkedService. - /// Data Lake Store service URI. Type: string (or Expression with resultType string). - /// is null. - public AzureDataLakeStoreLinkedService(DataFactoryElement dataLakeStoreUri) - { - Argument.AssertNotNull(dataLakeStoreUri, nameof(dataLakeStoreUri)); - - DataLakeStoreUri = dataLakeStoreUri; - LinkedServiceType = "AzureDataLakeStore"; - } - - /// Initializes a new instance of AzureDataLakeStoreLinkedService. - /// Type of linked service. - /// The integration runtime reference. - /// Linked service description. - /// Parameters for linked service. - /// List of tags that can be used for describing the linked service. - /// Additional Properties. - /// Data Lake Store service URI. Type: string (or Expression with resultType string). - /// The ID of the application used to authenticate against the Azure Data Lake Store account. Type: string (or Expression with resultType string). - /// The Key of the application used to authenticate against the Azure Data Lake Store account. - /// The name or ID of the tenant to which the service principal belongs. Type: string (or Expression with resultType string). - /// Indicates the azure cloud type of the service principle auth. Allowed values are AzurePublic, AzureChina, AzureUsGovernment, AzureGermany. Default value is the data factory regions’ cloud type. Type: string (or Expression with resultType string). - /// Data Lake Store account name. Type: string (or Expression with resultType string). - /// Data Lake Store account subscription ID (if different from Data Factory account). Type: string (or Expression with resultType string). - /// Data Lake Store account resource group name (if different from Data Factory account). Type: string (or Expression with resultType string). - /// The encrypted credential used for authentication. Credentials are encrypted using the integration runtime credential manager. Type: string. - /// The credential reference containing authentication information. - internal AzureDataLakeStoreLinkedService(string linkedServiceType, IntegrationRuntimeReference connectVia, string description, IDictionary parameters, IList annotations, IDictionary> additionalProperties, DataFactoryElement dataLakeStoreUri, DataFactoryElement servicePrincipalId, DataFactorySecretBaseDefinition servicePrincipalKey, DataFactoryElement tenant, DataFactoryElement azureCloudType, DataFactoryElement accountName, DataFactoryElement subscriptionId, DataFactoryElement resourceGroupName, string encryptedCredential, DataFactoryCredentialReference credential) : base(linkedServiceType, connectVia, description, parameters, annotations, additionalProperties) - { - DataLakeStoreUri = dataLakeStoreUri; - ServicePrincipalId = servicePrincipalId; - ServicePrincipalKey = servicePrincipalKey; - Tenant = tenant; - AzureCloudType = azureCloudType; - AccountName = accountName; - SubscriptionId = subscriptionId; - ResourceGroupName = resourceGroupName; - EncryptedCredential = encryptedCredential; - Credential = credential; - LinkedServiceType = linkedServiceType ?? "AzureDataLakeStore"; - } - - /// Data Lake Store service URI. Type: string (or Expression with resultType string). - public DataFactoryElement DataLakeStoreUri { get; set; } - /// The ID of the application used to authenticate against the Azure Data Lake Store account. Type: string (or Expression with resultType string). - public DataFactoryElement ServicePrincipalId { get; set; } - /// The Key of the application used to authenticate against the Azure Data Lake Store account. - public DataFactorySecretBaseDefinition ServicePrincipalKey { get; set; } - /// The name or ID of the tenant to which the service principal belongs. Type: string (or Expression with resultType string). - public DataFactoryElement Tenant { get; set; } - /// Indicates the azure cloud type of the service principle auth. Allowed values are AzurePublic, AzureChina, AzureUsGovernment, AzureGermany. Default value is the data factory regions’ cloud type. Type: string (or Expression with resultType string). - public DataFactoryElement AzureCloudType { get; set; } - /// Data Lake Store account name. Type: string (or Expression with resultType string). - public DataFactoryElement AccountName { get; set; } - /// Data Lake Store account subscription ID (if different from Data Factory account). Type: string (or Expression with resultType string). - public DataFactoryElement SubscriptionId { get; set; } - /// Data Lake Store account resource group name (if different from Data Factory account). Type: string (or Expression with resultType string). - public DataFactoryElement ResourceGroupName { get; set; } - /// The encrypted credential used for authentication. Credentials are encrypted using the integration runtime credential manager. Type: string. - public string EncryptedCredential { get; set; } - /// The credential reference containing authentication information. - public DataFactoryCredentialReference Credential { get; set; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/AzureDataLakeStoreLocation.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/AzureDataLakeStoreLocation.Serialization.cs deleted file mode 100644 index 3cca871d..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/AzureDataLakeStoreLocation.Serialization.cs +++ /dev/null @@ -1,82 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class AzureDataLakeStoreLocation : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - writer.WritePropertyName("type"u8); - writer.WriteStringValue(DatasetLocationType); - if (Optional.IsDefined(FolderPath)) - { - writer.WritePropertyName("folderPath"u8); - JsonSerializer.Serialize(writer, FolderPath); - } - if (Optional.IsDefined(FileName)) - { - writer.WritePropertyName("fileName"u8); - JsonSerializer.Serialize(writer, FileName); - } - foreach (var item in AdditionalProperties) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.Value.ToString()).RootElement); -#endif - } - writer.WriteEndObject(); - } - - internal static AzureDataLakeStoreLocation DeserializeAzureDataLakeStoreLocation(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - string type = default; - Optional> folderPath = default; - Optional> fileName = default; - IDictionary> additionalProperties = default; - Dictionary> additionalPropertiesDictionary = new Dictionary>(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("type"u8)) - { - type = property.Value.GetString(); - continue; - } - if (property.NameEquals("folderPath"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - folderPath = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("fileName"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - fileName = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - additionalPropertiesDictionary.Add(property.Name, JsonSerializer.Deserialize>(property.Value.GetRawText())); - } - additionalProperties = additionalPropertiesDictionary; - return new AzureDataLakeStoreLocation(type, folderPath.Value, fileName.Value, additionalProperties); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/AzureDataLakeStoreLocation.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/AzureDataLakeStoreLocation.cs deleted file mode 100644 index 16edd686..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/AzureDataLakeStoreLocation.cs +++ /dev/null @@ -1,28 +0,0 @@ -// - -#nullable disable - -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// The location of azure data lake store dataset. - public partial class AzureDataLakeStoreLocation : DatasetLocation - { - /// Initializes a new instance of AzureDataLakeStoreLocation. - public AzureDataLakeStoreLocation() - { - DatasetLocationType = "AzureDataLakeStoreLocation"; - } - - /// Initializes a new instance of AzureDataLakeStoreLocation. - /// Type of dataset storage location. - /// Specify the folder path of dataset. Type: string (or Expression with resultType string). - /// Specify the file name of dataset. Type: string (or Expression with resultType string). - /// Additional Properties. - internal AzureDataLakeStoreLocation(string datasetLocationType, DataFactoryElement folderPath, DataFactoryElement fileName, IDictionary> additionalProperties) : base(datasetLocationType, folderPath, fileName, additionalProperties) - { - DatasetLocationType = datasetLocationType ?? "AzureDataLakeStoreLocation"; - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/AzureDataLakeStoreReadSettings.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/AzureDataLakeStoreReadSettings.Serialization.cs deleted file mode 100644 index 517b30a7..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/AzureDataLakeStoreReadSettings.Serialization.cs +++ /dev/null @@ -1,247 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class AzureDataLakeStoreReadSettings : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - if (Optional.IsDefined(Recursive)) - { - writer.WritePropertyName("recursive"u8); - JsonSerializer.Serialize(writer, Recursive); - } - if (Optional.IsDefined(WildcardFolderPath)) - { - writer.WritePropertyName("wildcardFolderPath"u8); - JsonSerializer.Serialize(writer, WildcardFolderPath); - } - if (Optional.IsDefined(WildcardFileName)) - { - writer.WritePropertyName("wildcardFileName"u8); - JsonSerializer.Serialize(writer, WildcardFileName); - } - if (Optional.IsDefined(FileListPath)) - { - writer.WritePropertyName("fileListPath"u8); - JsonSerializer.Serialize(writer, FileListPath); - } - if (Optional.IsDefined(ListAfter)) - { - writer.WritePropertyName("listAfter"u8); - JsonSerializer.Serialize(writer, ListAfter); - } - if (Optional.IsDefined(ListBefore)) - { - writer.WritePropertyName("listBefore"u8); - JsonSerializer.Serialize(writer, ListBefore); - } - if (Optional.IsDefined(EnablePartitionDiscovery)) - { - writer.WritePropertyName("enablePartitionDiscovery"u8); - JsonSerializer.Serialize(writer, EnablePartitionDiscovery); - } - if (Optional.IsDefined(PartitionRootPath)) - { - writer.WritePropertyName("partitionRootPath"u8); - JsonSerializer.Serialize(writer, PartitionRootPath); - } - if (Optional.IsDefined(DeleteFilesAfterCompletion)) - { - writer.WritePropertyName("deleteFilesAfterCompletion"u8); - JsonSerializer.Serialize(writer, DeleteFilesAfterCompletion); - } - if (Optional.IsDefined(ModifiedDatetimeStart)) - { - writer.WritePropertyName("modifiedDatetimeStart"u8); - JsonSerializer.Serialize(writer, ModifiedDatetimeStart); - } - if (Optional.IsDefined(ModifiedDatetimeEnd)) - { - writer.WritePropertyName("modifiedDatetimeEnd"u8); - JsonSerializer.Serialize(writer, ModifiedDatetimeEnd); - } - writer.WritePropertyName("type"u8); - writer.WriteStringValue(StoreReadSettingsType); - if (Optional.IsDefined(MaxConcurrentConnections)) - { - writer.WritePropertyName("maxConcurrentConnections"u8); - JsonSerializer.Serialize(writer, MaxConcurrentConnections); - } - if (Optional.IsDefined(DisableMetricsCollection)) - { - writer.WritePropertyName("disableMetricsCollection"u8); - JsonSerializer.Serialize(writer, DisableMetricsCollection); - } - foreach (var item in AdditionalProperties) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.Value.ToString()).RootElement); -#endif - } - writer.WriteEndObject(); - } - - internal static AzureDataLakeStoreReadSettings DeserializeAzureDataLakeStoreReadSettings(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - Optional> recursive = default; - Optional> wildcardFolderPath = default; - Optional> wildcardFileName = default; - Optional> fileListPath = default; - Optional> listAfter = default; - Optional> listBefore = default; - Optional> enablePartitionDiscovery = default; - Optional> partitionRootPath = default; - Optional> deleteFilesAfterCompletion = default; - Optional> modifiedDatetimeStart = default; - Optional> modifiedDatetimeEnd = default; - string type = default; - Optional> maxConcurrentConnections = default; - Optional> disableMetricsCollection = default; - IDictionary> additionalProperties = default; - Dictionary> additionalPropertiesDictionary = new Dictionary>(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("recursive"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - recursive = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("wildcardFolderPath"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - wildcardFolderPath = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("wildcardFileName"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - wildcardFileName = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("fileListPath"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - fileListPath = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("listAfter"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - listAfter = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("listBefore"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - listBefore = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("enablePartitionDiscovery"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - enablePartitionDiscovery = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("partitionRootPath"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - partitionRootPath = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("deleteFilesAfterCompletion"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - deleteFilesAfterCompletion = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("modifiedDatetimeStart"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - modifiedDatetimeStart = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("modifiedDatetimeEnd"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - modifiedDatetimeEnd = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("type"u8)) - { - type = property.Value.GetString(); - continue; - } - if (property.NameEquals("maxConcurrentConnections"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - maxConcurrentConnections = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("disableMetricsCollection"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - disableMetricsCollection = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - additionalPropertiesDictionary.Add(property.Name, JsonSerializer.Deserialize>(property.Value.GetRawText())); - } - additionalProperties = additionalPropertiesDictionary; - return new AzureDataLakeStoreReadSettings(type, maxConcurrentConnections.Value, disableMetricsCollection.Value, additionalProperties, recursive.Value, wildcardFolderPath.Value, wildcardFileName.Value, fileListPath.Value, listAfter.Value, listBefore.Value, enablePartitionDiscovery.Value, partitionRootPath.Value, deleteFilesAfterCompletion.Value, modifiedDatetimeStart.Value, modifiedDatetimeEnd.Value); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/AzureDataLakeStoreReadSettings.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/AzureDataLakeStoreReadSettings.cs deleted file mode 100644 index 74812fe1..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/AzureDataLakeStoreReadSettings.cs +++ /dev/null @@ -1,73 +0,0 @@ -// - -#nullable disable - -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// Azure data lake store read settings. - public partial class AzureDataLakeStoreReadSettings : StoreReadSettings - { - /// Initializes a new instance of AzureDataLakeStoreReadSettings. - public AzureDataLakeStoreReadSettings() - { - StoreReadSettingsType = "AzureDataLakeStoreReadSettings"; - } - - /// Initializes a new instance of AzureDataLakeStoreReadSettings. - /// The read setting type. - /// The maximum concurrent connection count for the source data store. Type: integer (or Expression with resultType integer). - /// If true, disable data store metrics collection. Default is false. Type: boolean (or Expression with resultType boolean). - /// Additional Properties. - /// If true, files under the folder path will be read recursively. Default is true. Type: boolean (or Expression with resultType boolean). - /// ADLS wildcardFolderPath. Type: string (or Expression with resultType string). - /// ADLS wildcardFileName. Type: string (or Expression with resultType string). - /// Point to a text file that lists each file (relative path to the path configured in the dataset) that you want to copy. Type: string (or Expression with resultType string). - /// Lists files after the value (exclusive) based on file/folder names’ lexicographical order. Applies under the folderPath in data set, and filter files/sub-folders under the folderPath. Type: string (or Expression with resultType string). - /// Lists files before the value (inclusive) based on file/folder names’ lexicographical order. Applies under the folderPath in data set, and filter files/sub-folders under the folderPath. Type: string (or Expression with resultType string). - /// Indicates whether to enable partition discovery. Type: boolean (or Expression with resultType boolean). - /// Specify the root path where partition discovery starts from. Type: string (or Expression with resultType string). - /// Indicates whether the source files need to be deleted after copy completion. Default is false. Type: boolean (or Expression with resultType boolean). - /// The start of file's modified datetime. Type: string (or Expression with resultType string). - /// The end of file's modified datetime. Type: string (or Expression with resultType string). - internal AzureDataLakeStoreReadSettings(string storeReadSettingsType, DataFactoryElement maxConcurrentConnections, DataFactoryElement disableMetricsCollection, IDictionary> additionalProperties, DataFactoryElement recursive, DataFactoryElement wildcardFolderPath, DataFactoryElement wildcardFileName, DataFactoryElement fileListPath, DataFactoryElement listAfter, DataFactoryElement listBefore, DataFactoryElement enablePartitionDiscovery, DataFactoryElement partitionRootPath, DataFactoryElement deleteFilesAfterCompletion, DataFactoryElement modifiedDatetimeStart, DataFactoryElement modifiedDatetimeEnd) : base(storeReadSettingsType, maxConcurrentConnections, disableMetricsCollection, additionalProperties) - { - Recursive = recursive; - WildcardFolderPath = wildcardFolderPath; - WildcardFileName = wildcardFileName; - FileListPath = fileListPath; - ListAfter = listAfter; - ListBefore = listBefore; - EnablePartitionDiscovery = enablePartitionDiscovery; - PartitionRootPath = partitionRootPath; - DeleteFilesAfterCompletion = deleteFilesAfterCompletion; - ModifiedDatetimeStart = modifiedDatetimeStart; - ModifiedDatetimeEnd = modifiedDatetimeEnd; - StoreReadSettingsType = storeReadSettingsType ?? "AzureDataLakeStoreReadSettings"; - } - - /// If true, files under the folder path will be read recursively. Default is true. Type: boolean (or Expression with resultType boolean). - public DataFactoryElement Recursive { get; set; } - /// ADLS wildcardFolderPath. Type: string (or Expression with resultType string). - public DataFactoryElement WildcardFolderPath { get; set; } - /// ADLS wildcardFileName. Type: string (or Expression with resultType string). - public DataFactoryElement WildcardFileName { get; set; } - /// Point to a text file that lists each file (relative path to the path configured in the dataset) that you want to copy. Type: string (or Expression with resultType string). - public DataFactoryElement FileListPath { get; set; } - /// Lists files after the value (exclusive) based on file/folder names’ lexicographical order. Applies under the folderPath in data set, and filter files/sub-folders under the folderPath. Type: string (or Expression with resultType string). - public DataFactoryElement ListAfter { get; set; } - /// Lists files before the value (inclusive) based on file/folder names’ lexicographical order. Applies under the folderPath in data set, and filter files/sub-folders under the folderPath. Type: string (or Expression with resultType string). - public DataFactoryElement ListBefore { get; set; } - /// Indicates whether to enable partition discovery. Type: boolean (or Expression with resultType boolean). - public DataFactoryElement EnablePartitionDiscovery { get; set; } - /// Specify the root path where partition discovery starts from. Type: string (or Expression with resultType string). - public DataFactoryElement PartitionRootPath { get; set; } - /// Indicates whether the source files need to be deleted after copy completion. Default is false. Type: boolean (or Expression with resultType boolean). - public DataFactoryElement DeleteFilesAfterCompletion { get; set; } - /// The start of file's modified datetime. Type: string (or Expression with resultType string). - public DataFactoryElement ModifiedDatetimeStart { get; set; } - /// The end of file's modified datetime. Type: string (or Expression with resultType string). - public DataFactoryElement ModifiedDatetimeEnd { get; set; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/AzureDataLakeStoreSink.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/AzureDataLakeStoreSink.Serialization.cs deleted file mode 100644 index 424c9a6d..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/AzureDataLakeStoreSink.Serialization.cs +++ /dev/null @@ -1,176 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class AzureDataLakeStoreSink : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - if (Optional.IsDefined(CopyBehavior)) - { - writer.WritePropertyName("copyBehavior"u8); - JsonSerializer.Serialize(writer, CopyBehavior); - } - if (Optional.IsDefined(EnableAdlsSingleFileParallel)) - { - writer.WritePropertyName("enableAdlsSingleFileParallel"u8); -#if NET6_0_OR_GREATER - writer.WriteRawValue(EnableAdlsSingleFileParallel); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(EnableAdlsSingleFileParallel.ToString()).RootElement); -#endif - } - writer.WritePropertyName("type"u8); - writer.WriteStringValue(CopySinkType); - if (Optional.IsDefined(WriteBatchSize)) - { - writer.WritePropertyName("writeBatchSize"u8); - JsonSerializer.Serialize(writer, WriteBatchSize); - } - if (Optional.IsDefined(WriteBatchTimeout)) - { - writer.WritePropertyName("writeBatchTimeout"u8); - JsonSerializer.Serialize(writer, WriteBatchTimeout); - } - if (Optional.IsDefined(SinkRetryCount)) - { - writer.WritePropertyName("sinkRetryCount"u8); - JsonSerializer.Serialize(writer, SinkRetryCount); - } - if (Optional.IsDefined(SinkRetryWait)) - { - writer.WritePropertyName("sinkRetryWait"u8); - JsonSerializer.Serialize(writer, SinkRetryWait); - } - if (Optional.IsDefined(MaxConcurrentConnections)) - { - writer.WritePropertyName("maxConcurrentConnections"u8); - JsonSerializer.Serialize(writer, MaxConcurrentConnections); - } - if (Optional.IsDefined(DisableMetricsCollection)) - { - writer.WritePropertyName("disableMetricsCollection"u8); - JsonSerializer.Serialize(writer, DisableMetricsCollection); - } - foreach (var item in AdditionalProperties) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.Value.ToString()).RootElement); -#endif - } - writer.WriteEndObject(); - } - - internal static AzureDataLakeStoreSink DeserializeAzureDataLakeStoreSink(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - Optional> copyBehavior = default; - Optional enableAdlsSingleFileParallel = default; - string type = default; - Optional> writeBatchSize = default; - Optional> writeBatchTimeout = default; - Optional> sinkRetryCount = default; - Optional> sinkRetryWait = default; - Optional> maxConcurrentConnections = default; - Optional> disableMetricsCollection = default; - IDictionary> additionalProperties = default; - Dictionary> additionalPropertiesDictionary = new Dictionary>(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("copyBehavior"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - copyBehavior = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("enableAdlsSingleFileParallel"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - enableAdlsSingleFileParallel = BinaryData.FromString(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("type"u8)) - { - type = property.Value.GetString(); - continue; - } - if (property.NameEquals("writeBatchSize"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - writeBatchSize = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("writeBatchTimeout"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - writeBatchTimeout = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("sinkRetryCount"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - sinkRetryCount = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("sinkRetryWait"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - sinkRetryWait = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("maxConcurrentConnections"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - maxConcurrentConnections = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("disableMetricsCollection"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - disableMetricsCollection = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - additionalPropertiesDictionary.Add(property.Name, JsonSerializer.Deserialize>(property.Value.GetRawText())); - } - additionalProperties = additionalPropertiesDictionary; - return new AzureDataLakeStoreSink(type, writeBatchSize.Value, writeBatchTimeout.Value, sinkRetryCount.Value, sinkRetryWait.Value, maxConcurrentConnections.Value, disableMetricsCollection.Value, additionalProperties, copyBehavior.Value, enableAdlsSingleFileParallel.Value); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/AzureDataLakeStoreSink.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/AzureDataLakeStoreSink.cs deleted file mode 100644 index 20f5b628..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/AzureDataLakeStoreSink.cs +++ /dev/null @@ -1,70 +0,0 @@ -// - -#nullable disable - -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// A copy activity Azure Data Lake Store sink. - public partial class AzureDataLakeStoreSink : CopySink - { - /// Initializes a new instance of AzureDataLakeStoreSink. - public AzureDataLakeStoreSink() - { - CopySinkType = "AzureDataLakeStoreSink"; - } - - /// Initializes a new instance of AzureDataLakeStoreSink. - /// Copy sink type. - /// Write batch size. Type: integer (or Expression with resultType integer), minimum: 0. - /// Write batch timeout. Type: string (or Expression with resultType string), pattern: ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). - /// Sink retry count. Type: integer (or Expression with resultType integer). - /// Sink retry wait. Type: string (or Expression with resultType string), pattern: ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). - /// The maximum concurrent connection count for the sink data store. Type: integer (or Expression with resultType integer). - /// If true, disable data store metrics collection. Default is false. Type: boolean (or Expression with resultType boolean). - /// Additional Properties. - /// The type of copy behavior for copy sink. Type: string (or Expression with resultType string). - /// Single File Parallel. - internal AzureDataLakeStoreSink(string copySinkType, DataFactoryElement writeBatchSize, DataFactoryElement writeBatchTimeout, DataFactoryElement sinkRetryCount, DataFactoryElement sinkRetryWait, DataFactoryElement maxConcurrentConnections, DataFactoryElement disableMetricsCollection, IDictionary> additionalProperties, DataFactoryElement copyBehavior, BinaryData enableAdlsSingleFileParallel) : base(copySinkType, writeBatchSize, writeBatchTimeout, sinkRetryCount, sinkRetryWait, maxConcurrentConnections, disableMetricsCollection, additionalProperties) - { - CopyBehavior = copyBehavior; - EnableAdlsSingleFileParallel = enableAdlsSingleFileParallel; - CopySinkType = copySinkType ?? "AzureDataLakeStoreSink"; - } - - /// The type of copy behavior for copy sink. Type: string (or Expression with resultType string). - public DataFactoryElement CopyBehavior { get; set; } - /// - /// Single File Parallel. - /// - /// To assign an object to this property use . - /// - /// - /// To assign an already formated json string to this property use . - /// - /// - /// Examples: - /// - /// - /// BinaryData.FromObjectAsJson("foo") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromString("\"foo\"") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromObjectAsJson(new { key = "value" }) - /// Creates a payload of { "key": "value" }. - /// - /// - /// BinaryData.FromString("{\"key\": \"value\"}") - /// Creates a payload of { "key": "value" }. - /// - /// - /// - /// - public BinaryData EnableAdlsSingleFileParallel { get; set; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/AzureDataLakeStoreSource.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/AzureDataLakeStoreSource.Serialization.cs deleted file mode 100644 index ab0c00b9..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/AzureDataLakeStoreSource.Serialization.cs +++ /dev/null @@ -1,127 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class AzureDataLakeStoreSource : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - if (Optional.IsDefined(Recursive)) - { - writer.WritePropertyName("recursive"u8); - JsonSerializer.Serialize(writer, Recursive); - } - writer.WritePropertyName("type"u8); - writer.WriteStringValue(CopySourceType); - if (Optional.IsDefined(SourceRetryCount)) - { - writer.WritePropertyName("sourceRetryCount"u8); - JsonSerializer.Serialize(writer, SourceRetryCount); - } - if (Optional.IsDefined(SourceRetryWait)) - { - writer.WritePropertyName("sourceRetryWait"u8); - JsonSerializer.Serialize(writer, SourceRetryWait); - } - if (Optional.IsDefined(MaxConcurrentConnections)) - { - writer.WritePropertyName("maxConcurrentConnections"u8); - JsonSerializer.Serialize(writer, MaxConcurrentConnections); - } - if (Optional.IsDefined(DisableMetricsCollection)) - { - writer.WritePropertyName("disableMetricsCollection"u8); - JsonSerializer.Serialize(writer, DisableMetricsCollection); - } - foreach (var item in AdditionalProperties) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.Value.ToString()).RootElement); -#endif - } - writer.WriteEndObject(); - } - - internal static AzureDataLakeStoreSource DeserializeAzureDataLakeStoreSource(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - Optional> recursive = default; - string type = default; - Optional> sourceRetryCount = default; - Optional> sourceRetryWait = default; - Optional> maxConcurrentConnections = default; - Optional> disableMetricsCollection = default; - IDictionary> additionalProperties = default; - Dictionary> additionalPropertiesDictionary = new Dictionary>(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("recursive"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - recursive = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("type"u8)) - { - type = property.Value.GetString(); - continue; - } - if (property.NameEquals("sourceRetryCount"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - sourceRetryCount = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("sourceRetryWait"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - sourceRetryWait = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("maxConcurrentConnections"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - maxConcurrentConnections = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("disableMetricsCollection"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - disableMetricsCollection = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - additionalPropertiesDictionary.Add(property.Name, JsonSerializer.Deserialize>(property.Value.GetRawText())); - } - additionalProperties = additionalPropertiesDictionary; - return new AzureDataLakeStoreSource(type, sourceRetryCount.Value, sourceRetryWait.Value, maxConcurrentConnections.Value, disableMetricsCollection.Value, additionalProperties, recursive.Value); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/AzureDataLakeStoreSource.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/AzureDataLakeStoreSource.cs deleted file mode 100644 index 33f607ff..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/AzureDataLakeStoreSource.cs +++ /dev/null @@ -1,35 +0,0 @@ -// - -#nullable disable - -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// A copy activity Azure Data Lake source. - public partial class AzureDataLakeStoreSource : CopyActivitySource - { - /// Initializes a new instance of AzureDataLakeStoreSource. - public AzureDataLakeStoreSource() - { - CopySourceType = "AzureDataLakeStoreSource"; - } - - /// Initializes a new instance of AzureDataLakeStoreSource. - /// Copy source type. - /// Source retry count. Type: integer (or Expression with resultType integer). - /// Source retry wait. Type: string (or Expression with resultType string), pattern: ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). - /// The maximum concurrent connection count for the source data store. Type: integer (or Expression with resultType integer). - /// If true, disable data store metrics collection. Default is false. Type: boolean (or Expression with resultType boolean). - /// Additional Properties. - /// If true, files under the folder path will be read recursively. Default is true. Type: boolean (or Expression with resultType boolean). - internal AzureDataLakeStoreSource(string copySourceType, DataFactoryElement sourceRetryCount, DataFactoryElement sourceRetryWait, DataFactoryElement maxConcurrentConnections, DataFactoryElement disableMetricsCollection, IDictionary> additionalProperties, DataFactoryElement recursive) : base(copySourceType, sourceRetryCount, sourceRetryWait, maxConcurrentConnections, disableMetricsCollection, additionalProperties) - { - Recursive = recursive; - CopySourceType = copySourceType ?? "AzureDataLakeStoreSource"; - } - - /// If true, files under the folder path will be read recursively. Default is true. Type: boolean (or Expression with resultType boolean). - public DataFactoryElement Recursive { get; set; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/AzureDataLakeStoreWriteSettings.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/AzureDataLakeStoreWriteSettings.Serialization.cs deleted file mode 100644 index feee327b..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/AzureDataLakeStoreWriteSettings.Serialization.cs +++ /dev/null @@ -1,116 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class AzureDataLakeStoreWriteSettings : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - if (Optional.IsDefined(ExpiryDateTime)) - { - writer.WritePropertyName("expiryDateTime"u8); - JsonSerializer.Serialize(writer, ExpiryDateTime); - } - writer.WritePropertyName("type"u8); - writer.WriteStringValue(StoreWriteSettingsType); - if (Optional.IsDefined(MaxConcurrentConnections)) - { - writer.WritePropertyName("maxConcurrentConnections"u8); - JsonSerializer.Serialize(writer, MaxConcurrentConnections); - } - if (Optional.IsDefined(DisableMetricsCollection)) - { - writer.WritePropertyName("disableMetricsCollection"u8); - JsonSerializer.Serialize(writer, DisableMetricsCollection); - } - if (Optional.IsDefined(CopyBehavior)) - { - writer.WritePropertyName("copyBehavior"u8); -#if NET6_0_OR_GREATER - writer.WriteRawValue(CopyBehavior); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(CopyBehavior.ToString()).RootElement); -#endif - } - foreach (var item in AdditionalProperties) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.Value.ToString()).RootElement); -#endif - } - writer.WriteEndObject(); - } - - internal static AzureDataLakeStoreWriteSettings DeserializeAzureDataLakeStoreWriteSettings(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - Optional> expiryDateTime = default; - string type = default; - Optional> maxConcurrentConnections = default; - Optional> disableMetricsCollection = default; - Optional copyBehavior = default; - IDictionary> additionalProperties = default; - Dictionary> additionalPropertiesDictionary = new Dictionary>(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("expiryDateTime"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - expiryDateTime = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("type"u8)) - { - type = property.Value.GetString(); - continue; - } - if (property.NameEquals("maxConcurrentConnections"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - maxConcurrentConnections = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("disableMetricsCollection"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - disableMetricsCollection = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("copyBehavior"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - copyBehavior = BinaryData.FromString(property.Value.GetRawText()); - continue; - } - additionalPropertiesDictionary.Add(property.Name, JsonSerializer.Deserialize>(property.Value.GetRawText())); - } - additionalProperties = additionalPropertiesDictionary; - return new AzureDataLakeStoreWriteSettings(type, maxConcurrentConnections.Value, disableMetricsCollection.Value, copyBehavior.Value, additionalProperties, expiryDateTime.Value); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/AzureDataLakeStoreWriteSettings.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/AzureDataLakeStoreWriteSettings.cs deleted file mode 100644 index fc96b4f2..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/AzureDataLakeStoreWriteSettings.cs +++ /dev/null @@ -1,34 +0,0 @@ -// - -#nullable disable - -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// Azure data lake store write settings. - public partial class AzureDataLakeStoreWriteSettings : StoreWriteSettings - { - /// Initializes a new instance of AzureDataLakeStoreWriteSettings. - public AzureDataLakeStoreWriteSettings() - { - StoreWriteSettingsType = "AzureDataLakeStoreWriteSettings"; - } - - /// Initializes a new instance of AzureDataLakeStoreWriteSettings. - /// The write setting type. - /// The maximum concurrent connection count for the source data store. Type: integer (or Expression with resultType integer). - /// If true, disable data store metrics collection. Default is false. Type: boolean (or Expression with resultType boolean). - /// The type of copy behavior for copy sink. - /// Additional Properties. - /// Specifies the expiry time of the written files. The time is applied to the UTC time zone in the format of "2018-12-01T05:00:00Z". Default value is NULL. Type: string (or Expression with resultType string). - internal AzureDataLakeStoreWriteSettings(string storeWriteSettingsType, DataFactoryElement maxConcurrentConnections, DataFactoryElement disableMetricsCollection, BinaryData copyBehavior, IDictionary> additionalProperties, DataFactoryElement expiryDateTime) : base(storeWriteSettingsType, maxConcurrentConnections, disableMetricsCollection, copyBehavior, additionalProperties) - { - ExpiryDateTime = expiryDateTime; - StoreWriteSettingsType = storeWriteSettingsType ?? "AzureDataLakeStoreWriteSettings"; - } - - /// Specifies the expiry time of the written files. The time is applied to the UTC time zone in the format of "2018-12-01T05:00:00Z". Default value is NULL. Type: string (or Expression with resultType string). - public DataFactoryElement ExpiryDateTime { get; set; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/AzureDatabricksDeltaLakeDataset.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/AzureDatabricksDeltaLakeDataset.Serialization.cs deleted file mode 100644 index 37402033..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/AzureDatabricksDeltaLakeDataset.Serialization.cs +++ /dev/null @@ -1,227 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class AzureDatabricksDeltaLakeDataset : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - writer.WritePropertyName("type"u8); - writer.WriteStringValue(DatasetType); - if (Optional.IsDefined(Description)) - { - writer.WritePropertyName("description"u8); - writer.WriteStringValue(Description); - } - if (Optional.IsDefined(Structure)) - { - writer.WritePropertyName("structure"u8); - JsonSerializer.Serialize(writer, Structure); - } - if (Optional.IsDefined(Schema)) - { - writer.WritePropertyName("schema"u8); - JsonSerializer.Serialize(writer, Schema); - } - writer.WritePropertyName("linkedServiceName"u8); - JsonSerializer.Serialize(writer, LinkedServiceName); if (Optional.IsCollectionDefined(Parameters)) - { - writer.WritePropertyName("parameters"u8); - writer.WriteStartObject(); - foreach (var item in Parameters) - { - writer.WritePropertyName(item.Key); - writer.WriteObjectValue(item.Value); - } - writer.WriteEndObject(); - } - if (Optional.IsCollectionDefined(Annotations)) - { - writer.WritePropertyName("annotations"u8); - writer.WriteStartArray(); - foreach (var item in Annotations) - { - if (item == null) - { - writer.WriteNullValue(); - continue; - } -#if NET6_0_OR_GREATER - writer.WriteRawValue(item); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.ToString()).RootElement); -#endif - } - writer.WriteEndArray(); - } - if (Optional.IsDefined(Folder)) - { - writer.WritePropertyName("folder"u8); - writer.WriteObjectValue(Folder); - } - writer.WritePropertyName("typeProperties"u8); - writer.WriteStartObject(); - if (Optional.IsDefined(Table)) - { - writer.WritePropertyName("table"u8); - JsonSerializer.Serialize(writer, Table); - } - if (Optional.IsDefined(Database)) - { - writer.WritePropertyName("database"u8); - JsonSerializer.Serialize(writer, Database); - } - writer.WriteEndObject(); - foreach (var item in AdditionalProperties) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.Value.ToString()).RootElement); -#endif - } - writer.WriteEndObject(); - } - - internal static AzureDatabricksDeltaLakeDataset DeserializeAzureDatabricksDeltaLakeDataset(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - string type = default; - Optional description = default; - Optional>> structure = default; - Optional>> schema = default; - DataFactoryLinkedServiceReference linkedServiceName = default; - Optional> parameters = default; - Optional> annotations = default; - Optional folder = default; - Optional> table = default; - Optional> database = default; - IDictionary> additionalProperties = default; - Dictionary> additionalPropertiesDictionary = new Dictionary>(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("type"u8)) - { - type = property.Value.GetString(); - continue; - } - if (property.NameEquals("description"u8)) - { - description = property.Value.GetString(); - continue; - } - if (property.NameEquals("structure"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - structure = JsonSerializer.Deserialize>>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("schema"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - schema = JsonSerializer.Deserialize>>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("linkedServiceName"u8)) - { - linkedServiceName = JsonSerializer.Deserialize(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("parameters"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - Dictionary dictionary = new Dictionary(); - foreach (var property0 in property.Value.EnumerateObject()) - { - dictionary.Add(property0.Name, EntityParameterSpecification.DeserializeEntityParameterSpecification(property0.Value)); - } - parameters = dictionary; - continue; - } - if (property.NameEquals("annotations"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - if (item.ValueKind == JsonValueKind.Null) - { - array.Add(null); - } - else - { - array.Add(BinaryData.FromString(item.GetRawText())); - } - } - annotations = array; - continue; - } - if (property.NameEquals("folder"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - folder = DatasetFolder.DeserializeDatasetFolder(property.Value); - continue; - } - if (property.NameEquals("typeProperties"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - foreach (var property0 in property.Value.EnumerateObject()) - { - if (property0.NameEquals("table"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - table = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("database"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - database = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - } - continue; - } - additionalPropertiesDictionary.Add(property.Name, JsonSerializer.Deserialize>(property.Value.GetRawText())); - } - additionalProperties = additionalPropertiesDictionary; - return new AzureDatabricksDeltaLakeDataset(type, description.Value, structure.Value, schema.Value, linkedServiceName, Optional.ToDictionary(parameters), Optional.ToList(annotations), folder.Value, additionalProperties, table.Value, database.Value); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/AzureDatabricksDeltaLakeDataset.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/AzureDatabricksDeltaLakeDataset.cs deleted file mode 100644 index 9964bbc2..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/AzureDatabricksDeltaLakeDataset.cs +++ /dev/null @@ -1,47 +0,0 @@ -// - -#nullable disable - -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// Azure Databricks Delta Lake dataset. - public partial class AzureDatabricksDeltaLakeDataset : DataFactoryDatasetProperties - { - /// Initializes a new instance of AzureDatabricksDeltaLakeDataset. - /// Linked service reference. - /// is null. - public AzureDatabricksDeltaLakeDataset(DataFactoryLinkedServiceReference linkedServiceName) : base(linkedServiceName) - { - Argument.AssertNotNull(linkedServiceName, nameof(linkedServiceName)); - - DatasetType = "AzureDatabricksDeltaLakeDataset"; - } - - /// Initializes a new instance of AzureDatabricksDeltaLakeDataset. - /// Type of dataset. - /// Dataset description. - /// Columns that define the structure of the dataset. Type: array (or Expression with resultType array), itemType: DatasetDataElement. - /// Columns that define the physical type schema of the dataset. Type: array (or Expression with resultType array), itemType: DatasetSchemaDataElement. - /// Linked service reference. - /// Parameters for dataset. - /// List of tags that can be used for describing the Dataset. - /// The folder that this Dataset is in. If not specified, Dataset will appear at the root level. - /// Additional Properties. - /// The name of delta table. Type: string (or Expression with resultType string). - /// The database name of delta table. Type: string (or Expression with resultType string). - internal AzureDatabricksDeltaLakeDataset(string datasetType, string description, DataFactoryElement> structure, DataFactoryElement> schema, DataFactoryLinkedServiceReference linkedServiceName, IDictionary parameters, IList annotations, DatasetFolder folder, IDictionary> additionalProperties, DataFactoryElement table, DataFactoryElement database) : base(datasetType, description, structure, schema, linkedServiceName, parameters, annotations, folder, additionalProperties) - { - Table = table; - Database = database; - DatasetType = datasetType ?? "AzureDatabricksDeltaLakeDataset"; - } - - /// The name of delta table. Type: string (or Expression with resultType string). - public DataFactoryElement Table { get; set; } - /// The database name of delta table. Type: string (or Expression with resultType string). - public DataFactoryElement Database { get; set; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/AzureDatabricksDeltaLakeExportCommand.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/AzureDatabricksDeltaLakeExportCommand.Serialization.cs deleted file mode 100644 index aeca33fd..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/AzureDatabricksDeltaLakeExportCommand.Serialization.cs +++ /dev/null @@ -1,82 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class AzureDatabricksDeltaLakeExportCommand : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - if (Optional.IsDefined(DateFormat)) - { - writer.WritePropertyName("dateFormat"u8); - JsonSerializer.Serialize(writer, DateFormat); - } - if (Optional.IsDefined(TimestampFormat)) - { - writer.WritePropertyName("timestampFormat"u8); - JsonSerializer.Serialize(writer, TimestampFormat); - } - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ExportSettingsType); - foreach (var item in AdditionalProperties) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.Value.ToString()).RootElement); -#endif - } - writer.WriteEndObject(); - } - - internal static AzureDatabricksDeltaLakeExportCommand DeserializeAzureDatabricksDeltaLakeExportCommand(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - Optional> dateFormat = default; - Optional> timestampFormat = default; - string type = default; - IDictionary> additionalProperties = default; - Dictionary> additionalPropertiesDictionary = new Dictionary>(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("dateFormat"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - dateFormat = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("timestampFormat"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - timestampFormat = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("type"u8)) - { - type = property.Value.GetString(); - continue; - } - additionalPropertiesDictionary.Add(property.Name, JsonSerializer.Deserialize>(property.Value.GetRawText())); - } - additionalProperties = additionalPropertiesDictionary; - return new AzureDatabricksDeltaLakeExportCommand(type, additionalProperties, dateFormat.Value, timestampFormat.Value); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/AzureDatabricksDeltaLakeExportCommand.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/AzureDatabricksDeltaLakeExportCommand.cs deleted file mode 100644 index 6b31f6b5..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/AzureDatabricksDeltaLakeExportCommand.cs +++ /dev/null @@ -1,35 +0,0 @@ -// - -#nullable disable - -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// Azure Databricks Delta Lake export command settings. - public partial class AzureDatabricksDeltaLakeExportCommand : ExportSettings - { - /// Initializes a new instance of AzureDatabricksDeltaLakeExportCommand. - public AzureDatabricksDeltaLakeExportCommand() - { - ExportSettingsType = "AzureDatabricksDeltaLakeExportCommand"; - } - - /// Initializes a new instance of AzureDatabricksDeltaLakeExportCommand. - /// The export setting type. - /// Additional Properties. - /// Specify the date format for the csv in Azure Databricks Delta Lake Copy. Type: string (or Expression with resultType string). - /// Specify the timestamp format for the csv in Azure Databricks Delta Lake Copy. Type: string (or Expression with resultType string). - internal AzureDatabricksDeltaLakeExportCommand(string exportSettingsType, IDictionary> additionalProperties, DataFactoryElement dateFormat, DataFactoryElement timestampFormat) : base(exportSettingsType, additionalProperties) - { - DateFormat = dateFormat; - TimestampFormat = timestampFormat; - ExportSettingsType = exportSettingsType ?? "AzureDatabricksDeltaLakeExportCommand"; - } - - /// Specify the date format for the csv in Azure Databricks Delta Lake Copy. Type: string (or Expression with resultType string). - public DataFactoryElement DateFormat { get; set; } - /// Specify the timestamp format for the csv in Azure Databricks Delta Lake Copy. Type: string (or Expression with resultType string). - public DataFactoryElement TimestampFormat { get; set; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/AzureDatabricksDeltaLakeImportCommand.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/AzureDatabricksDeltaLakeImportCommand.Serialization.cs deleted file mode 100644 index 7cad679b..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/AzureDatabricksDeltaLakeImportCommand.Serialization.cs +++ /dev/null @@ -1,82 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class AzureDatabricksDeltaLakeImportCommand : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - if (Optional.IsDefined(DateFormat)) - { - writer.WritePropertyName("dateFormat"u8); - JsonSerializer.Serialize(writer, DateFormat); - } - if (Optional.IsDefined(TimestampFormat)) - { - writer.WritePropertyName("timestampFormat"u8); - JsonSerializer.Serialize(writer, TimestampFormat); - } - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ImportSettingsType); - foreach (var item in AdditionalProperties) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.Value.ToString()).RootElement); -#endif - } - writer.WriteEndObject(); - } - - internal static AzureDatabricksDeltaLakeImportCommand DeserializeAzureDatabricksDeltaLakeImportCommand(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - Optional> dateFormat = default; - Optional> timestampFormat = default; - string type = default; - IDictionary> additionalProperties = default; - Dictionary> additionalPropertiesDictionary = new Dictionary>(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("dateFormat"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - dateFormat = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("timestampFormat"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - timestampFormat = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("type"u8)) - { - type = property.Value.GetString(); - continue; - } - additionalPropertiesDictionary.Add(property.Name, JsonSerializer.Deserialize>(property.Value.GetRawText())); - } - additionalProperties = additionalPropertiesDictionary; - return new AzureDatabricksDeltaLakeImportCommand(type, additionalProperties, dateFormat.Value, timestampFormat.Value); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/AzureDatabricksDeltaLakeImportCommand.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/AzureDatabricksDeltaLakeImportCommand.cs deleted file mode 100644 index 9619beef..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/AzureDatabricksDeltaLakeImportCommand.cs +++ /dev/null @@ -1,35 +0,0 @@ -// - -#nullable disable - -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// Azure Databricks Delta Lake import command settings. - public partial class AzureDatabricksDeltaLakeImportCommand : ImportSettings - { - /// Initializes a new instance of AzureDatabricksDeltaLakeImportCommand. - public AzureDatabricksDeltaLakeImportCommand() - { - ImportSettingsType = "AzureDatabricksDeltaLakeImportCommand"; - } - - /// Initializes a new instance of AzureDatabricksDeltaLakeImportCommand. - /// The import setting type. - /// Additional Properties. - /// Specify the date format for csv in Azure Databricks Delta Lake Copy. Type: string (or Expression with resultType string). - /// Specify the timestamp format for csv in Azure Databricks Delta Lake Copy. Type: string (or Expression with resultType string). - internal AzureDatabricksDeltaLakeImportCommand(string importSettingsType, IDictionary> additionalProperties, DataFactoryElement dateFormat, DataFactoryElement timestampFormat) : base(importSettingsType, additionalProperties) - { - DateFormat = dateFormat; - TimestampFormat = timestampFormat; - ImportSettingsType = importSettingsType ?? "AzureDatabricksDeltaLakeImportCommand"; - } - - /// Specify the date format for csv in Azure Databricks Delta Lake Copy. Type: string (or Expression with resultType string). - public DataFactoryElement DateFormat { get; set; } - /// Specify the timestamp format for csv in Azure Databricks Delta Lake Copy. Type: string (or Expression with resultType string). - public DataFactoryElement TimestampFormat { get; set; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/AzureDatabricksDeltaLakeLinkedService.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/AzureDatabricksDeltaLakeLinkedService.Serialization.cs deleted file mode 100644 index 2cd23405..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/AzureDatabricksDeltaLakeLinkedService.Serialization.cs +++ /dev/null @@ -1,239 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class AzureDatabricksDeltaLakeLinkedService : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - writer.WritePropertyName("type"u8); - writer.WriteStringValue(LinkedServiceType); - if (Optional.IsDefined(ConnectVia)) - { - writer.WritePropertyName("connectVia"u8); - writer.WriteObjectValue(ConnectVia); - } - if (Optional.IsDefined(Description)) - { - writer.WritePropertyName("description"u8); - writer.WriteStringValue(Description); - } - if (Optional.IsCollectionDefined(Parameters)) - { - writer.WritePropertyName("parameters"u8); - writer.WriteStartObject(); - foreach (var item in Parameters) - { - writer.WritePropertyName(item.Key); - writer.WriteObjectValue(item.Value); - } - writer.WriteEndObject(); - } - if (Optional.IsCollectionDefined(Annotations)) - { - writer.WritePropertyName("annotations"u8); - writer.WriteStartArray(); - foreach (var item in Annotations) - { - if (item == null) - { - writer.WriteNullValue(); - continue; - } -#if NET6_0_OR_GREATER - writer.WriteRawValue(item); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.ToString()).RootElement); -#endif - } - writer.WriteEndArray(); - } - writer.WritePropertyName("typeProperties"u8); - writer.WriteStartObject(); - writer.WritePropertyName("domain"u8); - JsonSerializer.Serialize(writer, Domain); - if (Optional.IsDefined(AccessToken)) - { - writer.WritePropertyName("accessToken"u8); - JsonSerializer.Serialize(writer, AccessToken); - } - if (Optional.IsDefined(ClusterId)) - { - writer.WritePropertyName("clusterId"u8); - JsonSerializer.Serialize(writer, ClusterId); - } - if (Optional.IsDefined(EncryptedCredential)) - { - writer.WritePropertyName("encryptedCredential"u8); - writer.WriteStringValue(EncryptedCredential); - } - if (Optional.IsDefined(Credential)) - { - writer.WritePropertyName("credential"u8); - writer.WriteObjectValue(Credential); - } - if (Optional.IsDefined(WorkspaceResourceId)) - { - writer.WritePropertyName("workspaceResourceId"u8); - JsonSerializer.Serialize(writer, WorkspaceResourceId); - } - writer.WriteEndObject(); - foreach (var item in AdditionalProperties) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.Value.ToString()).RootElement); -#endif - } - writer.WriteEndObject(); - } - - internal static AzureDatabricksDeltaLakeLinkedService DeserializeAzureDatabricksDeltaLakeLinkedService(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - string type = default; - Optional connectVia = default; - Optional description = default; - Optional> parameters = default; - Optional> annotations = default; - DataFactoryElement domain = default; - Optional accessToken = default; - Optional> clusterId = default; - Optional encryptedCredential = default; - Optional credential = default; - Optional> workspaceResourceId = default; - IDictionary> additionalProperties = default; - Dictionary> additionalPropertiesDictionary = new Dictionary>(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("type"u8)) - { - type = property.Value.GetString(); - continue; - } - if (property.NameEquals("connectVia"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - connectVia = IntegrationRuntimeReference.DeserializeIntegrationRuntimeReference(property.Value); - continue; - } - if (property.NameEquals("description"u8)) - { - description = property.Value.GetString(); - continue; - } - if (property.NameEquals("parameters"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - Dictionary dictionary = new Dictionary(); - foreach (var property0 in property.Value.EnumerateObject()) - { - dictionary.Add(property0.Name, EntityParameterSpecification.DeserializeEntityParameterSpecification(property0.Value)); - } - parameters = dictionary; - continue; - } - if (property.NameEquals("annotations"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - if (item.ValueKind == JsonValueKind.Null) - { - array.Add(null); - } - else - { - array.Add(BinaryData.FromString(item.GetRawText())); - } - } - annotations = array; - continue; - } - if (property.NameEquals("typeProperties"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - foreach (var property0 in property.Value.EnumerateObject()) - { - if (property0.NameEquals("domain"u8)) - { - domain = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("accessToken"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - accessToken = JsonSerializer.Deserialize(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("clusterId"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - clusterId = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("encryptedCredential"u8)) - { - encryptedCredential = property0.Value.GetString(); - continue; - } - if (property0.NameEquals("credential"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - credential = DataFactoryCredentialReference.DeserializeDataFactoryCredentialReference(property0.Value); - continue; - } - if (property0.NameEquals("workspaceResourceId"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - workspaceResourceId = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - } - continue; - } - additionalPropertiesDictionary.Add(property.Name, JsonSerializer.Deserialize>(property.Value.GetRawText())); - } - additionalProperties = additionalPropertiesDictionary; - return new AzureDatabricksDeltaLakeLinkedService(type, connectVia.Value, description.Value, Optional.ToDictionary(parameters), Optional.ToList(annotations), additionalProperties, domain, accessToken, clusterId.Value, encryptedCredential.Value, credential.Value, workspaceResourceId.Value); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/AzureDatabricksDeltaLakeLinkedService.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/AzureDatabricksDeltaLakeLinkedService.cs deleted file mode 100644 index 4c652ada..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/AzureDatabricksDeltaLakeLinkedService.cs +++ /dev/null @@ -1,61 +0,0 @@ -// - -#nullable disable - -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// Azure Databricks Delta Lake linked service. - public partial class AzureDatabricksDeltaLakeLinkedService : DataFactoryLinkedServiceProperties - { - /// Initializes a new instance of AzureDatabricksDeltaLakeLinkedService. - /// <REGION>.azuredatabricks.net, domain name of your Databricks deployment. Type: string (or Expression with resultType string). - /// is null. - public AzureDatabricksDeltaLakeLinkedService(DataFactoryElement domain) - { - Argument.AssertNotNull(domain, nameof(domain)); - - Domain = domain; - LinkedServiceType = "AzureDatabricksDeltaLake"; - } - - /// Initializes a new instance of AzureDatabricksDeltaLakeLinkedService. - /// Type of linked service. - /// The integration runtime reference. - /// Linked service description. - /// Parameters for linked service. - /// List of tags that can be used for describing the linked service. - /// Additional Properties. - /// <REGION>.azuredatabricks.net, domain name of your Databricks deployment. Type: string (or Expression with resultType string). - /// Access token for databricks REST API. Refer to https://docs.azuredatabricks.net/api/latest/authentication.html. Type: string, SecureString or AzureKeyVaultSecretReference. - /// The id of an existing interactive cluster that will be used for all runs of this job. Type: string (or Expression with resultType string). - /// The encrypted credential used for authentication. Credentials are encrypted using the integration runtime credential manager. Type: string. - /// The credential reference containing authentication information. - /// Workspace resource id for databricks REST API. Type: string (or Expression with resultType string). - internal AzureDatabricksDeltaLakeLinkedService(string linkedServiceType, IntegrationRuntimeReference connectVia, string description, IDictionary parameters, IList annotations, IDictionary> additionalProperties, DataFactoryElement domain, DataFactorySecretBaseDefinition accessToken, DataFactoryElement clusterId, string encryptedCredential, DataFactoryCredentialReference credential, DataFactoryElement workspaceResourceId) : base(linkedServiceType, connectVia, description, parameters, annotations, additionalProperties) - { - Domain = domain; - AccessToken = accessToken; - ClusterId = clusterId; - EncryptedCredential = encryptedCredential; - Credential = credential; - WorkspaceResourceId = workspaceResourceId; - LinkedServiceType = linkedServiceType ?? "AzureDatabricksDeltaLake"; - } - - /// <REGION>.azuredatabricks.net, domain name of your Databricks deployment. Type: string (or Expression with resultType string). - public DataFactoryElement Domain { get; set; } - /// Access token for databricks REST API. Refer to https://docs.azuredatabricks.net/api/latest/authentication.html. Type: string, SecureString or AzureKeyVaultSecretReference. - public DataFactorySecretBaseDefinition AccessToken { get; set; } - /// The id of an existing interactive cluster that will be used for all runs of this job. Type: string (or Expression with resultType string). - public DataFactoryElement ClusterId { get; set; } - /// The encrypted credential used for authentication. Credentials are encrypted using the integration runtime credential manager. Type: string. - public string EncryptedCredential { get; set; } - /// The credential reference containing authentication information. - public DataFactoryCredentialReference Credential { get; set; } - /// Workspace resource id for databricks REST API. Type: string (or Expression with resultType string). - public DataFactoryElement WorkspaceResourceId { get; set; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/AzureDatabricksDeltaLakeSink.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/AzureDatabricksDeltaLakeSink.Serialization.cs deleted file mode 100644 index a32a4ada..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/AzureDatabricksDeltaLakeSink.Serialization.cs +++ /dev/null @@ -1,172 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class AzureDatabricksDeltaLakeSink : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - if (Optional.IsDefined(PreCopyScript)) - { - writer.WritePropertyName("preCopyScript"u8); - JsonSerializer.Serialize(writer, PreCopyScript); - } - if (Optional.IsDefined(ImportSettings)) - { - writer.WritePropertyName("importSettings"u8); - writer.WriteObjectValue(ImportSettings); - } - writer.WritePropertyName("type"u8); - writer.WriteStringValue(CopySinkType); - if (Optional.IsDefined(WriteBatchSize)) - { - writer.WritePropertyName("writeBatchSize"u8); - JsonSerializer.Serialize(writer, WriteBatchSize); - } - if (Optional.IsDefined(WriteBatchTimeout)) - { - writer.WritePropertyName("writeBatchTimeout"u8); - JsonSerializer.Serialize(writer, WriteBatchTimeout); - } - if (Optional.IsDefined(SinkRetryCount)) - { - writer.WritePropertyName("sinkRetryCount"u8); - JsonSerializer.Serialize(writer, SinkRetryCount); - } - if (Optional.IsDefined(SinkRetryWait)) - { - writer.WritePropertyName("sinkRetryWait"u8); - JsonSerializer.Serialize(writer, SinkRetryWait); - } - if (Optional.IsDefined(MaxConcurrentConnections)) - { - writer.WritePropertyName("maxConcurrentConnections"u8); - JsonSerializer.Serialize(writer, MaxConcurrentConnections); - } - if (Optional.IsDefined(DisableMetricsCollection)) - { - writer.WritePropertyName("disableMetricsCollection"u8); - JsonSerializer.Serialize(writer, DisableMetricsCollection); - } - foreach (var item in AdditionalProperties) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.Value.ToString()).RootElement); -#endif - } - writer.WriteEndObject(); - } - - internal static AzureDatabricksDeltaLakeSink DeserializeAzureDatabricksDeltaLakeSink(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - Optional> preCopyScript = default; - Optional importSettings = default; - string type = default; - Optional> writeBatchSize = default; - Optional> writeBatchTimeout = default; - Optional> sinkRetryCount = default; - Optional> sinkRetryWait = default; - Optional> maxConcurrentConnections = default; - Optional> disableMetricsCollection = default; - IDictionary> additionalProperties = default; - Dictionary> additionalPropertiesDictionary = new Dictionary>(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("preCopyScript"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - preCopyScript = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("importSettings"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - importSettings = AzureDatabricksDeltaLakeImportCommand.DeserializeAzureDatabricksDeltaLakeImportCommand(property.Value); - continue; - } - if (property.NameEquals("type"u8)) - { - type = property.Value.GetString(); - continue; - } - if (property.NameEquals("writeBatchSize"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - writeBatchSize = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("writeBatchTimeout"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - writeBatchTimeout = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("sinkRetryCount"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - sinkRetryCount = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("sinkRetryWait"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - sinkRetryWait = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("maxConcurrentConnections"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - maxConcurrentConnections = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("disableMetricsCollection"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - disableMetricsCollection = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - additionalPropertiesDictionary.Add(property.Name, JsonSerializer.Deserialize>(property.Value.GetRawText())); - } - additionalProperties = additionalPropertiesDictionary; - return new AzureDatabricksDeltaLakeSink(type, writeBatchSize.Value, writeBatchTimeout.Value, sinkRetryCount.Value, sinkRetryWait.Value, maxConcurrentConnections.Value, disableMetricsCollection.Value, additionalProperties, preCopyScript.Value, importSettings.Value); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/AzureDatabricksDeltaLakeSink.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/AzureDatabricksDeltaLakeSink.cs deleted file mode 100644 index 7e50f898..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/AzureDatabricksDeltaLakeSink.cs +++ /dev/null @@ -1,41 +0,0 @@ -// - -#nullable disable - -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// A copy activity Azure Databricks Delta Lake sink. - public partial class AzureDatabricksDeltaLakeSink : CopySink - { - /// Initializes a new instance of AzureDatabricksDeltaLakeSink. - public AzureDatabricksDeltaLakeSink() - { - CopySinkType = "AzureDatabricksDeltaLakeSink"; - } - - /// Initializes a new instance of AzureDatabricksDeltaLakeSink. - /// Copy sink type. - /// Write batch size. Type: integer (or Expression with resultType integer), minimum: 0. - /// Write batch timeout. Type: string (or Expression with resultType string), pattern: ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). - /// Sink retry count. Type: integer (or Expression with resultType integer). - /// Sink retry wait. Type: string (or Expression with resultType string), pattern: ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). - /// The maximum concurrent connection count for the sink data store. Type: integer (or Expression with resultType integer). - /// If true, disable data store metrics collection. Default is false. Type: boolean (or Expression with resultType boolean). - /// Additional Properties. - /// SQL pre-copy script. Type: string (or Expression with resultType string). - /// Azure Databricks Delta Lake import settings. - internal AzureDatabricksDeltaLakeSink(string copySinkType, DataFactoryElement writeBatchSize, DataFactoryElement writeBatchTimeout, DataFactoryElement sinkRetryCount, DataFactoryElement sinkRetryWait, DataFactoryElement maxConcurrentConnections, DataFactoryElement disableMetricsCollection, IDictionary> additionalProperties, DataFactoryElement preCopyScript, AzureDatabricksDeltaLakeImportCommand importSettings) : base(copySinkType, writeBatchSize, writeBatchTimeout, sinkRetryCount, sinkRetryWait, maxConcurrentConnections, disableMetricsCollection, additionalProperties) - { - PreCopyScript = preCopyScript; - ImportSettings = importSettings; - CopySinkType = copySinkType ?? "AzureDatabricksDeltaLakeSink"; - } - - /// SQL pre-copy script. Type: string (or Expression with resultType string). - public DataFactoryElement PreCopyScript { get; set; } - /// Azure Databricks Delta Lake import settings. - public AzureDatabricksDeltaLakeImportCommand ImportSettings { get; set; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/AzureDatabricksDeltaLakeSource.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/AzureDatabricksDeltaLakeSource.Serialization.cs deleted file mode 100644 index f1358711..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/AzureDatabricksDeltaLakeSource.Serialization.cs +++ /dev/null @@ -1,142 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class AzureDatabricksDeltaLakeSource : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - if (Optional.IsDefined(Query)) - { - writer.WritePropertyName("query"u8); - JsonSerializer.Serialize(writer, Query); - } - if (Optional.IsDefined(ExportSettings)) - { - writer.WritePropertyName("exportSettings"u8); - writer.WriteObjectValue(ExportSettings); - } - writer.WritePropertyName("type"u8); - writer.WriteStringValue(CopySourceType); - if (Optional.IsDefined(SourceRetryCount)) - { - writer.WritePropertyName("sourceRetryCount"u8); - JsonSerializer.Serialize(writer, SourceRetryCount); - } - if (Optional.IsDefined(SourceRetryWait)) - { - writer.WritePropertyName("sourceRetryWait"u8); - JsonSerializer.Serialize(writer, SourceRetryWait); - } - if (Optional.IsDefined(MaxConcurrentConnections)) - { - writer.WritePropertyName("maxConcurrentConnections"u8); - JsonSerializer.Serialize(writer, MaxConcurrentConnections); - } - if (Optional.IsDefined(DisableMetricsCollection)) - { - writer.WritePropertyName("disableMetricsCollection"u8); - JsonSerializer.Serialize(writer, DisableMetricsCollection); - } - foreach (var item in AdditionalProperties) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.Value.ToString()).RootElement); -#endif - } - writer.WriteEndObject(); - } - - internal static AzureDatabricksDeltaLakeSource DeserializeAzureDatabricksDeltaLakeSource(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - Optional> query = default; - Optional exportSettings = default; - string type = default; - Optional> sourceRetryCount = default; - Optional> sourceRetryWait = default; - Optional> maxConcurrentConnections = default; - Optional> disableMetricsCollection = default; - IDictionary> additionalProperties = default; - Dictionary> additionalPropertiesDictionary = new Dictionary>(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("query"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - query = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("exportSettings"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - exportSettings = AzureDatabricksDeltaLakeExportCommand.DeserializeAzureDatabricksDeltaLakeExportCommand(property.Value); - continue; - } - if (property.NameEquals("type"u8)) - { - type = property.Value.GetString(); - continue; - } - if (property.NameEquals("sourceRetryCount"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - sourceRetryCount = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("sourceRetryWait"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - sourceRetryWait = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("maxConcurrentConnections"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - maxConcurrentConnections = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("disableMetricsCollection"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - disableMetricsCollection = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - additionalPropertiesDictionary.Add(property.Name, JsonSerializer.Deserialize>(property.Value.GetRawText())); - } - additionalProperties = additionalPropertiesDictionary; - return new AzureDatabricksDeltaLakeSource(type, sourceRetryCount.Value, sourceRetryWait.Value, maxConcurrentConnections.Value, disableMetricsCollection.Value, additionalProperties, query.Value, exportSettings.Value); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/AzureDatabricksDeltaLakeSource.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/AzureDatabricksDeltaLakeSource.cs deleted file mode 100644 index 1f3d9d51..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/AzureDatabricksDeltaLakeSource.cs +++ /dev/null @@ -1,39 +0,0 @@ -// - -#nullable disable - -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// A copy activity Azure Databricks Delta Lake source. - public partial class AzureDatabricksDeltaLakeSource : CopyActivitySource - { - /// Initializes a new instance of AzureDatabricksDeltaLakeSource. - public AzureDatabricksDeltaLakeSource() - { - CopySourceType = "AzureDatabricksDeltaLakeSource"; - } - - /// Initializes a new instance of AzureDatabricksDeltaLakeSource. - /// Copy source type. - /// Source retry count. Type: integer (or Expression with resultType integer). - /// Source retry wait. Type: string (or Expression with resultType string), pattern: ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). - /// The maximum concurrent connection count for the source data store. Type: integer (or Expression with resultType integer). - /// If true, disable data store metrics collection. Default is false. Type: boolean (or Expression with resultType boolean). - /// Additional Properties. - /// Azure Databricks Delta Lake Sql query. Type: string (or Expression with resultType string). - /// Azure Databricks Delta Lake export settings. - internal AzureDatabricksDeltaLakeSource(string copySourceType, DataFactoryElement sourceRetryCount, DataFactoryElement sourceRetryWait, DataFactoryElement maxConcurrentConnections, DataFactoryElement disableMetricsCollection, IDictionary> additionalProperties, DataFactoryElement query, AzureDatabricksDeltaLakeExportCommand exportSettings) : base(copySourceType, sourceRetryCount, sourceRetryWait, maxConcurrentConnections, disableMetricsCollection, additionalProperties) - { - Query = query; - ExportSettings = exportSettings; - CopySourceType = copySourceType ?? "AzureDatabricksDeltaLakeSource"; - } - - /// Azure Databricks Delta Lake Sql query. Type: string (or Expression with resultType string). - public DataFactoryElement Query { get; set; } - /// Azure Databricks Delta Lake export settings. - public AzureDatabricksDeltaLakeExportCommand ExportSettings { get; set; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/AzureDatabricksLinkedService.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/AzureDatabricksLinkedService.Serialization.cs deleted file mode 100644 index 56da33db..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/AzureDatabricksLinkedService.Serialization.cs +++ /dev/null @@ -1,515 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class AzureDatabricksLinkedService : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - writer.WritePropertyName("type"u8); - writer.WriteStringValue(LinkedServiceType); - if (Optional.IsDefined(ConnectVia)) - { - writer.WritePropertyName("connectVia"u8); - writer.WriteObjectValue(ConnectVia); - } - if (Optional.IsDefined(Description)) - { - writer.WritePropertyName("description"u8); - writer.WriteStringValue(Description); - } - if (Optional.IsCollectionDefined(Parameters)) - { - writer.WritePropertyName("parameters"u8); - writer.WriteStartObject(); - foreach (var item in Parameters) - { - writer.WritePropertyName(item.Key); - writer.WriteObjectValue(item.Value); - } - writer.WriteEndObject(); - } - if (Optional.IsCollectionDefined(Annotations)) - { - writer.WritePropertyName("annotations"u8); - writer.WriteStartArray(); - foreach (var item in Annotations) - { - if (item == null) - { - writer.WriteNullValue(); - continue; - } -#if NET6_0_OR_GREATER - writer.WriteRawValue(item); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.ToString()).RootElement); -#endif - } - writer.WriteEndArray(); - } - writer.WritePropertyName("typeProperties"u8); - writer.WriteStartObject(); - writer.WritePropertyName("domain"u8); - JsonSerializer.Serialize(writer, Domain); - if (Optional.IsDefined(AccessToken)) - { - writer.WritePropertyName("accessToken"u8); - JsonSerializer.Serialize(writer, AccessToken); - } - if (Optional.IsDefined(Authentication)) - { - writer.WritePropertyName("authentication"u8); - JsonSerializer.Serialize(writer, Authentication); - } - if (Optional.IsDefined(WorkspaceResourceId)) - { - writer.WritePropertyName("workspaceResourceId"u8); - JsonSerializer.Serialize(writer, WorkspaceResourceId); - } - if (Optional.IsDefined(ExistingClusterId)) - { - writer.WritePropertyName("existingClusterId"u8); - JsonSerializer.Serialize(writer, ExistingClusterId); - } - if (Optional.IsDefined(InstancePoolId)) - { - writer.WritePropertyName("instancePoolId"u8); - JsonSerializer.Serialize(writer, InstancePoolId); - } - if (Optional.IsDefined(NewClusterVersion)) - { - writer.WritePropertyName("newClusterVersion"u8); - JsonSerializer.Serialize(writer, NewClusterVersion); - } - if (Optional.IsDefined(NewClusterNumOfWorker)) - { - writer.WritePropertyName("newClusterNumOfWorker"u8); - JsonSerializer.Serialize(writer, NewClusterNumOfWorker); - } - if (Optional.IsDefined(NewClusterNodeType)) - { - writer.WritePropertyName("newClusterNodeType"u8); - JsonSerializer.Serialize(writer, NewClusterNodeType); - } - if (Optional.IsCollectionDefined(NewClusterSparkConf)) - { - writer.WritePropertyName("newClusterSparkConf"u8); - writer.WriteStartObject(); - foreach (var item in NewClusterSparkConf) - { - writer.WritePropertyName(item.Key); - if (item.Value == null) - { - writer.WriteNullValue(); - continue; - } -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.Value.ToString()).RootElement); -#endif - } - writer.WriteEndObject(); - } - if (Optional.IsCollectionDefined(NewClusterSparkEnvVars)) - { - writer.WritePropertyName("newClusterSparkEnvVars"u8); - writer.WriteStartObject(); - foreach (var item in NewClusterSparkEnvVars) - { - writer.WritePropertyName(item.Key); - if (item.Value == null) - { - writer.WriteNullValue(); - continue; - } -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.Value.ToString()).RootElement); -#endif - } - writer.WriteEndObject(); - } - if (Optional.IsCollectionDefined(NewClusterCustomTags)) - { - writer.WritePropertyName("newClusterCustomTags"u8); - writer.WriteStartObject(); - foreach (var item in NewClusterCustomTags) - { - writer.WritePropertyName(item.Key); - if (item.Value == null) - { - writer.WriteNullValue(); - continue; - } -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.Value.ToString()).RootElement); -#endif - } - writer.WriteEndObject(); - } - if (Optional.IsDefined(NewClusterLogDestination)) - { - writer.WritePropertyName("newClusterLogDestination"u8); - JsonSerializer.Serialize(writer, NewClusterLogDestination); - } - if (Optional.IsDefined(NewClusterDriverNodeType)) - { - writer.WritePropertyName("newClusterDriverNodeType"u8); - JsonSerializer.Serialize(writer, NewClusterDriverNodeType); - } - if (Optional.IsDefined(NewClusterInitScripts)) - { - writer.WritePropertyName("newClusterInitScripts"u8); - JsonSerializer.Serialize(writer, NewClusterInitScripts); - } - if (Optional.IsDefined(NewClusterEnableElasticDisk)) - { - writer.WritePropertyName("newClusterEnableElasticDisk"u8); - JsonSerializer.Serialize(writer, NewClusterEnableElasticDisk); - } - if (Optional.IsDefined(EncryptedCredential)) - { - writer.WritePropertyName("encryptedCredential"u8); - writer.WriteStringValue(EncryptedCredential); - } - if (Optional.IsDefined(PolicyId)) - { - writer.WritePropertyName("policyId"u8); - JsonSerializer.Serialize(writer, PolicyId); - } - if (Optional.IsDefined(Credential)) - { - writer.WritePropertyName("credential"u8); - writer.WriteObjectValue(Credential); - } - writer.WriteEndObject(); - foreach (var item in AdditionalProperties) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.Value.ToString()).RootElement); -#endif - } - writer.WriteEndObject(); - } - - internal static AzureDatabricksLinkedService DeserializeAzureDatabricksLinkedService(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - string type = default; - Optional connectVia = default; - Optional description = default; - Optional> parameters = default; - Optional> annotations = default; - DataFactoryElement domain = default; - Optional accessToken = default; - Optional> authentication = default; - Optional> workspaceResourceId = default; - Optional> existingClusterId = default; - Optional> instancePoolId = default; - Optional> newClusterVersion = default; - Optional> newClusterNumOfWorker = default; - Optional> newClusterNodeType = default; - Optional>> newClusterSparkConf = default; - Optional>> newClusterSparkEnvVars = default; - Optional>> newClusterCustomTags = default; - Optional> newClusterLogDestination = default; - Optional> newClusterDriverNodeType = default; - Optional>> newClusterInitScripts = default; - Optional> newClusterEnableElasticDisk = default; - Optional encryptedCredential = default; - Optional> policyId = default; - Optional credential = default; - IDictionary> additionalProperties = default; - Dictionary> additionalPropertiesDictionary = new Dictionary>(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("type"u8)) - { - type = property.Value.GetString(); - continue; - } - if (property.NameEquals("connectVia"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - connectVia = IntegrationRuntimeReference.DeserializeIntegrationRuntimeReference(property.Value); - continue; - } - if (property.NameEquals("description"u8)) - { - description = property.Value.GetString(); - continue; - } - if (property.NameEquals("parameters"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - Dictionary dictionary = new Dictionary(); - foreach (var property0 in property.Value.EnumerateObject()) - { - dictionary.Add(property0.Name, EntityParameterSpecification.DeserializeEntityParameterSpecification(property0.Value)); - } - parameters = dictionary; - continue; - } - if (property.NameEquals("annotations"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - if (item.ValueKind == JsonValueKind.Null) - { - array.Add(null); - } - else - { - array.Add(BinaryData.FromString(item.GetRawText())); - } - } - annotations = array; - continue; - } - if (property.NameEquals("typeProperties"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - foreach (var property0 in property.Value.EnumerateObject()) - { - if (property0.NameEquals("domain"u8)) - { - domain = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("accessToken"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - accessToken = JsonSerializer.Deserialize(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("authentication"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - authentication = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("workspaceResourceId"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - workspaceResourceId = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("existingClusterId"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - existingClusterId = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("instancePoolId"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - instancePoolId = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("newClusterVersion"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - newClusterVersion = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("newClusterNumOfWorker"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - newClusterNumOfWorker = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("newClusterNodeType"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - newClusterNodeType = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("newClusterSparkConf"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - Dictionary> dictionary = new Dictionary>(); - foreach (var property1 in property0.Value.EnumerateObject()) - { - if (property1.Value.ValueKind == JsonValueKind.Null) - { - dictionary.Add(property1.Name, null); - } - else - { - dictionary.Add(property1.Name, JsonSerializer.Deserialize>(property1.Value.GetRawText())); - } - } - newClusterSparkConf = dictionary; - continue; - } - if (property0.NameEquals("newClusterSparkEnvVars"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - Dictionary> dictionary = new Dictionary>(); - foreach (var property1 in property0.Value.EnumerateObject()) - { - if (property1.Value.ValueKind == JsonValueKind.Null) - { - dictionary.Add(property1.Name, null); - } - else - { - dictionary.Add(property1.Name, JsonSerializer.Deserialize>(property1.Value.GetRawText())); - } - } - newClusterSparkEnvVars = dictionary; - continue; - } - if (property0.NameEquals("newClusterCustomTags"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - Dictionary> dictionary = new Dictionary>(); - foreach (var property1 in property0.Value.EnumerateObject()) - { - if (property1.Value.ValueKind == JsonValueKind.Null) - { - dictionary.Add(property1.Name, null); - } - else - { - dictionary.Add(property1.Name, JsonSerializer.Deserialize>(property1.Value.GetRawText())); - } - } - newClusterCustomTags = dictionary; - continue; - } - if (property0.NameEquals("newClusterLogDestination"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - newClusterLogDestination = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("newClusterDriverNodeType"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - newClusterDriverNodeType = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("newClusterInitScripts"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - newClusterInitScripts = JsonSerializer.Deserialize>>(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("newClusterEnableElasticDisk"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - newClusterEnableElasticDisk = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("encryptedCredential"u8)) - { - encryptedCredential = property0.Value.GetString(); - continue; - } - if (property0.NameEquals("policyId"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - policyId = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("credential"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - credential = DataFactoryCredentialReference.DeserializeDataFactoryCredentialReference(property0.Value); - continue; - } - } - continue; - } - additionalPropertiesDictionary.Add(property.Name, JsonSerializer.Deserialize>(property.Value.GetRawText())); - } - additionalProperties = additionalPropertiesDictionary; - return new AzureDatabricksLinkedService(type, connectVia.Value, description.Value, Optional.ToDictionary(parameters), Optional.ToList(annotations), additionalProperties, domain, accessToken, authentication.Value, workspaceResourceId.Value, existingClusterId.Value, instancePoolId.Value, newClusterVersion.Value, newClusterNumOfWorker.Value, newClusterNodeType.Value, Optional.ToDictionary(newClusterSparkConf), Optional.ToDictionary(newClusterSparkEnvVars), Optional.ToDictionary(newClusterCustomTags), newClusterLogDestination.Value, newClusterDriverNodeType.Value, newClusterInitScripts.Value, newClusterEnableElasticDisk.Value, encryptedCredential.Value, policyId.Value, credential.Value); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/AzureDatabricksLinkedService.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/AzureDatabricksLinkedService.cs deleted file mode 100644 index 38e0111d..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/AzureDatabricksLinkedService.cs +++ /dev/null @@ -1,203 +0,0 @@ -// - -#nullable disable - -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// Azure Databricks linked service. - public partial class AzureDatabricksLinkedService : DataFactoryLinkedServiceProperties - { - /// Initializes a new instance of AzureDatabricksLinkedService. - /// <REGION>.azuredatabricks.net, domain name of your Databricks deployment. Type: string (or Expression with resultType string). - /// is null. - public AzureDatabricksLinkedService(DataFactoryElement domain) - { - Argument.AssertNotNull(domain, nameof(domain)); - - Domain = domain; - NewClusterSparkConf = new ChangeTrackingDictionary>(); - NewClusterSparkEnvVars = new ChangeTrackingDictionary>(); - NewClusterCustomTags = new ChangeTrackingDictionary>(); - LinkedServiceType = "AzureDatabricks"; - } - - /// Initializes a new instance of AzureDatabricksLinkedService. - /// Type of linked service. - /// The integration runtime reference. - /// Linked service description. - /// Parameters for linked service. - /// List of tags that can be used for describing the linked service. - /// Additional Properties. - /// <REGION>.azuredatabricks.net, domain name of your Databricks deployment. Type: string (or Expression with resultType string). - /// Access token for databricks REST API. Refer to https://docs.azuredatabricks.net/api/latest/authentication.html. Type: string (or Expression with resultType string). - /// Required to specify MSI, if using Workspace resource id for databricks REST API. Type: string (or Expression with resultType string). - /// Workspace resource id for databricks REST API. Type: string (or Expression with resultType string). - /// The id of an existing interactive cluster that will be used for all runs of this activity. Type: string (or Expression with resultType string). - /// The id of an existing instance pool that will be used for all runs of this activity. Type: string (or Expression with resultType string). - /// If not using an existing interactive cluster, this specifies the Spark version of a new job cluster or instance pool nodes created for each run of this activity. Required if instancePoolId is specified. Type: string (or Expression with resultType string). - /// If not using an existing interactive cluster, this specifies the number of worker nodes to use for the new job cluster or instance pool. For new job clusters, this a string-formatted Int32, like '1' means numOfWorker is 1 or '1:10' means auto-scale from 1 (min) to 10 (max). For instance pools, this is a string-formatted Int32, and can only specify a fixed number of worker nodes, such as '2'. Required if newClusterVersion is specified. Type: string (or Expression with resultType string). - /// The node type of the new job cluster. This property is required if newClusterVersion is specified and instancePoolId is not specified. If instancePoolId is specified, this property is ignored. Type: string (or Expression with resultType string). - /// A set of optional, user-specified Spark configuration key-value pairs. - /// A set of optional, user-specified Spark environment variables key-value pairs. - /// Additional tags for cluster resources. This property is ignored in instance pool configurations. - /// Specify a location to deliver Spark driver, worker, and event logs. Type: string (or Expression with resultType string). - /// The driver node type for the new job cluster. This property is ignored in instance pool configurations. Type: string (or Expression with resultType string). - /// User-defined initialization scripts for the new cluster. Type: array of strings (or Expression with resultType array of strings). - /// Enable the elastic disk on the new cluster. This property is now ignored, and takes the default elastic disk behavior in Databricks (elastic disks are always enabled). Type: boolean (or Expression with resultType boolean). - /// The encrypted credential used for authentication. Credentials are encrypted using the integration runtime credential manager. Type: string. - /// The policy id for limiting the ability to configure clusters based on a user defined set of rules. Type: string (or Expression with resultType string). - /// The credential reference containing authentication information. - internal AzureDatabricksLinkedService(string linkedServiceType, IntegrationRuntimeReference connectVia, string description, IDictionary parameters, IList annotations, IDictionary> additionalProperties, DataFactoryElement domain, DataFactorySecretBaseDefinition accessToken, DataFactoryElement authentication, DataFactoryElement workspaceResourceId, DataFactoryElement existingClusterId, DataFactoryElement instancePoolId, DataFactoryElement newClusterVersion, DataFactoryElement newClusterNumOfWorker, DataFactoryElement newClusterNodeType, IDictionary> newClusterSparkConf, IDictionary> newClusterSparkEnvVars, IDictionary> newClusterCustomTags, DataFactoryElement newClusterLogDestination, DataFactoryElement newClusterDriverNodeType, DataFactoryElement> newClusterInitScripts, DataFactoryElement newClusterEnableElasticDisk, string encryptedCredential, DataFactoryElement policyId, DataFactoryCredentialReference credential) : base(linkedServiceType, connectVia, description, parameters, annotations, additionalProperties) - { - Domain = domain; - AccessToken = accessToken; - Authentication = authentication; - WorkspaceResourceId = workspaceResourceId; - ExistingClusterId = existingClusterId; - InstancePoolId = instancePoolId; - NewClusterVersion = newClusterVersion; - NewClusterNumOfWorker = newClusterNumOfWorker; - NewClusterNodeType = newClusterNodeType; - NewClusterSparkConf = newClusterSparkConf; - NewClusterSparkEnvVars = newClusterSparkEnvVars; - NewClusterCustomTags = newClusterCustomTags; - NewClusterLogDestination = newClusterLogDestination; - NewClusterDriverNodeType = newClusterDriverNodeType; - NewClusterInitScripts = newClusterInitScripts; - NewClusterEnableElasticDisk = newClusterEnableElasticDisk; - EncryptedCredential = encryptedCredential; - PolicyId = policyId; - Credential = credential; - LinkedServiceType = linkedServiceType ?? "AzureDatabricks"; - } - - /// <REGION>.azuredatabricks.net, domain name of your Databricks deployment. Type: string (or Expression with resultType string). - public DataFactoryElement Domain { get; set; } - /// Access token for databricks REST API. Refer to https://docs.azuredatabricks.net/api/latest/authentication.html. Type: string (or Expression with resultType string). - public DataFactorySecretBaseDefinition AccessToken { get; set; } - /// Required to specify MSI, if using Workspace resource id for databricks REST API. Type: string (or Expression with resultType string). - public DataFactoryElement Authentication { get; set; } - /// Workspace resource id for databricks REST API. Type: string (or Expression with resultType string). - public DataFactoryElement WorkspaceResourceId { get; set; } - /// The id of an existing interactive cluster that will be used for all runs of this activity. Type: string (or Expression with resultType string). - public DataFactoryElement ExistingClusterId { get; set; } - /// The id of an existing instance pool that will be used for all runs of this activity. Type: string (or Expression with resultType string). - public DataFactoryElement InstancePoolId { get; set; } - /// If not using an existing interactive cluster, this specifies the Spark version of a new job cluster or instance pool nodes created for each run of this activity. Required if instancePoolId is specified. Type: string (or Expression with resultType string). - public DataFactoryElement NewClusterVersion { get; set; } - /// If not using an existing interactive cluster, this specifies the number of worker nodes to use for the new job cluster or instance pool. For new job clusters, this a string-formatted Int32, like '1' means numOfWorker is 1 or '1:10' means auto-scale from 1 (min) to 10 (max). For instance pools, this is a string-formatted Int32, and can only specify a fixed number of worker nodes, such as '2'. Required if newClusterVersion is specified. Type: string (or Expression with resultType string). - public DataFactoryElement NewClusterNumOfWorker { get; set; } - /// The node type of the new job cluster. This property is required if newClusterVersion is specified and instancePoolId is not specified. If instancePoolId is specified, this property is ignored. Type: string (or Expression with resultType string). - public DataFactoryElement NewClusterNodeType { get; set; } - /// - /// A set of optional, user-specified Spark configuration key-value pairs. - /// - /// To assign an object to the value of this property use . - /// - /// - /// To assign an already formated json string to this property use . - /// - /// - /// Examples: - /// - /// - /// BinaryData.FromObjectAsJson("foo") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromString("\"foo\"") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromObjectAsJson(new { key = "value" }) - /// Creates a payload of { "key": "value" }. - /// - /// - /// BinaryData.FromString("{\"key\": \"value\"}") - /// Creates a payload of { "key": "value" }. - /// - /// - /// - /// - public IDictionary> NewClusterSparkConf { get; } - /// - /// A set of optional, user-specified Spark environment variables key-value pairs. - /// - /// To assign an object to the value of this property use . - /// - /// - /// To assign an already formated json string to this property use . - /// - /// - /// Examples: - /// - /// - /// BinaryData.FromObjectAsJson("foo") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromString("\"foo\"") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromObjectAsJson(new { key = "value" }) - /// Creates a payload of { "key": "value" }. - /// - /// - /// BinaryData.FromString("{\"key\": \"value\"}") - /// Creates a payload of { "key": "value" }. - /// - /// - /// - /// - public IDictionary> NewClusterSparkEnvVars { get; } - /// - /// Additional tags for cluster resources. This property is ignored in instance pool configurations. - /// - /// To assign an object to the value of this property use . - /// - /// - /// To assign an already formated json string to this property use . - /// - /// - /// Examples: - /// - /// - /// BinaryData.FromObjectAsJson("foo") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromString("\"foo\"") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromObjectAsJson(new { key = "value" }) - /// Creates a payload of { "key": "value" }. - /// - /// - /// BinaryData.FromString("{\"key\": \"value\"}") - /// Creates a payload of { "key": "value" }. - /// - /// - /// - /// - public IDictionary> NewClusterCustomTags { get; } - /// Specify a location to deliver Spark driver, worker, and event logs. Type: string (or Expression with resultType string). - public DataFactoryElement NewClusterLogDestination { get; set; } - /// The driver node type for the new job cluster. This property is ignored in instance pool configurations. Type: string (or Expression with resultType string). - public DataFactoryElement NewClusterDriverNodeType { get; set; } - /// User-defined initialization scripts for the new cluster. Type: array of strings (or Expression with resultType array of strings). - public DataFactoryElement> NewClusterInitScripts { get; set; } - /// Enable the elastic disk on the new cluster. This property is now ignored, and takes the default elastic disk behavior in Databricks (elastic disks are always enabled). Type: boolean (or Expression with resultType boolean). - public DataFactoryElement NewClusterEnableElasticDisk { get; set; } - /// The encrypted credential used for authentication. Credentials are encrypted using the integration runtime credential manager. Type: string. - public string EncryptedCredential { get; set; } - /// The policy id for limiting the ability to configure clusters based on a user defined set of rules. Type: string (or Expression with resultType string). - public DataFactoryElement PolicyId { get; set; } - /// The credential reference containing authentication information. - public DataFactoryCredentialReference Credential { get; set; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/AzureFileStorageLinkedService.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/AzureFileStorageLinkedService.Serialization.cs deleted file mode 100644 index a95ee0a2..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/AzureFileStorageLinkedService.Serialization.cs +++ /dev/null @@ -1,306 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class AzureFileStorageLinkedService : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - writer.WritePropertyName("type"u8); - writer.WriteStringValue(LinkedServiceType); - if (Optional.IsDefined(ConnectVia)) - { - writer.WritePropertyName("connectVia"u8); - writer.WriteObjectValue(ConnectVia); - } - if (Optional.IsDefined(Description)) - { - writer.WritePropertyName("description"u8); - writer.WriteStringValue(Description); - } - if (Optional.IsCollectionDefined(Parameters)) - { - writer.WritePropertyName("parameters"u8); - writer.WriteStartObject(); - foreach (var item in Parameters) - { - writer.WritePropertyName(item.Key); - writer.WriteObjectValue(item.Value); - } - writer.WriteEndObject(); - } - if (Optional.IsCollectionDefined(Annotations)) - { - writer.WritePropertyName("annotations"u8); - writer.WriteStartArray(); - foreach (var item in Annotations) - { - if (item == null) - { - writer.WriteNullValue(); - continue; - } -#if NET6_0_OR_GREATER - writer.WriteRawValue(item); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.ToString()).RootElement); -#endif - } - writer.WriteEndArray(); - } - writer.WritePropertyName("typeProperties"u8); - writer.WriteStartObject(); - if (Optional.IsDefined(Host)) - { - writer.WritePropertyName("host"u8); - JsonSerializer.Serialize(writer, Host); - } - if (Optional.IsDefined(UserId)) - { - writer.WritePropertyName("userId"u8); - JsonSerializer.Serialize(writer, UserId); - } - if (Optional.IsDefined(Password)) - { - writer.WritePropertyName("password"u8); - JsonSerializer.Serialize(writer, Password); - } - if (Optional.IsDefined(ConnectionString)) - { - writer.WritePropertyName("connectionString"u8); - JsonSerializer.Serialize(writer, ConnectionString); - } - if (Optional.IsDefined(AccountKey)) - { - writer.WritePropertyName("accountKey"u8); - JsonSerializer.Serialize(writer, AccountKey); - } - if (Optional.IsDefined(SasUri)) - { - writer.WritePropertyName("sasUri"u8); - JsonSerializer.Serialize(writer, SasUri); - } - if (Optional.IsDefined(SasToken)) - { - writer.WritePropertyName("sasToken"u8); - JsonSerializer.Serialize(writer, SasToken); - } - if (Optional.IsDefined(FileShare)) - { - writer.WritePropertyName("fileShare"u8); - JsonSerializer.Serialize(writer, FileShare); - } - if (Optional.IsDefined(Snapshot)) - { - writer.WritePropertyName("snapshot"u8); - JsonSerializer.Serialize(writer, Snapshot); - } - if (Optional.IsDefined(EncryptedCredential)) - { - writer.WritePropertyName("encryptedCredential"u8); - writer.WriteStringValue(EncryptedCredential); - } - writer.WriteEndObject(); - foreach (var item in AdditionalProperties) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.Value.ToString()).RootElement); -#endif - } - writer.WriteEndObject(); - } - - internal static AzureFileStorageLinkedService DeserializeAzureFileStorageLinkedService(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - string type = default; - Optional connectVia = default; - Optional description = default; - Optional> parameters = default; - Optional> annotations = default; - Optional> host = default; - Optional> userId = default; - Optional password = default; - Optional> connectionString = default; - Optional accountKey = default; - Optional> sasUri = default; - Optional sasToken = default; - Optional> fileShare = default; - Optional> snapshot = default; - Optional encryptedCredential = default; - IDictionary> additionalProperties = default; - Dictionary> additionalPropertiesDictionary = new Dictionary>(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("type"u8)) - { - type = property.Value.GetString(); - continue; - } - if (property.NameEquals("connectVia"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - connectVia = IntegrationRuntimeReference.DeserializeIntegrationRuntimeReference(property.Value); - continue; - } - if (property.NameEquals("description"u8)) - { - description = property.Value.GetString(); - continue; - } - if (property.NameEquals("parameters"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - Dictionary dictionary = new Dictionary(); - foreach (var property0 in property.Value.EnumerateObject()) - { - dictionary.Add(property0.Name, EntityParameterSpecification.DeserializeEntityParameterSpecification(property0.Value)); - } - parameters = dictionary; - continue; - } - if (property.NameEquals("annotations"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - if (item.ValueKind == JsonValueKind.Null) - { - array.Add(null); - } - else - { - array.Add(BinaryData.FromString(item.GetRawText())); - } - } - annotations = array; - continue; - } - if (property.NameEquals("typeProperties"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - foreach (var property0 in property.Value.EnumerateObject()) - { - if (property0.NameEquals("host"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - host = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("userId"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - userId = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("password"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - password = JsonSerializer.Deserialize(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("connectionString"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - connectionString = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("accountKey"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - accountKey = JsonSerializer.Deserialize(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("sasUri"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - sasUri = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("sasToken"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - sasToken = JsonSerializer.Deserialize(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("fileShare"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - fileShare = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("snapshot"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - snapshot = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("encryptedCredential"u8)) - { - encryptedCredential = property0.Value.GetString(); - continue; - } - } - continue; - } - additionalPropertiesDictionary.Add(property.Name, JsonSerializer.Deserialize>(property.Value.GetRawText())); - } - additionalProperties = additionalPropertiesDictionary; - return new AzureFileStorageLinkedService(type, connectVia.Value, description.Value, Optional.ToDictionary(parameters), Optional.ToList(annotations), additionalProperties, host.Value, userId.Value, password, connectionString.Value, accountKey, sasUri.Value, sasToken, fileShare.Value, snapshot.Value, encryptedCredential.Value); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/AzureFileStorageLinkedService.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/AzureFileStorageLinkedService.cs deleted file mode 100644 index efec24a1..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/AzureFileStorageLinkedService.cs +++ /dev/null @@ -1,71 +0,0 @@ -// - -#nullable disable - -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// Azure File Storage linked service. - public partial class AzureFileStorageLinkedService : DataFactoryLinkedServiceProperties - { - /// Initializes a new instance of AzureFileStorageLinkedService. - public AzureFileStorageLinkedService() - { - LinkedServiceType = "AzureFileStorage"; - } - - /// Initializes a new instance of AzureFileStorageLinkedService. - /// Type of linked service. - /// The integration runtime reference. - /// Linked service description. - /// Parameters for linked service. - /// List of tags that can be used for describing the linked service. - /// Additional Properties. - /// Host name of the server. Type: string (or Expression with resultType string). - /// User ID to logon the server. Type: string (or Expression with resultType string). - /// Password to logon the server. - /// The connection string. It is mutually exclusive with sasUri property. Type: string, SecureString or AzureKeyVaultSecretReference. - /// The Azure key vault secret reference of accountKey in connection string. - /// SAS URI of the Azure File resource. It is mutually exclusive with connectionString property. Type: string, SecureString or AzureKeyVaultSecretReference. - /// The Azure key vault secret reference of sasToken in sas uri. - /// The azure file share name. It is required when auth with accountKey/sasToken. Type: string (or Expression with resultType string). - /// The azure file share snapshot version. Type: string (or Expression with resultType string). - /// The encrypted credential used for authentication. Credentials are encrypted using the integration runtime credential manager. Type: string. - internal AzureFileStorageLinkedService(string linkedServiceType, IntegrationRuntimeReference connectVia, string description, IDictionary parameters, IList annotations, IDictionary> additionalProperties, DataFactoryElement host, DataFactoryElement userId, DataFactorySecretBaseDefinition password, DataFactoryElement connectionString, DataFactoryKeyVaultSecretReference accountKey, DataFactoryElement sasUri, DataFactoryKeyVaultSecretReference sasToken, DataFactoryElement fileShare, DataFactoryElement snapshot, string encryptedCredential) : base(linkedServiceType, connectVia, description, parameters, annotations, additionalProperties) - { - Host = host; - UserId = userId; - Password = password; - ConnectionString = connectionString; - AccountKey = accountKey; - SasUri = sasUri; - SasToken = sasToken; - FileShare = fileShare; - Snapshot = snapshot; - EncryptedCredential = encryptedCredential; - LinkedServiceType = linkedServiceType ?? "AzureFileStorage"; - } - - /// Host name of the server. Type: string (or Expression with resultType string). - public DataFactoryElement Host { get; set; } - /// User ID to logon the server. Type: string (or Expression with resultType string). - public DataFactoryElement UserId { get; set; } - /// Password to logon the server. - public DataFactorySecretBaseDefinition Password { get; set; } - /// The connection string. It is mutually exclusive with sasUri property. Type: string, SecureString or AzureKeyVaultSecretReference. - public DataFactoryElement ConnectionString { get; set; } - /// The Azure key vault secret reference of accountKey in connection string. - public DataFactoryKeyVaultSecretReference AccountKey { get; set; } - /// SAS URI of the Azure File resource. It is mutually exclusive with connectionString property. Type: string, SecureString or AzureKeyVaultSecretReference. - public DataFactoryElement SasUri { get; set; } - /// The Azure key vault secret reference of sasToken in sas uri. - public DataFactoryKeyVaultSecretReference SasToken { get; set; } - /// The azure file share name. It is required when auth with accountKey/sasToken. Type: string (or Expression with resultType string). - public DataFactoryElement FileShare { get; set; } - /// The azure file share snapshot version. Type: string (or Expression with resultType string). - public DataFactoryElement Snapshot { get; set; } - /// The encrypted credential used for authentication. Credentials are encrypted using the integration runtime credential manager. Type: string. - public string EncryptedCredential { get; set; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/AzureFileStorageLocation.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/AzureFileStorageLocation.Serialization.cs deleted file mode 100644 index 61b2aa15..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/AzureFileStorageLocation.Serialization.cs +++ /dev/null @@ -1,82 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class AzureFileStorageLocation : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - writer.WritePropertyName("type"u8); - writer.WriteStringValue(DatasetLocationType); - if (Optional.IsDefined(FolderPath)) - { - writer.WritePropertyName("folderPath"u8); - JsonSerializer.Serialize(writer, FolderPath); - } - if (Optional.IsDefined(FileName)) - { - writer.WritePropertyName("fileName"u8); - JsonSerializer.Serialize(writer, FileName); - } - foreach (var item in AdditionalProperties) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.Value.ToString()).RootElement); -#endif - } - writer.WriteEndObject(); - } - - internal static AzureFileStorageLocation DeserializeAzureFileStorageLocation(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - string type = default; - Optional> folderPath = default; - Optional> fileName = default; - IDictionary> additionalProperties = default; - Dictionary> additionalPropertiesDictionary = new Dictionary>(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("type"u8)) - { - type = property.Value.GetString(); - continue; - } - if (property.NameEquals("folderPath"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - folderPath = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("fileName"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - fileName = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - additionalPropertiesDictionary.Add(property.Name, JsonSerializer.Deserialize>(property.Value.GetRawText())); - } - additionalProperties = additionalPropertiesDictionary; - return new AzureFileStorageLocation(type, folderPath.Value, fileName.Value, additionalProperties); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/AzureFileStorageLocation.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/AzureFileStorageLocation.cs deleted file mode 100644 index 872bbbd3..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/AzureFileStorageLocation.cs +++ /dev/null @@ -1,28 +0,0 @@ -// - -#nullable disable - -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// The location of file server dataset. - public partial class AzureFileStorageLocation : DatasetLocation - { - /// Initializes a new instance of AzureFileStorageLocation. - public AzureFileStorageLocation() - { - DatasetLocationType = "AzureFileStorageLocation"; - } - - /// Initializes a new instance of AzureFileStorageLocation. - /// Type of dataset storage location. - /// Specify the folder path of dataset. Type: string (or Expression with resultType string). - /// Specify the file name of dataset. Type: string (or Expression with resultType string). - /// Additional Properties. - internal AzureFileStorageLocation(string datasetLocationType, DataFactoryElement folderPath, DataFactoryElement fileName, IDictionary> additionalProperties) : base(datasetLocationType, folderPath, fileName, additionalProperties) - { - DatasetLocationType = datasetLocationType ?? "AzureFileStorageLocation"; - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/AzureFileStorageReadSettings.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/AzureFileStorageReadSettings.Serialization.cs deleted file mode 100644 index 45c5c576..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/AzureFileStorageReadSettings.Serialization.cs +++ /dev/null @@ -1,232 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class AzureFileStorageReadSettings : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - if (Optional.IsDefined(Recursive)) - { - writer.WritePropertyName("recursive"u8); - JsonSerializer.Serialize(writer, Recursive); - } - if (Optional.IsDefined(WildcardFolderPath)) - { - writer.WritePropertyName("wildcardFolderPath"u8); - JsonSerializer.Serialize(writer, WildcardFolderPath); - } - if (Optional.IsDefined(WildcardFileName)) - { - writer.WritePropertyName("wildcardFileName"u8); - JsonSerializer.Serialize(writer, WildcardFileName); - } - if (Optional.IsDefined(Prefix)) - { - writer.WritePropertyName("prefix"u8); - JsonSerializer.Serialize(writer, Prefix); - } - if (Optional.IsDefined(FileListPath)) - { - writer.WritePropertyName("fileListPath"u8); - JsonSerializer.Serialize(writer, FileListPath); - } - if (Optional.IsDefined(EnablePartitionDiscovery)) - { - writer.WritePropertyName("enablePartitionDiscovery"u8); - JsonSerializer.Serialize(writer, EnablePartitionDiscovery); - } - if (Optional.IsDefined(PartitionRootPath)) - { - writer.WritePropertyName("partitionRootPath"u8); - JsonSerializer.Serialize(writer, PartitionRootPath); - } - if (Optional.IsDefined(DeleteFilesAfterCompletion)) - { - writer.WritePropertyName("deleteFilesAfterCompletion"u8); - JsonSerializer.Serialize(writer, DeleteFilesAfterCompletion); - } - if (Optional.IsDefined(ModifiedDatetimeStart)) - { - writer.WritePropertyName("modifiedDatetimeStart"u8); - JsonSerializer.Serialize(writer, ModifiedDatetimeStart); - } - if (Optional.IsDefined(ModifiedDatetimeEnd)) - { - writer.WritePropertyName("modifiedDatetimeEnd"u8); - JsonSerializer.Serialize(writer, ModifiedDatetimeEnd); - } - writer.WritePropertyName("type"u8); - writer.WriteStringValue(StoreReadSettingsType); - if (Optional.IsDefined(MaxConcurrentConnections)) - { - writer.WritePropertyName("maxConcurrentConnections"u8); - JsonSerializer.Serialize(writer, MaxConcurrentConnections); - } - if (Optional.IsDefined(DisableMetricsCollection)) - { - writer.WritePropertyName("disableMetricsCollection"u8); - JsonSerializer.Serialize(writer, DisableMetricsCollection); - } - foreach (var item in AdditionalProperties) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.Value.ToString()).RootElement); -#endif - } - writer.WriteEndObject(); - } - - internal static AzureFileStorageReadSettings DeserializeAzureFileStorageReadSettings(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - Optional> recursive = default; - Optional> wildcardFolderPath = default; - Optional> wildcardFileName = default; - Optional> prefix = default; - Optional> fileListPath = default; - Optional> enablePartitionDiscovery = default; - Optional> partitionRootPath = default; - Optional> deleteFilesAfterCompletion = default; - Optional> modifiedDatetimeStart = default; - Optional> modifiedDatetimeEnd = default; - string type = default; - Optional> maxConcurrentConnections = default; - Optional> disableMetricsCollection = default; - IDictionary> additionalProperties = default; - Dictionary> additionalPropertiesDictionary = new Dictionary>(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("recursive"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - recursive = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("wildcardFolderPath"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - wildcardFolderPath = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("wildcardFileName"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - wildcardFileName = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("prefix"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - prefix = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("fileListPath"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - fileListPath = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("enablePartitionDiscovery"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - enablePartitionDiscovery = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("partitionRootPath"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - partitionRootPath = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("deleteFilesAfterCompletion"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - deleteFilesAfterCompletion = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("modifiedDatetimeStart"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - modifiedDatetimeStart = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("modifiedDatetimeEnd"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - modifiedDatetimeEnd = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("type"u8)) - { - type = property.Value.GetString(); - continue; - } - if (property.NameEquals("maxConcurrentConnections"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - maxConcurrentConnections = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("disableMetricsCollection"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - disableMetricsCollection = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - additionalPropertiesDictionary.Add(property.Name, JsonSerializer.Deserialize>(property.Value.GetRawText())); - } - additionalProperties = additionalPropertiesDictionary; - return new AzureFileStorageReadSettings(type, maxConcurrentConnections.Value, disableMetricsCollection.Value, additionalProperties, recursive.Value, wildcardFolderPath.Value, wildcardFileName.Value, prefix.Value, fileListPath.Value, enablePartitionDiscovery.Value, partitionRootPath.Value, deleteFilesAfterCompletion.Value, modifiedDatetimeStart.Value, modifiedDatetimeEnd.Value); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/AzureFileStorageReadSettings.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/AzureFileStorageReadSettings.cs deleted file mode 100644 index 9607015a..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/AzureFileStorageReadSettings.cs +++ /dev/null @@ -1,69 +0,0 @@ -// - -#nullable disable - -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// Azure File Storage read settings. - public partial class AzureFileStorageReadSettings : StoreReadSettings - { - /// Initializes a new instance of AzureFileStorageReadSettings. - public AzureFileStorageReadSettings() - { - StoreReadSettingsType = "AzureFileStorageReadSettings"; - } - - /// Initializes a new instance of AzureFileStorageReadSettings. - /// The read setting type. - /// The maximum concurrent connection count for the source data store. Type: integer (or Expression with resultType integer). - /// If true, disable data store metrics collection. Default is false. Type: boolean (or Expression with resultType boolean). - /// Additional Properties. - /// If true, files under the folder path will be read recursively. Default is true. Type: boolean (or Expression with resultType boolean). - /// Azure File Storage wildcardFolderPath. Type: string (or Expression with resultType string). - /// Azure File Storage wildcardFileName. Type: string (or Expression with resultType string). - /// The prefix filter for the Azure File name starting from root path. Type: string (or Expression with resultType string). - /// Point to a text file that lists each file (relative path to the path configured in the dataset) that you want to copy. Type: string (or Expression with resultType string). - /// Indicates whether to enable partition discovery. Type: boolean (or Expression with resultType boolean). - /// Specify the root path where partition discovery starts from. Type: string (or Expression with resultType string). - /// Indicates whether the source files need to be deleted after copy completion. Default is false. Type: boolean (or Expression with resultType boolean). - /// The start of file's modified datetime. Type: string (or Expression with resultType string). - /// The end of file's modified datetime. Type: string (or Expression with resultType string). - internal AzureFileStorageReadSettings(string storeReadSettingsType, DataFactoryElement maxConcurrentConnections, DataFactoryElement disableMetricsCollection, IDictionary> additionalProperties, DataFactoryElement recursive, DataFactoryElement wildcardFolderPath, DataFactoryElement wildcardFileName, DataFactoryElement prefix, DataFactoryElement fileListPath, DataFactoryElement enablePartitionDiscovery, DataFactoryElement partitionRootPath, DataFactoryElement deleteFilesAfterCompletion, DataFactoryElement modifiedDatetimeStart, DataFactoryElement modifiedDatetimeEnd) : base(storeReadSettingsType, maxConcurrentConnections, disableMetricsCollection, additionalProperties) - { - Recursive = recursive; - WildcardFolderPath = wildcardFolderPath; - WildcardFileName = wildcardFileName; - Prefix = prefix; - FileListPath = fileListPath; - EnablePartitionDiscovery = enablePartitionDiscovery; - PartitionRootPath = partitionRootPath; - DeleteFilesAfterCompletion = deleteFilesAfterCompletion; - ModifiedDatetimeStart = modifiedDatetimeStart; - ModifiedDatetimeEnd = modifiedDatetimeEnd; - StoreReadSettingsType = storeReadSettingsType ?? "AzureFileStorageReadSettings"; - } - - /// If true, files under the folder path will be read recursively. Default is true. Type: boolean (or Expression with resultType boolean). - public DataFactoryElement Recursive { get; set; } - /// Azure File Storage wildcardFolderPath. Type: string (or Expression with resultType string). - public DataFactoryElement WildcardFolderPath { get; set; } - /// Azure File Storage wildcardFileName. Type: string (or Expression with resultType string). - public DataFactoryElement WildcardFileName { get; set; } - /// The prefix filter for the Azure File name starting from root path. Type: string (or Expression with resultType string). - public DataFactoryElement Prefix { get; set; } - /// Point to a text file that lists each file (relative path to the path configured in the dataset) that you want to copy. Type: string (or Expression with resultType string). - public DataFactoryElement FileListPath { get; set; } - /// Indicates whether to enable partition discovery. Type: boolean (or Expression with resultType boolean). - public DataFactoryElement EnablePartitionDiscovery { get; set; } - /// Specify the root path where partition discovery starts from. Type: string (or Expression with resultType string). - public DataFactoryElement PartitionRootPath { get; set; } - /// Indicates whether the source files need to be deleted after copy completion. Default is false. Type: boolean (or Expression with resultType boolean). - public DataFactoryElement DeleteFilesAfterCompletion { get; set; } - /// The start of file's modified datetime. Type: string (or Expression with resultType string). - public DataFactoryElement ModifiedDatetimeStart { get; set; } - /// The end of file's modified datetime. Type: string (or Expression with resultType string). - public DataFactoryElement ModifiedDatetimeEnd { get; set; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/AzureFileStorageWriteSettings.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/AzureFileStorageWriteSettings.Serialization.cs deleted file mode 100644 index dfeb9905..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/AzureFileStorageWriteSettings.Serialization.cs +++ /dev/null @@ -1,101 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class AzureFileStorageWriteSettings : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - writer.WritePropertyName("type"u8); - writer.WriteStringValue(StoreWriteSettingsType); - if (Optional.IsDefined(MaxConcurrentConnections)) - { - writer.WritePropertyName("maxConcurrentConnections"u8); - JsonSerializer.Serialize(writer, MaxConcurrentConnections); - } - if (Optional.IsDefined(DisableMetricsCollection)) - { - writer.WritePropertyName("disableMetricsCollection"u8); - JsonSerializer.Serialize(writer, DisableMetricsCollection); - } - if (Optional.IsDefined(CopyBehavior)) - { - writer.WritePropertyName("copyBehavior"u8); -#if NET6_0_OR_GREATER - writer.WriteRawValue(CopyBehavior); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(CopyBehavior.ToString()).RootElement); -#endif - } - foreach (var item in AdditionalProperties) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.Value.ToString()).RootElement); -#endif - } - writer.WriteEndObject(); - } - - internal static AzureFileStorageWriteSettings DeserializeAzureFileStorageWriteSettings(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - string type = default; - Optional> maxConcurrentConnections = default; - Optional> disableMetricsCollection = default; - Optional copyBehavior = default; - IDictionary> additionalProperties = default; - Dictionary> additionalPropertiesDictionary = new Dictionary>(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("type"u8)) - { - type = property.Value.GetString(); - continue; - } - if (property.NameEquals("maxConcurrentConnections"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - maxConcurrentConnections = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("disableMetricsCollection"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - disableMetricsCollection = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("copyBehavior"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - copyBehavior = BinaryData.FromString(property.Value.GetRawText()); - continue; - } - additionalPropertiesDictionary.Add(property.Name, JsonSerializer.Deserialize>(property.Value.GetRawText())); - } - additionalProperties = additionalPropertiesDictionary; - return new AzureFileStorageWriteSettings(type, maxConcurrentConnections.Value, disableMetricsCollection.Value, copyBehavior.Value, additionalProperties); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/AzureFileStorageWriteSettings.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/AzureFileStorageWriteSettings.cs deleted file mode 100644 index 0b0a2e33..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/AzureFileStorageWriteSettings.cs +++ /dev/null @@ -1,29 +0,0 @@ -// - -#nullable disable - -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// Azure File Storage write settings. - public partial class AzureFileStorageWriteSettings : StoreWriteSettings - { - /// Initializes a new instance of AzureFileStorageWriteSettings. - public AzureFileStorageWriteSettings() - { - StoreWriteSettingsType = "AzureFileStorageWriteSettings"; - } - - /// Initializes a new instance of AzureFileStorageWriteSettings. - /// The write setting type. - /// The maximum concurrent connection count for the source data store. Type: integer (or Expression with resultType integer). - /// If true, disable data store metrics collection. Default is false. Type: boolean (or Expression with resultType boolean). - /// The type of copy behavior for copy sink. - /// Additional Properties. - internal AzureFileStorageWriteSettings(string storeWriteSettingsType, DataFactoryElement maxConcurrentConnections, DataFactoryElement disableMetricsCollection, BinaryData copyBehavior, IDictionary> additionalProperties) : base(storeWriteSettingsType, maxConcurrentConnections, disableMetricsCollection, copyBehavior, additionalProperties) - { - StoreWriteSettingsType = storeWriteSettingsType ?? "AzureFileStorageWriteSettings"; - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/AzureFunctionActivity.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/AzureFunctionActivity.Serialization.cs deleted file mode 100644 index b3c54c5d..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/AzureFunctionActivity.Serialization.cs +++ /dev/null @@ -1,242 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class AzureFunctionActivity : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - if (Optional.IsDefined(LinkedServiceName)) - { - writer.WritePropertyName("linkedServiceName"u8); - JsonSerializer.Serialize(writer, LinkedServiceName); - } - if (Optional.IsDefined(Policy)) - { - writer.WritePropertyName("policy"u8); - writer.WriteObjectValue(Policy); - } - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ActivityType); - if (Optional.IsDefined(Description)) - { - writer.WritePropertyName("description"u8); - writer.WriteStringValue(Description); - } - if (Optional.IsDefined(State)) - { - writer.WritePropertyName("state"u8); - writer.WriteStringValue(State.Value.ToString()); - } - if (Optional.IsDefined(OnInactiveMarkAs)) - { - writer.WritePropertyName("onInactiveMarkAs"u8); - writer.WriteStringValue(OnInactiveMarkAs.Value.ToString()); - } - if (Optional.IsCollectionDefined(DependsOn)) - { - writer.WritePropertyName("dependsOn"u8); - writer.WriteStartArray(); - foreach (var item in DependsOn) - { - writer.WriteObjectValue(item); - } - writer.WriteEndArray(); - } - if (Optional.IsCollectionDefined(UserProperties)) - { - writer.WritePropertyName("userProperties"u8); - writer.WriteStartArray(); - foreach (var item in UserProperties) - { - writer.WriteObjectValue(item); - } - writer.WriteEndArray(); - } - writer.WritePropertyName("typeProperties"u8); - writer.WriteStartObject(); - writer.WritePropertyName("method"u8); - writer.WriteStringValue(Method.ToString()); - writer.WritePropertyName("functionName"u8); - JsonSerializer.Serialize(writer, FunctionName); - if (Optional.IsDefined(Headers)) - { - writer.WritePropertyName("headers"u8); - JsonSerializer.Serialize(writer, Headers); - } - if (Optional.IsDefined(Body)) - { - writer.WritePropertyName("body"u8); - JsonSerializer.Serialize(writer, Body); - } - writer.WriteEndObject(); - foreach (var item in AdditionalProperties) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.Value.ToString()).RootElement); -#endif - } - writer.WriteEndObject(); - } - - internal static AzureFunctionActivity DeserializeAzureFunctionActivity(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - Optional linkedServiceName = default; - Optional policy = default; - string name = default; - string type = default; - Optional description = default; - Optional state = default; - Optional onInactiveMarkAs = default; - Optional> dependsOn = default; - Optional> userProperties = default; - AzureFunctionActivityMethod method = default; - DataFactoryElement functionName = default; - Optional> headers = default; - Optional> body = default; - IDictionary> additionalProperties = default; - Dictionary> additionalPropertiesDictionary = new Dictionary>(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("linkedServiceName"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - linkedServiceName = JsonSerializer.Deserialize(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("policy"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - policy = PipelineActivityPolicy.DeserializePipelineActivityPolicy(property.Value); - continue; - } - if (property.NameEquals("name"u8)) - { - name = property.Value.GetString(); - continue; - } - if (property.NameEquals("type"u8)) - { - type = property.Value.GetString(); - continue; - } - if (property.NameEquals("description"u8)) - { - description = property.Value.GetString(); - continue; - } - if (property.NameEquals("state"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - state = new PipelineActivityState(property.Value.GetString()); - continue; - } - if (property.NameEquals("onInactiveMarkAs"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - onInactiveMarkAs = new ActivityOnInactiveMarkAs(property.Value.GetString()); - continue; - } - if (property.NameEquals("dependsOn"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - array.Add(PipelineActivityDependency.DeserializePipelineActivityDependency(item)); - } - dependsOn = array; - continue; - } - if (property.NameEquals("userProperties"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - array.Add(PipelineActivityUserProperty.DeserializePipelineActivityUserProperty(item)); - } - userProperties = array; - continue; - } - if (property.NameEquals("typeProperties"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - foreach (var property0 in property.Value.EnumerateObject()) - { - if (property0.NameEquals("method"u8)) - { - method = new AzureFunctionActivityMethod(property0.Value.GetString()); - continue; - } - if (property0.NameEquals("functionName"u8)) - { - functionName = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("headers"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - headers = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("body"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - body = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - } - continue; - } - additionalPropertiesDictionary.Add(property.Name, JsonSerializer.Deserialize>(property.Value.GetRawText())); - } - additionalProperties = additionalPropertiesDictionary; - return new AzureFunctionActivity(name, type, description.Value, Optional.ToNullable(state), Optional.ToNullable(onInactiveMarkAs), Optional.ToList(dependsOn), Optional.ToList(userProperties), additionalProperties, linkedServiceName, policy.Value, method, functionName, headers.Value, body.Value); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/AzureFunctionActivity.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/AzureFunctionActivity.cs deleted file mode 100644 index 8ae5a5f2..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/AzureFunctionActivity.cs +++ /dev/null @@ -1,61 +0,0 @@ -// - -#nullable disable - -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// Azure Function activity. - public partial class AzureFunctionActivity : ExecutionActivity - { - /// Initializes a new instance of AzureFunctionActivity. - /// Activity name. - /// Rest API method for target endpoint. - /// Name of the Function that the Azure Function Activity will call. Type: string (or Expression with resultType string). - /// or is null. - public AzureFunctionActivity(string name, AzureFunctionActivityMethod method, DataFactoryElement functionName) : base(name) - { - Argument.AssertNotNull(name, nameof(name)); - Argument.AssertNotNull(functionName, nameof(functionName)); - - Method = method; - FunctionName = functionName; - ActivityType = "AzureFunctionActivity"; - } - - /// Initializes a new instance of AzureFunctionActivity. - /// Activity name. - /// Type of activity. - /// Activity description. - /// Activity state. This is an optional property and if not provided, the state will be Active by default. - /// 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. - /// Activity depends on condition. - /// Activity user properties. - /// Additional Properties. - /// Linked service reference. - /// Activity policy. - /// Rest API method for target endpoint. - /// Name of the Function that the Azure Function Activity will call. Type: string (or Expression with resultType string). - /// 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). - /// 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). - internal AzureFunctionActivity(string name, string activityType, string description, PipelineActivityState? state, ActivityOnInactiveMarkAs? onInactiveMarkAs, IList dependsOn, IList userProperties, IDictionary> additionalProperties, DataFactoryLinkedServiceReference linkedServiceName, PipelineActivityPolicy policy, AzureFunctionActivityMethod method, DataFactoryElement functionName, DataFactoryElement headers, DataFactoryElement body) : base(name, activityType, description, state, onInactiveMarkAs, dependsOn, userProperties, additionalProperties, linkedServiceName, policy) - { - Method = method; - FunctionName = functionName; - Headers = headers; - Body = body; - ActivityType = activityType ?? "AzureFunctionActivity"; - } - - /// Rest API method for target endpoint. - public AzureFunctionActivityMethod Method { get; set; } - /// Name of the Function that the Azure Function Activity will call. Type: string (or Expression with resultType string). - public DataFactoryElement FunctionName { get; set; } - /// 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). - public DataFactoryElement Headers { get; set; } - /// 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). - public DataFactoryElement Body { get; set; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/AzureFunctionActivityMethod.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/AzureFunctionActivityMethod.cs deleted file mode 100644 index bd81ef69..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/AzureFunctionActivityMethod.cs +++ /dev/null @@ -1,62 +0,0 @@ -// - -#nullable disable - -using System.ComponentModel; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// The list of HTTP methods supported by a AzureFunctionActivity. - public readonly partial struct AzureFunctionActivityMethod : IEquatable - { - private readonly string _value; - - /// Initializes a new instance of . - /// is null. - public AzureFunctionActivityMethod(string value) - { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } - - private const string GetValue = "GET"; - private const string PostValue = "POST"; - private const string PutValue = "PUT"; - private const string DeleteValue = "DELETE"; - private const string OptionsValue = "OPTIONS"; - private const string HeadValue = "HEAD"; - private const string TraceValue = "TRACE"; - - /// GET. - public static AzureFunctionActivityMethod Get { get; } = new AzureFunctionActivityMethod(GetValue); - /// POST. - public static AzureFunctionActivityMethod Post { get; } = new AzureFunctionActivityMethod(PostValue); - /// PUT. - public static AzureFunctionActivityMethod Put { get; } = new AzureFunctionActivityMethod(PutValue); - /// DELETE. - public static AzureFunctionActivityMethod Delete { get; } = new AzureFunctionActivityMethod(DeleteValue); - /// OPTIONS. - public static AzureFunctionActivityMethod Options { get; } = new AzureFunctionActivityMethod(OptionsValue); - /// HEAD. - public static AzureFunctionActivityMethod Head { get; } = new AzureFunctionActivityMethod(HeadValue); - /// TRACE. - public static AzureFunctionActivityMethod Trace { get; } = new AzureFunctionActivityMethod(TraceValue); - /// Determines if two values are the same. - public static bool operator ==(AzureFunctionActivityMethod left, AzureFunctionActivityMethod right) => left.Equals(right); - /// Determines if two values are not the same. - public static bool operator !=(AzureFunctionActivityMethod left, AzureFunctionActivityMethod right) => !left.Equals(right); - /// Converts a string to a . - public static implicit operator AzureFunctionActivityMethod(string value) => new AzureFunctionActivityMethod(value); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override bool Equals(object obj) => obj is AzureFunctionActivityMethod other && Equals(other); - /// - public bool Equals(AzureFunctionActivityMethod other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override int GetHashCode() => _value?.GetHashCode() ?? 0; - /// - public override string ToString() => _value; - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/AzureFunctionLinkedService.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/AzureFunctionLinkedService.Serialization.cs deleted file mode 100644 index 29131a4a..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/AzureFunctionLinkedService.Serialization.cs +++ /dev/null @@ -1,247 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class AzureFunctionLinkedService : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - writer.WritePropertyName("type"u8); - writer.WriteStringValue(LinkedServiceType); - if (Optional.IsDefined(ConnectVia)) - { - writer.WritePropertyName("connectVia"u8); - writer.WriteObjectValue(ConnectVia); - } - if (Optional.IsDefined(Description)) - { - writer.WritePropertyName("description"u8); - writer.WriteStringValue(Description); - } - if (Optional.IsCollectionDefined(Parameters)) - { - writer.WritePropertyName("parameters"u8); - writer.WriteStartObject(); - foreach (var item in Parameters) - { - writer.WritePropertyName(item.Key); - writer.WriteObjectValue(item.Value); - } - writer.WriteEndObject(); - } - if (Optional.IsCollectionDefined(Annotations)) - { - writer.WritePropertyName("annotations"u8); - writer.WriteStartArray(); - foreach (var item in Annotations) - { - if (item == null) - { - writer.WriteNullValue(); - continue; - } -#if NET6_0_OR_GREATER - writer.WriteRawValue(item); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.ToString()).RootElement); -#endif - } - writer.WriteEndArray(); - } - writer.WritePropertyName("typeProperties"u8); - writer.WriteStartObject(); - writer.WritePropertyName("functionAppUrl"u8); -#if NET6_0_OR_GREATER - writer.WriteRawValue(FunctionAppUri); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(FunctionAppUri.ToString()).RootElement); -#endif - if (Optional.IsDefined(FunctionKey)) - { - writer.WritePropertyName("functionKey"u8); - JsonSerializer.Serialize(writer, FunctionKey); - } - if (Optional.IsDefined(EncryptedCredential)) - { - writer.WritePropertyName("encryptedCredential"u8); - writer.WriteStringValue(EncryptedCredential); - } - if (Optional.IsDefined(Credential)) - { - writer.WritePropertyName("credential"u8); - writer.WriteObjectValue(Credential); - } - if (Optional.IsDefined(ResourceId)) - { - writer.WritePropertyName("resourceId"u8); -#if NET6_0_OR_GREATER - writer.WriteRawValue(ResourceId); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(ResourceId.ToString()).RootElement); -#endif - } - if (Optional.IsDefined(Authentication)) - { - writer.WritePropertyName("authentication"u8); - JsonSerializer.Serialize(writer, Authentication); - } - writer.WriteEndObject(); - foreach (var item in AdditionalProperties) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.Value.ToString()).RootElement); -#endif - } - writer.WriteEndObject(); - } - - internal static AzureFunctionLinkedService DeserializeAzureFunctionLinkedService(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - string type = default; - Optional connectVia = default; - Optional description = default; - Optional> parameters = default; - Optional> annotations = default; - BinaryData functionAppUrl = default; - Optional functionKey = default; - Optional encryptedCredential = default; - Optional credential = default; - Optional resourceId = default; - Optional> authentication = default; - IDictionary> additionalProperties = default; - Dictionary> additionalPropertiesDictionary = new Dictionary>(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("type"u8)) - { - type = property.Value.GetString(); - continue; - } - if (property.NameEquals("connectVia"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - connectVia = IntegrationRuntimeReference.DeserializeIntegrationRuntimeReference(property.Value); - continue; - } - if (property.NameEquals("description"u8)) - { - description = property.Value.GetString(); - continue; - } - if (property.NameEquals("parameters"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - Dictionary dictionary = new Dictionary(); - foreach (var property0 in property.Value.EnumerateObject()) - { - dictionary.Add(property0.Name, EntityParameterSpecification.DeserializeEntityParameterSpecification(property0.Value)); - } - parameters = dictionary; - continue; - } - if (property.NameEquals("annotations"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - if (item.ValueKind == JsonValueKind.Null) - { - array.Add(null); - } - else - { - array.Add(BinaryData.FromString(item.GetRawText())); - } - } - annotations = array; - continue; - } - if (property.NameEquals("typeProperties"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - foreach (var property0 in property.Value.EnumerateObject()) - { - if (property0.NameEquals("functionAppUrl"u8)) - { - functionAppUrl = BinaryData.FromString(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("functionKey"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - functionKey = JsonSerializer.Deserialize(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("encryptedCredential"u8)) - { - encryptedCredential = property0.Value.GetString(); - continue; - } - if (property0.NameEquals("credential"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - credential = DataFactoryCredentialReference.DeserializeDataFactoryCredentialReference(property0.Value); - continue; - } - if (property0.NameEquals("resourceId"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - resourceId = BinaryData.FromString(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("authentication"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - authentication = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - } - continue; - } - additionalPropertiesDictionary.Add(property.Name, JsonSerializer.Deserialize>(property.Value.GetRawText())); - } - additionalProperties = additionalPropertiesDictionary; - return new AzureFunctionLinkedService(type, connectVia.Value, description.Value, Optional.ToDictionary(parameters), Optional.ToList(annotations), additionalProperties, functionAppUrl, functionKey, encryptedCredential.Value, credential.Value, resourceId.Value, authentication.Value); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/AzureFunctionLinkedService.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/AzureFunctionLinkedService.cs deleted file mode 100644 index d86f15f0..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/AzureFunctionLinkedService.cs +++ /dev/null @@ -1,119 +0,0 @@ -// - -#nullable disable - -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// Azure Function linked service. - public partial class AzureFunctionLinkedService : DataFactoryLinkedServiceProperties - { - /// Initializes a new instance of AzureFunctionLinkedService. - /// The endpoint of the Azure Function App. URL will be in the format https://<accountName>.azurewebsites.net. - /// is null. - public AzureFunctionLinkedService(BinaryData functionAppUri) - { - Argument.AssertNotNull(functionAppUri, nameof(functionAppUri)); - - FunctionAppUri = functionAppUri; - LinkedServiceType = "AzureFunction"; - } - - /// Initializes a new instance of AzureFunctionLinkedService. - /// Type of linked service. - /// The integration runtime reference. - /// Linked service description. - /// Parameters for linked service. - /// List of tags that can be used for describing the linked service. - /// Additional Properties. - /// The endpoint of the Azure Function App. URL will be in the format https://<accountName>.azurewebsites.net. - /// Function or Host key for Azure Function App. - /// The encrypted credential used for authentication. Credentials are encrypted using the integration runtime credential manager. Type: string. - /// The credential reference containing authentication information. - /// Allowed token audiences for azure function. - /// Type of authentication (Required to specify MSI) used to connect to AzureFunction. Type: string (or Expression with resultType string). - internal AzureFunctionLinkedService(string linkedServiceType, IntegrationRuntimeReference connectVia, string description, IDictionary parameters, IList annotations, IDictionary> additionalProperties, BinaryData functionAppUri, DataFactorySecretBaseDefinition functionKey, string encryptedCredential, DataFactoryCredentialReference credential, BinaryData resourceId, DataFactoryElement authentication) : base(linkedServiceType, connectVia, description, parameters, annotations, additionalProperties) - { - FunctionAppUri = functionAppUri; - FunctionKey = functionKey; - EncryptedCredential = encryptedCredential; - Credential = credential; - ResourceId = resourceId; - Authentication = authentication; - LinkedServiceType = linkedServiceType ?? "AzureFunction"; - } - - /// - /// The endpoint of the Azure Function App. URL will be in the format https://<accountName>.azurewebsites.net. - /// - /// To assign an object to this property use . - /// - /// - /// To assign an already formated json string to this property use . - /// - /// - /// Examples: - /// - /// - /// BinaryData.FromObjectAsJson("foo") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromString("\"foo\"") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromObjectAsJson(new { key = "value" }) - /// Creates a payload of { "key": "value" }. - /// - /// - /// BinaryData.FromString("{\"key\": \"value\"}") - /// Creates a payload of { "key": "value" }. - /// - /// - /// - /// - public BinaryData FunctionAppUri { get; set; } - /// Function or Host key for Azure Function App. - public DataFactorySecretBaseDefinition FunctionKey { get; set; } - /// The encrypted credential used for authentication. Credentials are encrypted using the integration runtime credential manager. Type: string. - public string EncryptedCredential { get; set; } - /// The credential reference containing authentication information. - public DataFactoryCredentialReference Credential { get; set; } - /// - /// Allowed token audiences for azure function. - /// - /// To assign an object to this property use . - /// - /// - /// To assign an already formated json string to this property use . - /// - /// - /// Examples: - /// - /// - /// BinaryData.FromObjectAsJson("foo") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromString("\"foo\"") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromObjectAsJson(new { key = "value" }) - /// Creates a payload of { "key": "value" }. - /// - /// - /// BinaryData.FromString("{\"key\": \"value\"}") - /// Creates a payload of { "key": "value" }. - /// - /// - /// - /// - public BinaryData ResourceId { get; set; } - /// Type of authentication (Required to specify MSI) used to connect to AzureFunction. Type: string (or Expression with resultType string). - public DataFactoryElement Authentication { get; set; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/AzureKeyVaultLinkedService.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/AzureKeyVaultLinkedService.Serialization.cs deleted file mode 100644 index de9170f9..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/AzureKeyVaultLinkedService.Serialization.cs +++ /dev/null @@ -1,183 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class AzureKeyVaultLinkedService : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - writer.WritePropertyName("type"u8); - writer.WriteStringValue(LinkedServiceType); - if (Optional.IsDefined(ConnectVia)) - { - writer.WritePropertyName("connectVia"u8); - writer.WriteObjectValue(ConnectVia); - } - if (Optional.IsDefined(Description)) - { - writer.WritePropertyName("description"u8); - writer.WriteStringValue(Description); - } - if (Optional.IsCollectionDefined(Parameters)) - { - writer.WritePropertyName("parameters"u8); - writer.WriteStartObject(); - foreach (var item in Parameters) - { - writer.WritePropertyName(item.Key); - writer.WriteObjectValue(item.Value); - } - writer.WriteEndObject(); - } - if (Optional.IsCollectionDefined(Annotations)) - { - writer.WritePropertyName("annotations"u8); - writer.WriteStartArray(); - foreach (var item in Annotations) - { - if (item == null) - { - writer.WriteNullValue(); - continue; - } -#if NET6_0_OR_GREATER - writer.WriteRawValue(item); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.ToString()).RootElement); -#endif - } - writer.WriteEndArray(); - } - writer.WritePropertyName("typeProperties"u8); - writer.WriteStartObject(); - writer.WritePropertyName("baseUrl"u8); - JsonSerializer.Serialize(writer, BaseUri); - if (Optional.IsDefined(Credential)) - { - writer.WritePropertyName("credential"u8); - writer.WriteObjectValue(Credential); - } - writer.WriteEndObject(); - foreach (var item in AdditionalProperties) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.Value.ToString()).RootElement); -#endif - } - writer.WriteEndObject(); - } - - internal static AzureKeyVaultLinkedService DeserializeAzureKeyVaultLinkedService(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - string type = default; - Optional connectVia = default; - Optional description = default; - Optional> parameters = default; - Optional> annotations = default; - DataFactoryElement baseUrl = default; - Optional credential = default; - IDictionary> additionalProperties = default; - Dictionary> additionalPropertiesDictionary = new Dictionary>(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("type"u8)) - { - type = property.Value.GetString(); - continue; - } - if (property.NameEquals("connectVia"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - connectVia = IntegrationRuntimeReference.DeserializeIntegrationRuntimeReference(property.Value); - continue; - } - if (property.NameEquals("description"u8)) - { - description = property.Value.GetString(); - continue; - } - if (property.NameEquals("parameters"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - Dictionary dictionary = new Dictionary(); - foreach (var property0 in property.Value.EnumerateObject()) - { - dictionary.Add(property0.Name, EntityParameterSpecification.DeserializeEntityParameterSpecification(property0.Value)); - } - parameters = dictionary; - continue; - } - if (property.NameEquals("annotations"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - if (item.ValueKind == JsonValueKind.Null) - { - array.Add(null); - } - else - { - array.Add(BinaryData.FromString(item.GetRawText())); - } - } - annotations = array; - continue; - } - if (property.NameEquals("typeProperties"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - foreach (var property0 in property.Value.EnumerateObject()) - { - if (property0.NameEquals("baseUrl"u8)) - { - baseUrl = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("credential"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - credential = DataFactoryCredentialReference.DeserializeDataFactoryCredentialReference(property0.Value); - continue; - } - } - continue; - } - additionalPropertiesDictionary.Add(property.Name, JsonSerializer.Deserialize>(property.Value.GetRawText())); - } - additionalProperties = additionalPropertiesDictionary; - return new AzureKeyVaultLinkedService(type, connectVia.Value, description.Value, Optional.ToDictionary(parameters), Optional.ToList(annotations), additionalProperties, baseUrl, credential.Value); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/AzureKeyVaultLinkedService.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/AzureKeyVaultLinkedService.cs deleted file mode 100644 index de8bc40c..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/AzureKeyVaultLinkedService.cs +++ /dev/null @@ -1,45 +0,0 @@ -// - -#nullable disable - -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// Azure Key Vault linked service. - public partial class AzureKeyVaultLinkedService : DataFactoryLinkedServiceProperties - { - /// Initializes a new instance of AzureKeyVaultLinkedService. - /// The base URL of the Azure Key Vault. e.g. https://myakv.vault.azure.net Type: string (or Expression with resultType string). - /// is null. - public AzureKeyVaultLinkedService(DataFactoryElement baseUri) - { - Argument.AssertNotNull(baseUri, nameof(baseUri)); - - BaseUri = baseUri; - LinkedServiceType = "AzureKeyVault"; - } - - /// Initializes a new instance of AzureKeyVaultLinkedService. - /// Type of linked service. - /// The integration runtime reference. - /// Linked service description. - /// Parameters for linked service. - /// List of tags that can be used for describing the linked service. - /// Additional Properties. - /// The base URL of the Azure Key Vault. e.g. https://myakv.vault.azure.net Type: string (or Expression with resultType string). - /// The credential reference containing authentication information. - internal AzureKeyVaultLinkedService(string linkedServiceType, IntegrationRuntimeReference connectVia, string description, IDictionary parameters, IList annotations, IDictionary> additionalProperties, DataFactoryElement baseUri, DataFactoryCredentialReference credential) : base(linkedServiceType, connectVia, description, parameters, annotations, additionalProperties) - { - BaseUri = baseUri; - Credential = credential; - LinkedServiceType = linkedServiceType ?? "AzureKeyVault"; - } - - /// The base URL of the Azure Key Vault. e.g. https://myakv.vault.azure.net Type: string (or Expression with resultType string). - public DataFactoryElement BaseUri { get; set; } - /// The credential reference containing authentication information. - public DataFactoryCredentialReference Credential { get; set; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/AzureMLBatchExecutionActivity.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/AzureMLBatchExecutionActivity.Serialization.cs deleted file mode 100644 index eb1883e1..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/AzureMLBatchExecutionActivity.Serialization.cs +++ /dev/null @@ -1,290 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class AzureMLBatchExecutionActivity : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - if (Optional.IsDefined(LinkedServiceName)) - { - writer.WritePropertyName("linkedServiceName"u8); - JsonSerializer.Serialize(writer, LinkedServiceName); - } - if (Optional.IsDefined(Policy)) - { - writer.WritePropertyName("policy"u8); - writer.WriteObjectValue(Policy); - } - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ActivityType); - if (Optional.IsDefined(Description)) - { - writer.WritePropertyName("description"u8); - writer.WriteStringValue(Description); - } - if (Optional.IsDefined(State)) - { - writer.WritePropertyName("state"u8); - writer.WriteStringValue(State.Value.ToString()); - } - if (Optional.IsDefined(OnInactiveMarkAs)) - { - writer.WritePropertyName("onInactiveMarkAs"u8); - writer.WriteStringValue(OnInactiveMarkAs.Value.ToString()); - } - if (Optional.IsCollectionDefined(DependsOn)) - { - writer.WritePropertyName("dependsOn"u8); - writer.WriteStartArray(); - foreach (var item in DependsOn) - { - writer.WriteObjectValue(item); - } - writer.WriteEndArray(); - } - if (Optional.IsCollectionDefined(UserProperties)) - { - writer.WritePropertyName("userProperties"u8); - writer.WriteStartArray(); - foreach (var item in UserProperties) - { - writer.WriteObjectValue(item); - } - writer.WriteEndArray(); - } - writer.WritePropertyName("typeProperties"u8); - writer.WriteStartObject(); - if (Optional.IsCollectionDefined(GlobalParameters)) - { - writer.WritePropertyName("globalParameters"u8); - writer.WriteStartObject(); - foreach (var item in GlobalParameters) - { - writer.WritePropertyName(item.Key); - if (item.Value == null) - { - writer.WriteNullValue(); - continue; - } -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.Value.ToString()).RootElement); -#endif - } - writer.WriteEndObject(); - } - if (Optional.IsCollectionDefined(WebServiceOutputs)) - { - writer.WritePropertyName("webServiceOutputs"u8); - writer.WriteStartObject(); - foreach (var item in WebServiceOutputs) - { - writer.WritePropertyName(item.Key); - writer.WriteObjectValue(item.Value); - } - writer.WriteEndObject(); - } - if (Optional.IsCollectionDefined(WebServiceInputs)) - { - writer.WritePropertyName("webServiceInputs"u8); - writer.WriteStartObject(); - foreach (var item in WebServiceInputs) - { - writer.WritePropertyName(item.Key); - writer.WriteObjectValue(item.Value); - } - writer.WriteEndObject(); - } - writer.WriteEndObject(); - foreach (var item in AdditionalProperties) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.Value.ToString()).RootElement); -#endif - } - writer.WriteEndObject(); - } - - internal static AzureMLBatchExecutionActivity DeserializeAzureMLBatchExecutionActivity(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - Optional linkedServiceName = default; - Optional policy = default; - string name = default; - string type = default; - Optional description = default; - Optional state = default; - Optional onInactiveMarkAs = default; - Optional> dependsOn = default; - Optional> userProperties = default; - Optional>> globalParameters = default; - Optional> webServiceOutputs = default; - Optional> webServiceInputs = default; - IDictionary> additionalProperties = default; - Dictionary> additionalPropertiesDictionary = new Dictionary>(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("linkedServiceName"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - linkedServiceName = JsonSerializer.Deserialize(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("policy"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - policy = PipelineActivityPolicy.DeserializePipelineActivityPolicy(property.Value); - continue; - } - if (property.NameEquals("name"u8)) - { - name = property.Value.GetString(); - continue; - } - if (property.NameEquals("type"u8)) - { - type = property.Value.GetString(); - continue; - } - if (property.NameEquals("description"u8)) - { - description = property.Value.GetString(); - continue; - } - if (property.NameEquals("state"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - state = new PipelineActivityState(property.Value.GetString()); - continue; - } - if (property.NameEquals("onInactiveMarkAs"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - onInactiveMarkAs = new ActivityOnInactiveMarkAs(property.Value.GetString()); - continue; - } - if (property.NameEquals("dependsOn"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - array.Add(PipelineActivityDependency.DeserializePipelineActivityDependency(item)); - } - dependsOn = array; - continue; - } - if (property.NameEquals("userProperties"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - array.Add(PipelineActivityUserProperty.DeserializePipelineActivityUserProperty(item)); - } - userProperties = array; - continue; - } - if (property.NameEquals("typeProperties"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - foreach (var property0 in property.Value.EnumerateObject()) - { - if (property0.NameEquals("globalParameters"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - Dictionary> dictionary = new Dictionary>(); - foreach (var property1 in property0.Value.EnumerateObject()) - { - if (property1.Value.ValueKind == JsonValueKind.Null) - { - dictionary.Add(property1.Name, null); - } - else - { - dictionary.Add(property1.Name, JsonSerializer.Deserialize>(property1.Value.GetRawText())); - } - } - globalParameters = dictionary; - continue; - } - if (property0.NameEquals("webServiceOutputs"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - Dictionary dictionary = new Dictionary(); - foreach (var property1 in property0.Value.EnumerateObject()) - { - dictionary.Add(property1.Name, AzureMLWebServiceFile.DeserializeAzureMLWebServiceFile(property1.Value)); - } - webServiceOutputs = dictionary; - continue; - } - if (property0.NameEquals("webServiceInputs"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - Dictionary dictionary = new Dictionary(); - foreach (var property1 in property0.Value.EnumerateObject()) - { - dictionary.Add(property1.Name, AzureMLWebServiceFile.DeserializeAzureMLWebServiceFile(property1.Value)); - } - webServiceInputs = dictionary; - continue; - } - } - continue; - } - additionalPropertiesDictionary.Add(property.Name, JsonSerializer.Deserialize>(property.Value.GetRawText())); - } - additionalProperties = additionalPropertiesDictionary; - return new AzureMLBatchExecutionActivity(name, type, description.Value, Optional.ToNullable(state), Optional.ToNullable(onInactiveMarkAs), Optional.ToList(dependsOn), Optional.ToList(userProperties), additionalProperties, linkedServiceName, policy.Value, Optional.ToDictionary(globalParameters), Optional.ToDictionary(webServiceOutputs), Optional.ToDictionary(webServiceInputs)); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/AzureMLBatchExecutionActivity.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/AzureMLBatchExecutionActivity.cs deleted file mode 100644 index 006d2a50..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/AzureMLBatchExecutionActivity.cs +++ /dev/null @@ -1,84 +0,0 @@ -// - -#nullable disable - -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// Azure ML Batch Execution activity. - public partial class AzureMLBatchExecutionActivity : ExecutionActivity - { - /// Initializes a new instance of AzureMLBatchExecutionActivity. - /// Activity name. - /// is null. - public AzureMLBatchExecutionActivity(string name) : base(name) - { - Argument.AssertNotNull(name, nameof(name)); - - GlobalParameters = new ChangeTrackingDictionary>(); - WebServiceOutputs = new ChangeTrackingDictionary(); - WebServiceInputs = new ChangeTrackingDictionary(); - ActivityType = "AzureMLBatchExecution"; - } - - /// Initializes a new instance of AzureMLBatchExecutionActivity. - /// Activity name. - /// Type of activity. - /// Activity description. - /// Activity state. This is an optional property and if not provided, the state will be Active by default. - /// 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. - /// Activity depends on condition. - /// Activity user properties. - /// Additional Properties. - /// Linked service reference. - /// Activity policy. - /// Key,Value pairs to be passed to the Azure ML Batch Execution Service endpoint. Keys must match the names of web service parameters defined in the published Azure ML web service. Values will be passed in the GlobalParameters property of the Azure ML batch execution request. - /// Key,Value pairs, mapping the names of Azure ML endpoint's Web Service Outputs to AzureMLWebServiceFile objects specifying the output Blob locations. This information will be passed in the WebServiceOutputs property of the Azure ML batch execution request. - /// Key,Value pairs, mapping the names of Azure ML endpoint's Web Service Inputs to AzureMLWebServiceFile objects specifying the input Blob locations.. This information will be passed in the WebServiceInputs property of the Azure ML batch execution request. - internal AzureMLBatchExecutionActivity(string name, string activityType, string description, PipelineActivityState? state, ActivityOnInactiveMarkAs? onInactiveMarkAs, IList dependsOn, IList userProperties, IDictionary> additionalProperties, DataFactoryLinkedServiceReference linkedServiceName, PipelineActivityPolicy policy, IDictionary> globalParameters, IDictionary webServiceOutputs, IDictionary webServiceInputs) : base(name, activityType, description, state, onInactiveMarkAs, dependsOn, userProperties, additionalProperties, linkedServiceName, policy) - { - GlobalParameters = globalParameters; - WebServiceOutputs = webServiceOutputs; - WebServiceInputs = webServiceInputs; - ActivityType = activityType ?? "AzureMLBatchExecution"; - } - - /// - /// Key,Value pairs to be passed to the Azure ML Batch Execution Service endpoint. Keys must match the names of web service parameters defined in the published Azure ML web service. Values will be passed in the GlobalParameters property of the Azure ML batch execution request. - /// - /// To assign an object to the value of this property use . - /// - /// - /// To assign an already formated json string to this property use . - /// - /// - /// Examples: - /// - /// - /// BinaryData.FromObjectAsJson("foo") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromString("\"foo\"") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromObjectAsJson(new { key = "value" }) - /// Creates a payload of { "key": "value" }. - /// - /// - /// BinaryData.FromString("{\"key\": \"value\"}") - /// Creates a payload of { "key": "value" }. - /// - /// - /// - /// - public IDictionary> GlobalParameters { get; } - /// Key,Value pairs, mapping the names of Azure ML endpoint's Web Service Outputs to AzureMLWebServiceFile objects specifying the output Blob locations. This information will be passed in the WebServiceOutputs property of the Azure ML batch execution request. - public IDictionary WebServiceOutputs { get; } - /// Key,Value pairs, mapping the names of Azure ML endpoint's Web Service Inputs to AzureMLWebServiceFile objects specifying the input Blob locations.. This information will be passed in the WebServiceInputs property of the Azure ML batch execution request. - public IDictionary WebServiceInputs { get; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/AzureMLExecutePipelineActivity.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/AzureMLExecutePipelineActivity.Serialization.cs deleted file mode 100644 index 2054eaa5..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/AzureMLExecutePipelineActivity.Serialization.cs +++ /dev/null @@ -1,316 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class AzureMLExecutePipelineActivity : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - if (Optional.IsDefined(LinkedServiceName)) - { - writer.WritePropertyName("linkedServiceName"u8); - JsonSerializer.Serialize(writer, LinkedServiceName); - } - if (Optional.IsDefined(Policy)) - { - writer.WritePropertyName("policy"u8); - writer.WriteObjectValue(Policy); - } - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ActivityType); - if (Optional.IsDefined(Description)) - { - writer.WritePropertyName("description"u8); - writer.WriteStringValue(Description); - } - if (Optional.IsDefined(State)) - { - writer.WritePropertyName("state"u8); - writer.WriteStringValue(State.Value.ToString()); - } - if (Optional.IsDefined(OnInactiveMarkAs)) - { - writer.WritePropertyName("onInactiveMarkAs"u8); - writer.WriteStringValue(OnInactiveMarkAs.Value.ToString()); - } - if (Optional.IsCollectionDefined(DependsOn)) - { - writer.WritePropertyName("dependsOn"u8); - writer.WriteStartArray(); - foreach (var item in DependsOn) - { - writer.WriteObjectValue(item); - } - writer.WriteEndArray(); - } - if (Optional.IsCollectionDefined(UserProperties)) - { - writer.WritePropertyName("userProperties"u8); - writer.WriteStartArray(); - foreach (var item in UserProperties) - { - writer.WriteObjectValue(item); - } - writer.WriteEndArray(); - } - writer.WritePropertyName("typeProperties"u8); - writer.WriteStartObject(); - if (Optional.IsDefined(MLPipelineId)) - { - writer.WritePropertyName("mlPipelineId"u8); - JsonSerializer.Serialize(writer, MLPipelineId); - } - if (Optional.IsDefined(MLPipelineEndpointId)) - { - writer.WritePropertyName("mlPipelineEndpointId"u8); - JsonSerializer.Serialize(writer, MLPipelineEndpointId); - } - if (Optional.IsDefined(Version)) - { - writer.WritePropertyName("version"u8); - JsonSerializer.Serialize(writer, Version); - } - if (Optional.IsDefined(ExperimentName)) - { - writer.WritePropertyName("experimentName"u8); - JsonSerializer.Serialize(writer, ExperimentName); - } - if (Optional.IsDefined(MLPipelineParameters)) - { - writer.WritePropertyName("mlPipelineParameters"u8); - JsonSerializer.Serialize(writer, MLPipelineParameters); - } - if (Optional.IsDefined(DataPathAssignments)) - { - writer.WritePropertyName("dataPathAssignments"u8); - JsonSerializer.Serialize(writer, DataPathAssignments); - } - if (Optional.IsDefined(MLParentRunId)) - { - writer.WritePropertyName("mlParentRunId"u8); - JsonSerializer.Serialize(writer, MLParentRunId); - } - if (Optional.IsDefined(ContinueOnStepFailure)) - { - writer.WritePropertyName("continueOnStepFailure"u8); - JsonSerializer.Serialize(writer, ContinueOnStepFailure); - } - writer.WriteEndObject(); - foreach (var item in AdditionalProperties) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.Value.ToString()).RootElement); -#endif - } - writer.WriteEndObject(); - } - - internal static AzureMLExecutePipelineActivity DeserializeAzureMLExecutePipelineActivity(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - Optional linkedServiceName = default; - Optional policy = default; - string name = default; - string type = default; - Optional description = default; - Optional state = default; - Optional onInactiveMarkAs = default; - Optional> dependsOn = default; - Optional> userProperties = default; - Optional> mlPipelineId = default; - Optional> mlPipelineEndpointId = default; - Optional> version = default; - Optional> experimentName = default; - Optional>> mlPipelineParameters = default; - Optional>> dataPathAssignments = default; - Optional> mlParentRunId = default; - Optional> continueOnStepFailure = default; - IDictionary> additionalProperties = default; - Dictionary> additionalPropertiesDictionary = new Dictionary>(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("linkedServiceName"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - linkedServiceName = JsonSerializer.Deserialize(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("policy"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - policy = PipelineActivityPolicy.DeserializePipelineActivityPolicy(property.Value); - continue; - } - if (property.NameEquals("name"u8)) - { - name = property.Value.GetString(); - continue; - } - if (property.NameEquals("type"u8)) - { - type = property.Value.GetString(); - continue; - } - if (property.NameEquals("description"u8)) - { - description = property.Value.GetString(); - continue; - } - if (property.NameEquals("state"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - state = new PipelineActivityState(property.Value.GetString()); - continue; - } - if (property.NameEquals("onInactiveMarkAs"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - onInactiveMarkAs = new ActivityOnInactiveMarkAs(property.Value.GetString()); - continue; - } - if (property.NameEquals("dependsOn"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - array.Add(PipelineActivityDependency.DeserializePipelineActivityDependency(item)); - } - dependsOn = array; - continue; - } - if (property.NameEquals("userProperties"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - array.Add(PipelineActivityUserProperty.DeserializePipelineActivityUserProperty(item)); - } - userProperties = array; - continue; - } - if (property.NameEquals("typeProperties"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - foreach (var property0 in property.Value.EnumerateObject()) - { - if (property0.NameEquals("mlPipelineId"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - mlPipelineId = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("mlPipelineEndpointId"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - mlPipelineEndpointId = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("version"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - version = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("experimentName"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - experimentName = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("mlPipelineParameters"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - mlPipelineParameters = JsonSerializer.Deserialize>>(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("dataPathAssignments"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - dataPathAssignments = JsonSerializer.Deserialize>>(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("mlParentRunId"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - mlParentRunId = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("continueOnStepFailure"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - continueOnStepFailure = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - } - continue; - } - additionalPropertiesDictionary.Add(property.Name, JsonSerializer.Deserialize>(property.Value.GetRawText())); - } - additionalProperties = additionalPropertiesDictionary; - return new AzureMLExecutePipelineActivity(name, type, description.Value, Optional.ToNullable(state), Optional.ToNullable(onInactiveMarkAs), Optional.ToList(dependsOn), Optional.ToList(userProperties), additionalProperties, linkedServiceName, policy.Value, mlPipelineId.Value, mlPipelineEndpointId.Value, version.Value, experimentName.Value, mlPipelineParameters.Value, dataPathAssignments.Value, mlParentRunId.Value, continueOnStepFailure.Value); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/AzureMLExecutePipelineActivity.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/AzureMLExecutePipelineActivity.cs deleted file mode 100644 index c4dc2056..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/AzureMLExecutePipelineActivity.cs +++ /dev/null @@ -1,72 +0,0 @@ -// - -#nullable disable - -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// Azure ML Execute Pipeline activity. - public partial class AzureMLExecutePipelineActivity : ExecutionActivity - { - /// Initializes a new instance of AzureMLExecutePipelineActivity. - /// Activity name. - /// is null. - public AzureMLExecutePipelineActivity(string name) : base(name) - { - Argument.AssertNotNull(name, nameof(name)); - - ActivityType = "AzureMLExecutePipeline"; - } - - /// Initializes a new instance of AzureMLExecutePipelineActivity. - /// Activity name. - /// Type of activity. - /// Activity description. - /// Activity state. This is an optional property and if not provided, the state will be Active by default. - /// 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. - /// Activity depends on condition. - /// Activity user properties. - /// Additional Properties. - /// Linked service reference. - /// Activity policy. - /// ID of the published Azure ML pipeline. Type: string (or Expression with resultType string). - /// ID of the published Azure ML pipeline endpoint. Type: string (or Expression with resultType string). - /// Version of the published Azure ML pipeline endpoint. Type: string (or Expression with resultType string). - /// Run history experiment name of the pipeline run. This information will be passed in the ExperimentName property of the published pipeline execution request. Type: string (or Expression with resultType string). - /// Key,Value pairs to be passed to the published Azure ML pipeline endpoint. Keys must match the names of pipeline parameters defined in the published pipeline. Values will be passed in the ParameterAssignments property of the published pipeline execution request. Type: object with key value pairs (or Expression with resultType object). - /// Dictionary used for changing data path assignments without retraining. Values will be passed in the dataPathAssignments property of the published pipeline execution request. Type: object with key value pairs (or Expression with resultType object). - /// The parent Azure ML Service pipeline run id. This information will be passed in the ParentRunId property of the published pipeline execution request. Type: string (or Expression with resultType string). - /// Whether to continue execution of other steps in the PipelineRun if a step fails. This information will be passed in the continueOnStepFailure property of the published pipeline execution request. Type: boolean (or Expression with resultType boolean). - internal AzureMLExecutePipelineActivity(string name, string activityType, string description, PipelineActivityState? state, ActivityOnInactiveMarkAs? onInactiveMarkAs, IList dependsOn, IList userProperties, IDictionary> additionalProperties, DataFactoryLinkedServiceReference linkedServiceName, PipelineActivityPolicy policy, DataFactoryElement mlPipelineId, DataFactoryElement mlPipelineEndpointId, DataFactoryElement version, DataFactoryElement experimentName, DataFactoryElement> mlPipelineParameters, DataFactoryElement> dataPathAssignments, DataFactoryElement mlParentRunId, DataFactoryElement continueOnStepFailure) : base(name, activityType, description, state, onInactiveMarkAs, dependsOn, userProperties, additionalProperties, linkedServiceName, policy) - { - MLPipelineId = mlPipelineId; - MLPipelineEndpointId = mlPipelineEndpointId; - Version = version; - ExperimentName = experimentName; - MLPipelineParameters = mlPipelineParameters; - DataPathAssignments = dataPathAssignments; - MLParentRunId = mlParentRunId; - ContinueOnStepFailure = continueOnStepFailure; - ActivityType = activityType ?? "AzureMLExecutePipeline"; - } - - /// ID of the published Azure ML pipeline. Type: string (or Expression with resultType string). - public DataFactoryElement MLPipelineId { get; set; } - /// ID of the published Azure ML pipeline endpoint. Type: string (or Expression with resultType string). - public DataFactoryElement MLPipelineEndpointId { get; set; } - /// Version of the published Azure ML pipeline endpoint. Type: string (or Expression with resultType string). - public DataFactoryElement Version { get; set; } - /// Run history experiment name of the pipeline run. This information will be passed in the ExperimentName property of the published pipeline execution request. Type: string (or Expression with resultType string). - public DataFactoryElement ExperimentName { get; set; } - /// Key,Value pairs to be passed to the published Azure ML pipeline endpoint. Keys must match the names of pipeline parameters defined in the published pipeline. Values will be passed in the ParameterAssignments property of the published pipeline execution request. Type: object with key value pairs (or Expression with resultType object). - public DataFactoryElement> MLPipelineParameters { get; set; } - /// Dictionary used for changing data path assignments without retraining. Values will be passed in the dataPathAssignments property of the published pipeline execution request. Type: object with key value pairs (or Expression with resultType object). - public DataFactoryElement> DataPathAssignments { get; set; } - /// The parent Azure ML Service pipeline run id. This information will be passed in the ParentRunId property of the published pipeline execution request. Type: string (or Expression with resultType string). - public DataFactoryElement MLParentRunId { get; set; } - /// Whether to continue execution of other steps in the PipelineRun if a step fails. This information will be passed in the continueOnStepFailure property of the published pipeline execution request. Type: boolean (or Expression with resultType boolean). - public DataFactoryElement ContinueOnStepFailure { get; set; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/AzureMLLinkedService.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/AzureMLLinkedService.Serialization.cs deleted file mode 100644 index ba84c9bb..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/AzureMLLinkedService.Serialization.cs +++ /dev/null @@ -1,261 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class AzureMLLinkedService : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - writer.WritePropertyName("type"u8); - writer.WriteStringValue(LinkedServiceType); - if (Optional.IsDefined(ConnectVia)) - { - writer.WritePropertyName("connectVia"u8); - writer.WriteObjectValue(ConnectVia); - } - if (Optional.IsDefined(Description)) - { - writer.WritePropertyName("description"u8); - writer.WriteStringValue(Description); - } - if (Optional.IsCollectionDefined(Parameters)) - { - writer.WritePropertyName("parameters"u8); - writer.WriteStartObject(); - foreach (var item in Parameters) - { - writer.WritePropertyName(item.Key); - writer.WriteObjectValue(item.Value); - } - writer.WriteEndObject(); - } - if (Optional.IsCollectionDefined(Annotations)) - { - writer.WritePropertyName("annotations"u8); - writer.WriteStartArray(); - foreach (var item in Annotations) - { - if (item == null) - { - writer.WriteNullValue(); - continue; - } -#if NET6_0_OR_GREATER - writer.WriteRawValue(item); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.ToString()).RootElement); -#endif - } - writer.WriteEndArray(); - } - writer.WritePropertyName("typeProperties"u8); - writer.WriteStartObject(); - writer.WritePropertyName("mlEndpoint"u8); - JsonSerializer.Serialize(writer, MLEndpoint); - writer.WritePropertyName("apiKey"u8); - JsonSerializer.Serialize(writer, ApiKey); if (Optional.IsDefined(UpdateResourceEndpoint)) - { - writer.WritePropertyName("updateResourceEndpoint"u8); - JsonSerializer.Serialize(writer, UpdateResourceEndpoint); - } - if (Optional.IsDefined(ServicePrincipalId)) - { - writer.WritePropertyName("servicePrincipalId"u8); - JsonSerializer.Serialize(writer, ServicePrincipalId); - } - if (Optional.IsDefined(ServicePrincipalKey)) - { - writer.WritePropertyName("servicePrincipalKey"u8); - JsonSerializer.Serialize(writer, ServicePrincipalKey); - } - if (Optional.IsDefined(Tenant)) - { - writer.WritePropertyName("tenant"u8); - JsonSerializer.Serialize(writer, Tenant); - } - if (Optional.IsDefined(EncryptedCredential)) - { - writer.WritePropertyName("encryptedCredential"u8); - writer.WriteStringValue(EncryptedCredential); - } - if (Optional.IsDefined(Authentication)) - { - writer.WritePropertyName("authentication"u8); - JsonSerializer.Serialize(writer, Authentication); - } - writer.WriteEndObject(); - foreach (var item in AdditionalProperties) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.Value.ToString()).RootElement); -#endif - } - writer.WriteEndObject(); - } - - internal static AzureMLLinkedService DeserializeAzureMLLinkedService(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - string type = default; - Optional connectVia = default; - Optional description = default; - Optional> parameters = default; - Optional> annotations = default; - DataFactoryElement mlEndpoint = default; - DataFactorySecretBaseDefinition apiKey = default; - Optional> updateResourceEndpoint = default; - Optional> servicePrincipalId = default; - Optional servicePrincipalKey = default; - Optional> tenant = default; - Optional encryptedCredential = default; - Optional> authentication = default; - IDictionary> additionalProperties = default; - Dictionary> additionalPropertiesDictionary = new Dictionary>(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("type"u8)) - { - type = property.Value.GetString(); - continue; - } - if (property.NameEquals("connectVia"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - connectVia = IntegrationRuntimeReference.DeserializeIntegrationRuntimeReference(property.Value); - continue; - } - if (property.NameEquals("description"u8)) - { - description = property.Value.GetString(); - continue; - } - if (property.NameEquals("parameters"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - Dictionary dictionary = new Dictionary(); - foreach (var property0 in property.Value.EnumerateObject()) - { - dictionary.Add(property0.Name, EntityParameterSpecification.DeserializeEntityParameterSpecification(property0.Value)); - } - parameters = dictionary; - continue; - } - if (property.NameEquals("annotations"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - if (item.ValueKind == JsonValueKind.Null) - { - array.Add(null); - } - else - { - array.Add(BinaryData.FromString(item.GetRawText())); - } - } - annotations = array; - continue; - } - if (property.NameEquals("typeProperties"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - foreach (var property0 in property.Value.EnumerateObject()) - { - if (property0.NameEquals("mlEndpoint"u8)) - { - mlEndpoint = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("apiKey"u8)) - { - apiKey = JsonSerializer.Deserialize(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("updateResourceEndpoint"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - updateResourceEndpoint = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("servicePrincipalId"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - servicePrincipalId = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("servicePrincipalKey"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - servicePrincipalKey = JsonSerializer.Deserialize(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("tenant"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - tenant = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("encryptedCredential"u8)) - { - encryptedCredential = property0.Value.GetString(); - continue; - } - if (property0.NameEquals("authentication"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - authentication = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - } - continue; - } - additionalPropertiesDictionary.Add(property.Name, JsonSerializer.Deserialize>(property.Value.GetRawText())); - } - additionalProperties = additionalPropertiesDictionary; - return new AzureMLLinkedService(type, connectVia.Value, description.Value, Optional.ToDictionary(parameters), Optional.ToList(annotations), additionalProperties, mlEndpoint, apiKey, updateResourceEndpoint.Value, servicePrincipalId.Value, servicePrincipalKey, tenant.Value, encryptedCredential.Value, authentication.Value); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/AzureMLLinkedService.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/AzureMLLinkedService.cs deleted file mode 100644 index a0e34c1b..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/AzureMLLinkedService.cs +++ /dev/null @@ -1,72 +0,0 @@ -// - -#nullable disable - -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// Azure ML Studio Web Service linked service. - public partial class AzureMLLinkedService : DataFactoryLinkedServiceProperties - { - /// Initializes a new instance of AzureMLLinkedService. - /// The Batch Execution REST URL for an Azure ML Studio Web Service endpoint. Type: string (or Expression with resultType string). - /// The API key for accessing the Azure ML model endpoint. - /// or is null. - public AzureMLLinkedService(DataFactoryElement mlEndpoint, DataFactorySecretBaseDefinition apiKey) - { - Argument.AssertNotNull(mlEndpoint, nameof(mlEndpoint)); - Argument.AssertNotNull(apiKey, nameof(apiKey)); - - MLEndpoint = mlEndpoint; - ApiKey = apiKey; - LinkedServiceType = "AzureML"; - } - - /// Initializes a new instance of AzureMLLinkedService. - /// Type of linked service. - /// The integration runtime reference. - /// Linked service description. - /// Parameters for linked service. - /// List of tags that can be used for describing the linked service. - /// Additional Properties. - /// The Batch Execution REST URL for an Azure ML Studio Web Service endpoint. Type: string (or Expression with resultType string). - /// The API key for accessing the Azure ML model endpoint. - /// The Update Resource REST URL for an Azure ML Studio Web Service endpoint. Type: string (or Expression with resultType string). - /// The ID of the service principal used to authenticate against the ARM-based updateResourceEndpoint of an Azure ML Studio web service. Type: string (or Expression with resultType string). - /// The key of the service principal used to authenticate against the ARM-based updateResourceEndpoint of an Azure ML Studio web service. - /// The name or ID of the tenant to which the service principal belongs. Type: string (or Expression with resultType string). - /// The encrypted credential used for authentication. Credentials are encrypted using the integration runtime credential manager. Type: string. - /// Type of authentication (Required to specify MSI) used to connect to AzureML. Type: string (or Expression with resultType string). - internal AzureMLLinkedService(string linkedServiceType, IntegrationRuntimeReference connectVia, string description, IDictionary parameters, IList annotations, IDictionary> additionalProperties, DataFactoryElement mlEndpoint, DataFactorySecretBaseDefinition apiKey, DataFactoryElement updateResourceEndpoint, DataFactoryElement servicePrincipalId, DataFactorySecretBaseDefinition servicePrincipalKey, DataFactoryElement tenant, string encryptedCredential, DataFactoryElement authentication) : base(linkedServiceType, connectVia, description, parameters, annotations, additionalProperties) - { - MLEndpoint = mlEndpoint; - ApiKey = apiKey; - UpdateResourceEndpoint = updateResourceEndpoint; - ServicePrincipalId = servicePrincipalId; - ServicePrincipalKey = servicePrincipalKey; - Tenant = tenant; - EncryptedCredential = encryptedCredential; - Authentication = authentication; - LinkedServiceType = linkedServiceType ?? "AzureML"; - } - - /// The Batch Execution REST URL for an Azure ML Studio Web Service endpoint. Type: string (or Expression with resultType string). - public DataFactoryElement MLEndpoint { get; set; } - /// The API key for accessing the Azure ML model endpoint. - public DataFactorySecretBaseDefinition ApiKey { get; set; } - /// The Update Resource REST URL for an Azure ML Studio Web Service endpoint. Type: string (or Expression with resultType string). - public DataFactoryElement UpdateResourceEndpoint { get; set; } - /// The ID of the service principal used to authenticate against the ARM-based updateResourceEndpoint of an Azure ML Studio web service. Type: string (or Expression with resultType string). - public DataFactoryElement ServicePrincipalId { get; set; } - /// The key of the service principal used to authenticate against the ARM-based updateResourceEndpoint of an Azure ML Studio web service. - public DataFactorySecretBaseDefinition ServicePrincipalKey { get; set; } - /// The name or ID of the tenant to which the service principal belongs. Type: string (or Expression with resultType string). - public DataFactoryElement Tenant { get; set; } - /// The encrypted credential used for authentication. Credentials are encrypted using the integration runtime credential manager. Type: string. - public string EncryptedCredential { get; set; } - /// Type of authentication (Required to specify MSI) used to connect to AzureML. Type: string (or Expression with resultType string). - public DataFactoryElement Authentication { get; set; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/AzureMLServiceLinkedService.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/AzureMLServiceLinkedService.Serialization.cs deleted file mode 100644 index 5d72e5fc..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/AzureMLServiceLinkedService.Serialization.cs +++ /dev/null @@ -1,255 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class AzureMLServiceLinkedService : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - writer.WritePropertyName("type"u8); - writer.WriteStringValue(LinkedServiceType); - if (Optional.IsDefined(ConnectVia)) - { - writer.WritePropertyName("connectVia"u8); - writer.WriteObjectValue(ConnectVia); - } - if (Optional.IsDefined(Description)) - { - writer.WritePropertyName("description"u8); - writer.WriteStringValue(Description); - } - if (Optional.IsCollectionDefined(Parameters)) - { - writer.WritePropertyName("parameters"u8); - writer.WriteStartObject(); - foreach (var item in Parameters) - { - writer.WritePropertyName(item.Key); - writer.WriteObjectValue(item.Value); - } - writer.WriteEndObject(); - } - if (Optional.IsCollectionDefined(Annotations)) - { - writer.WritePropertyName("annotations"u8); - writer.WriteStartArray(); - foreach (var item in Annotations) - { - if (item == null) - { - writer.WriteNullValue(); - continue; - } -#if NET6_0_OR_GREATER - writer.WriteRawValue(item); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.ToString()).RootElement); -#endif - } - writer.WriteEndArray(); - } - writer.WritePropertyName("typeProperties"u8); - writer.WriteStartObject(); - writer.WritePropertyName("subscriptionId"u8); - JsonSerializer.Serialize(writer, SubscriptionId); - writer.WritePropertyName("resourceGroupName"u8); - JsonSerializer.Serialize(writer, ResourceGroupName); - writer.WritePropertyName("mlWorkspaceName"u8); - JsonSerializer.Serialize(writer, MLWorkspaceName); - if (Optional.IsDefined(Authentication)) - { - writer.WritePropertyName("authentication"u8); - JsonSerializer.Serialize(writer, Authentication); - } - if (Optional.IsDefined(ServicePrincipalId)) - { - writer.WritePropertyName("servicePrincipalId"u8); - JsonSerializer.Serialize(writer, ServicePrincipalId); - } - if (Optional.IsDefined(ServicePrincipalKey)) - { - writer.WritePropertyName("servicePrincipalKey"u8); - JsonSerializer.Serialize(writer, ServicePrincipalKey); - } - if (Optional.IsDefined(Tenant)) - { - writer.WritePropertyName("tenant"u8); - JsonSerializer.Serialize(writer, Tenant); - } - if (Optional.IsDefined(EncryptedCredential)) - { - writer.WritePropertyName("encryptedCredential"u8); - writer.WriteStringValue(EncryptedCredential); - } - writer.WriteEndObject(); - foreach (var item in AdditionalProperties) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.Value.ToString()).RootElement); -#endif - } - writer.WriteEndObject(); - } - - internal static AzureMLServiceLinkedService DeserializeAzureMLServiceLinkedService(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - string type = default; - Optional connectVia = default; - Optional description = default; - Optional> parameters = default; - Optional> annotations = default; - DataFactoryElement subscriptionId = default; - DataFactoryElement resourceGroupName = default; - DataFactoryElement mlWorkspaceName = default; - Optional> authentication = default; - Optional> servicePrincipalId = default; - Optional servicePrincipalKey = default; - Optional> tenant = default; - Optional encryptedCredential = default; - IDictionary> additionalProperties = default; - Dictionary> additionalPropertiesDictionary = new Dictionary>(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("type"u8)) - { - type = property.Value.GetString(); - continue; - } - if (property.NameEquals("connectVia"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - connectVia = IntegrationRuntimeReference.DeserializeIntegrationRuntimeReference(property.Value); - continue; - } - if (property.NameEquals("description"u8)) - { - description = property.Value.GetString(); - continue; - } - if (property.NameEquals("parameters"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - Dictionary dictionary = new Dictionary(); - foreach (var property0 in property.Value.EnumerateObject()) - { - dictionary.Add(property0.Name, EntityParameterSpecification.DeserializeEntityParameterSpecification(property0.Value)); - } - parameters = dictionary; - continue; - } - if (property.NameEquals("annotations"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - if (item.ValueKind == JsonValueKind.Null) - { - array.Add(null); - } - else - { - array.Add(BinaryData.FromString(item.GetRawText())); - } - } - annotations = array; - continue; - } - if (property.NameEquals("typeProperties"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - foreach (var property0 in property.Value.EnumerateObject()) - { - if (property0.NameEquals("subscriptionId"u8)) - { - subscriptionId = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("resourceGroupName"u8)) - { - resourceGroupName = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("mlWorkspaceName"u8)) - { - mlWorkspaceName = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("authentication"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - authentication = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("servicePrincipalId"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - servicePrincipalId = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("servicePrincipalKey"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - servicePrincipalKey = JsonSerializer.Deserialize(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("tenant"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - tenant = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("encryptedCredential"u8)) - { - encryptedCredential = property0.Value.GetString(); - continue; - } - } - continue; - } - additionalPropertiesDictionary.Add(property.Name, JsonSerializer.Deserialize>(property.Value.GetRawText())); - } - additionalProperties = additionalPropertiesDictionary; - return new AzureMLServiceLinkedService(type, connectVia.Value, description.Value, Optional.ToDictionary(parameters), Optional.ToList(annotations), additionalProperties, subscriptionId, resourceGroupName, mlWorkspaceName, authentication.Value, servicePrincipalId.Value, servicePrincipalKey, tenant.Value, encryptedCredential.Value); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/AzureMLServiceLinkedService.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/AzureMLServiceLinkedService.cs deleted file mode 100644 index 8eb235f0..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/AzureMLServiceLinkedService.cs +++ /dev/null @@ -1,75 +0,0 @@ -// - -#nullable disable - -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// Azure ML Service linked service. - public partial class AzureMLServiceLinkedService : DataFactoryLinkedServiceProperties - { - /// Initializes a new instance of AzureMLServiceLinkedService. - /// Azure ML Service workspace subscription ID. Type: string (or Expression with resultType string). - /// Azure ML Service workspace resource group name. Type: string (or Expression with resultType string). - /// Azure ML Service workspace name. Type: string (or Expression with resultType string). - /// , or is null. - public AzureMLServiceLinkedService(DataFactoryElement subscriptionId, DataFactoryElement resourceGroupName, DataFactoryElement mlWorkspaceName) - { - Argument.AssertNotNull(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNull(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNull(mlWorkspaceName, nameof(mlWorkspaceName)); - - SubscriptionId = subscriptionId; - ResourceGroupName = resourceGroupName; - MLWorkspaceName = mlWorkspaceName; - LinkedServiceType = "AzureMLService"; - } - - /// Initializes a new instance of AzureMLServiceLinkedService. - /// Type of linked service. - /// The integration runtime reference. - /// Linked service description. - /// Parameters for linked service. - /// List of tags that can be used for describing the linked service. - /// Additional Properties. - /// Azure ML Service workspace subscription ID. Type: string (or Expression with resultType string). - /// Azure ML Service workspace resource group name. Type: string (or Expression with resultType string). - /// Azure ML Service workspace name. Type: string (or Expression with resultType string). - /// Type of authentication (Required to specify MSI) used to connect to AzureML. Type: string (or Expression with resultType string). - /// The ID of the service principal used to authenticate against the endpoint of a published Azure ML Service pipeline. Type: string (or Expression with resultType string). - /// The key of the service principal used to authenticate against the endpoint of a published Azure ML Service pipeline. - /// The name or ID of the tenant to which the service principal belongs. Type: string (or Expression with resultType string). - /// The encrypted credential used for authentication. Credentials are encrypted using the integration runtime credential manager. Type: string. - internal AzureMLServiceLinkedService(string linkedServiceType, IntegrationRuntimeReference connectVia, string description, IDictionary parameters, IList annotations, IDictionary> additionalProperties, DataFactoryElement subscriptionId, DataFactoryElement resourceGroupName, DataFactoryElement mlWorkspaceName, DataFactoryElement authentication, DataFactoryElement servicePrincipalId, DataFactorySecretBaseDefinition servicePrincipalKey, DataFactoryElement tenant, string encryptedCredential) : base(linkedServiceType, connectVia, description, parameters, annotations, additionalProperties) - { - SubscriptionId = subscriptionId; - ResourceGroupName = resourceGroupName; - MLWorkspaceName = mlWorkspaceName; - Authentication = authentication; - ServicePrincipalId = servicePrincipalId; - ServicePrincipalKey = servicePrincipalKey; - Tenant = tenant; - EncryptedCredential = encryptedCredential; - LinkedServiceType = linkedServiceType ?? "AzureMLService"; - } - - /// Azure ML Service workspace subscription ID. Type: string (or Expression with resultType string). - public DataFactoryElement SubscriptionId { get; set; } - /// Azure ML Service workspace resource group name. Type: string (or Expression with resultType string). - public DataFactoryElement ResourceGroupName { get; set; } - /// Azure ML Service workspace name. Type: string (or Expression with resultType string). - public DataFactoryElement MLWorkspaceName { get; set; } - /// Type of authentication (Required to specify MSI) used to connect to AzureML. Type: string (or Expression with resultType string). - public DataFactoryElement Authentication { get; set; } - /// The ID of the service principal used to authenticate against the endpoint of a published Azure ML Service pipeline. Type: string (or Expression with resultType string). - public DataFactoryElement ServicePrincipalId { get; set; } - /// The key of the service principal used to authenticate against the endpoint of a published Azure ML Service pipeline. - public DataFactorySecretBaseDefinition ServicePrincipalKey { get; set; } - /// The name or ID of the tenant to which the service principal belongs. Type: string (or Expression with resultType string). - public DataFactoryElement Tenant { get; set; } - /// The encrypted credential used for authentication. Credentials are encrypted using the integration runtime credential manager. Type: string. - public string EncryptedCredential { get; set; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/AzureMLUpdateResourceActivity.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/AzureMLUpdateResourceActivity.Serialization.cs deleted file mode 100644 index 02a628e8..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/AzureMLUpdateResourceActivity.Serialization.cs +++ /dev/null @@ -1,219 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class AzureMLUpdateResourceActivity : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - if (Optional.IsDefined(LinkedServiceName)) - { - writer.WritePropertyName("linkedServiceName"u8); - JsonSerializer.Serialize(writer, LinkedServiceName); - } - if (Optional.IsDefined(Policy)) - { - writer.WritePropertyName("policy"u8); - writer.WriteObjectValue(Policy); - } - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ActivityType); - if (Optional.IsDefined(Description)) - { - writer.WritePropertyName("description"u8); - writer.WriteStringValue(Description); - } - if (Optional.IsDefined(State)) - { - writer.WritePropertyName("state"u8); - writer.WriteStringValue(State.Value.ToString()); - } - if (Optional.IsDefined(OnInactiveMarkAs)) - { - writer.WritePropertyName("onInactiveMarkAs"u8); - writer.WriteStringValue(OnInactiveMarkAs.Value.ToString()); - } - if (Optional.IsCollectionDefined(DependsOn)) - { - writer.WritePropertyName("dependsOn"u8); - writer.WriteStartArray(); - foreach (var item in DependsOn) - { - writer.WriteObjectValue(item); - } - writer.WriteEndArray(); - } - if (Optional.IsCollectionDefined(UserProperties)) - { - writer.WritePropertyName("userProperties"u8); - writer.WriteStartArray(); - foreach (var item in UserProperties) - { - writer.WriteObjectValue(item); - } - writer.WriteEndArray(); - } - writer.WritePropertyName("typeProperties"u8); - writer.WriteStartObject(); - writer.WritePropertyName("trainedModelName"u8); - JsonSerializer.Serialize(writer, TrainedModelName); - writer.WritePropertyName("trainedModelLinkedServiceName"u8); - JsonSerializer.Serialize(writer, TrainedModelLinkedServiceName); writer.WritePropertyName("trainedModelFilePath"u8); - JsonSerializer.Serialize(writer, TrainedModelFilePath); - writer.WriteEndObject(); - foreach (var item in AdditionalProperties) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.Value.ToString()).RootElement); -#endif - } - writer.WriteEndObject(); - } - - internal static AzureMLUpdateResourceActivity DeserializeAzureMLUpdateResourceActivity(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - Optional linkedServiceName = default; - Optional policy = default; - string name = default; - string type = default; - Optional description = default; - Optional state = default; - Optional onInactiveMarkAs = default; - Optional> dependsOn = default; - Optional> userProperties = default; - DataFactoryElement trainedModelName = default; - DataFactoryLinkedServiceReference trainedModelLinkedServiceName = default; - DataFactoryElement trainedModelFilePath = default; - IDictionary> additionalProperties = default; - Dictionary> additionalPropertiesDictionary = new Dictionary>(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("linkedServiceName"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - linkedServiceName = JsonSerializer.Deserialize(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("policy"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - policy = PipelineActivityPolicy.DeserializePipelineActivityPolicy(property.Value); - continue; - } - if (property.NameEquals("name"u8)) - { - name = property.Value.GetString(); - continue; - } - if (property.NameEquals("type"u8)) - { - type = property.Value.GetString(); - continue; - } - if (property.NameEquals("description"u8)) - { - description = property.Value.GetString(); - continue; - } - if (property.NameEquals("state"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - state = new PipelineActivityState(property.Value.GetString()); - continue; - } - if (property.NameEquals("onInactiveMarkAs"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - onInactiveMarkAs = new ActivityOnInactiveMarkAs(property.Value.GetString()); - continue; - } - if (property.NameEquals("dependsOn"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - array.Add(PipelineActivityDependency.DeserializePipelineActivityDependency(item)); - } - dependsOn = array; - continue; - } - if (property.NameEquals("userProperties"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - array.Add(PipelineActivityUserProperty.DeserializePipelineActivityUserProperty(item)); - } - userProperties = array; - continue; - } - if (property.NameEquals("typeProperties"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - foreach (var property0 in property.Value.EnumerateObject()) - { - if (property0.NameEquals("trainedModelName"u8)) - { - trainedModelName = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("trainedModelLinkedServiceName"u8)) - { - trainedModelLinkedServiceName = JsonSerializer.Deserialize(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("trainedModelFilePath"u8)) - { - trainedModelFilePath = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - } - continue; - } - additionalPropertiesDictionary.Add(property.Name, JsonSerializer.Deserialize>(property.Value.GetRawText())); - } - additionalProperties = additionalPropertiesDictionary; - return new AzureMLUpdateResourceActivity(name, type, description.Value, Optional.ToNullable(state), Optional.ToNullable(onInactiveMarkAs), Optional.ToList(dependsOn), Optional.ToList(userProperties), additionalProperties, linkedServiceName, policy.Value, trainedModelName, trainedModelLinkedServiceName, trainedModelFilePath); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/AzureMLUpdateResourceActivity.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/AzureMLUpdateResourceActivity.cs deleted file mode 100644 index ca78463c..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/AzureMLUpdateResourceActivity.cs +++ /dev/null @@ -1,61 +0,0 @@ -// - -#nullable disable - -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// Azure ML Update Resource management activity. - public partial class AzureMLUpdateResourceActivity : ExecutionActivity - { - /// Initializes a new instance of AzureMLUpdateResourceActivity. - /// Activity name. - /// Name of the Trained Model module in the Web Service experiment to be updated. Type: string (or Expression with resultType string). - /// Name of Azure Storage linked service holding the .ilearner file that will be uploaded by the update operation. - /// The relative file path in trainedModelLinkedService to represent the .ilearner file that will be uploaded by the update operation. Type: string (or Expression with resultType string). - /// , , or is null. - public AzureMLUpdateResourceActivity(string name, DataFactoryElement trainedModelName, DataFactoryLinkedServiceReference trainedModelLinkedServiceName, DataFactoryElement trainedModelFilePath) : base(name) - { - Argument.AssertNotNull(name, nameof(name)); - Argument.AssertNotNull(trainedModelName, nameof(trainedModelName)); - Argument.AssertNotNull(trainedModelLinkedServiceName, nameof(trainedModelLinkedServiceName)); - Argument.AssertNotNull(trainedModelFilePath, nameof(trainedModelFilePath)); - - TrainedModelName = trainedModelName; - TrainedModelLinkedServiceName = trainedModelLinkedServiceName; - TrainedModelFilePath = trainedModelFilePath; - ActivityType = "AzureMLUpdateResource"; - } - - /// Initializes a new instance of AzureMLUpdateResourceActivity. - /// Activity name. - /// Type of activity. - /// Activity description. - /// Activity state. This is an optional property and if not provided, the state will be Active by default. - /// 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. - /// Activity depends on condition. - /// Activity user properties. - /// Additional Properties. - /// Linked service reference. - /// Activity policy. - /// Name of the Trained Model module in the Web Service experiment to be updated. Type: string (or Expression with resultType string). - /// Name of Azure Storage linked service holding the .ilearner file that will be uploaded by the update operation. - /// The relative file path in trainedModelLinkedService to represent the .ilearner file that will be uploaded by the update operation. Type: string (or Expression with resultType string). - internal AzureMLUpdateResourceActivity(string name, string activityType, string description, PipelineActivityState? state, ActivityOnInactiveMarkAs? onInactiveMarkAs, IList dependsOn, IList userProperties, IDictionary> additionalProperties, DataFactoryLinkedServiceReference linkedServiceName, PipelineActivityPolicy policy, DataFactoryElement trainedModelName, DataFactoryLinkedServiceReference trainedModelLinkedServiceName, DataFactoryElement trainedModelFilePath) : base(name, activityType, description, state, onInactiveMarkAs, dependsOn, userProperties, additionalProperties, linkedServiceName, policy) - { - TrainedModelName = trainedModelName; - TrainedModelLinkedServiceName = trainedModelLinkedServiceName; - TrainedModelFilePath = trainedModelFilePath; - ActivityType = activityType ?? "AzureMLUpdateResource"; - } - - /// Name of the Trained Model module in the Web Service experiment to be updated. Type: string (or Expression with resultType string). - public DataFactoryElement TrainedModelName { get; set; } - /// Name of Azure Storage linked service holding the .ilearner file that will be uploaded by the update operation. - public DataFactoryLinkedServiceReference TrainedModelLinkedServiceName { get; set; } - /// The relative file path in trainedModelLinkedService to represent the .ilearner file that will be uploaded by the update operation. Type: string (or Expression with resultType string). - public DataFactoryElement TrainedModelFilePath { get; set; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/AzureMLWebServiceFile.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/AzureMLWebServiceFile.Serialization.cs deleted file mode 100644 index 2f93a05e..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/AzureMLWebServiceFile.Serialization.cs +++ /dev/null @@ -1,46 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class AzureMLWebServiceFile : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - writer.WritePropertyName("filePath"u8); - JsonSerializer.Serialize(writer, FilePath); - writer.WritePropertyName("linkedServiceName"u8); - JsonSerializer.Serialize(writer, LinkedServiceName); writer.WriteEndObject(); - } - - internal static AzureMLWebServiceFile DeserializeAzureMLWebServiceFile(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - DataFactoryElement filePath = default; - DataFactoryLinkedServiceReference linkedServiceName = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("filePath"u8)) - { - filePath = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("linkedServiceName"u8)) - { - linkedServiceName = JsonSerializer.Deserialize(property.Value.GetRawText()); - continue; - } - } - return new AzureMLWebServiceFile(filePath, linkedServiceName); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/AzureMLWebServiceFile.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/AzureMLWebServiceFile.cs deleted file mode 100644 index ab9abe4c..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/AzureMLWebServiceFile.cs +++ /dev/null @@ -1,31 +0,0 @@ -// - -#nullable disable - -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// Azure ML WebService Input/Output file. - public partial class AzureMLWebServiceFile - { - /// Initializes a new instance of AzureMLWebServiceFile. - /// The relative file path, including container name, in the Azure Blob Storage specified by the LinkedService. Type: string (or Expression with resultType string). - /// Reference to an Azure Storage LinkedService, where Azure ML WebService Input/Output file located. - /// or is null. - public AzureMLWebServiceFile(DataFactoryElement filePath, DataFactoryLinkedServiceReference linkedServiceName) - { - Argument.AssertNotNull(filePath, nameof(filePath)); - Argument.AssertNotNull(linkedServiceName, nameof(linkedServiceName)); - - FilePath = filePath; - LinkedServiceName = linkedServiceName; - } - - /// The relative file path, including container name, in the Azure Blob Storage specified by the LinkedService. Type: string (or Expression with resultType string). - public DataFactoryElement FilePath { get; set; } - /// Reference to an Azure Storage LinkedService, where Azure ML WebService Input/Output file located. - public DataFactoryLinkedServiceReference LinkedServiceName { get; set; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/AzureMariaDBLinkedService.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/AzureMariaDBLinkedService.Serialization.cs deleted file mode 100644 index 18cfe22f..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/AzureMariaDBLinkedService.Serialization.cs +++ /dev/null @@ -1,201 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class AzureMariaDBLinkedService : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - writer.WritePropertyName("type"u8); - writer.WriteStringValue(LinkedServiceType); - if (Optional.IsDefined(ConnectVia)) - { - writer.WritePropertyName("connectVia"u8); - writer.WriteObjectValue(ConnectVia); - } - if (Optional.IsDefined(Description)) - { - writer.WritePropertyName("description"u8); - writer.WriteStringValue(Description); - } - if (Optional.IsCollectionDefined(Parameters)) - { - writer.WritePropertyName("parameters"u8); - writer.WriteStartObject(); - foreach (var item in Parameters) - { - writer.WritePropertyName(item.Key); - writer.WriteObjectValue(item.Value); - } - writer.WriteEndObject(); - } - if (Optional.IsCollectionDefined(Annotations)) - { - writer.WritePropertyName("annotations"u8); - writer.WriteStartArray(); - foreach (var item in Annotations) - { - if (item == null) - { - writer.WriteNullValue(); - continue; - } -#if NET6_0_OR_GREATER - writer.WriteRawValue(item); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.ToString()).RootElement); -#endif - } - writer.WriteEndArray(); - } - writer.WritePropertyName("typeProperties"u8); - writer.WriteStartObject(); - if (Optional.IsDefined(ConnectionString)) - { - writer.WritePropertyName("connectionString"u8); - JsonSerializer.Serialize(writer, ConnectionString); - } - if (Optional.IsDefined(Password)) - { - writer.WritePropertyName("pwd"u8); - JsonSerializer.Serialize(writer, Password); - } - if (Optional.IsDefined(EncryptedCredential)) - { - writer.WritePropertyName("encryptedCredential"u8); - writer.WriteStringValue(EncryptedCredential); - } - writer.WriteEndObject(); - foreach (var item in AdditionalProperties) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.Value.ToString()).RootElement); -#endif - } - writer.WriteEndObject(); - } - - internal static AzureMariaDBLinkedService DeserializeAzureMariaDBLinkedService(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - string type = default; - Optional connectVia = default; - Optional description = default; - Optional> parameters = default; - Optional> annotations = default; - Optional> connectionString = default; - Optional password = default; - Optional encryptedCredential = default; - IDictionary> additionalProperties = default; - Dictionary> additionalPropertiesDictionary = new Dictionary>(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("type"u8)) - { - type = property.Value.GetString(); - continue; - } - if (property.NameEquals("connectVia"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - connectVia = IntegrationRuntimeReference.DeserializeIntegrationRuntimeReference(property.Value); - continue; - } - if (property.NameEquals("description"u8)) - { - description = property.Value.GetString(); - continue; - } - if (property.NameEquals("parameters"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - Dictionary dictionary = new Dictionary(); - foreach (var property0 in property.Value.EnumerateObject()) - { - dictionary.Add(property0.Name, EntityParameterSpecification.DeserializeEntityParameterSpecification(property0.Value)); - } - parameters = dictionary; - continue; - } - if (property.NameEquals("annotations"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - if (item.ValueKind == JsonValueKind.Null) - { - array.Add(null); - } - else - { - array.Add(BinaryData.FromString(item.GetRawText())); - } - } - annotations = array; - continue; - } - if (property.NameEquals("typeProperties"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - foreach (var property0 in property.Value.EnumerateObject()) - { - if (property0.NameEquals("connectionString"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - connectionString = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("pwd"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - password = JsonSerializer.Deserialize(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("encryptedCredential"u8)) - { - encryptedCredential = property0.Value.GetString(); - continue; - } - } - continue; - } - additionalPropertiesDictionary.Add(property.Name, JsonSerializer.Deserialize>(property.Value.GetRawText())); - } - additionalProperties = additionalPropertiesDictionary; - return new AzureMariaDBLinkedService(type, connectVia.Value, description.Value, Optional.ToDictionary(parameters), Optional.ToList(annotations), additionalProperties, connectionString.Value, password, encryptedCredential.Value); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/AzureMariaDBLinkedService.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/AzureMariaDBLinkedService.cs deleted file mode 100644 index a8c626e6..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/AzureMariaDBLinkedService.cs +++ /dev/null @@ -1,43 +0,0 @@ -// - -#nullable disable - -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// Azure Database for MariaDB linked service. - public partial class AzureMariaDBLinkedService : DataFactoryLinkedServiceProperties - { - /// Initializes a new instance of AzureMariaDBLinkedService. - public AzureMariaDBLinkedService() - { - LinkedServiceType = "AzureMariaDB"; - } - - /// Initializes a new instance of AzureMariaDBLinkedService. - /// Type of linked service. - /// The integration runtime reference. - /// Linked service description. - /// Parameters for linked service. - /// List of tags that can be used for describing the linked service. - /// Additional Properties. - /// An ODBC connection string. Type: string, SecureString or AzureKeyVaultSecretReference. - /// The Azure key vault secret reference of password in connection string. - /// The encrypted credential used for authentication. Credentials are encrypted using the integration runtime credential manager. Type: string. - internal AzureMariaDBLinkedService(string linkedServiceType, IntegrationRuntimeReference connectVia, string description, IDictionary parameters, IList annotations, IDictionary> additionalProperties, DataFactoryElement connectionString, DataFactoryKeyVaultSecretReference password, string encryptedCredential) : base(linkedServiceType, connectVia, description, parameters, annotations, additionalProperties) - { - ConnectionString = connectionString; - Password = password; - EncryptedCredential = encryptedCredential; - LinkedServiceType = linkedServiceType ?? "AzureMariaDB"; - } - - /// An ODBC connection string. Type: string, SecureString or AzureKeyVaultSecretReference. - public DataFactoryElement ConnectionString { get; set; } - /// The Azure key vault secret reference of password in connection string. - public DataFactoryKeyVaultSecretReference Password { get; set; } - /// The encrypted credential used for authentication. Credentials are encrypted using the integration runtime credential manager. Type: string. - public string EncryptedCredential { get; set; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/AzureMariaDBSource.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/AzureMariaDBSource.Serialization.cs deleted file mode 100644 index 558d35ad..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/AzureMariaDBSource.Serialization.cs +++ /dev/null @@ -1,161 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class AzureMariaDBSource : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - if (Optional.IsDefined(Query)) - { - writer.WritePropertyName("query"u8); - JsonSerializer.Serialize(writer, Query); - } - if (Optional.IsDefined(QueryTimeout)) - { - writer.WritePropertyName("queryTimeout"u8); - JsonSerializer.Serialize(writer, QueryTimeout); - } - if (Optional.IsDefined(AdditionalColumns)) - { - writer.WritePropertyName("additionalColumns"u8); -#if NET6_0_OR_GREATER - writer.WriteRawValue(AdditionalColumns); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(AdditionalColumns.ToString()).RootElement); -#endif - } - writer.WritePropertyName("type"u8); - writer.WriteStringValue(CopySourceType); - if (Optional.IsDefined(SourceRetryCount)) - { - writer.WritePropertyName("sourceRetryCount"u8); - JsonSerializer.Serialize(writer, SourceRetryCount); - } - if (Optional.IsDefined(SourceRetryWait)) - { - writer.WritePropertyName("sourceRetryWait"u8); - JsonSerializer.Serialize(writer, SourceRetryWait); - } - if (Optional.IsDefined(MaxConcurrentConnections)) - { - writer.WritePropertyName("maxConcurrentConnections"u8); - JsonSerializer.Serialize(writer, MaxConcurrentConnections); - } - if (Optional.IsDefined(DisableMetricsCollection)) - { - writer.WritePropertyName("disableMetricsCollection"u8); - JsonSerializer.Serialize(writer, DisableMetricsCollection); - } - foreach (var item in AdditionalProperties) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.Value.ToString()).RootElement); -#endif - } - writer.WriteEndObject(); - } - - internal static AzureMariaDBSource DeserializeAzureMariaDBSource(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - Optional> query = default; - Optional> queryTimeout = default; - Optional additionalColumns = default; - string type = default; - Optional> sourceRetryCount = default; - Optional> sourceRetryWait = default; - Optional> maxConcurrentConnections = default; - Optional> disableMetricsCollection = default; - IDictionary> additionalProperties = default; - Dictionary> additionalPropertiesDictionary = new Dictionary>(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("query"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - query = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("queryTimeout"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - queryTimeout = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("additionalColumns"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - additionalColumns = BinaryData.FromString(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("type"u8)) - { - type = property.Value.GetString(); - continue; - } - if (property.NameEquals("sourceRetryCount"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - sourceRetryCount = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("sourceRetryWait"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - sourceRetryWait = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("maxConcurrentConnections"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - maxConcurrentConnections = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("disableMetricsCollection"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - disableMetricsCollection = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - additionalPropertiesDictionary.Add(property.Name, JsonSerializer.Deserialize>(property.Value.GetRawText())); - } - additionalProperties = additionalPropertiesDictionary; - return new AzureMariaDBSource(type, sourceRetryCount.Value, sourceRetryWait.Value, maxConcurrentConnections.Value, disableMetricsCollection.Value, additionalProperties, queryTimeout.Value, additionalColumns.Value, query.Value); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/AzureMariaDBSource.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/AzureMariaDBSource.cs deleted file mode 100644 index 0bac4567..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/AzureMariaDBSource.cs +++ /dev/null @@ -1,37 +0,0 @@ -// - -#nullable disable - -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// A copy activity Azure MariaDB source. - public partial class AzureMariaDBSource : TabularSource - { - /// Initializes a new instance of AzureMariaDBSource. - public AzureMariaDBSource() - { - CopySourceType = "AzureMariaDBSource"; - } - - /// Initializes a new instance of AzureMariaDBSource. - /// Copy source type. - /// Source retry count. Type: integer (or Expression with resultType integer). - /// Source retry wait. Type: string (or Expression with resultType string), pattern: ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). - /// The maximum concurrent connection count for the source data store. Type: integer (or Expression with resultType integer). - /// If true, disable data store metrics collection. Default is false. Type: boolean (or Expression with resultType boolean). - /// Additional Properties. - /// 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). - /// A query to retrieve data from source. Type: string (or Expression with resultType string). - internal AzureMariaDBSource(string copySourceType, DataFactoryElement sourceRetryCount, DataFactoryElement sourceRetryWait, DataFactoryElement maxConcurrentConnections, DataFactoryElement disableMetricsCollection, IDictionary> additionalProperties, DataFactoryElement queryTimeout, BinaryData additionalColumns, DataFactoryElement query) : base(copySourceType, sourceRetryCount, sourceRetryWait, maxConcurrentConnections, disableMetricsCollection, additionalProperties, queryTimeout, additionalColumns) - { - Query = query; - CopySourceType = copySourceType ?? "AzureMariaDBSource"; - } - - /// A query to retrieve data from source. Type: string (or Expression with resultType string). - public DataFactoryElement Query { get; set; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/AzureMariaDBTableDataset.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/AzureMariaDBTableDataset.Serialization.cs deleted file mode 100644 index 45ae9031..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/AzureMariaDBTableDataset.Serialization.cs +++ /dev/null @@ -1,212 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class AzureMariaDBTableDataset : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - writer.WritePropertyName("type"u8); - writer.WriteStringValue(DatasetType); - if (Optional.IsDefined(Description)) - { - writer.WritePropertyName("description"u8); - writer.WriteStringValue(Description); - } - if (Optional.IsDefined(Structure)) - { - writer.WritePropertyName("structure"u8); - JsonSerializer.Serialize(writer, Structure); - } - if (Optional.IsDefined(Schema)) - { - writer.WritePropertyName("schema"u8); - JsonSerializer.Serialize(writer, Schema); - } - writer.WritePropertyName("linkedServiceName"u8); - JsonSerializer.Serialize(writer, LinkedServiceName); if (Optional.IsCollectionDefined(Parameters)) - { - writer.WritePropertyName("parameters"u8); - writer.WriteStartObject(); - foreach (var item in Parameters) - { - writer.WritePropertyName(item.Key); - writer.WriteObjectValue(item.Value); - } - writer.WriteEndObject(); - } - if (Optional.IsCollectionDefined(Annotations)) - { - writer.WritePropertyName("annotations"u8); - writer.WriteStartArray(); - foreach (var item in Annotations) - { - if (item == null) - { - writer.WriteNullValue(); - continue; - } -#if NET6_0_OR_GREATER - writer.WriteRawValue(item); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.ToString()).RootElement); -#endif - } - writer.WriteEndArray(); - } - if (Optional.IsDefined(Folder)) - { - writer.WritePropertyName("folder"u8); - writer.WriteObjectValue(Folder); - } - writer.WritePropertyName("typeProperties"u8); - writer.WriteStartObject(); - if (Optional.IsDefined(TableName)) - { - writer.WritePropertyName("tableName"u8); - JsonSerializer.Serialize(writer, TableName); - } - writer.WriteEndObject(); - foreach (var item in AdditionalProperties) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.Value.ToString()).RootElement); -#endif - } - writer.WriteEndObject(); - } - - internal static AzureMariaDBTableDataset DeserializeAzureMariaDBTableDataset(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - string type = default; - Optional description = default; - Optional>> structure = default; - Optional>> schema = default; - DataFactoryLinkedServiceReference linkedServiceName = default; - Optional> parameters = default; - Optional> annotations = default; - Optional folder = default; - Optional> tableName = default; - IDictionary> additionalProperties = default; - Dictionary> additionalPropertiesDictionary = new Dictionary>(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("type"u8)) - { - type = property.Value.GetString(); - continue; - } - if (property.NameEquals("description"u8)) - { - description = property.Value.GetString(); - continue; - } - if (property.NameEquals("structure"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - structure = JsonSerializer.Deserialize>>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("schema"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - schema = JsonSerializer.Deserialize>>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("linkedServiceName"u8)) - { - linkedServiceName = JsonSerializer.Deserialize(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("parameters"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - Dictionary dictionary = new Dictionary(); - foreach (var property0 in property.Value.EnumerateObject()) - { - dictionary.Add(property0.Name, EntityParameterSpecification.DeserializeEntityParameterSpecification(property0.Value)); - } - parameters = dictionary; - continue; - } - if (property.NameEquals("annotations"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - if (item.ValueKind == JsonValueKind.Null) - { - array.Add(null); - } - else - { - array.Add(BinaryData.FromString(item.GetRawText())); - } - } - annotations = array; - continue; - } - if (property.NameEquals("folder"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - folder = DatasetFolder.DeserializeDatasetFolder(property.Value); - continue; - } - if (property.NameEquals("typeProperties"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - foreach (var property0 in property.Value.EnumerateObject()) - { - if (property0.NameEquals("tableName"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - tableName = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - } - continue; - } - additionalPropertiesDictionary.Add(property.Name, JsonSerializer.Deserialize>(property.Value.GetRawText())); - } - additionalProperties = additionalPropertiesDictionary; - return new AzureMariaDBTableDataset(type, description.Value, structure.Value, schema.Value, linkedServiceName, Optional.ToDictionary(parameters), Optional.ToList(annotations), folder.Value, additionalProperties, tableName.Value); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/AzureMariaDBTableDataset.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/AzureMariaDBTableDataset.cs deleted file mode 100644 index 69c372f5..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/AzureMariaDBTableDataset.cs +++ /dev/null @@ -1,43 +0,0 @@ -// - -#nullable disable - -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// Azure Database for MariaDB dataset. - public partial class AzureMariaDBTableDataset : DataFactoryDatasetProperties - { - /// Initializes a new instance of AzureMariaDBTableDataset. - /// Linked service reference. - /// is null. - public AzureMariaDBTableDataset(DataFactoryLinkedServiceReference linkedServiceName) : base(linkedServiceName) - { - Argument.AssertNotNull(linkedServiceName, nameof(linkedServiceName)); - - DatasetType = "AzureMariaDBTable"; - } - - /// Initializes a new instance of AzureMariaDBTableDataset. - /// Type of dataset. - /// Dataset description. - /// Columns that define the structure of the dataset. Type: array (or Expression with resultType array), itemType: DatasetDataElement. - /// Columns that define the physical type schema of the dataset. Type: array (or Expression with resultType array), itemType: DatasetSchemaDataElement. - /// Linked service reference. - /// Parameters for dataset. - /// List of tags that can be used for describing the Dataset. - /// The folder that this Dataset is in. If not specified, Dataset will appear at the root level. - /// Additional Properties. - /// The table name. Type: string (or Expression with resultType string). - internal AzureMariaDBTableDataset(string datasetType, string description, DataFactoryElement> structure, DataFactoryElement> schema, DataFactoryLinkedServiceReference linkedServiceName, IDictionary parameters, IList annotations, DatasetFolder folder, IDictionary> additionalProperties, DataFactoryElement tableName) : base(datasetType, description, structure, schema, linkedServiceName, parameters, annotations, folder, additionalProperties) - { - TableName = tableName; - DatasetType = datasetType ?? "AzureMariaDBTable"; - } - - /// The table name. Type: string (or Expression with resultType string). - public DataFactoryElement TableName { get; set; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/AzureMySqlLinkedService.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/AzureMySqlLinkedService.Serialization.cs deleted file mode 100644 index 07ffd14b..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/AzureMySqlLinkedService.Serialization.cs +++ /dev/null @@ -1,194 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class AzureMySqlLinkedService : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - writer.WritePropertyName("type"u8); - writer.WriteStringValue(LinkedServiceType); - if (Optional.IsDefined(ConnectVia)) - { - writer.WritePropertyName("connectVia"u8); - writer.WriteObjectValue(ConnectVia); - } - if (Optional.IsDefined(Description)) - { - writer.WritePropertyName("description"u8); - writer.WriteStringValue(Description); - } - if (Optional.IsCollectionDefined(Parameters)) - { - writer.WritePropertyName("parameters"u8); - writer.WriteStartObject(); - foreach (var item in Parameters) - { - writer.WritePropertyName(item.Key); - writer.WriteObjectValue(item.Value); - } - writer.WriteEndObject(); - } - if (Optional.IsCollectionDefined(Annotations)) - { - writer.WritePropertyName("annotations"u8); - writer.WriteStartArray(); - foreach (var item in Annotations) - { - if (item == null) - { - writer.WriteNullValue(); - continue; - } -#if NET6_0_OR_GREATER - writer.WriteRawValue(item); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.ToString()).RootElement); -#endif - } - writer.WriteEndArray(); - } - writer.WritePropertyName("typeProperties"u8); - writer.WriteStartObject(); - writer.WritePropertyName("connectionString"u8); - JsonSerializer.Serialize(writer, ConnectionString); - if (Optional.IsDefined(Password)) - { - writer.WritePropertyName("password"u8); - JsonSerializer.Serialize(writer, Password); - } - if (Optional.IsDefined(EncryptedCredential)) - { - writer.WritePropertyName("encryptedCredential"u8); - writer.WriteStringValue(EncryptedCredential); - } - writer.WriteEndObject(); - foreach (var item in AdditionalProperties) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.Value.ToString()).RootElement); -#endif - } - writer.WriteEndObject(); - } - - internal static AzureMySqlLinkedService DeserializeAzureMySqlLinkedService(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - string type = default; - Optional connectVia = default; - Optional description = default; - Optional> parameters = default; - Optional> annotations = default; - DataFactoryElement connectionString = default; - Optional password = default; - Optional encryptedCredential = default; - IDictionary> additionalProperties = default; - Dictionary> additionalPropertiesDictionary = new Dictionary>(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("type"u8)) - { - type = property.Value.GetString(); - continue; - } - if (property.NameEquals("connectVia"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - connectVia = IntegrationRuntimeReference.DeserializeIntegrationRuntimeReference(property.Value); - continue; - } - if (property.NameEquals("description"u8)) - { - description = property.Value.GetString(); - continue; - } - if (property.NameEquals("parameters"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - Dictionary dictionary = new Dictionary(); - foreach (var property0 in property.Value.EnumerateObject()) - { - dictionary.Add(property0.Name, EntityParameterSpecification.DeserializeEntityParameterSpecification(property0.Value)); - } - parameters = dictionary; - continue; - } - if (property.NameEquals("annotations"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - if (item.ValueKind == JsonValueKind.Null) - { - array.Add(null); - } - else - { - array.Add(BinaryData.FromString(item.GetRawText())); - } - } - annotations = array; - continue; - } - if (property.NameEquals("typeProperties"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - foreach (var property0 in property.Value.EnumerateObject()) - { - if (property0.NameEquals("connectionString"u8)) - { - connectionString = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("password"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - password = JsonSerializer.Deserialize(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("encryptedCredential"u8)) - { - encryptedCredential = property0.Value.GetString(); - continue; - } - } - continue; - } - additionalPropertiesDictionary.Add(property.Name, JsonSerializer.Deserialize>(property.Value.GetRawText())); - } - additionalProperties = additionalPropertiesDictionary; - return new AzureMySqlLinkedService(type, connectVia.Value, description.Value, Optional.ToDictionary(parameters), Optional.ToList(annotations), additionalProperties, connectionString, password, encryptedCredential.Value); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/AzureMySqlLinkedService.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/AzureMySqlLinkedService.cs deleted file mode 100644 index a597f0dc..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/AzureMySqlLinkedService.cs +++ /dev/null @@ -1,49 +0,0 @@ -// - -#nullable disable - -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// Azure MySQL database linked service. - public partial class AzureMySqlLinkedService : DataFactoryLinkedServiceProperties - { - /// Initializes a new instance of AzureMySqlLinkedService. - /// The connection string. Type: string, SecureString or AzureKeyVaultSecretReference. - /// is null. - public AzureMySqlLinkedService(DataFactoryElement connectionString) - { - Argument.AssertNotNull(connectionString, nameof(connectionString)); - - ConnectionString = connectionString; - LinkedServiceType = "AzureMySql"; - } - - /// Initializes a new instance of AzureMySqlLinkedService. - /// Type of linked service. - /// The integration runtime reference. - /// Linked service description. - /// Parameters for linked service. - /// List of tags that can be used for describing the linked service. - /// Additional Properties. - /// The connection string. Type: string, SecureString or AzureKeyVaultSecretReference. - /// The Azure key vault secret reference of password in connection string. - /// The encrypted credential used for authentication. Credentials are encrypted using the integration runtime credential manager. Type: string. - internal AzureMySqlLinkedService(string linkedServiceType, IntegrationRuntimeReference connectVia, string description, IDictionary parameters, IList annotations, IDictionary> additionalProperties, DataFactoryElement connectionString, DataFactoryKeyVaultSecretReference password, string encryptedCredential) : base(linkedServiceType, connectVia, description, parameters, annotations, additionalProperties) - { - ConnectionString = connectionString; - Password = password; - EncryptedCredential = encryptedCredential; - LinkedServiceType = linkedServiceType ?? "AzureMySql"; - } - - /// The connection string. Type: string, SecureString or AzureKeyVaultSecretReference. - public DataFactoryElement ConnectionString { get; set; } - /// The Azure key vault secret reference of password in connection string. - public DataFactoryKeyVaultSecretReference Password { get; set; } - /// The encrypted credential used for authentication. Credentials are encrypted using the integration runtime credential manager. Type: string. - public string EncryptedCredential { get; set; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/AzureMySqlSink.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/AzureMySqlSink.Serialization.cs deleted file mode 100644 index b485e5aa..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/AzureMySqlSink.Serialization.cs +++ /dev/null @@ -1,157 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class AzureMySqlSink : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - if (Optional.IsDefined(PreCopyScript)) - { - writer.WritePropertyName("preCopyScript"u8); - JsonSerializer.Serialize(writer, PreCopyScript); - } - writer.WritePropertyName("type"u8); - writer.WriteStringValue(CopySinkType); - if (Optional.IsDefined(WriteBatchSize)) - { - writer.WritePropertyName("writeBatchSize"u8); - JsonSerializer.Serialize(writer, WriteBatchSize); - } - if (Optional.IsDefined(WriteBatchTimeout)) - { - writer.WritePropertyName("writeBatchTimeout"u8); - JsonSerializer.Serialize(writer, WriteBatchTimeout); - } - if (Optional.IsDefined(SinkRetryCount)) - { - writer.WritePropertyName("sinkRetryCount"u8); - JsonSerializer.Serialize(writer, SinkRetryCount); - } - if (Optional.IsDefined(SinkRetryWait)) - { - writer.WritePropertyName("sinkRetryWait"u8); - JsonSerializer.Serialize(writer, SinkRetryWait); - } - if (Optional.IsDefined(MaxConcurrentConnections)) - { - writer.WritePropertyName("maxConcurrentConnections"u8); - JsonSerializer.Serialize(writer, MaxConcurrentConnections); - } - if (Optional.IsDefined(DisableMetricsCollection)) - { - writer.WritePropertyName("disableMetricsCollection"u8); - JsonSerializer.Serialize(writer, DisableMetricsCollection); - } - foreach (var item in AdditionalProperties) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.Value.ToString()).RootElement); -#endif - } - writer.WriteEndObject(); - } - - internal static AzureMySqlSink DeserializeAzureMySqlSink(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - Optional> preCopyScript = default; - string type = default; - Optional> writeBatchSize = default; - Optional> writeBatchTimeout = default; - Optional> sinkRetryCount = default; - Optional> sinkRetryWait = default; - Optional> maxConcurrentConnections = default; - Optional> disableMetricsCollection = default; - IDictionary> additionalProperties = default; - Dictionary> additionalPropertiesDictionary = new Dictionary>(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("preCopyScript"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - preCopyScript = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("type"u8)) - { - type = property.Value.GetString(); - continue; - } - if (property.NameEquals("writeBatchSize"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - writeBatchSize = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("writeBatchTimeout"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - writeBatchTimeout = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("sinkRetryCount"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - sinkRetryCount = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("sinkRetryWait"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - sinkRetryWait = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("maxConcurrentConnections"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - maxConcurrentConnections = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("disableMetricsCollection"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - disableMetricsCollection = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - additionalPropertiesDictionary.Add(property.Name, JsonSerializer.Deserialize>(property.Value.GetRawText())); - } - additionalProperties = additionalPropertiesDictionary; - return new AzureMySqlSink(type, writeBatchSize.Value, writeBatchTimeout.Value, sinkRetryCount.Value, sinkRetryWait.Value, maxConcurrentConnections.Value, disableMetricsCollection.Value, additionalProperties, preCopyScript.Value); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/AzureMySqlSink.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/AzureMySqlSink.cs deleted file mode 100644 index 0404ecaf..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/AzureMySqlSink.cs +++ /dev/null @@ -1,37 +0,0 @@ -// - -#nullable disable - -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// A copy activity Azure MySql sink. - public partial class AzureMySqlSink : CopySink - { - /// Initializes a new instance of AzureMySqlSink. - public AzureMySqlSink() - { - CopySinkType = "AzureMySqlSink"; - } - - /// Initializes a new instance of AzureMySqlSink. - /// Copy sink type. - /// Write batch size. Type: integer (or Expression with resultType integer), minimum: 0. - /// Write batch timeout. Type: string (or Expression with resultType string), pattern: ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). - /// Sink retry count. Type: integer (or Expression with resultType integer). - /// Sink retry wait. Type: string (or Expression with resultType string), pattern: ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). - /// The maximum concurrent connection count for the sink data store. Type: integer (or Expression with resultType integer). - /// If true, disable data store metrics collection. Default is false. Type: boolean (or Expression with resultType boolean). - /// Additional Properties. - /// A query to execute before starting the copy. Type: string (or Expression with resultType string). - internal AzureMySqlSink(string copySinkType, DataFactoryElement writeBatchSize, DataFactoryElement writeBatchTimeout, DataFactoryElement sinkRetryCount, DataFactoryElement sinkRetryWait, DataFactoryElement maxConcurrentConnections, DataFactoryElement disableMetricsCollection, IDictionary> additionalProperties, DataFactoryElement preCopyScript) : base(copySinkType, writeBatchSize, writeBatchTimeout, sinkRetryCount, sinkRetryWait, maxConcurrentConnections, disableMetricsCollection, additionalProperties) - { - PreCopyScript = preCopyScript; - CopySinkType = copySinkType ?? "AzureMySqlSink"; - } - - /// A query to execute before starting the copy. Type: string (or Expression with resultType string). - public DataFactoryElement PreCopyScript { get; set; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/AzureMySqlSource.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/AzureMySqlSource.Serialization.cs deleted file mode 100644 index 98ade974..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/AzureMySqlSource.Serialization.cs +++ /dev/null @@ -1,161 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class AzureMySqlSource : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - if (Optional.IsDefined(Query)) - { - writer.WritePropertyName("query"u8); - JsonSerializer.Serialize(writer, Query); - } - if (Optional.IsDefined(QueryTimeout)) - { - writer.WritePropertyName("queryTimeout"u8); - JsonSerializer.Serialize(writer, QueryTimeout); - } - if (Optional.IsDefined(AdditionalColumns)) - { - writer.WritePropertyName("additionalColumns"u8); -#if NET6_0_OR_GREATER - writer.WriteRawValue(AdditionalColumns); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(AdditionalColumns.ToString()).RootElement); -#endif - } - writer.WritePropertyName("type"u8); - writer.WriteStringValue(CopySourceType); - if (Optional.IsDefined(SourceRetryCount)) - { - writer.WritePropertyName("sourceRetryCount"u8); - JsonSerializer.Serialize(writer, SourceRetryCount); - } - if (Optional.IsDefined(SourceRetryWait)) - { - writer.WritePropertyName("sourceRetryWait"u8); - JsonSerializer.Serialize(writer, SourceRetryWait); - } - if (Optional.IsDefined(MaxConcurrentConnections)) - { - writer.WritePropertyName("maxConcurrentConnections"u8); - JsonSerializer.Serialize(writer, MaxConcurrentConnections); - } - if (Optional.IsDefined(DisableMetricsCollection)) - { - writer.WritePropertyName("disableMetricsCollection"u8); - JsonSerializer.Serialize(writer, DisableMetricsCollection); - } - foreach (var item in AdditionalProperties) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.Value.ToString()).RootElement); -#endif - } - writer.WriteEndObject(); - } - - internal static AzureMySqlSource DeserializeAzureMySqlSource(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - Optional> query = default; - Optional> queryTimeout = default; - Optional additionalColumns = default; - string type = default; - Optional> sourceRetryCount = default; - Optional> sourceRetryWait = default; - Optional> maxConcurrentConnections = default; - Optional> disableMetricsCollection = default; - IDictionary> additionalProperties = default; - Dictionary> additionalPropertiesDictionary = new Dictionary>(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("query"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - query = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("queryTimeout"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - queryTimeout = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("additionalColumns"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - additionalColumns = BinaryData.FromString(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("type"u8)) - { - type = property.Value.GetString(); - continue; - } - if (property.NameEquals("sourceRetryCount"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - sourceRetryCount = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("sourceRetryWait"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - sourceRetryWait = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("maxConcurrentConnections"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - maxConcurrentConnections = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("disableMetricsCollection"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - disableMetricsCollection = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - additionalPropertiesDictionary.Add(property.Name, JsonSerializer.Deserialize>(property.Value.GetRawText())); - } - additionalProperties = additionalPropertiesDictionary; - return new AzureMySqlSource(type, sourceRetryCount.Value, sourceRetryWait.Value, maxConcurrentConnections.Value, disableMetricsCollection.Value, additionalProperties, queryTimeout.Value, additionalColumns.Value, query.Value); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/AzureMySqlSource.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/AzureMySqlSource.cs deleted file mode 100644 index 616a358d..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/AzureMySqlSource.cs +++ /dev/null @@ -1,37 +0,0 @@ -// - -#nullable disable - -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// A copy activity Azure MySQL source. - public partial class AzureMySqlSource : TabularSource - { - /// Initializes a new instance of AzureMySqlSource. - public AzureMySqlSource() - { - CopySourceType = "AzureMySqlSource"; - } - - /// Initializes a new instance of AzureMySqlSource. - /// Copy source type. - /// Source retry count. Type: integer (or Expression with resultType integer). - /// Source retry wait. Type: string (or Expression with resultType string), pattern: ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). - /// The maximum concurrent connection count for the source data store. Type: integer (or Expression with resultType integer). - /// If true, disable data store metrics collection. Default is false. Type: boolean (or Expression with resultType boolean). - /// Additional Properties. - /// 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). - /// Database query. Type: string (or Expression with resultType string). - internal AzureMySqlSource(string copySourceType, DataFactoryElement sourceRetryCount, DataFactoryElement sourceRetryWait, DataFactoryElement maxConcurrentConnections, DataFactoryElement disableMetricsCollection, IDictionary> additionalProperties, DataFactoryElement queryTimeout, BinaryData additionalColumns, DataFactoryElement query) : base(copySourceType, sourceRetryCount, sourceRetryWait, maxConcurrentConnections, disableMetricsCollection, additionalProperties, queryTimeout, additionalColumns) - { - Query = query; - CopySourceType = copySourceType ?? "AzureMySqlSource"; - } - - /// Database query. Type: string (or Expression with resultType string). - public DataFactoryElement Query { get; set; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/AzureMySqlTableDataset.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/AzureMySqlTableDataset.Serialization.cs deleted file mode 100644 index 6c79ca53..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/AzureMySqlTableDataset.Serialization.cs +++ /dev/null @@ -1,227 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class AzureMySqlTableDataset : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - writer.WritePropertyName("type"u8); - writer.WriteStringValue(DatasetType); - if (Optional.IsDefined(Description)) - { - writer.WritePropertyName("description"u8); - writer.WriteStringValue(Description); - } - if (Optional.IsDefined(Structure)) - { - writer.WritePropertyName("structure"u8); - JsonSerializer.Serialize(writer, Structure); - } - if (Optional.IsDefined(Schema)) - { - writer.WritePropertyName("schema"u8); - JsonSerializer.Serialize(writer, Schema); - } - writer.WritePropertyName("linkedServiceName"u8); - JsonSerializer.Serialize(writer, LinkedServiceName); if (Optional.IsCollectionDefined(Parameters)) - { - writer.WritePropertyName("parameters"u8); - writer.WriteStartObject(); - foreach (var item in Parameters) - { - writer.WritePropertyName(item.Key); - writer.WriteObjectValue(item.Value); - } - writer.WriteEndObject(); - } - if (Optional.IsCollectionDefined(Annotations)) - { - writer.WritePropertyName("annotations"u8); - writer.WriteStartArray(); - foreach (var item in Annotations) - { - if (item == null) - { - writer.WriteNullValue(); - continue; - } -#if NET6_0_OR_GREATER - writer.WriteRawValue(item); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.ToString()).RootElement); -#endif - } - writer.WriteEndArray(); - } - if (Optional.IsDefined(Folder)) - { - writer.WritePropertyName("folder"u8); - writer.WriteObjectValue(Folder); - } - writer.WritePropertyName("typeProperties"u8); - writer.WriteStartObject(); - if (Optional.IsDefined(TableName)) - { - writer.WritePropertyName("tableName"u8); - JsonSerializer.Serialize(writer, TableName); - } - if (Optional.IsDefined(Table)) - { - writer.WritePropertyName("table"u8); - JsonSerializer.Serialize(writer, Table); - } - writer.WriteEndObject(); - foreach (var item in AdditionalProperties) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.Value.ToString()).RootElement); -#endif - } - writer.WriteEndObject(); - } - - internal static AzureMySqlTableDataset DeserializeAzureMySqlTableDataset(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - string type = default; - Optional description = default; - Optional>> structure = default; - Optional>> schema = default; - DataFactoryLinkedServiceReference linkedServiceName = default; - Optional> parameters = default; - Optional> annotations = default; - Optional folder = default; - Optional> tableName = default; - Optional> table = default; - IDictionary> additionalProperties = default; - Dictionary> additionalPropertiesDictionary = new Dictionary>(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("type"u8)) - { - type = property.Value.GetString(); - continue; - } - if (property.NameEquals("description"u8)) - { - description = property.Value.GetString(); - continue; - } - if (property.NameEquals("structure"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - structure = JsonSerializer.Deserialize>>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("schema"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - schema = JsonSerializer.Deserialize>>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("linkedServiceName"u8)) - { - linkedServiceName = JsonSerializer.Deserialize(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("parameters"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - Dictionary dictionary = new Dictionary(); - foreach (var property0 in property.Value.EnumerateObject()) - { - dictionary.Add(property0.Name, EntityParameterSpecification.DeserializeEntityParameterSpecification(property0.Value)); - } - parameters = dictionary; - continue; - } - if (property.NameEquals("annotations"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - if (item.ValueKind == JsonValueKind.Null) - { - array.Add(null); - } - else - { - array.Add(BinaryData.FromString(item.GetRawText())); - } - } - annotations = array; - continue; - } - if (property.NameEquals("folder"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - folder = DatasetFolder.DeserializeDatasetFolder(property.Value); - continue; - } - if (property.NameEquals("typeProperties"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - foreach (var property0 in property.Value.EnumerateObject()) - { - if (property0.NameEquals("tableName"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - tableName = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("table"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - table = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - } - continue; - } - additionalPropertiesDictionary.Add(property.Name, JsonSerializer.Deserialize>(property.Value.GetRawText())); - } - additionalProperties = additionalPropertiesDictionary; - return new AzureMySqlTableDataset(type, description.Value, structure.Value, schema.Value, linkedServiceName, Optional.ToDictionary(parameters), Optional.ToList(annotations), folder.Value, additionalProperties, tableName.Value, table.Value); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/AzureMySqlTableDataset.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/AzureMySqlTableDataset.cs deleted file mode 100644 index c8757edf..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/AzureMySqlTableDataset.cs +++ /dev/null @@ -1,47 +0,0 @@ -// - -#nullable disable - -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// The Azure MySQL database dataset. - public partial class AzureMySqlTableDataset : DataFactoryDatasetProperties - { - /// Initializes a new instance of AzureMySqlTableDataset. - /// Linked service reference. - /// is null. - public AzureMySqlTableDataset(DataFactoryLinkedServiceReference linkedServiceName) : base(linkedServiceName) - { - Argument.AssertNotNull(linkedServiceName, nameof(linkedServiceName)); - - DatasetType = "AzureMySqlTable"; - } - - /// Initializes a new instance of AzureMySqlTableDataset. - /// Type of dataset. - /// Dataset description. - /// Columns that define the structure of the dataset. Type: array (or Expression with resultType array), itemType: DatasetDataElement. - /// Columns that define the physical type schema of the dataset. Type: array (or Expression with resultType array), itemType: DatasetSchemaDataElement. - /// Linked service reference. - /// Parameters for dataset. - /// List of tags that can be used for describing the Dataset. - /// The folder that this Dataset is in. If not specified, Dataset will appear at the root level. - /// Additional Properties. - /// The Azure MySQL database table name. Type: string (or Expression with resultType string). - /// The name of Azure MySQL database table. Type: string (or Expression with resultType string). - internal AzureMySqlTableDataset(string datasetType, string description, DataFactoryElement> structure, DataFactoryElement> schema, DataFactoryLinkedServiceReference linkedServiceName, IDictionary parameters, IList annotations, DatasetFolder folder, IDictionary> additionalProperties, DataFactoryElement tableName, DataFactoryElement table) : base(datasetType, description, structure, schema, linkedServiceName, parameters, annotations, folder, additionalProperties) - { - TableName = tableName; - Table = table; - DatasetType = datasetType ?? "AzureMySqlTable"; - } - - /// The Azure MySQL database table name. Type: string (or Expression with resultType string). - public DataFactoryElement TableName { get; set; } - /// The name of Azure MySQL database table. Type: string (or Expression with resultType string). - public DataFactoryElement Table { get; set; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/AzurePostgreSqlLinkedService.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/AzurePostgreSqlLinkedService.Serialization.cs deleted file mode 100644 index eda3744d..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/AzurePostgreSqlLinkedService.Serialization.cs +++ /dev/null @@ -1,201 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class AzurePostgreSqlLinkedService : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - writer.WritePropertyName("type"u8); - writer.WriteStringValue(LinkedServiceType); - if (Optional.IsDefined(ConnectVia)) - { - writer.WritePropertyName("connectVia"u8); - writer.WriteObjectValue(ConnectVia); - } - if (Optional.IsDefined(Description)) - { - writer.WritePropertyName("description"u8); - writer.WriteStringValue(Description); - } - if (Optional.IsCollectionDefined(Parameters)) - { - writer.WritePropertyName("parameters"u8); - writer.WriteStartObject(); - foreach (var item in Parameters) - { - writer.WritePropertyName(item.Key); - writer.WriteObjectValue(item.Value); - } - writer.WriteEndObject(); - } - if (Optional.IsCollectionDefined(Annotations)) - { - writer.WritePropertyName("annotations"u8); - writer.WriteStartArray(); - foreach (var item in Annotations) - { - if (item == null) - { - writer.WriteNullValue(); - continue; - } -#if NET6_0_OR_GREATER - writer.WriteRawValue(item); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.ToString()).RootElement); -#endif - } - writer.WriteEndArray(); - } - writer.WritePropertyName("typeProperties"u8); - writer.WriteStartObject(); - if (Optional.IsDefined(ConnectionString)) - { - writer.WritePropertyName("connectionString"u8); - JsonSerializer.Serialize(writer, ConnectionString); - } - if (Optional.IsDefined(Password)) - { - writer.WritePropertyName("password"u8); - JsonSerializer.Serialize(writer, Password); - } - if (Optional.IsDefined(EncryptedCredential)) - { - writer.WritePropertyName("encryptedCredential"u8); - writer.WriteStringValue(EncryptedCredential); - } - writer.WriteEndObject(); - foreach (var item in AdditionalProperties) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.Value.ToString()).RootElement); -#endif - } - writer.WriteEndObject(); - } - - internal static AzurePostgreSqlLinkedService DeserializeAzurePostgreSqlLinkedService(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - string type = default; - Optional connectVia = default; - Optional description = default; - Optional> parameters = default; - Optional> annotations = default; - Optional> connectionString = default; - Optional password = default; - Optional encryptedCredential = default; - IDictionary> additionalProperties = default; - Dictionary> additionalPropertiesDictionary = new Dictionary>(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("type"u8)) - { - type = property.Value.GetString(); - continue; - } - if (property.NameEquals("connectVia"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - connectVia = IntegrationRuntimeReference.DeserializeIntegrationRuntimeReference(property.Value); - continue; - } - if (property.NameEquals("description"u8)) - { - description = property.Value.GetString(); - continue; - } - if (property.NameEquals("parameters"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - Dictionary dictionary = new Dictionary(); - foreach (var property0 in property.Value.EnumerateObject()) - { - dictionary.Add(property0.Name, EntityParameterSpecification.DeserializeEntityParameterSpecification(property0.Value)); - } - parameters = dictionary; - continue; - } - if (property.NameEquals("annotations"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - if (item.ValueKind == JsonValueKind.Null) - { - array.Add(null); - } - else - { - array.Add(BinaryData.FromString(item.GetRawText())); - } - } - annotations = array; - continue; - } - if (property.NameEquals("typeProperties"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - foreach (var property0 in property.Value.EnumerateObject()) - { - if (property0.NameEquals("connectionString"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - connectionString = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("password"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - password = JsonSerializer.Deserialize(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("encryptedCredential"u8)) - { - encryptedCredential = property0.Value.GetString(); - continue; - } - } - continue; - } - additionalPropertiesDictionary.Add(property.Name, JsonSerializer.Deserialize>(property.Value.GetRawText())); - } - additionalProperties = additionalPropertiesDictionary; - return new AzurePostgreSqlLinkedService(type, connectVia.Value, description.Value, Optional.ToDictionary(parameters), Optional.ToList(annotations), additionalProperties, connectionString.Value, password, encryptedCredential.Value); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/AzurePostgreSqlLinkedService.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/AzurePostgreSqlLinkedService.cs deleted file mode 100644 index f3e3ea2b..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/AzurePostgreSqlLinkedService.cs +++ /dev/null @@ -1,43 +0,0 @@ -// - -#nullable disable - -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// Azure PostgreSQL linked service. - public partial class AzurePostgreSqlLinkedService : DataFactoryLinkedServiceProperties - { - /// Initializes a new instance of AzurePostgreSqlLinkedService. - public AzurePostgreSqlLinkedService() - { - LinkedServiceType = "AzurePostgreSql"; - } - - /// Initializes a new instance of AzurePostgreSqlLinkedService. - /// Type of linked service. - /// The integration runtime reference. - /// Linked service description. - /// Parameters for linked service. - /// List of tags that can be used for describing the linked service. - /// Additional Properties. - /// An ODBC connection string. Type: string, SecureString or AzureKeyVaultSecretReference. - /// The Azure key vault secret reference of password in connection string. - /// The encrypted credential used for authentication. Credentials are encrypted using the integration runtime credential manager. Type: string. - internal AzurePostgreSqlLinkedService(string linkedServiceType, IntegrationRuntimeReference connectVia, string description, IDictionary parameters, IList annotations, IDictionary> additionalProperties, DataFactoryElement connectionString, DataFactoryKeyVaultSecretReference password, string encryptedCredential) : base(linkedServiceType, connectVia, description, parameters, annotations, additionalProperties) - { - ConnectionString = connectionString; - Password = password; - EncryptedCredential = encryptedCredential; - LinkedServiceType = linkedServiceType ?? "AzurePostgreSql"; - } - - /// An ODBC connection string. Type: string, SecureString or AzureKeyVaultSecretReference. - public DataFactoryElement ConnectionString { get; set; } - /// The Azure key vault secret reference of password in connection string. - public DataFactoryKeyVaultSecretReference Password { get; set; } - /// The encrypted credential used for authentication. Credentials are encrypted using the integration runtime credential manager. Type: string. - public string EncryptedCredential { get; set; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/AzurePostgreSqlSink.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/AzurePostgreSqlSink.Serialization.cs deleted file mode 100644 index 9f3d4d08..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/AzurePostgreSqlSink.Serialization.cs +++ /dev/null @@ -1,157 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class AzurePostgreSqlSink : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - if (Optional.IsDefined(PreCopyScript)) - { - writer.WritePropertyName("preCopyScript"u8); - JsonSerializer.Serialize(writer, PreCopyScript); - } - writer.WritePropertyName("type"u8); - writer.WriteStringValue(CopySinkType); - if (Optional.IsDefined(WriteBatchSize)) - { - writer.WritePropertyName("writeBatchSize"u8); - JsonSerializer.Serialize(writer, WriteBatchSize); - } - if (Optional.IsDefined(WriteBatchTimeout)) - { - writer.WritePropertyName("writeBatchTimeout"u8); - JsonSerializer.Serialize(writer, WriteBatchTimeout); - } - if (Optional.IsDefined(SinkRetryCount)) - { - writer.WritePropertyName("sinkRetryCount"u8); - JsonSerializer.Serialize(writer, SinkRetryCount); - } - if (Optional.IsDefined(SinkRetryWait)) - { - writer.WritePropertyName("sinkRetryWait"u8); - JsonSerializer.Serialize(writer, SinkRetryWait); - } - if (Optional.IsDefined(MaxConcurrentConnections)) - { - writer.WritePropertyName("maxConcurrentConnections"u8); - JsonSerializer.Serialize(writer, MaxConcurrentConnections); - } - if (Optional.IsDefined(DisableMetricsCollection)) - { - writer.WritePropertyName("disableMetricsCollection"u8); - JsonSerializer.Serialize(writer, DisableMetricsCollection); - } - foreach (var item in AdditionalProperties) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.Value.ToString()).RootElement); -#endif - } - writer.WriteEndObject(); - } - - internal static AzurePostgreSqlSink DeserializeAzurePostgreSqlSink(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - Optional> preCopyScript = default; - string type = default; - Optional> writeBatchSize = default; - Optional> writeBatchTimeout = default; - Optional> sinkRetryCount = default; - Optional> sinkRetryWait = default; - Optional> maxConcurrentConnections = default; - Optional> disableMetricsCollection = default; - IDictionary> additionalProperties = default; - Dictionary> additionalPropertiesDictionary = new Dictionary>(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("preCopyScript"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - preCopyScript = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("type"u8)) - { - type = property.Value.GetString(); - continue; - } - if (property.NameEquals("writeBatchSize"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - writeBatchSize = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("writeBatchTimeout"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - writeBatchTimeout = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("sinkRetryCount"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - sinkRetryCount = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("sinkRetryWait"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - sinkRetryWait = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("maxConcurrentConnections"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - maxConcurrentConnections = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("disableMetricsCollection"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - disableMetricsCollection = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - additionalPropertiesDictionary.Add(property.Name, JsonSerializer.Deserialize>(property.Value.GetRawText())); - } - additionalProperties = additionalPropertiesDictionary; - return new AzurePostgreSqlSink(type, writeBatchSize.Value, writeBatchTimeout.Value, sinkRetryCount.Value, sinkRetryWait.Value, maxConcurrentConnections.Value, disableMetricsCollection.Value, additionalProperties, preCopyScript.Value); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/AzurePostgreSqlSink.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/AzurePostgreSqlSink.cs deleted file mode 100644 index 11f692c7..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/AzurePostgreSqlSink.cs +++ /dev/null @@ -1,37 +0,0 @@ -// - -#nullable disable - -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// A copy activity Azure PostgreSQL sink. - public partial class AzurePostgreSqlSink : CopySink - { - /// Initializes a new instance of AzurePostgreSqlSink. - public AzurePostgreSqlSink() - { - CopySinkType = "AzurePostgreSqlSink"; - } - - /// Initializes a new instance of AzurePostgreSqlSink. - /// Copy sink type. - /// Write batch size. Type: integer (or Expression with resultType integer), minimum: 0. - /// Write batch timeout. Type: string (or Expression with resultType string), pattern: ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). - /// Sink retry count. Type: integer (or Expression with resultType integer). - /// Sink retry wait. Type: string (or Expression with resultType string), pattern: ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). - /// The maximum concurrent connection count for the sink data store. Type: integer (or Expression with resultType integer). - /// If true, disable data store metrics collection. Default is false. Type: boolean (or Expression with resultType boolean). - /// Additional Properties. - /// A query to execute before starting the copy. Type: string (or Expression with resultType string). - internal AzurePostgreSqlSink(string copySinkType, DataFactoryElement writeBatchSize, DataFactoryElement writeBatchTimeout, DataFactoryElement sinkRetryCount, DataFactoryElement sinkRetryWait, DataFactoryElement maxConcurrentConnections, DataFactoryElement disableMetricsCollection, IDictionary> additionalProperties, DataFactoryElement preCopyScript) : base(copySinkType, writeBatchSize, writeBatchTimeout, sinkRetryCount, sinkRetryWait, maxConcurrentConnections, disableMetricsCollection, additionalProperties) - { - PreCopyScript = preCopyScript; - CopySinkType = copySinkType ?? "AzurePostgreSqlSink"; - } - - /// A query to execute before starting the copy. Type: string (or Expression with resultType string). - public DataFactoryElement PreCopyScript { get; set; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/AzurePostgreSqlSource.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/AzurePostgreSqlSource.Serialization.cs deleted file mode 100644 index 67626820..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/AzurePostgreSqlSource.Serialization.cs +++ /dev/null @@ -1,161 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class AzurePostgreSqlSource : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - if (Optional.IsDefined(Query)) - { - writer.WritePropertyName("query"u8); - JsonSerializer.Serialize(writer, Query); - } - if (Optional.IsDefined(QueryTimeout)) - { - writer.WritePropertyName("queryTimeout"u8); - JsonSerializer.Serialize(writer, QueryTimeout); - } - if (Optional.IsDefined(AdditionalColumns)) - { - writer.WritePropertyName("additionalColumns"u8); -#if NET6_0_OR_GREATER - writer.WriteRawValue(AdditionalColumns); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(AdditionalColumns.ToString()).RootElement); -#endif - } - writer.WritePropertyName("type"u8); - writer.WriteStringValue(CopySourceType); - if (Optional.IsDefined(SourceRetryCount)) - { - writer.WritePropertyName("sourceRetryCount"u8); - JsonSerializer.Serialize(writer, SourceRetryCount); - } - if (Optional.IsDefined(SourceRetryWait)) - { - writer.WritePropertyName("sourceRetryWait"u8); - JsonSerializer.Serialize(writer, SourceRetryWait); - } - if (Optional.IsDefined(MaxConcurrentConnections)) - { - writer.WritePropertyName("maxConcurrentConnections"u8); - JsonSerializer.Serialize(writer, MaxConcurrentConnections); - } - if (Optional.IsDefined(DisableMetricsCollection)) - { - writer.WritePropertyName("disableMetricsCollection"u8); - JsonSerializer.Serialize(writer, DisableMetricsCollection); - } - foreach (var item in AdditionalProperties) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.Value.ToString()).RootElement); -#endif - } - writer.WriteEndObject(); - } - - internal static AzurePostgreSqlSource DeserializeAzurePostgreSqlSource(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - Optional> query = default; - Optional> queryTimeout = default; - Optional additionalColumns = default; - string type = default; - Optional> sourceRetryCount = default; - Optional> sourceRetryWait = default; - Optional> maxConcurrentConnections = default; - Optional> disableMetricsCollection = default; - IDictionary> additionalProperties = default; - Dictionary> additionalPropertiesDictionary = new Dictionary>(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("query"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - query = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("queryTimeout"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - queryTimeout = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("additionalColumns"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - additionalColumns = BinaryData.FromString(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("type"u8)) - { - type = property.Value.GetString(); - continue; - } - if (property.NameEquals("sourceRetryCount"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - sourceRetryCount = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("sourceRetryWait"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - sourceRetryWait = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("maxConcurrentConnections"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - maxConcurrentConnections = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("disableMetricsCollection"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - disableMetricsCollection = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - additionalPropertiesDictionary.Add(property.Name, JsonSerializer.Deserialize>(property.Value.GetRawText())); - } - additionalProperties = additionalPropertiesDictionary; - return new AzurePostgreSqlSource(type, sourceRetryCount.Value, sourceRetryWait.Value, maxConcurrentConnections.Value, disableMetricsCollection.Value, additionalProperties, queryTimeout.Value, additionalColumns.Value, query.Value); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/AzurePostgreSqlSource.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/AzurePostgreSqlSource.cs deleted file mode 100644 index cdb07e32..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/AzurePostgreSqlSource.cs +++ /dev/null @@ -1,37 +0,0 @@ -// - -#nullable disable - -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// A copy activity Azure PostgreSQL source. - public partial class AzurePostgreSqlSource : TabularSource - { - /// Initializes a new instance of AzurePostgreSqlSource. - public AzurePostgreSqlSource() - { - CopySourceType = "AzurePostgreSqlSource"; - } - - /// Initializes a new instance of AzurePostgreSqlSource. - /// Copy source type. - /// Source retry count. Type: integer (or Expression with resultType integer). - /// Source retry wait. Type: string (or Expression with resultType string), pattern: ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). - /// The maximum concurrent connection count for the source data store. Type: integer (or Expression with resultType integer). - /// If true, disable data store metrics collection. Default is false. Type: boolean (or Expression with resultType boolean). - /// Additional Properties. - /// 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). - /// A query to retrieve data from source. Type: string (or Expression with resultType string). - internal AzurePostgreSqlSource(string copySourceType, DataFactoryElement sourceRetryCount, DataFactoryElement sourceRetryWait, DataFactoryElement maxConcurrentConnections, DataFactoryElement disableMetricsCollection, IDictionary> additionalProperties, DataFactoryElement queryTimeout, BinaryData additionalColumns, DataFactoryElement query) : base(copySourceType, sourceRetryCount, sourceRetryWait, maxConcurrentConnections, disableMetricsCollection, additionalProperties, queryTimeout, additionalColumns) - { - Query = query; - CopySourceType = copySourceType ?? "AzurePostgreSqlSource"; - } - - /// A query to retrieve data from source. Type: string (or Expression with resultType string). - public DataFactoryElement Query { get; set; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/AzurePostgreSqlTableDataset.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/AzurePostgreSqlTableDataset.Serialization.cs deleted file mode 100644 index 92f731d7..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/AzurePostgreSqlTableDataset.Serialization.cs +++ /dev/null @@ -1,242 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class AzurePostgreSqlTableDataset : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - writer.WritePropertyName("type"u8); - writer.WriteStringValue(DatasetType); - if (Optional.IsDefined(Description)) - { - writer.WritePropertyName("description"u8); - writer.WriteStringValue(Description); - } - if (Optional.IsDefined(Structure)) - { - writer.WritePropertyName("structure"u8); - JsonSerializer.Serialize(writer, Structure); - } - if (Optional.IsDefined(Schema)) - { - writer.WritePropertyName("schema"u8); - JsonSerializer.Serialize(writer, Schema); - } - writer.WritePropertyName("linkedServiceName"u8); - JsonSerializer.Serialize(writer, LinkedServiceName); if (Optional.IsCollectionDefined(Parameters)) - { - writer.WritePropertyName("parameters"u8); - writer.WriteStartObject(); - foreach (var item in Parameters) - { - writer.WritePropertyName(item.Key); - writer.WriteObjectValue(item.Value); - } - writer.WriteEndObject(); - } - if (Optional.IsCollectionDefined(Annotations)) - { - writer.WritePropertyName("annotations"u8); - writer.WriteStartArray(); - foreach (var item in Annotations) - { - if (item == null) - { - writer.WriteNullValue(); - continue; - } -#if NET6_0_OR_GREATER - writer.WriteRawValue(item); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.ToString()).RootElement); -#endif - } - writer.WriteEndArray(); - } - if (Optional.IsDefined(Folder)) - { - writer.WritePropertyName("folder"u8); - writer.WriteObjectValue(Folder); - } - writer.WritePropertyName("typeProperties"u8); - writer.WriteStartObject(); - if (Optional.IsDefined(TableName)) - { - writer.WritePropertyName("tableName"u8); - JsonSerializer.Serialize(writer, TableName); - } - if (Optional.IsDefined(Table)) - { - writer.WritePropertyName("table"u8); - JsonSerializer.Serialize(writer, Table); - } - if (Optional.IsDefined(SchemaTypePropertiesSchema)) - { - writer.WritePropertyName("schema"u8); - JsonSerializer.Serialize(writer, SchemaTypePropertiesSchema); - } - writer.WriteEndObject(); - foreach (var item in AdditionalProperties) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.Value.ToString()).RootElement); -#endif - } - writer.WriteEndObject(); - } - - internal static AzurePostgreSqlTableDataset DeserializeAzurePostgreSqlTableDataset(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - string type = default; - Optional description = default; - Optional>> structure = default; - Optional>> schema = default; - DataFactoryLinkedServiceReference linkedServiceName = default; - Optional> parameters = default; - Optional> annotations = default; - Optional folder = default; - Optional> tableName = default; - Optional> table = default; - Optional> schema0 = default; - IDictionary> additionalProperties = default; - Dictionary> additionalPropertiesDictionary = new Dictionary>(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("type"u8)) - { - type = property.Value.GetString(); - continue; - } - if (property.NameEquals("description"u8)) - { - description = property.Value.GetString(); - continue; - } - if (property.NameEquals("structure"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - structure = JsonSerializer.Deserialize>>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("schema"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - schema = JsonSerializer.Deserialize>>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("linkedServiceName"u8)) - { - linkedServiceName = JsonSerializer.Deserialize(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("parameters"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - Dictionary dictionary = new Dictionary(); - foreach (var property0 in property.Value.EnumerateObject()) - { - dictionary.Add(property0.Name, EntityParameterSpecification.DeserializeEntityParameterSpecification(property0.Value)); - } - parameters = dictionary; - continue; - } - if (property.NameEquals("annotations"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - if (item.ValueKind == JsonValueKind.Null) - { - array.Add(null); - } - else - { - array.Add(BinaryData.FromString(item.GetRawText())); - } - } - annotations = array; - continue; - } - if (property.NameEquals("folder"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - folder = DatasetFolder.DeserializeDatasetFolder(property.Value); - continue; - } - if (property.NameEquals("typeProperties"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - foreach (var property0 in property.Value.EnumerateObject()) - { - if (property0.NameEquals("tableName"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - tableName = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("table"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - table = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("schema"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - schema0 = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - } - continue; - } - additionalPropertiesDictionary.Add(property.Name, JsonSerializer.Deserialize>(property.Value.GetRawText())); - } - additionalProperties = additionalPropertiesDictionary; - return new AzurePostgreSqlTableDataset(type, description.Value, structure.Value, schema.Value, linkedServiceName, Optional.ToDictionary(parameters), Optional.ToList(annotations), folder.Value, additionalProperties, tableName.Value, table.Value, schema0.Value); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/AzurePostgreSqlTableDataset.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/AzurePostgreSqlTableDataset.cs deleted file mode 100644 index edbf336f..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/AzurePostgreSqlTableDataset.cs +++ /dev/null @@ -1,51 +0,0 @@ -// - -#nullable disable - -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// Azure PostgreSQL dataset. - public partial class AzurePostgreSqlTableDataset : DataFactoryDatasetProperties - { - /// Initializes a new instance of AzurePostgreSqlTableDataset. - /// Linked service reference. - /// is null. - public AzurePostgreSqlTableDataset(DataFactoryLinkedServiceReference linkedServiceName) : base(linkedServiceName) - { - Argument.AssertNotNull(linkedServiceName, nameof(linkedServiceName)); - - DatasetType = "AzurePostgreSqlTable"; - } - - /// Initializes a new instance of AzurePostgreSqlTableDataset. - /// Type of dataset. - /// Dataset description. - /// Columns that define the structure of the dataset. Type: array (or Expression with resultType array), itemType: DatasetDataElement. - /// Columns that define the physical type schema of the dataset. Type: array (or Expression with resultType array), itemType: DatasetSchemaDataElement. - /// Linked service reference. - /// Parameters for dataset. - /// List of tags that can be used for describing the Dataset. - /// The folder that this Dataset is in. If not specified, Dataset will appear at the root level. - /// Additional Properties. - /// The table name of the Azure PostgreSQL database which includes both schema and table. Type: string (or Expression with resultType string). - /// The table name of the Azure PostgreSQL database. Type: string (or Expression with resultType string). - /// The schema name of the Azure PostgreSQL database. Type: string (or Expression with resultType string). - internal AzurePostgreSqlTableDataset(string datasetType, string description, DataFactoryElement> structure, DataFactoryElement> schema, DataFactoryLinkedServiceReference linkedServiceName, IDictionary parameters, IList annotations, DatasetFolder folder, IDictionary> additionalProperties, DataFactoryElement tableName, DataFactoryElement table, DataFactoryElement schemaTypePropertiesSchema) : base(datasetType, description, structure, schema, linkedServiceName, parameters, annotations, folder, additionalProperties) - { - TableName = tableName; - Table = table; - SchemaTypePropertiesSchema = schemaTypePropertiesSchema; - DatasetType = datasetType ?? "AzurePostgreSqlTable"; - } - - /// The table name of the Azure PostgreSQL database which includes both schema and table. Type: string (or Expression with resultType string). - public DataFactoryElement TableName { get; set; } - /// The table name of the Azure PostgreSQL database. Type: string (or Expression with resultType string). - public DataFactoryElement Table { get; set; } - /// The schema name of the Azure PostgreSQL database. Type: string (or Expression with resultType string). - public DataFactoryElement SchemaTypePropertiesSchema { get; set; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/AzureQueueSink.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/AzureQueueSink.Serialization.cs deleted file mode 100644 index e7a1dafb..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/AzureQueueSink.Serialization.cs +++ /dev/null @@ -1,142 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class AzureQueueSink : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - writer.WritePropertyName("type"u8); - writer.WriteStringValue(CopySinkType); - if (Optional.IsDefined(WriteBatchSize)) - { - writer.WritePropertyName("writeBatchSize"u8); - JsonSerializer.Serialize(writer, WriteBatchSize); - } - if (Optional.IsDefined(WriteBatchTimeout)) - { - writer.WritePropertyName("writeBatchTimeout"u8); - JsonSerializer.Serialize(writer, WriteBatchTimeout); - } - if (Optional.IsDefined(SinkRetryCount)) - { - writer.WritePropertyName("sinkRetryCount"u8); - JsonSerializer.Serialize(writer, SinkRetryCount); - } - if (Optional.IsDefined(SinkRetryWait)) - { - writer.WritePropertyName("sinkRetryWait"u8); - JsonSerializer.Serialize(writer, SinkRetryWait); - } - if (Optional.IsDefined(MaxConcurrentConnections)) - { - writer.WritePropertyName("maxConcurrentConnections"u8); - JsonSerializer.Serialize(writer, MaxConcurrentConnections); - } - if (Optional.IsDefined(DisableMetricsCollection)) - { - writer.WritePropertyName("disableMetricsCollection"u8); - JsonSerializer.Serialize(writer, DisableMetricsCollection); - } - foreach (var item in AdditionalProperties) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.Value.ToString()).RootElement); -#endif - } - writer.WriteEndObject(); - } - - internal static AzureQueueSink DeserializeAzureQueueSink(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - string type = default; - Optional> writeBatchSize = default; - Optional> writeBatchTimeout = default; - Optional> sinkRetryCount = default; - Optional> sinkRetryWait = default; - Optional> maxConcurrentConnections = default; - Optional> disableMetricsCollection = default; - IDictionary> additionalProperties = default; - Dictionary> additionalPropertiesDictionary = new Dictionary>(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("type"u8)) - { - type = property.Value.GetString(); - continue; - } - if (property.NameEquals("writeBatchSize"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - writeBatchSize = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("writeBatchTimeout"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - writeBatchTimeout = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("sinkRetryCount"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - sinkRetryCount = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("sinkRetryWait"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - sinkRetryWait = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("maxConcurrentConnections"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - maxConcurrentConnections = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("disableMetricsCollection"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - disableMetricsCollection = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - additionalPropertiesDictionary.Add(property.Name, JsonSerializer.Deserialize>(property.Value.GetRawText())); - } - additionalProperties = additionalPropertiesDictionary; - return new AzureQueueSink(type, writeBatchSize.Value, writeBatchTimeout.Value, sinkRetryCount.Value, sinkRetryWait.Value, maxConcurrentConnections.Value, disableMetricsCollection.Value, additionalProperties); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/AzureQueueSink.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/AzureQueueSink.cs deleted file mode 100644 index 34972e3d..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/AzureQueueSink.cs +++ /dev/null @@ -1,32 +0,0 @@ -// - -#nullable disable - -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// A copy activity Azure Queue sink. - public partial class AzureQueueSink : CopySink - { - /// Initializes a new instance of AzureQueueSink. - public AzureQueueSink() - { - CopySinkType = "AzureQueueSink"; - } - - /// Initializes a new instance of AzureQueueSink. - /// Copy sink type. - /// Write batch size. Type: integer (or Expression with resultType integer), minimum: 0. - /// Write batch timeout. Type: string (or Expression with resultType string), pattern: ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). - /// Sink retry count. Type: integer (or Expression with resultType integer). - /// Sink retry wait. Type: string (or Expression with resultType string), pattern: ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). - /// The maximum concurrent connection count for the sink data store. Type: integer (or Expression with resultType integer). - /// If true, disable data store metrics collection. Default is false. Type: boolean (or Expression with resultType boolean). - /// Additional Properties. - internal AzureQueueSink(string copySinkType, DataFactoryElement writeBatchSize, DataFactoryElement writeBatchTimeout, DataFactoryElement sinkRetryCount, DataFactoryElement sinkRetryWait, DataFactoryElement maxConcurrentConnections, DataFactoryElement disableMetricsCollection, IDictionary> additionalProperties) : base(copySinkType, writeBatchSize, writeBatchTimeout, sinkRetryCount, sinkRetryWait, maxConcurrentConnections, disableMetricsCollection, additionalProperties) - { - CopySinkType = copySinkType ?? "AzureQueueSink"; - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/AzureSearchIndexDataset.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/AzureSearchIndexDataset.Serialization.cs deleted file mode 100644 index 39b0ffcd..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/AzureSearchIndexDataset.Serialization.cs +++ /dev/null @@ -1,205 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class AzureSearchIndexDataset : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - writer.WritePropertyName("type"u8); - writer.WriteStringValue(DatasetType); - if (Optional.IsDefined(Description)) - { - writer.WritePropertyName("description"u8); - writer.WriteStringValue(Description); - } - if (Optional.IsDefined(Structure)) - { - writer.WritePropertyName("structure"u8); - JsonSerializer.Serialize(writer, Structure); - } - if (Optional.IsDefined(Schema)) - { - writer.WritePropertyName("schema"u8); - JsonSerializer.Serialize(writer, Schema); - } - writer.WritePropertyName("linkedServiceName"u8); - JsonSerializer.Serialize(writer, LinkedServiceName); if (Optional.IsCollectionDefined(Parameters)) - { - writer.WritePropertyName("parameters"u8); - writer.WriteStartObject(); - foreach (var item in Parameters) - { - writer.WritePropertyName(item.Key); - writer.WriteObjectValue(item.Value); - } - writer.WriteEndObject(); - } - if (Optional.IsCollectionDefined(Annotations)) - { - writer.WritePropertyName("annotations"u8); - writer.WriteStartArray(); - foreach (var item in Annotations) - { - if (item == null) - { - writer.WriteNullValue(); - continue; - } -#if NET6_0_OR_GREATER - writer.WriteRawValue(item); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.ToString()).RootElement); -#endif - } - writer.WriteEndArray(); - } - if (Optional.IsDefined(Folder)) - { - writer.WritePropertyName("folder"u8); - writer.WriteObjectValue(Folder); - } - writer.WritePropertyName("typeProperties"u8); - writer.WriteStartObject(); - writer.WritePropertyName("indexName"u8); - JsonSerializer.Serialize(writer, IndexName); - writer.WriteEndObject(); - foreach (var item in AdditionalProperties) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.Value.ToString()).RootElement); -#endif - } - writer.WriteEndObject(); - } - - internal static AzureSearchIndexDataset DeserializeAzureSearchIndexDataset(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - string type = default; - Optional description = default; - Optional>> structure = default; - Optional>> schema = default; - DataFactoryLinkedServiceReference linkedServiceName = default; - Optional> parameters = default; - Optional> annotations = default; - Optional folder = default; - DataFactoryElement indexName = default; - IDictionary> additionalProperties = default; - Dictionary> additionalPropertiesDictionary = new Dictionary>(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("type"u8)) - { - type = property.Value.GetString(); - continue; - } - if (property.NameEquals("description"u8)) - { - description = property.Value.GetString(); - continue; - } - if (property.NameEquals("structure"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - structure = JsonSerializer.Deserialize>>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("schema"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - schema = JsonSerializer.Deserialize>>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("linkedServiceName"u8)) - { - linkedServiceName = JsonSerializer.Deserialize(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("parameters"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - Dictionary dictionary = new Dictionary(); - foreach (var property0 in property.Value.EnumerateObject()) - { - dictionary.Add(property0.Name, EntityParameterSpecification.DeserializeEntityParameterSpecification(property0.Value)); - } - parameters = dictionary; - continue; - } - if (property.NameEquals("annotations"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - if (item.ValueKind == JsonValueKind.Null) - { - array.Add(null); - } - else - { - array.Add(BinaryData.FromString(item.GetRawText())); - } - } - annotations = array; - continue; - } - if (property.NameEquals("folder"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - folder = DatasetFolder.DeserializeDatasetFolder(property.Value); - continue; - } - if (property.NameEquals("typeProperties"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - foreach (var property0 in property.Value.EnumerateObject()) - { - if (property0.NameEquals("indexName"u8)) - { - indexName = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - } - continue; - } - additionalPropertiesDictionary.Add(property.Name, JsonSerializer.Deserialize>(property.Value.GetRawText())); - } - additionalProperties = additionalPropertiesDictionary; - return new AzureSearchIndexDataset(type, description.Value, structure.Value, schema.Value, linkedServiceName, Optional.ToDictionary(parameters), Optional.ToList(annotations), folder.Value, additionalProperties, indexName); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/AzureSearchIndexDataset.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/AzureSearchIndexDataset.cs deleted file mode 100644 index d208b1f8..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/AzureSearchIndexDataset.cs +++ /dev/null @@ -1,46 +0,0 @@ -// - -#nullable disable - -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// The Azure Search Index. - public partial class AzureSearchIndexDataset : DataFactoryDatasetProperties - { - /// Initializes a new instance of AzureSearchIndexDataset. - /// Linked service reference. - /// The name of the Azure Search Index. Type: string (or Expression with resultType string). - /// or is null. - public AzureSearchIndexDataset(DataFactoryLinkedServiceReference linkedServiceName, DataFactoryElement indexName) : base(linkedServiceName) - { - Argument.AssertNotNull(linkedServiceName, nameof(linkedServiceName)); - Argument.AssertNotNull(indexName, nameof(indexName)); - - IndexName = indexName; - DatasetType = "AzureSearchIndex"; - } - - /// Initializes a new instance of AzureSearchIndexDataset. - /// Type of dataset. - /// Dataset description. - /// Columns that define the structure of the dataset. Type: array (or Expression with resultType array), itemType: DatasetDataElement. - /// Columns that define the physical type schema of the dataset. Type: array (or Expression with resultType array), itemType: DatasetSchemaDataElement. - /// Linked service reference. - /// Parameters for dataset. - /// List of tags that can be used for describing the Dataset. - /// The folder that this Dataset is in. If not specified, Dataset will appear at the root level. - /// Additional Properties. - /// The name of the Azure Search Index. Type: string (or Expression with resultType string). - internal AzureSearchIndexDataset(string datasetType, string description, DataFactoryElement> structure, DataFactoryElement> schema, DataFactoryLinkedServiceReference linkedServiceName, IDictionary parameters, IList annotations, DatasetFolder folder, IDictionary> additionalProperties, DataFactoryElement indexName) : base(datasetType, description, structure, schema, linkedServiceName, parameters, annotations, folder, additionalProperties) - { - IndexName = indexName; - DatasetType = datasetType ?? "AzureSearchIndex"; - } - - /// The name of the Azure Search Index. Type: string (or Expression with resultType string). - public DataFactoryElement IndexName { get; set; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/AzureSearchIndexSink.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/AzureSearchIndexSink.Serialization.cs deleted file mode 100644 index ecf62275..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/AzureSearchIndexSink.Serialization.cs +++ /dev/null @@ -1,157 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class AzureSearchIndexSink : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - if (Optional.IsDefined(WriteBehavior)) - { - writer.WritePropertyName("writeBehavior"u8); - writer.WriteStringValue(WriteBehavior.Value.ToString()); - } - writer.WritePropertyName("type"u8); - writer.WriteStringValue(CopySinkType); - if (Optional.IsDefined(WriteBatchSize)) - { - writer.WritePropertyName("writeBatchSize"u8); - JsonSerializer.Serialize(writer, WriteBatchSize); - } - if (Optional.IsDefined(WriteBatchTimeout)) - { - writer.WritePropertyName("writeBatchTimeout"u8); - JsonSerializer.Serialize(writer, WriteBatchTimeout); - } - if (Optional.IsDefined(SinkRetryCount)) - { - writer.WritePropertyName("sinkRetryCount"u8); - JsonSerializer.Serialize(writer, SinkRetryCount); - } - if (Optional.IsDefined(SinkRetryWait)) - { - writer.WritePropertyName("sinkRetryWait"u8); - JsonSerializer.Serialize(writer, SinkRetryWait); - } - if (Optional.IsDefined(MaxConcurrentConnections)) - { - writer.WritePropertyName("maxConcurrentConnections"u8); - JsonSerializer.Serialize(writer, MaxConcurrentConnections); - } - if (Optional.IsDefined(DisableMetricsCollection)) - { - writer.WritePropertyName("disableMetricsCollection"u8); - JsonSerializer.Serialize(writer, DisableMetricsCollection); - } - foreach (var item in AdditionalProperties) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.Value.ToString()).RootElement); -#endif - } - writer.WriteEndObject(); - } - - internal static AzureSearchIndexSink DeserializeAzureSearchIndexSink(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - Optional writeBehavior = default; - string type = default; - Optional> writeBatchSize = default; - Optional> writeBatchTimeout = default; - Optional> sinkRetryCount = default; - Optional> sinkRetryWait = default; - Optional> maxConcurrentConnections = default; - Optional> disableMetricsCollection = default; - IDictionary> additionalProperties = default; - Dictionary> additionalPropertiesDictionary = new Dictionary>(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("writeBehavior"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - writeBehavior = new AzureSearchIndexWriteBehaviorType(property.Value.GetString()); - continue; - } - if (property.NameEquals("type"u8)) - { - type = property.Value.GetString(); - continue; - } - if (property.NameEquals("writeBatchSize"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - writeBatchSize = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("writeBatchTimeout"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - writeBatchTimeout = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("sinkRetryCount"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - sinkRetryCount = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("sinkRetryWait"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - sinkRetryWait = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("maxConcurrentConnections"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - maxConcurrentConnections = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("disableMetricsCollection"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - disableMetricsCollection = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - additionalPropertiesDictionary.Add(property.Name, JsonSerializer.Deserialize>(property.Value.GetRawText())); - } - additionalProperties = additionalPropertiesDictionary; - return new AzureSearchIndexSink(type, writeBatchSize.Value, writeBatchTimeout.Value, sinkRetryCount.Value, sinkRetryWait.Value, maxConcurrentConnections.Value, disableMetricsCollection.Value, additionalProperties, Optional.ToNullable(writeBehavior)); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/AzureSearchIndexSink.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/AzureSearchIndexSink.cs deleted file mode 100644 index 527a2b43..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/AzureSearchIndexSink.cs +++ /dev/null @@ -1,37 +0,0 @@ -// - -#nullable disable - -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// A copy activity Azure Search Index sink. - public partial class AzureSearchIndexSink : CopySink - { - /// Initializes a new instance of AzureSearchIndexSink. - public AzureSearchIndexSink() - { - CopySinkType = "AzureSearchIndexSink"; - } - - /// Initializes a new instance of AzureSearchIndexSink. - /// Copy sink type. - /// Write batch size. Type: integer (or Expression with resultType integer), minimum: 0. - /// Write batch timeout. Type: string (or Expression with resultType string), pattern: ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). - /// Sink retry count. Type: integer (or Expression with resultType integer). - /// Sink retry wait. Type: string (or Expression with resultType string), pattern: ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). - /// The maximum concurrent connection count for the sink data store. Type: integer (or Expression with resultType integer). - /// If true, disable data store metrics collection. Default is false. Type: boolean (or Expression with resultType boolean). - /// Additional Properties. - /// Specify the write behavior when upserting documents into Azure Search Index. - internal AzureSearchIndexSink(string copySinkType, DataFactoryElement writeBatchSize, DataFactoryElement writeBatchTimeout, DataFactoryElement sinkRetryCount, DataFactoryElement sinkRetryWait, DataFactoryElement maxConcurrentConnections, DataFactoryElement disableMetricsCollection, IDictionary> additionalProperties, AzureSearchIndexWriteBehaviorType? writeBehavior) : base(copySinkType, writeBatchSize, writeBatchTimeout, sinkRetryCount, sinkRetryWait, maxConcurrentConnections, disableMetricsCollection, additionalProperties) - { - WriteBehavior = writeBehavior; - CopySinkType = copySinkType ?? "AzureSearchIndexSink"; - } - - /// Specify the write behavior when upserting documents into Azure Search Index. - public AzureSearchIndexWriteBehaviorType? WriteBehavior { get; set; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/AzureSearchIndexWriteBehaviorType.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/AzureSearchIndexWriteBehaviorType.cs deleted file mode 100644 index e7b60eb1..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/AzureSearchIndexWriteBehaviorType.cs +++ /dev/null @@ -1,47 +0,0 @@ -// - -#nullable disable - -using System.ComponentModel; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// Specify the write behavior when upserting documents into Azure Search Index. - public readonly partial struct AzureSearchIndexWriteBehaviorType : IEquatable - { - private readonly string _value; - - /// Initializes a new instance of . - /// is null. - public AzureSearchIndexWriteBehaviorType(string value) - { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } - - private const string MergeValue = "Merge"; - private const string UploadValue = "Upload"; - - /// Merge. - public static AzureSearchIndexWriteBehaviorType Merge { get; } = new AzureSearchIndexWriteBehaviorType(MergeValue); - /// Upload. - public static AzureSearchIndexWriteBehaviorType Upload { get; } = new AzureSearchIndexWriteBehaviorType(UploadValue); - /// Determines if two values are the same. - public static bool operator ==(AzureSearchIndexWriteBehaviorType left, AzureSearchIndexWriteBehaviorType right) => left.Equals(right); - /// Determines if two values are not the same. - public static bool operator !=(AzureSearchIndexWriteBehaviorType left, AzureSearchIndexWriteBehaviorType right) => !left.Equals(right); - /// Converts a string to a . - public static implicit operator AzureSearchIndexWriteBehaviorType(string value) => new AzureSearchIndexWriteBehaviorType(value); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override bool Equals(object obj) => obj is AzureSearchIndexWriteBehaviorType other && Equals(other); - /// - public bool Equals(AzureSearchIndexWriteBehaviorType other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override int GetHashCode() => _value?.GetHashCode() ?? 0; - /// - public override string ToString() => _value; - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/AzureSearchLinkedService.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/AzureSearchLinkedService.Serialization.cs deleted file mode 100644 index d5158be5..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/AzureSearchLinkedService.Serialization.cs +++ /dev/null @@ -1,194 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class AzureSearchLinkedService : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - writer.WritePropertyName("type"u8); - writer.WriteStringValue(LinkedServiceType); - if (Optional.IsDefined(ConnectVia)) - { - writer.WritePropertyName("connectVia"u8); - writer.WriteObjectValue(ConnectVia); - } - if (Optional.IsDefined(Description)) - { - writer.WritePropertyName("description"u8); - writer.WriteStringValue(Description); - } - if (Optional.IsCollectionDefined(Parameters)) - { - writer.WritePropertyName("parameters"u8); - writer.WriteStartObject(); - foreach (var item in Parameters) - { - writer.WritePropertyName(item.Key); - writer.WriteObjectValue(item.Value); - } - writer.WriteEndObject(); - } - if (Optional.IsCollectionDefined(Annotations)) - { - writer.WritePropertyName("annotations"u8); - writer.WriteStartArray(); - foreach (var item in Annotations) - { - if (item == null) - { - writer.WriteNullValue(); - continue; - } -#if NET6_0_OR_GREATER - writer.WriteRawValue(item); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.ToString()).RootElement); -#endif - } - writer.WriteEndArray(); - } - writer.WritePropertyName("typeProperties"u8); - writer.WriteStartObject(); - writer.WritePropertyName("url"u8); - JsonSerializer.Serialize(writer, Uri); - if (Optional.IsDefined(Key)) - { - writer.WritePropertyName("key"u8); - JsonSerializer.Serialize(writer, Key); - } - if (Optional.IsDefined(EncryptedCredential)) - { - writer.WritePropertyName("encryptedCredential"u8); - writer.WriteStringValue(EncryptedCredential); - } - writer.WriteEndObject(); - foreach (var item in AdditionalProperties) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.Value.ToString()).RootElement); -#endif - } - writer.WriteEndObject(); - } - - internal static AzureSearchLinkedService DeserializeAzureSearchLinkedService(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - string type = default; - Optional connectVia = default; - Optional description = default; - Optional> parameters = default; - Optional> annotations = default; - DataFactoryElement url = default; - Optional key = default; - Optional encryptedCredential = default; - IDictionary> additionalProperties = default; - Dictionary> additionalPropertiesDictionary = new Dictionary>(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("type"u8)) - { - type = property.Value.GetString(); - continue; - } - if (property.NameEquals("connectVia"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - connectVia = IntegrationRuntimeReference.DeserializeIntegrationRuntimeReference(property.Value); - continue; - } - if (property.NameEquals("description"u8)) - { - description = property.Value.GetString(); - continue; - } - if (property.NameEquals("parameters"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - Dictionary dictionary = new Dictionary(); - foreach (var property0 in property.Value.EnumerateObject()) - { - dictionary.Add(property0.Name, EntityParameterSpecification.DeserializeEntityParameterSpecification(property0.Value)); - } - parameters = dictionary; - continue; - } - if (property.NameEquals("annotations"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - if (item.ValueKind == JsonValueKind.Null) - { - array.Add(null); - } - else - { - array.Add(BinaryData.FromString(item.GetRawText())); - } - } - annotations = array; - continue; - } - if (property.NameEquals("typeProperties"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - foreach (var property0 in property.Value.EnumerateObject()) - { - if (property0.NameEquals("url"u8)) - { - url = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("key"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - key = JsonSerializer.Deserialize(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("encryptedCredential"u8)) - { - encryptedCredential = property0.Value.GetString(); - continue; - } - } - continue; - } - additionalPropertiesDictionary.Add(property.Name, JsonSerializer.Deserialize>(property.Value.GetRawText())); - } - additionalProperties = additionalPropertiesDictionary; - return new AzureSearchLinkedService(type, connectVia.Value, description.Value, Optional.ToDictionary(parameters), Optional.ToList(annotations), additionalProperties, url, key, encryptedCredential.Value); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/AzureSearchLinkedService.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/AzureSearchLinkedService.cs deleted file mode 100644 index 4c30eb8f..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/AzureSearchLinkedService.cs +++ /dev/null @@ -1,49 +0,0 @@ -// - -#nullable disable - -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// Linked service for Windows Azure Search Service. - public partial class AzureSearchLinkedService : DataFactoryLinkedServiceProperties - { - /// Initializes a new instance of AzureSearchLinkedService. - /// URL for Azure Search service. Type: string (or Expression with resultType string). - /// is null. - public AzureSearchLinkedService(DataFactoryElement uri) - { - Argument.AssertNotNull(uri, nameof(uri)); - - Uri = uri; - LinkedServiceType = "AzureSearch"; - } - - /// Initializes a new instance of AzureSearchLinkedService. - /// Type of linked service. - /// The integration runtime reference. - /// Linked service description. - /// Parameters for linked service. - /// List of tags that can be used for describing the linked service. - /// Additional Properties. - /// URL for Azure Search service. Type: string (or Expression with resultType string). - /// Admin Key for Azure Search service. - /// The encrypted credential used for authentication. Credentials are encrypted using the integration runtime credential manager. Type: string. - internal AzureSearchLinkedService(string linkedServiceType, IntegrationRuntimeReference connectVia, string description, IDictionary parameters, IList annotations, IDictionary> additionalProperties, DataFactoryElement uri, DataFactorySecretBaseDefinition key, string encryptedCredential) : base(linkedServiceType, connectVia, description, parameters, annotations, additionalProperties) - { - Uri = uri; - Key = key; - EncryptedCredential = encryptedCredential; - LinkedServiceType = linkedServiceType ?? "AzureSearch"; - } - - /// URL for Azure Search service. Type: string (or Expression with resultType string). - public DataFactoryElement Uri { get; set; } - /// Admin Key for Azure Search service. - public DataFactorySecretBaseDefinition Key { get; set; } - /// The encrypted credential used for authentication. Credentials are encrypted using the integration runtime credential manager. Type: string. - public string EncryptedCredential { get; set; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/AzureSqlDWLinkedService.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/AzureSqlDWLinkedService.Serialization.cs deleted file mode 100644 index 2eb9d471..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/AzureSqlDWLinkedService.Serialization.cs +++ /dev/null @@ -1,269 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class AzureSqlDWLinkedService : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - writer.WritePropertyName("type"u8); - writer.WriteStringValue(LinkedServiceType); - if (Optional.IsDefined(ConnectVia)) - { - writer.WritePropertyName("connectVia"u8); - writer.WriteObjectValue(ConnectVia); - } - if (Optional.IsDefined(Description)) - { - writer.WritePropertyName("description"u8); - writer.WriteStringValue(Description); - } - if (Optional.IsCollectionDefined(Parameters)) - { - writer.WritePropertyName("parameters"u8); - writer.WriteStartObject(); - foreach (var item in Parameters) - { - writer.WritePropertyName(item.Key); - writer.WriteObjectValue(item.Value); - } - writer.WriteEndObject(); - } - if (Optional.IsCollectionDefined(Annotations)) - { - writer.WritePropertyName("annotations"u8); - writer.WriteStartArray(); - foreach (var item in Annotations) - { - if (item == null) - { - writer.WriteNullValue(); - continue; - } -#if NET6_0_OR_GREATER - writer.WriteRawValue(item); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.ToString()).RootElement); -#endif - } - writer.WriteEndArray(); - } - writer.WritePropertyName("typeProperties"u8); - writer.WriteStartObject(); - writer.WritePropertyName("connectionString"u8); - JsonSerializer.Serialize(writer, ConnectionString); - if (Optional.IsDefined(Password)) - { - writer.WritePropertyName("password"u8); - JsonSerializer.Serialize(writer, Password); - } - if (Optional.IsDefined(ServicePrincipalId)) - { - writer.WritePropertyName("servicePrincipalId"u8); - JsonSerializer.Serialize(writer, ServicePrincipalId); - } - if (Optional.IsDefined(ServicePrincipalKey)) - { - writer.WritePropertyName("servicePrincipalKey"u8); - JsonSerializer.Serialize(writer, ServicePrincipalKey); - } - if (Optional.IsDefined(Tenant)) - { - writer.WritePropertyName("tenant"u8); - JsonSerializer.Serialize(writer, Tenant); - } - if (Optional.IsDefined(AzureCloudType)) - { - writer.WritePropertyName("azureCloudType"u8); - JsonSerializer.Serialize(writer, AzureCloudType); - } - if (Optional.IsDefined(EncryptedCredential)) - { - writer.WritePropertyName("encryptedCredential"u8); - writer.WriteStringValue(EncryptedCredential); - } - if (Optional.IsDefined(Credential)) - { - writer.WritePropertyName("credential"u8); - writer.WriteObjectValue(Credential); - } - writer.WriteEndObject(); - foreach (var item in AdditionalProperties) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.Value.ToString()).RootElement); -#endif - } - writer.WriteEndObject(); - } - - internal static AzureSqlDWLinkedService DeserializeAzureSqlDWLinkedService(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - string type = default; - Optional connectVia = default; - Optional description = default; - Optional> parameters = default; - Optional> annotations = default; - DataFactoryElement connectionString = default; - Optional password = default; - Optional> servicePrincipalId = default; - Optional servicePrincipalKey = default; - Optional> tenant = default; - Optional> azureCloudType = default; - Optional encryptedCredential = default; - Optional credential = default; - IDictionary> additionalProperties = default; - Dictionary> additionalPropertiesDictionary = new Dictionary>(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("type"u8)) - { - type = property.Value.GetString(); - continue; - } - if (property.NameEquals("connectVia"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - connectVia = IntegrationRuntimeReference.DeserializeIntegrationRuntimeReference(property.Value); - continue; - } - if (property.NameEquals("description"u8)) - { - description = property.Value.GetString(); - continue; - } - if (property.NameEquals("parameters"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - Dictionary dictionary = new Dictionary(); - foreach (var property0 in property.Value.EnumerateObject()) - { - dictionary.Add(property0.Name, EntityParameterSpecification.DeserializeEntityParameterSpecification(property0.Value)); - } - parameters = dictionary; - continue; - } - if (property.NameEquals("annotations"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - if (item.ValueKind == JsonValueKind.Null) - { - array.Add(null); - } - else - { - array.Add(BinaryData.FromString(item.GetRawText())); - } - } - annotations = array; - continue; - } - if (property.NameEquals("typeProperties"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - foreach (var property0 in property.Value.EnumerateObject()) - { - if (property0.NameEquals("connectionString"u8)) - { - connectionString = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("password"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - password = JsonSerializer.Deserialize(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("servicePrincipalId"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - servicePrincipalId = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("servicePrincipalKey"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - servicePrincipalKey = JsonSerializer.Deserialize(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("tenant"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - tenant = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("azureCloudType"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - azureCloudType = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("encryptedCredential"u8)) - { - encryptedCredential = property0.Value.GetString(); - continue; - } - if (property0.NameEquals("credential"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - credential = DataFactoryCredentialReference.DeserializeDataFactoryCredentialReference(property0.Value); - continue; - } - } - continue; - } - additionalPropertiesDictionary.Add(property.Name, JsonSerializer.Deserialize>(property.Value.GetRawText())); - } - additionalProperties = additionalPropertiesDictionary; - return new AzureSqlDWLinkedService(type, connectVia.Value, description.Value, Optional.ToDictionary(parameters), Optional.ToList(annotations), additionalProperties, connectionString, password, servicePrincipalId.Value, servicePrincipalKey, tenant.Value, azureCloudType.Value, encryptedCredential.Value, credential.Value); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/AzureSqlDWLinkedService.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/AzureSqlDWLinkedService.cs deleted file mode 100644 index ff3a5d1e..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/AzureSqlDWLinkedService.cs +++ /dev/null @@ -1,69 +0,0 @@ -// - -#nullable disable - -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// Azure SQL Data Warehouse linked service. - public partial class AzureSqlDWLinkedService : DataFactoryLinkedServiceProperties - { - /// Initializes a new instance of AzureSqlDWLinkedService. - /// The connection string. Type: string, SecureString or AzureKeyVaultSecretReference. Type: string, SecureString or AzureKeyVaultSecretReference. - /// is null. - public AzureSqlDWLinkedService(DataFactoryElement connectionString) - { - Argument.AssertNotNull(connectionString, nameof(connectionString)); - - ConnectionString = connectionString; - LinkedServiceType = "AzureSqlDW"; - } - - /// Initializes a new instance of AzureSqlDWLinkedService. - /// Type of linked service. - /// The integration runtime reference. - /// Linked service description. - /// Parameters for linked service. - /// List of tags that can be used for describing the linked service. - /// Additional Properties. - /// The connection string. Type: string, SecureString or AzureKeyVaultSecretReference. Type: string, SecureString or AzureKeyVaultSecretReference. - /// The Azure key vault secret reference of password in connection string. - /// The ID of the service principal used to authenticate against Azure SQL Data Warehouse. Type: string (or Expression with resultType string). - /// The key of the service principal used to authenticate against Azure SQL Data Warehouse. - /// The name or ID of the tenant to which the service principal belongs. Type: string (or Expression with resultType string). - /// Indicates the azure cloud type of the service principle auth. Allowed values are AzurePublic, AzureChina, AzureUsGovernment, AzureGermany. Default value is the data factory regions’ cloud type. Type: string (or Expression with resultType string). - /// The encrypted credential used for authentication. Credentials are encrypted using the integration runtime credential manager. Type: string. - /// The credential reference containing authentication information. - internal AzureSqlDWLinkedService(string linkedServiceType, IntegrationRuntimeReference connectVia, string description, IDictionary parameters, IList annotations, IDictionary> additionalProperties, DataFactoryElement connectionString, DataFactoryKeyVaultSecretReference password, DataFactoryElement servicePrincipalId, DataFactorySecretBaseDefinition servicePrincipalKey, DataFactoryElement tenant, DataFactoryElement azureCloudType, string encryptedCredential, DataFactoryCredentialReference credential) : base(linkedServiceType, connectVia, description, parameters, annotations, additionalProperties) - { - ConnectionString = connectionString; - Password = password; - ServicePrincipalId = servicePrincipalId; - ServicePrincipalKey = servicePrincipalKey; - Tenant = tenant; - AzureCloudType = azureCloudType; - EncryptedCredential = encryptedCredential; - Credential = credential; - LinkedServiceType = linkedServiceType ?? "AzureSqlDW"; - } - - /// The connection string. Type: string, SecureString or AzureKeyVaultSecretReference. Type: string, SecureString or AzureKeyVaultSecretReference. - public DataFactoryElement ConnectionString { get; set; } - /// The Azure key vault secret reference of password in connection string. - public DataFactoryKeyVaultSecretReference Password { get; set; } - /// The ID of the service principal used to authenticate against Azure SQL Data Warehouse. Type: string (or Expression with resultType string). - public DataFactoryElement ServicePrincipalId { get; set; } - /// The key of the service principal used to authenticate against Azure SQL Data Warehouse. - public DataFactorySecretBaseDefinition ServicePrincipalKey { get; set; } - /// The name or ID of the tenant to which the service principal belongs. Type: string (or Expression with resultType string). - public DataFactoryElement Tenant { get; set; } - /// Indicates the azure cloud type of the service principle auth. Allowed values are AzurePublic, AzureChina, AzureUsGovernment, AzureGermany. Default value is the data factory regions’ cloud type. Type: string (or Expression with resultType string). - public DataFactoryElement AzureCloudType { get; set; } - /// The encrypted credential used for authentication. Credentials are encrypted using the integration runtime credential manager. Type: string. - public string EncryptedCredential { get; set; } - /// The credential reference containing authentication information. - public DataFactoryCredentialReference Credential { get; set; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/AzureSqlDWTableDataset.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/AzureSqlDWTableDataset.Serialization.cs deleted file mode 100644 index 08896ae2..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/AzureSqlDWTableDataset.Serialization.cs +++ /dev/null @@ -1,246 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class AzureSqlDWTableDataset : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - writer.WritePropertyName("type"u8); - writer.WriteStringValue(DatasetType); - if (Optional.IsDefined(Description)) - { - writer.WritePropertyName("description"u8); - writer.WriteStringValue(Description); - } - if (Optional.IsDefined(Structure)) - { - writer.WritePropertyName("structure"u8); - JsonSerializer.Serialize(writer, Structure); - } - if (Optional.IsDefined(Schema)) - { - writer.WritePropertyName("schema"u8); - JsonSerializer.Serialize(writer, Schema); - } - writer.WritePropertyName("linkedServiceName"u8); - JsonSerializer.Serialize(writer, LinkedServiceName); if (Optional.IsCollectionDefined(Parameters)) - { - writer.WritePropertyName("parameters"u8); - writer.WriteStartObject(); - foreach (var item in Parameters) - { - writer.WritePropertyName(item.Key); - writer.WriteObjectValue(item.Value); - } - writer.WriteEndObject(); - } - if (Optional.IsCollectionDefined(Annotations)) - { - writer.WritePropertyName("annotations"u8); - writer.WriteStartArray(); - foreach (var item in Annotations) - { - if (item == null) - { - writer.WriteNullValue(); - continue; - } -#if NET6_0_OR_GREATER - writer.WriteRawValue(item); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.ToString()).RootElement); -#endif - } - writer.WriteEndArray(); - } - if (Optional.IsDefined(Folder)) - { - writer.WritePropertyName("folder"u8); - writer.WriteObjectValue(Folder); - } - writer.WritePropertyName("typeProperties"u8); - writer.WriteStartObject(); - if (Optional.IsDefined(TableName)) - { - writer.WritePropertyName("tableName"u8); -#if NET6_0_OR_GREATER - writer.WriteRawValue(TableName); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(TableName.ToString()).RootElement); -#endif - } - if (Optional.IsDefined(SchemaTypePropertiesSchema)) - { - writer.WritePropertyName("schema"u8); - JsonSerializer.Serialize(writer, SchemaTypePropertiesSchema); - } - if (Optional.IsDefined(Table)) - { - writer.WritePropertyName("table"u8); - JsonSerializer.Serialize(writer, Table); - } - writer.WriteEndObject(); - foreach (var item in AdditionalProperties) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.Value.ToString()).RootElement); -#endif - } - writer.WriteEndObject(); - } - - internal static AzureSqlDWTableDataset DeserializeAzureSqlDWTableDataset(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - string type = default; - Optional description = default; - Optional>> structure = default; - Optional>> schema = default; - DataFactoryLinkedServiceReference linkedServiceName = default; - Optional> parameters = default; - Optional> annotations = default; - Optional folder = default; - Optional tableName = default; - Optional> schema0 = default; - Optional> table = default; - IDictionary> additionalProperties = default; - Dictionary> additionalPropertiesDictionary = new Dictionary>(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("type"u8)) - { - type = property.Value.GetString(); - continue; - } - if (property.NameEquals("description"u8)) - { - description = property.Value.GetString(); - continue; - } - if (property.NameEquals("structure"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - structure = JsonSerializer.Deserialize>>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("schema"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - schema = JsonSerializer.Deserialize>>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("linkedServiceName"u8)) - { - linkedServiceName = JsonSerializer.Deserialize(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("parameters"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - Dictionary dictionary = new Dictionary(); - foreach (var property0 in property.Value.EnumerateObject()) - { - dictionary.Add(property0.Name, EntityParameterSpecification.DeserializeEntityParameterSpecification(property0.Value)); - } - parameters = dictionary; - continue; - } - if (property.NameEquals("annotations"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - if (item.ValueKind == JsonValueKind.Null) - { - array.Add(null); - } - else - { - array.Add(BinaryData.FromString(item.GetRawText())); - } - } - annotations = array; - continue; - } - if (property.NameEquals("folder"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - folder = DatasetFolder.DeserializeDatasetFolder(property.Value); - continue; - } - if (property.NameEquals("typeProperties"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - foreach (var property0 in property.Value.EnumerateObject()) - { - if (property0.NameEquals("tableName"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - tableName = BinaryData.FromString(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("schema"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - schema0 = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("table"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - table = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - } - continue; - } - additionalPropertiesDictionary.Add(property.Name, JsonSerializer.Deserialize>(property.Value.GetRawText())); - } - additionalProperties = additionalPropertiesDictionary; - return new AzureSqlDWTableDataset(type, description.Value, structure.Value, schema.Value, linkedServiceName, Optional.ToDictionary(parameters), Optional.ToList(annotations), folder.Value, additionalProperties, tableName.Value, schema0.Value, table.Value); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/AzureSqlDWTableDataset.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/AzureSqlDWTableDataset.cs deleted file mode 100644 index d2026942..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/AzureSqlDWTableDataset.cs +++ /dev/null @@ -1,80 +0,0 @@ -// - -#nullable disable - -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// The Azure SQL Data Warehouse dataset. - public partial class AzureSqlDWTableDataset : DataFactoryDatasetProperties - { - /// Initializes a new instance of AzureSqlDWTableDataset. - /// Linked service reference. - /// is null. - public AzureSqlDWTableDataset(DataFactoryLinkedServiceReference linkedServiceName) : base(linkedServiceName) - { - Argument.AssertNotNull(linkedServiceName, nameof(linkedServiceName)); - - DatasetType = "AzureSqlDWTable"; - } - - /// Initializes a new instance of AzureSqlDWTableDataset. - /// Type of dataset. - /// Dataset description. - /// Columns that define the structure of the dataset. Type: array (or Expression with resultType array), itemType: DatasetDataElement. - /// Columns that define the physical type schema of the dataset. Type: array (or Expression with resultType array), itemType: DatasetSchemaDataElement. - /// Linked service reference. - /// Parameters for dataset. - /// List of tags that can be used for describing the Dataset. - /// The folder that this Dataset is in. If not specified, Dataset will appear at the root level. - /// Additional Properties. - /// This property will be retired. Please consider using schema + table properties instead. - /// The schema name of the Azure SQL Data Warehouse. Type: string (or Expression with resultType string). - /// The table name of the Azure SQL Data Warehouse. Type: string (or Expression with resultType string). - internal AzureSqlDWTableDataset(string datasetType, string description, DataFactoryElement> structure, DataFactoryElement> schema, DataFactoryLinkedServiceReference linkedServiceName, IDictionary parameters, IList annotations, DatasetFolder folder, IDictionary> additionalProperties, BinaryData tableName, DataFactoryElement schemaTypePropertiesSchema, DataFactoryElement table) : base(datasetType, description, structure, schema, linkedServiceName, parameters, annotations, folder, additionalProperties) - { - TableName = tableName; - SchemaTypePropertiesSchema = schemaTypePropertiesSchema; - Table = table; - DatasetType = datasetType ?? "AzureSqlDWTable"; - } - - /// - /// This property will be retired. Please consider using schema + table properties instead. - /// - /// To assign an object to this property use . - /// - /// - /// To assign an already formated json string to this property use . - /// - /// - /// Examples: - /// - /// - /// BinaryData.FromObjectAsJson("foo") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromString("\"foo\"") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromObjectAsJson(new { key = "value" }) - /// Creates a payload of { "key": "value" }. - /// - /// - /// BinaryData.FromString("{\"key\": \"value\"}") - /// Creates a payload of { "key": "value" }. - /// - /// - /// - /// - public BinaryData TableName { get; set; } - /// The schema name of the Azure SQL Data Warehouse. Type: string (or Expression with resultType string). - public DataFactoryElement SchemaTypePropertiesSchema { get; set; } - /// The table name of the Azure SQL Data Warehouse. Type: string (or Expression with resultType string). - public DataFactoryElement Table { get; set; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/AzureSqlDatabaseLinkedService.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/AzureSqlDatabaseLinkedService.Serialization.cs deleted file mode 100644 index f5402365..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/AzureSqlDatabaseLinkedService.Serialization.cs +++ /dev/null @@ -1,284 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class AzureSqlDatabaseLinkedService : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - writer.WritePropertyName("type"u8); - writer.WriteStringValue(LinkedServiceType); - if (Optional.IsDefined(ConnectVia)) - { - writer.WritePropertyName("connectVia"u8); - writer.WriteObjectValue(ConnectVia); - } - if (Optional.IsDefined(Description)) - { - writer.WritePropertyName("description"u8); - writer.WriteStringValue(Description); - } - if (Optional.IsCollectionDefined(Parameters)) - { - writer.WritePropertyName("parameters"u8); - writer.WriteStartObject(); - foreach (var item in Parameters) - { - writer.WritePropertyName(item.Key); - writer.WriteObjectValue(item.Value); - } - writer.WriteEndObject(); - } - if (Optional.IsCollectionDefined(Annotations)) - { - writer.WritePropertyName("annotations"u8); - writer.WriteStartArray(); - foreach (var item in Annotations) - { - if (item == null) - { - writer.WriteNullValue(); - continue; - } -#if NET6_0_OR_GREATER - writer.WriteRawValue(item); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.ToString()).RootElement); -#endif - } - writer.WriteEndArray(); - } - writer.WritePropertyName("typeProperties"u8); - writer.WriteStartObject(); - writer.WritePropertyName("connectionString"u8); - JsonSerializer.Serialize(writer, ConnectionString); - if (Optional.IsDefined(Password)) - { - writer.WritePropertyName("password"u8); - JsonSerializer.Serialize(writer, Password); - } - if (Optional.IsDefined(ServicePrincipalId)) - { - writer.WritePropertyName("servicePrincipalId"u8); - JsonSerializer.Serialize(writer, ServicePrincipalId); - } - if (Optional.IsDefined(ServicePrincipalKey)) - { - writer.WritePropertyName("servicePrincipalKey"u8); - JsonSerializer.Serialize(writer, ServicePrincipalKey); - } - if (Optional.IsDefined(Tenant)) - { - writer.WritePropertyName("tenant"u8); - JsonSerializer.Serialize(writer, Tenant); - } - if (Optional.IsDefined(AzureCloudType)) - { - writer.WritePropertyName("azureCloudType"u8); - JsonSerializer.Serialize(writer, AzureCloudType); - } - if (Optional.IsDefined(EncryptedCredential)) - { - writer.WritePropertyName("encryptedCredential"u8); - writer.WriteStringValue(EncryptedCredential); - } - if (Optional.IsDefined(AlwaysEncryptedSettings)) - { - writer.WritePropertyName("alwaysEncryptedSettings"u8); - writer.WriteObjectValue(AlwaysEncryptedSettings); - } - if (Optional.IsDefined(Credential)) - { - writer.WritePropertyName("credential"u8); - writer.WriteObjectValue(Credential); - } - writer.WriteEndObject(); - foreach (var item in AdditionalProperties) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.Value.ToString()).RootElement); -#endif - } - writer.WriteEndObject(); - } - - internal static AzureSqlDatabaseLinkedService DeserializeAzureSqlDatabaseLinkedService(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - string type = default; - Optional connectVia = default; - Optional description = default; - Optional> parameters = default; - Optional> annotations = default; - DataFactoryElement connectionString = default; - Optional password = default; - Optional> servicePrincipalId = default; - Optional servicePrincipalKey = default; - Optional> tenant = default; - Optional> azureCloudType = default; - Optional encryptedCredential = default; - Optional alwaysEncryptedSettings = default; - Optional credential = default; - IDictionary> additionalProperties = default; - Dictionary> additionalPropertiesDictionary = new Dictionary>(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("type"u8)) - { - type = property.Value.GetString(); - continue; - } - if (property.NameEquals("connectVia"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - connectVia = IntegrationRuntimeReference.DeserializeIntegrationRuntimeReference(property.Value); - continue; - } - if (property.NameEquals("description"u8)) - { - description = property.Value.GetString(); - continue; - } - if (property.NameEquals("parameters"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - Dictionary dictionary = new Dictionary(); - foreach (var property0 in property.Value.EnumerateObject()) - { - dictionary.Add(property0.Name, EntityParameterSpecification.DeserializeEntityParameterSpecification(property0.Value)); - } - parameters = dictionary; - continue; - } - if (property.NameEquals("annotations"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - if (item.ValueKind == JsonValueKind.Null) - { - array.Add(null); - } - else - { - array.Add(BinaryData.FromString(item.GetRawText())); - } - } - annotations = array; - continue; - } - if (property.NameEquals("typeProperties"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - foreach (var property0 in property.Value.EnumerateObject()) - { - if (property0.NameEquals("connectionString"u8)) - { - connectionString = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("password"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - password = JsonSerializer.Deserialize(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("servicePrincipalId"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - servicePrincipalId = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("servicePrincipalKey"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - servicePrincipalKey = JsonSerializer.Deserialize(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("tenant"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - tenant = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("azureCloudType"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - azureCloudType = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("encryptedCredential"u8)) - { - encryptedCredential = property0.Value.GetString(); - continue; - } - if (property0.NameEquals("alwaysEncryptedSettings"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - alwaysEncryptedSettings = SqlAlwaysEncryptedProperties.DeserializeSqlAlwaysEncryptedProperties(property0.Value); - continue; - } - if (property0.NameEquals("credential"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - credential = DataFactoryCredentialReference.DeserializeDataFactoryCredentialReference(property0.Value); - continue; - } - } - continue; - } - additionalPropertiesDictionary.Add(property.Name, JsonSerializer.Deserialize>(property.Value.GetRawText())); - } - additionalProperties = additionalPropertiesDictionary; - return new AzureSqlDatabaseLinkedService(type, connectVia.Value, description.Value, Optional.ToDictionary(parameters), Optional.ToList(annotations), additionalProperties, connectionString, password, servicePrincipalId.Value, servicePrincipalKey, tenant.Value, azureCloudType.Value, encryptedCredential.Value, alwaysEncryptedSettings.Value, credential.Value); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/AzureSqlDatabaseLinkedService.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/AzureSqlDatabaseLinkedService.cs deleted file mode 100644 index 34b87d85..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/AzureSqlDatabaseLinkedService.cs +++ /dev/null @@ -1,73 +0,0 @@ -// - -#nullable disable - -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// Microsoft Azure SQL Database linked service. - public partial class AzureSqlDatabaseLinkedService : DataFactoryLinkedServiceProperties - { - /// Initializes a new instance of AzureSqlDatabaseLinkedService. - /// The connection string. Type: string, SecureString or AzureKeyVaultSecretReference. - /// is null. - public AzureSqlDatabaseLinkedService(DataFactoryElement connectionString) - { - Argument.AssertNotNull(connectionString, nameof(connectionString)); - - ConnectionString = connectionString; - LinkedServiceType = "AzureSqlDatabase"; - } - - /// Initializes a new instance of AzureSqlDatabaseLinkedService. - /// Type of linked service. - /// The integration runtime reference. - /// Linked service description. - /// Parameters for linked service. - /// List of tags that can be used for describing the linked service. - /// Additional Properties. - /// The connection string. Type: string, SecureString or AzureKeyVaultSecretReference. - /// The Azure key vault secret reference of password in connection string. - /// The ID of the service principal used to authenticate against Azure SQL Database. Type: string (or Expression with resultType string). - /// The key of the service principal used to authenticate against Azure SQL Database. - /// The name or ID of the tenant to which the service principal belongs. Type: string (or Expression with resultType string). - /// Indicates the azure cloud type of the service principle auth. Allowed values are AzurePublic, AzureChina, AzureUsGovernment, AzureGermany. Default value is the data factory regions’ cloud type. Type: string (or Expression with resultType string). - /// The encrypted credential used for authentication. Credentials are encrypted using the integration runtime credential manager. Type: string. - /// Sql always encrypted properties. - /// The credential reference containing authentication information. - internal AzureSqlDatabaseLinkedService(string linkedServiceType, IntegrationRuntimeReference connectVia, string description, IDictionary parameters, IList annotations, IDictionary> additionalProperties, DataFactoryElement connectionString, DataFactoryKeyVaultSecretReference password, DataFactoryElement servicePrincipalId, DataFactorySecretBaseDefinition servicePrincipalKey, DataFactoryElement tenant, DataFactoryElement azureCloudType, string encryptedCredential, SqlAlwaysEncryptedProperties alwaysEncryptedSettings, DataFactoryCredentialReference credential) : base(linkedServiceType, connectVia, description, parameters, annotations, additionalProperties) - { - ConnectionString = connectionString; - Password = password; - ServicePrincipalId = servicePrincipalId; - ServicePrincipalKey = servicePrincipalKey; - Tenant = tenant; - AzureCloudType = azureCloudType; - EncryptedCredential = encryptedCredential; - AlwaysEncryptedSettings = alwaysEncryptedSettings; - Credential = credential; - LinkedServiceType = linkedServiceType ?? "AzureSqlDatabase"; - } - - /// The connection string. Type: string, SecureString or AzureKeyVaultSecretReference. - public DataFactoryElement ConnectionString { get; set; } - /// The Azure key vault secret reference of password in connection string. - public DataFactoryKeyVaultSecretReference Password { get; set; } - /// The ID of the service principal used to authenticate against Azure SQL Database. Type: string (or Expression with resultType string). - public DataFactoryElement ServicePrincipalId { get; set; } - /// The key of the service principal used to authenticate against Azure SQL Database. - public DataFactorySecretBaseDefinition ServicePrincipalKey { get; set; } - /// The name or ID of the tenant to which the service principal belongs. Type: string (or Expression with resultType string). - public DataFactoryElement Tenant { get; set; } - /// Indicates the azure cloud type of the service principle auth. Allowed values are AzurePublic, AzureChina, AzureUsGovernment, AzureGermany. Default value is the data factory regions’ cloud type. Type: string (or Expression with resultType string). - public DataFactoryElement AzureCloudType { get; set; } - /// The encrypted credential used for authentication. Credentials are encrypted using the integration runtime credential manager. Type: string. - public string EncryptedCredential { get; set; } - /// Sql always encrypted properties. - public SqlAlwaysEncryptedProperties AlwaysEncryptedSettings { get; set; } - /// The credential reference containing authentication information. - public DataFactoryCredentialReference Credential { get; set; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/AzureSqlMILinkedService.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/AzureSqlMILinkedService.Serialization.cs deleted file mode 100644 index 7e0feaa5..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/AzureSqlMILinkedService.Serialization.cs +++ /dev/null @@ -1,284 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class AzureSqlMILinkedService : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - writer.WritePropertyName("type"u8); - writer.WriteStringValue(LinkedServiceType); - if (Optional.IsDefined(ConnectVia)) - { - writer.WritePropertyName("connectVia"u8); - writer.WriteObjectValue(ConnectVia); - } - if (Optional.IsDefined(Description)) - { - writer.WritePropertyName("description"u8); - writer.WriteStringValue(Description); - } - if (Optional.IsCollectionDefined(Parameters)) - { - writer.WritePropertyName("parameters"u8); - writer.WriteStartObject(); - foreach (var item in Parameters) - { - writer.WritePropertyName(item.Key); - writer.WriteObjectValue(item.Value); - } - writer.WriteEndObject(); - } - if (Optional.IsCollectionDefined(Annotations)) - { - writer.WritePropertyName("annotations"u8); - writer.WriteStartArray(); - foreach (var item in Annotations) - { - if (item == null) - { - writer.WriteNullValue(); - continue; - } -#if NET6_0_OR_GREATER - writer.WriteRawValue(item); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.ToString()).RootElement); -#endif - } - writer.WriteEndArray(); - } - writer.WritePropertyName("typeProperties"u8); - writer.WriteStartObject(); - writer.WritePropertyName("connectionString"u8); - JsonSerializer.Serialize(writer, ConnectionString); - if (Optional.IsDefined(Password)) - { - writer.WritePropertyName("password"u8); - JsonSerializer.Serialize(writer, Password); - } - if (Optional.IsDefined(ServicePrincipalId)) - { - writer.WritePropertyName("servicePrincipalId"u8); - JsonSerializer.Serialize(writer, ServicePrincipalId); - } - if (Optional.IsDefined(ServicePrincipalKey)) - { - writer.WritePropertyName("servicePrincipalKey"u8); - JsonSerializer.Serialize(writer, ServicePrincipalKey); - } - if (Optional.IsDefined(Tenant)) - { - writer.WritePropertyName("tenant"u8); - JsonSerializer.Serialize(writer, Tenant); - } - if (Optional.IsDefined(AzureCloudType)) - { - writer.WritePropertyName("azureCloudType"u8); - JsonSerializer.Serialize(writer, AzureCloudType); - } - if (Optional.IsDefined(EncryptedCredential)) - { - writer.WritePropertyName("encryptedCredential"u8); - writer.WriteStringValue(EncryptedCredential); - } - if (Optional.IsDefined(AlwaysEncryptedSettings)) - { - writer.WritePropertyName("alwaysEncryptedSettings"u8); - writer.WriteObjectValue(AlwaysEncryptedSettings); - } - if (Optional.IsDefined(Credential)) - { - writer.WritePropertyName("credential"u8); - writer.WriteObjectValue(Credential); - } - writer.WriteEndObject(); - foreach (var item in AdditionalProperties) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.Value.ToString()).RootElement); -#endif - } - writer.WriteEndObject(); - } - - internal static AzureSqlMILinkedService DeserializeAzureSqlMILinkedService(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - string type = default; - Optional connectVia = default; - Optional description = default; - Optional> parameters = default; - Optional> annotations = default; - DataFactoryElement connectionString = default; - Optional password = default; - Optional> servicePrincipalId = default; - Optional servicePrincipalKey = default; - Optional> tenant = default; - Optional> azureCloudType = default; - Optional encryptedCredential = default; - Optional alwaysEncryptedSettings = default; - Optional credential = default; - IDictionary> additionalProperties = default; - Dictionary> additionalPropertiesDictionary = new Dictionary>(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("type"u8)) - { - type = property.Value.GetString(); - continue; - } - if (property.NameEquals("connectVia"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - connectVia = IntegrationRuntimeReference.DeserializeIntegrationRuntimeReference(property.Value); - continue; - } - if (property.NameEquals("description"u8)) - { - description = property.Value.GetString(); - continue; - } - if (property.NameEquals("parameters"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - Dictionary dictionary = new Dictionary(); - foreach (var property0 in property.Value.EnumerateObject()) - { - dictionary.Add(property0.Name, EntityParameterSpecification.DeserializeEntityParameterSpecification(property0.Value)); - } - parameters = dictionary; - continue; - } - if (property.NameEquals("annotations"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - if (item.ValueKind == JsonValueKind.Null) - { - array.Add(null); - } - else - { - array.Add(BinaryData.FromString(item.GetRawText())); - } - } - annotations = array; - continue; - } - if (property.NameEquals("typeProperties"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - foreach (var property0 in property.Value.EnumerateObject()) - { - if (property0.NameEquals("connectionString"u8)) - { - connectionString = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("password"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - password = JsonSerializer.Deserialize(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("servicePrincipalId"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - servicePrincipalId = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("servicePrincipalKey"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - servicePrincipalKey = JsonSerializer.Deserialize(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("tenant"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - tenant = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("azureCloudType"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - azureCloudType = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("encryptedCredential"u8)) - { - encryptedCredential = property0.Value.GetString(); - continue; - } - if (property0.NameEquals("alwaysEncryptedSettings"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - alwaysEncryptedSettings = SqlAlwaysEncryptedProperties.DeserializeSqlAlwaysEncryptedProperties(property0.Value); - continue; - } - if (property0.NameEquals("credential"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - credential = DataFactoryCredentialReference.DeserializeDataFactoryCredentialReference(property0.Value); - continue; - } - } - continue; - } - additionalPropertiesDictionary.Add(property.Name, JsonSerializer.Deserialize>(property.Value.GetRawText())); - } - additionalProperties = additionalPropertiesDictionary; - return new AzureSqlMILinkedService(type, connectVia.Value, description.Value, Optional.ToDictionary(parameters), Optional.ToList(annotations), additionalProperties, connectionString, password, servicePrincipalId.Value, servicePrincipalKey, tenant.Value, azureCloudType.Value, encryptedCredential.Value, alwaysEncryptedSettings.Value, credential.Value); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/AzureSqlMILinkedService.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/AzureSqlMILinkedService.cs deleted file mode 100644 index 6c4a44d4..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/AzureSqlMILinkedService.cs +++ /dev/null @@ -1,73 +0,0 @@ -// - -#nullable disable - -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// Azure SQL Managed Instance linked service. - public partial class AzureSqlMILinkedService : DataFactoryLinkedServiceProperties - { - /// Initializes a new instance of AzureSqlMILinkedService. - /// The connection string. Type: string, SecureString or AzureKeyVaultSecretReference. - /// is null. - public AzureSqlMILinkedService(DataFactoryElement connectionString) - { - Argument.AssertNotNull(connectionString, nameof(connectionString)); - - ConnectionString = connectionString; - LinkedServiceType = "AzureSqlMI"; - } - - /// Initializes a new instance of AzureSqlMILinkedService. - /// Type of linked service. - /// The integration runtime reference. - /// Linked service description. - /// Parameters for linked service. - /// List of tags that can be used for describing the linked service. - /// Additional Properties. - /// The connection string. Type: string, SecureString or AzureKeyVaultSecretReference. - /// The Azure key vault secret reference of password in connection string. - /// The ID of the service principal used to authenticate against Azure SQL Managed Instance. Type: string (or Expression with resultType string). - /// The key of the service principal used to authenticate against Azure SQL Managed Instance. - /// The name or ID of the tenant to which the service principal belongs. Type: string (or Expression with resultType string). - /// Indicates the azure cloud type of the service principle auth. Allowed values are AzurePublic, AzureChina, AzureUsGovernment, AzureGermany. Default value is the data factory regions’ cloud type. Type: string (or Expression with resultType string). - /// The encrypted credential used for authentication. Credentials are encrypted using the integration runtime credential manager. Type: string. - /// Sql always encrypted properties. - /// The credential reference containing authentication information. - internal AzureSqlMILinkedService(string linkedServiceType, IntegrationRuntimeReference connectVia, string description, IDictionary parameters, IList annotations, IDictionary> additionalProperties, DataFactoryElement connectionString, DataFactoryKeyVaultSecretReference password, DataFactoryElement servicePrincipalId, DataFactorySecretBaseDefinition servicePrincipalKey, DataFactoryElement tenant, DataFactoryElement azureCloudType, string encryptedCredential, SqlAlwaysEncryptedProperties alwaysEncryptedSettings, DataFactoryCredentialReference credential) : base(linkedServiceType, connectVia, description, parameters, annotations, additionalProperties) - { - ConnectionString = connectionString; - Password = password; - ServicePrincipalId = servicePrincipalId; - ServicePrincipalKey = servicePrincipalKey; - Tenant = tenant; - AzureCloudType = azureCloudType; - EncryptedCredential = encryptedCredential; - AlwaysEncryptedSettings = alwaysEncryptedSettings; - Credential = credential; - LinkedServiceType = linkedServiceType ?? "AzureSqlMI"; - } - - /// The connection string. Type: string, SecureString or AzureKeyVaultSecretReference. - public DataFactoryElement ConnectionString { get; set; } - /// The Azure key vault secret reference of password in connection string. - public DataFactoryKeyVaultSecretReference Password { get; set; } - /// The ID of the service principal used to authenticate against Azure SQL Managed Instance. Type: string (or Expression with resultType string). - public DataFactoryElement ServicePrincipalId { get; set; } - /// The key of the service principal used to authenticate against Azure SQL Managed Instance. - public DataFactorySecretBaseDefinition ServicePrincipalKey { get; set; } - /// The name or ID of the tenant to which the service principal belongs. Type: string (or Expression with resultType string). - public DataFactoryElement Tenant { get; set; } - /// Indicates the azure cloud type of the service principle auth. Allowed values are AzurePublic, AzureChina, AzureUsGovernment, AzureGermany. Default value is the data factory regions’ cloud type. Type: string (or Expression with resultType string). - public DataFactoryElement AzureCloudType { get; set; } - /// The encrypted credential used for authentication. Credentials are encrypted using the integration runtime credential manager. Type: string. - public string EncryptedCredential { get; set; } - /// Sql always encrypted properties. - public SqlAlwaysEncryptedProperties AlwaysEncryptedSettings { get; set; } - /// The credential reference containing authentication information. - public DataFactoryCredentialReference Credential { get; set; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/AzureSqlMITableDataset.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/AzureSqlMITableDataset.Serialization.cs deleted file mode 100644 index 00a2baae..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/AzureSqlMITableDataset.Serialization.cs +++ /dev/null @@ -1,246 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class AzureSqlMITableDataset : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - writer.WritePropertyName("type"u8); - writer.WriteStringValue(DatasetType); - if (Optional.IsDefined(Description)) - { - writer.WritePropertyName("description"u8); - writer.WriteStringValue(Description); - } - if (Optional.IsDefined(Structure)) - { - writer.WritePropertyName("structure"u8); - JsonSerializer.Serialize(writer, Structure); - } - if (Optional.IsDefined(Schema)) - { - writer.WritePropertyName("schema"u8); - JsonSerializer.Serialize(writer, Schema); - } - writer.WritePropertyName("linkedServiceName"u8); - JsonSerializer.Serialize(writer, LinkedServiceName); if (Optional.IsCollectionDefined(Parameters)) - { - writer.WritePropertyName("parameters"u8); - writer.WriteStartObject(); - foreach (var item in Parameters) - { - writer.WritePropertyName(item.Key); - writer.WriteObjectValue(item.Value); - } - writer.WriteEndObject(); - } - if (Optional.IsCollectionDefined(Annotations)) - { - writer.WritePropertyName("annotations"u8); - writer.WriteStartArray(); - foreach (var item in Annotations) - { - if (item == null) - { - writer.WriteNullValue(); - continue; - } -#if NET6_0_OR_GREATER - writer.WriteRawValue(item); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.ToString()).RootElement); -#endif - } - writer.WriteEndArray(); - } - if (Optional.IsDefined(Folder)) - { - writer.WritePropertyName("folder"u8); - writer.WriteObjectValue(Folder); - } - writer.WritePropertyName("typeProperties"u8); - writer.WriteStartObject(); - if (Optional.IsDefined(TableName)) - { - writer.WritePropertyName("tableName"u8); -#if NET6_0_OR_GREATER - writer.WriteRawValue(TableName); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(TableName.ToString()).RootElement); -#endif - } - if (Optional.IsDefined(SchemaTypePropertiesSchema)) - { - writer.WritePropertyName("schema"u8); - JsonSerializer.Serialize(writer, SchemaTypePropertiesSchema); - } - if (Optional.IsDefined(Table)) - { - writer.WritePropertyName("table"u8); - JsonSerializer.Serialize(writer, Table); - } - writer.WriteEndObject(); - foreach (var item in AdditionalProperties) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.Value.ToString()).RootElement); -#endif - } - writer.WriteEndObject(); - } - - internal static AzureSqlMITableDataset DeserializeAzureSqlMITableDataset(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - string type = default; - Optional description = default; - Optional>> structure = default; - Optional>> schema = default; - DataFactoryLinkedServiceReference linkedServiceName = default; - Optional> parameters = default; - Optional> annotations = default; - Optional folder = default; - Optional tableName = default; - Optional> schema0 = default; - Optional> table = default; - IDictionary> additionalProperties = default; - Dictionary> additionalPropertiesDictionary = new Dictionary>(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("type"u8)) - { - type = property.Value.GetString(); - continue; - } - if (property.NameEquals("description"u8)) - { - description = property.Value.GetString(); - continue; - } - if (property.NameEquals("structure"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - structure = JsonSerializer.Deserialize>>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("schema"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - schema = JsonSerializer.Deserialize>>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("linkedServiceName"u8)) - { - linkedServiceName = JsonSerializer.Deserialize(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("parameters"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - Dictionary dictionary = new Dictionary(); - foreach (var property0 in property.Value.EnumerateObject()) - { - dictionary.Add(property0.Name, EntityParameterSpecification.DeserializeEntityParameterSpecification(property0.Value)); - } - parameters = dictionary; - continue; - } - if (property.NameEquals("annotations"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - if (item.ValueKind == JsonValueKind.Null) - { - array.Add(null); - } - else - { - array.Add(BinaryData.FromString(item.GetRawText())); - } - } - annotations = array; - continue; - } - if (property.NameEquals("folder"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - folder = DatasetFolder.DeserializeDatasetFolder(property.Value); - continue; - } - if (property.NameEquals("typeProperties"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - foreach (var property0 in property.Value.EnumerateObject()) - { - if (property0.NameEquals("tableName"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - tableName = BinaryData.FromString(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("schema"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - schema0 = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("table"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - table = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - } - continue; - } - additionalPropertiesDictionary.Add(property.Name, JsonSerializer.Deserialize>(property.Value.GetRawText())); - } - additionalProperties = additionalPropertiesDictionary; - return new AzureSqlMITableDataset(type, description.Value, structure.Value, schema.Value, linkedServiceName, Optional.ToDictionary(parameters), Optional.ToList(annotations), folder.Value, additionalProperties, tableName.Value, schema0.Value, table.Value); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/AzureSqlMITableDataset.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/AzureSqlMITableDataset.cs deleted file mode 100644 index 47d3895b..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/AzureSqlMITableDataset.cs +++ /dev/null @@ -1,80 +0,0 @@ -// - -#nullable disable - -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// The Azure SQL Managed Instance dataset. - public partial class AzureSqlMITableDataset : DataFactoryDatasetProperties - { - /// Initializes a new instance of AzureSqlMITableDataset. - /// Linked service reference. - /// is null. - public AzureSqlMITableDataset(DataFactoryLinkedServiceReference linkedServiceName) : base(linkedServiceName) - { - Argument.AssertNotNull(linkedServiceName, nameof(linkedServiceName)); - - DatasetType = "AzureSqlMITable"; - } - - /// Initializes a new instance of AzureSqlMITableDataset. - /// Type of dataset. - /// Dataset description. - /// Columns that define the structure of the dataset. Type: array (or Expression with resultType array), itemType: DatasetDataElement. - /// Columns that define the physical type schema of the dataset. Type: array (or Expression with resultType array), itemType: DatasetSchemaDataElement. - /// Linked service reference. - /// Parameters for dataset. - /// List of tags that can be used for describing the Dataset. - /// The folder that this Dataset is in. If not specified, Dataset will appear at the root level. - /// Additional Properties. - /// This property will be retired. Please consider using schema + table properties instead. - /// The schema name of the Azure SQL Managed Instance. Type: string (or Expression with resultType string). - /// The table name of the Azure SQL Managed Instance dataset. Type: string (or Expression with resultType string). - internal AzureSqlMITableDataset(string datasetType, string description, DataFactoryElement> structure, DataFactoryElement> schema, DataFactoryLinkedServiceReference linkedServiceName, IDictionary parameters, IList annotations, DatasetFolder folder, IDictionary> additionalProperties, BinaryData tableName, DataFactoryElement schemaTypePropertiesSchema, DataFactoryElement table) : base(datasetType, description, structure, schema, linkedServiceName, parameters, annotations, folder, additionalProperties) - { - TableName = tableName; - SchemaTypePropertiesSchema = schemaTypePropertiesSchema; - Table = table; - DatasetType = datasetType ?? "AzureSqlMITable"; - } - - /// - /// This property will be retired. Please consider using schema + table properties instead. - /// - /// To assign an object to this property use . - /// - /// - /// To assign an already formated json string to this property use . - /// - /// - /// Examples: - /// - /// - /// BinaryData.FromObjectAsJson("foo") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromString("\"foo\"") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromObjectAsJson(new { key = "value" }) - /// Creates a payload of { "key": "value" }. - /// - /// - /// BinaryData.FromString("{\"key\": \"value\"}") - /// Creates a payload of { "key": "value" }. - /// - /// - /// - /// - public BinaryData TableName { get; set; } - /// The schema name of the Azure SQL Managed Instance. Type: string (or Expression with resultType string). - public DataFactoryElement SchemaTypePropertiesSchema { get; set; } - /// The table name of the Azure SQL Managed Instance dataset. Type: string (or Expression with resultType string). - public DataFactoryElement Table { get; set; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/AzureSqlSink.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/AzureSqlSink.Serialization.cs deleted file mode 100644 index 96ddf720..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/AzureSqlSink.Serialization.cs +++ /dev/null @@ -1,285 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class AzureSqlSink : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - if (Optional.IsDefined(SqlWriterStoredProcedureName)) - { - writer.WritePropertyName("sqlWriterStoredProcedureName"u8); - JsonSerializer.Serialize(writer, SqlWriterStoredProcedureName); - } - if (Optional.IsDefined(SqlWriterTableType)) - { - writer.WritePropertyName("sqlWriterTableType"u8); - JsonSerializer.Serialize(writer, SqlWriterTableType); - } - if (Optional.IsDefined(PreCopyScript)) - { - writer.WritePropertyName("preCopyScript"u8); - JsonSerializer.Serialize(writer, PreCopyScript); - } - if (Optional.IsDefined(StoredProcedureParameters)) - { - writer.WritePropertyName("storedProcedureParameters"u8); -#if NET6_0_OR_GREATER - writer.WriteRawValue(StoredProcedureParameters); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(StoredProcedureParameters.ToString()).RootElement); -#endif - } - if (Optional.IsDefined(StoredProcedureTableTypeParameterName)) - { - writer.WritePropertyName("storedProcedureTableTypeParameterName"u8); - JsonSerializer.Serialize(writer, StoredProcedureTableTypeParameterName); - } - if (Optional.IsDefined(TableOption)) - { - writer.WritePropertyName("tableOption"u8); - JsonSerializer.Serialize(writer, TableOption); - } - if (Optional.IsDefined(SqlWriterUseTableLock)) - { - writer.WritePropertyName("sqlWriterUseTableLock"u8); - JsonSerializer.Serialize(writer, SqlWriterUseTableLock); - } - if (Optional.IsDefined(WriteBehavior)) - { - writer.WritePropertyName("writeBehavior"u8); -#if NET6_0_OR_GREATER - writer.WriteRawValue(WriteBehavior); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(WriteBehavior.ToString()).RootElement); -#endif - } - if (Optional.IsDefined(UpsertSettings)) - { - writer.WritePropertyName("upsertSettings"u8); - writer.WriteObjectValue(UpsertSettings); - } - writer.WritePropertyName("type"u8); - writer.WriteStringValue(CopySinkType); - if (Optional.IsDefined(WriteBatchSize)) - { - writer.WritePropertyName("writeBatchSize"u8); - JsonSerializer.Serialize(writer, WriteBatchSize); - } - if (Optional.IsDefined(WriteBatchTimeout)) - { - writer.WritePropertyName("writeBatchTimeout"u8); - JsonSerializer.Serialize(writer, WriteBatchTimeout); - } - if (Optional.IsDefined(SinkRetryCount)) - { - writer.WritePropertyName("sinkRetryCount"u8); - JsonSerializer.Serialize(writer, SinkRetryCount); - } - if (Optional.IsDefined(SinkRetryWait)) - { - writer.WritePropertyName("sinkRetryWait"u8); - JsonSerializer.Serialize(writer, SinkRetryWait); - } - if (Optional.IsDefined(MaxConcurrentConnections)) - { - writer.WritePropertyName("maxConcurrentConnections"u8); - JsonSerializer.Serialize(writer, MaxConcurrentConnections); - } - if (Optional.IsDefined(DisableMetricsCollection)) - { - writer.WritePropertyName("disableMetricsCollection"u8); - JsonSerializer.Serialize(writer, DisableMetricsCollection); - } - foreach (var item in AdditionalProperties) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.Value.ToString()).RootElement); -#endif - } - writer.WriteEndObject(); - } - - internal static AzureSqlSink DeserializeAzureSqlSink(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - Optional> sqlWriterStoredProcedureName = default; - Optional> sqlWriterTableType = default; - Optional> preCopyScript = default; - Optional storedProcedureParameters = default; - Optional> storedProcedureTableTypeParameterName = default; - Optional> tableOption = default; - Optional> sqlWriterUseTableLock = default; - Optional writeBehavior = default; - Optional upsertSettings = default; - string type = default; - Optional> writeBatchSize = default; - Optional> writeBatchTimeout = default; - Optional> sinkRetryCount = default; - Optional> sinkRetryWait = default; - Optional> maxConcurrentConnections = default; - Optional> disableMetricsCollection = default; - IDictionary> additionalProperties = default; - Dictionary> additionalPropertiesDictionary = new Dictionary>(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("sqlWriterStoredProcedureName"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - sqlWriterStoredProcedureName = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("sqlWriterTableType"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - sqlWriterTableType = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("preCopyScript"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - preCopyScript = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("storedProcedureParameters"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - storedProcedureParameters = BinaryData.FromString(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("storedProcedureTableTypeParameterName"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - storedProcedureTableTypeParameterName = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("tableOption"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - tableOption = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("sqlWriterUseTableLock"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - sqlWriterUseTableLock = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("writeBehavior"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - writeBehavior = BinaryData.FromString(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("upsertSettings"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - upsertSettings = SqlUpsertSettings.DeserializeSqlUpsertSettings(property.Value); - continue; - } - if (property.NameEquals("type"u8)) - { - type = property.Value.GetString(); - continue; - } - if (property.NameEquals("writeBatchSize"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - writeBatchSize = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("writeBatchTimeout"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - writeBatchTimeout = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("sinkRetryCount"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - sinkRetryCount = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("sinkRetryWait"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - sinkRetryWait = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("maxConcurrentConnections"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - maxConcurrentConnections = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("disableMetricsCollection"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - disableMetricsCollection = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - additionalPropertiesDictionary.Add(property.Name, JsonSerializer.Deserialize>(property.Value.GetRawText())); - } - additionalProperties = additionalPropertiesDictionary; - return new AzureSqlSink(type, writeBatchSize.Value, writeBatchTimeout.Value, sinkRetryCount.Value, sinkRetryWait.Value, maxConcurrentConnections.Value, disableMetricsCollection.Value, additionalProperties, sqlWriterStoredProcedureName.Value, sqlWriterTableType.Value, preCopyScript.Value, storedProcedureParameters.Value, storedProcedureTableTypeParameterName.Value, tableOption.Value, sqlWriterUseTableLock.Value, writeBehavior.Value, upsertSettings.Value); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/AzureSqlSink.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/AzureSqlSink.cs deleted file mode 100644 index 73605dd1..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/AzureSqlSink.cs +++ /dev/null @@ -1,127 +0,0 @@ -// - -#nullable disable - -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// A copy activity Azure SQL sink. - public partial class AzureSqlSink : CopySink - { - /// Initializes a new instance of AzureSqlSink. - public AzureSqlSink() - { - CopySinkType = "AzureSqlSink"; - } - - /// Initializes a new instance of AzureSqlSink. - /// Copy sink type. - /// Write batch size. Type: integer (or Expression with resultType integer), minimum: 0. - /// Write batch timeout. Type: string (or Expression with resultType string), pattern: ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). - /// Sink retry count. Type: integer (or Expression with resultType integer). - /// Sink retry wait. Type: string (or Expression with resultType string), pattern: ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). - /// The maximum concurrent connection count for the sink data store. Type: integer (or Expression with resultType integer). - /// If true, disable data store metrics collection. Default is false. Type: boolean (or Expression with resultType boolean). - /// Additional Properties. - /// SQL writer stored procedure name. Type: string (or Expression with resultType string). - /// SQL writer table type. Type: string (or Expression with resultType string). - /// SQL pre-copy script. Type: string (or Expression with resultType string). - /// SQL stored procedure parameters. - /// The stored procedure parameter name of the table type. Type: string (or Expression with resultType string). - /// The option to handle sink table, such as autoCreate. For now only 'autoCreate' value is supported. Type: string (or Expression with resultType string). - /// Whether to use table lock during bulk copy. Type: boolean (or Expression with resultType boolean). - /// Write behavior when copying data into Azure SQL. Type: SqlWriteBehaviorEnum (or Expression with resultType SqlWriteBehaviorEnum). - /// SQL upsert settings. - internal AzureSqlSink(string copySinkType, DataFactoryElement writeBatchSize, DataFactoryElement writeBatchTimeout, DataFactoryElement sinkRetryCount, DataFactoryElement sinkRetryWait, DataFactoryElement maxConcurrentConnections, DataFactoryElement disableMetricsCollection, IDictionary> additionalProperties, DataFactoryElement sqlWriterStoredProcedureName, DataFactoryElement sqlWriterTableType, DataFactoryElement preCopyScript, BinaryData storedProcedureParameters, DataFactoryElement storedProcedureTableTypeParameterName, DataFactoryElement tableOption, DataFactoryElement sqlWriterUseTableLock, BinaryData writeBehavior, SqlUpsertSettings upsertSettings) : base(copySinkType, writeBatchSize, writeBatchTimeout, sinkRetryCount, sinkRetryWait, maxConcurrentConnections, disableMetricsCollection, additionalProperties) - { - SqlWriterStoredProcedureName = sqlWriterStoredProcedureName; - SqlWriterTableType = sqlWriterTableType; - PreCopyScript = preCopyScript; - StoredProcedureParameters = storedProcedureParameters; - StoredProcedureTableTypeParameterName = storedProcedureTableTypeParameterName; - TableOption = tableOption; - SqlWriterUseTableLock = sqlWriterUseTableLock; - WriteBehavior = writeBehavior; - UpsertSettings = upsertSettings; - CopySinkType = copySinkType ?? "AzureSqlSink"; - } - - /// SQL writer stored procedure name. Type: string (or Expression with resultType string). - public DataFactoryElement SqlWriterStoredProcedureName { get; set; } - /// SQL writer table type. Type: string (or Expression with resultType string). - public DataFactoryElement SqlWriterTableType { get; set; } - /// SQL pre-copy script. Type: string (or Expression with resultType string). - public DataFactoryElement PreCopyScript { get; set; } - /// - /// SQL stored procedure parameters. - /// - /// To assign an object to this property use . - /// - /// - /// To assign an already formated json string to this property use . - /// - /// - /// Examples: - /// - /// - /// BinaryData.FromObjectAsJson("foo") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromString("\"foo\"") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromObjectAsJson(new { key = "value" }) - /// Creates a payload of { "key": "value" }. - /// - /// - /// BinaryData.FromString("{\"key\": \"value\"}") - /// Creates a payload of { "key": "value" }. - /// - /// - /// - /// - public BinaryData StoredProcedureParameters { get; set; } - /// The stored procedure parameter name of the table type. Type: string (or Expression with resultType string). - public DataFactoryElement StoredProcedureTableTypeParameterName { get; set; } - /// The option to handle sink table, such as autoCreate. For now only 'autoCreate' value is supported. Type: string (or Expression with resultType string). - public DataFactoryElement TableOption { get; set; } - /// Whether to use table lock during bulk copy. Type: boolean (or Expression with resultType boolean). - public DataFactoryElement SqlWriterUseTableLock { get; set; } - /// - /// Write behavior when copying data into Azure SQL. Type: SqlWriteBehaviorEnum (or Expression with resultType SqlWriteBehaviorEnum) - /// - /// To assign an object to this property use . - /// - /// - /// To assign an already formated json string to this property use . - /// - /// - /// Examples: - /// - /// - /// BinaryData.FromObjectAsJson("foo") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromString("\"foo\"") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromObjectAsJson(new { key = "value" }) - /// Creates a payload of { "key": "value" }. - /// - /// - /// BinaryData.FromString("{\"key\": \"value\"}") - /// Creates a payload of { "key": "value" }. - /// - /// - /// - /// - public BinaryData WriteBehavior { get; set; } - /// SQL upsert settings. - public SqlUpsertSettings UpsertSettings { get; set; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/AzureSqlSource.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/AzureSqlSource.Serialization.cs deleted file mode 100644 index 10ed3016..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/AzureSqlSource.Serialization.cs +++ /dev/null @@ -1,263 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class AzureSqlSource : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - if (Optional.IsDefined(SqlReaderQuery)) - { - writer.WritePropertyName("sqlReaderQuery"u8); - JsonSerializer.Serialize(writer, SqlReaderQuery); - } - if (Optional.IsDefined(SqlReaderStoredProcedureName)) - { - writer.WritePropertyName("sqlReaderStoredProcedureName"u8); - JsonSerializer.Serialize(writer, SqlReaderStoredProcedureName); - } - if (Optional.IsDefined(StoredProcedureParameters)) - { - writer.WritePropertyName("storedProcedureParameters"u8); -#if NET6_0_OR_GREATER - writer.WriteRawValue(StoredProcedureParameters); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(StoredProcedureParameters.ToString()).RootElement); -#endif - } - if (Optional.IsDefined(IsolationLevel)) - { - writer.WritePropertyName("isolationLevel"u8); - JsonSerializer.Serialize(writer, IsolationLevel); - } - if (Optional.IsDefined(ProduceAdditionalTypes)) - { - writer.WritePropertyName("produceAdditionalTypes"u8); -#if NET6_0_OR_GREATER - writer.WriteRawValue(ProduceAdditionalTypes); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(ProduceAdditionalTypes.ToString()).RootElement); -#endif - } - if (Optional.IsDefined(PartitionOption)) - { - writer.WritePropertyName("partitionOption"u8); -#if NET6_0_OR_GREATER - writer.WriteRawValue(PartitionOption); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(PartitionOption.ToString()).RootElement); -#endif - } - if (Optional.IsDefined(PartitionSettings)) - { - writer.WritePropertyName("partitionSettings"u8); - writer.WriteObjectValue(PartitionSettings); - } - if (Optional.IsDefined(QueryTimeout)) - { - writer.WritePropertyName("queryTimeout"u8); - JsonSerializer.Serialize(writer, QueryTimeout); - } - if (Optional.IsDefined(AdditionalColumns)) - { - writer.WritePropertyName("additionalColumns"u8); -#if NET6_0_OR_GREATER - writer.WriteRawValue(AdditionalColumns); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(AdditionalColumns.ToString()).RootElement); -#endif - } - writer.WritePropertyName("type"u8); - writer.WriteStringValue(CopySourceType); - if (Optional.IsDefined(SourceRetryCount)) - { - writer.WritePropertyName("sourceRetryCount"u8); - JsonSerializer.Serialize(writer, SourceRetryCount); - } - if (Optional.IsDefined(SourceRetryWait)) - { - writer.WritePropertyName("sourceRetryWait"u8); - JsonSerializer.Serialize(writer, SourceRetryWait); - } - if (Optional.IsDefined(MaxConcurrentConnections)) - { - writer.WritePropertyName("maxConcurrentConnections"u8); - JsonSerializer.Serialize(writer, MaxConcurrentConnections); - } - if (Optional.IsDefined(DisableMetricsCollection)) - { - writer.WritePropertyName("disableMetricsCollection"u8); - JsonSerializer.Serialize(writer, DisableMetricsCollection); - } - foreach (var item in AdditionalProperties) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.Value.ToString()).RootElement); -#endif - } - writer.WriteEndObject(); - } - - internal static AzureSqlSource DeserializeAzureSqlSource(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - Optional> sqlReaderQuery = default; - Optional> sqlReaderStoredProcedureName = default; - Optional storedProcedureParameters = default; - Optional> isolationLevel = default; - Optional produceAdditionalTypes = default; - Optional partitionOption = default; - Optional partitionSettings = default; - Optional> queryTimeout = default; - Optional additionalColumns = default; - string type = default; - Optional> sourceRetryCount = default; - Optional> sourceRetryWait = default; - Optional> maxConcurrentConnections = default; - Optional> disableMetricsCollection = default; - IDictionary> additionalProperties = default; - Dictionary> additionalPropertiesDictionary = new Dictionary>(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("sqlReaderQuery"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - sqlReaderQuery = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("sqlReaderStoredProcedureName"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - sqlReaderStoredProcedureName = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("storedProcedureParameters"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - storedProcedureParameters = BinaryData.FromString(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("isolationLevel"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - isolationLevel = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("produceAdditionalTypes"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - produceAdditionalTypes = BinaryData.FromString(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("partitionOption"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - partitionOption = BinaryData.FromString(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("partitionSettings"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - partitionSettings = SqlPartitionSettings.DeserializeSqlPartitionSettings(property.Value); - continue; - } - if (property.NameEquals("queryTimeout"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - queryTimeout = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("additionalColumns"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - additionalColumns = BinaryData.FromString(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("type"u8)) - { - type = property.Value.GetString(); - continue; - } - if (property.NameEquals("sourceRetryCount"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - sourceRetryCount = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("sourceRetryWait"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - sourceRetryWait = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("maxConcurrentConnections"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - maxConcurrentConnections = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("disableMetricsCollection"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - disableMetricsCollection = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - additionalPropertiesDictionary.Add(property.Name, JsonSerializer.Deserialize>(property.Value.GetRawText())); - } - additionalProperties = additionalPropertiesDictionary; - return new AzureSqlSource(type, sourceRetryCount.Value, sourceRetryWait.Value, maxConcurrentConnections.Value, disableMetricsCollection.Value, additionalProperties, queryTimeout.Value, additionalColumns.Value, sqlReaderQuery.Value, sqlReaderStoredProcedureName.Value, storedProcedureParameters.Value, isolationLevel.Value, produceAdditionalTypes.Value, partitionOption.Value, partitionSettings.Value); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/AzureSqlSource.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/AzureSqlSource.cs deleted file mode 100644 index faa38204..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/AzureSqlSource.cs +++ /dev/null @@ -1,148 +0,0 @@ -// - -#nullable disable - -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// A copy activity Azure SQL source. - public partial class AzureSqlSource : TabularSource - { - /// Initializes a new instance of AzureSqlSource. - public AzureSqlSource() - { - CopySourceType = "AzureSqlSource"; - } - - /// Initializes a new instance of AzureSqlSource. - /// Copy source type. - /// Source retry count. Type: integer (or Expression with resultType integer). - /// Source retry wait. Type: string (or Expression with resultType string), pattern: ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). - /// The maximum concurrent connection count for the source data store. Type: integer (or Expression with resultType integer). - /// If true, disable data store metrics collection. Default is false. Type: boolean (or Expression with resultType boolean). - /// Additional Properties. - /// 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). - /// SQL reader query. Type: string (or Expression with resultType string). - /// Name of the stored procedure for a SQL Database source. This cannot be used at the same time as SqlReaderQuery. Type: string (or Expression with resultType string). - /// Value and type setting for stored procedure parameters. Example: "{Parameter1: {value: "1", type: "int"}}". - /// Specifies the transaction locking behavior for the SQL source. Allowed values: ReadCommitted/ReadUncommitted/RepeatableRead/Serializable/Snapshot. The default value is ReadCommitted. Type: string (or Expression with resultType string). - /// Which additional types to produce. - /// The partition mechanism that will be used for Sql read in parallel. Possible values include: "None", "PhysicalPartitionsOfTable", "DynamicRange". - /// The settings that will be leveraged for Sql source partitioning. - internal AzureSqlSource(string copySourceType, DataFactoryElement sourceRetryCount, DataFactoryElement sourceRetryWait, DataFactoryElement maxConcurrentConnections, DataFactoryElement disableMetricsCollection, IDictionary> additionalProperties, DataFactoryElement queryTimeout, BinaryData additionalColumns, DataFactoryElement sqlReaderQuery, DataFactoryElement sqlReaderStoredProcedureName, BinaryData storedProcedureParameters, DataFactoryElement isolationLevel, BinaryData produceAdditionalTypes, BinaryData partitionOption, SqlPartitionSettings partitionSettings) : base(copySourceType, sourceRetryCount, sourceRetryWait, maxConcurrentConnections, disableMetricsCollection, additionalProperties, queryTimeout, additionalColumns) - { - SqlReaderQuery = sqlReaderQuery; - SqlReaderStoredProcedureName = sqlReaderStoredProcedureName; - StoredProcedureParameters = storedProcedureParameters; - IsolationLevel = isolationLevel; - ProduceAdditionalTypes = produceAdditionalTypes; - PartitionOption = partitionOption; - PartitionSettings = partitionSettings; - CopySourceType = copySourceType ?? "AzureSqlSource"; - } - - /// SQL reader query. Type: string (or Expression with resultType string). - public DataFactoryElement SqlReaderQuery { get; set; } - /// Name of the stored procedure for a SQL Database source. This cannot be used at the same time as SqlReaderQuery. Type: string (or Expression with resultType string). - public DataFactoryElement SqlReaderStoredProcedureName { get; set; } - /// - /// Value and type setting for stored procedure parameters. Example: "{Parameter1: {value: "1", type: "int"}}". - /// - /// To assign an object to this property use . - /// - /// - /// To assign an already formated json string to this property use . - /// - /// - /// Examples: - /// - /// - /// BinaryData.FromObjectAsJson("foo") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromString("\"foo\"") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromObjectAsJson(new { key = "value" }) - /// Creates a payload of { "key": "value" }. - /// - /// - /// BinaryData.FromString("{\"key\": \"value\"}") - /// Creates a payload of { "key": "value" }. - /// - /// - /// - /// - public BinaryData StoredProcedureParameters { get; set; } - /// Specifies the transaction locking behavior for the SQL source. Allowed values: ReadCommitted/ReadUncommitted/RepeatableRead/Serializable/Snapshot. The default value is ReadCommitted. Type: string (or Expression with resultType string). - public DataFactoryElement IsolationLevel { get; set; } - /// - /// Which additional types to produce. - /// - /// To assign an object to this property use . - /// - /// - /// To assign an already formated json string to this property use . - /// - /// - /// Examples: - /// - /// - /// BinaryData.FromObjectAsJson("foo") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromString("\"foo\"") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromObjectAsJson(new { key = "value" }) - /// Creates a payload of { "key": "value" }. - /// - /// - /// BinaryData.FromString("{\"key\": \"value\"}") - /// Creates a payload of { "key": "value" }. - /// - /// - /// - /// - public BinaryData ProduceAdditionalTypes { get; set; } - /// - /// The partition mechanism that will be used for Sql read in parallel. Possible values include: "None", "PhysicalPartitionsOfTable", "DynamicRange". - /// - /// To assign an object to this property use . - /// - /// - /// To assign an already formated json string to this property use . - /// - /// - /// Examples: - /// - /// - /// BinaryData.FromObjectAsJson("foo") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromString("\"foo\"") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromObjectAsJson(new { key = "value" }) - /// Creates a payload of { "key": "value" }. - /// - /// - /// BinaryData.FromString("{\"key\": \"value\"}") - /// Creates a payload of { "key": "value" }. - /// - /// - /// - /// - public BinaryData PartitionOption { get; set; } - /// The settings that will be leveraged for Sql source partitioning. - public SqlPartitionSettings PartitionSettings { get; set; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/AzureSqlTableDataset.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/AzureSqlTableDataset.Serialization.cs deleted file mode 100644 index 00cafee2..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/AzureSqlTableDataset.Serialization.cs +++ /dev/null @@ -1,246 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class AzureSqlTableDataset : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - writer.WritePropertyName("type"u8); - writer.WriteStringValue(DatasetType); - if (Optional.IsDefined(Description)) - { - writer.WritePropertyName("description"u8); - writer.WriteStringValue(Description); - } - if (Optional.IsDefined(Structure)) - { - writer.WritePropertyName("structure"u8); - JsonSerializer.Serialize(writer, Structure); - } - if (Optional.IsDefined(Schema)) - { - writer.WritePropertyName("schema"u8); - JsonSerializer.Serialize(writer, Schema); - } - writer.WritePropertyName("linkedServiceName"u8); - JsonSerializer.Serialize(writer, LinkedServiceName); if (Optional.IsCollectionDefined(Parameters)) - { - writer.WritePropertyName("parameters"u8); - writer.WriteStartObject(); - foreach (var item in Parameters) - { - writer.WritePropertyName(item.Key); - writer.WriteObjectValue(item.Value); - } - writer.WriteEndObject(); - } - if (Optional.IsCollectionDefined(Annotations)) - { - writer.WritePropertyName("annotations"u8); - writer.WriteStartArray(); - foreach (var item in Annotations) - { - if (item == null) - { - writer.WriteNullValue(); - continue; - } -#if NET6_0_OR_GREATER - writer.WriteRawValue(item); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.ToString()).RootElement); -#endif - } - writer.WriteEndArray(); - } - if (Optional.IsDefined(Folder)) - { - writer.WritePropertyName("folder"u8); - writer.WriteObjectValue(Folder); - } - writer.WritePropertyName("typeProperties"u8); - writer.WriteStartObject(); - if (Optional.IsDefined(TableName)) - { - writer.WritePropertyName("tableName"u8); -#if NET6_0_OR_GREATER - writer.WriteRawValue(TableName); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(TableName.ToString()).RootElement); -#endif - } - if (Optional.IsDefined(SchemaTypePropertiesSchema)) - { - writer.WritePropertyName("schema"u8); - JsonSerializer.Serialize(writer, SchemaTypePropertiesSchema); - } - if (Optional.IsDefined(Table)) - { - writer.WritePropertyName("table"u8); - JsonSerializer.Serialize(writer, Table); - } - writer.WriteEndObject(); - foreach (var item in AdditionalProperties) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.Value.ToString()).RootElement); -#endif - } - writer.WriteEndObject(); - } - - internal static AzureSqlTableDataset DeserializeAzureSqlTableDataset(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - string type = default; - Optional description = default; - Optional>> structure = default; - Optional>> schema = default; - DataFactoryLinkedServiceReference linkedServiceName = default; - Optional> parameters = default; - Optional> annotations = default; - Optional folder = default; - Optional tableName = default; - Optional> schema0 = default; - Optional> table = default; - IDictionary> additionalProperties = default; - Dictionary> additionalPropertiesDictionary = new Dictionary>(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("type"u8)) - { - type = property.Value.GetString(); - continue; - } - if (property.NameEquals("description"u8)) - { - description = property.Value.GetString(); - continue; - } - if (property.NameEquals("structure"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - structure = JsonSerializer.Deserialize>>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("schema"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - schema = JsonSerializer.Deserialize>>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("linkedServiceName"u8)) - { - linkedServiceName = JsonSerializer.Deserialize(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("parameters"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - Dictionary dictionary = new Dictionary(); - foreach (var property0 in property.Value.EnumerateObject()) - { - dictionary.Add(property0.Name, EntityParameterSpecification.DeserializeEntityParameterSpecification(property0.Value)); - } - parameters = dictionary; - continue; - } - if (property.NameEquals("annotations"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - if (item.ValueKind == JsonValueKind.Null) - { - array.Add(null); - } - else - { - array.Add(BinaryData.FromString(item.GetRawText())); - } - } - annotations = array; - continue; - } - if (property.NameEquals("folder"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - folder = DatasetFolder.DeserializeDatasetFolder(property.Value); - continue; - } - if (property.NameEquals("typeProperties"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - foreach (var property0 in property.Value.EnumerateObject()) - { - if (property0.NameEquals("tableName"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - tableName = BinaryData.FromString(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("schema"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - schema0 = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("table"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - table = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - } - continue; - } - additionalPropertiesDictionary.Add(property.Name, JsonSerializer.Deserialize>(property.Value.GetRawText())); - } - additionalProperties = additionalPropertiesDictionary; - return new AzureSqlTableDataset(type, description.Value, structure.Value, schema.Value, linkedServiceName, Optional.ToDictionary(parameters), Optional.ToList(annotations), folder.Value, additionalProperties, tableName.Value, schema0.Value, table.Value); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/AzureSqlTableDataset.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/AzureSqlTableDataset.cs deleted file mode 100644 index 0199e42b..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/AzureSqlTableDataset.cs +++ /dev/null @@ -1,80 +0,0 @@ -// - -#nullable disable - -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// The Azure SQL Server database dataset. - public partial class AzureSqlTableDataset : DataFactoryDatasetProperties - { - /// Initializes a new instance of AzureSqlTableDataset. - /// Linked service reference. - /// is null. - public AzureSqlTableDataset(DataFactoryLinkedServiceReference linkedServiceName) : base(linkedServiceName) - { - Argument.AssertNotNull(linkedServiceName, nameof(linkedServiceName)); - - DatasetType = "AzureSqlTable"; - } - - /// Initializes a new instance of AzureSqlTableDataset. - /// Type of dataset. - /// Dataset description. - /// Columns that define the structure of the dataset. Type: array (or Expression with resultType array), itemType: DatasetDataElement. - /// Columns that define the physical type schema of the dataset. Type: array (or Expression with resultType array), itemType: DatasetSchemaDataElement. - /// Linked service reference. - /// Parameters for dataset. - /// List of tags that can be used for describing the Dataset. - /// The folder that this Dataset is in. If not specified, Dataset will appear at the root level. - /// Additional Properties. - /// This property will be retired. Please consider using schema + table properties instead. - /// The schema name of the Azure SQL database. Type: string (or Expression with resultType string). - /// The table name of the Azure SQL database. Type: string (or Expression with resultType string). - internal AzureSqlTableDataset(string datasetType, string description, DataFactoryElement> structure, DataFactoryElement> schema, DataFactoryLinkedServiceReference linkedServiceName, IDictionary parameters, IList annotations, DatasetFolder folder, IDictionary> additionalProperties, BinaryData tableName, DataFactoryElement schemaTypePropertiesSchema, DataFactoryElement table) : base(datasetType, description, structure, schema, linkedServiceName, parameters, annotations, folder, additionalProperties) - { - TableName = tableName; - SchemaTypePropertiesSchema = schemaTypePropertiesSchema; - Table = table; - DatasetType = datasetType ?? "AzureSqlTable"; - } - - /// - /// This property will be retired. Please consider using schema + table properties instead. - /// - /// To assign an object to this property use . - /// - /// - /// To assign an already formated json string to this property use . - /// - /// - /// Examples: - /// - /// - /// BinaryData.FromObjectAsJson("foo") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromString("\"foo\"") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromObjectAsJson(new { key = "value" }) - /// Creates a payload of { "key": "value" }. - /// - /// - /// BinaryData.FromString("{\"key\": \"value\"}") - /// Creates a payload of { "key": "value" }. - /// - /// - /// - /// - public BinaryData TableName { get; set; } - /// The schema name of the Azure SQL database. Type: string (or Expression with resultType string). - public DataFactoryElement SchemaTypePropertiesSchema { get; set; } - /// The table name of the Azure SQL database. Type: string (or Expression with resultType string). - public DataFactoryElement Table { get; set; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/AzureStorageAuthenticationType.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/AzureStorageAuthenticationType.cs deleted file mode 100644 index e4a4fa13..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/AzureStorageAuthenticationType.cs +++ /dev/null @@ -1,56 +0,0 @@ -// - -#nullable disable - -using System.ComponentModel; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// The type used for authentication. Type: string. - public readonly partial struct AzureStorageAuthenticationType : IEquatable - { - private readonly string _value; - - /// Initializes a new instance of . - /// is null. - public AzureStorageAuthenticationType(string value) - { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } - - private const string AnonymousValue = "Anonymous"; - private const string AccountKeyValue = "AccountKey"; - private const string SasUriValue = "SasUri"; - private const string ServicePrincipalValue = "ServicePrincipal"; - private const string MsiValue = "Msi"; - - /// Anonymous. - public static AzureStorageAuthenticationType Anonymous { get; } = new AzureStorageAuthenticationType(AnonymousValue); - /// AccountKey. - public static AzureStorageAuthenticationType AccountKey { get; } = new AzureStorageAuthenticationType(AccountKeyValue); - /// SasUri. - public static AzureStorageAuthenticationType SasUri { get; } = new AzureStorageAuthenticationType(SasUriValue); - /// ServicePrincipal. - public static AzureStorageAuthenticationType ServicePrincipal { get; } = new AzureStorageAuthenticationType(ServicePrincipalValue); - /// Msi. - public static AzureStorageAuthenticationType Msi { get; } = new AzureStorageAuthenticationType(MsiValue); - /// Determines if two values are the same. - public static bool operator ==(AzureStorageAuthenticationType left, AzureStorageAuthenticationType right) => left.Equals(right); - /// Determines if two values are not the same. - public static bool operator !=(AzureStorageAuthenticationType left, AzureStorageAuthenticationType right) => !left.Equals(right); - /// Converts a string to a . - public static implicit operator AzureStorageAuthenticationType(string value) => new AzureStorageAuthenticationType(value); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override bool Equals(object obj) => obj is AzureStorageAuthenticationType other && Equals(other); - /// - public bool Equals(AzureStorageAuthenticationType other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override int GetHashCode() => _value?.GetHashCode() ?? 0; - /// - public override string ToString() => _value; - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/AzureStorageLinkedService.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/AzureStorageLinkedService.Serialization.cs deleted file mode 100644 index f5cdcba1..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/AzureStorageLinkedService.Serialization.cs +++ /dev/null @@ -1,231 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class AzureStorageLinkedService : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - writer.WritePropertyName("type"u8); - writer.WriteStringValue(LinkedServiceType); - if (Optional.IsDefined(ConnectVia)) - { - writer.WritePropertyName("connectVia"u8); - writer.WriteObjectValue(ConnectVia); - } - if (Optional.IsDefined(Description)) - { - writer.WritePropertyName("description"u8); - writer.WriteStringValue(Description); - } - if (Optional.IsCollectionDefined(Parameters)) - { - writer.WritePropertyName("parameters"u8); - writer.WriteStartObject(); - foreach (var item in Parameters) - { - writer.WritePropertyName(item.Key); - writer.WriteObjectValue(item.Value); - } - writer.WriteEndObject(); - } - if (Optional.IsCollectionDefined(Annotations)) - { - writer.WritePropertyName("annotations"u8); - writer.WriteStartArray(); - foreach (var item in Annotations) - { - if (item == null) - { - writer.WriteNullValue(); - continue; - } -#if NET6_0_OR_GREATER - writer.WriteRawValue(item); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.ToString()).RootElement); -#endif - } - writer.WriteEndArray(); - } - writer.WritePropertyName("typeProperties"u8); - writer.WriteStartObject(); - if (Optional.IsDefined(ConnectionString)) - { - writer.WritePropertyName("connectionString"u8); - JsonSerializer.Serialize(writer, ConnectionString); - } - if (Optional.IsDefined(AccountKey)) - { - writer.WritePropertyName("accountKey"u8); - JsonSerializer.Serialize(writer, AccountKey); - } - if (Optional.IsDefined(SasUri)) - { - writer.WritePropertyName("sasUri"u8); - JsonSerializer.Serialize(writer, SasUri); - } - if (Optional.IsDefined(SasToken)) - { - writer.WritePropertyName("sasToken"u8); - JsonSerializer.Serialize(writer, SasToken); - } - if (Optional.IsDefined(EncryptedCredential)) - { - writer.WritePropertyName("encryptedCredential"u8); - writer.WriteStringValue(EncryptedCredential); - } - writer.WriteEndObject(); - foreach (var item in AdditionalProperties) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.Value.ToString()).RootElement); -#endif - } - writer.WriteEndObject(); - } - - internal static AzureStorageLinkedService DeserializeAzureStorageLinkedService(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - string type = default; - Optional connectVia = default; - Optional description = default; - Optional> parameters = default; - Optional> annotations = default; - Optional> connectionString = default; - Optional accountKey = default; - Optional> sasUri = default; - Optional sasToken = default; - Optional encryptedCredential = default; - IDictionary> additionalProperties = default; - Dictionary> additionalPropertiesDictionary = new Dictionary>(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("type"u8)) - { - type = property.Value.GetString(); - continue; - } - if (property.NameEquals("connectVia"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - connectVia = IntegrationRuntimeReference.DeserializeIntegrationRuntimeReference(property.Value); - continue; - } - if (property.NameEquals("description"u8)) - { - description = property.Value.GetString(); - continue; - } - if (property.NameEquals("parameters"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - Dictionary dictionary = new Dictionary(); - foreach (var property0 in property.Value.EnumerateObject()) - { - dictionary.Add(property0.Name, EntityParameterSpecification.DeserializeEntityParameterSpecification(property0.Value)); - } - parameters = dictionary; - continue; - } - if (property.NameEquals("annotations"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - if (item.ValueKind == JsonValueKind.Null) - { - array.Add(null); - } - else - { - array.Add(BinaryData.FromString(item.GetRawText())); - } - } - annotations = array; - continue; - } - if (property.NameEquals("typeProperties"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - foreach (var property0 in property.Value.EnumerateObject()) - { - if (property0.NameEquals("connectionString"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - connectionString = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("accountKey"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - accountKey = JsonSerializer.Deserialize(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("sasUri"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - sasUri = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("sasToken"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - sasToken = JsonSerializer.Deserialize(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("encryptedCredential"u8)) - { - encryptedCredential = property0.Value.GetString(); - continue; - } - } - continue; - } - additionalPropertiesDictionary.Add(property.Name, JsonSerializer.Deserialize>(property.Value.GetRawText())); - } - additionalProperties = additionalPropertiesDictionary; - return new AzureStorageLinkedService(type, connectVia.Value, description.Value, Optional.ToDictionary(parameters), Optional.ToList(annotations), additionalProperties, connectionString.Value, accountKey, sasUri.Value, sasToken, encryptedCredential.Value); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/AzureStorageLinkedService.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/AzureStorageLinkedService.cs deleted file mode 100644 index 246f5ec8..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/AzureStorageLinkedService.cs +++ /dev/null @@ -1,51 +0,0 @@ -// - -#nullable disable - -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// The storage account linked service. - public partial class AzureStorageLinkedService : DataFactoryLinkedServiceProperties - { - /// Initializes a new instance of AzureStorageLinkedService. - public AzureStorageLinkedService() - { - LinkedServiceType = "AzureStorage"; - } - - /// Initializes a new instance of AzureStorageLinkedService. - /// Type of linked service. - /// The integration runtime reference. - /// Linked service description. - /// Parameters for linked service. - /// List of tags that can be used for describing the linked service. - /// Additional Properties. - /// The connection string. It is mutually exclusive with sasUri property. Type: string, SecureString or AzureKeyVaultSecretReference. - /// The Azure key vault secret reference of accountKey in connection string. - /// SAS URI of the Azure Storage resource. It is mutually exclusive with connectionString property. Type: string, SecureString or AzureKeyVaultSecretReference. - /// The Azure key vault secret reference of sasToken in sas uri. - /// The encrypted credential used for authentication. Credentials are encrypted using the integration runtime credential manager. Type: string. - internal AzureStorageLinkedService(string linkedServiceType, IntegrationRuntimeReference connectVia, string description, IDictionary parameters, IList annotations, IDictionary> additionalProperties, DataFactoryElement connectionString, DataFactoryKeyVaultSecretReference accountKey, DataFactoryElement sasUri, DataFactoryKeyVaultSecretReference sasToken, string encryptedCredential) : base(linkedServiceType, connectVia, description, parameters, annotations, additionalProperties) - { - ConnectionString = connectionString; - AccountKey = accountKey; - SasUri = sasUri; - SasToken = sasToken; - EncryptedCredential = encryptedCredential; - LinkedServiceType = linkedServiceType ?? "AzureStorage"; - } - - /// The connection string. It is mutually exclusive with sasUri property. Type: string, SecureString or AzureKeyVaultSecretReference. - public DataFactoryElement ConnectionString { get; set; } - /// The Azure key vault secret reference of accountKey in connection string. - public DataFactoryKeyVaultSecretReference AccountKey { get; set; } - /// SAS URI of the Azure Storage resource. It is mutually exclusive with connectionString property. Type: string, SecureString or AzureKeyVaultSecretReference. - public DataFactoryElement SasUri { get; set; } - /// The Azure key vault secret reference of sasToken in sas uri. - public DataFactoryKeyVaultSecretReference SasToken { get; set; } - /// The encrypted credential used for authentication. Credentials are encrypted using the integration runtime credential manager. Type: string. - public string EncryptedCredential { get; set; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/AzureSynapseArtifactsLinkedService.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/AzureSynapseArtifactsLinkedService.Serialization.cs deleted file mode 100644 index 0d5df443..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/AzureSynapseArtifactsLinkedService.Serialization.cs +++ /dev/null @@ -1,198 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class AzureSynapseArtifactsLinkedService : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - writer.WritePropertyName("type"u8); - writer.WriteStringValue(LinkedServiceType); - if (Optional.IsDefined(ConnectVia)) - { - writer.WritePropertyName("connectVia"u8); - writer.WriteObjectValue(ConnectVia); - } - if (Optional.IsDefined(Description)) - { - writer.WritePropertyName("description"u8); - writer.WriteStringValue(Description); - } - if (Optional.IsCollectionDefined(Parameters)) - { - writer.WritePropertyName("parameters"u8); - writer.WriteStartObject(); - foreach (var item in Parameters) - { - writer.WritePropertyName(item.Key); - writer.WriteObjectValue(item.Value); - } - writer.WriteEndObject(); - } - if (Optional.IsCollectionDefined(Annotations)) - { - writer.WritePropertyName("annotations"u8); - writer.WriteStartArray(); - foreach (var item in Annotations) - { - if (item == null) - { - writer.WriteNullValue(); - continue; - } -#if NET6_0_OR_GREATER - writer.WriteRawValue(item); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.ToString()).RootElement); -#endif - } - writer.WriteEndArray(); - } - writer.WritePropertyName("typeProperties"u8); - writer.WriteStartObject(); - writer.WritePropertyName("endpoint"u8); - JsonSerializer.Serialize(writer, Endpoint); - if (Optional.IsDefined(Authentication)) - { - writer.WritePropertyName("authentication"u8); - JsonSerializer.Serialize(writer, Authentication); - } - if (Optional.IsDefined(WorkspaceResourceId)) - { - writer.WritePropertyName("workspaceResourceId"u8); - JsonSerializer.Serialize(writer, WorkspaceResourceId); - } - writer.WriteEndObject(); - foreach (var item in AdditionalProperties) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.Value.ToString()).RootElement); -#endif - } - writer.WriteEndObject(); - } - - internal static AzureSynapseArtifactsLinkedService DeserializeAzureSynapseArtifactsLinkedService(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - string type = default; - Optional connectVia = default; - Optional description = default; - Optional> parameters = default; - Optional> annotations = default; - DataFactoryElement endpoint = default; - Optional> authentication = default; - Optional> workspaceResourceId = default; - IDictionary> additionalProperties = default; - Dictionary> additionalPropertiesDictionary = new Dictionary>(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("type"u8)) - { - type = property.Value.GetString(); - continue; - } - if (property.NameEquals("connectVia"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - connectVia = IntegrationRuntimeReference.DeserializeIntegrationRuntimeReference(property.Value); - continue; - } - if (property.NameEquals("description"u8)) - { - description = property.Value.GetString(); - continue; - } - if (property.NameEquals("parameters"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - Dictionary dictionary = new Dictionary(); - foreach (var property0 in property.Value.EnumerateObject()) - { - dictionary.Add(property0.Name, EntityParameterSpecification.DeserializeEntityParameterSpecification(property0.Value)); - } - parameters = dictionary; - continue; - } - if (property.NameEquals("annotations"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - if (item.ValueKind == JsonValueKind.Null) - { - array.Add(null); - } - else - { - array.Add(BinaryData.FromString(item.GetRawText())); - } - } - annotations = array; - continue; - } - if (property.NameEquals("typeProperties"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - foreach (var property0 in property.Value.EnumerateObject()) - { - if (property0.NameEquals("endpoint"u8)) - { - endpoint = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("authentication"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - authentication = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("workspaceResourceId"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - workspaceResourceId = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - } - continue; - } - additionalPropertiesDictionary.Add(property.Name, JsonSerializer.Deserialize>(property.Value.GetRawText())); - } - additionalProperties = additionalPropertiesDictionary; - return new AzureSynapseArtifactsLinkedService(type, connectVia.Value, description.Value, Optional.ToDictionary(parameters), Optional.ToList(annotations), additionalProperties, endpoint, authentication.Value, workspaceResourceId.Value); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/AzureSynapseArtifactsLinkedService.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/AzureSynapseArtifactsLinkedService.cs deleted file mode 100644 index d913be8e..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/AzureSynapseArtifactsLinkedService.cs +++ /dev/null @@ -1,49 +0,0 @@ -// - -#nullable disable - -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// Azure Synapse Analytics (Artifacts) linked service. - public partial class AzureSynapseArtifactsLinkedService : DataFactoryLinkedServiceProperties - { - /// Initializes a new instance of AzureSynapseArtifactsLinkedService. - /// https://<workspacename>.dev.azuresynapse.net, Azure Synapse Analytics workspace URL. Type: string (or Expression with resultType string). - /// is null. - public AzureSynapseArtifactsLinkedService(DataFactoryElement endpoint) - { - Argument.AssertNotNull(endpoint, nameof(endpoint)); - - Endpoint = endpoint; - LinkedServiceType = "AzureSynapseArtifacts"; - } - - /// Initializes a new instance of AzureSynapseArtifactsLinkedService. - /// Type of linked service. - /// The integration runtime reference. - /// Linked service description. - /// Parameters for linked service. - /// List of tags that can be used for describing the linked service. - /// Additional Properties. - /// https://<workspacename>.dev.azuresynapse.net, Azure Synapse Analytics workspace URL. Type: string (or Expression with resultType string). - /// Required to specify MSI, if using system assigned managed identity as authentication method. Type: string (or Expression with resultType string). - /// The resource ID of the Synapse workspace. The format should be: /subscriptions/{subscriptionID}/resourceGroups/{resourceGroup}/providers/Microsoft.Synapse/workspaces/{workspaceName}. Type: string (or Expression with resultType string). - internal AzureSynapseArtifactsLinkedService(string linkedServiceType, IntegrationRuntimeReference connectVia, string description, IDictionary parameters, IList annotations, IDictionary> additionalProperties, DataFactoryElement endpoint, DataFactoryElement authentication, DataFactoryElement workspaceResourceId) : base(linkedServiceType, connectVia, description, parameters, annotations, additionalProperties) - { - Endpoint = endpoint; - Authentication = authentication; - WorkspaceResourceId = workspaceResourceId; - LinkedServiceType = linkedServiceType ?? "AzureSynapseArtifacts"; - } - - /// https://<workspacename>.dev.azuresynapse.net, Azure Synapse Analytics workspace URL. Type: string (or Expression with resultType string). - public DataFactoryElement Endpoint { get; set; } - /// Required to specify MSI, if using system assigned managed identity as authentication method. Type: string (or Expression with resultType string). - public DataFactoryElement Authentication { get; set; } - /// The resource ID of the Synapse workspace. The format should be: /subscriptions/{subscriptionID}/resourceGroups/{resourceGroup}/providers/Microsoft.Synapse/workspaces/{workspaceName}. Type: string (or Expression with resultType string). - public DataFactoryElement WorkspaceResourceId { get; set; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/AzureTableDataset.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/AzureTableDataset.Serialization.cs deleted file mode 100644 index 4bef2e76..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/AzureTableDataset.Serialization.cs +++ /dev/null @@ -1,205 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class AzureTableDataset : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - writer.WritePropertyName("type"u8); - writer.WriteStringValue(DatasetType); - if (Optional.IsDefined(Description)) - { - writer.WritePropertyName("description"u8); - writer.WriteStringValue(Description); - } - if (Optional.IsDefined(Structure)) - { - writer.WritePropertyName("structure"u8); - JsonSerializer.Serialize(writer, Structure); - } - if (Optional.IsDefined(Schema)) - { - writer.WritePropertyName("schema"u8); - JsonSerializer.Serialize(writer, Schema); - } - writer.WritePropertyName("linkedServiceName"u8); - JsonSerializer.Serialize(writer, LinkedServiceName); if (Optional.IsCollectionDefined(Parameters)) - { - writer.WritePropertyName("parameters"u8); - writer.WriteStartObject(); - foreach (var item in Parameters) - { - writer.WritePropertyName(item.Key); - writer.WriteObjectValue(item.Value); - } - writer.WriteEndObject(); - } - if (Optional.IsCollectionDefined(Annotations)) - { - writer.WritePropertyName("annotations"u8); - writer.WriteStartArray(); - foreach (var item in Annotations) - { - if (item == null) - { - writer.WriteNullValue(); - continue; - } -#if NET6_0_OR_GREATER - writer.WriteRawValue(item); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.ToString()).RootElement); -#endif - } - writer.WriteEndArray(); - } - if (Optional.IsDefined(Folder)) - { - writer.WritePropertyName("folder"u8); - writer.WriteObjectValue(Folder); - } - writer.WritePropertyName("typeProperties"u8); - writer.WriteStartObject(); - writer.WritePropertyName("tableName"u8); - JsonSerializer.Serialize(writer, TableName); - writer.WriteEndObject(); - foreach (var item in AdditionalProperties) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.Value.ToString()).RootElement); -#endif - } - writer.WriteEndObject(); - } - - internal static AzureTableDataset DeserializeAzureTableDataset(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - string type = default; - Optional description = default; - Optional>> structure = default; - Optional>> schema = default; - DataFactoryLinkedServiceReference linkedServiceName = default; - Optional> parameters = default; - Optional> annotations = default; - Optional folder = default; - DataFactoryElement tableName = default; - IDictionary> additionalProperties = default; - Dictionary> additionalPropertiesDictionary = new Dictionary>(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("type"u8)) - { - type = property.Value.GetString(); - continue; - } - if (property.NameEquals("description"u8)) - { - description = property.Value.GetString(); - continue; - } - if (property.NameEquals("structure"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - structure = JsonSerializer.Deserialize>>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("schema"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - schema = JsonSerializer.Deserialize>>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("linkedServiceName"u8)) - { - linkedServiceName = JsonSerializer.Deserialize(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("parameters"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - Dictionary dictionary = new Dictionary(); - foreach (var property0 in property.Value.EnumerateObject()) - { - dictionary.Add(property0.Name, EntityParameterSpecification.DeserializeEntityParameterSpecification(property0.Value)); - } - parameters = dictionary; - continue; - } - if (property.NameEquals("annotations"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - if (item.ValueKind == JsonValueKind.Null) - { - array.Add(null); - } - else - { - array.Add(BinaryData.FromString(item.GetRawText())); - } - } - annotations = array; - continue; - } - if (property.NameEquals("folder"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - folder = DatasetFolder.DeserializeDatasetFolder(property.Value); - continue; - } - if (property.NameEquals("typeProperties"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - foreach (var property0 in property.Value.EnumerateObject()) - { - if (property0.NameEquals("tableName"u8)) - { - tableName = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - } - continue; - } - additionalPropertiesDictionary.Add(property.Name, JsonSerializer.Deserialize>(property.Value.GetRawText())); - } - additionalProperties = additionalPropertiesDictionary; - return new AzureTableDataset(type, description.Value, structure.Value, schema.Value, linkedServiceName, Optional.ToDictionary(parameters), Optional.ToList(annotations), folder.Value, additionalProperties, tableName); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/AzureTableDataset.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/AzureTableDataset.cs deleted file mode 100644 index c121cba7..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/AzureTableDataset.cs +++ /dev/null @@ -1,46 +0,0 @@ -// - -#nullable disable - -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// The Azure Table storage dataset. - public partial class AzureTableDataset : DataFactoryDatasetProperties - { - /// Initializes a new instance of AzureTableDataset. - /// Linked service reference. - /// The table name of the Azure Table storage. Type: string (or Expression with resultType string). - /// or is null. - public AzureTableDataset(DataFactoryLinkedServiceReference linkedServiceName, DataFactoryElement tableName) : base(linkedServiceName) - { - Argument.AssertNotNull(linkedServiceName, nameof(linkedServiceName)); - Argument.AssertNotNull(tableName, nameof(tableName)); - - TableName = tableName; - DatasetType = "AzureTable"; - } - - /// Initializes a new instance of AzureTableDataset. - /// Type of dataset. - /// Dataset description. - /// Columns that define the structure of the dataset. Type: array (or Expression with resultType array), itemType: DatasetDataElement. - /// Columns that define the physical type schema of the dataset. Type: array (or Expression with resultType array), itemType: DatasetSchemaDataElement. - /// Linked service reference. - /// Parameters for dataset. - /// List of tags that can be used for describing the Dataset. - /// The folder that this Dataset is in. If not specified, Dataset will appear at the root level. - /// Additional Properties. - /// The table name of the Azure Table storage. Type: string (or Expression with resultType string). - internal AzureTableDataset(string datasetType, string description, DataFactoryElement> structure, DataFactoryElement> schema, DataFactoryLinkedServiceReference linkedServiceName, IDictionary parameters, IList annotations, DatasetFolder folder, IDictionary> additionalProperties, DataFactoryElement tableName) : base(datasetType, description, structure, schema, linkedServiceName, parameters, annotations, folder, additionalProperties) - { - TableName = tableName; - DatasetType = datasetType ?? "AzureTable"; - } - - /// The table name of the Azure Table storage. Type: string (or Expression with resultType string). - public DataFactoryElement TableName { get; set; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/AzureTableSink.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/AzureTableSink.Serialization.cs deleted file mode 100644 index eb6780b0..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/AzureTableSink.Serialization.cs +++ /dev/null @@ -1,202 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class AzureTableSink : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - if (Optional.IsDefined(AzureTableDefaultPartitionKeyValue)) - { - writer.WritePropertyName("azureTableDefaultPartitionKeyValue"u8); - JsonSerializer.Serialize(writer, AzureTableDefaultPartitionKeyValue); - } - if (Optional.IsDefined(AzureTablePartitionKeyName)) - { - writer.WritePropertyName("azureTablePartitionKeyName"u8); - JsonSerializer.Serialize(writer, AzureTablePartitionKeyName); - } - if (Optional.IsDefined(AzureTableRowKeyName)) - { - writer.WritePropertyName("azureTableRowKeyName"u8); - JsonSerializer.Serialize(writer, AzureTableRowKeyName); - } - if (Optional.IsDefined(AzureTableInsertType)) - { - writer.WritePropertyName("azureTableInsertType"u8); - JsonSerializer.Serialize(writer, AzureTableInsertType); - } - writer.WritePropertyName("type"u8); - writer.WriteStringValue(CopySinkType); - if (Optional.IsDefined(WriteBatchSize)) - { - writer.WritePropertyName("writeBatchSize"u8); - JsonSerializer.Serialize(writer, WriteBatchSize); - } - if (Optional.IsDefined(WriteBatchTimeout)) - { - writer.WritePropertyName("writeBatchTimeout"u8); - JsonSerializer.Serialize(writer, WriteBatchTimeout); - } - if (Optional.IsDefined(SinkRetryCount)) - { - writer.WritePropertyName("sinkRetryCount"u8); - JsonSerializer.Serialize(writer, SinkRetryCount); - } - if (Optional.IsDefined(SinkRetryWait)) - { - writer.WritePropertyName("sinkRetryWait"u8); - JsonSerializer.Serialize(writer, SinkRetryWait); - } - if (Optional.IsDefined(MaxConcurrentConnections)) - { - writer.WritePropertyName("maxConcurrentConnections"u8); - JsonSerializer.Serialize(writer, MaxConcurrentConnections); - } - if (Optional.IsDefined(DisableMetricsCollection)) - { - writer.WritePropertyName("disableMetricsCollection"u8); - JsonSerializer.Serialize(writer, DisableMetricsCollection); - } - foreach (var item in AdditionalProperties) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.Value.ToString()).RootElement); -#endif - } - writer.WriteEndObject(); - } - - internal static AzureTableSink DeserializeAzureTableSink(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - Optional> azureTableDefaultPartitionKeyValue = default; - Optional> azureTablePartitionKeyName = default; - Optional> azureTableRowKeyName = default; - Optional> azureTableInsertType = default; - string type = default; - Optional> writeBatchSize = default; - Optional> writeBatchTimeout = default; - Optional> sinkRetryCount = default; - Optional> sinkRetryWait = default; - Optional> maxConcurrentConnections = default; - Optional> disableMetricsCollection = default; - IDictionary> additionalProperties = default; - Dictionary> additionalPropertiesDictionary = new Dictionary>(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("azureTableDefaultPartitionKeyValue"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - azureTableDefaultPartitionKeyValue = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("azureTablePartitionKeyName"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - azureTablePartitionKeyName = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("azureTableRowKeyName"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - azureTableRowKeyName = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("azureTableInsertType"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - azureTableInsertType = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("type"u8)) - { - type = property.Value.GetString(); - continue; - } - if (property.NameEquals("writeBatchSize"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - writeBatchSize = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("writeBatchTimeout"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - writeBatchTimeout = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("sinkRetryCount"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - sinkRetryCount = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("sinkRetryWait"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - sinkRetryWait = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("maxConcurrentConnections"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - maxConcurrentConnections = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("disableMetricsCollection"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - disableMetricsCollection = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - additionalPropertiesDictionary.Add(property.Name, JsonSerializer.Deserialize>(property.Value.GetRawText())); - } - additionalProperties = additionalPropertiesDictionary; - return new AzureTableSink(type, writeBatchSize.Value, writeBatchTimeout.Value, sinkRetryCount.Value, sinkRetryWait.Value, maxConcurrentConnections.Value, disableMetricsCollection.Value, additionalProperties, azureTableDefaultPartitionKeyValue.Value, azureTablePartitionKeyName.Value, azureTableRowKeyName.Value, azureTableInsertType.Value); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/AzureTableSink.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/AzureTableSink.cs deleted file mode 100644 index aeee7d9d..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/AzureTableSink.cs +++ /dev/null @@ -1,49 +0,0 @@ -// - -#nullable disable - -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// A copy activity Azure Table sink. - public partial class AzureTableSink : CopySink - { - /// Initializes a new instance of AzureTableSink. - public AzureTableSink() - { - CopySinkType = "AzureTableSink"; - } - - /// Initializes a new instance of AzureTableSink. - /// Copy sink type. - /// Write batch size. Type: integer (or Expression with resultType integer), minimum: 0. - /// Write batch timeout. Type: string (or Expression with resultType string), pattern: ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). - /// Sink retry count. Type: integer (or Expression with resultType integer). - /// Sink retry wait. Type: string (or Expression with resultType string), pattern: ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). - /// The maximum concurrent connection count for the sink data store. Type: integer (or Expression with resultType integer). - /// If true, disable data store metrics collection. Default is false. Type: boolean (or Expression with resultType boolean). - /// Additional Properties. - /// Azure Table default partition key value. Type: string (or Expression with resultType string). - /// Azure Table partition key name. Type: string (or Expression with resultType string). - /// Azure Table row key name. Type: string (or Expression with resultType string). - /// Azure Table insert type. Type: string (or Expression with resultType string). - internal AzureTableSink(string copySinkType, DataFactoryElement writeBatchSize, DataFactoryElement writeBatchTimeout, DataFactoryElement sinkRetryCount, DataFactoryElement sinkRetryWait, DataFactoryElement maxConcurrentConnections, DataFactoryElement disableMetricsCollection, IDictionary> additionalProperties, DataFactoryElement azureTableDefaultPartitionKeyValue, DataFactoryElement azureTablePartitionKeyName, DataFactoryElement azureTableRowKeyName, DataFactoryElement azureTableInsertType) : base(copySinkType, writeBatchSize, writeBatchTimeout, sinkRetryCount, sinkRetryWait, maxConcurrentConnections, disableMetricsCollection, additionalProperties) - { - AzureTableDefaultPartitionKeyValue = azureTableDefaultPartitionKeyValue; - AzureTablePartitionKeyName = azureTablePartitionKeyName; - AzureTableRowKeyName = azureTableRowKeyName; - AzureTableInsertType = azureTableInsertType; - CopySinkType = copySinkType ?? "AzureTableSink"; - } - - /// Azure Table default partition key value. Type: string (or Expression with resultType string). - public DataFactoryElement AzureTableDefaultPartitionKeyValue { get; set; } - /// Azure Table partition key name. Type: string (or Expression with resultType string). - public DataFactoryElement AzureTablePartitionKeyName { get; set; } - /// Azure Table row key name. Type: string (or Expression with resultType string). - public DataFactoryElement AzureTableRowKeyName { get; set; } - /// Azure Table insert type. Type: string (or Expression with resultType string). - public DataFactoryElement AzureTableInsertType { get; set; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/AzureTableSource.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/AzureTableSource.Serialization.cs deleted file mode 100644 index b4620c82..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/AzureTableSource.Serialization.cs +++ /dev/null @@ -1,176 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class AzureTableSource : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - if (Optional.IsDefined(AzureTableSourceQuery)) - { - writer.WritePropertyName("azureTableSourceQuery"u8); - JsonSerializer.Serialize(writer, AzureTableSourceQuery); - } - if (Optional.IsDefined(AzureTableSourceIgnoreTableNotFound)) - { - writer.WritePropertyName("azureTableSourceIgnoreTableNotFound"u8); - JsonSerializer.Serialize(writer, AzureTableSourceIgnoreTableNotFound); - } - if (Optional.IsDefined(QueryTimeout)) - { - writer.WritePropertyName("queryTimeout"u8); - JsonSerializer.Serialize(writer, QueryTimeout); - } - if (Optional.IsDefined(AdditionalColumns)) - { - writer.WritePropertyName("additionalColumns"u8); -#if NET6_0_OR_GREATER - writer.WriteRawValue(AdditionalColumns); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(AdditionalColumns.ToString()).RootElement); -#endif - } - writer.WritePropertyName("type"u8); - writer.WriteStringValue(CopySourceType); - if (Optional.IsDefined(SourceRetryCount)) - { - writer.WritePropertyName("sourceRetryCount"u8); - JsonSerializer.Serialize(writer, SourceRetryCount); - } - if (Optional.IsDefined(SourceRetryWait)) - { - writer.WritePropertyName("sourceRetryWait"u8); - JsonSerializer.Serialize(writer, SourceRetryWait); - } - if (Optional.IsDefined(MaxConcurrentConnections)) - { - writer.WritePropertyName("maxConcurrentConnections"u8); - JsonSerializer.Serialize(writer, MaxConcurrentConnections); - } - if (Optional.IsDefined(DisableMetricsCollection)) - { - writer.WritePropertyName("disableMetricsCollection"u8); - JsonSerializer.Serialize(writer, DisableMetricsCollection); - } - foreach (var item in AdditionalProperties) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.Value.ToString()).RootElement); -#endif - } - writer.WriteEndObject(); - } - - internal static AzureTableSource DeserializeAzureTableSource(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - Optional> azureTableSourceQuery = default; - Optional> azureTableSourceIgnoreTableNotFound = default; - Optional> queryTimeout = default; - Optional additionalColumns = default; - string type = default; - Optional> sourceRetryCount = default; - Optional> sourceRetryWait = default; - Optional> maxConcurrentConnections = default; - Optional> disableMetricsCollection = default; - IDictionary> additionalProperties = default; - Dictionary> additionalPropertiesDictionary = new Dictionary>(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("azureTableSourceQuery"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - azureTableSourceQuery = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("azureTableSourceIgnoreTableNotFound"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - azureTableSourceIgnoreTableNotFound = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("queryTimeout"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - queryTimeout = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("additionalColumns"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - additionalColumns = BinaryData.FromString(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("type"u8)) - { - type = property.Value.GetString(); - continue; - } - if (property.NameEquals("sourceRetryCount"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - sourceRetryCount = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("sourceRetryWait"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - sourceRetryWait = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("maxConcurrentConnections"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - maxConcurrentConnections = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("disableMetricsCollection"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - disableMetricsCollection = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - additionalPropertiesDictionary.Add(property.Name, JsonSerializer.Deserialize>(property.Value.GetRawText())); - } - additionalProperties = additionalPropertiesDictionary; - return new AzureTableSource(type, sourceRetryCount.Value, sourceRetryWait.Value, maxConcurrentConnections.Value, disableMetricsCollection.Value, additionalProperties, queryTimeout.Value, additionalColumns.Value, azureTableSourceQuery.Value, azureTableSourceIgnoreTableNotFound.Value); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/AzureTableSource.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/AzureTableSource.cs deleted file mode 100644 index ea66ad6f..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/AzureTableSource.cs +++ /dev/null @@ -1,41 +0,0 @@ -// - -#nullable disable - -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// A copy activity Azure Table source. - public partial class AzureTableSource : TabularSource - { - /// Initializes a new instance of AzureTableSource. - public AzureTableSource() - { - CopySourceType = "AzureTableSource"; - } - - /// Initializes a new instance of AzureTableSource. - /// Copy source type. - /// Source retry count. Type: integer (or Expression with resultType integer). - /// Source retry wait. Type: string (or Expression with resultType string), pattern: ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). - /// The maximum concurrent connection count for the source data store. Type: integer (or Expression with resultType integer). - /// If true, disable data store metrics collection. Default is false. Type: boolean (or Expression with resultType boolean). - /// Additional Properties. - /// 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). - /// Azure Table source query. Type: string (or Expression with resultType string). - /// Azure Table source ignore table not found. Type: boolean (or Expression with resultType boolean). - internal AzureTableSource(string copySourceType, DataFactoryElement sourceRetryCount, DataFactoryElement sourceRetryWait, DataFactoryElement maxConcurrentConnections, DataFactoryElement disableMetricsCollection, IDictionary> additionalProperties, DataFactoryElement queryTimeout, BinaryData additionalColumns, DataFactoryElement azureTableSourceQuery, DataFactoryElement azureTableSourceIgnoreTableNotFound) : base(copySourceType, sourceRetryCount, sourceRetryWait, maxConcurrentConnections, disableMetricsCollection, additionalProperties, queryTimeout, additionalColumns) - { - AzureTableSourceQuery = azureTableSourceQuery; - AzureTableSourceIgnoreTableNotFound = azureTableSourceIgnoreTableNotFound; - CopySourceType = copySourceType ?? "AzureTableSource"; - } - - /// Azure Table source query. Type: string (or Expression with resultType string). - public DataFactoryElement AzureTableSourceQuery { get; set; } - /// Azure Table source ignore table not found. Type: boolean (or Expression with resultType boolean). - public DataFactoryElement AzureTableSourceIgnoreTableNotFound { get; set; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/AzureTableStorageLinkedService.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/AzureTableStorageLinkedService.Serialization.cs deleted file mode 100644 index b12b33a6..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/AzureTableStorageLinkedService.Serialization.cs +++ /dev/null @@ -1,231 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class AzureTableStorageLinkedService : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - writer.WritePropertyName("type"u8); - writer.WriteStringValue(LinkedServiceType); - if (Optional.IsDefined(ConnectVia)) - { - writer.WritePropertyName("connectVia"u8); - writer.WriteObjectValue(ConnectVia); - } - if (Optional.IsDefined(Description)) - { - writer.WritePropertyName("description"u8); - writer.WriteStringValue(Description); - } - if (Optional.IsCollectionDefined(Parameters)) - { - writer.WritePropertyName("parameters"u8); - writer.WriteStartObject(); - foreach (var item in Parameters) - { - writer.WritePropertyName(item.Key); - writer.WriteObjectValue(item.Value); - } - writer.WriteEndObject(); - } - if (Optional.IsCollectionDefined(Annotations)) - { - writer.WritePropertyName("annotations"u8); - writer.WriteStartArray(); - foreach (var item in Annotations) - { - if (item == null) - { - writer.WriteNullValue(); - continue; - } -#if NET6_0_OR_GREATER - writer.WriteRawValue(item); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.ToString()).RootElement); -#endif - } - writer.WriteEndArray(); - } - writer.WritePropertyName("typeProperties"u8); - writer.WriteStartObject(); - if (Optional.IsDefined(ConnectionString)) - { - writer.WritePropertyName("connectionString"u8); - JsonSerializer.Serialize(writer, ConnectionString); - } - if (Optional.IsDefined(AccountKey)) - { - writer.WritePropertyName("accountKey"u8); - JsonSerializer.Serialize(writer, AccountKey); - } - if (Optional.IsDefined(SasUri)) - { - writer.WritePropertyName("sasUri"u8); - JsonSerializer.Serialize(writer, SasUri); - } - if (Optional.IsDefined(SasToken)) - { - writer.WritePropertyName("sasToken"u8); - JsonSerializer.Serialize(writer, SasToken); - } - if (Optional.IsDefined(EncryptedCredential)) - { - writer.WritePropertyName("encryptedCredential"u8); - writer.WriteStringValue(EncryptedCredential); - } - writer.WriteEndObject(); - foreach (var item in AdditionalProperties) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.Value.ToString()).RootElement); -#endif - } - writer.WriteEndObject(); - } - - internal static AzureTableStorageLinkedService DeserializeAzureTableStorageLinkedService(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - string type = default; - Optional connectVia = default; - Optional description = default; - Optional> parameters = default; - Optional> annotations = default; - Optional> connectionString = default; - Optional accountKey = default; - Optional> sasUri = default; - Optional sasToken = default; - Optional encryptedCredential = default; - IDictionary> additionalProperties = default; - Dictionary> additionalPropertiesDictionary = new Dictionary>(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("type"u8)) - { - type = property.Value.GetString(); - continue; - } - if (property.NameEquals("connectVia"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - connectVia = IntegrationRuntimeReference.DeserializeIntegrationRuntimeReference(property.Value); - continue; - } - if (property.NameEquals("description"u8)) - { - description = property.Value.GetString(); - continue; - } - if (property.NameEquals("parameters"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - Dictionary dictionary = new Dictionary(); - foreach (var property0 in property.Value.EnumerateObject()) - { - dictionary.Add(property0.Name, EntityParameterSpecification.DeserializeEntityParameterSpecification(property0.Value)); - } - parameters = dictionary; - continue; - } - if (property.NameEquals("annotations"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - if (item.ValueKind == JsonValueKind.Null) - { - array.Add(null); - } - else - { - array.Add(BinaryData.FromString(item.GetRawText())); - } - } - annotations = array; - continue; - } - if (property.NameEquals("typeProperties"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - foreach (var property0 in property.Value.EnumerateObject()) - { - if (property0.NameEquals("connectionString"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - connectionString = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("accountKey"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - accountKey = JsonSerializer.Deserialize(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("sasUri"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - sasUri = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("sasToken"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - sasToken = JsonSerializer.Deserialize(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("encryptedCredential"u8)) - { - encryptedCredential = property0.Value.GetString(); - continue; - } - } - continue; - } - additionalPropertiesDictionary.Add(property.Name, JsonSerializer.Deserialize>(property.Value.GetRawText())); - } - additionalProperties = additionalPropertiesDictionary; - return new AzureTableStorageLinkedService(type, connectVia.Value, description.Value, Optional.ToDictionary(parameters), Optional.ToList(annotations), additionalProperties, connectionString.Value, accountKey, sasUri.Value, sasToken, encryptedCredential.Value); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/AzureTableStorageLinkedService.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/AzureTableStorageLinkedService.cs deleted file mode 100644 index 4bd68b0b..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/AzureTableStorageLinkedService.cs +++ /dev/null @@ -1,51 +0,0 @@ -// - -#nullable disable - -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// The azure table storage linked service. - public partial class AzureTableStorageLinkedService : DataFactoryLinkedServiceProperties - { - /// Initializes a new instance of AzureTableStorageLinkedService. - public AzureTableStorageLinkedService() - { - LinkedServiceType = "AzureTableStorage"; - } - - /// Initializes a new instance of AzureTableStorageLinkedService. - /// Type of linked service. - /// The integration runtime reference. - /// Linked service description. - /// Parameters for linked service. - /// List of tags that can be used for describing the linked service. - /// Additional Properties. - /// The connection string. It is mutually exclusive with sasUri property. Type: string, SecureString or AzureKeyVaultSecretReference. - /// The Azure key vault secret reference of accountKey in connection string. - /// SAS URI of the Azure Storage resource. It is mutually exclusive with connectionString property. Type: string, SecureString or AzureKeyVaultSecretReference. - /// The Azure key vault secret reference of sasToken in sas uri. - /// The encrypted credential used for authentication. Credentials are encrypted using the integration runtime credential manager. Type: string. - internal AzureTableStorageLinkedService(string linkedServiceType, IntegrationRuntimeReference connectVia, string description, IDictionary parameters, IList annotations, IDictionary> additionalProperties, DataFactoryElement connectionString, DataFactoryKeyVaultSecretReference accountKey, DataFactoryElement sasUri, DataFactoryKeyVaultSecretReference sasToken, string encryptedCredential) : base(linkedServiceType, connectVia, description, parameters, annotations, additionalProperties) - { - ConnectionString = connectionString; - AccountKey = accountKey; - SasUri = sasUri; - SasToken = sasToken; - EncryptedCredential = encryptedCredential; - LinkedServiceType = linkedServiceType ?? "AzureTableStorage"; - } - - /// The connection string. It is mutually exclusive with sasUri property. Type: string, SecureString or AzureKeyVaultSecretReference. - public DataFactoryElement ConnectionString { get; set; } - /// The Azure key vault secret reference of accountKey in connection string. - public DataFactoryKeyVaultSecretReference AccountKey { get; set; } - /// SAS URI of the Azure Storage resource. It is mutually exclusive with connectionString property. Type: string, SecureString or AzureKeyVaultSecretReference. - public DataFactoryElement SasUri { get; set; } - /// The Azure key vault secret reference of sasToken in sas uri. - public DataFactoryKeyVaultSecretReference SasToken { get; set; } - /// The encrypted credential used for authentication. Credentials are encrypted using the integration runtime credential manager. Type: string. - public string EncryptedCredential { get; set; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/BigDataPoolParametrizationReference.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/BigDataPoolParametrizationReference.Serialization.cs deleted file mode 100644 index ff056e33..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/BigDataPoolParametrizationReference.Serialization.cs +++ /dev/null @@ -1,47 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class BigDataPoolParametrizationReference : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ReferenceType.ToString()); - writer.WritePropertyName("referenceName"u8); - JsonSerializer.Serialize(writer, ReferenceName); - writer.WriteEndObject(); - } - - internal static BigDataPoolParametrizationReference DeserializeBigDataPoolParametrizationReference(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - BigDataPoolReferenceType type = default; - DataFactoryElement referenceName = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("type"u8)) - { - type = new BigDataPoolReferenceType(property.Value.GetString()); - continue; - } - if (property.NameEquals("referenceName"u8)) - { - referenceName = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - } - return new BigDataPoolParametrizationReference(type, referenceName); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/BigDataPoolParametrizationReference.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/BigDataPoolParametrizationReference.cs deleted file mode 100644 index 73c91131..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/BigDataPoolParametrizationReference.cs +++ /dev/null @@ -1,30 +0,0 @@ -// - -#nullable disable - -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// Big data pool reference type. - public partial class BigDataPoolParametrizationReference - { - /// Initializes a new instance of BigDataPoolParametrizationReference. - /// Big data pool reference type. - /// Reference big data pool name. Type: string (or Expression with resultType string). - /// is null. - public BigDataPoolParametrizationReference(BigDataPoolReferenceType referenceType, DataFactoryElement referenceName) - { - Argument.AssertNotNull(referenceName, nameof(referenceName)); - - ReferenceType = referenceType; - ReferenceName = referenceName; - } - - /// Big data pool reference type. - public BigDataPoolReferenceType ReferenceType { get; set; } - /// Reference big data pool name. Type: string (or Expression with resultType string). - public DataFactoryElement ReferenceName { get; set; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/BigDataPoolReferenceType.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/BigDataPoolReferenceType.cs deleted file mode 100644 index c689bd7e..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/BigDataPoolReferenceType.cs +++ /dev/null @@ -1,44 +0,0 @@ -// - -#nullable disable - -using System.ComponentModel; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// Big data pool reference type. - public readonly partial struct BigDataPoolReferenceType : IEquatable - { - private readonly string _value; - - /// Initializes a new instance of . - /// is null. - public BigDataPoolReferenceType(string value) - { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } - - private const string BigDataPoolReferenceValue = "BigDataPoolReference"; - - /// BigDataPoolReference. - public static BigDataPoolReferenceType BigDataPoolReference { get; } = new BigDataPoolReferenceType(BigDataPoolReferenceValue); - /// Determines if two values are the same. - public static bool operator ==(BigDataPoolReferenceType left, BigDataPoolReferenceType right) => left.Equals(right); - /// Determines if two values are not the same. - public static bool operator !=(BigDataPoolReferenceType left, BigDataPoolReferenceType right) => !left.Equals(right); - /// Converts a string to a . - public static implicit operator BigDataPoolReferenceType(string value) => new BigDataPoolReferenceType(value); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override bool Equals(object obj) => obj is BigDataPoolReferenceType other && Equals(other); - /// - public bool Equals(BigDataPoolReferenceType other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override int GetHashCode() => _value?.GetHashCode() ?? 0; - /// - public override string ToString() => _value; - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/BinaryDataset.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/BinaryDataset.Serialization.cs deleted file mode 100644 index 3c63a6c1..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/BinaryDataset.Serialization.cs +++ /dev/null @@ -1,227 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class BinaryDataset : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - writer.WritePropertyName("type"u8); - writer.WriteStringValue(DatasetType); - if (Optional.IsDefined(Description)) - { - writer.WritePropertyName("description"u8); - writer.WriteStringValue(Description); - } - if (Optional.IsDefined(Structure)) - { - writer.WritePropertyName("structure"u8); - JsonSerializer.Serialize(writer, Structure); - } - if (Optional.IsDefined(Schema)) - { - writer.WritePropertyName("schema"u8); - JsonSerializer.Serialize(writer, Schema); - } - writer.WritePropertyName("linkedServiceName"u8); - JsonSerializer.Serialize(writer, LinkedServiceName); if (Optional.IsCollectionDefined(Parameters)) - { - writer.WritePropertyName("parameters"u8); - writer.WriteStartObject(); - foreach (var item in Parameters) - { - writer.WritePropertyName(item.Key); - writer.WriteObjectValue(item.Value); - } - writer.WriteEndObject(); - } - if (Optional.IsCollectionDefined(Annotations)) - { - writer.WritePropertyName("annotations"u8); - writer.WriteStartArray(); - foreach (var item in Annotations) - { - if (item == null) - { - writer.WriteNullValue(); - continue; - } -#if NET6_0_OR_GREATER - writer.WriteRawValue(item); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.ToString()).RootElement); -#endif - } - writer.WriteEndArray(); - } - if (Optional.IsDefined(Folder)) - { - writer.WritePropertyName("folder"u8); - writer.WriteObjectValue(Folder); - } - writer.WritePropertyName("typeProperties"u8); - writer.WriteStartObject(); - if (Optional.IsDefined(DataLocation)) - { - writer.WritePropertyName("location"u8); - writer.WriteObjectValue(DataLocation); - } - if (Optional.IsDefined(Compression)) - { - writer.WritePropertyName("compression"u8); - writer.WriteObjectValue(Compression); - } - writer.WriteEndObject(); - foreach (var item in AdditionalProperties) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.Value.ToString()).RootElement); -#endif - } - writer.WriteEndObject(); - } - - internal static BinaryDataset DeserializeBinaryDataset(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - string type = default; - Optional description = default; - Optional>> structure = default; - Optional>> schema = default; - DataFactoryLinkedServiceReference linkedServiceName = default; - Optional> parameters = default; - Optional> annotations = default; - Optional folder = default; - Optional location = default; - Optional compression = default; - IDictionary> additionalProperties = default; - Dictionary> additionalPropertiesDictionary = new Dictionary>(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("type"u8)) - { - type = property.Value.GetString(); - continue; - } - if (property.NameEquals("description"u8)) - { - description = property.Value.GetString(); - continue; - } - if (property.NameEquals("structure"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - structure = JsonSerializer.Deserialize>>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("schema"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - schema = JsonSerializer.Deserialize>>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("linkedServiceName"u8)) - { - linkedServiceName = JsonSerializer.Deserialize(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("parameters"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - Dictionary dictionary = new Dictionary(); - foreach (var property0 in property.Value.EnumerateObject()) - { - dictionary.Add(property0.Name, EntityParameterSpecification.DeserializeEntityParameterSpecification(property0.Value)); - } - parameters = dictionary; - continue; - } - if (property.NameEquals("annotations"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - if (item.ValueKind == JsonValueKind.Null) - { - array.Add(null); - } - else - { - array.Add(BinaryData.FromString(item.GetRawText())); - } - } - annotations = array; - continue; - } - if (property.NameEquals("folder"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - folder = DatasetFolder.DeserializeDatasetFolder(property.Value); - continue; - } - if (property.NameEquals("typeProperties"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - foreach (var property0 in property.Value.EnumerateObject()) - { - if (property0.NameEquals("location"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - location = DatasetLocation.DeserializeDatasetLocation(property0.Value); - continue; - } - if (property0.NameEquals("compression"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - compression = DatasetCompression.DeserializeDatasetCompression(property0.Value); - continue; - } - } - continue; - } - additionalPropertiesDictionary.Add(property.Name, JsonSerializer.Deserialize>(property.Value.GetRawText())); - } - additionalProperties = additionalPropertiesDictionary; - return new BinaryDataset(type, description.Value, structure.Value, schema.Value, linkedServiceName, Optional.ToDictionary(parameters), Optional.ToList(annotations), folder.Value, additionalProperties, location.Value, compression.Value); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/BinaryDataset.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/BinaryDataset.cs deleted file mode 100644 index 2faaebf8..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/BinaryDataset.cs +++ /dev/null @@ -1,55 +0,0 @@ -// - -#nullable disable - -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// Binary dataset. - public partial class BinaryDataset : DataFactoryDatasetProperties - { - /// Initializes a new instance of BinaryDataset. - /// Linked service reference. - /// is null. - public BinaryDataset(DataFactoryLinkedServiceReference linkedServiceName) : base(linkedServiceName) - { - Argument.AssertNotNull(linkedServiceName, nameof(linkedServiceName)); - - DatasetType = "Binary"; - } - - /// Initializes a new instance of BinaryDataset. - /// Type of dataset. - /// Dataset description. - /// Columns that define the structure of the dataset. Type: array (or Expression with resultType array), itemType: DatasetDataElement. - /// Columns that define the physical type schema of the dataset. Type: array (or Expression with resultType array), itemType: DatasetSchemaDataElement. - /// Linked service reference. - /// Parameters for dataset. - /// List of tags that can be used for describing the Dataset. - /// The folder that this Dataset is in. If not specified, Dataset will appear at the root level. - /// Additional Properties. - /// - /// The location of the Binary storage. - /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. - /// The available derived classes include , , , , , , , , , , , and . - /// - /// The data compression method used for the binary dataset. - internal BinaryDataset(string datasetType, string description, DataFactoryElement> structure, DataFactoryElement> schema, DataFactoryLinkedServiceReference linkedServiceName, IDictionary parameters, IList annotations, DatasetFolder folder, IDictionary> additionalProperties, DatasetLocation dataLocation, DatasetCompression compression) : base(datasetType, description, structure, schema, linkedServiceName, parameters, annotations, folder, additionalProperties) - { - DataLocation = dataLocation; - Compression = compression; - DatasetType = datasetType ?? "Binary"; - } - - /// - /// The location of the Binary storage. - /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. - /// The available derived classes include , , , , , , , , , , , and . - /// - public DatasetLocation DataLocation { get; set; } - /// The data compression method used for the binary dataset. - public DatasetCompression Compression { get; set; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/BinaryReadSettings.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/BinaryReadSettings.Serialization.cs deleted file mode 100644 index ba13135d..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/BinaryReadSettings.Serialization.cs +++ /dev/null @@ -1,67 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class BinaryReadSettings : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - if (Optional.IsDefined(CompressionProperties)) - { - writer.WritePropertyName("compressionProperties"u8); - writer.WriteObjectValue(CompressionProperties); - } - writer.WritePropertyName("type"u8); - writer.WriteStringValue(FormatReadSettingsType); - foreach (var item in AdditionalProperties) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.Value.ToString()).RootElement); -#endif - } - writer.WriteEndObject(); - } - - internal static BinaryReadSettings DeserializeBinaryReadSettings(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - Optional compressionProperties = default; - string type = default; - IDictionary> additionalProperties = default; - Dictionary> additionalPropertiesDictionary = new Dictionary>(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("compressionProperties"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - compressionProperties = CompressionReadSettings.DeserializeCompressionReadSettings(property.Value); - continue; - } - if (property.NameEquals("type"u8)) - { - type = property.Value.GetString(); - continue; - } - additionalPropertiesDictionary.Add(property.Name, JsonSerializer.Deserialize>(property.Value.GetRawText())); - } - additionalProperties = additionalPropertiesDictionary; - return new BinaryReadSettings(type, additionalProperties, compressionProperties.Value); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/BinaryReadSettings.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/BinaryReadSettings.cs deleted file mode 100644 index d3a3b4ea..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/BinaryReadSettings.cs +++ /dev/null @@ -1,39 +0,0 @@ -// - -#nullable disable - -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// Binary read settings. - public partial class BinaryReadSettings : FormatReadSettings - { - /// Initializes a new instance of BinaryReadSettings. - public BinaryReadSettings() - { - FormatReadSettingsType = "BinaryReadSettings"; - } - - /// Initializes a new instance of BinaryReadSettings. - /// The read setting type. - /// Additional Properties. - /// - /// Compression settings. - /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. - /// The available derived classes include , and . - /// - internal BinaryReadSettings(string formatReadSettingsType, IDictionary> additionalProperties, CompressionReadSettings compressionProperties) : base(formatReadSettingsType, additionalProperties) - { - CompressionProperties = compressionProperties; - FormatReadSettingsType = formatReadSettingsType ?? "BinaryReadSettings"; - } - - /// - /// Compression settings. - /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. - /// The available derived classes include , and . - /// - public CompressionReadSettings CompressionProperties { get; set; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/BinarySink.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/BinarySink.Serialization.cs deleted file mode 100644 index fab2bb27..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/BinarySink.Serialization.cs +++ /dev/null @@ -1,157 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class BinarySink : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - if (Optional.IsDefined(StoreSettings)) - { - writer.WritePropertyName("storeSettings"u8); - writer.WriteObjectValue(StoreSettings); - } - writer.WritePropertyName("type"u8); - writer.WriteStringValue(CopySinkType); - if (Optional.IsDefined(WriteBatchSize)) - { - writer.WritePropertyName("writeBatchSize"u8); - JsonSerializer.Serialize(writer, WriteBatchSize); - } - if (Optional.IsDefined(WriteBatchTimeout)) - { - writer.WritePropertyName("writeBatchTimeout"u8); - JsonSerializer.Serialize(writer, WriteBatchTimeout); - } - if (Optional.IsDefined(SinkRetryCount)) - { - writer.WritePropertyName("sinkRetryCount"u8); - JsonSerializer.Serialize(writer, SinkRetryCount); - } - if (Optional.IsDefined(SinkRetryWait)) - { - writer.WritePropertyName("sinkRetryWait"u8); - JsonSerializer.Serialize(writer, SinkRetryWait); - } - if (Optional.IsDefined(MaxConcurrentConnections)) - { - writer.WritePropertyName("maxConcurrentConnections"u8); - JsonSerializer.Serialize(writer, MaxConcurrentConnections); - } - if (Optional.IsDefined(DisableMetricsCollection)) - { - writer.WritePropertyName("disableMetricsCollection"u8); - JsonSerializer.Serialize(writer, DisableMetricsCollection); - } - foreach (var item in AdditionalProperties) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.Value.ToString()).RootElement); -#endif - } - writer.WriteEndObject(); - } - - internal static BinarySink DeserializeBinarySink(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - Optional storeSettings = default; - string type = default; - Optional> writeBatchSize = default; - Optional> writeBatchTimeout = default; - Optional> sinkRetryCount = default; - Optional> sinkRetryWait = default; - Optional> maxConcurrentConnections = default; - Optional> disableMetricsCollection = default; - IDictionary> additionalProperties = default; - Dictionary> additionalPropertiesDictionary = new Dictionary>(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("storeSettings"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - storeSettings = StoreWriteSettings.DeserializeStoreWriteSettings(property.Value); - continue; - } - if (property.NameEquals("type"u8)) - { - type = property.Value.GetString(); - continue; - } - if (property.NameEquals("writeBatchSize"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - writeBatchSize = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("writeBatchTimeout"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - writeBatchTimeout = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("sinkRetryCount"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - sinkRetryCount = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("sinkRetryWait"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - sinkRetryWait = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("maxConcurrentConnections"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - maxConcurrentConnections = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("disableMetricsCollection"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - disableMetricsCollection = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - additionalPropertiesDictionary.Add(property.Name, JsonSerializer.Deserialize>(property.Value.GetRawText())); - } - additionalProperties = additionalPropertiesDictionary; - return new BinarySink(type, writeBatchSize.Value, writeBatchTimeout.Value, sinkRetryCount.Value, sinkRetryWait.Value, maxConcurrentConnections.Value, disableMetricsCollection.Value, additionalProperties, storeSettings.Value); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/BinarySink.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/BinarySink.cs deleted file mode 100644 index 37197c2b..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/BinarySink.cs +++ /dev/null @@ -1,45 +0,0 @@ -// - -#nullable disable - -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// A copy activity Binary sink. - public partial class BinarySink : CopySink - { - /// Initializes a new instance of BinarySink. - public BinarySink() - { - CopySinkType = "BinarySink"; - } - - /// Initializes a new instance of BinarySink. - /// Copy sink type. - /// Write batch size. Type: integer (or Expression with resultType integer), minimum: 0. - /// Write batch timeout. Type: string (or Expression with resultType string), pattern: ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). - /// Sink retry count. Type: integer (or Expression with resultType integer). - /// Sink retry wait. Type: string (or Expression with resultType string), pattern: ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). - /// The maximum concurrent connection count for the sink data store. Type: integer (or Expression with resultType integer). - /// If true, disable data store metrics collection. Default is false. Type: boolean (or Expression with resultType boolean). - /// Additional Properties. - /// - /// Binary store settings. - /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. - /// The available derived classes include , , , , and . - /// - internal BinarySink(string copySinkType, DataFactoryElement writeBatchSize, DataFactoryElement writeBatchTimeout, DataFactoryElement sinkRetryCount, DataFactoryElement sinkRetryWait, DataFactoryElement maxConcurrentConnections, DataFactoryElement disableMetricsCollection, IDictionary> additionalProperties, StoreWriteSettings storeSettings) : base(copySinkType, writeBatchSize, writeBatchTimeout, sinkRetryCount, sinkRetryWait, maxConcurrentConnections, disableMetricsCollection, additionalProperties) - { - StoreSettings = storeSettings; - CopySinkType = copySinkType ?? "BinarySink"; - } - - /// - /// Binary store settings. - /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. - /// The available derived classes include , , , , and . - /// - public StoreWriteSettings StoreSettings { get; set; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/BinarySource.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/BinarySource.Serialization.cs deleted file mode 100644 index 789b63e1..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/BinarySource.Serialization.cs +++ /dev/null @@ -1,142 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class BinarySource : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - if (Optional.IsDefined(StoreSettings)) - { - writer.WritePropertyName("storeSettings"u8); - writer.WriteObjectValue(StoreSettings); - } - if (Optional.IsDefined(FormatSettings)) - { - writer.WritePropertyName("formatSettings"u8); - writer.WriteObjectValue(FormatSettings); - } - writer.WritePropertyName("type"u8); - writer.WriteStringValue(CopySourceType); - if (Optional.IsDefined(SourceRetryCount)) - { - writer.WritePropertyName("sourceRetryCount"u8); - JsonSerializer.Serialize(writer, SourceRetryCount); - } - if (Optional.IsDefined(SourceRetryWait)) - { - writer.WritePropertyName("sourceRetryWait"u8); - JsonSerializer.Serialize(writer, SourceRetryWait); - } - if (Optional.IsDefined(MaxConcurrentConnections)) - { - writer.WritePropertyName("maxConcurrentConnections"u8); - JsonSerializer.Serialize(writer, MaxConcurrentConnections); - } - if (Optional.IsDefined(DisableMetricsCollection)) - { - writer.WritePropertyName("disableMetricsCollection"u8); - JsonSerializer.Serialize(writer, DisableMetricsCollection); - } - foreach (var item in AdditionalProperties) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.Value.ToString()).RootElement); -#endif - } - writer.WriteEndObject(); - } - - internal static BinarySource DeserializeBinarySource(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - Optional storeSettings = default; - Optional formatSettings = default; - string type = default; - Optional> sourceRetryCount = default; - Optional> sourceRetryWait = default; - Optional> maxConcurrentConnections = default; - Optional> disableMetricsCollection = default; - IDictionary> additionalProperties = default; - Dictionary> additionalPropertiesDictionary = new Dictionary>(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("storeSettings"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - storeSettings = StoreReadSettings.DeserializeStoreReadSettings(property.Value); - continue; - } - if (property.NameEquals("formatSettings"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - formatSettings = BinaryReadSettings.DeserializeBinaryReadSettings(property.Value); - continue; - } - if (property.NameEquals("type"u8)) - { - type = property.Value.GetString(); - continue; - } - if (property.NameEquals("sourceRetryCount"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - sourceRetryCount = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("sourceRetryWait"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - sourceRetryWait = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("maxConcurrentConnections"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - maxConcurrentConnections = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("disableMetricsCollection"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - disableMetricsCollection = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - additionalPropertiesDictionary.Add(property.Name, JsonSerializer.Deserialize>(property.Value.GetRawText())); - } - additionalProperties = additionalPropertiesDictionary; - return new BinarySource(type, sourceRetryCount.Value, sourceRetryWait.Value, maxConcurrentConnections.Value, disableMetricsCollection.Value, additionalProperties, storeSettings.Value, formatSettings.Value); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/BinarySource.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/BinarySource.cs deleted file mode 100644 index 33ec83b0..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/BinarySource.cs +++ /dev/null @@ -1,47 +0,0 @@ -// - -#nullable disable - -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// A copy activity Binary source. - public partial class BinarySource : CopyActivitySource - { - /// Initializes a new instance of BinarySource. - public BinarySource() - { - CopySourceType = "BinarySource"; - } - - /// Initializes a new instance of BinarySource. - /// Copy source type. - /// Source retry count. Type: integer (or Expression with resultType integer). - /// Source retry wait. Type: string (or Expression with resultType string), pattern: ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). - /// The maximum concurrent connection count for the source data store. Type: integer (or Expression with resultType integer). - /// If true, disable data store metrics collection. Default is false. Type: boolean (or Expression with resultType boolean). - /// Additional Properties. - /// - /// Binary store settings. - /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. - /// The available derived classes include , , , , , , , , , , , and . - /// - /// Binary format settings. - internal BinarySource(string copySourceType, DataFactoryElement sourceRetryCount, DataFactoryElement sourceRetryWait, DataFactoryElement maxConcurrentConnections, DataFactoryElement disableMetricsCollection, IDictionary> additionalProperties, StoreReadSettings storeSettings, BinaryReadSettings formatSettings) : base(copySourceType, sourceRetryCount, sourceRetryWait, maxConcurrentConnections, disableMetricsCollection, additionalProperties) - { - StoreSettings = storeSettings; - FormatSettings = formatSettings; - CopySourceType = copySourceType ?? "BinarySource"; - } - - /// - /// Binary store settings. - /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. - /// The available derived classes include , , , , , , , , , , , and . - /// - public StoreReadSettings StoreSettings { get; set; } - /// Binary format settings. - public BinaryReadSettings FormatSettings { get; set; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/CassandraLinkedService.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/CassandraLinkedService.Serialization.cs deleted file mode 100644 index 062c23ae..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/CassandraLinkedService.Serialization.cs +++ /dev/null @@ -1,239 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class CassandraLinkedService : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - writer.WritePropertyName("type"u8); - writer.WriteStringValue(LinkedServiceType); - if (Optional.IsDefined(ConnectVia)) - { - writer.WritePropertyName("connectVia"u8); - writer.WriteObjectValue(ConnectVia); - } - if (Optional.IsDefined(Description)) - { - writer.WritePropertyName("description"u8); - writer.WriteStringValue(Description); - } - if (Optional.IsCollectionDefined(Parameters)) - { - writer.WritePropertyName("parameters"u8); - writer.WriteStartObject(); - foreach (var item in Parameters) - { - writer.WritePropertyName(item.Key); - writer.WriteObjectValue(item.Value); - } - writer.WriteEndObject(); - } - if (Optional.IsCollectionDefined(Annotations)) - { - writer.WritePropertyName("annotations"u8); - writer.WriteStartArray(); - foreach (var item in Annotations) - { - if (item == null) - { - writer.WriteNullValue(); - continue; - } -#if NET6_0_OR_GREATER - writer.WriteRawValue(item); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.ToString()).RootElement); -#endif - } - writer.WriteEndArray(); - } - writer.WritePropertyName("typeProperties"u8); - writer.WriteStartObject(); - writer.WritePropertyName("host"u8); - JsonSerializer.Serialize(writer, Host); - if (Optional.IsDefined(AuthenticationType)) - { - writer.WritePropertyName("authenticationType"u8); - JsonSerializer.Serialize(writer, AuthenticationType); - } - if (Optional.IsDefined(Port)) - { - writer.WritePropertyName("port"u8); - JsonSerializer.Serialize(writer, Port); - } - if (Optional.IsDefined(Username)) - { - writer.WritePropertyName("username"u8); - JsonSerializer.Serialize(writer, Username); - } - if (Optional.IsDefined(Password)) - { - writer.WritePropertyName("password"u8); - JsonSerializer.Serialize(writer, Password); - } - if (Optional.IsDefined(EncryptedCredential)) - { - writer.WritePropertyName("encryptedCredential"u8); - writer.WriteStringValue(EncryptedCredential); - } - writer.WriteEndObject(); - foreach (var item in AdditionalProperties) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.Value.ToString()).RootElement); -#endif - } - writer.WriteEndObject(); - } - - internal static CassandraLinkedService DeserializeCassandraLinkedService(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - string type = default; - Optional connectVia = default; - Optional description = default; - Optional> parameters = default; - Optional> annotations = default; - DataFactoryElement host = default; - Optional> authenticationType = default; - Optional> port = default; - Optional> username = default; - Optional password = default; - Optional encryptedCredential = default; - IDictionary> additionalProperties = default; - Dictionary> additionalPropertiesDictionary = new Dictionary>(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("type"u8)) - { - type = property.Value.GetString(); - continue; - } - if (property.NameEquals("connectVia"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - connectVia = IntegrationRuntimeReference.DeserializeIntegrationRuntimeReference(property.Value); - continue; - } - if (property.NameEquals("description"u8)) - { - description = property.Value.GetString(); - continue; - } - if (property.NameEquals("parameters"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - Dictionary dictionary = new Dictionary(); - foreach (var property0 in property.Value.EnumerateObject()) - { - dictionary.Add(property0.Name, EntityParameterSpecification.DeserializeEntityParameterSpecification(property0.Value)); - } - parameters = dictionary; - continue; - } - if (property.NameEquals("annotations"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - if (item.ValueKind == JsonValueKind.Null) - { - array.Add(null); - } - else - { - array.Add(BinaryData.FromString(item.GetRawText())); - } - } - annotations = array; - continue; - } - if (property.NameEquals("typeProperties"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - foreach (var property0 in property.Value.EnumerateObject()) - { - if (property0.NameEquals("host"u8)) - { - host = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("authenticationType"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - authenticationType = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("port"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - port = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("username"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - username = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("password"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - password = JsonSerializer.Deserialize(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("encryptedCredential"u8)) - { - encryptedCredential = property0.Value.GetString(); - continue; - } - } - continue; - } - additionalPropertiesDictionary.Add(property.Name, JsonSerializer.Deserialize>(property.Value.GetRawText())); - } - additionalProperties = additionalPropertiesDictionary; - return new CassandraLinkedService(type, connectVia.Value, description.Value, Optional.ToDictionary(parameters), Optional.ToList(annotations), additionalProperties, host, authenticationType.Value, port.Value, username.Value, password, encryptedCredential.Value); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/CassandraLinkedService.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/CassandraLinkedService.cs deleted file mode 100644 index fd90032c..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/CassandraLinkedService.cs +++ /dev/null @@ -1,61 +0,0 @@ -// - -#nullable disable - -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// Linked service for Cassandra data source. - public partial class CassandraLinkedService : DataFactoryLinkedServiceProperties - { - /// Initializes a new instance of CassandraLinkedService. - /// Host name for connection. Type: string (or Expression with resultType string). - /// is null. - public CassandraLinkedService(DataFactoryElement host) - { - Argument.AssertNotNull(host, nameof(host)); - - Host = host; - LinkedServiceType = "Cassandra"; - } - - /// Initializes a new instance of CassandraLinkedService. - /// Type of linked service. - /// The integration runtime reference. - /// Linked service description. - /// Parameters for linked service. - /// List of tags that can be used for describing the linked service. - /// Additional Properties. - /// Host name for connection. Type: string (or Expression with resultType string). - /// AuthenticationType to be used for connection. Type: string (or Expression with resultType string). - /// The port for the connection. Type: integer (or Expression with resultType integer). - /// Username for authentication. Type: string (or Expression with resultType string). - /// Password for authentication. - /// The encrypted credential used for authentication. Credentials are encrypted using the integration runtime credential manager. Type: string. - internal CassandraLinkedService(string linkedServiceType, IntegrationRuntimeReference connectVia, string description, IDictionary parameters, IList annotations, IDictionary> additionalProperties, DataFactoryElement host, DataFactoryElement authenticationType, DataFactoryElement port, DataFactoryElement username, DataFactorySecretBaseDefinition password, string encryptedCredential) : base(linkedServiceType, connectVia, description, parameters, annotations, additionalProperties) - { - Host = host; - AuthenticationType = authenticationType; - Port = port; - Username = username; - Password = password; - EncryptedCredential = encryptedCredential; - LinkedServiceType = linkedServiceType ?? "Cassandra"; - } - - /// Host name for connection. Type: string (or Expression with resultType string). - public DataFactoryElement Host { get; set; } - /// AuthenticationType to be used for connection. Type: string (or Expression with resultType string). - public DataFactoryElement AuthenticationType { get; set; } - /// The port for the connection. Type: integer (or Expression with resultType integer). - public DataFactoryElement Port { get; set; } - /// Username for authentication. Type: string (or Expression with resultType string). - public DataFactoryElement Username { get; set; } - /// Password for authentication. - public DataFactorySecretBaseDefinition Password { get; set; } - /// The encrypted credential used for authentication. Credentials are encrypted using the integration runtime credential manager. Type: string. - public string EncryptedCredential { get; set; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/CassandraSource.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/CassandraSource.Serialization.cs deleted file mode 100644 index afc0ee79..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/CassandraSource.Serialization.cs +++ /dev/null @@ -1,176 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class CassandraSource : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - if (Optional.IsDefined(Query)) - { - writer.WritePropertyName("query"u8); - JsonSerializer.Serialize(writer, Query); - } - if (Optional.IsDefined(ConsistencyLevel)) - { - writer.WritePropertyName("consistencyLevel"u8); - writer.WriteStringValue(ConsistencyLevel.Value.ToString()); - } - if (Optional.IsDefined(QueryTimeout)) - { - writer.WritePropertyName("queryTimeout"u8); - JsonSerializer.Serialize(writer, QueryTimeout); - } - if (Optional.IsDefined(AdditionalColumns)) - { - writer.WritePropertyName("additionalColumns"u8); -#if NET6_0_OR_GREATER - writer.WriteRawValue(AdditionalColumns); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(AdditionalColumns.ToString()).RootElement); -#endif - } - writer.WritePropertyName("type"u8); - writer.WriteStringValue(CopySourceType); - if (Optional.IsDefined(SourceRetryCount)) - { - writer.WritePropertyName("sourceRetryCount"u8); - JsonSerializer.Serialize(writer, SourceRetryCount); - } - if (Optional.IsDefined(SourceRetryWait)) - { - writer.WritePropertyName("sourceRetryWait"u8); - JsonSerializer.Serialize(writer, SourceRetryWait); - } - if (Optional.IsDefined(MaxConcurrentConnections)) - { - writer.WritePropertyName("maxConcurrentConnections"u8); - JsonSerializer.Serialize(writer, MaxConcurrentConnections); - } - if (Optional.IsDefined(DisableMetricsCollection)) - { - writer.WritePropertyName("disableMetricsCollection"u8); - JsonSerializer.Serialize(writer, DisableMetricsCollection); - } - foreach (var item in AdditionalProperties) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.Value.ToString()).RootElement); -#endif - } - writer.WriteEndObject(); - } - - internal static CassandraSource DeserializeCassandraSource(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - Optional> query = default; - Optional consistencyLevel = default; - Optional> queryTimeout = default; - Optional additionalColumns = default; - string type = default; - Optional> sourceRetryCount = default; - Optional> sourceRetryWait = default; - Optional> maxConcurrentConnections = default; - Optional> disableMetricsCollection = default; - IDictionary> additionalProperties = default; - Dictionary> additionalPropertiesDictionary = new Dictionary>(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("query"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - query = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("consistencyLevel"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - consistencyLevel = new CassandraSourceReadConsistencyLevel(property.Value.GetString()); - continue; - } - if (property.NameEquals("queryTimeout"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - queryTimeout = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("additionalColumns"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - additionalColumns = BinaryData.FromString(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("type"u8)) - { - type = property.Value.GetString(); - continue; - } - if (property.NameEquals("sourceRetryCount"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - sourceRetryCount = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("sourceRetryWait"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - sourceRetryWait = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("maxConcurrentConnections"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - maxConcurrentConnections = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("disableMetricsCollection"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - disableMetricsCollection = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - additionalPropertiesDictionary.Add(property.Name, JsonSerializer.Deserialize>(property.Value.GetRawText())); - } - additionalProperties = additionalPropertiesDictionary; - return new CassandraSource(type, sourceRetryCount.Value, sourceRetryWait.Value, maxConcurrentConnections.Value, disableMetricsCollection.Value, additionalProperties, queryTimeout.Value, additionalColumns.Value, query.Value, Optional.ToNullable(consistencyLevel)); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/CassandraSource.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/CassandraSource.cs deleted file mode 100644 index b6f456f7..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/CassandraSource.cs +++ /dev/null @@ -1,41 +0,0 @@ -// - -#nullable disable - -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// A copy activity source for a Cassandra database. - public partial class CassandraSource : TabularSource - { - /// Initializes a new instance of CassandraSource. - public CassandraSource() - { - CopySourceType = "CassandraSource"; - } - - /// Initializes a new instance of CassandraSource. - /// Copy source type. - /// Source retry count. Type: integer (or Expression with resultType integer). - /// Source retry wait. Type: string (or Expression with resultType string), pattern: ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). - /// The maximum concurrent connection count for the source data store. Type: integer (or Expression with resultType integer). - /// If true, disable data store metrics collection. Default is false. Type: boolean (or Expression with resultType boolean). - /// Additional Properties. - /// 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). - /// Database query. Should be a SQL-92 query expression or Cassandra Query Language (CQL) command. Type: string (or Expression with resultType string). - /// The consistency level specifies how many Cassandra servers must respond to a read request before returning data to the client application. Cassandra checks the specified number of Cassandra servers for data to satisfy the read request. Must be one of cassandraSourceReadConsistencyLevels. The default value is 'ONE'. It is case-insensitive. - internal CassandraSource(string copySourceType, DataFactoryElement sourceRetryCount, DataFactoryElement sourceRetryWait, DataFactoryElement maxConcurrentConnections, DataFactoryElement disableMetricsCollection, IDictionary> additionalProperties, DataFactoryElement queryTimeout, BinaryData additionalColumns, DataFactoryElement query, CassandraSourceReadConsistencyLevel? consistencyLevel) : base(copySourceType, sourceRetryCount, sourceRetryWait, maxConcurrentConnections, disableMetricsCollection, additionalProperties, queryTimeout, additionalColumns) - { - Query = query; - ConsistencyLevel = consistencyLevel; - CopySourceType = copySourceType ?? "CassandraSource"; - } - - /// Database query. Should be a SQL-92 query expression or Cassandra Query Language (CQL) command. Type: string (or Expression with resultType string). - public DataFactoryElement Query { get; set; } - /// The consistency level specifies how many Cassandra servers must respond to a read request before returning data to the client application. Cassandra checks the specified number of Cassandra servers for data to satisfy the read request. Must be one of cassandraSourceReadConsistencyLevels. The default value is 'ONE'. It is case-insensitive. - public CassandraSourceReadConsistencyLevel? ConsistencyLevel { get; set; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/CassandraSourceReadConsistencyLevel.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/CassandraSourceReadConsistencyLevel.cs deleted file mode 100644 index 38cd0773..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/CassandraSourceReadConsistencyLevel.cs +++ /dev/null @@ -1,71 +0,0 @@ -// - -#nullable disable - -using System.ComponentModel; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// The consistency level specifies how many Cassandra servers must respond to a read request before returning data to the client application. Cassandra checks the specified number of Cassandra servers for data to satisfy the read request. Must be one of cassandraSourceReadConsistencyLevels. The default value is 'ONE'. It is case-insensitive. - public readonly partial struct CassandraSourceReadConsistencyLevel : IEquatable - { - private readonly string _value; - - /// Initializes a new instance of . - /// is null. - public CassandraSourceReadConsistencyLevel(string value) - { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } - - private const string AllValue = "ALL"; - private const string EachQuorumValue = "EACH_QUORUM"; - private const string QuorumValue = "QUORUM"; - private const string LocalQuorumValue = "LOCAL_QUORUM"; - private const string OneValue = "ONE"; - private const string TwoValue = "TWO"; - private const string ThreeValue = "THREE"; - private const string LocalOneValue = "LOCAL_ONE"; - private const string SerialValue = "SERIAL"; - private const string LocalSerialValue = "LOCAL_SERIAL"; - - /// ALL. - public static CassandraSourceReadConsistencyLevel All { get; } = new CassandraSourceReadConsistencyLevel(AllValue); - /// EACH_QUORUM. - public static CassandraSourceReadConsistencyLevel EachQuorum { get; } = new CassandraSourceReadConsistencyLevel(EachQuorumValue); - /// QUORUM. - public static CassandraSourceReadConsistencyLevel Quorum { get; } = new CassandraSourceReadConsistencyLevel(QuorumValue); - /// LOCAL_QUORUM. - public static CassandraSourceReadConsistencyLevel LocalQuorum { get; } = new CassandraSourceReadConsistencyLevel(LocalQuorumValue); - /// ONE. - public static CassandraSourceReadConsistencyLevel One { get; } = new CassandraSourceReadConsistencyLevel(OneValue); - /// TWO. - public static CassandraSourceReadConsistencyLevel Two { get; } = new CassandraSourceReadConsistencyLevel(TwoValue); - /// THREE. - public static CassandraSourceReadConsistencyLevel Three { get; } = new CassandraSourceReadConsistencyLevel(ThreeValue); - /// LOCAL_ONE. - public static CassandraSourceReadConsistencyLevel LocalOne { get; } = new CassandraSourceReadConsistencyLevel(LocalOneValue); - /// SERIAL. - public static CassandraSourceReadConsistencyLevel Serial { get; } = new CassandraSourceReadConsistencyLevel(SerialValue); - /// LOCAL_SERIAL. - public static CassandraSourceReadConsistencyLevel LocalSerial { get; } = new CassandraSourceReadConsistencyLevel(LocalSerialValue); - /// Determines if two values are the same. - public static bool operator ==(CassandraSourceReadConsistencyLevel left, CassandraSourceReadConsistencyLevel right) => left.Equals(right); - /// Determines if two values are not the same. - public static bool operator !=(CassandraSourceReadConsistencyLevel left, CassandraSourceReadConsistencyLevel right) => !left.Equals(right); - /// Converts a string to a . - public static implicit operator CassandraSourceReadConsistencyLevel(string value) => new CassandraSourceReadConsistencyLevel(value); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override bool Equals(object obj) => obj is CassandraSourceReadConsistencyLevel other && Equals(other); - /// - public bool Equals(CassandraSourceReadConsistencyLevel other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override int GetHashCode() => _value?.GetHashCode() ?? 0; - /// - public override string ToString() => _value; - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/CassandraTableDataset.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/CassandraTableDataset.Serialization.cs deleted file mode 100644 index c70862ba..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/CassandraTableDataset.Serialization.cs +++ /dev/null @@ -1,227 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class CassandraTableDataset : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - writer.WritePropertyName("type"u8); - writer.WriteStringValue(DatasetType); - if (Optional.IsDefined(Description)) - { - writer.WritePropertyName("description"u8); - writer.WriteStringValue(Description); - } - if (Optional.IsDefined(Structure)) - { - writer.WritePropertyName("structure"u8); - JsonSerializer.Serialize(writer, Structure); - } - if (Optional.IsDefined(Schema)) - { - writer.WritePropertyName("schema"u8); - JsonSerializer.Serialize(writer, Schema); - } - writer.WritePropertyName("linkedServiceName"u8); - JsonSerializer.Serialize(writer, LinkedServiceName); if (Optional.IsCollectionDefined(Parameters)) - { - writer.WritePropertyName("parameters"u8); - writer.WriteStartObject(); - foreach (var item in Parameters) - { - writer.WritePropertyName(item.Key); - writer.WriteObjectValue(item.Value); - } - writer.WriteEndObject(); - } - if (Optional.IsCollectionDefined(Annotations)) - { - writer.WritePropertyName("annotations"u8); - writer.WriteStartArray(); - foreach (var item in Annotations) - { - if (item == null) - { - writer.WriteNullValue(); - continue; - } -#if NET6_0_OR_GREATER - writer.WriteRawValue(item); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.ToString()).RootElement); -#endif - } - writer.WriteEndArray(); - } - if (Optional.IsDefined(Folder)) - { - writer.WritePropertyName("folder"u8); - writer.WriteObjectValue(Folder); - } - writer.WritePropertyName("typeProperties"u8); - writer.WriteStartObject(); - if (Optional.IsDefined(TableName)) - { - writer.WritePropertyName("tableName"u8); - JsonSerializer.Serialize(writer, TableName); - } - if (Optional.IsDefined(Keyspace)) - { - writer.WritePropertyName("keyspace"u8); - JsonSerializer.Serialize(writer, Keyspace); - } - writer.WriteEndObject(); - foreach (var item in AdditionalProperties) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.Value.ToString()).RootElement); -#endif - } - writer.WriteEndObject(); - } - - internal static CassandraTableDataset DeserializeCassandraTableDataset(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - string type = default; - Optional description = default; - Optional>> structure = default; - Optional>> schema = default; - DataFactoryLinkedServiceReference linkedServiceName = default; - Optional> parameters = default; - Optional> annotations = default; - Optional folder = default; - Optional> tableName = default; - Optional> keyspace = default; - IDictionary> additionalProperties = default; - Dictionary> additionalPropertiesDictionary = new Dictionary>(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("type"u8)) - { - type = property.Value.GetString(); - continue; - } - if (property.NameEquals("description"u8)) - { - description = property.Value.GetString(); - continue; - } - if (property.NameEquals("structure"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - structure = JsonSerializer.Deserialize>>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("schema"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - schema = JsonSerializer.Deserialize>>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("linkedServiceName"u8)) - { - linkedServiceName = JsonSerializer.Deserialize(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("parameters"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - Dictionary dictionary = new Dictionary(); - foreach (var property0 in property.Value.EnumerateObject()) - { - dictionary.Add(property0.Name, EntityParameterSpecification.DeserializeEntityParameterSpecification(property0.Value)); - } - parameters = dictionary; - continue; - } - if (property.NameEquals("annotations"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - if (item.ValueKind == JsonValueKind.Null) - { - array.Add(null); - } - else - { - array.Add(BinaryData.FromString(item.GetRawText())); - } - } - annotations = array; - continue; - } - if (property.NameEquals("folder"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - folder = DatasetFolder.DeserializeDatasetFolder(property.Value); - continue; - } - if (property.NameEquals("typeProperties"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - foreach (var property0 in property.Value.EnumerateObject()) - { - if (property0.NameEquals("tableName"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - tableName = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("keyspace"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - keyspace = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - } - continue; - } - additionalPropertiesDictionary.Add(property.Name, JsonSerializer.Deserialize>(property.Value.GetRawText())); - } - additionalProperties = additionalPropertiesDictionary; - return new CassandraTableDataset(type, description.Value, structure.Value, schema.Value, linkedServiceName, Optional.ToDictionary(parameters), Optional.ToList(annotations), folder.Value, additionalProperties, tableName.Value, keyspace.Value); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/CassandraTableDataset.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/CassandraTableDataset.cs deleted file mode 100644 index 938eb3b7..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/CassandraTableDataset.cs +++ /dev/null @@ -1,47 +0,0 @@ -// - -#nullable disable - -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// The Cassandra database dataset. - public partial class CassandraTableDataset : DataFactoryDatasetProperties - { - /// Initializes a new instance of CassandraTableDataset. - /// Linked service reference. - /// is null. - public CassandraTableDataset(DataFactoryLinkedServiceReference linkedServiceName) : base(linkedServiceName) - { - Argument.AssertNotNull(linkedServiceName, nameof(linkedServiceName)); - - DatasetType = "CassandraTable"; - } - - /// Initializes a new instance of CassandraTableDataset. - /// Type of dataset. - /// Dataset description. - /// Columns that define the structure of the dataset. Type: array (or Expression with resultType array), itemType: DatasetDataElement. - /// Columns that define the physical type schema of the dataset. Type: array (or Expression with resultType array), itemType: DatasetSchemaDataElement. - /// Linked service reference. - /// Parameters for dataset. - /// List of tags that can be used for describing the Dataset. - /// The folder that this Dataset is in. If not specified, Dataset will appear at the root level. - /// Additional Properties. - /// The table name of the Cassandra database. Type: string (or Expression with resultType string). - /// The keyspace of the Cassandra database. Type: string (or Expression with resultType string). - internal CassandraTableDataset(string datasetType, string description, DataFactoryElement> structure, DataFactoryElement> schema, DataFactoryLinkedServiceReference linkedServiceName, IDictionary parameters, IList annotations, DatasetFolder folder, IDictionary> additionalProperties, DataFactoryElement tableName, DataFactoryElement keyspace) : base(datasetType, description, structure, schema, linkedServiceName, parameters, annotations, folder, additionalProperties) - { - TableName = tableName; - Keyspace = keyspace; - DatasetType = datasetType ?? "CassandraTable"; - } - - /// The table name of the Cassandra database. Type: string (or Expression with resultType string). - public DataFactoryElement TableName { get; set; } - /// The keyspace of the Cassandra database. Type: string (or Expression with resultType string). - public DataFactoryElement Keyspace { get; set; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/ChainingTrigger.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/ChainingTrigger.Serialization.cs deleted file mode 100644 index 4182c77e..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/ChainingTrigger.Serialization.cs +++ /dev/null @@ -1,163 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class ChainingTrigger : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - writer.WritePropertyName("pipeline"u8); - writer.WriteObjectValue(Pipeline); - writer.WritePropertyName("type"u8); - writer.WriteStringValue(TriggerType); - if (Optional.IsDefined(Description)) - { - writer.WritePropertyName("description"u8); - writer.WriteStringValue(Description); - } - if (Optional.IsCollectionDefined(Annotations)) - { - writer.WritePropertyName("annotations"u8); - writer.WriteStartArray(); - foreach (var item in Annotations) - { - if (item == null) - { - writer.WriteNullValue(); - continue; - } -#if NET6_0_OR_GREATER - writer.WriteRawValue(item); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.ToString()).RootElement); -#endif - } - writer.WriteEndArray(); - } - writer.WritePropertyName("typeProperties"u8); - writer.WriteStartObject(); - writer.WritePropertyName("dependsOn"u8); - writer.WriteStartArray(); - foreach (var item in DependsOn) - { - writer.WriteObjectValue(item); - } - writer.WriteEndArray(); - writer.WritePropertyName("runDimension"u8); - writer.WriteStringValue(RunDimension); - writer.WriteEndObject(); - foreach (var item in AdditionalProperties) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.Value.ToString()).RootElement); -#endif - } - writer.WriteEndObject(); - } - - internal static ChainingTrigger DeserializeChainingTrigger(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - TriggerPipelineReference pipeline = default; - string type = default; - Optional description = default; - Optional runtimeState = default; - Optional> annotations = default; - IList dependsOn = default; - string runDimension = default; - IDictionary> additionalProperties = default; - Dictionary> additionalPropertiesDictionary = new Dictionary>(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("pipeline"u8)) - { - pipeline = TriggerPipelineReference.DeserializeTriggerPipelineReference(property.Value); - continue; - } - if (property.NameEquals("type"u8)) - { - type = property.Value.GetString(); - continue; - } - if (property.NameEquals("description"u8)) - { - description = property.Value.GetString(); - continue; - } - if (property.NameEquals("runtimeState"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - runtimeState = new DataFactoryTriggerRuntimeState(property.Value.GetString()); - continue; - } - if (property.NameEquals("annotations"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - if (item.ValueKind == JsonValueKind.Null) - { - array.Add(null); - } - else - { - array.Add(BinaryData.FromString(item.GetRawText())); - } - } - annotations = array; - continue; - } - if (property.NameEquals("typeProperties"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - foreach (var property0 in property.Value.EnumerateObject()) - { - if (property0.NameEquals("dependsOn"u8)) - { - List array = new List(); - foreach (var item in property0.Value.EnumerateArray()) - { - array.Add(DataFactoryPipelineReference.DeserializeDataFactoryPipelineReference(item)); - } - dependsOn = array; - continue; - } - if (property0.NameEquals("runDimension"u8)) - { - runDimension = property0.Value.GetString(); - continue; - } - } - continue; - } - additionalPropertiesDictionary.Add(property.Name, JsonSerializer.Deserialize>(property.Value.GetRawText())); - } - additionalProperties = additionalPropertiesDictionary; - return new ChainingTrigger(type, description.Value, Optional.ToNullable(runtimeState), Optional.ToList(annotations), additionalProperties, pipeline, dependsOn, runDimension); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/ChainingTrigger.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/ChainingTrigger.cs deleted file mode 100644 index 0808d71c..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/ChainingTrigger.cs +++ /dev/null @@ -1,54 +0,0 @@ -// - -#nullable disable - -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// Trigger that allows the referenced pipeline to depend on other pipeline runs based on runDimension Name/Value pairs. Upstream pipelines should declare the same runDimension Name and their runs should have the values for those runDimensions. The referenced pipeline run would be triggered if the values for the runDimension match for all upstream pipeline runs. - public partial class ChainingTrigger : DataFactoryTriggerProperties - { - /// Initializes a new instance of ChainingTrigger. - /// Pipeline for which runs are created when all upstream pipelines complete successfully. - /// Upstream Pipelines. - /// Run Dimension property that needs to be emitted by upstream pipelines. - /// , or is null. - public ChainingTrigger(TriggerPipelineReference pipeline, IEnumerable dependsOn, string runDimension) - { - Argument.AssertNotNull(pipeline, nameof(pipeline)); - Argument.AssertNotNull(dependsOn, nameof(dependsOn)); - Argument.AssertNotNull(runDimension, nameof(runDimension)); - - Pipeline = pipeline; - DependsOn = dependsOn.ToList(); - RunDimension = runDimension; - TriggerType = "ChainingTrigger"; - } - - /// Initializes a new instance of ChainingTrigger. - /// Trigger type. - /// Trigger description. - /// Indicates if trigger is running or not. Updated when Start/Stop APIs are called on the Trigger. - /// List of tags that can be used for describing the trigger. - /// Additional Properties. - /// Pipeline for which runs are created when all upstream pipelines complete successfully. - /// Upstream Pipelines. - /// Run Dimension property that needs to be emitted by upstream pipelines. - internal ChainingTrigger(string triggerType, string description, DataFactoryTriggerRuntimeState? runtimeState, IList annotations, IDictionary> additionalProperties, TriggerPipelineReference pipeline, IList dependsOn, string runDimension) : base(triggerType, description, runtimeState, annotations, additionalProperties) - { - Pipeline = pipeline; - DependsOn = dependsOn; - RunDimension = runDimension; - TriggerType = triggerType ?? "ChainingTrigger"; - } - - /// Pipeline for which runs are created when all upstream pipelines complete successfully. - public TriggerPipelineReference Pipeline { get; set; } - /// Upstream Pipelines. - public IList DependsOn { get; } - /// Run Dimension property that needs to be emitted by upstream pipelines. - public string RunDimension { get; set; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/ChangeDataCaptureFolder.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/ChangeDataCaptureFolder.Serialization.cs deleted file mode 100644 index ab3c91c0..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/ChangeDataCaptureFolder.Serialization.cs +++ /dev/null @@ -1,41 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; - -namespace AzureDataFactory.TestingFramework.Models -{ - internal partial class ChangeDataCaptureFolder : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - if (Optional.IsDefined(Name)) - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - writer.WriteEndObject(); - } - - internal static ChangeDataCaptureFolder DeserializeChangeDataCaptureFolder(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - Optional name = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("name"u8)) - { - name = property.Value.GetString(); - continue; - } - } - return new ChangeDataCaptureFolder(name.Value); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/ChangeDataCaptureFolder.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/ChangeDataCaptureFolder.cs deleted file mode 100644 index d9eff4a9..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/ChangeDataCaptureFolder.cs +++ /dev/null @@ -1,25 +0,0 @@ -// - -#nullable disable - -namespace AzureDataFactory.TestingFramework.Models -{ - /// The folder that this CDC is in. If not specified, CDC will appear at the root level. - internal partial class ChangeDataCaptureFolder - { - /// Initializes a new instance of ChangeDataCaptureFolder. - public ChangeDataCaptureFolder() - { - } - - /// Initializes a new instance of ChangeDataCaptureFolder. - /// The name of the folder that this CDC is in. - internal ChangeDataCaptureFolder(string name) - { - Name = name; - } - - /// The name of the folder that this CDC is in. - public string Name { get; set; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/ChangeDataCaptureListResult.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/ChangeDataCaptureListResult.Serialization.cs deleted file mode 100644 index 2a123467..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/ChangeDataCaptureListResult.Serialization.cs +++ /dev/null @@ -1,42 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; -using Azure.ResourceManager.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - internal partial class ChangeDataCaptureListResult - { - internal static ChangeDataCaptureListResult DeserializeChangeDataCaptureListResult(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - IReadOnlyList value = default; - Optional nextLink = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("value"u8)) - { - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - array.Add(DataFactoryChangeDataCaptureData.DeserializeDataFactoryChangeDataCaptureData(item)); - } - value = array; - continue; - } - if (property.NameEquals("nextLink"u8)) - { - nextLink = property.Value.GetString(); - continue; - } - } - return new ChangeDataCaptureListResult(value, nextLink.Value); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/ChangeDataCaptureListResult.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/ChangeDataCaptureListResult.cs deleted file mode 100644 index ac44bb79..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/ChangeDataCaptureListResult.cs +++ /dev/null @@ -1,37 +0,0 @@ -// - -#nullable disable - -using Azure.Core; -using Azure.ResourceManager.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// A list of change data capture resources. - internal partial class ChangeDataCaptureListResult - { - /// Initializes a new instance of ChangeDataCaptureListResult. - /// Lists all resources of type change data capture. - /// is null. - internal ChangeDataCaptureListResult(IEnumerable value) - { - Argument.AssertNotNull(value, nameof(value)); - - Value = value.ToList(); - } - - /// Initializes a new instance of ChangeDataCaptureListResult. - /// Lists all resources of type change data capture. - /// The link to the next page of results, if any remaining results exist. - internal ChangeDataCaptureListResult(IReadOnlyList value, string nextLink) - { - Value = value; - NextLink = nextLink; - } - - /// Lists all resources of type change data capture. - public IReadOnlyList Value { get; } - /// The link to the next page of results, if any remaining results exist. - public string NextLink { get; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/CmdkeySetup.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/CmdkeySetup.Serialization.cs deleted file mode 100644 index 7bd8cae7..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/CmdkeySetup.Serialization.cs +++ /dev/null @@ -1,85 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class CmdkeySetup : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - writer.WritePropertyName("type"u8); - writer.WriteStringValue(CustomSetupBaseType); - writer.WritePropertyName("typeProperties"u8); - writer.WriteStartObject(); - writer.WritePropertyName("targetName"u8); -#if NET6_0_OR_GREATER - writer.WriteRawValue(TargetName); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(TargetName.ToString()).RootElement); -#endif - writer.WritePropertyName("userName"u8); -#if NET6_0_OR_GREATER - writer.WriteRawValue(UserName); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(UserName.ToString()).RootElement); -#endif - writer.WritePropertyName("password"u8); - JsonSerializer.Serialize(writer, Password); writer.WriteEndObject(); - writer.WriteEndObject(); - } - - internal static CmdkeySetup DeserializeCmdkeySetup(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - string type = default; - BinaryData targetName = default; - BinaryData userName = default; - DataFactorySecretBaseDefinition password = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("type"u8)) - { - type = property.Value.GetString(); - continue; - } - if (property.NameEquals("typeProperties"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - foreach (var property0 in property.Value.EnumerateObject()) - { - if (property0.NameEquals("targetName"u8)) - { - targetName = BinaryData.FromString(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("userName"u8)) - { - userName = BinaryData.FromString(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("password"u8)) - { - password = JsonSerializer.Deserialize(property0.Value.GetRawText()); - continue; - } - } - continue; - } - } - return new CmdkeySetup(type, targetName, userName, password); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/CmdkeySetup.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/CmdkeySetup.cs deleted file mode 100644 index 89417f76..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/CmdkeySetup.cs +++ /dev/null @@ -1,108 +0,0 @@ -// - -#nullable disable - -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// The custom setup of running cmdkey commands. - public partial class CmdkeySetup : CustomSetupBase - { - /// Initializes a new instance of CmdkeySetup. - /// The server name of data source access. - /// The user name of data source access. - /// The password of data source access. - /// , or is null. - public CmdkeySetup(BinaryData targetName, BinaryData userName, DataFactorySecretBaseDefinition password) - { - Argument.AssertNotNull(targetName, nameof(targetName)); - Argument.AssertNotNull(userName, nameof(userName)); - Argument.AssertNotNull(password, nameof(password)); - - TargetName = targetName; - UserName = userName; - Password = password; - CustomSetupBaseType = "CmdkeySetup"; - } - - /// Initializes a new instance of CmdkeySetup. - /// The type of custom setup. - /// The server name of data source access. - /// The user name of data source access. - /// The password of data source access. - internal CmdkeySetup(string customSetupBaseType, BinaryData targetName, BinaryData userName, DataFactorySecretBaseDefinition password) : base(customSetupBaseType) - { - TargetName = targetName; - UserName = userName; - Password = password; - CustomSetupBaseType = customSetupBaseType ?? "CmdkeySetup"; - } - - /// - /// The server name of data source access. - /// - /// To assign an object to this property use . - /// - /// - /// To assign an already formated json string to this property use . - /// - /// - /// Examples: - /// - /// - /// BinaryData.FromObjectAsJson("foo") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromString("\"foo\"") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromObjectAsJson(new { key = "value" }) - /// Creates a payload of { "key": "value" }. - /// - /// - /// BinaryData.FromString("{\"key\": \"value\"}") - /// Creates a payload of { "key": "value" }. - /// - /// - /// - /// - public BinaryData TargetName { get; set; } - /// - /// The user name of data source access. - /// - /// To assign an object to this property use . - /// - /// - /// To assign an already formated json string to this property use . - /// - /// - /// Examples: - /// - /// - /// BinaryData.FromObjectAsJson("foo") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromString("\"foo\"") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromObjectAsJson(new { key = "value" }) - /// Creates a payload of { "key": "value" }. - /// - /// - /// BinaryData.FromString("{\"key\": \"value\"}") - /// Creates a payload of { "key": "value" }. - /// - /// - /// - /// - public BinaryData UserName { get; set; } - /// The password of data source access. - public DataFactorySecretBaseDefinition Password { get; set; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/CommonDataServiceForAppsEntityDataset.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/CommonDataServiceForAppsEntityDataset.Serialization.cs deleted file mode 100644 index 49858932..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/CommonDataServiceForAppsEntityDataset.Serialization.cs +++ /dev/null @@ -1,212 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class CommonDataServiceForAppsEntityDataset : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - writer.WritePropertyName("type"u8); - writer.WriteStringValue(DatasetType); - if (Optional.IsDefined(Description)) - { - writer.WritePropertyName("description"u8); - writer.WriteStringValue(Description); - } - if (Optional.IsDefined(Structure)) - { - writer.WritePropertyName("structure"u8); - JsonSerializer.Serialize(writer, Structure); - } - if (Optional.IsDefined(Schema)) - { - writer.WritePropertyName("schema"u8); - JsonSerializer.Serialize(writer, Schema); - } - writer.WritePropertyName("linkedServiceName"u8); - JsonSerializer.Serialize(writer, LinkedServiceName); if (Optional.IsCollectionDefined(Parameters)) - { - writer.WritePropertyName("parameters"u8); - writer.WriteStartObject(); - foreach (var item in Parameters) - { - writer.WritePropertyName(item.Key); - writer.WriteObjectValue(item.Value); - } - writer.WriteEndObject(); - } - if (Optional.IsCollectionDefined(Annotations)) - { - writer.WritePropertyName("annotations"u8); - writer.WriteStartArray(); - foreach (var item in Annotations) - { - if (item == null) - { - writer.WriteNullValue(); - continue; - } -#if NET6_0_OR_GREATER - writer.WriteRawValue(item); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.ToString()).RootElement); -#endif - } - writer.WriteEndArray(); - } - if (Optional.IsDefined(Folder)) - { - writer.WritePropertyName("folder"u8); - writer.WriteObjectValue(Folder); - } - writer.WritePropertyName("typeProperties"u8); - writer.WriteStartObject(); - if (Optional.IsDefined(EntityName)) - { - writer.WritePropertyName("entityName"u8); - JsonSerializer.Serialize(writer, EntityName); - } - writer.WriteEndObject(); - foreach (var item in AdditionalProperties) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.Value.ToString()).RootElement); -#endif - } - writer.WriteEndObject(); - } - - internal static CommonDataServiceForAppsEntityDataset DeserializeCommonDataServiceForAppsEntityDataset(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - string type = default; - Optional description = default; - Optional>> structure = default; - Optional>> schema = default; - DataFactoryLinkedServiceReference linkedServiceName = default; - Optional> parameters = default; - Optional> annotations = default; - Optional folder = default; - Optional> entityName = default; - IDictionary> additionalProperties = default; - Dictionary> additionalPropertiesDictionary = new Dictionary>(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("type"u8)) - { - type = property.Value.GetString(); - continue; - } - if (property.NameEquals("description"u8)) - { - description = property.Value.GetString(); - continue; - } - if (property.NameEquals("structure"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - structure = JsonSerializer.Deserialize>>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("schema"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - schema = JsonSerializer.Deserialize>>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("linkedServiceName"u8)) - { - linkedServiceName = JsonSerializer.Deserialize(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("parameters"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - Dictionary dictionary = new Dictionary(); - foreach (var property0 in property.Value.EnumerateObject()) - { - dictionary.Add(property0.Name, EntityParameterSpecification.DeserializeEntityParameterSpecification(property0.Value)); - } - parameters = dictionary; - continue; - } - if (property.NameEquals("annotations"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - if (item.ValueKind == JsonValueKind.Null) - { - array.Add(null); - } - else - { - array.Add(BinaryData.FromString(item.GetRawText())); - } - } - annotations = array; - continue; - } - if (property.NameEquals("folder"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - folder = DatasetFolder.DeserializeDatasetFolder(property.Value); - continue; - } - if (property.NameEquals("typeProperties"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - foreach (var property0 in property.Value.EnumerateObject()) - { - if (property0.NameEquals("entityName"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - entityName = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - } - continue; - } - additionalPropertiesDictionary.Add(property.Name, JsonSerializer.Deserialize>(property.Value.GetRawText())); - } - additionalProperties = additionalPropertiesDictionary; - return new CommonDataServiceForAppsEntityDataset(type, description.Value, structure.Value, schema.Value, linkedServiceName, Optional.ToDictionary(parameters), Optional.ToList(annotations), folder.Value, additionalProperties, entityName.Value); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/CommonDataServiceForAppsEntityDataset.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/CommonDataServiceForAppsEntityDataset.cs deleted file mode 100644 index a063cb40..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/CommonDataServiceForAppsEntityDataset.cs +++ /dev/null @@ -1,43 +0,0 @@ -// - -#nullable disable - -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// The Common Data Service for Apps entity dataset. - public partial class CommonDataServiceForAppsEntityDataset : DataFactoryDatasetProperties - { - /// Initializes a new instance of CommonDataServiceForAppsEntityDataset. - /// Linked service reference. - /// is null. - public CommonDataServiceForAppsEntityDataset(DataFactoryLinkedServiceReference linkedServiceName) : base(linkedServiceName) - { - Argument.AssertNotNull(linkedServiceName, nameof(linkedServiceName)); - - DatasetType = "CommonDataServiceForAppsEntity"; - } - - /// Initializes a new instance of CommonDataServiceForAppsEntityDataset. - /// Type of dataset. - /// Dataset description. - /// Columns that define the structure of the dataset. Type: array (or Expression with resultType array), itemType: DatasetDataElement. - /// Columns that define the physical type schema of the dataset. Type: array (or Expression with resultType array), itemType: DatasetSchemaDataElement. - /// Linked service reference. - /// Parameters for dataset. - /// List of tags that can be used for describing the Dataset. - /// The folder that this Dataset is in. If not specified, Dataset will appear at the root level. - /// Additional Properties. - /// The logical name of the entity. Type: string (or Expression with resultType string). - internal CommonDataServiceForAppsEntityDataset(string datasetType, string description, DataFactoryElement> structure, DataFactoryElement> schema, DataFactoryLinkedServiceReference linkedServiceName, IDictionary parameters, IList annotations, DatasetFolder folder, IDictionary> additionalProperties, DataFactoryElement entityName) : base(datasetType, description, structure, schema, linkedServiceName, parameters, annotations, folder, additionalProperties) - { - EntityName = entityName; - DatasetType = datasetType ?? "CommonDataServiceForAppsEntity"; - } - - /// The logical name of the entity. Type: string (or Expression with resultType string). - public DataFactoryElement EntityName { get; set; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/CommonDataServiceForAppsLinkedService.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/CommonDataServiceForAppsLinkedService.Serialization.cs deleted file mode 100644 index 3ad7c1f9..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/CommonDataServiceForAppsLinkedService.Serialization.cs +++ /dev/null @@ -1,322 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class CommonDataServiceForAppsLinkedService : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - writer.WritePropertyName("type"u8); - writer.WriteStringValue(LinkedServiceType); - if (Optional.IsDefined(ConnectVia)) - { - writer.WritePropertyName("connectVia"u8); - writer.WriteObjectValue(ConnectVia); - } - if (Optional.IsDefined(Description)) - { - writer.WritePropertyName("description"u8); - writer.WriteStringValue(Description); - } - if (Optional.IsCollectionDefined(Parameters)) - { - writer.WritePropertyName("parameters"u8); - writer.WriteStartObject(); - foreach (var item in Parameters) - { - writer.WritePropertyName(item.Key); - writer.WriteObjectValue(item.Value); - } - writer.WriteEndObject(); - } - if (Optional.IsCollectionDefined(Annotations)) - { - writer.WritePropertyName("annotations"u8); - writer.WriteStartArray(); - foreach (var item in Annotations) - { - if (item == null) - { - writer.WriteNullValue(); - continue; - } -#if NET6_0_OR_GREATER - writer.WriteRawValue(item); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.ToString()).RootElement); -#endif - } - writer.WriteEndArray(); - } - writer.WritePropertyName("typeProperties"u8); - writer.WriteStartObject(); - writer.WritePropertyName("deploymentType"u8); - JsonSerializer.Serialize(writer, DeploymentType); - if (Optional.IsDefined(HostName)) - { - writer.WritePropertyName("hostName"u8); - JsonSerializer.Serialize(writer, HostName); - } - if (Optional.IsDefined(Port)) - { - writer.WritePropertyName("port"u8); - JsonSerializer.Serialize(writer, Port); - } - if (Optional.IsDefined(ServiceUri)) - { - writer.WritePropertyName("serviceUri"u8); - JsonSerializer.Serialize(writer, ServiceUri); - } - if (Optional.IsDefined(OrganizationName)) - { - writer.WritePropertyName("organizationName"u8); - JsonSerializer.Serialize(writer, OrganizationName); - } - writer.WritePropertyName("authenticationType"u8); - JsonSerializer.Serialize(writer, AuthenticationType); - if (Optional.IsDefined(Username)) - { - writer.WritePropertyName("username"u8); - JsonSerializer.Serialize(writer, Username); - } - if (Optional.IsDefined(Password)) - { - writer.WritePropertyName("password"u8); - JsonSerializer.Serialize(writer, Password); - } - if (Optional.IsDefined(ServicePrincipalId)) - { - writer.WritePropertyName("servicePrincipalId"u8); - JsonSerializer.Serialize(writer, ServicePrincipalId); - } - if (Optional.IsDefined(ServicePrincipalCredentialType)) - { - writer.WritePropertyName("servicePrincipalCredentialType"u8); - JsonSerializer.Serialize(writer, ServicePrincipalCredentialType); - } - if (Optional.IsDefined(ServicePrincipalCredential)) - { - writer.WritePropertyName("servicePrincipalCredential"u8); - JsonSerializer.Serialize(writer, ServicePrincipalCredential); - } - if (Optional.IsDefined(EncryptedCredential)) - { - writer.WritePropertyName("encryptedCredential"u8); - writer.WriteStringValue(EncryptedCredential); - } - writer.WriteEndObject(); - foreach (var item in AdditionalProperties) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.Value.ToString()).RootElement); -#endif - } - writer.WriteEndObject(); - } - - internal static CommonDataServiceForAppsLinkedService DeserializeCommonDataServiceForAppsLinkedService(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - string type = default; - Optional connectVia = default; - Optional description = default; - Optional> parameters = default; - Optional> annotations = default; - DataFactoryElement deploymentType = default; - Optional> hostName = default; - Optional> port = default; - Optional> serviceUri = default; - Optional> organizationName = default; - DataFactoryElement authenticationType = default; - Optional> username = default; - Optional password = default; - Optional> servicePrincipalId = default; - Optional> servicePrincipalCredentialType = default; - Optional servicePrincipalCredential = default; - Optional encryptedCredential = default; - IDictionary> additionalProperties = default; - Dictionary> additionalPropertiesDictionary = new Dictionary>(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("type"u8)) - { - type = property.Value.GetString(); - continue; - } - if (property.NameEquals("connectVia"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - connectVia = IntegrationRuntimeReference.DeserializeIntegrationRuntimeReference(property.Value); - continue; - } - if (property.NameEquals("description"u8)) - { - description = property.Value.GetString(); - continue; - } - if (property.NameEquals("parameters"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - Dictionary dictionary = new Dictionary(); - foreach (var property0 in property.Value.EnumerateObject()) - { - dictionary.Add(property0.Name, EntityParameterSpecification.DeserializeEntityParameterSpecification(property0.Value)); - } - parameters = dictionary; - continue; - } - if (property.NameEquals("annotations"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - if (item.ValueKind == JsonValueKind.Null) - { - array.Add(null); - } - else - { - array.Add(BinaryData.FromString(item.GetRawText())); - } - } - annotations = array; - continue; - } - if (property.NameEquals("typeProperties"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - foreach (var property0 in property.Value.EnumerateObject()) - { - if (property0.NameEquals("deploymentType"u8)) - { - deploymentType = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("hostName"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - hostName = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("port"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - port = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("serviceUri"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - serviceUri = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("organizationName"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - organizationName = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("authenticationType"u8)) - { - authenticationType = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("username"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - username = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("password"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - password = JsonSerializer.Deserialize(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("servicePrincipalId"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - servicePrincipalId = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("servicePrincipalCredentialType"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - servicePrincipalCredentialType = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("servicePrincipalCredential"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - servicePrincipalCredential = JsonSerializer.Deserialize(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("encryptedCredential"u8)) - { - encryptedCredential = property0.Value.GetString(); - continue; - } - } - continue; - } - additionalPropertiesDictionary.Add(property.Name, JsonSerializer.Deserialize>(property.Value.GetRawText())); - } - additionalProperties = additionalPropertiesDictionary; - return new CommonDataServiceForAppsLinkedService(type, connectVia.Value, description.Value, Optional.ToDictionary(parameters), Optional.ToList(annotations), additionalProperties, deploymentType, hostName.Value, port.Value, serviceUri.Value, organizationName.Value, authenticationType, username.Value, password, servicePrincipalId.Value, servicePrincipalCredentialType.Value, servicePrincipalCredential, encryptedCredential.Value); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/CommonDataServiceForAppsLinkedService.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/CommonDataServiceForAppsLinkedService.cs deleted file mode 100644 index ddf01fcc..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/CommonDataServiceForAppsLinkedService.cs +++ /dev/null @@ -1,88 +0,0 @@ -// - -#nullable disable - -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// Common Data Service for Apps linked service. - public partial class CommonDataServiceForAppsLinkedService : DataFactoryLinkedServiceProperties - { - /// Initializes a new instance of CommonDataServiceForAppsLinkedService. - /// The deployment type of the Common Data Service for Apps instance. 'Online' for Common Data Service for Apps Online and 'OnPremisesWithIfd' for Common Data Service for Apps on-premises with Ifd. Type: string (or Expression with resultType string). - /// The authentication type to connect to Common Data Service for Apps server. 'Office365' for online scenario, 'Ifd' for on-premises with Ifd scenario. 'AADServicePrincipal' for Server-To-Server authentication in online scenario. Type: string (or Expression with resultType string). - /// or is null. - public CommonDataServiceForAppsLinkedService(DataFactoryElement deploymentType, DataFactoryElement authenticationType) - { - Argument.AssertNotNull(deploymentType, nameof(deploymentType)); - Argument.AssertNotNull(authenticationType, nameof(authenticationType)); - - DeploymentType = deploymentType; - AuthenticationType = authenticationType; - LinkedServiceType = "CommonDataServiceForApps"; - } - - /// Initializes a new instance of CommonDataServiceForAppsLinkedService. - /// Type of linked service. - /// The integration runtime reference. - /// Linked service description. - /// Parameters for linked service. - /// List of tags that can be used for describing the linked service. - /// Additional Properties. - /// The deployment type of the Common Data Service for Apps instance. 'Online' for Common Data Service for Apps Online and 'OnPremisesWithIfd' for Common Data Service for Apps on-premises with Ifd. Type: string (or Expression with resultType string). - /// The host name of the on-premises Common Data Service for Apps server. The property is required for on-prem and not allowed for online. Type: string (or Expression with resultType string). - /// The port of on-premises Common Data Service for Apps server. The property is required for on-prem and not allowed for online. Default is 443. Type: integer (or Expression with resultType integer), minimum: 0. - /// The URL to the Microsoft Common Data Service for Apps server. The property is required for on-line and not allowed for on-prem. Type: string (or Expression with resultType string). - /// The organization name of the Common Data Service for Apps instance. The property is required for on-prem and required for online when there are more than one Common Data Service for Apps instances associated with the user. Type: string (or Expression with resultType string). - /// The authentication type to connect to Common Data Service for Apps server. 'Office365' for online scenario, 'Ifd' for on-premises with Ifd scenario. 'AADServicePrincipal' for Server-To-Server authentication in online scenario. Type: string (or Expression with resultType string). - /// User name to access the Common Data Service for Apps instance. Type: string (or Expression with resultType string). - /// Password to access the Common Data Service for Apps instance. - /// The client ID of the application in Azure Active Directory used for Server-To-Server authentication. Type: string (or Expression with resultType string). - /// The service principal credential type to use in Server-To-Server authentication. 'ServicePrincipalKey' for key/secret, 'ServicePrincipalCert' for certificate. Type: string (or Expression with resultType string). - /// The credential of the service principal object in Azure Active Directory. If servicePrincipalCredentialType is 'ServicePrincipalKey', servicePrincipalCredential can be SecureString or AzureKeyVaultSecretReference. If servicePrincipalCredentialType is 'ServicePrincipalCert', servicePrincipalCredential can only be AzureKeyVaultSecretReference. - /// The encrypted credential used for authentication. Credentials are encrypted using the integration runtime credential manager. Type: string. - internal CommonDataServiceForAppsLinkedService(string linkedServiceType, IntegrationRuntimeReference connectVia, string description, IDictionary parameters, IList annotations, IDictionary> additionalProperties, DataFactoryElement deploymentType, DataFactoryElement hostName, DataFactoryElement port, DataFactoryElement serviceUri, DataFactoryElement organizationName, DataFactoryElement authenticationType, DataFactoryElement username, DataFactorySecretBaseDefinition password, DataFactoryElement servicePrincipalId, DataFactoryElement servicePrincipalCredentialType, DataFactorySecretBaseDefinition servicePrincipalCredential, string encryptedCredential) : base(linkedServiceType, connectVia, description, parameters, annotations, additionalProperties) - { - DeploymentType = deploymentType; - HostName = hostName; - Port = port; - ServiceUri = serviceUri; - OrganizationName = organizationName; - AuthenticationType = authenticationType; - Username = username; - Password = password; - ServicePrincipalId = servicePrincipalId; - ServicePrincipalCredentialType = servicePrincipalCredentialType; - ServicePrincipalCredential = servicePrincipalCredential; - EncryptedCredential = encryptedCredential; - LinkedServiceType = linkedServiceType ?? "CommonDataServiceForApps"; - } - - /// The deployment type of the Common Data Service for Apps instance. 'Online' for Common Data Service for Apps Online and 'OnPremisesWithIfd' for Common Data Service for Apps on-premises with Ifd. Type: string (or Expression with resultType string). - public DataFactoryElement DeploymentType { get; set; } - /// The host name of the on-premises Common Data Service for Apps server. The property is required for on-prem and not allowed for online. Type: string (or Expression with resultType string). - public DataFactoryElement HostName { get; set; } - /// The port of on-premises Common Data Service for Apps server. The property is required for on-prem and not allowed for online. Default is 443. Type: integer (or Expression with resultType integer), minimum: 0. - public DataFactoryElement Port { get; set; } - /// The URL to the Microsoft Common Data Service for Apps server. The property is required for on-line and not allowed for on-prem. Type: string (or Expression with resultType string). - public DataFactoryElement ServiceUri { get; set; } - /// The organization name of the Common Data Service for Apps instance. The property is required for on-prem and required for online when there are more than one Common Data Service for Apps instances associated with the user. Type: string (or Expression with resultType string). - public DataFactoryElement OrganizationName { get; set; } - /// The authentication type to connect to Common Data Service for Apps server. 'Office365' for online scenario, 'Ifd' for on-premises with Ifd scenario. 'AADServicePrincipal' for Server-To-Server authentication in online scenario. Type: string (or Expression with resultType string). - public DataFactoryElement AuthenticationType { get; set; } - /// User name to access the Common Data Service for Apps instance. Type: string (or Expression with resultType string). - public DataFactoryElement Username { get; set; } - /// Password to access the Common Data Service for Apps instance. - public DataFactorySecretBaseDefinition Password { get; set; } - /// The client ID of the application in Azure Active Directory used for Server-To-Server authentication. Type: string (or Expression with resultType string). - public DataFactoryElement ServicePrincipalId { get; set; } - /// The service principal credential type to use in Server-To-Server authentication. 'ServicePrincipalKey' for key/secret, 'ServicePrincipalCert' for certificate. Type: string (or Expression with resultType string). - public DataFactoryElement ServicePrincipalCredentialType { get; set; } - /// The credential of the service principal object in Azure Active Directory. If servicePrincipalCredentialType is 'ServicePrincipalKey', servicePrincipalCredential can be SecureString or AzureKeyVaultSecretReference. If servicePrincipalCredentialType is 'ServicePrincipalCert', servicePrincipalCredential can only be AzureKeyVaultSecretReference. - public DataFactorySecretBaseDefinition ServicePrincipalCredential { get; set; } - /// The encrypted credential used for authentication. Credentials are encrypted using the integration runtime credential manager. Type: string. - public string EncryptedCredential { get; set; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/CommonDataServiceForAppsSink.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/CommonDataServiceForAppsSink.Serialization.cs deleted file mode 100644 index a26b48e0..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/CommonDataServiceForAppsSink.Serialization.cs +++ /dev/null @@ -1,180 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class CommonDataServiceForAppsSink : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - writer.WritePropertyName("writeBehavior"u8); - writer.WriteStringValue(WriteBehavior.ToString()); - if (Optional.IsDefined(IgnoreNullValues)) - { - writer.WritePropertyName("ignoreNullValues"u8); - JsonSerializer.Serialize(writer, IgnoreNullValues); - } - if (Optional.IsDefined(AlternateKeyName)) - { - writer.WritePropertyName("alternateKeyName"u8); - JsonSerializer.Serialize(writer, AlternateKeyName); - } - writer.WritePropertyName("type"u8); - writer.WriteStringValue(CopySinkType); - if (Optional.IsDefined(WriteBatchSize)) - { - writer.WritePropertyName("writeBatchSize"u8); - JsonSerializer.Serialize(writer, WriteBatchSize); - } - if (Optional.IsDefined(WriteBatchTimeout)) - { - writer.WritePropertyName("writeBatchTimeout"u8); - JsonSerializer.Serialize(writer, WriteBatchTimeout); - } - if (Optional.IsDefined(SinkRetryCount)) - { - writer.WritePropertyName("sinkRetryCount"u8); - JsonSerializer.Serialize(writer, SinkRetryCount); - } - if (Optional.IsDefined(SinkRetryWait)) - { - writer.WritePropertyName("sinkRetryWait"u8); - JsonSerializer.Serialize(writer, SinkRetryWait); - } - if (Optional.IsDefined(MaxConcurrentConnections)) - { - writer.WritePropertyName("maxConcurrentConnections"u8); - JsonSerializer.Serialize(writer, MaxConcurrentConnections); - } - if (Optional.IsDefined(DisableMetricsCollection)) - { - writer.WritePropertyName("disableMetricsCollection"u8); - JsonSerializer.Serialize(writer, DisableMetricsCollection); - } - foreach (var item in AdditionalProperties) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.Value.ToString()).RootElement); -#endif - } - writer.WriteEndObject(); - } - - internal static CommonDataServiceForAppsSink DeserializeCommonDataServiceForAppsSink(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - DynamicsSinkWriteBehavior writeBehavior = default; - Optional> ignoreNullValues = default; - Optional> alternateKeyName = default; - string type = default; - Optional> writeBatchSize = default; - Optional> writeBatchTimeout = default; - Optional> sinkRetryCount = default; - Optional> sinkRetryWait = default; - Optional> maxConcurrentConnections = default; - Optional> disableMetricsCollection = default; - IDictionary> additionalProperties = default; - Dictionary> additionalPropertiesDictionary = new Dictionary>(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("writeBehavior"u8)) - { - writeBehavior = new DynamicsSinkWriteBehavior(property.Value.GetString()); - continue; - } - if (property.NameEquals("ignoreNullValues"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - ignoreNullValues = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("alternateKeyName"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - alternateKeyName = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("type"u8)) - { - type = property.Value.GetString(); - continue; - } - if (property.NameEquals("writeBatchSize"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - writeBatchSize = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("writeBatchTimeout"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - writeBatchTimeout = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("sinkRetryCount"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - sinkRetryCount = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("sinkRetryWait"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - sinkRetryWait = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("maxConcurrentConnections"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - maxConcurrentConnections = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("disableMetricsCollection"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - disableMetricsCollection = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - additionalPropertiesDictionary.Add(property.Name, JsonSerializer.Deserialize>(property.Value.GetRawText())); - } - additionalProperties = additionalPropertiesDictionary; - return new CommonDataServiceForAppsSink(type, writeBatchSize.Value, writeBatchTimeout.Value, sinkRetryCount.Value, sinkRetryWait.Value, maxConcurrentConnections.Value, disableMetricsCollection.Value, additionalProperties, writeBehavior, ignoreNullValues.Value, alternateKeyName.Value); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/CommonDataServiceForAppsSink.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/CommonDataServiceForAppsSink.cs deleted file mode 100644 index 20c84a5e..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/CommonDataServiceForAppsSink.cs +++ /dev/null @@ -1,47 +0,0 @@ -// - -#nullable disable - -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// A copy activity Common Data Service for Apps sink. - public partial class CommonDataServiceForAppsSink : CopySink - { - /// Initializes a new instance of CommonDataServiceForAppsSink. - /// The write behavior for the operation. - public CommonDataServiceForAppsSink(DynamicsSinkWriteBehavior writeBehavior) - { - WriteBehavior = writeBehavior; - CopySinkType = "CommonDataServiceForAppsSink"; - } - - /// Initializes a new instance of CommonDataServiceForAppsSink. - /// Copy sink type. - /// Write batch size. Type: integer (or Expression with resultType integer), minimum: 0. - /// Write batch timeout. Type: string (or Expression with resultType string), pattern: ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). - /// Sink retry count. Type: integer (or Expression with resultType integer). - /// Sink retry wait. Type: string (or Expression with resultType string), pattern: ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). - /// The maximum concurrent connection count for the sink data store. Type: integer (or Expression with resultType integer). - /// If true, disable data store metrics collection. Default is false. Type: boolean (or Expression with resultType boolean). - /// Additional Properties. - /// The write behavior for the operation. - /// The flag indicating whether to ignore null values from input dataset (except key fields) during write operation. Default is false. Type: boolean (or Expression with resultType boolean). - /// The logical name of the alternate key which will be used when upserting records. Type: string (or Expression with resultType string). - internal CommonDataServiceForAppsSink(string copySinkType, DataFactoryElement writeBatchSize, DataFactoryElement writeBatchTimeout, DataFactoryElement sinkRetryCount, DataFactoryElement sinkRetryWait, DataFactoryElement maxConcurrentConnections, DataFactoryElement disableMetricsCollection, IDictionary> additionalProperties, DynamicsSinkWriteBehavior writeBehavior, DataFactoryElement ignoreNullValues, DataFactoryElement alternateKeyName) : base(copySinkType, writeBatchSize, writeBatchTimeout, sinkRetryCount, sinkRetryWait, maxConcurrentConnections, disableMetricsCollection, additionalProperties) - { - WriteBehavior = writeBehavior; - IgnoreNullValues = ignoreNullValues; - AlternateKeyName = alternateKeyName; - CopySinkType = copySinkType ?? "CommonDataServiceForAppsSink"; - } - - /// The write behavior for the operation. - public DynamicsSinkWriteBehavior WriteBehavior { get; set; } - /// The flag indicating whether to ignore null values from input dataset (except key fields) during write operation. Default is false. Type: boolean (or Expression with resultType boolean). - public DataFactoryElement IgnoreNullValues { get; set; } - /// The logical name of the alternate key which will be used when upserting records. Type: string (or Expression with resultType string). - public DataFactoryElement AlternateKeyName { get; set; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/CommonDataServiceForAppsSource.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/CommonDataServiceForAppsSource.Serialization.cs deleted file mode 100644 index ce7650f8..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/CommonDataServiceForAppsSource.Serialization.cs +++ /dev/null @@ -1,146 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class CommonDataServiceForAppsSource : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - if (Optional.IsDefined(Query)) - { - writer.WritePropertyName("query"u8); - JsonSerializer.Serialize(writer, Query); - } - if (Optional.IsDefined(AdditionalColumns)) - { - writer.WritePropertyName("additionalColumns"u8); -#if NET6_0_OR_GREATER - writer.WriteRawValue(AdditionalColumns); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(AdditionalColumns.ToString()).RootElement); -#endif - } - writer.WritePropertyName("type"u8); - writer.WriteStringValue(CopySourceType); - if (Optional.IsDefined(SourceRetryCount)) - { - writer.WritePropertyName("sourceRetryCount"u8); - JsonSerializer.Serialize(writer, SourceRetryCount); - } - if (Optional.IsDefined(SourceRetryWait)) - { - writer.WritePropertyName("sourceRetryWait"u8); - JsonSerializer.Serialize(writer, SourceRetryWait); - } - if (Optional.IsDefined(MaxConcurrentConnections)) - { - writer.WritePropertyName("maxConcurrentConnections"u8); - JsonSerializer.Serialize(writer, MaxConcurrentConnections); - } - if (Optional.IsDefined(DisableMetricsCollection)) - { - writer.WritePropertyName("disableMetricsCollection"u8); - JsonSerializer.Serialize(writer, DisableMetricsCollection); - } - foreach (var item in AdditionalProperties) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.Value.ToString()).RootElement); -#endif - } - writer.WriteEndObject(); - } - - internal static CommonDataServiceForAppsSource DeserializeCommonDataServiceForAppsSource(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - Optional> query = default; - Optional additionalColumns = default; - string type = default; - Optional> sourceRetryCount = default; - Optional> sourceRetryWait = default; - Optional> maxConcurrentConnections = default; - Optional> disableMetricsCollection = default; - IDictionary> additionalProperties = default; - Dictionary> additionalPropertiesDictionary = new Dictionary>(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("query"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - query = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("additionalColumns"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - additionalColumns = BinaryData.FromString(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("type"u8)) - { - type = property.Value.GetString(); - continue; - } - if (property.NameEquals("sourceRetryCount"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - sourceRetryCount = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("sourceRetryWait"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - sourceRetryWait = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("maxConcurrentConnections"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - maxConcurrentConnections = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("disableMetricsCollection"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - disableMetricsCollection = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - additionalPropertiesDictionary.Add(property.Name, JsonSerializer.Deserialize>(property.Value.GetRawText())); - } - additionalProperties = additionalPropertiesDictionary; - return new CommonDataServiceForAppsSource(type, sourceRetryCount.Value, sourceRetryWait.Value, maxConcurrentConnections.Value, disableMetricsCollection.Value, additionalProperties, query.Value, additionalColumns.Value); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/CommonDataServiceForAppsSource.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/CommonDataServiceForAppsSource.cs deleted file mode 100644 index 96bedec7..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/CommonDataServiceForAppsSource.cs +++ /dev/null @@ -1,68 +0,0 @@ -// - -#nullable disable - -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// A copy activity Common Data Service for Apps source. - public partial class CommonDataServiceForAppsSource : CopyActivitySource - { - /// Initializes a new instance of CommonDataServiceForAppsSource. - public CommonDataServiceForAppsSource() - { - CopySourceType = "CommonDataServiceForAppsSource"; - } - - /// Initializes a new instance of CommonDataServiceForAppsSource. - /// Copy source type. - /// Source retry count. Type: integer (or Expression with resultType integer). - /// Source retry wait. Type: string (or Expression with resultType string), pattern: ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). - /// The maximum concurrent connection count for the source data store. Type: integer (or Expression with resultType integer). - /// If true, disable data store metrics collection. Default is false. Type: boolean (or Expression with resultType boolean). - /// Additional Properties. - /// FetchXML is a proprietary query language that is used in Microsoft Common Data Service for Apps (online & on-premises). Type: string (or Expression with resultType string). - /// Specifies the additional columns to be added to source data. Type: array of objects(AdditionalColumns) (or Expression with resultType array of objects). - internal CommonDataServiceForAppsSource(string copySourceType, DataFactoryElement sourceRetryCount, DataFactoryElement sourceRetryWait, DataFactoryElement maxConcurrentConnections, DataFactoryElement disableMetricsCollection, IDictionary> additionalProperties, DataFactoryElement query, BinaryData additionalColumns) : base(copySourceType, sourceRetryCount, sourceRetryWait, maxConcurrentConnections, disableMetricsCollection, additionalProperties) - { - Query = query; - AdditionalColumns = additionalColumns; - CopySourceType = copySourceType ?? "CommonDataServiceForAppsSource"; - } - - /// FetchXML is a proprietary query language that is used in Microsoft Common Data Service for Apps (online & on-premises). Type: string (or Expression with resultType string). - public DataFactoryElement Query { get; set; } - /// - /// Specifies the additional columns to be added to source data. Type: array of objects(AdditionalColumns) (or Expression with resultType array of objects). - /// - /// To assign an object to this property use . - /// - /// - /// To assign an already formated json string to this property use . - /// - /// - /// Examples: - /// - /// - /// BinaryData.FromObjectAsJson("foo") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromString("\"foo\"") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromObjectAsJson(new { key = "value" }) - /// Creates a payload of { "key": "value" }. - /// - /// - /// BinaryData.FromString("{\"key\": \"value\"}") - /// Creates a payload of { "key": "value" }. - /// - /// - /// - /// - public BinaryData AdditionalColumns { get; set; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/ComponentSetup.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/ComponentSetup.Serialization.cs deleted file mode 100644 index 9e4734ba..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/ComponentSetup.Serialization.cs +++ /dev/null @@ -1,77 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class ComponentSetup : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - writer.WritePropertyName("type"u8); - writer.WriteStringValue(CustomSetupBaseType); - writer.WritePropertyName("typeProperties"u8); - writer.WriteStartObject(); - writer.WritePropertyName("componentName"u8); - writer.WriteStringValue(ComponentName); - if (Optional.IsDefined(LicenseKey)) - { - writer.WritePropertyName("licenseKey"u8); - JsonSerializer.Serialize(writer, LicenseKey); - } - writer.WriteEndObject(); - writer.WriteEndObject(); - } - - internal static ComponentSetup DeserializeComponentSetup(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - string type = default; - string componentName = default; - Optional licenseKey = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("type"u8)) - { - type = property.Value.GetString(); - continue; - } - if (property.NameEquals("typeProperties"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - foreach (var property0 in property.Value.EnumerateObject()) - { - if (property0.NameEquals("componentName"u8)) - { - componentName = property0.Value.GetString(); - continue; - } - if (property0.NameEquals("licenseKey"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - licenseKey = JsonSerializer.Deserialize(property0.Value.GetRawText()); - continue; - } - } - continue; - } - } - return new ComponentSetup(type, componentName, licenseKey); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/ComponentSetup.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/ComponentSetup.cs deleted file mode 100644 index d614e6c3..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/ComponentSetup.cs +++ /dev/null @@ -1,40 +0,0 @@ -// - -#nullable disable - -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// The custom setup of installing 3rd party components. - public partial class ComponentSetup : CustomSetupBase - { - /// Initializes a new instance of ComponentSetup. - /// The name of the 3rd party component. - /// is null. - public ComponentSetup(string componentName) - { - Argument.AssertNotNull(componentName, nameof(componentName)); - - ComponentName = componentName; - CustomSetupBaseType = "ComponentSetup"; - } - - /// Initializes a new instance of ComponentSetup. - /// The type of custom setup. - /// The name of the 3rd party component. - /// The license key to activate the component. - internal ComponentSetup(string customSetupBaseType, string componentName, DataFactorySecretBaseDefinition licenseKey) : base(customSetupBaseType) - { - ComponentName = componentName; - LicenseKey = licenseKey; - CustomSetupBaseType = customSetupBaseType ?? "ComponentSetup"; - } - - /// The name of the 3rd party component. - public string ComponentName { get; set; } - /// The license key to activate the component. - public DataFactorySecretBaseDefinition LicenseKey { get; set; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/CompressionReadSettings.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/CompressionReadSettings.Serialization.cs deleted file mode 100644 index 8251b6d6..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/CompressionReadSettings.Serialization.cs +++ /dev/null @@ -1,47 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class CompressionReadSettings : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - writer.WritePropertyName("type"u8); - writer.WriteStringValue(CompressionReadSettingsType); - foreach (var item in AdditionalProperties) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.Value.ToString()).RootElement); -#endif - } - writer.WriteEndObject(); - } - - internal static CompressionReadSettings DeserializeCompressionReadSettings(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - if (element.TryGetProperty("type", out JsonElement discriminator)) - { - switch (discriminator.GetString()) - { - case "TarGZipReadSettings": return TarGzipReadSettings.DeserializeTarGzipReadSettings(element); - case "TarReadSettings": return TarReadSettings.DeserializeTarReadSettings(element); - case "ZipDeflateReadSettings": return ZipDeflateReadSettings.DeserializeZipDeflateReadSettings(element); - } - } - return UnknownCompressionReadSettings.DeserializeUnknownCompressionReadSettings(element); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/CompressionReadSettings.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/CompressionReadSettings.cs deleted file mode 100644 index 9c824bad..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/CompressionReadSettings.cs +++ /dev/null @@ -1,66 +0,0 @@ -// - -#nullable disable - -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// - /// Compression read settings. - /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. - /// The available derived classes include , and . - /// - public partial class CompressionReadSettings - { - /// Initializes a new instance of CompressionReadSettings. - public CompressionReadSettings() - { - AdditionalProperties = new ChangeTrackingDictionary>(); - } - - /// Initializes a new instance of CompressionReadSettings. - /// The Compression setting type. - /// Additional Properties. - internal CompressionReadSettings(string compressionReadSettingsType, IDictionary> additionalProperties) - { - CompressionReadSettingsType = compressionReadSettingsType; - AdditionalProperties = additionalProperties; - } - - /// The Compression setting type. - internal string CompressionReadSettingsType { get; set; } - /// - /// Additional Properties - /// - /// To assign an object to the value of this property use . - /// - /// - /// To assign an already formated json string to this property use . - /// - /// - /// Examples: - /// - /// - /// BinaryData.FromObjectAsJson("foo") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromString("\"foo\"") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromObjectAsJson(new { key = "value" }) - /// Creates a payload of { "key": "value" }. - /// - /// - /// BinaryData.FromString("{\"key\": \"value\"}") - /// Creates a payload of { "key": "value" }. - /// - /// - /// - /// - public IDictionary> AdditionalProperties { get; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/ConcurLinkedService.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/ConcurLinkedService.Serialization.cs deleted file mode 100644 index b09a81d3..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/ConcurLinkedService.Serialization.cs +++ /dev/null @@ -1,266 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class ConcurLinkedService : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - writer.WritePropertyName("type"u8); - writer.WriteStringValue(LinkedServiceType); - if (Optional.IsDefined(ConnectVia)) - { - writer.WritePropertyName("connectVia"u8); - writer.WriteObjectValue(ConnectVia); - } - if (Optional.IsDefined(Description)) - { - writer.WritePropertyName("description"u8); - writer.WriteStringValue(Description); - } - if (Optional.IsCollectionDefined(Parameters)) - { - writer.WritePropertyName("parameters"u8); - writer.WriteStartObject(); - foreach (var item in Parameters) - { - writer.WritePropertyName(item.Key); - writer.WriteObjectValue(item.Value); - } - writer.WriteEndObject(); - } - if (Optional.IsCollectionDefined(Annotations)) - { - writer.WritePropertyName("annotations"u8); - writer.WriteStartArray(); - foreach (var item in Annotations) - { - if (item == null) - { - writer.WriteNullValue(); - continue; - } -#if NET6_0_OR_GREATER - writer.WriteRawValue(item); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.ToString()).RootElement); -#endif - } - writer.WriteEndArray(); - } - writer.WritePropertyName("typeProperties"u8); - writer.WriteStartObject(); - if (Optional.IsDefined(ConnectionProperties)) - { - writer.WritePropertyName("connectionProperties"u8); -#if NET6_0_OR_GREATER - writer.WriteRawValue(ConnectionProperties); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(ConnectionProperties.ToString()).RootElement); -#endif - } - writer.WritePropertyName("clientId"u8); - JsonSerializer.Serialize(writer, ClientId); - writer.WritePropertyName("username"u8); - JsonSerializer.Serialize(writer, Username); - if (Optional.IsDefined(Password)) - { - writer.WritePropertyName("password"u8); - JsonSerializer.Serialize(writer, Password); - } - if (Optional.IsDefined(UseEncryptedEndpoints)) - { - writer.WritePropertyName("useEncryptedEndpoints"u8); - JsonSerializer.Serialize(writer, UseEncryptedEndpoints); - } - if (Optional.IsDefined(UseHostVerification)) - { - writer.WritePropertyName("useHostVerification"u8); - JsonSerializer.Serialize(writer, UseHostVerification); - } - if (Optional.IsDefined(UsePeerVerification)) - { - writer.WritePropertyName("usePeerVerification"u8); - JsonSerializer.Serialize(writer, UsePeerVerification); - } - if (Optional.IsDefined(EncryptedCredential)) - { - writer.WritePropertyName("encryptedCredential"u8); - writer.WriteStringValue(EncryptedCredential); - } - writer.WriteEndObject(); - foreach (var item in AdditionalProperties) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.Value.ToString()).RootElement); -#endif - } - writer.WriteEndObject(); - } - - internal static ConcurLinkedService DeserializeConcurLinkedService(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - string type = default; - Optional connectVia = default; - Optional description = default; - Optional> parameters = default; - Optional> annotations = default; - Optional connectionProperties = default; - DataFactoryElement clientId = default; - DataFactoryElement username = default; - Optional password = default; - Optional> useEncryptedEndpoints = default; - Optional> useHostVerification = default; - Optional> usePeerVerification = default; - Optional encryptedCredential = default; - IDictionary> additionalProperties = default; - Dictionary> additionalPropertiesDictionary = new Dictionary>(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("type"u8)) - { - type = property.Value.GetString(); - continue; - } - if (property.NameEquals("connectVia"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - connectVia = IntegrationRuntimeReference.DeserializeIntegrationRuntimeReference(property.Value); - continue; - } - if (property.NameEquals("description"u8)) - { - description = property.Value.GetString(); - continue; - } - if (property.NameEquals("parameters"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - Dictionary dictionary = new Dictionary(); - foreach (var property0 in property.Value.EnumerateObject()) - { - dictionary.Add(property0.Name, EntityParameterSpecification.DeserializeEntityParameterSpecification(property0.Value)); - } - parameters = dictionary; - continue; - } - if (property.NameEquals("annotations"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - if (item.ValueKind == JsonValueKind.Null) - { - array.Add(null); - } - else - { - array.Add(BinaryData.FromString(item.GetRawText())); - } - } - annotations = array; - continue; - } - if (property.NameEquals("typeProperties"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - foreach (var property0 in property.Value.EnumerateObject()) - { - if (property0.NameEquals("connectionProperties"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - connectionProperties = BinaryData.FromString(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("clientId"u8)) - { - clientId = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("username"u8)) - { - username = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("password"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - password = JsonSerializer.Deserialize(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("useEncryptedEndpoints"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - useEncryptedEndpoints = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("useHostVerification"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - useHostVerification = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("usePeerVerification"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - usePeerVerification = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("encryptedCredential"u8)) - { - encryptedCredential = property0.Value.GetString(); - continue; - } - } - continue; - } - additionalPropertiesDictionary.Add(property.Name, JsonSerializer.Deserialize>(property.Value.GetRawText())); - } - additionalProperties = additionalPropertiesDictionary; - return new ConcurLinkedService(type, connectVia.Value, description.Value, Optional.ToDictionary(parameters), Optional.ToList(annotations), additionalProperties, connectionProperties.Value, clientId, username, password, useEncryptedEndpoints.Value, useHostVerification.Value, usePeerVerification.Value, encryptedCredential.Value); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/ConcurLinkedService.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/ConcurLinkedService.cs deleted file mode 100644 index 53b008b8..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/ConcurLinkedService.cs +++ /dev/null @@ -1,101 +0,0 @@ -// - -#nullable disable - -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// Concur Service linked service. - public partial class ConcurLinkedService : DataFactoryLinkedServiceProperties - { - /// Initializes a new instance of ConcurLinkedService. - /// Application client_id supplied by Concur App Management. - /// The user name that you use to access Concur Service. - /// or is null. - public ConcurLinkedService(DataFactoryElement clientId, DataFactoryElement username) - { - Argument.AssertNotNull(clientId, nameof(clientId)); - Argument.AssertNotNull(username, nameof(username)); - - ClientId = clientId; - Username = username; - LinkedServiceType = "Concur"; - } - - /// Initializes a new instance of ConcurLinkedService. - /// Type of linked service. - /// The integration runtime reference. - /// Linked service description. - /// Parameters for linked service. - /// List of tags that can be used for describing the linked service. - /// Additional Properties. - /// Properties used to connect to Concur. It is mutually exclusive with any other properties in the linked service. Type: object. - /// Application client_id supplied by Concur App Management. - /// The user name that you use to access Concur Service. - /// The password corresponding to the user name that you provided in the username field. - /// Specifies whether the data source endpoints are encrypted using HTTPS. The default value is true. - /// 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. - /// Specifies whether to verify the identity of the server when connecting over SSL. The default value is true. - /// The encrypted credential used for authentication. Credentials are encrypted using the integration runtime credential manager. Type: string. - internal ConcurLinkedService(string linkedServiceType, IntegrationRuntimeReference connectVia, string description, IDictionary parameters, IList annotations, IDictionary> additionalProperties, BinaryData connectionProperties, DataFactoryElement clientId, DataFactoryElement username, DataFactorySecretBaseDefinition password, DataFactoryElement useEncryptedEndpoints, DataFactoryElement useHostVerification, DataFactoryElement usePeerVerification, string encryptedCredential) : base(linkedServiceType, connectVia, description, parameters, annotations, additionalProperties) - { - ConnectionProperties = connectionProperties; - ClientId = clientId; - Username = username; - Password = password; - UseEncryptedEndpoints = useEncryptedEndpoints; - UseHostVerification = useHostVerification; - UsePeerVerification = usePeerVerification; - EncryptedCredential = encryptedCredential; - LinkedServiceType = linkedServiceType ?? "Concur"; - } - - /// - /// Properties used to connect to Concur. It is mutually exclusive with any other properties in the linked service. Type: object. - /// - /// To assign an object to this property use . - /// - /// - /// To assign an already formated json string to this property use . - /// - /// - /// Examples: - /// - /// - /// BinaryData.FromObjectAsJson("foo") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromString("\"foo\"") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromObjectAsJson(new { key = "value" }) - /// Creates a payload of { "key": "value" }. - /// - /// - /// BinaryData.FromString("{\"key\": \"value\"}") - /// Creates a payload of { "key": "value" }. - /// - /// - /// - /// - public BinaryData ConnectionProperties { get; set; } - /// Application client_id supplied by Concur App Management. - public DataFactoryElement ClientId { get; set; } - /// The user name that you use to access Concur Service. - public DataFactoryElement Username { get; set; } - /// The password corresponding to the user name that you provided in the username field. - public DataFactorySecretBaseDefinition Password { get; set; } - /// Specifies whether the data source endpoints are encrypted using HTTPS. The default value is true. - public DataFactoryElement UseEncryptedEndpoints { get; set; } - /// 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. - public DataFactoryElement UseHostVerification { get; set; } - /// Specifies whether to verify the identity of the server when connecting over SSL. The default value is true. - public DataFactoryElement UsePeerVerification { get; set; } - /// The encrypted credential used for authentication. Credentials are encrypted using the integration runtime credential manager. Type: string. - public string EncryptedCredential { get; set; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/ConcurObjectDataset.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/ConcurObjectDataset.Serialization.cs deleted file mode 100644 index 24defc84..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/ConcurObjectDataset.Serialization.cs +++ /dev/null @@ -1,212 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class ConcurObjectDataset : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - writer.WritePropertyName("type"u8); - writer.WriteStringValue(DatasetType); - if (Optional.IsDefined(Description)) - { - writer.WritePropertyName("description"u8); - writer.WriteStringValue(Description); - } - if (Optional.IsDefined(Structure)) - { - writer.WritePropertyName("structure"u8); - JsonSerializer.Serialize(writer, Structure); - } - if (Optional.IsDefined(Schema)) - { - writer.WritePropertyName("schema"u8); - JsonSerializer.Serialize(writer, Schema); - } - writer.WritePropertyName("linkedServiceName"u8); - JsonSerializer.Serialize(writer, LinkedServiceName); if (Optional.IsCollectionDefined(Parameters)) - { - writer.WritePropertyName("parameters"u8); - writer.WriteStartObject(); - foreach (var item in Parameters) - { - writer.WritePropertyName(item.Key); - writer.WriteObjectValue(item.Value); - } - writer.WriteEndObject(); - } - if (Optional.IsCollectionDefined(Annotations)) - { - writer.WritePropertyName("annotations"u8); - writer.WriteStartArray(); - foreach (var item in Annotations) - { - if (item == null) - { - writer.WriteNullValue(); - continue; - } -#if NET6_0_OR_GREATER - writer.WriteRawValue(item); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.ToString()).RootElement); -#endif - } - writer.WriteEndArray(); - } - if (Optional.IsDefined(Folder)) - { - writer.WritePropertyName("folder"u8); - writer.WriteObjectValue(Folder); - } - writer.WritePropertyName("typeProperties"u8); - writer.WriteStartObject(); - if (Optional.IsDefined(TableName)) - { - writer.WritePropertyName("tableName"u8); - JsonSerializer.Serialize(writer, TableName); - } - writer.WriteEndObject(); - foreach (var item in AdditionalProperties) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.Value.ToString()).RootElement); -#endif - } - writer.WriteEndObject(); - } - - internal static ConcurObjectDataset DeserializeConcurObjectDataset(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - string type = default; - Optional description = default; - Optional>> structure = default; - Optional>> schema = default; - DataFactoryLinkedServiceReference linkedServiceName = default; - Optional> parameters = default; - Optional> annotations = default; - Optional folder = default; - Optional> tableName = default; - IDictionary> additionalProperties = default; - Dictionary> additionalPropertiesDictionary = new Dictionary>(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("type"u8)) - { - type = property.Value.GetString(); - continue; - } - if (property.NameEquals("description"u8)) - { - description = property.Value.GetString(); - continue; - } - if (property.NameEquals("structure"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - structure = JsonSerializer.Deserialize>>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("schema"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - schema = JsonSerializer.Deserialize>>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("linkedServiceName"u8)) - { - linkedServiceName = JsonSerializer.Deserialize(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("parameters"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - Dictionary dictionary = new Dictionary(); - foreach (var property0 in property.Value.EnumerateObject()) - { - dictionary.Add(property0.Name, EntityParameterSpecification.DeserializeEntityParameterSpecification(property0.Value)); - } - parameters = dictionary; - continue; - } - if (property.NameEquals("annotations"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - if (item.ValueKind == JsonValueKind.Null) - { - array.Add(null); - } - else - { - array.Add(BinaryData.FromString(item.GetRawText())); - } - } - annotations = array; - continue; - } - if (property.NameEquals("folder"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - folder = DatasetFolder.DeserializeDatasetFolder(property.Value); - continue; - } - if (property.NameEquals("typeProperties"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - foreach (var property0 in property.Value.EnumerateObject()) - { - if (property0.NameEquals("tableName"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - tableName = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - } - continue; - } - additionalPropertiesDictionary.Add(property.Name, JsonSerializer.Deserialize>(property.Value.GetRawText())); - } - additionalProperties = additionalPropertiesDictionary; - return new ConcurObjectDataset(type, description.Value, structure.Value, schema.Value, linkedServiceName, Optional.ToDictionary(parameters), Optional.ToList(annotations), folder.Value, additionalProperties, tableName.Value); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/ConcurObjectDataset.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/ConcurObjectDataset.cs deleted file mode 100644 index ecc7f8c5..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/ConcurObjectDataset.cs +++ /dev/null @@ -1,43 +0,0 @@ -// - -#nullable disable - -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// Concur Service dataset. - public partial class ConcurObjectDataset : DataFactoryDatasetProperties - { - /// Initializes a new instance of ConcurObjectDataset. - /// Linked service reference. - /// is null. - public ConcurObjectDataset(DataFactoryLinkedServiceReference linkedServiceName) : base(linkedServiceName) - { - Argument.AssertNotNull(linkedServiceName, nameof(linkedServiceName)); - - DatasetType = "ConcurObject"; - } - - /// Initializes a new instance of ConcurObjectDataset. - /// Type of dataset. - /// Dataset description. - /// Columns that define the structure of the dataset. Type: array (or Expression with resultType array), itemType: DatasetDataElement. - /// Columns that define the physical type schema of the dataset. Type: array (or Expression with resultType array), itemType: DatasetSchemaDataElement. - /// Linked service reference. - /// Parameters for dataset. - /// List of tags that can be used for describing the Dataset. - /// The folder that this Dataset is in. If not specified, Dataset will appear at the root level. - /// Additional Properties. - /// The table name. Type: string (or Expression with resultType string). - internal ConcurObjectDataset(string datasetType, string description, DataFactoryElement> structure, DataFactoryElement> schema, DataFactoryLinkedServiceReference linkedServiceName, IDictionary parameters, IList annotations, DatasetFolder folder, IDictionary> additionalProperties, DataFactoryElement tableName) : base(datasetType, description, structure, schema, linkedServiceName, parameters, annotations, folder, additionalProperties) - { - TableName = tableName; - DatasetType = datasetType ?? "ConcurObject"; - } - - /// The table name. Type: string (or Expression with resultType string). - public DataFactoryElement TableName { get; set; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/ConcurSource.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/ConcurSource.Serialization.cs deleted file mode 100644 index 496c6ac2..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/ConcurSource.Serialization.cs +++ /dev/null @@ -1,161 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class ConcurSource : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - if (Optional.IsDefined(Query)) - { - writer.WritePropertyName("query"u8); - JsonSerializer.Serialize(writer, Query); - } - if (Optional.IsDefined(QueryTimeout)) - { - writer.WritePropertyName("queryTimeout"u8); - JsonSerializer.Serialize(writer, QueryTimeout); - } - if (Optional.IsDefined(AdditionalColumns)) - { - writer.WritePropertyName("additionalColumns"u8); -#if NET6_0_OR_GREATER - writer.WriteRawValue(AdditionalColumns); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(AdditionalColumns.ToString()).RootElement); -#endif - } - writer.WritePropertyName("type"u8); - writer.WriteStringValue(CopySourceType); - if (Optional.IsDefined(SourceRetryCount)) - { - writer.WritePropertyName("sourceRetryCount"u8); - JsonSerializer.Serialize(writer, SourceRetryCount); - } - if (Optional.IsDefined(SourceRetryWait)) - { - writer.WritePropertyName("sourceRetryWait"u8); - JsonSerializer.Serialize(writer, SourceRetryWait); - } - if (Optional.IsDefined(MaxConcurrentConnections)) - { - writer.WritePropertyName("maxConcurrentConnections"u8); - JsonSerializer.Serialize(writer, MaxConcurrentConnections); - } - if (Optional.IsDefined(DisableMetricsCollection)) - { - writer.WritePropertyName("disableMetricsCollection"u8); - JsonSerializer.Serialize(writer, DisableMetricsCollection); - } - foreach (var item in AdditionalProperties) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.Value.ToString()).RootElement); -#endif - } - writer.WriteEndObject(); - } - - internal static ConcurSource DeserializeConcurSource(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - Optional> query = default; - Optional> queryTimeout = default; - Optional additionalColumns = default; - string type = default; - Optional> sourceRetryCount = default; - Optional> sourceRetryWait = default; - Optional> maxConcurrentConnections = default; - Optional> disableMetricsCollection = default; - IDictionary> additionalProperties = default; - Dictionary> additionalPropertiesDictionary = new Dictionary>(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("query"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - query = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("queryTimeout"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - queryTimeout = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("additionalColumns"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - additionalColumns = BinaryData.FromString(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("type"u8)) - { - type = property.Value.GetString(); - continue; - } - if (property.NameEquals("sourceRetryCount"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - sourceRetryCount = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("sourceRetryWait"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - sourceRetryWait = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("maxConcurrentConnections"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - maxConcurrentConnections = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("disableMetricsCollection"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - disableMetricsCollection = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - additionalPropertiesDictionary.Add(property.Name, JsonSerializer.Deserialize>(property.Value.GetRawText())); - } - additionalProperties = additionalPropertiesDictionary; - return new ConcurSource(type, sourceRetryCount.Value, sourceRetryWait.Value, maxConcurrentConnections.Value, disableMetricsCollection.Value, additionalProperties, queryTimeout.Value, additionalColumns.Value, query.Value); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/ConcurSource.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/ConcurSource.cs deleted file mode 100644 index 9c98c388..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/ConcurSource.cs +++ /dev/null @@ -1,37 +0,0 @@ -// - -#nullable disable - -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// A copy activity Concur Service source. - public partial class ConcurSource : TabularSource - { - /// Initializes a new instance of ConcurSource. - public ConcurSource() - { - CopySourceType = "ConcurSource"; - } - - /// Initializes a new instance of ConcurSource. - /// Copy source type. - /// Source retry count. Type: integer (or Expression with resultType integer). - /// Source retry wait. Type: string (or Expression with resultType string), pattern: ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). - /// The maximum concurrent connection count for the source data store. Type: integer (or Expression with resultType integer). - /// If true, disable data store metrics collection. Default is false. Type: boolean (or Expression with resultType boolean). - /// Additional Properties. - /// 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). - /// A query to retrieve data from source. Type: string (or Expression with resultType string). - internal ConcurSource(string copySourceType, DataFactoryElement sourceRetryCount, DataFactoryElement sourceRetryWait, DataFactoryElement maxConcurrentConnections, DataFactoryElement disableMetricsCollection, IDictionary> additionalProperties, DataFactoryElement queryTimeout, BinaryData additionalColumns, DataFactoryElement query) : base(copySourceType, sourceRetryCount, sourceRetryWait, maxConcurrentConnections, disableMetricsCollection, additionalProperties, queryTimeout, additionalColumns) - { - Query = query; - CopySourceType = copySourceType ?? "ConcurSource"; - } - - /// A query to retrieve data from source. Type: string (or Expression with resultType string). - public DataFactoryElement Query { get; set; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/ConnectionStateProperties.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/ConnectionStateProperties.Serialization.cs deleted file mode 100644 index 9111190e..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/ConnectionStateProperties.Serialization.cs +++ /dev/null @@ -1,48 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class ConnectionStateProperties : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - writer.WriteEndObject(); - } - - internal static ConnectionStateProperties DeserializeConnectionStateProperties(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - Optional actionsRequired = default; - Optional description = default; - Optional status = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("actionsRequired"u8)) - { - actionsRequired = property.Value.GetString(); - continue; - } - if (property.NameEquals("description"u8)) - { - description = property.Value.GetString(); - continue; - } - if (property.NameEquals("status"u8)) - { - status = property.Value.GetString(); - continue; - } - } - return new ConnectionStateProperties(actionsRequired.Value, description.Value, status.Value); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/ConnectionStateProperties.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/ConnectionStateProperties.cs deleted file mode 100644 index aed79d83..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/ConnectionStateProperties.cs +++ /dev/null @@ -1,33 +0,0 @@ -// - -#nullable disable - -namespace AzureDataFactory.TestingFramework.Models -{ - /// The connection state of a managed private endpoint. - public partial class ConnectionStateProperties - { - /// Initializes a new instance of ConnectionStateProperties. - public ConnectionStateProperties() - { - } - - /// Initializes a new instance of ConnectionStateProperties. - /// The actions required on the managed private endpoint. - /// The managed private endpoint description. - /// The approval status. - internal ConnectionStateProperties(string actionsRequired, string description, string status) - { - ActionsRequired = actionsRequired; - Description = description; - Status = status; - } - - /// The actions required on the managed private endpoint. - public string ActionsRequired { get; } - /// The managed private endpoint description. - public string Description { get; } - /// The approval status. - public string Status { get; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/ControlActivity.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/ControlActivity.Serialization.cs deleted file mode 100644 index 51d128bb..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/ControlActivity.Serialization.cs +++ /dev/null @@ -1,169 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class ControlActivity : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ActivityType); - if (Optional.IsDefined(Description)) - { - writer.WritePropertyName("description"u8); - writer.WriteStringValue(Description); - } - if (Optional.IsDefined(State)) - { - writer.WritePropertyName("state"u8); - writer.WriteStringValue(State.Value.ToString()); - } - if (Optional.IsDefined(OnInactiveMarkAs)) - { - writer.WritePropertyName("onInactiveMarkAs"u8); - writer.WriteStringValue(OnInactiveMarkAs.Value.ToString()); - } - if (Optional.IsCollectionDefined(DependsOn)) - { - writer.WritePropertyName("dependsOn"u8); - writer.WriteStartArray(); - foreach (var item in DependsOn) - { - writer.WriteObjectValue(item); - } - writer.WriteEndArray(); - } - if (Optional.IsCollectionDefined(UserProperties)) - { - writer.WritePropertyName("userProperties"u8); - writer.WriteStartArray(); - foreach (var item in UserProperties) - { - writer.WriteObjectValue(item); - } - writer.WriteEndArray(); - } - foreach (var item in AdditionalProperties) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.Value.ToString()).RootElement); -#endif - } - writer.WriteEndObject(); - } - - internal static ControlActivity DeserializeControlActivity(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - if (element.TryGetProperty("type", out JsonElement discriminator)) - { - switch (discriminator.GetString()) - { - case "AppendVariable": return AppendVariableActivity.DeserializeAppendVariableActivity(element); - case "ExecutePipeline": return ExecutePipelineActivity.DeserializeExecutePipelineActivity(element); - case "Fail": return FailActivity.DeserializeFailActivity(element); - case "Filter": return FilterActivity.DeserializeFilterActivity(element); - case "ForEach": return ForEachActivity.DeserializeForEachActivity(element); - case "IfCondition": return IfConditionActivity.DeserializeIfConditionActivity(element); - case "SetVariable": return SetVariableActivity.DeserializeSetVariableActivity(element); - case "Switch": return SwitchActivity.DeserializeSwitchActivity(element); - case "Until": return UntilActivity.DeserializeUntilActivity(element); - case "Validation": return ValidationActivity.DeserializeValidationActivity(element); - case "Wait": return WaitActivity.DeserializeWaitActivity(element); - case "WebHook": return WebHookActivity.DeserializeWebHookActivity(element); - } - } - string name = default; - string type = "Container"; - Optional description = default; - Optional state = default; - Optional onInactiveMarkAs = default; - Optional> dependsOn = default; - Optional> userProperties = default; - IDictionary> additionalProperties = default; - Dictionary> additionalPropertiesDictionary = new Dictionary>(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("name"u8)) - { - name = property.Value.GetString(); - continue; - } - if (property.NameEquals("type"u8)) - { - type = property.Value.GetString(); - continue; - } - if (property.NameEquals("description"u8)) - { - description = property.Value.GetString(); - continue; - } - if (property.NameEquals("state"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - state = new PipelineActivityState(property.Value.GetString()); - continue; - } - if (property.NameEquals("onInactiveMarkAs"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - onInactiveMarkAs = new ActivityOnInactiveMarkAs(property.Value.GetString()); - continue; - } - if (property.NameEquals("dependsOn"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - array.Add(PipelineActivityDependency.DeserializePipelineActivityDependency(item)); - } - dependsOn = array; - continue; - } - if (property.NameEquals("userProperties"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - array.Add(PipelineActivityUserProperty.DeserializePipelineActivityUserProperty(item)); - } - userProperties = array; - continue; - } - additionalPropertiesDictionary.Add(property.Name, JsonSerializer.Deserialize>(property.Value.GetRawText())); - } - additionalProperties = additionalPropertiesDictionary; - return new ControlActivity(name, type, description.Value, Optional.ToNullable(state), Optional.ToNullable(onInactiveMarkAs), Optional.ToList(dependsOn), Optional.ToList(userProperties), additionalProperties); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/ControlActivity.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/ControlActivity.cs deleted file mode 100644 index 5b56da75..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/ControlActivity.cs +++ /dev/null @@ -1,41 +0,0 @@ -// - -#nullable disable - -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// - /// Base class for all control activities like IfCondition, ForEach , Until. - /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. - /// The available derived classes include , , , , , , , , , , and . - /// - public partial class ControlActivity : PipelineActivity - { - /// Initializes a new instance of ControlActivity. - /// Activity name. - /// is null. - public ControlActivity(string name) : base(name) - { - Argument.AssertNotNull(name, nameof(name)); - - ActivityType = "Container"; - } - - /// Initializes a new instance of ControlActivity. - /// Activity name. - /// Type of activity. - /// Activity description. - /// Activity state. This is an optional property and if not provided, the state will be Active by default. - /// 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. - /// Activity depends on condition. - /// Activity user properties. - /// Additional Properties. - internal ControlActivity(string name, string activityType, string description, PipelineActivityState? state, ActivityOnInactiveMarkAs? onInactiveMarkAs, IList dependsOn, IList userProperties, IDictionary> additionalProperties) : base(name, activityType, description, state, onInactiveMarkAs, dependsOn, userProperties, additionalProperties) - { - ActivityType = activityType ?? "Container"; - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/CopyActivity.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/CopyActivity.Serialization.cs deleted file mode 100644 index d9977438..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/CopyActivity.Serialization.cs +++ /dev/null @@ -1,513 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class CopyActivity : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - if (Optional.IsCollectionDefined(Inputs)) - { - writer.WritePropertyName("inputs"u8); - writer.WriteStartArray(); - foreach (var item in Inputs) - { - writer.WriteObjectValue(item); - } - writer.WriteEndArray(); - } - if (Optional.IsCollectionDefined(Outputs)) - { - writer.WritePropertyName("outputs"u8); - writer.WriteStartArray(); - foreach (var item in Outputs) - { - writer.WriteObjectValue(item); - } - writer.WriteEndArray(); - } - if (Optional.IsDefined(LinkedServiceName)) - { - writer.WritePropertyName("linkedServiceName"u8); - JsonSerializer.Serialize(writer, LinkedServiceName); - } - if (Optional.IsDefined(Policy)) - { - writer.WritePropertyName("policy"u8); - writer.WriteObjectValue(Policy); - } - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ActivityType); - if (Optional.IsDefined(Description)) - { - writer.WritePropertyName("description"u8); - writer.WriteStringValue(Description); - } - if (Optional.IsDefined(State)) - { - writer.WritePropertyName("state"u8); - writer.WriteStringValue(State.Value.ToString()); - } - if (Optional.IsDefined(OnInactiveMarkAs)) - { - writer.WritePropertyName("onInactiveMarkAs"u8); - writer.WriteStringValue(OnInactiveMarkAs.Value.ToString()); - } - if (Optional.IsCollectionDefined(DependsOn)) - { - writer.WritePropertyName("dependsOn"u8); - writer.WriteStartArray(); - foreach (var item in DependsOn) - { - writer.WriteObjectValue(item); - } - writer.WriteEndArray(); - } - if (Optional.IsCollectionDefined(UserProperties)) - { - writer.WritePropertyName("userProperties"u8); - writer.WriteStartArray(); - foreach (var item in UserProperties) - { - writer.WriteObjectValue(item); - } - writer.WriteEndArray(); - } - writer.WritePropertyName("typeProperties"u8); - writer.WriteStartObject(); - writer.WritePropertyName("source"u8); - writer.WriteObjectValue(Source); - writer.WritePropertyName("sink"u8); - writer.WriteObjectValue(Sink); - if (Optional.IsDefined(Translator)) - { - writer.WritePropertyName("translator"u8); -#if NET6_0_OR_GREATER - writer.WriteRawValue(Translator); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(Translator.ToString()).RootElement); -#endif - } - if (Optional.IsDefined(EnableStaging)) - { - writer.WritePropertyName("enableStaging"u8); - JsonSerializer.Serialize(writer, EnableStaging); - } - if (Optional.IsDefined(StagingSettings)) - { - writer.WritePropertyName("stagingSettings"u8); - writer.WriteObjectValue(StagingSettings); - } - if (Optional.IsDefined(ParallelCopies)) - { - writer.WritePropertyName("parallelCopies"u8); - JsonSerializer.Serialize(writer, ParallelCopies); - } - if (Optional.IsDefined(DataIntegrationUnits)) - { - writer.WritePropertyName("dataIntegrationUnits"u8); - JsonSerializer.Serialize(writer, DataIntegrationUnits); - } - if (Optional.IsDefined(EnableSkipIncompatibleRow)) - { - writer.WritePropertyName("enableSkipIncompatibleRow"u8); - JsonSerializer.Serialize(writer, EnableSkipIncompatibleRow); - } - if (Optional.IsDefined(RedirectIncompatibleRowSettings)) - { - writer.WritePropertyName("redirectIncompatibleRowSettings"u8); - writer.WriteObjectValue(RedirectIncompatibleRowSettings); - } - if (Optional.IsDefined(LogStorageSettings)) - { - writer.WritePropertyName("logStorageSettings"u8); - writer.WriteObjectValue(LogStorageSettings); - } - if (Optional.IsDefined(LogSettings)) - { - writer.WritePropertyName("logSettings"u8); - writer.WriteObjectValue(LogSettings); - } - if (Optional.IsCollectionDefined(PreserveRules)) - { - writer.WritePropertyName("preserveRules"u8); - writer.WriteStartArray(); - foreach (var item in PreserveRules) - { - if (item == null) - { - writer.WriteNullValue(); - continue; - } -#if NET6_0_OR_GREATER - writer.WriteRawValue(item); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.ToString()).RootElement); -#endif - } - writer.WriteEndArray(); - } - if (Optional.IsCollectionDefined(Preserve)) - { - writer.WritePropertyName("preserve"u8); - writer.WriteStartArray(); - foreach (var item in Preserve) - { - if (item == null) - { - writer.WriteNullValue(); - continue; - } -#if NET6_0_OR_GREATER - writer.WriteRawValue(item); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.ToString()).RootElement); -#endif - } - writer.WriteEndArray(); - } - if (Optional.IsDefined(ValidateDataConsistency)) - { - writer.WritePropertyName("validateDataConsistency"u8); - JsonSerializer.Serialize(writer, ValidateDataConsistency); - } - if (Optional.IsDefined(SkipErrorFile)) - { - writer.WritePropertyName("skipErrorFile"u8); - writer.WriteObjectValue(SkipErrorFile); - } - writer.WriteEndObject(); - foreach (var item in AdditionalProperties) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.Value.ToString()).RootElement); -#endif - } - writer.WriteEndObject(); - } - - internal static CopyActivity DeserializeCopyActivity(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - Optional> inputs = default; - Optional> outputs = default; - Optional linkedServiceName = default; - Optional policy = default; - string name = default; - string type = default; - Optional description = default; - Optional state = default; - Optional onInactiveMarkAs = default; - Optional> dependsOn = default; - Optional> userProperties = default; - CopyActivitySource source = default; - CopySink sink = default; - Optional translator = default; - Optional> enableStaging = default; - Optional stagingSettings = default; - Optional> parallelCopies = default; - Optional> dataIntegrationUnits = default; - Optional> enableSkipIncompatibleRow = default; - Optional redirectIncompatibleRowSettings = default; - Optional logStorageSettings = default; - Optional logSettings = default; - Optional> preserveRules = default; - Optional> preserve = default; - Optional> validateDataConsistency = default; - Optional skipErrorFile = default; - IDictionary> additionalProperties = default; - Dictionary> additionalPropertiesDictionary = new Dictionary>(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("inputs"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - array.Add(DatasetReference.DeserializeDatasetReference(item)); - } - inputs = array; - continue; - } - if (property.NameEquals("outputs"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - array.Add(DatasetReference.DeserializeDatasetReference(item)); - } - outputs = array; - continue; - } - if (property.NameEquals("linkedServiceName"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - linkedServiceName = JsonSerializer.Deserialize(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("policy"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - policy = PipelineActivityPolicy.DeserializePipelineActivityPolicy(property.Value); - continue; - } - if (property.NameEquals("name"u8)) - { - name = property.Value.GetString(); - continue; - } - if (property.NameEquals("type"u8)) - { - type = property.Value.GetString(); - continue; - } - if (property.NameEquals("description"u8)) - { - description = property.Value.GetString(); - continue; - } - if (property.NameEquals("state"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - state = new PipelineActivityState(property.Value.GetString()); - continue; - } - if (property.NameEquals("onInactiveMarkAs"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - onInactiveMarkAs = new ActivityOnInactiveMarkAs(property.Value.GetString()); - continue; - } - if (property.NameEquals("dependsOn"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - array.Add(PipelineActivityDependency.DeserializePipelineActivityDependency(item)); - } - dependsOn = array; - continue; - } - if (property.NameEquals("userProperties"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - array.Add(PipelineActivityUserProperty.DeserializePipelineActivityUserProperty(item)); - } - userProperties = array; - continue; - } - if (property.NameEquals("typeProperties"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - foreach (var property0 in property.Value.EnumerateObject()) - { - if (property0.NameEquals("source"u8)) - { - source = CopyActivitySource.DeserializeCopyActivitySource(property0.Value); - continue; - } - if (property0.NameEquals("sink"u8)) - { - sink = CopySink.DeserializeCopySink(property0.Value); - continue; - } - if (property0.NameEquals("translator"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - translator = BinaryData.FromString(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("enableStaging"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - enableStaging = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("stagingSettings"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - stagingSettings = StagingSettings.DeserializeStagingSettings(property0.Value); - continue; - } - if (property0.NameEquals("parallelCopies"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - parallelCopies = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("dataIntegrationUnits"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - dataIntegrationUnits = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("enableSkipIncompatibleRow"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - enableSkipIncompatibleRow = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("redirectIncompatibleRowSettings"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - redirectIncompatibleRowSettings = RedirectIncompatibleRowSettings.DeserializeRedirectIncompatibleRowSettings(property0.Value); - continue; - } - if (property0.NameEquals("logStorageSettings"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - logStorageSettings = LogStorageSettings.DeserializeLogStorageSettings(property0.Value); - continue; - } - if (property0.NameEquals("logSettings"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - logSettings = DataFactoryLogSettings.DeserializeDataFactoryLogSettings(property0.Value); - continue; - } - if (property0.NameEquals("preserveRules"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property0.Value.EnumerateArray()) - { - if (item.ValueKind == JsonValueKind.Null) - { - array.Add(null); - } - else - { - array.Add(BinaryData.FromString(item.GetRawText())); - } - } - preserveRules = array; - continue; - } - if (property0.NameEquals("preserve"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property0.Value.EnumerateArray()) - { - if (item.ValueKind == JsonValueKind.Null) - { - array.Add(null); - } - else - { - array.Add(BinaryData.FromString(item.GetRawText())); - } - } - preserve = array; - continue; - } - if (property0.NameEquals("validateDataConsistency"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - validateDataConsistency = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("skipErrorFile"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - skipErrorFile = SkipErrorFile.DeserializeSkipErrorFile(property0.Value); - continue; - } - } - continue; - } - additionalPropertiesDictionary.Add(property.Name, JsonSerializer.Deserialize>(property.Value.GetRawText())); - } - additionalProperties = additionalPropertiesDictionary; - return new CopyActivity(name, type, description.Value, Optional.ToNullable(state), Optional.ToNullable(onInactiveMarkAs), Optional.ToList(dependsOn), Optional.ToList(userProperties), additionalProperties, linkedServiceName, policy.Value, Optional.ToList(inputs), Optional.ToList(outputs), source, sink, translator.Value, enableStaging.Value, stagingSettings.Value, parallelCopies.Value, dataIntegrationUnits.Value, enableSkipIncompatibleRow.Value, redirectIncompatibleRowSettings.Value, logStorageSettings.Value, logSettings.Value, Optional.ToList(preserveRules), Optional.ToList(preserve), validateDataConsistency.Value, skipErrorFile.Value); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/CopyActivity.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/CopyActivity.cs deleted file mode 100644 index 9aef7446..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/CopyActivity.cs +++ /dev/null @@ -1,229 +0,0 @@ -// - -#nullable disable - -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// Copy activity. - public partial class CopyActivity : ExecutionActivity - { - /// Initializes a new instance of CopyActivity. - /// Activity name. - /// - /// Copy activity source. - /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. - /// The available derived classes include , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , and . - /// - /// - /// Copy activity sink. - /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. - /// The available derived classes include , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , and . - /// - /// , or is null. - public CopyActivity(string name, CopyActivitySource source, CopySink sink) : base(name) - { - Argument.AssertNotNull(name, nameof(name)); - Argument.AssertNotNull(source, nameof(source)); - Argument.AssertNotNull(sink, nameof(sink)); - - Inputs = new ChangeTrackingList(); - Outputs = new ChangeTrackingList(); - Source = source; - Sink = sink; - PreserveRules = new ChangeTrackingList(); - Preserve = new ChangeTrackingList(); - ActivityType = "Copy"; - } - - /// Initializes a new instance of CopyActivity. - /// Activity name. - /// Type of activity. - /// Activity description. - /// Activity state. This is an optional property and if not provided, the state will be Active by default. - /// 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. - /// Activity depends on condition. - /// Activity user properties. - /// Additional Properties. - /// Linked service reference. - /// Activity policy. - /// List of inputs for the activity. - /// List of outputs for the activity. - /// - /// Copy activity source. - /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. - /// The available derived classes include , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , and . - /// - /// - /// Copy activity sink. - /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. - /// The available derived classes include , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , and . - /// - /// Copy activity translator. If not specified, tabular translator is used. - /// Specifies whether to copy data via an interim staging. Default value is false. Type: boolean (or Expression with resultType boolean). - /// Specifies interim staging settings when EnableStaging is true. - /// Maximum number of concurrent sessions opened on the source or sink to avoid overloading the data store. Type: integer (or Expression with resultType integer), minimum: 0. - /// Maximum number of data integration units that can be used to perform this data movement. Type: integer (or Expression with resultType integer), minimum: 0. - /// Whether to skip incompatible row. Default value is false. Type: boolean (or Expression with resultType boolean). - /// Redirect incompatible row settings when EnableSkipIncompatibleRow is true. - /// (Deprecated. Please use LogSettings) Log storage settings customer need to provide when enabling session log. - /// Log settings customer needs provide when enabling log. - /// Preserve Rules. - /// Preserve rules. - /// Whether to enable Data Consistency validation. Type: boolean (or Expression with resultType boolean). - /// Specify the fault tolerance for data consistency. - internal CopyActivity(string name, string activityType, string description, PipelineActivityState? state, ActivityOnInactiveMarkAs? onInactiveMarkAs, IList dependsOn, IList userProperties, IDictionary> additionalProperties, DataFactoryLinkedServiceReference linkedServiceName, PipelineActivityPolicy policy, IList inputs, IList outputs, CopyActivitySource source, CopySink sink, BinaryData translator, DataFactoryElement enableStaging, StagingSettings stagingSettings, DataFactoryElement parallelCopies, DataFactoryElement dataIntegrationUnits, DataFactoryElement enableSkipIncompatibleRow, RedirectIncompatibleRowSettings redirectIncompatibleRowSettings, LogStorageSettings logStorageSettings, DataFactoryLogSettings logSettings, IList preserveRules, IList preserve, DataFactoryElement validateDataConsistency, SkipErrorFile skipErrorFile) : base(name, activityType, description, state, onInactiveMarkAs, dependsOn, userProperties, additionalProperties, linkedServiceName, policy) - { - Inputs = inputs; - Outputs = outputs; - Source = source; - Sink = sink; - Translator = translator; - EnableStaging = enableStaging; - StagingSettings = stagingSettings; - ParallelCopies = parallelCopies; - DataIntegrationUnits = dataIntegrationUnits; - EnableSkipIncompatibleRow = enableSkipIncompatibleRow; - RedirectIncompatibleRowSettings = redirectIncompatibleRowSettings; - LogStorageSettings = logStorageSettings; - LogSettings = logSettings; - PreserveRules = preserveRules; - Preserve = preserve; - ValidateDataConsistency = validateDataConsistency; - SkipErrorFile = skipErrorFile; - ActivityType = activityType ?? "Copy"; - } - - /// List of inputs for the activity. - public IList Inputs { get; } - /// List of outputs for the activity. - public IList Outputs { get; } - /// - /// Copy activity source. - /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. - /// The available derived classes include , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , and . - /// - public CopyActivitySource Source { get; set; } - /// - /// Copy activity sink. - /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. - /// The available derived classes include , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , and . - /// - public CopySink Sink { get; set; } - /// - /// Copy activity translator. If not specified, tabular translator is used. - /// - /// To assign an object to this property use . - /// - /// - /// To assign an already formated json string to this property use . - /// - /// - /// Examples: - /// - /// - /// BinaryData.FromObjectAsJson("foo") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromString("\"foo\"") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromObjectAsJson(new { key = "value" }) - /// Creates a payload of { "key": "value" }. - /// - /// - /// BinaryData.FromString("{\"key\": \"value\"}") - /// Creates a payload of { "key": "value" }. - /// - /// - /// - /// - public BinaryData Translator { get; set; } - /// Specifies whether to copy data via an interim staging. Default value is false. Type: boolean (or Expression with resultType boolean). - public DataFactoryElement EnableStaging { get; set; } - /// Specifies interim staging settings when EnableStaging is true. - public StagingSettings StagingSettings { get; set; } - /// Maximum number of concurrent sessions opened on the source or sink to avoid overloading the data store. Type: integer (or Expression with resultType integer), minimum: 0. - public DataFactoryElement ParallelCopies { get; set; } - /// Maximum number of data integration units that can be used to perform this data movement. Type: integer (or Expression with resultType integer), minimum: 0. - public DataFactoryElement DataIntegrationUnits { get; set; } - /// Whether to skip incompatible row. Default value is false. Type: boolean (or Expression with resultType boolean). - public DataFactoryElement EnableSkipIncompatibleRow { get; set; } - /// Redirect incompatible row settings when EnableSkipIncompatibleRow is true. - public RedirectIncompatibleRowSettings RedirectIncompatibleRowSettings { get; set; } - /// (Deprecated. Please use LogSettings) Log storage settings customer need to provide when enabling session log. - public LogStorageSettings LogStorageSettings { get; set; } - /// Log settings customer needs provide when enabling log. - public DataFactoryLogSettings LogSettings { get; set; } - /// - /// Preserve Rules. - /// - /// To assign an object to the element of this property use . - /// - /// - /// To assign an already formated json string to this property use . - /// - /// - /// Examples: - /// - /// - /// BinaryData.FromObjectAsJson("foo") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromString("\"foo\"") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromObjectAsJson(new { key = "value" }) - /// Creates a payload of { "key": "value" }. - /// - /// - /// BinaryData.FromString("{\"key\": \"value\"}") - /// Creates a payload of { "key": "value" }. - /// - /// - /// - /// - public IList PreserveRules { get; } - /// - /// Preserve rules. - /// - /// To assign an object to the element of this property use . - /// - /// - /// To assign an already formated json string to this property use . - /// - /// - /// Examples: - /// - /// - /// BinaryData.FromObjectAsJson("foo") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromString("\"foo\"") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromObjectAsJson(new { key = "value" }) - /// Creates a payload of { "key": "value" }. - /// - /// - /// BinaryData.FromString("{\"key\": \"value\"}") - /// Creates a payload of { "key": "value" }. - /// - /// - /// - /// - public IList Preserve { get; } - /// Whether to enable Data Consistency validation. Type: boolean (or Expression with resultType boolean). - public DataFactoryElement ValidateDataConsistency { get; set; } - /// Specify the fault tolerance for data consistency. - public SkipErrorFile SkipErrorFile { get; set; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/CopyActivityLogSettings.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/CopyActivityLogSettings.Serialization.cs deleted file mode 100644 index 9c512c1f..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/CopyActivityLogSettings.Serialization.cs +++ /dev/null @@ -1,61 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class CopyActivityLogSettings : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - if (Optional.IsDefined(LogLevel)) - { - writer.WritePropertyName("logLevel"u8); - JsonSerializer.Serialize(writer, LogLevel); - } - if (Optional.IsDefined(EnableReliableLogging)) - { - writer.WritePropertyName("enableReliableLogging"u8); - JsonSerializer.Serialize(writer, EnableReliableLogging); - } - writer.WriteEndObject(); - } - - internal static CopyActivityLogSettings DeserializeCopyActivityLogSettings(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - Optional> logLevel = default; - Optional> enableReliableLogging = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("logLevel"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - logLevel = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("enableReliableLogging"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - enableReliableLogging = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - } - return new CopyActivityLogSettings(logLevel.Value, enableReliableLogging.Value); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/CopyActivityLogSettings.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/CopyActivityLogSettings.cs deleted file mode 100644 index 631fb79d..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/CopyActivityLogSettings.cs +++ /dev/null @@ -1,31 +0,0 @@ -// - -#nullable disable - -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// Settings for copy activity log. - public partial class CopyActivityLogSettings - { - /// Initializes a new instance of CopyActivityLogSettings. - public CopyActivityLogSettings() - { - } - - /// Initializes a new instance of CopyActivityLogSettings. - /// Gets or sets the log level, support: Info, Warning. Type: string (or Expression with resultType string). - /// Specifies whether to enable reliable logging. Type: boolean (or Expression with resultType boolean). - internal CopyActivityLogSettings(DataFactoryElement logLevel, DataFactoryElement enableReliableLogging) - { - LogLevel = logLevel; - EnableReliableLogging = enableReliableLogging; - } - - /// Gets or sets the log level, support: Info, Warning. Type: string (or Expression with resultType string). - public DataFactoryElement LogLevel { get; set; } - /// Specifies whether to enable reliable logging. Type: boolean (or Expression with resultType boolean). - public DataFactoryElement EnableReliableLogging { get; set; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/CopyActivitySource.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/CopyActivitySource.Serialization.cs deleted file mode 100644 index 402fa9fa..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/CopyActivitySource.Serialization.cs +++ /dev/null @@ -1,160 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class CopyActivitySource : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - writer.WritePropertyName("type"u8); - writer.WriteStringValue(CopySourceType); - if (Optional.IsDefined(SourceRetryCount)) - { - writer.WritePropertyName("sourceRetryCount"u8); - JsonSerializer.Serialize(writer, SourceRetryCount); - } - if (Optional.IsDefined(SourceRetryWait)) - { - writer.WritePropertyName("sourceRetryWait"u8); - JsonSerializer.Serialize(writer, SourceRetryWait); - } - if (Optional.IsDefined(MaxConcurrentConnections)) - { - writer.WritePropertyName("maxConcurrentConnections"u8); - JsonSerializer.Serialize(writer, MaxConcurrentConnections); - } - if (Optional.IsDefined(DisableMetricsCollection)) - { - writer.WritePropertyName("disableMetricsCollection"u8); - JsonSerializer.Serialize(writer, DisableMetricsCollection); - } - foreach (var item in AdditionalProperties) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.Value.ToString()).RootElement); -#endif - } - writer.WriteEndObject(); - } - - internal static CopyActivitySource DeserializeCopyActivitySource(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - if (element.TryGetProperty("type", out JsonElement discriminator)) - { - switch (discriminator.GetString()) - { - case "AmazonMWSSource": return AmazonMwsSource.DeserializeAmazonMwsSource(element); - case "AmazonRdsForOracleSource": return AmazonRdsForOracleSource.DeserializeAmazonRdsForOracleSource(element); - case "AmazonRdsForSqlServerSource": return AmazonRdsForSqlServerSource.DeserializeAmazonRdsForSqlServerSource(element); - case "AmazonRedshiftSource": return AmazonRedshiftSource.DeserializeAmazonRedshiftSource(element); - case "AvroSource": return AvroSource.DeserializeAvroSource(element); - case "AzureBlobFSSource": return AzureBlobFSSource.DeserializeAzureBlobFSSource(element); - case "AzureDataExplorerSource": return AzureDataExplorerSource.DeserializeAzureDataExplorerSource(element); - case "AzureDataLakeStoreSource": return AzureDataLakeStoreSource.DeserializeAzureDataLakeStoreSource(element); - case "AzureDatabricksDeltaLakeSource": return AzureDatabricksDeltaLakeSource.DeserializeAzureDatabricksDeltaLakeSource(element); - case "AzureMariaDBSource": return AzureMariaDBSource.DeserializeAzureMariaDBSource(element); - case "AzureMySqlSource": return AzureMySqlSource.DeserializeAzureMySqlSource(element); - case "AzurePostgreSqlSource": return AzurePostgreSqlSource.DeserializeAzurePostgreSqlSource(element); - case "AzureSqlSource": return AzureSqlSource.DeserializeAzureSqlSource(element); - case "AzureTableSource": return AzureTableSource.DeserializeAzureTableSource(element); - case "BinarySource": return BinarySource.DeserializeBinarySource(element); - case "BlobSource": return DataFactoryBlobSource.DeserializeDataFactoryBlobSource(element); - case "CassandraSource": return CassandraSource.DeserializeCassandraSource(element); - case "CommonDataServiceForAppsSource": return CommonDataServiceForAppsSource.DeserializeCommonDataServiceForAppsSource(element); - case "ConcurSource": return ConcurSource.DeserializeConcurSource(element); - case "CosmosDbMongoDbApiSource": return CosmosDBMongoDBApiSource.DeserializeCosmosDBMongoDBApiSource(element); - case "CosmosDbSqlApiSource": return CosmosDBSqlApiSource.DeserializeCosmosDBSqlApiSource(element); - case "CouchbaseSource": return CouchbaseSource.DeserializeCouchbaseSource(element); - case "Db2Source": return Db2Source.DeserializeDb2Source(element); - case "DelimitedTextSource": return DelimitedTextSource.DeserializeDelimitedTextSource(element); - case "DocumentDbCollectionSource": return DocumentDBCollectionSource.DeserializeDocumentDBCollectionSource(element); - case "DrillSource": return DrillSource.DeserializeDrillSource(element); - case "DynamicsAXSource": return DynamicsAXSource.DeserializeDynamicsAXSource(element); - case "DynamicsCrmSource": return DynamicsCrmSource.DeserializeDynamicsCrmSource(element); - case "DynamicsSource": return DynamicsSource.DeserializeDynamicsSource(element); - case "EloquaSource": return EloquaSource.DeserializeEloquaSource(element); - case "ExcelSource": return ExcelSource.DeserializeExcelSource(element); - case "FileSystemSource": return FileSystemSource.DeserializeFileSystemSource(element); - case "GoogleAdWordsSource": return GoogleAdWordsSource.DeserializeGoogleAdWordsSource(element); - case "GoogleBigQuerySource": return GoogleBigQuerySource.DeserializeGoogleBigQuerySource(element); - case "GreenplumSource": return GreenplumSource.DeserializeGreenplumSource(element); - case "HBaseSource": return HBaseSource.DeserializeHBaseSource(element); - case "HdfsSource": return HdfsSource.DeserializeHdfsSource(element); - case "HiveSource": return HiveSource.DeserializeHiveSource(element); - case "HttpSource": return DataFactoryHttpFileSource.DeserializeDataFactoryHttpFileSource(element); - case "HubspotSource": return HubspotSource.DeserializeHubspotSource(element); - case "ImpalaSource": return ImpalaSource.DeserializeImpalaSource(element); - case "InformixSource": return InformixSource.DeserializeInformixSource(element); - case "JiraSource": return JiraSource.DeserializeJiraSource(element); - case "JsonSource": return JsonSource.DeserializeJsonSource(element); - case "MagentoSource": return MagentoSource.DeserializeMagentoSource(element); - case "MariaDBSource": return MariaDBSource.DeserializeMariaDBSource(element); - case "MarketoSource": return MarketoSource.DeserializeMarketoSource(element); - case "MicrosoftAccessSource": return MicrosoftAccessSource.DeserializeMicrosoftAccessSource(element); - case "MongoDbAtlasSource": return MongoDBAtlasSource.DeserializeMongoDBAtlasSource(element); - case "MongoDbSource": return MongoDBSource.DeserializeMongoDBSource(element); - case "MongoDbV2Source": return MongoDBV2Source.DeserializeMongoDBV2Source(element); - case "MySqlSource": return MySqlSource.DeserializeMySqlSource(element); - case "NetezzaSource": return NetezzaSource.DeserializeNetezzaSource(element); - case "ODataSource": return ODataSource.DeserializeODataSource(element); - case "OdbcSource": return OdbcSource.DeserializeOdbcSource(element); - case "Office365Source": return Office365Source.DeserializeOffice365Source(element); - case "OracleServiceCloudSource": return OracleServiceCloudSource.DeserializeOracleServiceCloudSource(element); - case "OracleSource": return OracleSource.DeserializeOracleSource(element); - case "OrcSource": return OrcSource.DeserializeOrcSource(element); - case "ParquetSource": return ParquetSource.DeserializeParquetSource(element); - case "PaypalSource": return PaypalSource.DeserializePaypalSource(element); - case "PhoenixSource": return PhoenixSource.DeserializePhoenixSource(element); - case "PostgreSqlSource": return PostgreSqlSource.DeserializePostgreSqlSource(element); - case "PrestoSource": return PrestoSource.DeserializePrestoSource(element); - case "QuickBooksSource": return QuickBooksSource.DeserializeQuickBooksSource(element); - case "RelationalSource": return RelationalSource.DeserializeRelationalSource(element); - case "ResponsysSource": return ResponsysSource.DeserializeResponsysSource(element); - case "RestSource": return RestSource.DeserializeRestSource(element); - case "SalesforceMarketingCloudSource": return SalesforceMarketingCloudSource.DeserializeSalesforceMarketingCloudSource(element); - case "SalesforceServiceCloudSource": return SalesforceServiceCloudSource.DeserializeSalesforceServiceCloudSource(element); - case "SalesforceSource": return SalesforceSource.DeserializeSalesforceSource(element); - case "SapBwSource": return SapBWSource.DeserializeSapBWSource(element); - case "SapCloudForCustomerSource": return SapCloudForCustomerSource.DeserializeSapCloudForCustomerSource(element); - case "SapEccSource": return SapEccSource.DeserializeSapEccSource(element); - case "SapHanaSource": return SapHanaSource.DeserializeSapHanaSource(element); - case "SapOdpSource": return SapOdpSource.DeserializeSapOdpSource(element); - case "SapOpenHubSource": return SapOpenHubSource.DeserializeSapOpenHubSource(element); - case "SapTableSource": return SapTableSource.DeserializeSapTableSource(element); - case "ServiceNowSource": return ServiceNowSource.DeserializeServiceNowSource(element); - case "SharePointOnlineListSource": return SharePointOnlineListSource.DeserializeSharePointOnlineListSource(element); - case "ShopifySource": return ShopifySource.DeserializeShopifySource(element); - case "SnowflakeSource": return SnowflakeSource.DeserializeSnowflakeSource(element); - case "SparkSource": return SparkSource.DeserializeSparkSource(element); - case "SqlDWSource": return SqlDWSource.DeserializeSqlDWSource(element); - case "SqlMISource": return SqlMISource.DeserializeSqlMISource(element); - case "SqlServerSource": return SqlServerSource.DeserializeSqlServerSource(element); - case "SqlSource": return SqlSource.DeserializeSqlSource(element); - case "SquareSource": return SquareSource.DeserializeSquareSource(element); - case "SybaseSource": return SybaseSource.DeserializeSybaseSource(element); - case "TabularSource": return TabularSource.DeserializeTabularSource(element); - case "TeradataSource": return TeradataSource.DeserializeTeradataSource(element); - case "VerticaSource": return VerticaSource.DeserializeVerticaSource(element); - case "WebSource": return WebSource.DeserializeWebSource(element); - case "XeroSource": return XeroSource.DeserializeXeroSource(element); - case "XmlSource": return XmlSource.DeserializeXmlSource(element); - case "ZohoSource": return ZohoSource.DeserializeZohoSource(element); - } - } - return UnknownCopySource.DeserializeUnknownCopySource(element); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/CopyActivitySource.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/CopyActivitySource.cs deleted file mode 100644 index a7f4ddd5..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/CopyActivitySource.cs +++ /dev/null @@ -1,82 +0,0 @@ -// - -#nullable disable - -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// - /// A copy activity source. - /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. - /// The available derived classes include , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , and . - /// - public partial class CopyActivitySource - { - /// Initializes a new instance of CopyActivitySource. - public CopyActivitySource() - { - AdditionalProperties = new ChangeTrackingDictionary>(); - } - - /// Initializes a new instance of CopyActivitySource. - /// Copy source type. - /// Source retry count. Type: integer (or Expression with resultType integer). - /// Source retry wait. Type: string (or Expression with resultType string), pattern: ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). - /// The maximum concurrent connection count for the source data store. Type: integer (or Expression with resultType integer). - /// If true, disable data store metrics collection. Default is false. Type: boolean (or Expression with resultType boolean). - /// Additional Properties. - internal CopyActivitySource(string copySourceType, DataFactoryElement sourceRetryCount, DataFactoryElement sourceRetryWait, DataFactoryElement maxConcurrentConnections, DataFactoryElement disableMetricsCollection, IDictionary> additionalProperties) - { - CopySourceType = copySourceType; - SourceRetryCount = sourceRetryCount; - SourceRetryWait = sourceRetryWait; - MaxConcurrentConnections = maxConcurrentConnections; - DisableMetricsCollection = disableMetricsCollection; - AdditionalProperties = additionalProperties; - } - - /// Copy source type. - internal string CopySourceType { get; set; } - /// Source retry count. Type: integer (or Expression with resultType integer). - public DataFactoryElement SourceRetryCount { get; set; } - /// Source retry wait. Type: string (or Expression with resultType string), pattern: ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). - public DataFactoryElement SourceRetryWait { get; set; } - /// The maximum concurrent connection count for the source data store. Type: integer (or Expression with resultType integer). - public DataFactoryElement MaxConcurrentConnections { get; set; } - /// If true, disable data store metrics collection. Default is false. Type: boolean (or Expression with resultType boolean). - public DataFactoryElement DisableMetricsCollection { get; set; } - /// - /// Additional Properties - /// - /// To assign an object to the value of this property use . - /// - /// - /// To assign an already formated json string to this property use . - /// - /// - /// Examples: - /// - /// - /// BinaryData.FromObjectAsJson("foo") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromString("\"foo\"") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromObjectAsJson(new { key = "value" }) - /// Creates a payload of { "key": "value" }. - /// - /// - /// BinaryData.FromString("{\"key\": \"value\"}") - /// Creates a payload of { "key": "value" }. - /// - /// - /// - /// - public IDictionary> AdditionalProperties { get; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/CopyComputeScaleProperties.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/CopyComputeScaleProperties.Serialization.cs deleted file mode 100644 index 945c6cc9..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/CopyComputeScaleProperties.Serialization.cs +++ /dev/null @@ -1,74 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class CopyComputeScaleProperties : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - if (Optional.IsDefined(DataIntegrationUnit)) - { - writer.WritePropertyName("dataIntegrationUnit"u8); - writer.WriteNumberValue(DataIntegrationUnit.Value); - } - if (Optional.IsDefined(TimeToLive)) - { - writer.WritePropertyName("timeToLive"u8); - writer.WriteNumberValue(TimeToLive.Value); - } - foreach (var item in AdditionalProperties) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.Value.ToString()).RootElement); -#endif - } - writer.WriteEndObject(); - } - - internal static CopyComputeScaleProperties DeserializeCopyComputeScaleProperties(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - Optional dataIntegrationUnit = default; - Optional timeToLive = default; - IDictionary> additionalProperties = default; - Dictionary> additionalPropertiesDictionary = new Dictionary>(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("dataIntegrationUnit"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - dataIntegrationUnit = property.Value.GetInt32(); - continue; - } - if (property.NameEquals("timeToLive"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - timeToLive = property.Value.GetInt32(); - continue; - } - additionalPropertiesDictionary.Add(property.Name, JsonSerializer.Deserialize>(property.Value.GetRawText())); - } - additionalProperties = additionalPropertiesDictionary; - return new CopyComputeScaleProperties(Optional.ToNullable(dataIntegrationUnit), Optional.ToNullable(timeToLive), additionalProperties); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/CopyComputeScaleProperties.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/CopyComputeScaleProperties.cs deleted file mode 100644 index bdada71b..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/CopyComputeScaleProperties.cs +++ /dev/null @@ -1,66 +0,0 @@ -// - -#nullable disable - -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// CopyComputeScale properties for managed integration runtime. - public partial class CopyComputeScaleProperties - { - /// Initializes a new instance of CopyComputeScaleProperties. - public CopyComputeScaleProperties() - { - AdditionalProperties = new ChangeTrackingDictionary>(); - } - - /// Initializes a new instance of CopyComputeScaleProperties. - /// DIU number setting reserved for copy activity execution. Supported values are multiples of 4 in range 4-256. - /// Time to live (in minutes) setting of integration runtime which will execute copy activity. - /// Additional Properties. - internal CopyComputeScaleProperties(int? dataIntegrationUnit, int? timeToLive, IDictionary> additionalProperties) - { - DataIntegrationUnit = dataIntegrationUnit; - TimeToLive = timeToLive; - AdditionalProperties = additionalProperties; - } - - /// DIU number setting reserved for copy activity execution. Supported values are multiples of 4 in range 4-256. - public int? DataIntegrationUnit { get; set; } - /// Time to live (in minutes) setting of integration runtime which will execute copy activity. - public int? TimeToLive { get; set; } - /// - /// Additional Properties - /// - /// To assign an object to the value of this property use . - /// - /// - /// To assign an already formated json string to this property use . - /// - /// - /// Examples: - /// - /// - /// BinaryData.FromObjectAsJson("foo") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromString("\"foo\"") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromObjectAsJson(new { key = "value" }) - /// Creates a payload of { "key": "value" }. - /// - /// - /// BinaryData.FromString("{\"key\": \"value\"}") - /// Creates a payload of { "key": "value" }. - /// - /// - /// - /// - public IDictionary> AdditionalProperties { get; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/CopySink.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/CopySink.Serialization.cs deleted file mode 100644 index bfe4253f..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/CopySink.Serialization.cs +++ /dev/null @@ -1,113 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class CopySink : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - writer.WritePropertyName("type"u8); - writer.WriteStringValue(CopySinkType); - if (Optional.IsDefined(WriteBatchSize)) - { - writer.WritePropertyName("writeBatchSize"u8); - JsonSerializer.Serialize(writer, WriteBatchSize); - } - if (Optional.IsDefined(WriteBatchTimeout)) - { - writer.WritePropertyName("writeBatchTimeout"u8); - JsonSerializer.Serialize(writer, WriteBatchTimeout); - } - if (Optional.IsDefined(SinkRetryCount)) - { - writer.WritePropertyName("sinkRetryCount"u8); - JsonSerializer.Serialize(writer, SinkRetryCount); - } - if (Optional.IsDefined(SinkRetryWait)) - { - writer.WritePropertyName("sinkRetryWait"u8); - JsonSerializer.Serialize(writer, SinkRetryWait); - } - if (Optional.IsDefined(MaxConcurrentConnections)) - { - writer.WritePropertyName("maxConcurrentConnections"u8); - JsonSerializer.Serialize(writer, MaxConcurrentConnections); - } - if (Optional.IsDefined(DisableMetricsCollection)) - { - writer.WritePropertyName("disableMetricsCollection"u8); - JsonSerializer.Serialize(writer, DisableMetricsCollection); - } - foreach (var item in AdditionalProperties) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.Value.ToString()).RootElement); -#endif - } - writer.WriteEndObject(); - } - - internal static CopySink DeserializeCopySink(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - if (element.TryGetProperty("type", out JsonElement discriminator)) - { - switch (discriminator.GetString()) - { - case "AvroSink": return AvroSink.DeserializeAvroSink(element); - case "AzureBlobFSSink": return AzureBlobFSSink.DeserializeAzureBlobFSSink(element); - case "AzureDataExplorerSink": return AzureDataExplorerSink.DeserializeAzureDataExplorerSink(element); - case "AzureDataLakeStoreSink": return AzureDataLakeStoreSink.DeserializeAzureDataLakeStoreSink(element); - case "AzureDatabricksDeltaLakeSink": return AzureDatabricksDeltaLakeSink.DeserializeAzureDatabricksDeltaLakeSink(element); - case "AzureMySqlSink": return AzureMySqlSink.DeserializeAzureMySqlSink(element); - case "AzurePostgreSqlSink": return AzurePostgreSqlSink.DeserializeAzurePostgreSqlSink(element); - case "AzureQueueSink": return AzureQueueSink.DeserializeAzureQueueSink(element); - case "AzureSearchIndexSink": return AzureSearchIndexSink.DeserializeAzureSearchIndexSink(element); - case "AzureSqlSink": return AzureSqlSink.DeserializeAzureSqlSink(element); - case "AzureTableSink": return AzureTableSink.DeserializeAzureTableSink(element); - case "BinarySink": return BinarySink.DeserializeBinarySink(element); - case "BlobSink": return DataFactoryBlobSink.DeserializeDataFactoryBlobSink(element); - case "CommonDataServiceForAppsSink": return CommonDataServiceForAppsSink.DeserializeCommonDataServiceForAppsSink(element); - case "CosmosDbMongoDbApiSink": return CosmosDBMongoDBApiSink.DeserializeCosmosDBMongoDBApiSink(element); - case "CosmosDbSqlApiSink": return CosmosDBSqlApiSink.DeserializeCosmosDBSqlApiSink(element); - case "DelimitedTextSink": return DelimitedTextSink.DeserializeDelimitedTextSink(element); - case "DocumentDbCollectionSink": return DocumentDBCollectionSink.DeserializeDocumentDBCollectionSink(element); - case "DynamicsCrmSink": return DynamicsCrmSink.DeserializeDynamicsCrmSink(element); - case "DynamicsSink": return DynamicsSink.DeserializeDynamicsSink(element); - case "FileSystemSink": return FileSystemSink.DeserializeFileSystemSink(element); - case "InformixSink": return InformixSink.DeserializeInformixSink(element); - case "JsonSink": return JsonSink.DeserializeJsonSink(element); - case "MicrosoftAccessSink": return MicrosoftAccessSink.DeserializeMicrosoftAccessSink(element); - case "MongoDbAtlasSink": return MongoDBAtlasSink.DeserializeMongoDBAtlasSink(element); - case "MongoDbV2Sink": return MongoDBV2Sink.DeserializeMongoDBV2Sink(element); - case "OdbcSink": return OdbcSink.DeserializeOdbcSink(element); - case "OracleSink": return OracleSink.DeserializeOracleSink(element); - case "OrcSink": return OrcSink.DeserializeOrcSink(element); - case "ParquetSink": return ParquetSink.DeserializeParquetSink(element); - case "RestSink": return RestSink.DeserializeRestSink(element); - case "SalesforceServiceCloudSink": return SalesforceServiceCloudSink.DeserializeSalesforceServiceCloudSink(element); - case "SalesforceSink": return SalesforceSink.DeserializeSalesforceSink(element); - case "SapCloudForCustomerSink": return SapCloudForCustomerSink.DeserializeSapCloudForCustomerSink(element); - case "SnowflakeSink": return SnowflakeSink.DeserializeSnowflakeSink(element); - case "SqlDWSink": return SqlDWSink.DeserializeSqlDWSink(element); - case "SqlMISink": return SqlMISink.DeserializeSqlMISink(element); - case "SqlServerSink": return SqlServerSink.DeserializeSqlServerSink(element); - case "SqlSink": return SqlSink.DeserializeSqlSink(element); - } - } - return UnknownCopySink.DeserializeUnknownCopySink(element); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/CopySink.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/CopySink.cs deleted file mode 100644 index 86ebe37b..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/CopySink.cs +++ /dev/null @@ -1,90 +0,0 @@ -// - -#nullable disable - -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// - /// A copy activity sink. - /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. - /// The available derived classes include , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , and . - /// - public partial class CopySink - { - /// Initializes a new instance of CopySink. - public CopySink() - { - AdditionalProperties = new ChangeTrackingDictionary>(); - } - - /// Initializes a new instance of CopySink. - /// Copy sink type. - /// Write batch size. Type: integer (or Expression with resultType integer), minimum: 0. - /// Write batch timeout. Type: string (or Expression with resultType string), pattern: ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). - /// Sink retry count. Type: integer (or Expression with resultType integer). - /// Sink retry wait. Type: string (or Expression with resultType string), pattern: ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). - /// The maximum concurrent connection count for the sink data store. Type: integer (or Expression with resultType integer). - /// If true, disable data store metrics collection. Default is false. Type: boolean (or Expression with resultType boolean). - /// Additional Properties. - internal CopySink(string copySinkType, DataFactoryElement writeBatchSize, DataFactoryElement writeBatchTimeout, DataFactoryElement sinkRetryCount, DataFactoryElement sinkRetryWait, DataFactoryElement maxConcurrentConnections, DataFactoryElement disableMetricsCollection, IDictionary> additionalProperties) - { - CopySinkType = copySinkType; - WriteBatchSize = writeBatchSize; - WriteBatchTimeout = writeBatchTimeout; - SinkRetryCount = sinkRetryCount; - SinkRetryWait = sinkRetryWait; - MaxConcurrentConnections = maxConcurrentConnections; - DisableMetricsCollection = disableMetricsCollection; - AdditionalProperties = additionalProperties; - } - - /// Copy sink type. - internal string CopySinkType { get; set; } - /// Write batch size. Type: integer (or Expression with resultType integer), minimum: 0. - public DataFactoryElement WriteBatchSize { get; set; } - /// Write batch timeout. Type: string (or Expression with resultType string), pattern: ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). - public DataFactoryElement WriteBatchTimeout { get; set; } - /// Sink retry count. Type: integer (or Expression with resultType integer). - public DataFactoryElement SinkRetryCount { get; set; } - /// Sink retry wait. Type: string (or Expression with resultType string), pattern: ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). - public DataFactoryElement SinkRetryWait { get; set; } - /// The maximum concurrent connection count for the sink data store. Type: integer (or Expression with resultType integer). - public DataFactoryElement MaxConcurrentConnections { get; set; } - /// If true, disable data store metrics collection. Default is false. Type: boolean (or Expression with resultType boolean). - public DataFactoryElement DisableMetricsCollection { get; set; } - /// - /// Additional Properties - /// - /// To assign an object to the value of this property use . - /// - /// - /// To assign an already formated json string to this property use . - /// - /// - /// Examples: - /// - /// - /// BinaryData.FromObjectAsJson("foo") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromString("\"foo\"") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromObjectAsJson(new { key = "value" }) - /// Creates a payload of { "key": "value" }. - /// - /// - /// BinaryData.FromString("{\"key\": \"value\"}") - /// Creates a payload of { "key": "value" }. - /// - /// - /// - /// - public IDictionary> AdditionalProperties { get; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/CosmosDBConnectionMode.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/CosmosDBConnectionMode.cs deleted file mode 100644 index eafe1828..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/CosmosDBConnectionMode.cs +++ /dev/null @@ -1,47 +0,0 @@ -// - -#nullable disable - -using System.ComponentModel; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// The connection mode used to access CosmosDB account. Type: string. - public readonly partial struct CosmosDBConnectionMode : IEquatable - { - private readonly string _value; - - /// Initializes a new instance of . - /// is null. - public CosmosDBConnectionMode(string value) - { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } - - private const string GatewayValue = "Gateway"; - private const string DirectValue = "Direct"; - - /// Gateway. - public static CosmosDBConnectionMode Gateway { get; } = new CosmosDBConnectionMode(GatewayValue); - /// Direct. - public static CosmosDBConnectionMode Direct { get; } = new CosmosDBConnectionMode(DirectValue); - /// Determines if two values are the same. - public static bool operator ==(CosmosDBConnectionMode left, CosmosDBConnectionMode right) => left.Equals(right); - /// Determines if two values are not the same. - public static bool operator !=(CosmosDBConnectionMode left, CosmosDBConnectionMode right) => !left.Equals(right); - /// Converts a string to a . - public static implicit operator CosmosDBConnectionMode(string value) => new CosmosDBConnectionMode(value); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override bool Equals(object obj) => obj is CosmosDBConnectionMode other && Equals(other); - /// - public bool Equals(CosmosDBConnectionMode other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override int GetHashCode() => _value?.GetHashCode() ?? 0; - /// - public override string ToString() => _value; - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/CosmosDBLinkedService.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/CosmosDBLinkedService.Serialization.cs deleted file mode 100644 index f8aae712..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/CosmosDBLinkedService.Serialization.cs +++ /dev/null @@ -1,336 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class CosmosDBLinkedService : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - writer.WritePropertyName("type"u8); - writer.WriteStringValue(LinkedServiceType); - if (Optional.IsDefined(ConnectVia)) - { - writer.WritePropertyName("connectVia"u8); - writer.WriteObjectValue(ConnectVia); - } - if (Optional.IsDefined(Description)) - { - writer.WritePropertyName("description"u8); - writer.WriteStringValue(Description); - } - if (Optional.IsCollectionDefined(Parameters)) - { - writer.WritePropertyName("parameters"u8); - writer.WriteStartObject(); - foreach (var item in Parameters) - { - writer.WritePropertyName(item.Key); - writer.WriteObjectValue(item.Value); - } - writer.WriteEndObject(); - } - if (Optional.IsCollectionDefined(Annotations)) - { - writer.WritePropertyName("annotations"u8); - writer.WriteStartArray(); - foreach (var item in Annotations) - { - if (item == null) - { - writer.WriteNullValue(); - continue; - } -#if NET6_0_OR_GREATER - writer.WriteRawValue(item); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.ToString()).RootElement); -#endif - } - writer.WriteEndArray(); - } - writer.WritePropertyName("typeProperties"u8); - writer.WriteStartObject(); - if (Optional.IsDefined(ConnectionString)) - { - writer.WritePropertyName("connectionString"u8); - JsonSerializer.Serialize(writer, ConnectionString); - } - if (Optional.IsDefined(AccountEndpoint)) - { - writer.WritePropertyName("accountEndpoint"u8); - JsonSerializer.Serialize(writer, AccountEndpoint); - } - if (Optional.IsDefined(Database)) - { - writer.WritePropertyName("database"u8); - JsonSerializer.Serialize(writer, Database); - } - if (Optional.IsDefined(AccountKey)) - { - writer.WritePropertyName("accountKey"u8); - JsonSerializer.Serialize(writer, AccountKey); - } - if (Optional.IsDefined(ServicePrincipalId)) - { - writer.WritePropertyName("servicePrincipalId"u8); - JsonSerializer.Serialize(writer, ServicePrincipalId); - } - if (Optional.IsDefined(ServicePrincipalCredentialType)) - { - writer.WritePropertyName("servicePrincipalCredentialType"u8); - JsonSerializer.Serialize(writer, ServicePrincipalCredentialType); - } - if (Optional.IsDefined(ServicePrincipalCredential)) - { - writer.WritePropertyName("servicePrincipalCredential"u8); - JsonSerializer.Serialize(writer, ServicePrincipalCredential); - } - if (Optional.IsDefined(Tenant)) - { - writer.WritePropertyName("tenant"u8); - JsonSerializer.Serialize(writer, Tenant); - } - if (Optional.IsDefined(AzureCloudType)) - { - writer.WritePropertyName("azureCloudType"u8); - JsonSerializer.Serialize(writer, AzureCloudType); - } - if (Optional.IsDefined(ConnectionMode)) - { - writer.WritePropertyName("connectionMode"u8); - writer.WriteStringValue(ConnectionMode.Value.ToString()); - } - if (Optional.IsDefined(EncryptedCredential)) - { - writer.WritePropertyName("encryptedCredential"u8); - writer.WriteStringValue(EncryptedCredential); - } - if (Optional.IsDefined(Credential)) - { - writer.WritePropertyName("credential"u8); - writer.WriteObjectValue(Credential); - } - writer.WriteEndObject(); - foreach (var item in AdditionalProperties) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.Value.ToString()).RootElement); -#endif - } - writer.WriteEndObject(); - } - - internal static CosmosDBLinkedService DeserializeCosmosDBLinkedService(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - string type = default; - Optional connectVia = default; - Optional description = default; - Optional> parameters = default; - Optional> annotations = default; - Optional> connectionString = default; - Optional> accountEndpoint = default; - Optional> database = default; - Optional accountKey = default; - Optional> servicePrincipalId = default; - Optional> servicePrincipalCredentialType = default; - Optional servicePrincipalCredential = default; - Optional> tenant = default; - Optional> azureCloudType = default; - Optional connectionMode = default; - Optional encryptedCredential = default; - Optional credential = default; - IDictionary> additionalProperties = default; - Dictionary> additionalPropertiesDictionary = new Dictionary>(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("type"u8)) - { - type = property.Value.GetString(); - continue; - } - if (property.NameEquals("connectVia"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - connectVia = IntegrationRuntimeReference.DeserializeIntegrationRuntimeReference(property.Value); - continue; - } - if (property.NameEquals("description"u8)) - { - description = property.Value.GetString(); - continue; - } - if (property.NameEquals("parameters"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - Dictionary dictionary = new Dictionary(); - foreach (var property0 in property.Value.EnumerateObject()) - { - dictionary.Add(property0.Name, EntityParameterSpecification.DeserializeEntityParameterSpecification(property0.Value)); - } - parameters = dictionary; - continue; - } - if (property.NameEquals("annotations"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - if (item.ValueKind == JsonValueKind.Null) - { - array.Add(null); - } - else - { - array.Add(BinaryData.FromString(item.GetRawText())); - } - } - annotations = array; - continue; - } - if (property.NameEquals("typeProperties"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - foreach (var property0 in property.Value.EnumerateObject()) - { - if (property0.NameEquals("connectionString"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - connectionString = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("accountEndpoint"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - accountEndpoint = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("database"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - database = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("accountKey"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - accountKey = JsonSerializer.Deserialize(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("servicePrincipalId"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - servicePrincipalId = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("servicePrincipalCredentialType"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - servicePrincipalCredentialType = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("servicePrincipalCredential"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - servicePrincipalCredential = JsonSerializer.Deserialize(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("tenant"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - tenant = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("azureCloudType"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - azureCloudType = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("connectionMode"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - connectionMode = new CosmosDBConnectionMode(property0.Value.GetString()); - continue; - } - if (property0.NameEquals("encryptedCredential"u8)) - { - encryptedCredential = property0.Value.GetString(); - continue; - } - if (property0.NameEquals("credential"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - credential = DataFactoryCredentialReference.DeserializeDataFactoryCredentialReference(property0.Value); - continue; - } - } - continue; - } - additionalPropertiesDictionary.Add(property.Name, JsonSerializer.Deserialize>(property.Value.GetRawText())); - } - additionalProperties = additionalPropertiesDictionary; - return new CosmosDBLinkedService(type, connectVia.Value, description.Value, Optional.ToDictionary(parameters), Optional.ToList(annotations), additionalProperties, connectionString.Value, accountEndpoint.Value, database.Value, accountKey, servicePrincipalId.Value, servicePrincipalCredentialType.Value, servicePrincipalCredential, tenant.Value, azureCloudType.Value, Optional.ToNullable(connectionMode), encryptedCredential.Value, credential.Value); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/CosmosDBLinkedService.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/CosmosDBLinkedService.cs deleted file mode 100644 index 9bd53314..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/CosmosDBLinkedService.cs +++ /dev/null @@ -1,79 +0,0 @@ -// - -#nullable disable - -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// Microsoft Azure Cosmos Database (CosmosDB) linked service. - public partial class CosmosDBLinkedService : DataFactoryLinkedServiceProperties - { - /// Initializes a new instance of CosmosDBLinkedService. - public CosmosDBLinkedService() - { - LinkedServiceType = "CosmosDb"; - } - - /// Initializes a new instance of CosmosDBLinkedService. - /// Type of linked service. - /// The integration runtime reference. - /// Linked service description. - /// Parameters for linked service. - /// List of tags that can be used for describing the linked service. - /// Additional Properties. - /// The connection string. Type: string, SecureString or AzureKeyVaultSecretReference. - /// The endpoint of the Azure CosmosDB account. Type: string (or Expression with resultType string). - /// The name of the database. Type: string (or Expression with resultType string). - /// The account key of the Azure CosmosDB account. Type: SecureString or AzureKeyVaultSecretReference. - /// The client ID of the application in Azure Active Directory used for Server-To-Server authentication. Type: string (or Expression with resultType string). - /// The service principal credential type to use in Server-To-Server authentication. 'ServicePrincipalKey' for key/secret, 'ServicePrincipalCert' for certificate. Type: string. - /// The credential of the service principal object in Azure Active Directory. If servicePrincipalCredentialType is 'ServicePrincipalKey', servicePrincipalCredential can be SecureString or AzureKeyVaultSecretReference. If servicePrincipalCredentialType is 'ServicePrincipalCert', servicePrincipalCredential can only be AzureKeyVaultSecretReference. - /// The name or ID of the tenant to which the service principal belongs. Type: string (or Expression with resultType string). - /// Indicates the azure cloud type of the service principle auth. Allowed values are AzurePublic, AzureChina, AzureUsGovernment, AzureGermany. Default value is the data factory regions’ cloud type. Type: string (or Expression with resultType string). - /// The connection mode used to access CosmosDB account. Type: string. - /// The encrypted credential used for authentication. Credentials are encrypted using the integration runtime credential manager. Type: string. - /// The credential reference containing authentication information. - internal CosmosDBLinkedService(string linkedServiceType, IntegrationRuntimeReference connectVia, string description, IDictionary parameters, IList annotations, IDictionary> additionalProperties, DataFactoryElement connectionString, DataFactoryElement accountEndpoint, DataFactoryElement database, DataFactorySecretBaseDefinition accountKey, DataFactoryElement servicePrincipalId, DataFactoryElement servicePrincipalCredentialType, DataFactorySecretBaseDefinition servicePrincipalCredential, DataFactoryElement tenant, DataFactoryElement azureCloudType, CosmosDBConnectionMode? connectionMode, string encryptedCredential, DataFactoryCredentialReference credential) : base(linkedServiceType, connectVia, description, parameters, annotations, additionalProperties) - { - ConnectionString = connectionString; - AccountEndpoint = accountEndpoint; - Database = database; - AccountKey = accountKey; - ServicePrincipalId = servicePrincipalId; - ServicePrincipalCredentialType = servicePrincipalCredentialType; - ServicePrincipalCredential = servicePrincipalCredential; - Tenant = tenant; - AzureCloudType = azureCloudType; - ConnectionMode = connectionMode; - EncryptedCredential = encryptedCredential; - Credential = credential; - LinkedServiceType = linkedServiceType ?? "CosmosDb"; - } - - /// The connection string. Type: string, SecureString or AzureKeyVaultSecretReference. - public DataFactoryElement ConnectionString { get; set; } - /// The endpoint of the Azure CosmosDB account. Type: string (or Expression with resultType string). - public DataFactoryElement AccountEndpoint { get; set; } - /// The name of the database. Type: string (or Expression with resultType string). - public DataFactoryElement Database { get; set; } - /// The account key of the Azure CosmosDB account. Type: SecureString or AzureKeyVaultSecretReference. - public DataFactorySecretBaseDefinition AccountKey { get; set; } - /// The client ID of the application in Azure Active Directory used for Server-To-Server authentication. Type: string (or Expression with resultType string). - public DataFactoryElement ServicePrincipalId { get; set; } - /// The service principal credential type to use in Server-To-Server authentication. 'ServicePrincipalKey' for key/secret, 'ServicePrincipalCert' for certificate. Type: string. - public DataFactoryElement ServicePrincipalCredentialType { get; set; } - /// The credential of the service principal object in Azure Active Directory. If servicePrincipalCredentialType is 'ServicePrincipalKey', servicePrincipalCredential can be SecureString or AzureKeyVaultSecretReference. If servicePrincipalCredentialType is 'ServicePrincipalCert', servicePrincipalCredential can only be AzureKeyVaultSecretReference. - public DataFactorySecretBaseDefinition ServicePrincipalCredential { get; set; } - /// The name or ID of the tenant to which the service principal belongs. Type: string (or Expression with resultType string). - public DataFactoryElement Tenant { get; set; } - /// Indicates the azure cloud type of the service principle auth. Allowed values are AzurePublic, AzureChina, AzureUsGovernment, AzureGermany. Default value is the data factory regions’ cloud type. Type: string (or Expression with resultType string). - public DataFactoryElement AzureCloudType { get; set; } - /// The connection mode used to access CosmosDB account. Type: string. - public CosmosDBConnectionMode? ConnectionMode { get; set; } - /// The encrypted credential used for authentication. Credentials are encrypted using the integration runtime credential manager. Type: string. - public string EncryptedCredential { get; set; } - /// The credential reference containing authentication information. - public DataFactoryCredentialReference Credential { get; set; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/CosmosDBMongoDBApiCollectionDataset.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/CosmosDBMongoDBApiCollectionDataset.Serialization.cs deleted file mode 100644 index 55109180..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/CosmosDBMongoDBApiCollectionDataset.Serialization.cs +++ /dev/null @@ -1,205 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class CosmosDBMongoDBApiCollectionDataset : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - writer.WritePropertyName("type"u8); - writer.WriteStringValue(DatasetType); - if (Optional.IsDefined(Description)) - { - writer.WritePropertyName("description"u8); - writer.WriteStringValue(Description); - } - if (Optional.IsDefined(Structure)) - { - writer.WritePropertyName("structure"u8); - JsonSerializer.Serialize(writer, Structure); - } - if (Optional.IsDefined(Schema)) - { - writer.WritePropertyName("schema"u8); - JsonSerializer.Serialize(writer, Schema); - } - writer.WritePropertyName("linkedServiceName"u8); - JsonSerializer.Serialize(writer, LinkedServiceName); if (Optional.IsCollectionDefined(Parameters)) - { - writer.WritePropertyName("parameters"u8); - writer.WriteStartObject(); - foreach (var item in Parameters) - { - writer.WritePropertyName(item.Key); - writer.WriteObjectValue(item.Value); - } - writer.WriteEndObject(); - } - if (Optional.IsCollectionDefined(Annotations)) - { - writer.WritePropertyName("annotations"u8); - writer.WriteStartArray(); - foreach (var item in Annotations) - { - if (item == null) - { - writer.WriteNullValue(); - continue; - } -#if NET6_0_OR_GREATER - writer.WriteRawValue(item); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.ToString()).RootElement); -#endif - } - writer.WriteEndArray(); - } - if (Optional.IsDefined(Folder)) - { - writer.WritePropertyName("folder"u8); - writer.WriteObjectValue(Folder); - } - writer.WritePropertyName("typeProperties"u8); - writer.WriteStartObject(); - writer.WritePropertyName("collection"u8); - JsonSerializer.Serialize(writer, Collection); - writer.WriteEndObject(); - foreach (var item in AdditionalProperties) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.Value.ToString()).RootElement); -#endif - } - writer.WriteEndObject(); - } - - internal static CosmosDBMongoDBApiCollectionDataset DeserializeCosmosDBMongoDBApiCollectionDataset(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - string type = default; - Optional description = default; - Optional>> structure = default; - Optional>> schema = default; - DataFactoryLinkedServiceReference linkedServiceName = default; - Optional> parameters = default; - Optional> annotations = default; - Optional folder = default; - DataFactoryElement collection = default; - IDictionary> additionalProperties = default; - Dictionary> additionalPropertiesDictionary = new Dictionary>(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("type"u8)) - { - type = property.Value.GetString(); - continue; - } - if (property.NameEquals("description"u8)) - { - description = property.Value.GetString(); - continue; - } - if (property.NameEquals("structure"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - structure = JsonSerializer.Deserialize>>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("schema"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - schema = JsonSerializer.Deserialize>>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("linkedServiceName"u8)) - { - linkedServiceName = JsonSerializer.Deserialize(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("parameters"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - Dictionary dictionary = new Dictionary(); - foreach (var property0 in property.Value.EnumerateObject()) - { - dictionary.Add(property0.Name, EntityParameterSpecification.DeserializeEntityParameterSpecification(property0.Value)); - } - parameters = dictionary; - continue; - } - if (property.NameEquals("annotations"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - if (item.ValueKind == JsonValueKind.Null) - { - array.Add(null); - } - else - { - array.Add(BinaryData.FromString(item.GetRawText())); - } - } - annotations = array; - continue; - } - if (property.NameEquals("folder"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - folder = DatasetFolder.DeserializeDatasetFolder(property.Value); - continue; - } - if (property.NameEquals("typeProperties"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - foreach (var property0 in property.Value.EnumerateObject()) - { - if (property0.NameEquals("collection"u8)) - { - collection = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - } - continue; - } - additionalPropertiesDictionary.Add(property.Name, JsonSerializer.Deserialize>(property.Value.GetRawText())); - } - additionalProperties = additionalPropertiesDictionary; - return new CosmosDBMongoDBApiCollectionDataset(type, description.Value, structure.Value, schema.Value, linkedServiceName, Optional.ToDictionary(parameters), Optional.ToList(annotations), folder.Value, additionalProperties, collection); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/CosmosDBMongoDBApiCollectionDataset.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/CosmosDBMongoDBApiCollectionDataset.cs deleted file mode 100644 index 561f6d40..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/CosmosDBMongoDBApiCollectionDataset.cs +++ /dev/null @@ -1,46 +0,0 @@ -// - -#nullable disable - -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// The CosmosDB (MongoDB API) database dataset. - public partial class CosmosDBMongoDBApiCollectionDataset : DataFactoryDatasetProperties - { - /// Initializes a new instance of CosmosDBMongoDBApiCollectionDataset. - /// Linked service reference. - /// The collection name of the CosmosDB (MongoDB API) database. Type: string (or Expression with resultType string). - /// or is null. - public CosmosDBMongoDBApiCollectionDataset(DataFactoryLinkedServiceReference linkedServiceName, DataFactoryElement collection) : base(linkedServiceName) - { - Argument.AssertNotNull(linkedServiceName, nameof(linkedServiceName)); - Argument.AssertNotNull(collection, nameof(collection)); - - Collection = collection; - DatasetType = "CosmosDbMongoDbApiCollection"; - } - - /// Initializes a new instance of CosmosDBMongoDBApiCollectionDataset. - /// Type of dataset. - /// Dataset description. - /// Columns that define the structure of the dataset. Type: array (or Expression with resultType array), itemType: DatasetDataElement. - /// Columns that define the physical type schema of the dataset. Type: array (or Expression with resultType array), itemType: DatasetSchemaDataElement. - /// Linked service reference. - /// Parameters for dataset. - /// List of tags that can be used for describing the Dataset. - /// The folder that this Dataset is in. If not specified, Dataset will appear at the root level. - /// Additional Properties. - /// The collection name of the CosmosDB (MongoDB API) database. Type: string (or Expression with resultType string). - internal CosmosDBMongoDBApiCollectionDataset(string datasetType, string description, DataFactoryElement> structure, DataFactoryElement> schema, DataFactoryLinkedServiceReference linkedServiceName, IDictionary parameters, IList annotations, DatasetFolder folder, IDictionary> additionalProperties, DataFactoryElement collection) : base(datasetType, description, structure, schema, linkedServiceName, parameters, annotations, folder, additionalProperties) - { - Collection = collection; - DatasetType = datasetType ?? "CosmosDbMongoDbApiCollection"; - } - - /// The collection name of the CosmosDB (MongoDB API) database. Type: string (or Expression with resultType string). - public DataFactoryElement Collection { get; set; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/CosmosDBMongoDBApiLinkedService.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/CosmosDBMongoDBApiLinkedService.Serialization.cs deleted file mode 100644 index cb6471e8..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/CosmosDBMongoDBApiLinkedService.Serialization.cs +++ /dev/null @@ -1,191 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class CosmosDBMongoDBApiLinkedService : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - writer.WritePropertyName("type"u8); - writer.WriteStringValue(LinkedServiceType); - if (Optional.IsDefined(ConnectVia)) - { - writer.WritePropertyName("connectVia"u8); - writer.WriteObjectValue(ConnectVia); - } - if (Optional.IsDefined(Description)) - { - writer.WritePropertyName("description"u8); - writer.WriteStringValue(Description); - } - if (Optional.IsCollectionDefined(Parameters)) - { - writer.WritePropertyName("parameters"u8); - writer.WriteStartObject(); - foreach (var item in Parameters) - { - writer.WritePropertyName(item.Key); - writer.WriteObjectValue(item.Value); - } - writer.WriteEndObject(); - } - if (Optional.IsCollectionDefined(Annotations)) - { - writer.WritePropertyName("annotations"u8); - writer.WriteStartArray(); - foreach (var item in Annotations) - { - if (item == null) - { - writer.WriteNullValue(); - continue; - } -#if NET6_0_OR_GREATER - writer.WriteRawValue(item); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.ToString()).RootElement); -#endif - } - writer.WriteEndArray(); - } - writer.WritePropertyName("typeProperties"u8); - writer.WriteStartObject(); - if (Optional.IsDefined(IsServerVersionAbove32)) - { - writer.WritePropertyName("isServerVersionAbove32"u8); - JsonSerializer.Serialize(writer, IsServerVersionAbove32); - } - writer.WritePropertyName("connectionString"u8); - JsonSerializer.Serialize(writer, ConnectionString); - writer.WritePropertyName("database"u8); - JsonSerializer.Serialize(writer, Database); - writer.WriteEndObject(); - foreach (var item in AdditionalProperties) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.Value.ToString()).RootElement); -#endif - } - writer.WriteEndObject(); - } - - internal static CosmosDBMongoDBApiLinkedService DeserializeCosmosDBMongoDBApiLinkedService(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - string type = default; - Optional connectVia = default; - Optional description = default; - Optional> parameters = default; - Optional> annotations = default; - Optional> isServerVersionAbove32 = default; - DataFactoryElement connectionString = default; - DataFactoryElement database = default; - IDictionary> additionalProperties = default; - Dictionary> additionalPropertiesDictionary = new Dictionary>(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("type"u8)) - { - type = property.Value.GetString(); - continue; - } - if (property.NameEquals("connectVia"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - connectVia = IntegrationRuntimeReference.DeserializeIntegrationRuntimeReference(property.Value); - continue; - } - if (property.NameEquals("description"u8)) - { - description = property.Value.GetString(); - continue; - } - if (property.NameEquals("parameters"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - Dictionary dictionary = new Dictionary(); - foreach (var property0 in property.Value.EnumerateObject()) - { - dictionary.Add(property0.Name, EntityParameterSpecification.DeserializeEntityParameterSpecification(property0.Value)); - } - parameters = dictionary; - continue; - } - if (property.NameEquals("annotations"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - if (item.ValueKind == JsonValueKind.Null) - { - array.Add(null); - } - else - { - array.Add(BinaryData.FromString(item.GetRawText())); - } - } - annotations = array; - continue; - } - if (property.NameEquals("typeProperties"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - foreach (var property0 in property.Value.EnumerateObject()) - { - if (property0.NameEquals("isServerVersionAbove32"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - isServerVersionAbove32 = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("connectionString"u8)) - { - connectionString = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("database"u8)) - { - database = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - } - continue; - } - additionalPropertiesDictionary.Add(property.Name, JsonSerializer.Deserialize>(property.Value.GetRawText())); - } - additionalProperties = additionalPropertiesDictionary; - return new CosmosDBMongoDBApiLinkedService(type, connectVia.Value, description.Value, Optional.ToDictionary(parameters), Optional.ToList(annotations), additionalProperties, isServerVersionAbove32.Value, connectionString, database); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/CosmosDBMongoDBApiLinkedService.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/CosmosDBMongoDBApiLinkedService.cs deleted file mode 100644 index a57924c7..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/CosmosDBMongoDBApiLinkedService.cs +++ /dev/null @@ -1,52 +0,0 @@ -// - -#nullable disable - -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// Linked service for CosmosDB (MongoDB API) data source. - public partial class CosmosDBMongoDBApiLinkedService : DataFactoryLinkedServiceProperties - { - /// Initializes a new instance of CosmosDBMongoDBApiLinkedService. - /// The CosmosDB (MongoDB API) connection string. Type: string, SecureString or AzureKeyVaultSecretReference. Type: string, SecureString or AzureKeyVaultSecretReference. - /// The name of the CosmosDB (MongoDB API) database that you want to access. Type: string (or Expression with resultType string). - /// or is null. - public CosmosDBMongoDBApiLinkedService(DataFactoryElement connectionString, DataFactoryElement database) - { - Argument.AssertNotNull(connectionString, nameof(connectionString)); - Argument.AssertNotNull(database, nameof(database)); - - ConnectionString = connectionString; - Database = database; - LinkedServiceType = "CosmosDbMongoDbApi"; - } - - /// Initializes a new instance of CosmosDBMongoDBApiLinkedService. - /// Type of linked service. - /// The integration runtime reference. - /// Linked service description. - /// Parameters for linked service. - /// List of tags that can be used for describing the linked service. - /// Additional Properties. - /// Whether the CosmosDB (MongoDB API) server version is higher than 3.2. The default value is false. Type: boolean (or Expression with resultType boolean). - /// The CosmosDB (MongoDB API) connection string. Type: string, SecureString or AzureKeyVaultSecretReference. Type: string, SecureString or AzureKeyVaultSecretReference. - /// The name of the CosmosDB (MongoDB API) database that you want to access. Type: string (or Expression with resultType string). - internal CosmosDBMongoDBApiLinkedService(string linkedServiceType, IntegrationRuntimeReference connectVia, string description, IDictionary parameters, IList annotations, IDictionary> additionalProperties, DataFactoryElement isServerVersionAbove32, DataFactoryElement connectionString, DataFactoryElement database) : base(linkedServiceType, connectVia, description, parameters, annotations, additionalProperties) - { - IsServerVersionAbove32 = isServerVersionAbove32; - ConnectionString = connectionString; - Database = database; - LinkedServiceType = linkedServiceType ?? "CosmosDbMongoDbApi"; - } - - /// Whether the CosmosDB (MongoDB API) server version is higher than 3.2. The default value is false. Type: boolean (or Expression with resultType boolean). - public DataFactoryElement IsServerVersionAbove32 { get; set; } - /// The CosmosDB (MongoDB API) connection string. Type: string, SecureString or AzureKeyVaultSecretReference. Type: string, SecureString or AzureKeyVaultSecretReference. - public DataFactoryElement ConnectionString { get; set; } - /// The name of the CosmosDB (MongoDB API) database that you want to access. Type: string (or Expression with resultType string). - public DataFactoryElement Database { get; set; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/CosmosDBMongoDBApiSink.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/CosmosDBMongoDBApiSink.Serialization.cs deleted file mode 100644 index 50d5ff63..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/CosmosDBMongoDBApiSink.Serialization.cs +++ /dev/null @@ -1,157 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class CosmosDBMongoDBApiSink : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - if (Optional.IsDefined(WriteBehavior)) - { - writer.WritePropertyName("writeBehavior"u8); - JsonSerializer.Serialize(writer, WriteBehavior); - } - writer.WritePropertyName("type"u8); - writer.WriteStringValue(CopySinkType); - if (Optional.IsDefined(WriteBatchSize)) - { - writer.WritePropertyName("writeBatchSize"u8); - JsonSerializer.Serialize(writer, WriteBatchSize); - } - if (Optional.IsDefined(WriteBatchTimeout)) - { - writer.WritePropertyName("writeBatchTimeout"u8); - JsonSerializer.Serialize(writer, WriteBatchTimeout); - } - if (Optional.IsDefined(SinkRetryCount)) - { - writer.WritePropertyName("sinkRetryCount"u8); - JsonSerializer.Serialize(writer, SinkRetryCount); - } - if (Optional.IsDefined(SinkRetryWait)) - { - writer.WritePropertyName("sinkRetryWait"u8); - JsonSerializer.Serialize(writer, SinkRetryWait); - } - if (Optional.IsDefined(MaxConcurrentConnections)) - { - writer.WritePropertyName("maxConcurrentConnections"u8); - JsonSerializer.Serialize(writer, MaxConcurrentConnections); - } - if (Optional.IsDefined(DisableMetricsCollection)) - { - writer.WritePropertyName("disableMetricsCollection"u8); - JsonSerializer.Serialize(writer, DisableMetricsCollection); - } - foreach (var item in AdditionalProperties) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.Value.ToString()).RootElement); -#endif - } - writer.WriteEndObject(); - } - - internal static CosmosDBMongoDBApiSink DeserializeCosmosDBMongoDBApiSink(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - Optional> writeBehavior = default; - string type = default; - Optional> writeBatchSize = default; - Optional> writeBatchTimeout = default; - Optional> sinkRetryCount = default; - Optional> sinkRetryWait = default; - Optional> maxConcurrentConnections = default; - Optional> disableMetricsCollection = default; - IDictionary> additionalProperties = default; - Dictionary> additionalPropertiesDictionary = new Dictionary>(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("writeBehavior"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - writeBehavior = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("type"u8)) - { - type = property.Value.GetString(); - continue; - } - if (property.NameEquals("writeBatchSize"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - writeBatchSize = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("writeBatchTimeout"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - writeBatchTimeout = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("sinkRetryCount"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - sinkRetryCount = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("sinkRetryWait"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - sinkRetryWait = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("maxConcurrentConnections"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - maxConcurrentConnections = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("disableMetricsCollection"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - disableMetricsCollection = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - additionalPropertiesDictionary.Add(property.Name, JsonSerializer.Deserialize>(property.Value.GetRawText())); - } - additionalProperties = additionalPropertiesDictionary; - return new CosmosDBMongoDBApiSink(type, writeBatchSize.Value, writeBatchTimeout.Value, sinkRetryCount.Value, sinkRetryWait.Value, maxConcurrentConnections.Value, disableMetricsCollection.Value, additionalProperties, writeBehavior.Value); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/CosmosDBMongoDBApiSink.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/CosmosDBMongoDBApiSink.cs deleted file mode 100644 index fbad1262..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/CosmosDBMongoDBApiSink.cs +++ /dev/null @@ -1,37 +0,0 @@ -// - -#nullable disable - -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// A copy activity sink for a CosmosDB (MongoDB API) database. - public partial class CosmosDBMongoDBApiSink : CopySink - { - /// Initializes a new instance of CosmosDBMongoDBApiSink. - public CosmosDBMongoDBApiSink() - { - CopySinkType = "CosmosDbMongoDbApiSink"; - } - - /// Initializes a new instance of CosmosDBMongoDBApiSink. - /// Copy sink type. - /// Write batch size. Type: integer (or Expression with resultType integer), minimum: 0. - /// Write batch timeout. Type: string (or Expression with resultType string), pattern: ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). - /// Sink retry count. Type: integer (or Expression with resultType integer). - /// Sink retry wait. Type: string (or Expression with resultType string), pattern: ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). - /// The maximum concurrent connection count for the sink data store. Type: integer (or Expression with resultType integer). - /// If true, disable data store metrics collection. Default is false. Type: boolean (or Expression with resultType boolean). - /// Additional Properties. - /// Specifies whether the document with same key to be overwritten (upsert) rather than throw exception (insert). The default value is "insert". Type: string (or Expression with resultType string). Type: string (or Expression with resultType string). - internal CosmosDBMongoDBApiSink(string copySinkType, DataFactoryElement writeBatchSize, DataFactoryElement writeBatchTimeout, DataFactoryElement sinkRetryCount, DataFactoryElement sinkRetryWait, DataFactoryElement maxConcurrentConnections, DataFactoryElement disableMetricsCollection, IDictionary> additionalProperties, DataFactoryElement writeBehavior) : base(copySinkType, writeBatchSize, writeBatchTimeout, sinkRetryCount, sinkRetryWait, maxConcurrentConnections, disableMetricsCollection, additionalProperties) - { - WriteBehavior = writeBehavior; - CopySinkType = copySinkType ?? "CosmosDbMongoDbApiSink"; - } - - /// Specifies whether the document with same key to be overwritten (upsert) rather than throw exception (insert). The default value is "insert". Type: string (or Expression with resultType string). Type: string (or Expression with resultType string). - public DataFactoryElement WriteBehavior { get; set; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/CosmosDBMongoDBApiSource.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/CosmosDBMongoDBApiSource.Serialization.cs deleted file mode 100644 index bb44784a..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/CosmosDBMongoDBApiSource.Serialization.cs +++ /dev/null @@ -1,191 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class CosmosDBMongoDBApiSource : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - if (Optional.IsDefined(Filter)) - { - writer.WritePropertyName("filter"u8); - JsonSerializer.Serialize(writer, Filter); - } - if (Optional.IsDefined(CursorMethods)) - { - writer.WritePropertyName("cursorMethods"u8); - writer.WriteObjectValue(CursorMethods); - } - if (Optional.IsDefined(BatchSize)) - { - writer.WritePropertyName("batchSize"u8); - JsonSerializer.Serialize(writer, BatchSize); - } - if (Optional.IsDefined(QueryTimeout)) - { - writer.WritePropertyName("queryTimeout"u8); - JsonSerializer.Serialize(writer, QueryTimeout); - } - if (Optional.IsDefined(AdditionalColumns)) - { - writer.WritePropertyName("additionalColumns"u8); -#if NET6_0_OR_GREATER - writer.WriteRawValue(AdditionalColumns); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(AdditionalColumns.ToString()).RootElement); -#endif - } - writer.WritePropertyName("type"u8); - writer.WriteStringValue(CopySourceType); - if (Optional.IsDefined(SourceRetryCount)) - { - writer.WritePropertyName("sourceRetryCount"u8); - JsonSerializer.Serialize(writer, SourceRetryCount); - } - if (Optional.IsDefined(SourceRetryWait)) - { - writer.WritePropertyName("sourceRetryWait"u8); - JsonSerializer.Serialize(writer, SourceRetryWait); - } - if (Optional.IsDefined(MaxConcurrentConnections)) - { - writer.WritePropertyName("maxConcurrentConnections"u8); - JsonSerializer.Serialize(writer, MaxConcurrentConnections); - } - if (Optional.IsDefined(DisableMetricsCollection)) - { - writer.WritePropertyName("disableMetricsCollection"u8); - JsonSerializer.Serialize(writer, DisableMetricsCollection); - } - foreach (var item in AdditionalProperties) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.Value.ToString()).RootElement); -#endif - } - writer.WriteEndObject(); - } - - internal static CosmosDBMongoDBApiSource DeserializeCosmosDBMongoDBApiSource(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - Optional> filter = default; - Optional cursorMethods = default; - Optional> batchSize = default; - Optional> queryTimeout = default; - Optional additionalColumns = default; - string type = default; - Optional> sourceRetryCount = default; - Optional> sourceRetryWait = default; - Optional> maxConcurrentConnections = default; - Optional> disableMetricsCollection = default; - IDictionary> additionalProperties = default; - Dictionary> additionalPropertiesDictionary = new Dictionary>(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("filter"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - filter = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("cursorMethods"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - cursorMethods = MongoDBCursorMethodsProperties.DeserializeMongoDBCursorMethodsProperties(property.Value); - continue; - } - if (property.NameEquals("batchSize"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - batchSize = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("queryTimeout"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - queryTimeout = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("additionalColumns"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - additionalColumns = BinaryData.FromString(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("type"u8)) - { - type = property.Value.GetString(); - continue; - } - if (property.NameEquals("sourceRetryCount"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - sourceRetryCount = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("sourceRetryWait"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - sourceRetryWait = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("maxConcurrentConnections"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - maxConcurrentConnections = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("disableMetricsCollection"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - disableMetricsCollection = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - additionalPropertiesDictionary.Add(property.Name, JsonSerializer.Deserialize>(property.Value.GetRawText())); - } - additionalProperties = additionalPropertiesDictionary; - return new CosmosDBMongoDBApiSource(type, sourceRetryCount.Value, sourceRetryWait.Value, maxConcurrentConnections.Value, disableMetricsCollection.Value, additionalProperties, filter.Value, cursorMethods.Value, batchSize.Value, queryTimeout.Value, additionalColumns.Value); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/CosmosDBMongoDBApiSource.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/CosmosDBMongoDBApiSource.cs deleted file mode 100644 index aab5eb70..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/CosmosDBMongoDBApiSource.cs +++ /dev/null @@ -1,80 +0,0 @@ -// - -#nullable disable - -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// A copy activity source for a CosmosDB (MongoDB API) database. - public partial class CosmosDBMongoDBApiSource : CopyActivitySource - { - /// Initializes a new instance of CosmosDBMongoDBApiSource. - public CosmosDBMongoDBApiSource() - { - CopySourceType = "CosmosDbMongoDbApiSource"; - } - - /// Initializes a new instance of CosmosDBMongoDBApiSource. - /// Copy source type. - /// Source retry count. Type: integer (or Expression with resultType integer). - /// Source retry wait. Type: string (or Expression with resultType string), pattern: ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). - /// The maximum concurrent connection count for the source data store. Type: integer (or Expression with resultType integer). - /// If true, disable data store metrics collection. Default is false. Type: boolean (or Expression with resultType boolean). - /// Additional Properties. - /// Specifies selection filter using query operators. To return all documents in a collection, omit this parameter or pass an empty document ({}). Type: string (or Expression with resultType string). - /// Cursor methods for Mongodb query. - /// Specifies the number of documents to return in each batch of the response from MongoDB instance. In most cases, modifying the batch size will not affect the user or the application. This property's main purpose is to avoid hit the limitation of response size. Type: integer (or Expression with resultType integer). - /// 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). - internal CosmosDBMongoDBApiSource(string copySourceType, DataFactoryElement sourceRetryCount, DataFactoryElement sourceRetryWait, DataFactoryElement maxConcurrentConnections, DataFactoryElement disableMetricsCollection, IDictionary> additionalProperties, DataFactoryElement filter, MongoDBCursorMethodsProperties cursorMethods, DataFactoryElement batchSize, DataFactoryElement queryTimeout, BinaryData additionalColumns) : base(copySourceType, sourceRetryCount, sourceRetryWait, maxConcurrentConnections, disableMetricsCollection, additionalProperties) - { - Filter = filter; - CursorMethods = cursorMethods; - BatchSize = batchSize; - QueryTimeout = queryTimeout; - AdditionalColumns = additionalColumns; - CopySourceType = copySourceType ?? "CosmosDbMongoDbApiSource"; - } - - /// Specifies selection filter using query operators. To return all documents in a collection, omit this parameter or pass an empty document ({}). Type: string (or Expression with resultType string). - public DataFactoryElement Filter { get; set; } - /// Cursor methods for Mongodb query. - public MongoDBCursorMethodsProperties CursorMethods { get; set; } - /// Specifies the number of documents to return in each batch of the response from MongoDB instance. In most cases, modifying the batch size will not affect the user or the application. This property's main purpose is to avoid hit the limitation of response size. Type: integer (or Expression with resultType integer). - public DataFactoryElement BatchSize { get; set; } - /// Query timeout. Type: string (or Expression with resultType string), pattern: ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). - public DataFactoryElement QueryTimeout { get; set; } - /// - /// Specifies the additional columns to be added to source data. Type: array of objects(AdditionalColumns) (or Expression with resultType array of objects). - /// - /// To assign an object to this property use . - /// - /// - /// To assign an already formated json string to this property use . - /// - /// - /// Examples: - /// - /// - /// BinaryData.FromObjectAsJson("foo") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromString("\"foo\"") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromObjectAsJson(new { key = "value" }) - /// Creates a payload of { "key": "value" }. - /// - /// - /// BinaryData.FromString("{\"key\": \"value\"}") - /// Creates a payload of { "key": "value" }. - /// - /// - /// - /// - public BinaryData AdditionalColumns { get; set; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/CosmosDBSqlApiCollectionDataset.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/CosmosDBSqlApiCollectionDataset.Serialization.cs deleted file mode 100644 index e630d150..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/CosmosDBSqlApiCollectionDataset.Serialization.cs +++ /dev/null @@ -1,205 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class CosmosDBSqlApiCollectionDataset : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - writer.WritePropertyName("type"u8); - writer.WriteStringValue(DatasetType); - if (Optional.IsDefined(Description)) - { - writer.WritePropertyName("description"u8); - writer.WriteStringValue(Description); - } - if (Optional.IsDefined(Structure)) - { - writer.WritePropertyName("structure"u8); - JsonSerializer.Serialize(writer, Structure); - } - if (Optional.IsDefined(Schema)) - { - writer.WritePropertyName("schema"u8); - JsonSerializer.Serialize(writer, Schema); - } - writer.WritePropertyName("linkedServiceName"u8); - JsonSerializer.Serialize(writer, LinkedServiceName); if (Optional.IsCollectionDefined(Parameters)) - { - writer.WritePropertyName("parameters"u8); - writer.WriteStartObject(); - foreach (var item in Parameters) - { - writer.WritePropertyName(item.Key); - writer.WriteObjectValue(item.Value); - } - writer.WriteEndObject(); - } - if (Optional.IsCollectionDefined(Annotations)) - { - writer.WritePropertyName("annotations"u8); - writer.WriteStartArray(); - foreach (var item in Annotations) - { - if (item == null) - { - writer.WriteNullValue(); - continue; - } -#if NET6_0_OR_GREATER - writer.WriteRawValue(item); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.ToString()).RootElement); -#endif - } - writer.WriteEndArray(); - } - if (Optional.IsDefined(Folder)) - { - writer.WritePropertyName("folder"u8); - writer.WriteObjectValue(Folder); - } - writer.WritePropertyName("typeProperties"u8); - writer.WriteStartObject(); - writer.WritePropertyName("collectionName"u8); - JsonSerializer.Serialize(writer, CollectionName); - writer.WriteEndObject(); - foreach (var item in AdditionalProperties) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.Value.ToString()).RootElement); -#endif - } - writer.WriteEndObject(); - } - - internal static CosmosDBSqlApiCollectionDataset DeserializeCosmosDBSqlApiCollectionDataset(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - string type = default; - Optional description = default; - Optional>> structure = default; - Optional>> schema = default; - DataFactoryLinkedServiceReference linkedServiceName = default; - Optional> parameters = default; - Optional> annotations = default; - Optional folder = default; - DataFactoryElement collectionName = default; - IDictionary> additionalProperties = default; - Dictionary> additionalPropertiesDictionary = new Dictionary>(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("type"u8)) - { - type = property.Value.GetString(); - continue; - } - if (property.NameEquals("description"u8)) - { - description = property.Value.GetString(); - continue; - } - if (property.NameEquals("structure"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - structure = JsonSerializer.Deserialize>>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("schema"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - schema = JsonSerializer.Deserialize>>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("linkedServiceName"u8)) - { - linkedServiceName = JsonSerializer.Deserialize(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("parameters"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - Dictionary dictionary = new Dictionary(); - foreach (var property0 in property.Value.EnumerateObject()) - { - dictionary.Add(property0.Name, EntityParameterSpecification.DeserializeEntityParameterSpecification(property0.Value)); - } - parameters = dictionary; - continue; - } - if (property.NameEquals("annotations"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - if (item.ValueKind == JsonValueKind.Null) - { - array.Add(null); - } - else - { - array.Add(BinaryData.FromString(item.GetRawText())); - } - } - annotations = array; - continue; - } - if (property.NameEquals("folder"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - folder = DatasetFolder.DeserializeDatasetFolder(property.Value); - continue; - } - if (property.NameEquals("typeProperties"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - foreach (var property0 in property.Value.EnumerateObject()) - { - if (property0.NameEquals("collectionName"u8)) - { - collectionName = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - } - continue; - } - additionalPropertiesDictionary.Add(property.Name, JsonSerializer.Deserialize>(property.Value.GetRawText())); - } - additionalProperties = additionalPropertiesDictionary; - return new CosmosDBSqlApiCollectionDataset(type, description.Value, structure.Value, schema.Value, linkedServiceName, Optional.ToDictionary(parameters), Optional.ToList(annotations), folder.Value, additionalProperties, collectionName); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/CosmosDBSqlApiCollectionDataset.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/CosmosDBSqlApiCollectionDataset.cs deleted file mode 100644 index 2ab2f502..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/CosmosDBSqlApiCollectionDataset.cs +++ /dev/null @@ -1,46 +0,0 @@ -// - -#nullable disable - -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// Microsoft Azure CosmosDB (SQL API) Collection dataset. - public partial class CosmosDBSqlApiCollectionDataset : DataFactoryDatasetProperties - { - /// Initializes a new instance of CosmosDBSqlApiCollectionDataset. - /// Linked service reference. - /// CosmosDB (SQL API) collection name. Type: string (or Expression with resultType string). - /// or is null. - public CosmosDBSqlApiCollectionDataset(DataFactoryLinkedServiceReference linkedServiceName, DataFactoryElement collectionName) : base(linkedServiceName) - { - Argument.AssertNotNull(linkedServiceName, nameof(linkedServiceName)); - Argument.AssertNotNull(collectionName, nameof(collectionName)); - - CollectionName = collectionName; - DatasetType = "CosmosDbSqlApiCollection"; - } - - /// Initializes a new instance of CosmosDBSqlApiCollectionDataset. - /// Type of dataset. - /// Dataset description. - /// Columns that define the structure of the dataset. Type: array (or Expression with resultType array), itemType: DatasetDataElement. - /// Columns that define the physical type schema of the dataset. Type: array (or Expression with resultType array), itemType: DatasetSchemaDataElement. - /// Linked service reference. - /// Parameters for dataset. - /// List of tags that can be used for describing the Dataset. - /// The folder that this Dataset is in. If not specified, Dataset will appear at the root level. - /// Additional Properties. - /// CosmosDB (SQL API) collection name. Type: string (or Expression with resultType string). - internal CosmosDBSqlApiCollectionDataset(string datasetType, string description, DataFactoryElement> structure, DataFactoryElement> schema, DataFactoryLinkedServiceReference linkedServiceName, IDictionary parameters, IList annotations, DatasetFolder folder, IDictionary> additionalProperties, DataFactoryElement collectionName) : base(datasetType, description, structure, schema, linkedServiceName, parameters, annotations, folder, additionalProperties) - { - CollectionName = collectionName; - DatasetType = datasetType ?? "CosmosDbSqlApiCollection"; - } - - /// CosmosDB (SQL API) collection name. Type: string (or Expression with resultType string). - public DataFactoryElement CollectionName { get; set; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/CosmosDBSqlApiSink.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/CosmosDBSqlApiSink.Serialization.cs deleted file mode 100644 index aeaa4a1e..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/CosmosDBSqlApiSink.Serialization.cs +++ /dev/null @@ -1,157 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class CosmosDBSqlApiSink : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - if (Optional.IsDefined(WriteBehavior)) - { - writer.WritePropertyName("writeBehavior"u8); - JsonSerializer.Serialize(writer, WriteBehavior); - } - writer.WritePropertyName("type"u8); - writer.WriteStringValue(CopySinkType); - if (Optional.IsDefined(WriteBatchSize)) - { - writer.WritePropertyName("writeBatchSize"u8); - JsonSerializer.Serialize(writer, WriteBatchSize); - } - if (Optional.IsDefined(WriteBatchTimeout)) - { - writer.WritePropertyName("writeBatchTimeout"u8); - JsonSerializer.Serialize(writer, WriteBatchTimeout); - } - if (Optional.IsDefined(SinkRetryCount)) - { - writer.WritePropertyName("sinkRetryCount"u8); - JsonSerializer.Serialize(writer, SinkRetryCount); - } - if (Optional.IsDefined(SinkRetryWait)) - { - writer.WritePropertyName("sinkRetryWait"u8); - JsonSerializer.Serialize(writer, SinkRetryWait); - } - if (Optional.IsDefined(MaxConcurrentConnections)) - { - writer.WritePropertyName("maxConcurrentConnections"u8); - JsonSerializer.Serialize(writer, MaxConcurrentConnections); - } - if (Optional.IsDefined(DisableMetricsCollection)) - { - writer.WritePropertyName("disableMetricsCollection"u8); - JsonSerializer.Serialize(writer, DisableMetricsCollection); - } - foreach (var item in AdditionalProperties) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.Value.ToString()).RootElement); -#endif - } - writer.WriteEndObject(); - } - - internal static CosmosDBSqlApiSink DeserializeCosmosDBSqlApiSink(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - Optional> writeBehavior = default; - string type = default; - Optional> writeBatchSize = default; - Optional> writeBatchTimeout = default; - Optional> sinkRetryCount = default; - Optional> sinkRetryWait = default; - Optional> maxConcurrentConnections = default; - Optional> disableMetricsCollection = default; - IDictionary> additionalProperties = default; - Dictionary> additionalPropertiesDictionary = new Dictionary>(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("writeBehavior"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - writeBehavior = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("type"u8)) - { - type = property.Value.GetString(); - continue; - } - if (property.NameEquals("writeBatchSize"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - writeBatchSize = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("writeBatchTimeout"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - writeBatchTimeout = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("sinkRetryCount"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - sinkRetryCount = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("sinkRetryWait"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - sinkRetryWait = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("maxConcurrentConnections"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - maxConcurrentConnections = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("disableMetricsCollection"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - disableMetricsCollection = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - additionalPropertiesDictionary.Add(property.Name, JsonSerializer.Deserialize>(property.Value.GetRawText())); - } - additionalProperties = additionalPropertiesDictionary; - return new CosmosDBSqlApiSink(type, writeBatchSize.Value, writeBatchTimeout.Value, sinkRetryCount.Value, sinkRetryWait.Value, maxConcurrentConnections.Value, disableMetricsCollection.Value, additionalProperties, writeBehavior.Value); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/CosmosDBSqlApiSink.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/CosmosDBSqlApiSink.cs deleted file mode 100644 index e837f3f4..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/CosmosDBSqlApiSink.cs +++ /dev/null @@ -1,37 +0,0 @@ -// - -#nullable disable - -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// A copy activity Azure CosmosDB (SQL API) Collection sink. - public partial class CosmosDBSqlApiSink : CopySink - { - /// Initializes a new instance of CosmosDBSqlApiSink. - public CosmosDBSqlApiSink() - { - CopySinkType = "CosmosDbSqlApiSink"; - } - - /// Initializes a new instance of CosmosDBSqlApiSink. - /// Copy sink type. - /// Write batch size. Type: integer (or Expression with resultType integer), minimum: 0. - /// Write batch timeout. Type: string (or Expression with resultType string), pattern: ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). - /// Sink retry count. Type: integer (or Expression with resultType integer). - /// Sink retry wait. Type: string (or Expression with resultType string), pattern: ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). - /// The maximum concurrent connection count for the sink data store. Type: integer (or Expression with resultType integer). - /// If true, disable data store metrics collection. Default is false. Type: boolean (or Expression with resultType boolean). - /// Additional Properties. - /// Describes how to write data to Azure Cosmos DB. Type: string (or Expression with resultType string). Allowed values: insert and upsert. - internal CosmosDBSqlApiSink(string copySinkType, DataFactoryElement writeBatchSize, DataFactoryElement writeBatchTimeout, DataFactoryElement sinkRetryCount, DataFactoryElement sinkRetryWait, DataFactoryElement maxConcurrentConnections, DataFactoryElement disableMetricsCollection, IDictionary> additionalProperties, DataFactoryElement writeBehavior) : base(copySinkType, writeBatchSize, writeBatchTimeout, sinkRetryCount, sinkRetryWait, maxConcurrentConnections, disableMetricsCollection, additionalProperties) - { - WriteBehavior = writeBehavior; - CopySinkType = copySinkType ?? "CosmosDbSqlApiSink"; - } - - /// Describes how to write data to Azure Cosmos DB. Type: string (or Expression with resultType string). Allowed values: insert and upsert. - public DataFactoryElement WriteBehavior { get; set; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/CosmosDBSqlApiSource.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/CosmosDBSqlApiSource.Serialization.cs deleted file mode 100644 index 814c8f9e..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/CosmosDBSqlApiSource.Serialization.cs +++ /dev/null @@ -1,191 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class CosmosDBSqlApiSource : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - if (Optional.IsDefined(Query)) - { - writer.WritePropertyName("query"u8); - JsonSerializer.Serialize(writer, Query); - } - if (Optional.IsDefined(PageSize)) - { - writer.WritePropertyName("pageSize"u8); - JsonSerializer.Serialize(writer, PageSize); - } - if (Optional.IsDefined(PreferredRegions)) - { - writer.WritePropertyName("preferredRegions"u8); - JsonSerializer.Serialize(writer, PreferredRegions); - } - if (Optional.IsDefined(DetectDatetime)) - { - writer.WritePropertyName("detectDatetime"u8); - JsonSerializer.Serialize(writer, DetectDatetime); - } - if (Optional.IsDefined(AdditionalColumns)) - { - writer.WritePropertyName("additionalColumns"u8); -#if NET6_0_OR_GREATER - writer.WriteRawValue(AdditionalColumns); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(AdditionalColumns.ToString()).RootElement); -#endif - } - writer.WritePropertyName("type"u8); - writer.WriteStringValue(CopySourceType); - if (Optional.IsDefined(SourceRetryCount)) - { - writer.WritePropertyName("sourceRetryCount"u8); - JsonSerializer.Serialize(writer, SourceRetryCount); - } - if (Optional.IsDefined(SourceRetryWait)) - { - writer.WritePropertyName("sourceRetryWait"u8); - JsonSerializer.Serialize(writer, SourceRetryWait); - } - if (Optional.IsDefined(MaxConcurrentConnections)) - { - writer.WritePropertyName("maxConcurrentConnections"u8); - JsonSerializer.Serialize(writer, MaxConcurrentConnections); - } - if (Optional.IsDefined(DisableMetricsCollection)) - { - writer.WritePropertyName("disableMetricsCollection"u8); - JsonSerializer.Serialize(writer, DisableMetricsCollection); - } - foreach (var item in AdditionalProperties) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.Value.ToString()).RootElement); -#endif - } - writer.WriteEndObject(); - } - - internal static CosmosDBSqlApiSource DeserializeCosmosDBSqlApiSource(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - Optional> query = default; - Optional> pageSize = default; - Optional>> preferredRegions = default; - Optional> detectDatetime = default; - Optional additionalColumns = default; - string type = default; - Optional> sourceRetryCount = default; - Optional> sourceRetryWait = default; - Optional> maxConcurrentConnections = default; - Optional> disableMetricsCollection = default; - IDictionary> additionalProperties = default; - Dictionary> additionalPropertiesDictionary = new Dictionary>(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("query"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - query = 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("preferredRegions"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - preferredRegions = JsonSerializer.Deserialize>>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("detectDatetime"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - detectDatetime = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("additionalColumns"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - additionalColumns = BinaryData.FromString(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("type"u8)) - { - type = property.Value.GetString(); - continue; - } - if (property.NameEquals("sourceRetryCount"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - sourceRetryCount = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("sourceRetryWait"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - sourceRetryWait = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("maxConcurrentConnections"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - maxConcurrentConnections = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("disableMetricsCollection"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - disableMetricsCollection = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - additionalPropertiesDictionary.Add(property.Name, JsonSerializer.Deserialize>(property.Value.GetRawText())); - } - additionalProperties = additionalPropertiesDictionary; - return new CosmosDBSqlApiSource(type, sourceRetryCount.Value, sourceRetryWait.Value, maxConcurrentConnections.Value, disableMetricsCollection.Value, additionalProperties, query.Value, pageSize.Value, preferredRegions.Value, detectDatetime.Value, additionalColumns.Value); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/CosmosDBSqlApiSource.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/CosmosDBSqlApiSource.cs deleted file mode 100644 index 01811ff6..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/CosmosDBSqlApiSource.cs +++ /dev/null @@ -1,80 +0,0 @@ -// - -#nullable disable - -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// A copy activity Azure CosmosDB (SQL API) Collection source. - public partial class CosmosDBSqlApiSource : CopyActivitySource - { - /// Initializes a new instance of CosmosDBSqlApiSource. - public CosmosDBSqlApiSource() - { - CopySourceType = "CosmosDbSqlApiSource"; - } - - /// Initializes a new instance of CosmosDBSqlApiSource. - /// Copy source type. - /// Source retry count. Type: integer (or Expression with resultType integer). - /// Source retry wait. Type: string (or Expression with resultType string), pattern: ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). - /// The maximum concurrent connection count for the source data store. Type: integer (or Expression with resultType integer). - /// If true, disable data store metrics collection. Default is false. Type: boolean (or Expression with resultType boolean). - /// Additional Properties. - /// SQL API query. Type: string (or Expression with resultType string). - /// Page size of the result. Type: integer (or Expression with resultType integer). - /// Preferred regions. Type: array of strings (or Expression with resultType array of strings). - /// Whether detect primitive values as datetime values. Type: boolean (or Expression with resultType boolean). - /// Specifies the additional columns to be added to source data. Type: array of objects(AdditionalColumns) (or Expression with resultType array of objects). - internal CosmosDBSqlApiSource(string copySourceType, DataFactoryElement sourceRetryCount, DataFactoryElement sourceRetryWait, DataFactoryElement maxConcurrentConnections, DataFactoryElement disableMetricsCollection, IDictionary> additionalProperties, DataFactoryElement query, DataFactoryElement pageSize, DataFactoryElement> preferredRegions, DataFactoryElement detectDatetime, BinaryData additionalColumns) : base(copySourceType, sourceRetryCount, sourceRetryWait, maxConcurrentConnections, disableMetricsCollection, additionalProperties) - { - Query = query; - PageSize = pageSize; - PreferredRegions = preferredRegions; - DetectDatetime = detectDatetime; - AdditionalColumns = additionalColumns; - CopySourceType = copySourceType ?? "CosmosDbSqlApiSource"; - } - - /// SQL API query. Type: string (or Expression with resultType string). - public DataFactoryElement Query { get; set; } - /// Page size of the result. Type: integer (or Expression with resultType integer). - public DataFactoryElement PageSize { get; set; } - /// Preferred regions. Type: array of strings (or Expression with resultType array of strings). - public DataFactoryElement> PreferredRegions { get; set; } - /// Whether detect primitive values as datetime values. Type: boolean (or Expression with resultType boolean). - public DataFactoryElement DetectDatetime { get; set; } - /// - /// Specifies the additional columns to be added to source data. Type: array of objects(AdditionalColumns) (or Expression with resultType array of objects). - /// - /// To assign an object to this property use . - /// - /// - /// To assign an already formated json string to this property use . - /// - /// - /// Examples: - /// - /// - /// BinaryData.FromObjectAsJson("foo") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromString("\"foo\"") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromObjectAsJson(new { key = "value" }) - /// Creates a payload of { "key": "value" }. - /// - /// - /// BinaryData.FromString("{\"key\": \"value\"}") - /// Creates a payload of { "key": "value" }. - /// - /// - /// - /// - public BinaryData AdditionalColumns { get; set; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/CouchbaseLinkedService.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/CouchbaseLinkedService.Serialization.cs deleted file mode 100644 index 75dc5270..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/CouchbaseLinkedService.Serialization.cs +++ /dev/null @@ -1,201 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class CouchbaseLinkedService : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - writer.WritePropertyName("type"u8); - writer.WriteStringValue(LinkedServiceType); - if (Optional.IsDefined(ConnectVia)) - { - writer.WritePropertyName("connectVia"u8); - writer.WriteObjectValue(ConnectVia); - } - if (Optional.IsDefined(Description)) - { - writer.WritePropertyName("description"u8); - writer.WriteStringValue(Description); - } - if (Optional.IsCollectionDefined(Parameters)) - { - writer.WritePropertyName("parameters"u8); - writer.WriteStartObject(); - foreach (var item in Parameters) - { - writer.WritePropertyName(item.Key); - writer.WriteObjectValue(item.Value); - } - writer.WriteEndObject(); - } - if (Optional.IsCollectionDefined(Annotations)) - { - writer.WritePropertyName("annotations"u8); - writer.WriteStartArray(); - foreach (var item in Annotations) - { - if (item == null) - { - writer.WriteNullValue(); - continue; - } -#if NET6_0_OR_GREATER - writer.WriteRawValue(item); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.ToString()).RootElement); -#endif - } - writer.WriteEndArray(); - } - writer.WritePropertyName("typeProperties"u8); - writer.WriteStartObject(); - if (Optional.IsDefined(ConnectionString)) - { - writer.WritePropertyName("connectionString"u8); - JsonSerializer.Serialize(writer, ConnectionString); - } - if (Optional.IsDefined(CredString)) - { - writer.WritePropertyName("credString"u8); - JsonSerializer.Serialize(writer, CredString); - } - if (Optional.IsDefined(EncryptedCredential)) - { - writer.WritePropertyName("encryptedCredential"u8); - writer.WriteStringValue(EncryptedCredential); - } - writer.WriteEndObject(); - foreach (var item in AdditionalProperties) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.Value.ToString()).RootElement); -#endif - } - writer.WriteEndObject(); - } - - internal static CouchbaseLinkedService DeserializeCouchbaseLinkedService(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - string type = default; - Optional connectVia = default; - Optional description = default; - Optional> parameters = default; - Optional> annotations = default; - Optional> connectionString = default; - Optional credString = default; - Optional encryptedCredential = default; - IDictionary> additionalProperties = default; - Dictionary> additionalPropertiesDictionary = new Dictionary>(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("type"u8)) - { - type = property.Value.GetString(); - continue; - } - if (property.NameEquals("connectVia"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - connectVia = IntegrationRuntimeReference.DeserializeIntegrationRuntimeReference(property.Value); - continue; - } - if (property.NameEquals("description"u8)) - { - description = property.Value.GetString(); - continue; - } - if (property.NameEquals("parameters"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - Dictionary dictionary = new Dictionary(); - foreach (var property0 in property.Value.EnumerateObject()) - { - dictionary.Add(property0.Name, EntityParameterSpecification.DeserializeEntityParameterSpecification(property0.Value)); - } - parameters = dictionary; - continue; - } - if (property.NameEquals("annotations"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - if (item.ValueKind == JsonValueKind.Null) - { - array.Add(null); - } - else - { - array.Add(BinaryData.FromString(item.GetRawText())); - } - } - annotations = array; - continue; - } - if (property.NameEquals("typeProperties"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - foreach (var property0 in property.Value.EnumerateObject()) - { - if (property0.NameEquals("connectionString"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - connectionString = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("credString"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - credString = JsonSerializer.Deserialize(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("encryptedCredential"u8)) - { - encryptedCredential = property0.Value.GetString(); - continue; - } - } - continue; - } - additionalPropertiesDictionary.Add(property.Name, JsonSerializer.Deserialize>(property.Value.GetRawText())); - } - additionalProperties = additionalPropertiesDictionary; - return new CouchbaseLinkedService(type, connectVia.Value, description.Value, Optional.ToDictionary(parameters), Optional.ToList(annotations), additionalProperties, connectionString.Value, credString, encryptedCredential.Value); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/CouchbaseLinkedService.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/CouchbaseLinkedService.cs deleted file mode 100644 index 82e44ff3..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/CouchbaseLinkedService.cs +++ /dev/null @@ -1,43 +0,0 @@ -// - -#nullable disable - -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// Couchbase server linked service. - public partial class CouchbaseLinkedService : DataFactoryLinkedServiceProperties - { - /// Initializes a new instance of CouchbaseLinkedService. - public CouchbaseLinkedService() - { - LinkedServiceType = "Couchbase"; - } - - /// Initializes a new instance of CouchbaseLinkedService. - /// Type of linked service. - /// The integration runtime reference. - /// Linked service description. - /// Parameters for linked service. - /// List of tags that can be used for describing the linked service. - /// Additional Properties. - /// An ODBC connection string. Type: string, SecureString or AzureKeyVaultSecretReference. - /// The Azure key vault secret reference of credString in connection string. - /// The encrypted credential used for authentication. Credentials are encrypted using the integration runtime credential manager. Type: string. - internal CouchbaseLinkedService(string linkedServiceType, IntegrationRuntimeReference connectVia, string description, IDictionary parameters, IList annotations, IDictionary> additionalProperties, DataFactoryElement connectionString, DataFactoryKeyVaultSecretReference credString, string encryptedCredential) : base(linkedServiceType, connectVia, description, parameters, annotations, additionalProperties) - { - ConnectionString = connectionString; - CredString = credString; - EncryptedCredential = encryptedCredential; - LinkedServiceType = linkedServiceType ?? "Couchbase"; - } - - /// An ODBC connection string. Type: string, SecureString or AzureKeyVaultSecretReference. - public DataFactoryElement ConnectionString { get; set; } - /// The Azure key vault secret reference of credString in connection string. - public DataFactoryKeyVaultSecretReference CredString { get; set; } - /// The encrypted credential used for authentication. Credentials are encrypted using the integration runtime credential manager. Type: string. - public string EncryptedCredential { get; set; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/CouchbaseSource.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/CouchbaseSource.Serialization.cs deleted file mode 100644 index aa2bfb00..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/CouchbaseSource.Serialization.cs +++ /dev/null @@ -1,161 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class CouchbaseSource : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - if (Optional.IsDefined(Query)) - { - writer.WritePropertyName("query"u8); - JsonSerializer.Serialize(writer, Query); - } - if (Optional.IsDefined(QueryTimeout)) - { - writer.WritePropertyName("queryTimeout"u8); - JsonSerializer.Serialize(writer, QueryTimeout); - } - if (Optional.IsDefined(AdditionalColumns)) - { - writer.WritePropertyName("additionalColumns"u8); -#if NET6_0_OR_GREATER - writer.WriteRawValue(AdditionalColumns); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(AdditionalColumns.ToString()).RootElement); -#endif - } - writer.WritePropertyName("type"u8); - writer.WriteStringValue(CopySourceType); - if (Optional.IsDefined(SourceRetryCount)) - { - writer.WritePropertyName("sourceRetryCount"u8); - JsonSerializer.Serialize(writer, SourceRetryCount); - } - if (Optional.IsDefined(SourceRetryWait)) - { - writer.WritePropertyName("sourceRetryWait"u8); - JsonSerializer.Serialize(writer, SourceRetryWait); - } - if (Optional.IsDefined(MaxConcurrentConnections)) - { - writer.WritePropertyName("maxConcurrentConnections"u8); - JsonSerializer.Serialize(writer, MaxConcurrentConnections); - } - if (Optional.IsDefined(DisableMetricsCollection)) - { - writer.WritePropertyName("disableMetricsCollection"u8); - JsonSerializer.Serialize(writer, DisableMetricsCollection); - } - foreach (var item in AdditionalProperties) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.Value.ToString()).RootElement); -#endif - } - writer.WriteEndObject(); - } - - internal static CouchbaseSource DeserializeCouchbaseSource(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - Optional> query = default; - Optional> queryTimeout = default; - Optional additionalColumns = default; - string type = default; - Optional> sourceRetryCount = default; - Optional> sourceRetryWait = default; - Optional> maxConcurrentConnections = default; - Optional> disableMetricsCollection = default; - IDictionary> additionalProperties = default; - Dictionary> additionalPropertiesDictionary = new Dictionary>(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("query"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - query = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("queryTimeout"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - queryTimeout = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("additionalColumns"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - additionalColumns = BinaryData.FromString(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("type"u8)) - { - type = property.Value.GetString(); - continue; - } - if (property.NameEquals("sourceRetryCount"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - sourceRetryCount = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("sourceRetryWait"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - sourceRetryWait = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("maxConcurrentConnections"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - maxConcurrentConnections = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("disableMetricsCollection"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - disableMetricsCollection = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - additionalPropertiesDictionary.Add(property.Name, JsonSerializer.Deserialize>(property.Value.GetRawText())); - } - additionalProperties = additionalPropertiesDictionary; - return new CouchbaseSource(type, sourceRetryCount.Value, sourceRetryWait.Value, maxConcurrentConnections.Value, disableMetricsCollection.Value, additionalProperties, queryTimeout.Value, additionalColumns.Value, query.Value); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/CouchbaseSource.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/CouchbaseSource.cs deleted file mode 100644 index b552be31..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/CouchbaseSource.cs +++ /dev/null @@ -1,37 +0,0 @@ -// - -#nullable disable - -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// A copy activity Couchbase server source. - public partial class CouchbaseSource : TabularSource - { - /// Initializes a new instance of CouchbaseSource. - public CouchbaseSource() - { - CopySourceType = "CouchbaseSource"; - } - - /// Initializes a new instance of CouchbaseSource. - /// Copy source type. - /// Source retry count. Type: integer (or Expression with resultType integer). - /// Source retry wait. Type: string (or Expression with resultType string), pattern: ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). - /// The maximum concurrent connection count for the source data store. Type: integer (or Expression with resultType integer). - /// If true, disable data store metrics collection. Default is false. Type: boolean (or Expression with resultType boolean). - /// Additional Properties. - /// 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). - /// A query to retrieve data from source. Type: string (or Expression with resultType string). - internal CouchbaseSource(string copySourceType, DataFactoryElement sourceRetryCount, DataFactoryElement sourceRetryWait, DataFactoryElement maxConcurrentConnections, DataFactoryElement disableMetricsCollection, IDictionary> additionalProperties, DataFactoryElement queryTimeout, BinaryData additionalColumns, DataFactoryElement query) : base(copySourceType, sourceRetryCount, sourceRetryWait, maxConcurrentConnections, disableMetricsCollection, additionalProperties, queryTimeout, additionalColumns) - { - Query = query; - CopySourceType = copySourceType ?? "CouchbaseSource"; - } - - /// A query to retrieve data from source. Type: string (or Expression with resultType string). - public DataFactoryElement Query { get; set; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/CouchbaseTableDataset.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/CouchbaseTableDataset.Serialization.cs deleted file mode 100644 index 035d7d17..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/CouchbaseTableDataset.Serialization.cs +++ /dev/null @@ -1,212 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class CouchbaseTableDataset : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - writer.WritePropertyName("type"u8); - writer.WriteStringValue(DatasetType); - if (Optional.IsDefined(Description)) - { - writer.WritePropertyName("description"u8); - writer.WriteStringValue(Description); - } - if (Optional.IsDefined(Structure)) - { - writer.WritePropertyName("structure"u8); - JsonSerializer.Serialize(writer, Structure); - } - if (Optional.IsDefined(Schema)) - { - writer.WritePropertyName("schema"u8); - JsonSerializer.Serialize(writer, Schema); - } - writer.WritePropertyName("linkedServiceName"u8); - JsonSerializer.Serialize(writer, LinkedServiceName); if (Optional.IsCollectionDefined(Parameters)) - { - writer.WritePropertyName("parameters"u8); - writer.WriteStartObject(); - foreach (var item in Parameters) - { - writer.WritePropertyName(item.Key); - writer.WriteObjectValue(item.Value); - } - writer.WriteEndObject(); - } - if (Optional.IsCollectionDefined(Annotations)) - { - writer.WritePropertyName("annotations"u8); - writer.WriteStartArray(); - foreach (var item in Annotations) - { - if (item == null) - { - writer.WriteNullValue(); - continue; - } -#if NET6_0_OR_GREATER - writer.WriteRawValue(item); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.ToString()).RootElement); -#endif - } - writer.WriteEndArray(); - } - if (Optional.IsDefined(Folder)) - { - writer.WritePropertyName("folder"u8); - writer.WriteObjectValue(Folder); - } - writer.WritePropertyName("typeProperties"u8); - writer.WriteStartObject(); - if (Optional.IsDefined(TableName)) - { - writer.WritePropertyName("tableName"u8); - JsonSerializer.Serialize(writer, TableName); - } - writer.WriteEndObject(); - foreach (var item in AdditionalProperties) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.Value.ToString()).RootElement); -#endif - } - writer.WriteEndObject(); - } - - internal static CouchbaseTableDataset DeserializeCouchbaseTableDataset(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - string type = default; - Optional description = default; - Optional>> structure = default; - Optional>> schema = default; - DataFactoryLinkedServiceReference linkedServiceName = default; - Optional> parameters = default; - Optional> annotations = default; - Optional folder = default; - Optional> tableName = default; - IDictionary> additionalProperties = default; - Dictionary> additionalPropertiesDictionary = new Dictionary>(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("type"u8)) - { - type = property.Value.GetString(); - continue; - } - if (property.NameEquals("description"u8)) - { - description = property.Value.GetString(); - continue; - } - if (property.NameEquals("structure"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - structure = JsonSerializer.Deserialize>>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("schema"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - schema = JsonSerializer.Deserialize>>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("linkedServiceName"u8)) - { - linkedServiceName = JsonSerializer.Deserialize(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("parameters"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - Dictionary dictionary = new Dictionary(); - foreach (var property0 in property.Value.EnumerateObject()) - { - dictionary.Add(property0.Name, EntityParameterSpecification.DeserializeEntityParameterSpecification(property0.Value)); - } - parameters = dictionary; - continue; - } - if (property.NameEquals("annotations"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - if (item.ValueKind == JsonValueKind.Null) - { - array.Add(null); - } - else - { - array.Add(BinaryData.FromString(item.GetRawText())); - } - } - annotations = array; - continue; - } - if (property.NameEquals("folder"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - folder = DatasetFolder.DeserializeDatasetFolder(property.Value); - continue; - } - if (property.NameEquals("typeProperties"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - foreach (var property0 in property.Value.EnumerateObject()) - { - if (property0.NameEquals("tableName"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - tableName = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - } - continue; - } - additionalPropertiesDictionary.Add(property.Name, JsonSerializer.Deserialize>(property.Value.GetRawText())); - } - additionalProperties = additionalPropertiesDictionary; - return new CouchbaseTableDataset(type, description.Value, structure.Value, schema.Value, linkedServiceName, Optional.ToDictionary(parameters), Optional.ToList(annotations), folder.Value, additionalProperties, tableName.Value); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/CouchbaseTableDataset.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/CouchbaseTableDataset.cs deleted file mode 100644 index d9eef8da..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/CouchbaseTableDataset.cs +++ /dev/null @@ -1,43 +0,0 @@ -// - -#nullable disable - -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// Couchbase server dataset. - public partial class CouchbaseTableDataset : DataFactoryDatasetProperties - { - /// Initializes a new instance of CouchbaseTableDataset. - /// Linked service reference. - /// is null. - public CouchbaseTableDataset(DataFactoryLinkedServiceReference linkedServiceName) : base(linkedServiceName) - { - Argument.AssertNotNull(linkedServiceName, nameof(linkedServiceName)); - - DatasetType = "CouchbaseTable"; - } - - /// Initializes a new instance of CouchbaseTableDataset. - /// Type of dataset. - /// Dataset description. - /// Columns that define the structure of the dataset. Type: array (or Expression with resultType array), itemType: DatasetDataElement. - /// Columns that define the physical type schema of the dataset. Type: array (or Expression with resultType array), itemType: DatasetSchemaDataElement. - /// Linked service reference. - /// Parameters for dataset. - /// List of tags that can be used for describing the Dataset. - /// The folder that this Dataset is in. If not specified, Dataset will appear at the root level. - /// Additional Properties. - /// The table name. Type: string (or Expression with resultType string). - internal CouchbaseTableDataset(string datasetType, string description, DataFactoryElement> structure, DataFactoryElement> schema, DataFactoryLinkedServiceReference linkedServiceName, IDictionary parameters, IList annotations, DatasetFolder folder, IDictionary> additionalProperties, DataFactoryElement tableName) : base(datasetType, description, structure, schema, linkedServiceName, parameters, annotations, folder, additionalProperties) - { - TableName = tableName; - DatasetType = datasetType ?? "CouchbaseTable"; - } - - /// The table name. Type: string (or Expression with resultType string). - public DataFactoryElement TableName { get; set; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/CreateLinkedIntegrationRuntimeContent.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/CreateLinkedIntegrationRuntimeContent.Serialization.cs deleted file mode 100644 index 5f565ea9..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/CreateLinkedIntegrationRuntimeContent.Serialization.cs +++ /dev/null @@ -1,38 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class CreateLinkedIntegrationRuntimeContent : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - if (Optional.IsDefined(Name)) - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (Optional.IsDefined(SubscriptionId)) - { - writer.WritePropertyName("subscriptionId"u8); - writer.WriteStringValue(SubscriptionId); - } - if (Optional.IsDefined(DataFactoryName)) - { - writer.WritePropertyName("dataFactoryName"u8); - writer.WriteStringValue(DataFactoryName); - } - if (Optional.IsDefined(DataFactoryLocation)) - { - writer.WritePropertyName("dataFactoryLocation"u8); - writer.WriteStringValue(DataFactoryLocation.Value); - } - writer.WriteEndObject(); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/CreateLinkedIntegrationRuntimeContent.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/CreateLinkedIntegrationRuntimeContent.cs deleted file mode 100644 index 0cca52ea..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/CreateLinkedIntegrationRuntimeContent.cs +++ /dev/null @@ -1,26 +0,0 @@ -// - -#nullable disable - -using Azure.Core; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// The linked integration runtime information. - public partial class CreateLinkedIntegrationRuntimeContent - { - /// Initializes a new instance of CreateLinkedIntegrationRuntimeContent. - public CreateLinkedIntegrationRuntimeContent() - { - } - - /// The name of the linked integration runtime. - public string Name { get; set; } - /// The ID of the subscription that the linked integration runtime belongs to. - public string SubscriptionId { get; set; } - /// The name of the data factory that the linked integration runtime belongs to. - public string DataFactoryName { get; set; } - /// The location of the data factory that the linked integration runtime belongs to. - public AzureLocation? DataFactoryLocation { get; set; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/CustomActivity.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/CustomActivity.Serialization.cs deleted file mode 100644 index f74658da..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/CustomActivity.Serialization.cs +++ /dev/null @@ -1,325 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class CustomActivity : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - if (Optional.IsDefined(LinkedServiceName)) - { - writer.WritePropertyName("linkedServiceName"u8); - JsonSerializer.Serialize(writer, LinkedServiceName); - } - if (Optional.IsDefined(Policy)) - { - writer.WritePropertyName("policy"u8); - writer.WriteObjectValue(Policy); - } - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ActivityType); - if (Optional.IsDefined(Description)) - { - writer.WritePropertyName("description"u8); - writer.WriteStringValue(Description); - } - if (Optional.IsDefined(State)) - { - writer.WritePropertyName("state"u8); - writer.WriteStringValue(State.Value.ToString()); - } - if (Optional.IsDefined(OnInactiveMarkAs)) - { - writer.WritePropertyName("onInactiveMarkAs"u8); - writer.WriteStringValue(OnInactiveMarkAs.Value.ToString()); - } - if (Optional.IsCollectionDefined(DependsOn)) - { - writer.WritePropertyName("dependsOn"u8); - writer.WriteStartArray(); - foreach (var item in DependsOn) - { - writer.WriteObjectValue(item); - } - writer.WriteEndArray(); - } - if (Optional.IsCollectionDefined(UserProperties)) - { - writer.WritePropertyName("userProperties"u8); - writer.WriteStartArray(); - foreach (var item in UserProperties) - { - writer.WriteObjectValue(item); - } - writer.WriteEndArray(); - } - writer.WritePropertyName("typeProperties"u8); - writer.WriteStartObject(); - writer.WritePropertyName("command"u8); - JsonSerializer.Serialize(writer, Command); - if (Optional.IsDefined(ResourceLinkedService)) - { - writer.WritePropertyName("resourceLinkedService"u8); - JsonSerializer.Serialize(writer, ResourceLinkedService); - } - if (Optional.IsDefined(FolderPath)) - { - writer.WritePropertyName("folderPath"u8); - JsonSerializer.Serialize(writer, FolderPath); - } - if (Optional.IsDefined(ReferenceObjects)) - { - writer.WritePropertyName("referenceObjects"u8); - writer.WriteObjectValue(ReferenceObjects); - } - if (Optional.IsCollectionDefined(ExtendedProperties)) - { - writer.WritePropertyName("extendedProperties"u8); - writer.WriteStartObject(); - foreach (var item in ExtendedProperties) - { - writer.WritePropertyName(item.Key); - if (item.Value == null) - { - writer.WriteNullValue(); - continue; - } -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.Value.ToString()).RootElement); -#endif - } - writer.WriteEndObject(); - } - if (Optional.IsDefined(RetentionTimeInDays)) - { - writer.WritePropertyName("retentionTimeInDays"u8); -#if NET6_0_OR_GREATER - writer.WriteRawValue(RetentionTimeInDays); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(RetentionTimeInDays.ToString()).RootElement); -#endif - } - if (Optional.IsDefined(AutoUserSpecification)) - { - writer.WritePropertyName("autoUserSpecification"u8); - JsonSerializer.Serialize(writer, AutoUserSpecification); - } - writer.WriteEndObject(); - foreach (var item in AdditionalProperties) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.Value.ToString()).RootElement); -#endif - } - writer.WriteEndObject(); - } - - internal static CustomActivity DeserializeCustomActivity(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - Optional linkedServiceName = default; - Optional policy = default; - string name = default; - string type = default; - Optional description = default; - Optional state = default; - Optional onInactiveMarkAs = default; - Optional> dependsOn = default; - Optional> userProperties = default; - DataFactoryElement command = default; - Optional resourceLinkedService = default; - Optional> folderPath = default; - Optional referenceObjects = default; - Optional>> extendedProperties = default; - Optional retentionTimeInDays = default; - Optional> autoUserSpecification = default; - IDictionary> additionalProperties = default; - Dictionary> additionalPropertiesDictionary = new Dictionary>(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("linkedServiceName"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - linkedServiceName = JsonSerializer.Deserialize(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("policy"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - policy = PipelineActivityPolicy.DeserializePipelineActivityPolicy(property.Value); - continue; - } - if (property.NameEquals("name"u8)) - { - name = property.Value.GetString(); - continue; - } - if (property.NameEquals("type"u8)) - { - type = property.Value.GetString(); - continue; - } - if (property.NameEquals("description"u8)) - { - description = property.Value.GetString(); - continue; - } - if (property.NameEquals("state"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - state = new PipelineActivityState(property.Value.GetString()); - continue; - } - if (property.NameEquals("onInactiveMarkAs"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - onInactiveMarkAs = new ActivityOnInactiveMarkAs(property.Value.GetString()); - continue; - } - if (property.NameEquals("dependsOn"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - array.Add(PipelineActivityDependency.DeserializePipelineActivityDependency(item)); - } - dependsOn = array; - continue; - } - if (property.NameEquals("userProperties"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - array.Add(PipelineActivityUserProperty.DeserializePipelineActivityUserProperty(item)); - } - userProperties = array; - continue; - } - if (property.NameEquals("typeProperties"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - foreach (var property0 in property.Value.EnumerateObject()) - { - if (property0.NameEquals("command"u8)) - { - command = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("resourceLinkedService"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - resourceLinkedService = JsonSerializer.Deserialize(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("folderPath"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - folderPath = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("referenceObjects"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - referenceObjects = CustomActivityReferenceObject.DeserializeCustomActivityReferenceObject(property0.Value); - continue; - } - if (property0.NameEquals("extendedProperties"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - Dictionary> dictionary = new Dictionary>(); - foreach (var property1 in property0.Value.EnumerateObject()) - { - if (property1.Value.ValueKind == JsonValueKind.Null) - { - dictionary.Add(property1.Name, null); - } - else - { - dictionary.Add(property1.Name, JsonSerializer.Deserialize>(property1.Value.GetRawText())); - } - } - extendedProperties = dictionary; - continue; - } - if (property0.NameEquals("retentionTimeInDays"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - retentionTimeInDays = BinaryData.FromString(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("autoUserSpecification"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - autoUserSpecification = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - } - continue; - } - additionalPropertiesDictionary.Add(property.Name, JsonSerializer.Deserialize>(property.Value.GetRawText())); - } - additionalProperties = additionalPropertiesDictionary; - return new CustomActivity(name, type, description.Value, Optional.ToNullable(state), Optional.ToNullable(onInactiveMarkAs), Optional.ToList(dependsOn), Optional.ToList(userProperties), additionalProperties, linkedServiceName, policy.Value, command, resourceLinkedService, folderPath.Value, referenceObjects.Value, Optional.ToDictionary(extendedProperties), retentionTimeInDays.Value, autoUserSpecification.Value); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/CustomActivity.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/CustomActivity.cs deleted file mode 100644 index a98a2bf3..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/CustomActivity.cs +++ /dev/null @@ -1,130 +0,0 @@ -// - -#nullable disable - -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// Custom activity type. - public partial class CustomActivity : ExecutionActivity - { - /// Initializes a new instance of CustomActivity. - /// Activity name. - /// Command for custom activity Type: string (or Expression with resultType string). - /// or is null. - public CustomActivity(string name, DataFactoryElement command) : base(name) - { - Argument.AssertNotNull(name, nameof(name)); - Argument.AssertNotNull(command, nameof(command)); - - Command = command; - ExtendedProperties = new ChangeTrackingDictionary>(); - ActivityType = "Custom"; - } - - /// Initializes a new instance of CustomActivity. - /// Activity name. - /// Type of activity. - /// Activity description. - /// Activity state. This is an optional property and if not provided, the state will be Active by default. - /// 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. - /// Activity depends on condition. - /// Activity user properties. - /// Additional Properties. - /// Linked service reference. - /// Activity policy. - /// Command for custom activity Type: string (or Expression with resultType string). - /// Resource linked service reference. - /// Folder path for resource files Type: string (or Expression with resultType string). - /// Reference objects. - /// User defined property bag. There is no restriction on the keys or values that can be used. The user specified custom activity has the full responsibility to consume and interpret the content defined. - /// The retention time for the files submitted for custom activity. Type: double (or Expression with resultType double). - /// Elevation level and scope for the user, default is nonadmin task. Type: string (or Expression with resultType double). - internal CustomActivity(string name, string activityType, string description, PipelineActivityState? state, ActivityOnInactiveMarkAs? onInactiveMarkAs, IList dependsOn, IList userProperties, IDictionary> additionalProperties, DataFactoryLinkedServiceReference linkedServiceName, PipelineActivityPolicy policy, DataFactoryElement command, DataFactoryLinkedServiceReference resourceLinkedService, DataFactoryElement folderPath, CustomActivityReferenceObject referenceObjects, IDictionary> extendedProperties, BinaryData retentionTimeInDays, DataFactoryElement autoUserSpecification) : base(name, activityType, description, state, onInactiveMarkAs, dependsOn, userProperties, additionalProperties, linkedServiceName, policy) - { - Command = command; - ResourceLinkedService = resourceLinkedService; - FolderPath = folderPath; - ReferenceObjects = referenceObjects; - ExtendedProperties = extendedProperties; - RetentionTimeInDays = retentionTimeInDays; - AutoUserSpecification = autoUserSpecification; - ActivityType = activityType ?? "Custom"; - } - - /// Command for custom activity Type: string (or Expression with resultType string). - public DataFactoryElement Command { get; set; } - /// Resource linked service reference. - public DataFactoryLinkedServiceReference ResourceLinkedService { get; set; } - /// Folder path for resource files Type: string (or Expression with resultType string). - public DataFactoryElement FolderPath { get; set; } - /// Reference objects. - public CustomActivityReferenceObject ReferenceObjects { get; set; } - /// - /// User defined property bag. There is no restriction on the keys or values that can be used. The user specified custom activity has the full responsibility to consume and interpret the content defined. - /// - /// To assign an object to the value of this property use . - /// - /// - /// To assign an already formated json string to this property use . - /// - /// - /// Examples: - /// - /// - /// BinaryData.FromObjectAsJson("foo") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromString("\"foo\"") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromObjectAsJson(new { key = "value" }) - /// Creates a payload of { "key": "value" }. - /// - /// - /// BinaryData.FromString("{\"key\": \"value\"}") - /// Creates a payload of { "key": "value" }. - /// - /// - /// - /// - public IDictionary> ExtendedProperties { get; } - /// - /// The retention time for the files submitted for custom activity. Type: double (or Expression with resultType double). - /// - /// To assign an object to this property use . - /// - /// - /// To assign an already formated json string to this property use . - /// - /// - /// Examples: - /// - /// - /// BinaryData.FromObjectAsJson("foo") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromString("\"foo\"") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromObjectAsJson(new { key = "value" }) - /// Creates a payload of { "key": "value" }. - /// - /// - /// BinaryData.FromString("{\"key\": \"value\"}") - /// Creates a payload of { "key": "value" }. - /// - /// - /// - /// - public BinaryData RetentionTimeInDays { get; set; } - /// Elevation level and scope for the user, default is nonadmin task. Type: string (or Expression with resultType double). - public DataFactoryElement AutoUserSpecification { get; set; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/CustomActivityReferenceObject.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/CustomActivityReferenceObject.Serialization.cs deleted file mode 100644 index 3496deb6..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/CustomActivityReferenceObject.Serialization.cs +++ /dev/null @@ -1,81 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class CustomActivityReferenceObject : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - if (Optional.IsCollectionDefined(LinkedServices)) - { - writer.WritePropertyName("linkedServices"u8); - writer.WriteStartArray(); - foreach (var item in LinkedServices) - { - JsonSerializer.Serialize(writer, item); - } - writer.WriteEndArray(); - } - if (Optional.IsCollectionDefined(Datasets)) - { - writer.WritePropertyName("datasets"u8); - writer.WriteStartArray(); - foreach (var item in Datasets) - { - writer.WriteObjectValue(item); - } - writer.WriteEndArray(); - } - writer.WriteEndObject(); - } - - internal static CustomActivityReferenceObject DeserializeCustomActivityReferenceObject(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - Optional> linkedServices = default; - Optional> datasets = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("linkedServices"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - array.Add(JsonSerializer.Deserialize(item.GetRawText())); - } - linkedServices = array; - continue; - } - if (property.NameEquals("datasets"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - array.Add(DatasetReference.DeserializeDatasetReference(item)); - } - datasets = array; - continue; - } - } - return new CustomActivityReferenceObject(Optional.ToList(linkedServices), Optional.ToList(datasets)); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/CustomActivityReferenceObject.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/CustomActivityReferenceObject.cs deleted file mode 100644 index 07b523e5..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/CustomActivityReferenceObject.cs +++ /dev/null @@ -1,34 +0,0 @@ -// - -#nullable disable - -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// Reference objects for custom activity. - public partial class CustomActivityReferenceObject - { - /// Initializes a new instance of CustomActivityReferenceObject. - public CustomActivityReferenceObject() - { - LinkedServices = new ChangeTrackingList(); - Datasets = new ChangeTrackingList(); - } - - /// Initializes a new instance of CustomActivityReferenceObject. - /// Linked service references. - /// Dataset references. - internal CustomActivityReferenceObject(IList linkedServices, IList datasets) - { - LinkedServices = linkedServices; - Datasets = datasets; - } - - /// Linked service references. - public IList LinkedServices { get; } - /// Dataset references. - public IList Datasets { get; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/CustomDataSourceLinkedService.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/CustomDataSourceLinkedService.Serialization.cs deleted file mode 100644 index d10be82a..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/CustomDataSourceLinkedService.Serialization.cs +++ /dev/null @@ -1,157 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class CustomDataSourceLinkedService : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - writer.WritePropertyName("typeProperties"u8); -#if NET6_0_OR_GREATER - writer.WriteRawValue(TypeProperties); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(TypeProperties.ToString()).RootElement); -#endif - writer.WritePropertyName("type"u8); - writer.WriteStringValue(LinkedServiceType); - if (Optional.IsDefined(ConnectVia)) - { - writer.WritePropertyName("connectVia"u8); - writer.WriteObjectValue(ConnectVia); - } - if (Optional.IsDefined(Description)) - { - writer.WritePropertyName("description"u8); - writer.WriteStringValue(Description); - } - if (Optional.IsCollectionDefined(Parameters)) - { - writer.WritePropertyName("parameters"u8); - writer.WriteStartObject(); - foreach (var item in Parameters) - { - writer.WritePropertyName(item.Key); - writer.WriteObjectValue(item.Value); - } - writer.WriteEndObject(); - } - if (Optional.IsCollectionDefined(Annotations)) - { - writer.WritePropertyName("annotations"u8); - writer.WriteStartArray(); - foreach (var item in Annotations) - { - if (item == null) - { - writer.WriteNullValue(); - continue; - } -#if NET6_0_OR_GREATER - writer.WriteRawValue(item); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.ToString()).RootElement); -#endif - } - writer.WriteEndArray(); - } - foreach (var item in AdditionalProperties) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.Value.ToString()).RootElement); -#endif - } - writer.WriteEndObject(); - } - - internal static CustomDataSourceLinkedService DeserializeCustomDataSourceLinkedService(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - BinaryData typeProperties = default; - string type = default; - Optional connectVia = default; - Optional description = default; - Optional> parameters = default; - Optional> annotations = default; - IDictionary> additionalProperties = default; - Dictionary> additionalPropertiesDictionary = new Dictionary>(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("typeProperties"u8)) - { - typeProperties = BinaryData.FromString(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("type"u8)) - { - type = property.Value.GetString(); - continue; - } - if (property.NameEquals("connectVia"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - connectVia = IntegrationRuntimeReference.DeserializeIntegrationRuntimeReference(property.Value); - continue; - } - if (property.NameEquals("description"u8)) - { - description = property.Value.GetString(); - continue; - } - if (property.NameEquals("parameters"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - Dictionary dictionary = new Dictionary(); - foreach (var property0 in property.Value.EnumerateObject()) - { - dictionary.Add(property0.Name, EntityParameterSpecification.DeserializeEntityParameterSpecification(property0.Value)); - } - parameters = dictionary; - continue; - } - if (property.NameEquals("annotations"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - if (item.ValueKind == JsonValueKind.Null) - { - array.Add(null); - } - else - { - array.Add(BinaryData.FromString(item.GetRawText())); - } - } - annotations = array; - continue; - } - additionalPropertiesDictionary.Add(property.Name, JsonSerializer.Deserialize>(property.Value.GetRawText())); - } - additionalProperties = additionalPropertiesDictionary; - return new CustomDataSourceLinkedService(type, connectVia.Value, description.Value, Optional.ToDictionary(parameters), Optional.ToList(annotations), additionalProperties, typeProperties); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/CustomDataSourceLinkedService.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/CustomDataSourceLinkedService.cs deleted file mode 100644 index cb313b77..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/CustomDataSourceLinkedService.cs +++ /dev/null @@ -1,70 +0,0 @@ -// - -#nullable disable - -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// Custom linked service. - public partial class CustomDataSourceLinkedService : DataFactoryLinkedServiceProperties - { - /// Initializes a new instance of CustomDataSourceLinkedService. - /// Custom linked service properties. - /// is null. - public CustomDataSourceLinkedService(BinaryData typeProperties) - { - Argument.AssertNotNull(typeProperties, nameof(typeProperties)); - - TypeProperties = typeProperties; - LinkedServiceType = "CustomDataSource"; - } - - /// Initializes a new instance of CustomDataSourceLinkedService. - /// Type of linked service. - /// The integration runtime reference. - /// Linked service description. - /// Parameters for linked service. - /// List of tags that can be used for describing the linked service. - /// Additional Properties. - /// Custom linked service properties. - internal CustomDataSourceLinkedService(string linkedServiceType, IntegrationRuntimeReference connectVia, string description, IDictionary parameters, IList annotations, IDictionary> additionalProperties, BinaryData typeProperties) : base(linkedServiceType, connectVia, description, parameters, annotations, additionalProperties) - { - TypeProperties = typeProperties; - LinkedServiceType = linkedServiceType ?? "CustomDataSource"; - } - - /// - /// Custom linked service properties. - /// - /// To assign an object to this property use . - /// - /// - /// To assign an already formated json string to this property use . - /// - /// - /// Examples: - /// - /// - /// BinaryData.FromObjectAsJson("foo") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromString("\"foo\"") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromObjectAsJson(new { key = "value" }) - /// Creates a payload of { "key": "value" }. - /// - /// - /// BinaryData.FromString("{\"key\": \"value\"}") - /// Creates a payload of { "key": "value" }. - /// - /// - /// - /// - public BinaryData TypeProperties { get; set; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/CustomDataset.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/CustomDataset.Serialization.cs deleted file mode 100644 index fc3f44d1..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/CustomDataset.Serialization.cs +++ /dev/null @@ -1,201 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class CustomDataset : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - if (Optional.IsDefined(TypeProperties)) - { - writer.WritePropertyName("typeProperties"u8); -#if NET6_0_OR_GREATER - writer.WriteRawValue(TypeProperties); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(TypeProperties.ToString()).RootElement); -#endif - } - writer.WritePropertyName("type"u8); - writer.WriteStringValue(DatasetType); - if (Optional.IsDefined(Description)) - { - writer.WritePropertyName("description"u8); - writer.WriteStringValue(Description); - } - if (Optional.IsDefined(Structure)) - { - writer.WritePropertyName("structure"u8); - JsonSerializer.Serialize(writer, Structure); - } - if (Optional.IsDefined(Schema)) - { - writer.WritePropertyName("schema"u8); - JsonSerializer.Serialize(writer, Schema); - } - writer.WritePropertyName("linkedServiceName"u8); - JsonSerializer.Serialize(writer, LinkedServiceName); if (Optional.IsCollectionDefined(Parameters)) - { - writer.WritePropertyName("parameters"u8); - writer.WriteStartObject(); - foreach (var item in Parameters) - { - writer.WritePropertyName(item.Key); - writer.WriteObjectValue(item.Value); - } - writer.WriteEndObject(); - } - if (Optional.IsCollectionDefined(Annotations)) - { - writer.WritePropertyName("annotations"u8); - writer.WriteStartArray(); - foreach (var item in Annotations) - { - if (item == null) - { - writer.WriteNullValue(); - continue; - } -#if NET6_0_OR_GREATER - writer.WriteRawValue(item); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.ToString()).RootElement); -#endif - } - writer.WriteEndArray(); - } - if (Optional.IsDefined(Folder)) - { - writer.WritePropertyName("folder"u8); - writer.WriteObjectValue(Folder); - } - foreach (var item in AdditionalProperties) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.Value.ToString()).RootElement); -#endif - } - writer.WriteEndObject(); - } - - internal static CustomDataset DeserializeCustomDataset(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - Optional typeProperties = default; - string type = default; - Optional description = default; - Optional>> structure = default; - Optional>> schema = default; - DataFactoryLinkedServiceReference linkedServiceName = default; - Optional> parameters = default; - Optional> annotations = default; - Optional folder = default; - IDictionary> additionalProperties = default; - Dictionary> additionalPropertiesDictionary = new Dictionary>(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("typeProperties"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - typeProperties = BinaryData.FromString(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("type"u8)) - { - type = property.Value.GetString(); - continue; - } - if (property.NameEquals("description"u8)) - { - description = property.Value.GetString(); - continue; - } - if (property.NameEquals("structure"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - structure = JsonSerializer.Deserialize>>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("schema"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - schema = JsonSerializer.Deserialize>>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("linkedServiceName"u8)) - { - linkedServiceName = JsonSerializer.Deserialize(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("parameters"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - Dictionary dictionary = new Dictionary(); - foreach (var property0 in property.Value.EnumerateObject()) - { - dictionary.Add(property0.Name, EntityParameterSpecification.DeserializeEntityParameterSpecification(property0.Value)); - } - parameters = dictionary; - continue; - } - if (property.NameEquals("annotations"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - if (item.ValueKind == JsonValueKind.Null) - { - array.Add(null); - } - else - { - array.Add(BinaryData.FromString(item.GetRawText())); - } - } - annotations = array; - continue; - } - if (property.NameEquals("folder"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - folder = DatasetFolder.DeserializeDatasetFolder(property.Value); - continue; - } - additionalPropertiesDictionary.Add(property.Name, JsonSerializer.Deserialize>(property.Value.GetRawText())); - } - additionalProperties = additionalPropertiesDictionary; - return new CustomDataset(type, description.Value, structure.Value, schema.Value, linkedServiceName, Optional.ToDictionary(parameters), Optional.ToList(annotations), folder.Value, additionalProperties, typeProperties.Value); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/CustomDataset.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/CustomDataset.cs deleted file mode 100644 index 416188b2..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/CustomDataset.cs +++ /dev/null @@ -1,72 +0,0 @@ -// - -#nullable disable - -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// The custom dataset. - public partial class CustomDataset : DataFactoryDatasetProperties - { - /// Initializes a new instance of CustomDataset. - /// Linked service reference. - /// is null. - public CustomDataset(DataFactoryLinkedServiceReference linkedServiceName) : base(linkedServiceName) - { - Argument.AssertNotNull(linkedServiceName, nameof(linkedServiceName)); - - DatasetType = "CustomDataset"; - } - - /// Initializes a new instance of CustomDataset. - /// Type of dataset. - /// Dataset description. - /// Columns that define the structure of the dataset. Type: array (or Expression with resultType array), itemType: DatasetDataElement. - /// Columns that define the physical type schema of the dataset. Type: array (or Expression with resultType array), itemType: DatasetSchemaDataElement. - /// Linked service reference. - /// Parameters for dataset. - /// List of tags that can be used for describing the Dataset. - /// The folder that this Dataset is in. If not specified, Dataset will appear at the root level. - /// Additional Properties. - /// Custom dataset properties. - internal CustomDataset(string datasetType, string description, DataFactoryElement> structure, DataFactoryElement> schema, DataFactoryLinkedServiceReference linkedServiceName, IDictionary parameters, IList annotations, DatasetFolder folder, IDictionary> additionalProperties, BinaryData typeProperties) : base(datasetType, description, structure, schema, linkedServiceName, parameters, annotations, folder, additionalProperties) - { - TypeProperties = typeProperties; - DatasetType = datasetType ?? "CustomDataset"; - } - - /// - /// Custom dataset properties. - /// - /// To assign an object to this property use . - /// - /// - /// To assign an already formated json string to this property use . - /// - /// - /// Examples: - /// - /// - /// BinaryData.FromObjectAsJson("foo") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromString("\"foo\"") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromObjectAsJson(new { key = "value" }) - /// Creates a payload of { "key": "value" }. - /// - /// - /// BinaryData.FromString("{\"key\": \"value\"}") - /// Creates a payload of { "key": "value" }. - /// - /// - /// - /// - public BinaryData TypeProperties { get; set; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/CustomEventsTrigger.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/CustomEventsTrigger.Serialization.cs deleted file mode 100644 index 91de91e1..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/CustomEventsTrigger.Serialization.cs +++ /dev/null @@ -1,218 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class CustomEventsTrigger : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - if (Optional.IsCollectionDefined(Pipelines)) - { - writer.WritePropertyName("pipelines"u8); - writer.WriteStartArray(); - foreach (var item in Pipelines) - { - writer.WriteObjectValue(item); - } - writer.WriteEndArray(); - } - writer.WritePropertyName("type"u8); - writer.WriteStringValue(TriggerType); - if (Optional.IsDefined(Description)) - { - writer.WritePropertyName("description"u8); - writer.WriteStringValue(Description); - } - if (Optional.IsCollectionDefined(Annotations)) - { - writer.WritePropertyName("annotations"u8); - writer.WriteStartArray(); - foreach (var item in Annotations) - { - if (item == null) - { - writer.WriteNullValue(); - continue; - } -#if NET6_0_OR_GREATER - writer.WriteRawValue(item); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.ToString()).RootElement); -#endif - } - writer.WriteEndArray(); - } - writer.WritePropertyName("typeProperties"u8); - writer.WriteStartObject(); - if (Optional.IsDefined(SubjectBeginsWith)) - { - writer.WritePropertyName("subjectBeginsWith"u8); - writer.WriteStringValue(SubjectBeginsWith); - } - if (Optional.IsDefined(SubjectEndsWith)) - { - writer.WritePropertyName("subjectEndsWith"u8); - writer.WriteStringValue(SubjectEndsWith); - } - writer.WritePropertyName("events"u8); - writer.WriteStartArray(); - foreach (var item in Events) - { - if (item == null) - { - writer.WriteNullValue(); - continue; - } -#if NET6_0_OR_GREATER - writer.WriteRawValue(item); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.ToString()).RootElement); -#endif - } - writer.WriteEndArray(); - writer.WritePropertyName("scope"u8); - writer.WriteStringValue(Scope); - writer.WriteEndObject(); - foreach (var item in AdditionalProperties) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.Value.ToString()).RootElement); -#endif - } - writer.WriteEndObject(); - } - - internal static CustomEventsTrigger DeserializeCustomEventsTrigger(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - Optional> pipelines = default; - string type = default; - Optional description = default; - Optional runtimeState = default; - Optional> annotations = default; - Optional subjectBeginsWith = default; - Optional subjectEndsWith = default; - IList events = default; - string scope = default; - IDictionary> additionalProperties = default; - Dictionary> additionalPropertiesDictionary = new Dictionary>(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("pipelines"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - array.Add(TriggerPipelineReference.DeserializeTriggerPipelineReference(item)); - } - pipelines = array; - continue; - } - if (property.NameEquals("type"u8)) - { - type = property.Value.GetString(); - continue; - } - if (property.NameEquals("description"u8)) - { - description = property.Value.GetString(); - continue; - } - if (property.NameEquals("runtimeState"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - runtimeState = new DataFactoryTriggerRuntimeState(property.Value.GetString()); - continue; - } - if (property.NameEquals("annotations"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - if (item.ValueKind == JsonValueKind.Null) - { - array.Add(null); - } - else - { - array.Add(BinaryData.FromString(item.GetRawText())); - } - } - annotations = array; - continue; - } - if (property.NameEquals("typeProperties"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - foreach (var property0 in property.Value.EnumerateObject()) - { - if (property0.NameEquals("subjectBeginsWith"u8)) - { - subjectBeginsWith = property0.Value.GetString(); - continue; - } - if (property0.NameEquals("subjectEndsWith"u8)) - { - subjectEndsWith = property0.Value.GetString(); - continue; - } - if (property0.NameEquals("events"u8)) - { - List array = new List(); - foreach (var item in property0.Value.EnumerateArray()) - { - if (item.ValueKind == JsonValueKind.Null) - { - array.Add(null); - } - else - { - array.Add(BinaryData.FromString(item.GetRawText())); - } - } - events = array; - continue; - } - if (property0.NameEquals("scope"u8)) - { - scope = property0.Value.GetString(); - continue; - } - } - continue; - } - additionalPropertiesDictionary.Add(property.Name, JsonSerializer.Deserialize>(property.Value.GetRawText())); - } - additionalProperties = additionalPropertiesDictionary; - return new CustomEventsTrigger(type, description.Value, Optional.ToNullable(runtimeState), Optional.ToList(annotations), additionalProperties, Optional.ToList(pipelines), subjectBeginsWith.Value, subjectEndsWith.Value, events, scope); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/CustomEventsTrigger.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/CustomEventsTrigger.cs deleted file mode 100644 index f728edf1..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/CustomEventsTrigger.cs +++ /dev/null @@ -1,85 +0,0 @@ -// - -#nullable disable - -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// Trigger that runs every time a custom event is received. - public partial class CustomEventsTrigger : MultiplePipelineTrigger - { - /// Initializes a new instance of CustomEventsTrigger. - /// The list of event types that cause this trigger to fire. - /// The ARM resource ID of the Azure Event Grid Topic. - /// or is null. - public CustomEventsTrigger(IEnumerable events, string scope) - { - Argument.AssertNotNull(events, nameof(events)); - Argument.AssertNotNull(scope, nameof(scope)); - - Events = events.ToList(); - Scope = scope; - TriggerType = "CustomEventsTrigger"; - } - - /// Initializes a new instance of CustomEventsTrigger. - /// Trigger type. - /// Trigger description. - /// Indicates if trigger is running or not. Updated when Start/Stop APIs are called on the Trigger. - /// List of tags that can be used for describing the trigger. - /// Additional Properties. - /// Pipelines that need to be started. - /// The event subject must begin with the pattern provided for trigger to fire. At least one of these must be provided: subjectBeginsWith, subjectEndsWith. - /// The event subject must end with the pattern provided for trigger to fire. At least one of these must be provided: subjectBeginsWith, subjectEndsWith. - /// The list of event types that cause this trigger to fire. - /// The ARM resource ID of the Azure Event Grid Topic. - internal CustomEventsTrigger(string triggerType, string description, DataFactoryTriggerRuntimeState? runtimeState, IList annotations, IDictionary> additionalProperties, IList pipelines, string subjectBeginsWith, string subjectEndsWith, IList events, string scope) : base(triggerType, description, runtimeState, annotations, additionalProperties, pipelines) - { - SubjectBeginsWith = subjectBeginsWith; - SubjectEndsWith = subjectEndsWith; - Events = events; - Scope = scope; - TriggerType = triggerType ?? "CustomEventsTrigger"; - } - - /// The event subject must begin with the pattern provided for trigger to fire. At least one of these must be provided: subjectBeginsWith, subjectEndsWith. - public string SubjectBeginsWith { get; set; } - /// The event subject must end with the pattern provided for trigger to fire. At least one of these must be provided: subjectBeginsWith, subjectEndsWith. - public string SubjectEndsWith { get; set; } - /// - /// The list of event types that cause this trigger to fire. - /// - /// To assign an object to the element of this property use . - /// - /// - /// To assign an already formated json string to this property use . - /// - /// - /// Examples: - /// - /// - /// BinaryData.FromObjectAsJson("foo") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromString("\"foo\"") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromObjectAsJson(new { key = "value" }) - /// Creates a payload of { "key": "value" }. - /// - /// - /// BinaryData.FromString("{\"key\": \"value\"}") - /// Creates a payload of { "key": "value" }. - /// - /// - /// - /// - public IList Events { get; } - /// The ARM resource ID of the Azure Event Grid Topic. - public string Scope { get; set; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/CustomSetupBase.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/CustomSetupBase.Serialization.cs deleted file mode 100644 index 67625560..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/CustomSetupBase.Serialization.cs +++ /dev/null @@ -1,39 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class CustomSetupBase : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - writer.WritePropertyName("type"u8); - writer.WriteStringValue(CustomSetupBaseType); - writer.WriteEndObject(); - } - - internal static CustomSetupBase DeserializeCustomSetupBase(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - if (element.TryGetProperty("type", out JsonElement discriminator)) - { - switch (discriminator.GetString()) - { - case "AzPowerShellSetup": return AzPowerShellSetup.DeserializeAzPowerShellSetup(element); - case "CmdkeySetup": return CmdkeySetup.DeserializeCmdkeySetup(element); - case "ComponentSetup": return ComponentSetup.DeserializeComponentSetup(element); - case "EnvironmentVariableSetup": return EnvironmentVariableSetup.DeserializeEnvironmentVariableSetup(element); - } - } - return UnknownCustomSetupBase.DeserializeUnknownCustomSetupBase(element); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/CustomSetupBase.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/CustomSetupBase.cs deleted file mode 100644 index b1d028a9..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/CustomSetupBase.cs +++ /dev/null @@ -1,29 +0,0 @@ -// - -#nullable disable - -namespace AzureDataFactory.TestingFramework.Models -{ - /// - /// The base definition of the custom setup. - /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. - /// The available derived classes include , , and . - /// - public abstract partial class CustomSetupBase - { - /// Initializes a new instance of CustomSetupBase. - protected CustomSetupBase() - { - } - - /// Initializes a new instance of CustomSetupBase. - /// The type of custom setup. - internal CustomSetupBase(string customSetupBaseType) - { - CustomSetupBaseType = customSetupBaseType; - } - - /// The type of custom setup. - internal string CustomSetupBaseType { get; set; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DWCopyCommandDefaultValue.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DWCopyCommandDefaultValue.Serialization.cs deleted file mode 100644 index f314b184..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DWCopyCommandDefaultValue.Serialization.cs +++ /dev/null @@ -1,68 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class DWCopyCommandDefaultValue : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - if (Optional.IsDefined(ColumnName)) - { - writer.WritePropertyName("columnName"u8); -#if NET6_0_OR_GREATER - writer.WriteRawValue(ColumnName); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(ColumnName.ToString()).RootElement); -#endif - } - if (Optional.IsDefined(DefaultValue)) - { - writer.WritePropertyName("defaultValue"u8); -#if NET6_0_OR_GREATER - writer.WriteRawValue(DefaultValue); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(DefaultValue.ToString()).RootElement); -#endif - } - writer.WriteEndObject(); - } - - internal static DWCopyCommandDefaultValue DeserializeDWCopyCommandDefaultValue(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - Optional columnName = default; - Optional defaultValue = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("columnName"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - columnName = BinaryData.FromString(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("defaultValue"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - defaultValue = BinaryData.FromString(property.Value.GetRawText()); - continue; - } - } - return new DWCopyCommandDefaultValue(columnName.Value, defaultValue.Value); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DWCopyCommandDefaultValue.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DWCopyCommandDefaultValue.cs deleted file mode 100644 index 3834ae9d..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DWCopyCommandDefaultValue.cs +++ /dev/null @@ -1,87 +0,0 @@ -// - -#nullable disable - -namespace AzureDataFactory.TestingFramework.Models -{ - /// Default value. - public partial class DWCopyCommandDefaultValue - { - /// Initializes a new instance of DWCopyCommandDefaultValue. - public DWCopyCommandDefaultValue() - { - } - - /// Initializes a new instance of DWCopyCommandDefaultValue. - /// Column name. Type: object (or Expression with resultType string). - /// The default value of the column. Type: object (or Expression with resultType string). - internal DWCopyCommandDefaultValue(BinaryData columnName, BinaryData defaultValue) - { - ColumnName = columnName; - DefaultValue = defaultValue; - } - - /// - /// Column name. Type: object (or Expression with resultType string). - /// - /// To assign an object to this property use . - /// - /// - /// To assign an already formated json string to this property use . - /// - /// - /// Examples: - /// - /// - /// BinaryData.FromObjectAsJson("foo") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromString("\"foo\"") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromObjectAsJson(new { key = "value" }) - /// Creates a payload of { "key": "value" }. - /// - /// - /// BinaryData.FromString("{\"key\": \"value\"}") - /// Creates a payload of { "key": "value" }. - /// - /// - /// - /// - public BinaryData ColumnName { get; set; } - /// - /// The default value of the column. Type: object (or Expression with resultType string). - /// - /// To assign an object to this property use . - /// - /// - /// To assign an already formated json string to this property use . - /// - /// - /// Examples: - /// - /// - /// BinaryData.FromObjectAsJson("foo") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromString("\"foo\"") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromObjectAsJson(new { key = "value" }) - /// Creates a payload of { "key": "value" }. - /// - /// - /// BinaryData.FromString("{\"key\": \"value\"}") - /// Creates a payload of { "key": "value" }. - /// - /// - /// - /// - public BinaryData DefaultValue { get; set; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DWCopyCommandSettings.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DWCopyCommandSettings.Serialization.cs deleted file mode 100644 index 1ffb194a..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DWCopyCommandSettings.Serialization.cs +++ /dev/null @@ -1,81 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class DWCopyCommandSettings : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - if (Optional.IsCollectionDefined(DefaultValues)) - { - writer.WritePropertyName("defaultValues"u8); - writer.WriteStartArray(); - foreach (var item in DefaultValues) - { - writer.WriteObjectValue(item); - } - writer.WriteEndArray(); - } - if (Optional.IsCollectionDefined(AdditionalOptions)) - { - writer.WritePropertyName("additionalOptions"u8); - writer.WriteStartObject(); - foreach (var item in AdditionalOptions) - { - writer.WritePropertyName(item.Key); - writer.WriteStringValue(item.Value); - } - writer.WriteEndObject(); - } - writer.WriteEndObject(); - } - - internal static DWCopyCommandSettings DeserializeDWCopyCommandSettings(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - Optional> defaultValues = default; - Optional> additionalOptions = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("defaultValues"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - array.Add(DWCopyCommandDefaultValue.DeserializeDWCopyCommandDefaultValue(item)); - } - defaultValues = array; - continue; - } - if (property.NameEquals("additionalOptions"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - Dictionary dictionary = new Dictionary(); - foreach (var property0 in property.Value.EnumerateObject()) - { - dictionary.Add(property0.Name, property0.Value.GetString()); - } - additionalOptions = dictionary; - continue; - } - } - return new DWCopyCommandSettings(Optional.ToList(defaultValues), Optional.ToDictionary(additionalOptions)); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DWCopyCommandSettings.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DWCopyCommandSettings.cs deleted file mode 100644 index 71ec836e..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DWCopyCommandSettings.cs +++ /dev/null @@ -1,33 +0,0 @@ -// - -#nullable disable - -using Azure.Core; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// DW Copy Command settings. - public partial class DWCopyCommandSettings - { - /// Initializes a new instance of DWCopyCommandSettings. - public DWCopyCommandSettings() - { - DefaultValues = new ChangeTrackingList(); - AdditionalOptions = new ChangeTrackingDictionary(); - } - - /// Initializes a new instance of DWCopyCommandSettings. - /// Specifies the default values for each target column in SQL DW. The default values in the property overwrite the DEFAULT constraint set in the DB, and identity column cannot have a default value. Type: array of objects (or Expression with resultType array of objects). - /// Additional options directly passed to SQL DW in Copy Command. Type: key value pairs (value should be string type) (or Expression with resultType object). Example: "additionalOptions": { "MAXERRORS": "1000", "DATEFORMAT": "'ymd'" }. - internal DWCopyCommandSettings(IList defaultValues, IDictionary additionalOptions) - { - DefaultValues = defaultValues; - AdditionalOptions = additionalOptions; - } - - /// Specifies the default values for each target column in SQL DW. The default values in the property overwrite the DEFAULT constraint set in the DB, and identity column cannot have a default value. Type: array of objects (or Expression with resultType array of objects). - public IList DefaultValues { get; } - /// Additional options directly passed to SQL DW in Copy Command. Type: key value pairs (value should be string type) (or Expression with resultType object). Example: "additionalOptions": { "MAXERRORS": "1000", "DATEFORMAT": "'ymd'" }. - public IDictionary AdditionalOptions { get; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DataFactoryBlobEventType.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DataFactoryBlobEventType.cs deleted file mode 100644 index 71b20904..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DataFactoryBlobEventType.cs +++ /dev/null @@ -1,47 +0,0 @@ -// - -#nullable disable - -using System.ComponentModel; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// The DataFactoryBlobEventType. - public readonly partial struct DataFactoryBlobEventType : IEquatable - { - private readonly string _value; - - /// Initializes a new instance of . - /// is null. - public DataFactoryBlobEventType(string value) - { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } - - private const string MicrosoftStorageBlobCreatedValue = "Microsoft.Storage.BlobCreated"; - private const string MicrosoftStorageBlobDeletedValue = "Microsoft.Storage.BlobDeleted"; - - /// Microsoft.Storage.BlobCreated. - public static DataFactoryBlobEventType MicrosoftStorageBlobCreated { get; } = new DataFactoryBlobEventType(MicrosoftStorageBlobCreatedValue); - /// Microsoft.Storage.BlobDeleted. - public static DataFactoryBlobEventType MicrosoftStorageBlobDeleted { get; } = new DataFactoryBlobEventType(MicrosoftStorageBlobDeletedValue); - /// Determines if two values are the same. - public static bool operator ==(DataFactoryBlobEventType left, DataFactoryBlobEventType right) => left.Equals(right); - /// Determines if two values are not the same. - public static bool operator !=(DataFactoryBlobEventType left, DataFactoryBlobEventType right) => !left.Equals(right); - /// Converts a string to a . - public static implicit operator DataFactoryBlobEventType(string value) => new DataFactoryBlobEventType(value); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override bool Equals(object obj) => obj is DataFactoryBlobEventType other && Equals(other); - /// - public bool Equals(DataFactoryBlobEventType other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override int GetHashCode() => _value?.GetHashCode() ?? 0; - /// - public override string ToString() => _value; - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DataFactoryBlobEventsTrigger.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DataFactoryBlobEventsTrigger.Serialization.cs deleted file mode 100644 index 59b7c2f7..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DataFactoryBlobEventsTrigger.Serialization.cs +++ /dev/null @@ -1,217 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class DataFactoryBlobEventsTrigger : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - if (Optional.IsCollectionDefined(Pipelines)) - { - writer.WritePropertyName("pipelines"u8); - writer.WriteStartArray(); - foreach (var item in Pipelines) - { - writer.WriteObjectValue(item); - } - writer.WriteEndArray(); - } - writer.WritePropertyName("type"u8); - writer.WriteStringValue(TriggerType); - if (Optional.IsDefined(Description)) - { - writer.WritePropertyName("description"u8); - writer.WriteStringValue(Description); - } - if (Optional.IsCollectionDefined(Annotations)) - { - writer.WritePropertyName("annotations"u8); - writer.WriteStartArray(); - foreach (var item in Annotations) - { - if (item == null) - { - writer.WriteNullValue(); - continue; - } -#if NET6_0_OR_GREATER - writer.WriteRawValue(item); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.ToString()).RootElement); -#endif - } - writer.WriteEndArray(); - } - writer.WritePropertyName("typeProperties"u8); - writer.WriteStartObject(); - if (Optional.IsDefined(BlobPathBeginsWith)) - { - writer.WritePropertyName("blobPathBeginsWith"u8); - writer.WriteStringValue(BlobPathBeginsWith); - } - if (Optional.IsDefined(BlobPathEndsWith)) - { - writer.WritePropertyName("blobPathEndsWith"u8); - writer.WriteStringValue(BlobPathEndsWith); - } - if (Optional.IsDefined(IgnoreEmptyBlobs)) - { - writer.WritePropertyName("ignoreEmptyBlobs"u8); - writer.WriteBooleanValue(IgnoreEmptyBlobs.Value); - } - writer.WritePropertyName("events"u8); - writer.WriteStartArray(); - foreach (var item in Events) - { - writer.WriteStringValue(item.ToString()); - } - writer.WriteEndArray(); - writer.WritePropertyName("scope"u8); - writer.WriteStringValue(Scope); - writer.WriteEndObject(); - foreach (var item in AdditionalProperties) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.Value.ToString()).RootElement); -#endif - } - writer.WriteEndObject(); - } - - internal static DataFactoryBlobEventsTrigger DeserializeDataFactoryBlobEventsTrigger(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - Optional> pipelines = default; - string type = default; - Optional description = default; - Optional runtimeState = default; - Optional> annotations = default; - Optional blobPathBeginsWith = default; - Optional blobPathEndsWith = default; - Optional ignoreEmptyBlobs = default; - IList events = default; - string scope = default; - IDictionary> additionalProperties = default; - Dictionary> additionalPropertiesDictionary = new Dictionary>(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("pipelines"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - array.Add(TriggerPipelineReference.DeserializeTriggerPipelineReference(item)); - } - pipelines = array; - continue; - } - if (property.NameEquals("type"u8)) - { - type = property.Value.GetString(); - continue; - } - if (property.NameEquals("description"u8)) - { - description = property.Value.GetString(); - continue; - } - if (property.NameEquals("runtimeState"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - runtimeState = new DataFactoryTriggerRuntimeState(property.Value.GetString()); - continue; - } - if (property.NameEquals("annotations"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - if (item.ValueKind == JsonValueKind.Null) - { - array.Add(null); - } - else - { - array.Add(BinaryData.FromString(item.GetRawText())); - } - } - annotations = array; - continue; - } - if (property.NameEquals("typeProperties"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - foreach (var property0 in property.Value.EnumerateObject()) - { - if (property0.NameEquals("blobPathBeginsWith"u8)) - { - blobPathBeginsWith = property0.Value.GetString(); - continue; - } - if (property0.NameEquals("blobPathEndsWith"u8)) - { - blobPathEndsWith = property0.Value.GetString(); - continue; - } - if (property0.NameEquals("ignoreEmptyBlobs"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - ignoreEmptyBlobs = property0.Value.GetBoolean(); - continue; - } - if (property0.NameEquals("events"u8)) - { - List array = new List(); - foreach (var item in property0.Value.EnumerateArray()) - { - array.Add(new DataFactoryBlobEventType(item.GetString())); - } - events = array; - continue; - } - if (property0.NameEquals("scope"u8)) - { - scope = property0.Value.GetString(); - continue; - } - } - continue; - } - additionalPropertiesDictionary.Add(property.Name, JsonSerializer.Deserialize>(property.Value.GetRawText())); - } - additionalProperties = additionalPropertiesDictionary; - return new DataFactoryBlobEventsTrigger(type, description.Value, Optional.ToNullable(runtimeState), Optional.ToList(annotations), additionalProperties, Optional.ToList(pipelines), blobPathBeginsWith.Value, blobPathEndsWith.Value, Optional.ToNullable(ignoreEmptyBlobs), events, scope); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DataFactoryBlobEventsTrigger.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DataFactoryBlobEventsTrigger.cs deleted file mode 100644 index 114dbd72..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DataFactoryBlobEventsTrigger.cs +++ /dev/null @@ -1,60 +0,0 @@ -// - -#nullable disable - -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// Trigger that runs every time a Blob event occurs. - public partial class DataFactoryBlobEventsTrigger : MultiplePipelineTrigger - { - /// Initializes a new instance of DataFactoryBlobEventsTrigger. - /// The type of events that cause this trigger to fire. - /// The ARM resource ID of the Storage Account. - /// or is null. - public DataFactoryBlobEventsTrigger(IEnumerable events, string scope) - { - Argument.AssertNotNull(events, nameof(events)); - Argument.AssertNotNull(scope, nameof(scope)); - - Events = events.ToList(); - Scope = scope; - TriggerType = "BlobEventsTrigger"; - } - - /// Initializes a new instance of DataFactoryBlobEventsTrigger. - /// Trigger type. - /// Trigger description. - /// Indicates if trigger is running or not. Updated when Start/Stop APIs are called on the Trigger. - /// List of tags that can be used for describing the trigger. - /// Additional Properties. - /// Pipelines that need to be started. - /// The blob path must begin with the pattern provided for trigger to fire. For example, '/records/blobs/december/' will only fire the trigger for blobs in the december folder under the records container. At least one of these must be provided: blobPathBeginsWith, blobPathEndsWith. - /// The blob path must end with the pattern provided for trigger to fire. For example, 'december/boxes.csv' will only fire the trigger for blobs named boxes in a december folder. At least one of these must be provided: blobPathBeginsWith, blobPathEndsWith. - /// If set to true, blobs with zero bytes will be ignored. - /// The type of events that cause this trigger to fire. - /// The ARM resource ID of the Storage Account. - internal DataFactoryBlobEventsTrigger(string triggerType, string description, DataFactoryTriggerRuntimeState? runtimeState, IList annotations, IDictionary> additionalProperties, IList pipelines, string blobPathBeginsWith, string blobPathEndsWith, bool? ignoreEmptyBlobs, IList events, string scope) : base(triggerType, description, runtimeState, annotations, additionalProperties, pipelines) - { - BlobPathBeginsWith = blobPathBeginsWith; - BlobPathEndsWith = blobPathEndsWith; - IgnoreEmptyBlobs = ignoreEmptyBlobs; - Events = events; - Scope = scope; - TriggerType = triggerType ?? "BlobEventsTrigger"; - } - - /// The blob path must begin with the pattern provided for trigger to fire. For example, '/records/blobs/december/' will only fire the trigger for blobs in the december folder under the records container. At least one of these must be provided: blobPathBeginsWith, blobPathEndsWith. - public string BlobPathBeginsWith { get; set; } - /// The blob path must end with the pattern provided for trigger to fire. For example, 'december/boxes.csv' will only fire the trigger for blobs named boxes in a december folder. At least one of these must be provided: blobPathBeginsWith, blobPathEndsWith. - public string BlobPathEndsWith { get; set; } - /// If set to true, blobs with zero bytes will be ignored. - public bool? IgnoreEmptyBlobs { get; set; } - /// The type of events that cause this trigger to fire. - public IList Events { get; } - /// The ARM resource ID of the Storage Account. - public string Scope { get; set; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DataFactoryBlobSink.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DataFactoryBlobSink.Serialization.cs deleted file mode 100644 index 0710e351..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DataFactoryBlobSink.Serialization.cs +++ /dev/null @@ -1,231 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class DataFactoryBlobSink : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - if (Optional.IsDefined(BlobWriterOverwriteFiles)) - { - writer.WritePropertyName("blobWriterOverwriteFiles"u8); - JsonSerializer.Serialize(writer, BlobWriterOverwriteFiles); - } - if (Optional.IsDefined(BlobWriterDateTimeFormat)) - { - writer.WritePropertyName("blobWriterDateTimeFormat"u8); - JsonSerializer.Serialize(writer, BlobWriterDateTimeFormat); - } - if (Optional.IsDefined(BlobWriterAddHeader)) - { - writer.WritePropertyName("blobWriterAddHeader"u8); - JsonSerializer.Serialize(writer, BlobWriterAddHeader); - } - if (Optional.IsDefined(CopyBehavior)) - { - writer.WritePropertyName("copyBehavior"u8); -#if NET6_0_OR_GREATER - writer.WriteRawValue(CopyBehavior); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(CopyBehavior.ToString()).RootElement); -#endif - } - if (Optional.IsCollectionDefined(Metadata)) - { - writer.WritePropertyName("metadata"u8); - writer.WriteStartArray(); - foreach (var item in Metadata) - { - writer.WriteObjectValue(item); - } - writer.WriteEndArray(); - } - writer.WritePropertyName("type"u8); - writer.WriteStringValue(CopySinkType); - if (Optional.IsDefined(WriteBatchSize)) - { - writer.WritePropertyName("writeBatchSize"u8); - JsonSerializer.Serialize(writer, WriteBatchSize); - } - if (Optional.IsDefined(WriteBatchTimeout)) - { - writer.WritePropertyName("writeBatchTimeout"u8); - JsonSerializer.Serialize(writer, WriteBatchTimeout); - } - if (Optional.IsDefined(SinkRetryCount)) - { - writer.WritePropertyName("sinkRetryCount"u8); - JsonSerializer.Serialize(writer, SinkRetryCount); - } - if (Optional.IsDefined(SinkRetryWait)) - { - writer.WritePropertyName("sinkRetryWait"u8); - JsonSerializer.Serialize(writer, SinkRetryWait); - } - if (Optional.IsDefined(MaxConcurrentConnections)) - { - writer.WritePropertyName("maxConcurrentConnections"u8); - JsonSerializer.Serialize(writer, MaxConcurrentConnections); - } - if (Optional.IsDefined(DisableMetricsCollection)) - { - writer.WritePropertyName("disableMetricsCollection"u8); - JsonSerializer.Serialize(writer, DisableMetricsCollection); - } - foreach (var item in AdditionalProperties) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.Value.ToString()).RootElement); -#endif - } - writer.WriteEndObject(); - } - - internal static DataFactoryBlobSink DeserializeDataFactoryBlobSink(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - Optional> blobWriterOverwriteFiles = default; - Optional> blobWriterDateTimeFormat = default; - Optional> blobWriterAddHeader = default; - Optional copyBehavior = default; - Optional> metadata = default; - string type = default; - Optional> writeBatchSize = default; - Optional> writeBatchTimeout = default; - Optional> sinkRetryCount = default; - Optional> sinkRetryWait = default; - Optional> maxConcurrentConnections = default; - Optional> disableMetricsCollection = default; - IDictionary> additionalProperties = default; - Dictionary> additionalPropertiesDictionary = new Dictionary>(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("blobWriterOverwriteFiles"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - blobWriterOverwriteFiles = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("blobWriterDateTimeFormat"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - blobWriterDateTimeFormat = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("blobWriterAddHeader"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - blobWriterAddHeader = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("copyBehavior"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - copyBehavior = BinaryData.FromString(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("metadata"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - array.Add(DataFactoryMetadataItemInfo.DeserializeDataFactoryMetadataItemInfo(item)); - } - metadata = array; - continue; - } - if (property.NameEquals("type"u8)) - { - type = property.Value.GetString(); - continue; - } - if (property.NameEquals("writeBatchSize"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - writeBatchSize = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("writeBatchTimeout"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - writeBatchTimeout = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("sinkRetryCount"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - sinkRetryCount = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("sinkRetryWait"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - sinkRetryWait = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("maxConcurrentConnections"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - maxConcurrentConnections = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("disableMetricsCollection"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - disableMetricsCollection = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - additionalPropertiesDictionary.Add(property.Name, JsonSerializer.Deserialize>(property.Value.GetRawText())); - } - additionalProperties = additionalPropertiesDictionary; - return new DataFactoryBlobSink(type, writeBatchSize.Value, writeBatchTimeout.Value, sinkRetryCount.Value, sinkRetryWait.Value, maxConcurrentConnections.Value, disableMetricsCollection.Value, additionalProperties, blobWriterOverwriteFiles.Value, blobWriterDateTimeFormat.Value, blobWriterAddHeader.Value, copyBehavior.Value, Optional.ToList(metadata)); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DataFactoryBlobSink.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DataFactoryBlobSink.cs deleted file mode 100644 index 69b836ba..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DataFactoryBlobSink.cs +++ /dev/null @@ -1,84 +0,0 @@ -// - -#nullable disable - -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// A copy activity Azure Blob sink. - public partial class DataFactoryBlobSink : CopySink - { - /// Initializes a new instance of DataFactoryBlobSink. - public DataFactoryBlobSink() - { - Metadata = new ChangeTrackingList(); - CopySinkType = "BlobSink"; - } - - /// Initializes a new instance of DataFactoryBlobSink. - /// Copy sink type. - /// Write batch size. Type: integer (or Expression with resultType integer), minimum: 0. - /// Write batch timeout. Type: string (or Expression with resultType string), pattern: ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). - /// Sink retry count. Type: integer (or Expression with resultType integer). - /// Sink retry wait. Type: string (or Expression with resultType string), pattern: ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). - /// The maximum concurrent connection count for the sink data store. Type: integer (or Expression with resultType integer). - /// If true, disable data store metrics collection. Default is false. Type: boolean (or Expression with resultType boolean). - /// Additional Properties. - /// Blob writer overwrite files. Type: boolean (or Expression with resultType boolean). - /// Blob writer date time format. Type: string (or Expression with resultType string). - /// Blob writer add header. Type: boolean (or Expression with resultType boolean). - /// The type of copy behavior for copy sink. - /// Specify the custom metadata to be added to sink data. Type: array of objects (or Expression with resultType array of objects). - internal DataFactoryBlobSink(string copySinkType, DataFactoryElement writeBatchSize, DataFactoryElement writeBatchTimeout, DataFactoryElement sinkRetryCount, DataFactoryElement sinkRetryWait, DataFactoryElement maxConcurrentConnections, DataFactoryElement disableMetricsCollection, IDictionary> additionalProperties, DataFactoryElement blobWriterOverwriteFiles, DataFactoryElement blobWriterDateTimeFormat, DataFactoryElement blobWriterAddHeader, BinaryData copyBehavior, IList metadata) : base(copySinkType, writeBatchSize, writeBatchTimeout, sinkRetryCount, sinkRetryWait, maxConcurrentConnections, disableMetricsCollection, additionalProperties) - { - BlobWriterOverwriteFiles = blobWriterOverwriteFiles; - BlobWriterDateTimeFormat = blobWriterDateTimeFormat; - BlobWriterAddHeader = blobWriterAddHeader; - CopyBehavior = copyBehavior; - Metadata = metadata; - CopySinkType = copySinkType ?? "BlobSink"; - } - - /// Blob writer overwrite files. Type: boolean (or Expression with resultType boolean). - public DataFactoryElement BlobWriterOverwriteFiles { get; set; } - /// Blob writer date time format. Type: string (or Expression with resultType string). - public DataFactoryElement BlobWriterDateTimeFormat { get; set; } - /// Blob writer add header. Type: boolean (or Expression with resultType boolean). - public DataFactoryElement BlobWriterAddHeader { get; set; } - /// - /// The type of copy behavior for copy sink. - /// - /// To assign an object to this property use . - /// - /// - /// To assign an already formated json string to this property use . - /// - /// - /// Examples: - /// - /// - /// BinaryData.FromObjectAsJson("foo") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromString("\"foo\"") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromObjectAsJson(new { key = "value" }) - /// Creates a payload of { "key": "value" }. - /// - /// - /// BinaryData.FromString("{\"key\": \"value\"}") - /// Creates a payload of { "key": "value" }. - /// - /// - /// - /// - public BinaryData CopyBehavior { get; set; } - /// Specify the custom metadata to be added to sink data. Type: array of objects (or Expression with resultType array of objects). - public IList Metadata { get; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DataFactoryBlobSource.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DataFactoryBlobSource.Serialization.cs deleted file mode 100644 index d92a846e..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DataFactoryBlobSource.Serialization.cs +++ /dev/null @@ -1,157 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class DataFactoryBlobSource : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - if (Optional.IsDefined(TreatEmptyAsNull)) - { - writer.WritePropertyName("treatEmptyAsNull"u8); - JsonSerializer.Serialize(writer, TreatEmptyAsNull); - } - if (Optional.IsDefined(SkipHeaderLineCount)) - { - writer.WritePropertyName("skipHeaderLineCount"u8); - JsonSerializer.Serialize(writer, SkipHeaderLineCount); - } - if (Optional.IsDefined(Recursive)) - { - writer.WritePropertyName("recursive"u8); - JsonSerializer.Serialize(writer, Recursive); - } - writer.WritePropertyName("type"u8); - writer.WriteStringValue(CopySourceType); - if (Optional.IsDefined(SourceRetryCount)) - { - writer.WritePropertyName("sourceRetryCount"u8); - JsonSerializer.Serialize(writer, SourceRetryCount); - } - if (Optional.IsDefined(SourceRetryWait)) - { - writer.WritePropertyName("sourceRetryWait"u8); - JsonSerializer.Serialize(writer, SourceRetryWait); - } - if (Optional.IsDefined(MaxConcurrentConnections)) - { - writer.WritePropertyName("maxConcurrentConnections"u8); - JsonSerializer.Serialize(writer, MaxConcurrentConnections); - } - if (Optional.IsDefined(DisableMetricsCollection)) - { - writer.WritePropertyName("disableMetricsCollection"u8); - JsonSerializer.Serialize(writer, DisableMetricsCollection); - } - foreach (var item in AdditionalProperties) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.Value.ToString()).RootElement); -#endif - } - writer.WriteEndObject(); - } - - internal static DataFactoryBlobSource DeserializeDataFactoryBlobSource(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - Optional> treatEmptyAsNull = default; - Optional> skipHeaderLineCount = default; - Optional> recursive = default; - string type = default; - Optional> sourceRetryCount = default; - Optional> sourceRetryWait = default; - Optional> maxConcurrentConnections = default; - Optional> disableMetricsCollection = default; - IDictionary> additionalProperties = default; - Dictionary> additionalPropertiesDictionary = new Dictionary>(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("treatEmptyAsNull"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - treatEmptyAsNull = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("skipHeaderLineCount"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - skipHeaderLineCount = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("recursive"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - recursive = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("type"u8)) - { - type = property.Value.GetString(); - continue; - } - if (property.NameEquals("sourceRetryCount"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - sourceRetryCount = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("sourceRetryWait"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - sourceRetryWait = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("maxConcurrentConnections"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - maxConcurrentConnections = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("disableMetricsCollection"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - disableMetricsCollection = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - additionalPropertiesDictionary.Add(property.Name, JsonSerializer.Deserialize>(property.Value.GetRawText())); - } - additionalProperties = additionalPropertiesDictionary; - return new DataFactoryBlobSource(type, sourceRetryCount.Value, sourceRetryWait.Value, maxConcurrentConnections.Value, disableMetricsCollection.Value, additionalProperties, treatEmptyAsNull.Value, skipHeaderLineCount.Value, recursive.Value); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DataFactoryBlobSource.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DataFactoryBlobSource.cs deleted file mode 100644 index 1b6570a3..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DataFactoryBlobSource.cs +++ /dev/null @@ -1,43 +0,0 @@ -// - -#nullable disable - -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// A copy activity Azure Blob source. - public partial class DataFactoryBlobSource : CopyActivitySource - { - /// Initializes a new instance of DataFactoryBlobSource. - public DataFactoryBlobSource() - { - CopySourceType = "BlobSource"; - } - - /// Initializes a new instance of DataFactoryBlobSource. - /// Copy source type. - /// Source retry count. Type: integer (or Expression with resultType integer). - /// Source retry wait. Type: string (or Expression with resultType string), pattern: ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). - /// The maximum concurrent connection count for the source data store. Type: integer (or Expression with resultType integer). - /// If true, disable data store metrics collection. Default is false. Type: boolean (or Expression with resultType boolean). - /// Additional Properties. - /// Treat empty as null. Type: boolean (or Expression with resultType boolean). - /// Number of header lines to skip from each blob. Type: integer (or Expression with resultType integer). - /// If true, files under the folder path will be read recursively. Default is true. Type: boolean (or Expression with resultType boolean). - internal DataFactoryBlobSource(string copySourceType, DataFactoryElement sourceRetryCount, DataFactoryElement sourceRetryWait, DataFactoryElement maxConcurrentConnections, DataFactoryElement disableMetricsCollection, IDictionary> additionalProperties, DataFactoryElement treatEmptyAsNull, DataFactoryElement skipHeaderLineCount, DataFactoryElement recursive) : base(copySourceType, sourceRetryCount, sourceRetryWait, maxConcurrentConnections, disableMetricsCollection, additionalProperties) - { - TreatEmptyAsNull = treatEmptyAsNull; - SkipHeaderLineCount = skipHeaderLineCount; - Recursive = recursive; - CopySourceType = copySourceType ?? "BlobSource"; - } - - /// Treat empty as null. Type: boolean (or Expression with resultType boolean). - public DataFactoryElement TreatEmptyAsNull { get; set; } - /// Number of header lines to skip from each blob. Type: integer (or Expression with resultType integer). - public DataFactoryElement SkipHeaderLineCount { get; set; } - /// If true, files under the folder path will be read recursively. Default is true. Type: boolean (or Expression with resultType boolean). - public DataFactoryElement Recursive { get; set; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DataFactoryBlobTrigger.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DataFactoryBlobTrigger.Serialization.cs deleted file mode 100644 index 1746a763..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DataFactoryBlobTrigger.Serialization.cs +++ /dev/null @@ -1,177 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class DataFactoryBlobTrigger : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - if (Optional.IsCollectionDefined(Pipelines)) - { - writer.WritePropertyName("pipelines"u8); - writer.WriteStartArray(); - foreach (var item in Pipelines) - { - writer.WriteObjectValue(item); - } - writer.WriteEndArray(); - } - writer.WritePropertyName("type"u8); - writer.WriteStringValue(TriggerType); - if (Optional.IsDefined(Description)) - { - writer.WritePropertyName("description"u8); - writer.WriteStringValue(Description); - } - if (Optional.IsCollectionDefined(Annotations)) - { - writer.WritePropertyName("annotations"u8); - writer.WriteStartArray(); - foreach (var item in Annotations) - { - if (item == null) - { - writer.WriteNullValue(); - continue; - } -#if NET6_0_OR_GREATER - writer.WriteRawValue(item); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.ToString()).RootElement); -#endif - } - writer.WriteEndArray(); - } - writer.WritePropertyName("typeProperties"u8); - writer.WriteStartObject(); - writer.WritePropertyName("folderPath"u8); - writer.WriteStringValue(FolderPath); - writer.WritePropertyName("maxConcurrency"u8); - writer.WriteNumberValue(MaxConcurrency); - writer.WritePropertyName("linkedService"u8); - JsonSerializer.Serialize(writer, LinkedService); writer.WriteEndObject(); - foreach (var item in AdditionalProperties) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.Value.ToString()).RootElement); -#endif - } - writer.WriteEndObject(); - } - - internal static DataFactoryBlobTrigger DeserializeDataFactoryBlobTrigger(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - Optional> pipelines = default; - string type = default; - Optional description = default; - Optional runtimeState = default; - Optional> annotations = default; - string folderPath = default; - int maxConcurrency = default; - DataFactoryLinkedServiceReference linkedService = default; - IDictionary> additionalProperties = default; - Dictionary> additionalPropertiesDictionary = new Dictionary>(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("pipelines"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - array.Add(TriggerPipelineReference.DeserializeTriggerPipelineReference(item)); - } - pipelines = array; - continue; - } - if (property.NameEquals("type"u8)) - { - type = property.Value.GetString(); - continue; - } - if (property.NameEquals("description"u8)) - { - description = property.Value.GetString(); - continue; - } - if (property.NameEquals("runtimeState"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - runtimeState = new DataFactoryTriggerRuntimeState(property.Value.GetString()); - continue; - } - if (property.NameEquals("annotations"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - if (item.ValueKind == JsonValueKind.Null) - { - array.Add(null); - } - else - { - array.Add(BinaryData.FromString(item.GetRawText())); - } - } - annotations = array; - continue; - } - if (property.NameEquals("typeProperties"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - foreach (var property0 in property.Value.EnumerateObject()) - { - if (property0.NameEquals("folderPath"u8)) - { - folderPath = property0.Value.GetString(); - continue; - } - if (property0.NameEquals("maxConcurrency"u8)) - { - maxConcurrency = property0.Value.GetInt32(); - continue; - } - if (property0.NameEquals("linkedService"u8)) - { - linkedService = JsonSerializer.Deserialize(property0.Value.GetRawText()); - continue; - } - } - continue; - } - additionalPropertiesDictionary.Add(property.Name, JsonSerializer.Deserialize>(property.Value.GetRawText())); - } - additionalProperties = additionalPropertiesDictionary; - return new DataFactoryBlobTrigger(type, description.Value, Optional.ToNullable(runtimeState), Optional.ToList(annotations), additionalProperties, Optional.ToList(pipelines), folderPath, maxConcurrency, linkedService); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DataFactoryBlobTrigger.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DataFactoryBlobTrigger.cs deleted file mode 100644 index a5bbbb35..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DataFactoryBlobTrigger.cs +++ /dev/null @@ -1,54 +0,0 @@ -// - -#nullable disable - -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// Trigger that runs every time the selected Blob container changes. - public partial class DataFactoryBlobTrigger : MultiplePipelineTrigger - { - /// Initializes a new instance of DataFactoryBlobTrigger. - /// The path of the container/folder that will trigger the pipeline. - /// The max number of parallel files to handle when it is triggered. - /// The Azure Storage linked service reference. - /// or is null. - public DataFactoryBlobTrigger(string folderPath, int maxConcurrency, DataFactoryLinkedServiceReference linkedService) - { - Argument.AssertNotNull(folderPath, nameof(folderPath)); - Argument.AssertNotNull(linkedService, nameof(linkedService)); - - FolderPath = folderPath; - MaxConcurrency = maxConcurrency; - LinkedService = linkedService; - TriggerType = "BlobTrigger"; - } - - /// Initializes a new instance of DataFactoryBlobTrigger. - /// Trigger type. - /// Trigger description. - /// Indicates if trigger is running or not. Updated when Start/Stop APIs are called on the Trigger. - /// List of tags that can be used for describing the trigger. - /// Additional Properties. - /// Pipelines that need to be started. - /// The path of the container/folder that will trigger the pipeline. - /// The max number of parallel files to handle when it is triggered. - /// The Azure Storage linked service reference. - internal DataFactoryBlobTrigger(string triggerType, string description, DataFactoryTriggerRuntimeState? runtimeState, IList annotations, IDictionary> additionalProperties, IList pipelines, string folderPath, int maxConcurrency, DataFactoryLinkedServiceReference linkedService) : base(triggerType, description, runtimeState, annotations, additionalProperties, pipelines) - { - FolderPath = folderPath; - MaxConcurrency = maxConcurrency; - LinkedService = linkedService; - TriggerType = triggerType ?? "BlobTrigger"; - } - - /// The path of the container/folder that will trigger the pipeline. - public string FolderPath { get; set; } - /// The max number of parallel files to handle when it is triggered. - public int MaxConcurrency { get; set; } - /// The Azure Storage linked service reference. - public DataFactoryLinkedServiceReference LinkedService { get; set; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DataFactoryChangeDataCaptureData.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DataFactoryChangeDataCaptureData.Serialization.cs deleted file mode 100644 index bf0f56cc..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DataFactoryChangeDataCaptureData.Serialization.cs +++ /dev/null @@ -1,195 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; -using Azure.Core.Expressions.DataFactory; -using AzureDataFactory.TestingFramework.Models; -using Azure.ResourceManager.Models; - -namespace Azure.ResourceManager.DataFactory -{ - public partial class DataFactoryChangeDataCaptureData : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - writer.WritePropertyName("properties"u8); - writer.WriteStartObject(); - if (Optional.IsDefined(Folder)) - { - writer.WritePropertyName("folder"u8); - writer.WriteObjectValue(Folder); - } - if (Optional.IsDefined(Description)) - { - writer.WritePropertyName("description"u8); - writer.WriteStringValue(Description); - } - writer.WritePropertyName("sourceConnectionsInfo"u8); - writer.WriteStartArray(); - foreach (var item in SourceConnectionsInfo) - { - writer.WriteObjectValue(item); - } - writer.WriteEndArray(); - writer.WritePropertyName("targetConnectionsInfo"u8); - writer.WriteStartArray(); - foreach (var item in TargetConnectionsInfo) - { - writer.WriteObjectValue(item); - } - writer.WriteEndArray(); - writer.WritePropertyName("policy"u8); - writer.WriteObjectValue(Policy); - if (Optional.IsDefined(AllowVnetOverride)) - { - writer.WritePropertyName("allowVNetOverride"u8); - writer.WriteBooleanValue(AllowVnetOverride.Value); - } - if (Optional.IsDefined(Status)) - { - writer.WritePropertyName("status"u8); - writer.WriteStringValue(Status); - } - writer.WriteEndObject(); - foreach (var item in AdditionalProperties) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.Value.ToString()).RootElement); -#endif - } - writer.WriteEndObject(); - } - - internal static DataFactoryChangeDataCaptureData DeserializeDataFactoryChangeDataCaptureData(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - Optional etag = default; - ResourceIdentifier id = default; - string name = default; - ResourceType type = default; - Optional systemData = default; - Optional folder = default; - Optional description = default; - IList sourceConnectionsInfo = default; - IList targetConnectionsInfo = default; - MapperPolicy policy = default; - Optional allowVnetOverride = default; - Optional status = default; - IDictionary> additionalProperties = default; - Dictionary> additionalPropertiesDictionary = new Dictionary>(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("etag"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - etag = new ETag(property.Value.GetString()); - continue; - } - if (property.NameEquals("id"u8)) - { - id = new ResourceIdentifier(property.Value.GetString()); - continue; - } - if (property.NameEquals("name"u8)) - { - name = property.Value.GetString(); - continue; - } - if (property.NameEquals("type"u8)) - { - type = new ResourceType(property.Value.GetString()); - continue; - } - if (property.NameEquals("systemData"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - systemData = JsonSerializer.Deserialize(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("properties"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - foreach (var property0 in property.Value.EnumerateObject()) - { - if (property0.NameEquals("folder"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - folder = ChangeDataCaptureFolder.DeserializeChangeDataCaptureFolder(property0.Value); - continue; - } - if (property0.NameEquals("description"u8)) - { - description = property0.Value.GetString(); - continue; - } - if (property0.NameEquals("sourceConnectionsInfo"u8)) - { - List array = new List(); - foreach (var item in property0.Value.EnumerateArray()) - { - array.Add(MapperSourceConnectionsInfo.DeserializeMapperSourceConnectionsInfo(item)); - } - sourceConnectionsInfo = array; - continue; - } - if (property0.NameEquals("targetConnectionsInfo"u8)) - { - List array = new List(); - foreach (var item in property0.Value.EnumerateArray()) - { - array.Add(MapperTargetConnectionsInfo.DeserializeMapperTargetConnectionsInfo(item)); - } - targetConnectionsInfo = array; - continue; - } - if (property0.NameEquals("policy"u8)) - { - policy = MapperPolicy.DeserializeMapperPolicy(property0.Value); - continue; - } - if (property0.NameEquals("allowVNetOverride"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - allowVnetOverride = property0.Value.GetBoolean(); - continue; - } - if (property0.NameEquals("status"u8)) - { - status = property0.Value.GetString(); - continue; - } - } - continue; - } - additionalPropertiesDictionary.Add(property.Name, JsonSerializer.Deserialize>(property.Value.GetRawText())); - } - additionalProperties = additionalPropertiesDictionary; - return new DataFactoryChangeDataCaptureData(id, name, type, systemData.Value, folder.Value, description.Value, sourceConnectionsInfo, targetConnectionsInfo, policy, Optional.ToNullable(allowVnetOverride), status.Value, Optional.ToNullable(etag), additionalProperties); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DataFactoryCmkIdentity.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DataFactoryCmkIdentity.Serialization.cs deleted file mode 100644 index 9aa1485c..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DataFactoryCmkIdentity.Serialization.cs +++ /dev/null @@ -1,41 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; - -namespace AzureDataFactory.TestingFramework.Models -{ - internal partial class DataFactoryCmkIdentity : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - if (Optional.IsDefined(UserAssignedIdentity)) - { - writer.WritePropertyName("userAssignedIdentity"u8); - writer.WriteStringValue(UserAssignedIdentity); - } - writer.WriteEndObject(); - } - - internal static DataFactoryCmkIdentity DeserializeDataFactoryCmkIdentity(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - Optional userAssignedIdentity = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("userAssignedIdentity"u8)) - { - userAssignedIdentity = property.Value.GetString(); - continue; - } - } - return new DataFactoryCmkIdentity(userAssignedIdentity.Value); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DataFactoryCmkIdentity.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DataFactoryCmkIdentity.cs deleted file mode 100644 index 8723ac6c..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DataFactoryCmkIdentity.cs +++ /dev/null @@ -1,25 +0,0 @@ -// - -#nullable disable - -namespace AzureDataFactory.TestingFramework.Models -{ - /// Managed Identity used for CMK. - internal partial class DataFactoryCmkIdentity - { - /// Initializes a new instance of DataFactoryCmkIdentity. - public DataFactoryCmkIdentity() - { - } - - /// Initializes a new instance of DataFactoryCmkIdentity. - /// The resource id of the user assigned identity to authenticate to customer's key vault. - internal DataFactoryCmkIdentity(string userAssignedIdentity) - { - UserAssignedIdentity = userAssignedIdentity; - } - - /// The resource id of the user assigned identity to authenticate to customer's key vault. - public string UserAssignedIdentity { get; set; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DataFactoryCredential.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DataFactoryCredential.Serialization.cs deleted file mode 100644 index 819d3028..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DataFactoryCredential.Serialization.cs +++ /dev/null @@ -1,70 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class DataFactoryCredential : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - writer.WritePropertyName("type"u8); - writer.WriteStringValue(CredentialType); - if (Optional.IsDefined(Description)) - { - writer.WritePropertyName("description"u8); - writer.WriteStringValue(Description); - } - if (Optional.IsCollectionDefined(Annotations)) - { - writer.WritePropertyName("annotations"u8); - writer.WriteStartArray(); - foreach (var item in Annotations) - { - if (item == null) - { - writer.WriteNullValue(); - continue; - } -#if NET6_0_OR_GREATER - writer.WriteRawValue(item); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.ToString()).RootElement); -#endif - } - writer.WriteEndArray(); - } - foreach (var item in AdditionalProperties) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.Value.ToString()).RootElement); -#endif - } - writer.WriteEndObject(); - } - - internal static DataFactoryCredential DeserializeDataFactoryCredential(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - if (element.TryGetProperty("type", out JsonElement discriminator)) - { - switch (discriminator.GetString()) - { - case "ServicePrincipal": return ServicePrincipalCredential.DeserializeServicePrincipalCredential(element); - case "ManagedIdentity": return DataFactoryManagedIdentityCredentialProperties.DeserializeDataFactoryManagedIdentityCredentialProperties(element); - } - } - return UnknownCredential.DeserializeUnknownCredential(element); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DataFactoryCredential.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DataFactoryCredential.cs deleted file mode 100644 index ac5e3705..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DataFactoryCredential.cs +++ /dev/null @@ -1,104 +0,0 @@ -// - -#nullable disable - -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// - /// The Azure Data Factory nested object which contains the information and credential which can be used to connect with related store or compute resource. - /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. - /// The available derived classes include and . - /// - public partial class DataFactoryCredential - { - /// Initializes a new instance of DataFactoryCredential. - public DataFactoryCredential() - { - Annotations = new ChangeTrackingList(); - AdditionalProperties = new ChangeTrackingDictionary>(); - } - - /// Initializes a new instance of DataFactoryCredential. - /// Type of credential. - /// Credential description. - /// List of tags that can be used for describing the Credential. - /// Additional Properties. - internal DataFactoryCredential(string credentialType, string description, IList annotations, IDictionary> additionalProperties) - { - CredentialType = credentialType; - Description = description; - Annotations = annotations; - AdditionalProperties = additionalProperties; - } - - /// Type of credential. - internal string CredentialType { get; set; } - /// Credential description. - public string Description { get; set; } - /// - /// List of tags that can be used for describing the Credential. - /// - /// To assign an object to the element of this property use . - /// - /// - /// To assign an already formated json string to this property use . - /// - /// - /// Examples: - /// - /// - /// BinaryData.FromObjectAsJson("foo") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromString("\"foo\"") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromObjectAsJson(new { key = "value" }) - /// Creates a payload of { "key": "value" }. - /// - /// - /// BinaryData.FromString("{\"key\": \"value\"}") - /// Creates a payload of { "key": "value" }. - /// - /// - /// - /// - public IList Annotations { get; } - /// - /// Additional Properties - /// - /// To assign an object to the value of this property use . - /// - /// - /// To assign an already formated json string to this property use . - /// - /// - /// Examples: - /// - /// - /// BinaryData.FromObjectAsJson("foo") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromString("\"foo\"") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromObjectAsJson(new { key = "value" }) - /// Creates a payload of { "key": "value" }. - /// - /// - /// BinaryData.FromString("{\"key\": \"value\"}") - /// Creates a payload of { "key": "value" }. - /// - /// - /// - /// - public IDictionary> AdditionalProperties { get; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DataFactoryCredentialListResult.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DataFactoryCredentialListResult.Serialization.cs deleted file mode 100644 index c3e2b495..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DataFactoryCredentialListResult.Serialization.cs +++ /dev/null @@ -1,42 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; -using Azure.ResourceManager.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - internal partial class DataFactoryCredentialListResult - { - internal static DataFactoryCredentialListResult DeserializeDataFactoryCredentialListResult(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - IReadOnlyList value = default; - Optional nextLink = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("value"u8)) - { - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - array.Add(DataFactoryManagedIdentityCredentialData.DeserializeDataFactoryManagedIdentityCredentialData(item)); - } - value = array; - continue; - } - if (property.NameEquals("nextLink"u8)) - { - nextLink = property.Value.GetString(); - continue; - } - } - return new DataFactoryCredentialListResult(value, nextLink.Value); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DataFactoryCredentialListResult.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DataFactoryCredentialListResult.cs deleted file mode 100644 index 1dbbb0b2..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DataFactoryCredentialListResult.cs +++ /dev/null @@ -1,37 +0,0 @@ -// - -#nullable disable - -using Azure.Core; -using Azure.ResourceManager.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// A list of credential resources. - internal partial class DataFactoryCredentialListResult - { - /// Initializes a new instance of DataFactoryCredentialListResult. - /// List of credentials. - /// is null. - internal DataFactoryCredentialListResult(IEnumerable value) - { - Argument.AssertNotNull(value, nameof(value)); - - Value = value.ToList(); - } - - /// Initializes a new instance of DataFactoryCredentialListResult. - /// List of credentials. - /// The link to the next page of results, if any remaining results exist. - internal DataFactoryCredentialListResult(IReadOnlyList value, string nextLink) - { - Value = value; - NextLink = nextLink; - } - - /// List of credentials. - public IReadOnlyList Value { get; } - /// The link to the next page of results, if any remaining results exist. - public string NextLink { get; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DataFactoryCredentialReference.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DataFactoryCredentialReference.Serialization.cs deleted file mode 100644 index 75c3013c..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DataFactoryCredentialReference.Serialization.cs +++ /dev/null @@ -1,60 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class DataFactoryCredentialReference : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ReferenceType.ToString()); - writer.WritePropertyName("referenceName"u8); - writer.WriteStringValue(ReferenceName); - foreach (var item in AdditionalProperties) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.Value.ToString()).RootElement); -#endif - } - writer.WriteEndObject(); - } - - internal static DataFactoryCredentialReference DeserializeDataFactoryCredentialReference(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - DataFactoryCredentialReferenceType type = default; - string referenceName = default; - IDictionary> additionalProperties = default; - Dictionary> additionalPropertiesDictionary = new Dictionary>(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("type"u8)) - { - type = new DataFactoryCredentialReferenceType(property.Value.GetString()); - continue; - } - if (property.NameEquals("referenceName"u8)) - { - referenceName = property.Value.GetString(); - continue; - } - additionalPropertiesDictionary.Add(property.Name, JsonSerializer.Deserialize>(property.Value.GetRawText())); - } - additionalProperties = additionalPropertiesDictionary; - return new DataFactoryCredentialReference(type, referenceName, additionalProperties); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DataFactoryCredentialReference.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DataFactoryCredentialReference.cs deleted file mode 100644 index 291e7bd4..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DataFactoryCredentialReference.cs +++ /dev/null @@ -1,73 +0,0 @@ -// - -#nullable disable - -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// Credential reference type. - public partial class DataFactoryCredentialReference - { - /// Initializes a new instance of DataFactoryCredentialReference. - /// Credential reference type. - /// Reference credential name. - /// is null. - public DataFactoryCredentialReference(DataFactoryCredentialReferenceType referenceType, string referenceName) - { - Argument.AssertNotNull(referenceName, nameof(referenceName)); - - ReferenceType = referenceType; - ReferenceName = referenceName; - AdditionalProperties = new ChangeTrackingDictionary>(); - } - - /// Initializes a new instance of DataFactoryCredentialReference. - /// Credential reference type. - /// Reference credential name. - /// Additional Properties. - internal DataFactoryCredentialReference(DataFactoryCredentialReferenceType referenceType, string referenceName, IDictionary> additionalProperties) - { - ReferenceType = referenceType; - ReferenceName = referenceName; - AdditionalProperties = additionalProperties; - } - - /// Credential reference type. - public DataFactoryCredentialReferenceType ReferenceType { get; set; } - /// Reference credential name. - public string ReferenceName { get; set; } - /// - /// Additional Properties - /// - /// To assign an object to the value of this property use . - /// - /// - /// To assign an already formated json string to this property use . - /// - /// - /// Examples: - /// - /// - /// BinaryData.FromObjectAsJson("foo") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromString("\"foo\"") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromObjectAsJson(new { key = "value" }) - /// Creates a payload of { "key": "value" }. - /// - /// - /// BinaryData.FromString("{\"key\": \"value\"}") - /// Creates a payload of { "key": "value" }. - /// - /// - /// - /// - public IDictionary> AdditionalProperties { get; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DataFactoryCredentialReferenceType.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DataFactoryCredentialReferenceType.cs deleted file mode 100644 index 9f23b339..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DataFactoryCredentialReferenceType.cs +++ /dev/null @@ -1,44 +0,0 @@ -// - -#nullable disable - -using System.ComponentModel; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// Credential reference type. - public readonly partial struct DataFactoryCredentialReferenceType : IEquatable - { - private readonly string _value; - - /// Initializes a new instance of . - /// is null. - public DataFactoryCredentialReferenceType(string value) - { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } - - private const string CredentialReferenceValue = "CredentialReference"; - - /// CredentialReference. - public static DataFactoryCredentialReferenceType CredentialReference { get; } = new DataFactoryCredentialReferenceType(CredentialReferenceValue); - /// Determines if two values are the same. - public static bool operator ==(DataFactoryCredentialReferenceType left, DataFactoryCredentialReferenceType right) => left.Equals(right); - /// Determines if two values are not the same. - public static bool operator !=(DataFactoryCredentialReferenceType left, DataFactoryCredentialReferenceType right) => !left.Equals(right); - /// Converts a string to a . - public static implicit operator DataFactoryCredentialReferenceType(string value) => new DataFactoryCredentialReferenceType(value); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override bool Equals(object obj) => obj is DataFactoryCredentialReferenceType other && Equals(other); - /// - public bool Equals(DataFactoryCredentialReferenceType other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override int GetHashCode() => _value?.GetHashCode() ?? 0; - /// - public override string ToString() => _value; - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DataFactoryData.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DataFactoryData.Serialization.cs deleted file mode 100644 index e89297fc..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DataFactoryData.Serialization.cs +++ /dev/null @@ -1,258 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; -using Azure.Core.Expressions.DataFactory; -using AzureDataFactory.TestingFramework.Models; -using Azure.ResourceManager.Models; - -namespace Azure.ResourceManager.DataFactory -{ - public partial class DataFactoryData : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - if (Optional.IsDefined(Identity)) - { - writer.WritePropertyName("identity"u8); - var serializeOptions = new JsonSerializerOptions { Converters = { new ManagedServiceIdentityTypeV3Converter() } }; - JsonSerializer.Serialize(writer, Identity, serializeOptions); - } - if (Optional.IsCollectionDefined(Tags)) - { - writer.WritePropertyName("tags"u8); - writer.WriteStartObject(); - foreach (var item in Tags) - { - writer.WritePropertyName(item.Key); - writer.WriteStringValue(item.Value); - } - writer.WriteEndObject(); - } - writer.WritePropertyName("location"u8); - writer.WriteStringValue(Location); - writer.WritePropertyName("properties"u8); - writer.WriteStartObject(); - if (Optional.IsDefined(PurviewConfiguration)) - { - writer.WritePropertyName("purviewConfiguration"u8); - writer.WriteObjectValue(PurviewConfiguration); - } - if (Optional.IsDefined(RepoConfiguration)) - { - writer.WritePropertyName("repoConfiguration"u8); - writer.WriteObjectValue(RepoConfiguration); - } - if (Optional.IsCollectionDefined(GlobalParameters)) - { - writer.WritePropertyName("globalParameters"u8); - writer.WriteStartObject(); - foreach (var item in GlobalParameters) - { - writer.WritePropertyName(item.Key); - writer.WriteObjectValue(item.Value); - } - writer.WriteEndObject(); - } - if (Optional.IsDefined(Encryption)) - { - writer.WritePropertyName("encryption"u8); - writer.WriteObjectValue(Encryption); - } - if (Optional.IsDefined(PublicNetworkAccess)) - { - writer.WritePropertyName("publicNetworkAccess"u8); - writer.WriteStringValue(PublicNetworkAccess.Value.ToString()); - } - writer.WriteEndObject(); - foreach (var item in AdditionalProperties) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.Value.ToString()).RootElement); -#endif - } - writer.WriteEndObject(); - } - - internal static DataFactoryData DeserializeDataFactoryData(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - Optional identity = default; - Optional eTag = default; - Optional> tags = default; - AzureLocation location = default; - ResourceIdentifier id = default; - string name = default; - ResourceType type = default; - Optional systemData = default; - Optional provisioningState = default; - Optional createTime = default; - Optional version = default; - Optional purviewConfiguration = default; - Optional repoConfiguration = default; - Optional> globalParameters = default; - Optional encryption = default; - Optional publicNetworkAccess = default; - IDictionary> additionalProperties = default; - Dictionary> additionalPropertiesDictionary = new Dictionary>(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("identity"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - var serializeOptions = new JsonSerializerOptions { Converters = { new ManagedServiceIdentityTypeV3Converter() } }; - identity = JsonSerializer.Deserialize(property.Value.GetRawText(), serializeOptions); - continue; - } - if (property.NameEquals("eTag"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - eTag = new ETag(property.Value.GetString()); - continue; - } - if (property.NameEquals("tags"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - Dictionary dictionary = new Dictionary(); - foreach (var property0 in property.Value.EnumerateObject()) - { - dictionary.Add(property0.Name, property0.Value.GetString()); - } - tags = dictionary; - continue; - } - if (property.NameEquals("location"u8)) - { - location = new AzureLocation(property.Value.GetString()); - continue; - } - if (property.NameEquals("id"u8)) - { - id = new ResourceIdentifier(property.Value.GetString()); - continue; - } - if (property.NameEquals("name"u8)) - { - name = property.Value.GetString(); - continue; - } - if (property.NameEquals("type"u8)) - { - type = new ResourceType(property.Value.GetString()); - continue; - } - if (property.NameEquals("systemData"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - systemData = JsonSerializer.Deserialize(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("properties"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - foreach (var property0 in property.Value.EnumerateObject()) - { - if (property0.NameEquals("provisioningState"u8)) - { - provisioningState = property0.Value.GetString(); - continue; - } - if (property0.NameEquals("createTime"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - createTime = property0.Value.GetDateTimeOffset("O"); - continue; - } - if (property0.NameEquals("version"u8)) - { - version = property0.Value.GetString(); - continue; - } - if (property0.NameEquals("purviewConfiguration"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - purviewConfiguration = DataFactoryPurviewConfiguration.DeserializeDataFactoryPurviewConfiguration(property0.Value); - continue; - } - if (property0.NameEquals("repoConfiguration"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - repoConfiguration = FactoryRepoConfiguration.DeserializeFactoryRepoConfiguration(property0.Value); - continue; - } - if (property0.NameEquals("globalParameters"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - Dictionary dictionary = new Dictionary(); - foreach (var property1 in property0.Value.EnumerateObject()) - { - dictionary.Add(property1.Name, DataFactoryGlobalParameterProperties.DeserializeDataFactoryGlobalParameterProperties(property1.Value)); - } - globalParameters = dictionary; - continue; - } - if (property0.NameEquals("encryption"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - encryption = DataFactoryEncryptionConfiguration.DeserializeDataFactoryEncryptionConfiguration(property0.Value); - continue; - } - if (property0.NameEquals("publicNetworkAccess"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - publicNetworkAccess = new DataFactoryPublicNetworkAccess(property0.Value.GetString()); - continue; - } - } - continue; - } - additionalPropertiesDictionary.Add(property.Name, JsonSerializer.Deserialize>(property.Value.GetRawText())); - } - additionalProperties = additionalPropertiesDictionary; - return new DataFactoryData(id, name, type, systemData.Value, Optional.ToDictionary(tags), location, identity, provisioningState.Value, Optional.ToNullable(createTime), version.Value, purviewConfiguration.Value, repoConfiguration.Value, Optional.ToDictionary(globalParameters), encryption.Value, Optional.ToNullable(publicNetworkAccess), Optional.ToNullable(eTag), additionalProperties); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DataFactoryDataFlowCreateDebugSessionResult.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DataFactoryDataFlowCreateDebugSessionResult.Serialization.cs deleted file mode 100644 index 04fca818..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DataFactoryDataFlowCreateDebugSessionResult.Serialization.cs +++ /dev/null @@ -1,40 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class DataFactoryDataFlowCreateDebugSessionResult - { - internal static DataFactoryDataFlowCreateDebugSessionResult DeserializeDataFactoryDataFlowCreateDebugSessionResult(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - Optional status = default; - Optional sessionId = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("status"u8)) - { - status = property.Value.GetString(); - continue; - } - if (property.NameEquals("sessionId"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - sessionId = property.Value.GetGuid(); - continue; - } - } - return new DataFactoryDataFlowCreateDebugSessionResult(status.Value, Optional.ToNullable(sessionId)); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DataFactoryDataFlowCreateDebugSessionResult.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DataFactoryDataFlowCreateDebugSessionResult.cs deleted file mode 100644 index 571b47d0..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DataFactoryDataFlowCreateDebugSessionResult.cs +++ /dev/null @@ -1,29 +0,0 @@ -// - -#nullable disable - -namespace AzureDataFactory.TestingFramework.Models -{ - /// Response body structure for creating data flow debug session. - public partial class DataFactoryDataFlowCreateDebugSessionResult - { - /// Initializes a new instance of DataFactoryDataFlowCreateDebugSessionResult. - internal DataFactoryDataFlowCreateDebugSessionResult() - { - } - - /// Initializes a new instance of DataFactoryDataFlowCreateDebugSessionResult. - /// The state of the debug session. - /// The ID of data flow debug session. - internal DataFactoryDataFlowCreateDebugSessionResult(string status, Guid? sessionId) - { - Status = status; - SessionId = sessionId; - } - - /// The state of the debug session. - public string Status { get; } - /// The ID of data flow debug session. - public Guid? SessionId { get; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DataFactoryDataFlowData.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DataFactoryDataFlowData.Serialization.cs deleted file mode 100644 index b72418ab..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DataFactoryDataFlowData.Serialization.cs +++ /dev/null @@ -1,78 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; -using AzureDataFactory.TestingFramework.Models; -using Azure.ResourceManager.Models; - -namespace Azure.ResourceManager.DataFactory -{ - public partial class DataFactoryDataFlowData : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - writer.WritePropertyName("properties"u8); - writer.WriteObjectValue(Properties); - writer.WriteEndObject(); - } - - internal static DataFactoryDataFlowData DeserializeDataFactoryDataFlowData(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - DataFactoryDataFlowProperties properties = default; - Optional etag = default; - ResourceIdentifier id = default; - string name = default; - ResourceType type = default; - Optional systemData = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("properties"u8)) - { - properties = DataFactoryDataFlowProperties.DeserializeDataFactoryDataFlowProperties(property.Value); - continue; - } - if (property.NameEquals("etag"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - etag = new ETag(property.Value.GetString()); - continue; - } - if (property.NameEquals("id"u8)) - { - id = new ResourceIdentifier(property.Value.GetString()); - continue; - } - if (property.NameEquals("name"u8)) - { - name = property.Value.GetString(); - continue; - } - if (property.NameEquals("type"u8)) - { - type = new ResourceType(property.Value.GetString()); - continue; - } - if (property.NameEquals("systemData"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - systemData = JsonSerializer.Deserialize(property.Value.GetRawText()); - continue; - } - } - return new DataFactoryDataFlowData(id, name, type, systemData.Value, properties, Optional.ToNullable(etag)); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DataFactoryDataFlowDebugCommandResult.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DataFactoryDataFlowDebugCommandResult.Serialization.cs deleted file mode 100644 index 48e91b4f..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DataFactoryDataFlowDebugCommandResult.Serialization.cs +++ /dev/null @@ -1,36 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class DataFactoryDataFlowDebugCommandResult - { - internal static DataFactoryDataFlowDebugCommandResult DeserializeDataFactoryDataFlowDebugCommandResult(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - Optional status = default; - Optional data = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("status"u8)) - { - status = property.Value.GetString(); - continue; - } - if (property.NameEquals("data"u8)) - { - data = property.Value.GetString(); - continue; - } - } - return new DataFactoryDataFlowDebugCommandResult(status.Value, data.Value); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DataFactoryDataFlowDebugCommandResult.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DataFactoryDataFlowDebugCommandResult.cs deleted file mode 100644 index fbd994c6..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DataFactoryDataFlowDebugCommandResult.cs +++ /dev/null @@ -1,29 +0,0 @@ -// - -#nullable disable - -namespace AzureDataFactory.TestingFramework.Models -{ - /// Response body structure of data flow result for data preview, statistics or expression preview. - public partial class DataFactoryDataFlowDebugCommandResult - { - /// Initializes a new instance of DataFactoryDataFlowDebugCommandResult. - internal DataFactoryDataFlowDebugCommandResult() - { - } - - /// Initializes a new instance of DataFactoryDataFlowDebugCommandResult. - /// The run status of data preview, statistics or expression preview. - /// The result data of data preview, statistics or expression preview. - internal DataFactoryDataFlowDebugCommandResult(string status, string data) - { - Status = status; - Data = data; - } - - /// The run status of data preview, statistics or expression preview. - public string Status { get; } - /// The result data of data preview, statistics or expression preview. - public string Data { get; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DataFactoryDataFlowDebugInfo.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DataFactoryDataFlowDebugInfo.Serialization.cs deleted file mode 100644 index 67bd56c2..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DataFactoryDataFlowDebugInfo.Serialization.cs +++ /dev/null @@ -1,25 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class DataFactoryDataFlowDebugInfo : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - writer.WritePropertyName("properties"u8); - writer.WriteObjectValue(Properties); - if (Optional.IsDefined(Name)) - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - writer.WriteEndObject(); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DataFactoryDataFlowDebugInfo.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DataFactoryDataFlowDebugInfo.cs deleted file mode 100644 index 620b2ed1..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DataFactoryDataFlowDebugInfo.cs +++ /dev/null @@ -1,33 +0,0 @@ -// - -#nullable disable - -using Azure.Core; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// Data flow debug resource. - public partial class DataFactoryDataFlowDebugInfo : DataFactoryDebugInfo - { - /// Initializes a new instance of DataFactoryDataFlowDebugInfo. - /// - /// Data flow properties. - /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. - /// The available derived classes include , and . - /// - /// is null. - public DataFactoryDataFlowDebugInfo(DataFactoryDataFlowProperties properties) - { - Argument.AssertNotNull(properties, nameof(properties)); - - Properties = properties; - } - - /// - /// Data flow properties. - /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. - /// The available derived classes include , and . - /// - public DataFactoryDataFlowProperties Properties { get; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DataFactoryDataFlowDebugPackageContent.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DataFactoryDataFlowDebugPackageContent.Serialization.cs deleted file mode 100644 index d45c7237..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DataFactoryDataFlowDebugPackageContent.Serialization.cs +++ /dev/null @@ -1,77 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class DataFactoryDataFlowDebugPackageContent : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - if (Optional.IsDefined(SessionId)) - { - writer.WritePropertyName("sessionId"u8); - writer.WriteStringValue(SessionId.Value); - } - if (Optional.IsDefined(DataFlow)) - { - writer.WritePropertyName("dataFlow"u8); - writer.WriteObjectValue(DataFlow); - } - if (Optional.IsCollectionDefined(DataFlows)) - { - writer.WritePropertyName("dataFlows"u8); - writer.WriteStartArray(); - foreach (var item in DataFlows) - { - writer.WriteObjectValue(item); - } - writer.WriteEndArray(); - } - if (Optional.IsCollectionDefined(Datasets)) - { - writer.WritePropertyName("datasets"u8); - writer.WriteStartArray(); - foreach (var item in Datasets) - { - writer.WriteObjectValue(item); - } - writer.WriteEndArray(); - } - if (Optional.IsCollectionDefined(LinkedServices)) - { - writer.WritePropertyName("linkedServices"u8); - writer.WriteStartArray(); - foreach (var item in LinkedServices) - { - writer.WriteObjectValue(item); - } - writer.WriteEndArray(); - } - if (Optional.IsDefined(Staging)) - { - writer.WritePropertyName("staging"u8); - writer.WriteObjectValue(Staging); - } - if (Optional.IsDefined(DebugSettings)) - { - writer.WritePropertyName("debugSettings"u8); - writer.WriteObjectValue(DebugSettings); - } - foreach (var item in AdditionalProperties) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.Value.ToString()).RootElement); -#endif - } - writer.WriteEndObject(); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DataFactoryDataFlowDebugPackageContent.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DataFactoryDataFlowDebugPackageContent.cs deleted file mode 100644 index 583fa78a..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DataFactoryDataFlowDebugPackageContent.cs +++ /dev/null @@ -1,68 +0,0 @@ -// - -#nullable disable - -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// Request body structure for starting data flow debug session. - public partial class DataFactoryDataFlowDebugPackageContent - { - /// Initializes a new instance of DataFactoryDataFlowDebugPackageContent. - public DataFactoryDataFlowDebugPackageContent() - { - DataFlows = new ChangeTrackingList(); - Datasets = new ChangeTrackingList(); - LinkedServices = new ChangeTrackingList(); - AdditionalProperties = new ChangeTrackingDictionary>(); - } - - /// The ID of data flow debug session. - public Guid? SessionId { get; set; } - /// Data flow instance. - public DataFactoryDataFlowDebugInfo DataFlow { get; set; } - /// List of Data flows. - public IList DataFlows { get; } - /// List of datasets. - public IList Datasets { get; } - /// List of linked services. - public IList LinkedServices { get; } - /// Staging info for debug session. - public DataFlowStagingInfo Staging { get; set; } - /// Data flow debug settings. - public DataFlowDebugPackageDebugSettings DebugSettings { get; set; } - /// - /// Additional Properties - /// - /// To assign an object to the value of this property use . - /// - /// - /// To assign an already formated json string to this property use . - /// - /// - /// Examples: - /// - /// - /// BinaryData.FromObjectAsJson("foo") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromString("\"foo\"") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromObjectAsJson(new { key = "value" }) - /// Creates a payload of { "key": "value" }. - /// - /// - /// BinaryData.FromString("{\"key\": \"value\"}") - /// Creates a payload of { "key": "value" }. - /// - /// - /// - /// - public IDictionary> AdditionalProperties { get; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DataFactoryDataFlowDebugSessionContent.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DataFactoryDataFlowDebugSessionContent.Serialization.cs deleted file mode 100644 index 3341f735..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DataFactoryDataFlowDebugSessionContent.Serialization.cs +++ /dev/null @@ -1,38 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class DataFactoryDataFlowDebugSessionContent : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - if (Optional.IsDefined(ComputeType)) - { - writer.WritePropertyName("computeType"u8); - writer.WriteStringValue(ComputeType); - } - if (Optional.IsDefined(CoreCount)) - { - writer.WritePropertyName("coreCount"u8); - writer.WriteNumberValue(CoreCount.Value); - } - if (Optional.IsDefined(TimeToLiveInMinutes)) - { - writer.WritePropertyName("timeToLive"u8); - writer.WriteNumberValue(TimeToLiveInMinutes.Value); - } - if (Optional.IsDefined(IntegrationRuntime)) - { - writer.WritePropertyName("integrationRuntime"u8); - writer.WriteObjectValue(IntegrationRuntime); - } - writer.WriteEndObject(); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DataFactoryDataFlowDebugSessionContent.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DataFactoryDataFlowDebugSessionContent.cs deleted file mode 100644 index 9b44ebc5..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DataFactoryDataFlowDebugSessionContent.cs +++ /dev/null @@ -1,24 +0,0 @@ -// - -#nullable disable - -namespace AzureDataFactory.TestingFramework.Models -{ - /// Request body structure for creating data flow debug session. - public partial class DataFactoryDataFlowDebugSessionContent - { - /// Initializes a new instance of DataFactoryDataFlowDebugSessionContent. - public DataFactoryDataFlowDebugSessionContent() - { - } - - /// Compute type of the cluster. The value will be overwritten by the same setting in integration runtime if provided. - public string ComputeType { get; set; } - /// Core count of the cluster. The value will be overwritten by the same setting in integration runtime if provided. - public int? CoreCount { get; set; } - /// Time to live setting of the cluster in minutes. - public int? TimeToLiveInMinutes { get; set; } - /// Set to use integration runtime setting for data flow debug session. - public DataFactoryIntegrationRuntimeDebugInfo IntegrationRuntime { get; set; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DataFactoryDataFlowListResult.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DataFactoryDataFlowListResult.Serialization.cs deleted file mode 100644 index d54d9c2e..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DataFactoryDataFlowListResult.Serialization.cs +++ /dev/null @@ -1,42 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; -using Azure.ResourceManager.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - internal partial class DataFactoryDataFlowListResult - { - internal static DataFactoryDataFlowListResult DeserializeDataFactoryDataFlowListResult(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - IReadOnlyList value = default; - Optional nextLink = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("value"u8)) - { - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - array.Add(DataFactoryDataFlowData.DeserializeDataFactoryDataFlowData(item)); - } - value = array; - continue; - } - if (property.NameEquals("nextLink"u8)) - { - nextLink = property.Value.GetString(); - continue; - } - } - return new DataFactoryDataFlowListResult(value, nextLink.Value); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DataFactoryDataFlowListResult.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DataFactoryDataFlowListResult.cs deleted file mode 100644 index fcf4b15f..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DataFactoryDataFlowListResult.cs +++ /dev/null @@ -1,37 +0,0 @@ -// - -#nullable disable - -using Azure.Core; -using Azure.ResourceManager.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// A list of data flow resources. - internal partial class DataFactoryDataFlowListResult - { - /// Initializes a new instance of DataFactoryDataFlowListResult. - /// List of data flows. - /// is null. - internal DataFactoryDataFlowListResult(IEnumerable value) - { - Argument.AssertNotNull(value, nameof(value)); - - Value = value.ToList(); - } - - /// Initializes a new instance of DataFactoryDataFlowListResult. - /// List of data flows. - /// The link to the next page of results, if any remaining results exist. - internal DataFactoryDataFlowListResult(IReadOnlyList value, string nextLink) - { - Value = value; - NextLink = nextLink; - } - - /// List of data flows. - public IReadOnlyList Value { get; } - /// The link to the next page of results, if any remaining results exist. - public string NextLink { get; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DataFactoryDataFlowProperties.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DataFactoryDataFlowProperties.Serialization.cs deleted file mode 100644 index 1672471c..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DataFactoryDataFlowProperties.Serialization.cs +++ /dev/null @@ -1,67 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class DataFactoryDataFlowProperties : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - writer.WritePropertyName("type"u8); - writer.WriteStringValue(DataFlowType); - if (Optional.IsDefined(Description)) - { - writer.WritePropertyName("description"u8); - writer.WriteStringValue(Description); - } - if (Optional.IsCollectionDefined(Annotations)) - { - writer.WritePropertyName("annotations"u8); - writer.WriteStartArray(); - foreach (var item in Annotations) - { - if (item == null) - { - writer.WriteNullValue(); - continue; - } -#if NET6_0_OR_GREATER - writer.WriteRawValue(item); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.ToString()).RootElement); -#endif - } - writer.WriteEndArray(); - } - if (Optional.IsDefined(Folder)) - { - writer.WritePropertyName("folder"u8); - writer.WriteObjectValue(Folder); - } - writer.WriteEndObject(); - } - - internal static DataFactoryDataFlowProperties DeserializeDataFactoryDataFlowProperties(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - if (element.TryGetProperty("type", out JsonElement discriminator)) - { - switch (discriminator.GetString()) - { - case "Flowlet": return DataFactoryFlowletProperties.DeserializeDataFactoryFlowletProperties(element); - case "MappingDataFlow": return DataFactoryMappingDataFlowProperties.DeserializeDataFactoryMappingDataFlowProperties(element); - case "WranglingDataFlow": return DataFactoryWranglingDataFlowProperties.DeserializeDataFactoryWranglingDataFlowProperties(element); - } - } - return UnknownDataFlow.DeserializeUnknownDataFlow(element); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DataFactoryDataFlowProperties.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DataFactoryDataFlowProperties.cs deleted file mode 100644 index 90b797ba..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DataFactoryDataFlowProperties.cs +++ /dev/null @@ -1,84 +0,0 @@ -// - -#nullable disable - -using Azure.Core; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// - /// Azure Data Factory nested object which contains a flow with data movements and transformations. - /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. - /// The available derived classes include , and . - /// - public abstract partial class DataFactoryDataFlowProperties - { - /// Initializes a new instance of DataFactoryDataFlowProperties. - protected DataFactoryDataFlowProperties() - { - Annotations = new ChangeTrackingList(); - } - - /// Initializes a new instance of DataFactoryDataFlowProperties. - /// Type of data flow. - /// The description of the data flow. - /// List of tags that can be used for describing the data flow. - /// The folder that this data flow is in. If not specified, Data flow will appear at the root level. - internal DataFactoryDataFlowProperties(string dataFlowType, string description, IList annotations, DataFlowFolder folder) - { - DataFlowType = dataFlowType; - Description = description; - Annotations = annotations; - Folder = folder; - } - - /// Type of data flow. - internal string DataFlowType { get; set; } - /// The description of the data flow. - public string Description { get; set; } - /// - /// List of tags that can be used for describing the data flow. - /// - /// To assign an object to the element of this property use . - /// - /// - /// To assign an already formated json string to this property use . - /// - /// - /// Examples: - /// - /// - /// BinaryData.FromObjectAsJson("foo") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromString("\"foo\"") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromObjectAsJson(new { key = "value" }) - /// Creates a payload of { "key": "value" }. - /// - /// - /// BinaryData.FromString("{\"key\": \"value\"}") - /// Creates a payload of { "key": "value" }. - /// - /// - /// - /// - public IList Annotations { get; } - /// The folder that this data flow is in. If not specified, Data flow will appear at the root level. - internal DataFlowFolder Folder { get; set; } - /// The name of the folder that this data flow is in. - public string FolderName - { - get => Folder is null ? default : Folder.Name; - set - { - if (Folder is null) - Folder = new DataFlowFolder(); - Folder.Name = value; - } - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DataFactoryDataFlowStartDebugSessionResult.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DataFactoryDataFlowStartDebugSessionResult.Serialization.cs deleted file mode 100644 index ec933ad5..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DataFactoryDataFlowStartDebugSessionResult.Serialization.cs +++ /dev/null @@ -1,30 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class DataFactoryDataFlowStartDebugSessionResult - { - internal static DataFactoryDataFlowStartDebugSessionResult DeserializeDataFactoryDataFlowStartDebugSessionResult(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - Optional jobVersion = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("jobVersion"u8)) - { - jobVersion = property.Value.GetString(); - continue; - } - } - return new DataFactoryDataFlowStartDebugSessionResult(jobVersion.Value); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DataFactoryDataFlowStartDebugSessionResult.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DataFactoryDataFlowStartDebugSessionResult.cs deleted file mode 100644 index 6f3a13f4..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DataFactoryDataFlowStartDebugSessionResult.cs +++ /dev/null @@ -1,25 +0,0 @@ -// - -#nullable disable - -namespace AzureDataFactory.TestingFramework.Models -{ - /// Response body structure for starting data flow debug session. - public partial class DataFactoryDataFlowStartDebugSessionResult - { - /// Initializes a new instance of DataFactoryDataFlowStartDebugSessionResult. - internal DataFactoryDataFlowStartDebugSessionResult() - { - } - - /// Initializes a new instance of DataFactoryDataFlowStartDebugSessionResult. - /// The ID of data flow debug job version. - internal DataFactoryDataFlowStartDebugSessionResult(string jobVersion) - { - JobVersion = jobVersion; - } - - /// The ID of data flow debug job version. - public string JobVersion { get; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DataFactoryDataPlaneAccessPolicyResult.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DataFactoryDataPlaneAccessPolicyResult.Serialization.cs deleted file mode 100644 index a83d77f7..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DataFactoryDataPlaneAccessPolicyResult.Serialization.cs +++ /dev/null @@ -1,50 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class DataFactoryDataPlaneAccessPolicyResult - { - internal static DataFactoryDataPlaneAccessPolicyResult DeserializeDataFactoryDataPlaneAccessPolicyResult(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - Optional policy = default; - Optional accessToken = default; - Optional dataPlaneUrl = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("policy"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - policy = DataFactoryDataPlaneUserAccessPolicy.DeserializeDataFactoryDataPlaneUserAccessPolicy(property.Value); - continue; - } - if (property.NameEquals("accessToken"u8)) - { - accessToken = property.Value.GetString(); - continue; - } - if (property.NameEquals("dataPlaneUrl"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - dataPlaneUrl = new Uri(property.Value.GetString()); - continue; - } - } - return new DataFactoryDataPlaneAccessPolicyResult(policy.Value, accessToken.Value, dataPlaneUrl.Value); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DataFactoryDataPlaneAccessPolicyResult.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DataFactoryDataPlaneAccessPolicyResult.cs deleted file mode 100644 index 6ade0664..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DataFactoryDataPlaneAccessPolicyResult.cs +++ /dev/null @@ -1,33 +0,0 @@ -// - -#nullable disable - -namespace AzureDataFactory.TestingFramework.Models -{ - /// Get Data Plane read only token response definition. - public partial class DataFactoryDataPlaneAccessPolicyResult - { - /// Initializes a new instance of DataFactoryDataPlaneAccessPolicyResult. - internal DataFactoryDataPlaneAccessPolicyResult() - { - } - - /// Initializes a new instance of DataFactoryDataPlaneAccessPolicyResult. - /// The user access policy. - /// Data Plane read only access token. - /// Data Plane service base URL. - internal DataFactoryDataPlaneAccessPolicyResult(DataFactoryDataPlaneUserAccessPolicy policy, string accessToken, Uri dataPlaneUri) - { - Policy = policy; - AccessToken = accessToken; - DataPlaneUri = dataPlaneUri; - } - - /// The user access policy. - public DataFactoryDataPlaneUserAccessPolicy Policy { get; } - /// Data Plane read only access token. - public string AccessToken { get; } - /// Data Plane service base URL. - public Uri DataPlaneUri { get; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DataFactoryDataPlaneUserAccessPolicy.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DataFactoryDataPlaneUserAccessPolicy.Serialization.cs deleted file mode 100644 index 67c07e90..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DataFactoryDataPlaneUserAccessPolicy.Serialization.cs +++ /dev/null @@ -1,93 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class DataFactoryDataPlaneUserAccessPolicy : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - if (Optional.IsDefined(Permissions)) - { - writer.WritePropertyName("permissions"u8); - writer.WriteStringValue(Permissions); - } - if (Optional.IsDefined(AccessResourcePath)) - { - writer.WritePropertyName("accessResourcePath"u8); - writer.WriteStringValue(AccessResourcePath); - } - if (Optional.IsDefined(ProfileName)) - { - writer.WritePropertyName("profileName"u8); - writer.WriteStringValue(ProfileName); - } - if (Optional.IsDefined(StartOn)) - { - writer.WritePropertyName("startTime"u8); - writer.WriteStringValue(StartOn.Value, "O"); - } - if (Optional.IsDefined(ExpireOn)) - { - writer.WritePropertyName("expireTime"u8); - writer.WriteStringValue(ExpireOn.Value, "O"); - } - writer.WriteEndObject(); - } - - internal static DataFactoryDataPlaneUserAccessPolicy DeserializeDataFactoryDataPlaneUserAccessPolicy(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - Optional permissions = default; - Optional accessResourcePath = default; - Optional profileName = default; - Optional startTime = default; - Optional expireTime = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("permissions"u8)) - { - permissions = property.Value.GetString(); - continue; - } - if (property.NameEquals("accessResourcePath"u8)) - { - accessResourcePath = property.Value.GetString(); - continue; - } - if (property.NameEquals("profileName"u8)) - { - profileName = property.Value.GetString(); - continue; - } - if (property.NameEquals("startTime"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - startTime = property.Value.GetDateTimeOffset("O"); - continue; - } - if (property.NameEquals("expireTime"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - expireTime = property.Value.GetDateTimeOffset("O"); - continue; - } - } - return new DataFactoryDataPlaneUserAccessPolicy(permissions.Value, accessResourcePath.Value, profileName.Value, Optional.ToNullable(startTime), Optional.ToNullable(expireTime)); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DataFactoryDataPlaneUserAccessPolicy.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DataFactoryDataPlaneUserAccessPolicy.cs deleted file mode 100644 index f6dfc90b..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DataFactoryDataPlaneUserAccessPolicy.cs +++ /dev/null @@ -1,41 +0,0 @@ -// - -#nullable disable - -namespace AzureDataFactory.TestingFramework.Models -{ - /// Get Data Plane read only token request definition. - public partial class DataFactoryDataPlaneUserAccessPolicy - { - /// Initializes a new instance of DataFactoryDataPlaneUserAccessPolicy. - public DataFactoryDataPlaneUserAccessPolicy() - { - } - - /// Initializes a new instance of DataFactoryDataPlaneUserAccessPolicy. - /// The string with permissions for Data Plane access. Currently only 'r' is supported which grants read only access. - /// The resource path to get access relative to factory. Currently only empty string is supported which corresponds to the factory resource. - /// The name of the profile. Currently only the default is supported. The default value is DefaultProfile. - /// Start time for the token. If not specified the current time will be used. - /// Expiration time for the token. Maximum duration for the token is eight hours and by default the token will expire in eight hours. - internal DataFactoryDataPlaneUserAccessPolicy(string permissions, string accessResourcePath, string profileName, DateTimeOffset? startOn, DateTimeOffset? expireOn) - { - Permissions = permissions; - AccessResourcePath = accessResourcePath; - ProfileName = profileName; - StartOn = startOn; - ExpireOn = expireOn; - } - - /// The string with permissions for Data Plane access. Currently only 'r' is supported which grants read only access. - public string Permissions { get; set; } - /// The resource path to get access relative to factory. Currently only empty string is supported which corresponds to the factory resource. - public string AccessResourcePath { get; set; } - /// The name of the profile. Currently only the default is supported. The default value is DefaultProfile. - public string ProfileName { get; set; } - /// Start time for the token. If not specified the current time will be used. - public DateTimeOffset? StartOn { get; set; } - /// Expiration time for the token. Maximum duration for the token is eight hours and by default the token will expire in eight hours. - public DateTimeOffset? ExpireOn { get; set; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DataFactoryDatasetData.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DataFactoryDatasetData.Serialization.cs deleted file mode 100644 index abdd27ee..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DataFactoryDatasetData.Serialization.cs +++ /dev/null @@ -1,78 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; -using AzureDataFactory.TestingFramework.Models; -using Azure.ResourceManager.Models; - -namespace Azure.ResourceManager.DataFactory -{ - public partial class DataFactoryDatasetData : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - writer.WritePropertyName("properties"u8); - writer.WriteObjectValue(Properties); - writer.WriteEndObject(); - } - - internal static DataFactoryDatasetData DeserializeDataFactoryDatasetData(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - DataFactoryDatasetProperties properties = default; - Optional etag = default; - ResourceIdentifier id = default; - string name = default; - ResourceType type = default; - Optional systemData = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("properties"u8)) - { - properties = DataFactoryDatasetProperties.DeserializeDataFactoryDatasetProperties(property.Value); - continue; - } - if (property.NameEquals("etag"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - etag = new ETag(property.Value.GetString()); - continue; - } - if (property.NameEquals("id"u8)) - { - id = new ResourceIdentifier(property.Value.GetString()); - continue; - } - if (property.NameEquals("name"u8)) - { - name = property.Value.GetString(); - continue; - } - if (property.NameEquals("type"u8)) - { - type = new ResourceType(property.Value.GetString()); - continue; - } - if (property.NameEquals("systemData"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - systemData = JsonSerializer.Deserialize(property.Value.GetRawText()); - continue; - } - } - return new DataFactoryDatasetData(id, name, type, systemData.Value, properties, Optional.ToNullable(etag)); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DataFactoryDatasetDebugInfo.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DataFactoryDatasetDebugInfo.Serialization.cs deleted file mode 100644 index 32869f60..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DataFactoryDatasetDebugInfo.Serialization.cs +++ /dev/null @@ -1,25 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class DataFactoryDatasetDebugInfo : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - writer.WritePropertyName("properties"u8); - writer.WriteObjectValue(Properties); - if (Optional.IsDefined(Name)) - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - writer.WriteEndObject(); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DataFactoryDatasetDebugInfo.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DataFactoryDatasetDebugInfo.cs deleted file mode 100644 index fda3e315..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DataFactoryDatasetDebugInfo.cs +++ /dev/null @@ -1,33 +0,0 @@ -// - -#nullable disable - -using Azure.Core; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// Dataset debug resource. - public partial class DataFactoryDatasetDebugInfo : DataFactoryDebugInfo - { - /// Initializes a new instance of DataFactoryDatasetDebugInfo. - /// - /// Dataset properties. - /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. - /// The available derived classes include , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , and . - /// - /// is null. - public DataFactoryDatasetDebugInfo(DataFactoryDatasetProperties properties) - { - Argument.AssertNotNull(properties, nameof(properties)); - - Properties = properties; - } - - /// - /// Dataset properties. - /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. - /// The available derived classes include , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , and . - /// - public DataFactoryDatasetProperties Properties { get; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DataFactoryDatasetListResult.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DataFactoryDatasetListResult.Serialization.cs deleted file mode 100644 index 72ab670a..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DataFactoryDatasetListResult.Serialization.cs +++ /dev/null @@ -1,42 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; -using Azure.ResourceManager.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - internal partial class DataFactoryDatasetListResult - { - internal static DataFactoryDatasetListResult DeserializeDataFactoryDatasetListResult(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - IReadOnlyList value = default; - Optional nextLink = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("value"u8)) - { - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - array.Add(DataFactoryDatasetData.DeserializeDataFactoryDatasetData(item)); - } - value = array; - continue; - } - if (property.NameEquals("nextLink"u8)) - { - nextLink = property.Value.GetString(); - continue; - } - } - return new DataFactoryDatasetListResult(value, nextLink.Value); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DataFactoryDatasetListResult.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DataFactoryDatasetListResult.cs deleted file mode 100644 index 3d6dbb83..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DataFactoryDatasetListResult.cs +++ /dev/null @@ -1,37 +0,0 @@ -// - -#nullable disable - -using Azure.Core; -using Azure.ResourceManager.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// A list of dataset resources. - internal partial class DataFactoryDatasetListResult - { - /// Initializes a new instance of DataFactoryDatasetListResult. - /// List of datasets. - /// is null. - internal DataFactoryDatasetListResult(IEnumerable value) - { - Argument.AssertNotNull(value, nameof(value)); - - Value = value.ToList(); - } - - /// Initializes a new instance of DataFactoryDatasetListResult. - /// List of datasets. - /// The link to the next page of results, if any remaining results exist. - internal DataFactoryDatasetListResult(IReadOnlyList value, string nextLink) - { - Value = value; - NextLink = nextLink; - } - - /// List of datasets. - public IReadOnlyList Value { get; } - /// The link to the next page of results, if any remaining results exist. - public string NextLink { get; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DataFactoryDatasetProperties.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DataFactoryDatasetProperties.Serialization.cs deleted file mode 100644 index 24fe346c..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DataFactoryDatasetProperties.Serialization.cs +++ /dev/null @@ -1,191 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class DataFactoryDatasetProperties : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - writer.WritePropertyName("type"u8); - writer.WriteStringValue(DatasetType); - if (Optional.IsDefined(Description)) - { - writer.WritePropertyName("description"u8); - writer.WriteStringValue(Description); - } - if (Optional.IsDefined(Structure)) - { - writer.WritePropertyName("structure"u8); - JsonSerializer.Serialize(writer, Structure); - } - if (Optional.IsDefined(Schema)) - { - writer.WritePropertyName("schema"u8); - JsonSerializer.Serialize(writer, Schema); - } - writer.WritePropertyName("linkedServiceName"u8); - JsonSerializer.Serialize(writer, LinkedServiceName); if (Optional.IsCollectionDefined(Parameters)) - { - writer.WritePropertyName("parameters"u8); - writer.WriteStartObject(); - foreach (var item in Parameters) - { - writer.WritePropertyName(item.Key); - writer.WriteObjectValue(item.Value); - } - writer.WriteEndObject(); - } - if (Optional.IsCollectionDefined(Annotations)) - { - writer.WritePropertyName("annotations"u8); - writer.WriteStartArray(); - foreach (var item in Annotations) - { - if (item == null) - { - writer.WriteNullValue(); - continue; - } -#if NET6_0_OR_GREATER - writer.WriteRawValue(item); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.ToString()).RootElement); -#endif - } - writer.WriteEndArray(); - } - if (Optional.IsDefined(Folder)) - { - writer.WritePropertyName("folder"u8); - writer.WriteObjectValue(Folder); - } - foreach (var item in AdditionalProperties) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.Value.ToString()).RootElement); -#endif - } - writer.WriteEndObject(); - } - - internal static DataFactoryDatasetProperties DeserializeDataFactoryDatasetProperties(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - if (element.TryGetProperty("type", out JsonElement discriminator)) - { - switch (discriminator.GetString()) - { - case "AmazonMWSObject": return AmazonMwsObjectDataset.DeserializeAmazonMwsObjectDataset(element); - case "AmazonRdsForOracleTable": return AmazonRdsForOracleTableDataset.DeserializeAmazonRdsForOracleTableDataset(element); - case "AmazonRdsForSqlServerTable": return AmazonRdsForSqlServerTableDataset.DeserializeAmazonRdsForSqlServerTableDataset(element); - case "AmazonRedshiftTable": return AmazonRedshiftTableDataset.DeserializeAmazonRedshiftTableDataset(element); - case "AmazonS3Object": return AmazonS3Dataset.DeserializeAmazonS3Dataset(element); - case "Avro": return AvroDataset.DeserializeAvroDataset(element); - case "AzureBlob": return AzureBlobDataset.DeserializeAzureBlobDataset(element); - case "AzureBlobFSFile": return AzureBlobFSDataset.DeserializeAzureBlobFSDataset(element); - case "AzureDataExplorerTable": return AzureDataExplorerTableDataset.DeserializeAzureDataExplorerTableDataset(element); - case "AzureDataLakeStoreFile": return AzureDataLakeStoreDataset.DeserializeAzureDataLakeStoreDataset(element); - case "AzureDatabricksDeltaLakeDataset": return AzureDatabricksDeltaLakeDataset.DeserializeAzureDatabricksDeltaLakeDataset(element); - case "AzureMariaDBTable": return AzureMariaDBTableDataset.DeserializeAzureMariaDBTableDataset(element); - case "AzureMySqlTable": return AzureMySqlTableDataset.DeserializeAzureMySqlTableDataset(element); - case "AzurePostgreSqlTable": return AzurePostgreSqlTableDataset.DeserializeAzurePostgreSqlTableDataset(element); - case "AzureSearchIndex": return AzureSearchIndexDataset.DeserializeAzureSearchIndexDataset(element); - case "AzureSqlDWTable": return AzureSqlDWTableDataset.DeserializeAzureSqlDWTableDataset(element); - case "AzureSqlMITable": return AzureSqlMITableDataset.DeserializeAzureSqlMITableDataset(element); - case "AzureSqlTable": return AzureSqlTableDataset.DeserializeAzureSqlTableDataset(element); - case "AzureTable": return AzureTableDataset.DeserializeAzureTableDataset(element); - case "Binary": return BinaryDataset.DeserializeBinaryDataset(element); - case "CassandraTable": return CassandraTableDataset.DeserializeCassandraTableDataset(element); - case "CommonDataServiceForAppsEntity": return CommonDataServiceForAppsEntityDataset.DeserializeCommonDataServiceForAppsEntityDataset(element); - case "ConcurObject": return ConcurObjectDataset.DeserializeConcurObjectDataset(element); - case "CosmosDbMongoDbApiCollection": return CosmosDBMongoDBApiCollectionDataset.DeserializeCosmosDBMongoDBApiCollectionDataset(element); - case "CosmosDbSqlApiCollection": return CosmosDBSqlApiCollectionDataset.DeserializeCosmosDBSqlApiCollectionDataset(element); - case "CouchbaseTable": return CouchbaseTableDataset.DeserializeCouchbaseTableDataset(element); - case "CustomDataset": return CustomDataset.DeserializeCustomDataset(element); - case "Db2Table": return Db2TableDataset.DeserializeDb2TableDataset(element); - case "DelimitedText": return DelimitedTextDataset.DeserializeDelimitedTextDataset(element); - case "DocumentDbCollection": return DocumentDBCollectionDataset.DeserializeDocumentDBCollectionDataset(element); - case "DrillTable": return DrillTableDataset.DeserializeDrillTableDataset(element); - case "DynamicsAXResource": return DynamicsAXResourceDataset.DeserializeDynamicsAXResourceDataset(element); - case "DynamicsCrmEntity": return DynamicsCrmEntityDataset.DeserializeDynamicsCrmEntityDataset(element); - case "DynamicsEntity": return DynamicsEntityDataset.DeserializeDynamicsEntityDataset(element); - case "EloquaObject": return EloquaObjectDataset.DeserializeEloquaObjectDataset(element); - case "Excel": return ExcelDataset.DeserializeExcelDataset(element); - case "FileShare": return FileShareDataset.DeserializeFileShareDataset(element); - case "GoogleAdWordsObject": return GoogleAdWordsObjectDataset.DeserializeGoogleAdWordsObjectDataset(element); - case "GoogleBigQueryObject": return GoogleBigQueryObjectDataset.DeserializeGoogleBigQueryObjectDataset(element); - case "GreenplumTable": return GreenplumTableDataset.DeserializeGreenplumTableDataset(element); - case "HBaseObject": return HBaseObjectDataset.DeserializeHBaseObjectDataset(element); - case "HiveObject": return HiveObjectDataset.DeserializeHiveObjectDataset(element); - case "HttpFile": return DataFactoryHttpDataset.DeserializeDataFactoryHttpDataset(element); - case "HubspotObject": return HubspotObjectDataset.DeserializeHubspotObjectDataset(element); - case "ImpalaObject": return ImpalaObjectDataset.DeserializeImpalaObjectDataset(element); - case "InformixTable": return InformixTableDataset.DeserializeInformixTableDataset(element); - case "JiraObject": return JiraObjectDataset.DeserializeJiraObjectDataset(element); - case "Json": return JsonDataset.DeserializeJsonDataset(element); - case "MagentoObject": return MagentoObjectDataset.DeserializeMagentoObjectDataset(element); - case "MariaDBTable": return MariaDBTableDataset.DeserializeMariaDBTableDataset(element); - case "MarketoObject": return MarketoObjectDataset.DeserializeMarketoObjectDataset(element); - case "MicrosoftAccessTable": return MicrosoftAccessTableDataset.DeserializeMicrosoftAccessTableDataset(element); - case "MongoDbAtlasCollection": return MongoDBAtlasCollectionDataset.DeserializeMongoDBAtlasCollectionDataset(element); - case "MongoDbCollection": return MongoDBCollectionDataset.DeserializeMongoDBCollectionDataset(element); - case "MongoDbV2Collection": return MongoDBV2CollectionDataset.DeserializeMongoDBV2CollectionDataset(element); - case "MySqlTable": return MySqlTableDataset.DeserializeMySqlTableDataset(element); - case "NetezzaTable": return NetezzaTableDataset.DeserializeNetezzaTableDataset(element); - case "ODataResource": return ODataResourceDataset.DeserializeODataResourceDataset(element); - case "OdbcTable": return OdbcTableDataset.DeserializeOdbcTableDataset(element); - case "Office365Table": return Office365Dataset.DeserializeOffice365Dataset(element); - case "OracleServiceCloudObject": return OracleServiceCloudObjectDataset.DeserializeOracleServiceCloudObjectDataset(element); - case "OracleTable": return OracleTableDataset.DeserializeOracleTableDataset(element); - case "Orc": return OrcDataset.DeserializeOrcDataset(element); - case "Parquet": return ParquetDataset.DeserializeParquetDataset(element); - case "PaypalObject": return PaypalObjectDataset.DeserializePaypalObjectDataset(element); - case "PhoenixObject": return PhoenixObjectDataset.DeserializePhoenixObjectDataset(element); - case "PostgreSqlTable": return PostgreSqlTableDataset.DeserializePostgreSqlTableDataset(element); - case "PrestoObject": return PrestoObjectDataset.DeserializePrestoObjectDataset(element); - case "QuickBooksObject": return QuickBooksObjectDataset.DeserializeQuickBooksObjectDataset(element); - case "RelationalTable": return RelationalTableDataset.DeserializeRelationalTableDataset(element); - case "ResponsysObject": return ResponsysObjectDataset.DeserializeResponsysObjectDataset(element); - case "RestResource": return RestResourceDataset.DeserializeRestResourceDataset(element); - case "SalesforceMarketingCloudObject": return SalesforceMarketingCloudObjectDataset.DeserializeSalesforceMarketingCloudObjectDataset(element); - case "SalesforceObject": return SalesforceObjectDataset.DeserializeSalesforceObjectDataset(element); - case "SalesforceServiceCloudObject": return SalesforceServiceCloudObjectDataset.DeserializeSalesforceServiceCloudObjectDataset(element); - case "SapBwCube": return SapBWCubeDataset.DeserializeSapBWCubeDataset(element); - case "SapCloudForCustomerResource": return SapCloudForCustomerResourceDataset.DeserializeSapCloudForCustomerResourceDataset(element); - case "SapEccResource": return SapEccResourceDataset.DeserializeSapEccResourceDataset(element); - case "SapHanaTable": return SapHanaTableDataset.DeserializeSapHanaTableDataset(element); - case "SapOdpResource": return SapOdpResourceDataset.DeserializeSapOdpResourceDataset(element); - case "SapOpenHubTable": return SapOpenHubTableDataset.DeserializeSapOpenHubTableDataset(element); - case "SapTableResource": return SapTableResourceDataset.DeserializeSapTableResourceDataset(element); - case "ServiceNowObject": return ServiceNowObjectDataset.DeserializeServiceNowObjectDataset(element); - case "SharePointOnlineListResource": return SharePointOnlineListResourceDataset.DeserializeSharePointOnlineListResourceDataset(element); - case "ShopifyObject": return ShopifyObjectDataset.DeserializeShopifyObjectDataset(element); - case "SnowflakeTable": return SnowflakeDataset.DeserializeSnowflakeDataset(element); - case "SparkObject": return SparkObjectDataset.DeserializeSparkObjectDataset(element); - case "SqlServerTable": return SqlServerTableDataset.DeserializeSqlServerTableDataset(element); - case "SquareObject": return SquareObjectDataset.DeserializeSquareObjectDataset(element); - case "SybaseTable": return SybaseTableDataset.DeserializeSybaseTableDataset(element); - case "TeradataTable": return TeradataTableDataset.DeserializeTeradataTableDataset(element); - case "VerticaTable": return VerticaTableDataset.DeserializeVerticaTableDataset(element); - case "WebTable": return WebTableDataset.DeserializeWebTableDataset(element); - case "XeroObject": return XeroObjectDataset.DeserializeXeroObjectDataset(element); - case "Xml": return XmlDataset.DeserializeXmlDataset(element); - case "ZohoObject": return ZohoObjectDataset.DeserializeZohoObjectDataset(element); - } - } - return UnknownDataset.DeserializeUnknownDataset(element); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DataFactoryDatasetProperties.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DataFactoryDatasetProperties.cs deleted file mode 100644 index c95de948..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DataFactoryDatasetProperties.cs +++ /dev/null @@ -1,142 +0,0 @@ -// - -#nullable disable - -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// - /// The Azure Data Factory nested object which identifies data within different data stores, such as tables, files, folders, and documents. - /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. - /// The available derived classes include , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , and . - /// - public partial class DataFactoryDatasetProperties - { - /// Initializes a new instance of DataFactoryDatasetProperties. - /// Linked service reference. - /// is null. - public DataFactoryDatasetProperties(DataFactoryLinkedServiceReference linkedServiceName) - { - Argument.AssertNotNull(linkedServiceName, nameof(linkedServiceName)); - - LinkedServiceName = linkedServiceName; - Parameters = new ChangeTrackingDictionary(); - Annotations = new ChangeTrackingList(); - AdditionalProperties = new ChangeTrackingDictionary>(); - } - - /// Initializes a new instance of DataFactoryDatasetProperties. - /// Type of dataset. - /// Dataset description. - /// Columns that define the structure of the dataset. Type: array (or Expression with resultType array), itemType: DatasetDataElement. - /// Columns that define the physical type schema of the dataset. Type: array (or Expression with resultType array), itemType: DatasetSchemaDataElement. - /// Linked service reference. - /// Parameters for dataset. - /// List of tags that can be used for describing the Dataset. - /// The folder that this Dataset is in. If not specified, Dataset will appear at the root level. - /// Additional Properties. - internal DataFactoryDatasetProperties(string datasetType, string description, DataFactoryElement> structure, DataFactoryElement> schema, DataFactoryLinkedServiceReference linkedServiceName, IDictionary parameters, IList annotations, DatasetFolder folder, IDictionary> additionalProperties) - { - DatasetType = datasetType; - Description = description; - Structure = structure; - Schema = schema; - LinkedServiceName = linkedServiceName; - Parameters = parameters; - Annotations = annotations; - Folder = folder; - AdditionalProperties = additionalProperties; - } - - /// Type of dataset. - internal string DatasetType { get; set; } - /// Dataset description. - public string Description { get; set; } - /// Columns that define the structure of the dataset. Type: array (or Expression with resultType array), itemType: DatasetDataElement. - public DataFactoryElement> Structure { get; set; } - /// Columns that define the physical type schema of the dataset. Type: array (or Expression with resultType array), itemType: DatasetSchemaDataElement. - public DataFactoryElement> Schema { get; set; } - /// Linked service reference. - public DataFactoryLinkedServiceReference LinkedServiceName { get; set; } - /// Parameters for dataset. - public IDictionary Parameters { get; } - /// - /// List of tags that can be used for describing the Dataset. - /// - /// To assign an object to the element of this property use . - /// - /// - /// To assign an already formated json string to this property use . - /// - /// - /// Examples: - /// - /// - /// BinaryData.FromObjectAsJson("foo") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromString("\"foo\"") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromObjectAsJson(new { key = "value" }) - /// Creates a payload of { "key": "value" }. - /// - /// - /// BinaryData.FromString("{\"key\": \"value\"}") - /// Creates a payload of { "key": "value" }. - /// - /// - /// - /// - public IList Annotations { get; } - /// The folder that this Dataset is in. If not specified, Dataset will appear at the root level. - internal DatasetFolder Folder { get; set; } - /// The name of the folder that this Dataset is in. - public string FolderName - { - get => Folder is null ? default : Folder.Name; - set - { - if (Folder is null) - Folder = new DatasetFolder(); - Folder.Name = value; - } - } - - /// - /// Additional Properties - /// - /// To assign an object to the value of this property use . - /// - /// - /// To assign an already formated json string to this property use . - /// - /// - /// Examples: - /// - /// - /// BinaryData.FromObjectAsJson("foo") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromString("\"foo\"") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromObjectAsJson(new { key = "value" }) - /// Creates a payload of { "key": "value" }. - /// - /// - /// BinaryData.FromString("{\"key\": \"value\"}") - /// Creates a payload of { "key": "value" }. - /// - /// - /// - /// - public IDictionary> AdditionalProperties { get; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DataFactoryDayOfWeek.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DataFactoryDayOfWeek.Serialization.cs deleted file mode 100644 index 64ab8f13..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DataFactoryDayOfWeek.Serialization.cs +++ /dev/null @@ -1,33 +0,0 @@ -// - -#nullable disable - -namespace AzureDataFactory.TestingFramework.Models -{ - internal static partial class DataFactoryDayOfWeekExtensions - { - public static string ToSerialString(this DataFactoryDayOfWeek value) => value switch - { - DataFactoryDayOfWeek.Sunday => "Sunday", - DataFactoryDayOfWeek.Monday => "Monday", - DataFactoryDayOfWeek.Tuesday => "Tuesday", - DataFactoryDayOfWeek.Wednesday => "Wednesday", - DataFactoryDayOfWeek.Thursday => "Thursday", - DataFactoryDayOfWeek.Friday => "Friday", - DataFactoryDayOfWeek.Saturday => "Saturday", - _ => throw new ArgumentOutOfRangeException(nameof(value), value, "Unknown DataFactoryDayOfWeek value.") - }; - - public static DataFactoryDayOfWeek ToDataFactoryDayOfWeek(this string value) - { - if (StringComparer.OrdinalIgnoreCase.Equals(value, "Sunday")) return DataFactoryDayOfWeek.Sunday; - if (StringComparer.OrdinalIgnoreCase.Equals(value, "Monday")) return DataFactoryDayOfWeek.Monday; - if (StringComparer.OrdinalIgnoreCase.Equals(value, "Tuesday")) return DataFactoryDayOfWeek.Tuesday; - if (StringComparer.OrdinalIgnoreCase.Equals(value, "Wednesday")) return DataFactoryDayOfWeek.Wednesday; - if (StringComparer.OrdinalIgnoreCase.Equals(value, "Thursday")) return DataFactoryDayOfWeek.Thursday; - if (StringComparer.OrdinalIgnoreCase.Equals(value, "Friday")) return DataFactoryDayOfWeek.Friday; - if (StringComparer.OrdinalIgnoreCase.Equals(value, "Saturday")) return DataFactoryDayOfWeek.Saturday; - throw new ArgumentOutOfRangeException(nameof(value), value, "Unknown DataFactoryDayOfWeek value."); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DataFactoryDayOfWeek.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DataFactoryDayOfWeek.cs deleted file mode 100644 index ccae2807..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DataFactoryDayOfWeek.cs +++ /dev/null @@ -1,25 +0,0 @@ -// - -#nullable disable - -namespace AzureDataFactory.TestingFramework.Models -{ - /// The DataFactoryDayOfWeek. - public enum DataFactoryDayOfWeek - { - /// Sunday. - Sunday, - /// Monday. - Monday, - /// Tuesday. - Tuesday, - /// Wednesday. - Wednesday, - /// Thursday. - Thursday, - /// Friday. - Friday, - /// Saturday. - Saturday - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DataFactoryDebugInfo.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DataFactoryDebugInfo.Serialization.cs deleted file mode 100644 index 3063fb28..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DataFactoryDebugInfo.Serialization.cs +++ /dev/null @@ -1,23 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class DataFactoryDebugInfo : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - if (Optional.IsDefined(Name)) - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - writer.WriteEndObject(); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DataFactoryDebugInfo.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DataFactoryDebugInfo.cs deleted file mode 100644 index 8784cbc5..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DataFactoryDebugInfo.cs +++ /dev/null @@ -1,18 +0,0 @@ -// - -#nullable disable - -namespace AzureDataFactory.TestingFramework.Models -{ - /// Azure Data Factory nested debug resource. - public partial class DataFactoryDebugInfo - { - /// Initializes a new instance of DataFactoryDebugInfo. - public DataFactoryDebugInfo() - { - } - - /// The resource name. - public string Name { get; set; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DataFactoryEncryptionConfiguration.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DataFactoryEncryptionConfiguration.Serialization.cs deleted file mode 100644 index 10874168..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DataFactoryEncryptionConfiguration.Serialization.cs +++ /dev/null @@ -1,72 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class DataFactoryEncryptionConfiguration : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - writer.WritePropertyName("keyName"u8); - writer.WriteStringValue(KeyName); - writer.WritePropertyName("vaultBaseUrl"u8); - writer.WriteStringValue(VaultBaseUri.AbsoluteUri); - if (Optional.IsDefined(KeyVersion)) - { - writer.WritePropertyName("keyVersion"u8); - writer.WriteStringValue(KeyVersion); - } - if (Optional.IsDefined(Identity)) - { - writer.WritePropertyName("identity"u8); - writer.WriteObjectValue(Identity); - } - writer.WriteEndObject(); - } - - internal static DataFactoryEncryptionConfiguration DeserializeDataFactoryEncryptionConfiguration(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - string keyName = default; - Uri vaultBaseUrl = default; - Optional keyVersion = default; - Optional identity = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("keyName"u8)) - { - keyName = property.Value.GetString(); - continue; - } - if (property.NameEquals("vaultBaseUrl"u8)) - { - vaultBaseUrl = new Uri(property.Value.GetString()); - continue; - } - if (property.NameEquals("keyVersion"u8)) - { - keyVersion = property.Value.GetString(); - continue; - } - if (property.NameEquals("identity"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - identity = DataFactoryCmkIdentity.DeserializeDataFactoryCmkIdentity(property.Value); - continue; - } - } - return new DataFactoryEncryptionConfiguration(keyName, vaultBaseUrl, keyVersion.Value, identity.Value); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DataFactoryEncryptionConfiguration.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DataFactoryEncryptionConfiguration.cs deleted file mode 100644 index 04749ff6..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DataFactoryEncryptionConfiguration.cs +++ /dev/null @@ -1,58 +0,0 @@ -// - -#nullable disable - -using Azure.Core; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// Definition of CMK for the factory. - public partial class DataFactoryEncryptionConfiguration - { - /// Initializes a new instance of DataFactoryEncryptionConfiguration. - /// The name of the key in Azure Key Vault to use as Customer Managed Key. - /// The url of the Azure Key Vault used for CMK. - /// or is null. - public DataFactoryEncryptionConfiguration(string keyName, Uri vaultBaseUri) - { - Argument.AssertNotNull(keyName, nameof(keyName)); - Argument.AssertNotNull(vaultBaseUri, nameof(vaultBaseUri)); - - KeyName = keyName; - VaultBaseUri = vaultBaseUri; - } - - /// Initializes a new instance of DataFactoryEncryptionConfiguration. - /// The name of the key in Azure Key Vault to use as Customer Managed Key. - /// The url of the Azure Key Vault used for CMK. - /// The version of the key used for CMK. If not provided, latest version will be used. - /// User assigned identity to use to authenticate to customer's key vault. If not provided Managed Service Identity will be used. - internal DataFactoryEncryptionConfiguration(string keyName, Uri vaultBaseUri, string keyVersion, DataFactoryCmkIdentity identity) - { - KeyName = keyName; - VaultBaseUri = vaultBaseUri; - KeyVersion = keyVersion; - Identity = identity; - } - - /// The name of the key in Azure Key Vault to use as Customer Managed Key. - public string KeyName { get; set; } - /// The url of the Azure Key Vault used for CMK. - public Uri VaultBaseUri { get; set; } - /// The version of the key used for CMK. If not provided, latest version will be used. - public string KeyVersion { get; set; } - /// User assigned identity to use to authenticate to customer's key vault. If not provided Managed Service Identity will be used. - internal DataFactoryCmkIdentity Identity { get; set; } - /// The resource id of the user assigned identity to authenticate to customer's key vault. - public string UserAssignedIdentity - { - get => Identity is null ? default : Identity.UserAssignedIdentity; - set - { - if (Identity is null) - Identity = new DataFactoryCmkIdentity(); - Identity.UserAssignedIdentity = value; - } - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DataFactoryExpression.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DataFactoryExpression.Serialization.cs deleted file mode 100644 index 124dfc87..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DataFactoryExpression.Serialization.cs +++ /dev/null @@ -1,46 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class DataFactoryExpression : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ExpressionType.ToString()); - writer.WritePropertyName("value"u8); - writer.WriteStringValue(Value); - writer.WriteEndObject(); - } - - internal static DataFactoryExpression DeserializeDataFactoryExpression(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - DataFactoryExpressionType type = default; - string value = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("type"u8)) - { - type = new DataFactoryExpressionType(property.Value.GetString()); - continue; - } - if (property.NameEquals("value"u8)) - { - value = property.Value.GetString(); - continue; - } - } - return new DataFactoryExpression(type, value); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DataFactoryExpression.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DataFactoryExpression.cs deleted file mode 100644 index 669d2d02..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DataFactoryExpression.cs +++ /dev/null @@ -1,29 +0,0 @@ -// - -#nullable disable - -using Azure.Core; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// Azure Data Factory expression definition. - public partial class DataFactoryExpression - { - /// Initializes a new instance of DataFactoryExpression. - /// Expression type. - /// Expression value. - /// is null. - public DataFactoryExpression(DataFactoryExpressionType expressionType, string value) - { - Argument.AssertNotNull(value, nameof(value)); - - ExpressionType = expressionType; - Value = value; - } - - /// Expression type. - public DataFactoryExpressionType ExpressionType { get; set; } - /// Expression value. - public string Value { get; set; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DataFactoryExpressionType.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DataFactoryExpressionType.cs deleted file mode 100644 index 79c3357e..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DataFactoryExpressionType.cs +++ /dev/null @@ -1,44 +0,0 @@ -// - -#nullable disable - -using System.ComponentModel; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// Expression type. - public readonly partial struct DataFactoryExpressionType : IEquatable - { - private readonly string _value; - - /// Initializes a new instance of . - /// is null. - public DataFactoryExpressionType(string value) - { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } - - private const string ExpressionValue = "Expression"; - - /// Expression. - public static DataFactoryExpressionType Expression { get; } = new DataFactoryExpressionType(ExpressionValue); - /// Determines if two values are the same. - public static bool operator ==(DataFactoryExpressionType left, DataFactoryExpressionType right) => left.Equals(right); - /// Determines if two values are not the same. - public static bool operator !=(DataFactoryExpressionType left, DataFactoryExpressionType right) => !left.Equals(right); - /// Converts a string to a . - public static implicit operator DataFactoryExpressionType(string value) => new DataFactoryExpressionType(value); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override bool Equals(object obj) => obj is DataFactoryExpressionType other && Equals(other); - /// - public bool Equals(DataFactoryExpressionType other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override int GetHashCode() => _value?.GetHashCode() ?? 0; - /// - public override string ToString() => _value; - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DataFactoryFlowletProperties.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DataFactoryFlowletProperties.Serialization.cs deleted file mode 100644 index 98656973..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DataFactoryFlowletProperties.Serialization.cs +++ /dev/null @@ -1,231 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class DataFactoryFlowletProperties : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - writer.WritePropertyName("type"u8); - writer.WriteStringValue(DataFlowType); - if (Optional.IsDefined(Description)) - { - writer.WritePropertyName("description"u8); - writer.WriteStringValue(Description); - } - if (Optional.IsCollectionDefined(Annotations)) - { - writer.WritePropertyName("annotations"u8); - writer.WriteStartArray(); - foreach (var item in Annotations) - { - if (item == null) - { - writer.WriteNullValue(); - continue; - } -#if NET6_0_OR_GREATER - writer.WriteRawValue(item); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.ToString()).RootElement); -#endif - } - writer.WriteEndArray(); - } - if (Optional.IsDefined(Folder)) - { - writer.WritePropertyName("folder"u8); - writer.WriteObjectValue(Folder); - } - writer.WritePropertyName("typeProperties"u8); - writer.WriteStartObject(); - if (Optional.IsCollectionDefined(Sources)) - { - writer.WritePropertyName("sources"u8); - writer.WriteStartArray(); - foreach (var item in Sources) - { - writer.WriteObjectValue(item); - } - writer.WriteEndArray(); - } - if (Optional.IsCollectionDefined(Sinks)) - { - writer.WritePropertyName("sinks"u8); - writer.WriteStartArray(); - foreach (var item in Sinks) - { - writer.WriteObjectValue(item); - } - writer.WriteEndArray(); - } - if (Optional.IsCollectionDefined(Transformations)) - { - writer.WritePropertyName("transformations"u8); - writer.WriteStartArray(); - foreach (var item in Transformations) - { - writer.WriteObjectValue(item); - } - writer.WriteEndArray(); - } - if (Optional.IsDefined(Script)) - { - writer.WritePropertyName("script"u8); - writer.WriteStringValue(Script); - } - if (Optional.IsCollectionDefined(ScriptLines)) - { - writer.WritePropertyName("scriptLines"u8); - writer.WriteStartArray(); - foreach (var item in ScriptLines) - { - writer.WriteStringValue(item); - } - writer.WriteEndArray(); - } - writer.WriteEndObject(); - writer.WriteEndObject(); - } - - internal static DataFactoryFlowletProperties DeserializeDataFactoryFlowletProperties(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - string type = default; - Optional description = default; - Optional> annotations = default; - Optional folder = default; - Optional> sources = default; - Optional> sinks = default; - Optional> transformations = default; - Optional script = default; - Optional> scriptLines = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("type"u8)) - { - type = property.Value.GetString(); - continue; - } - if (property.NameEquals("description"u8)) - { - description = property.Value.GetString(); - continue; - } - if (property.NameEquals("annotations"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - if (item.ValueKind == JsonValueKind.Null) - { - array.Add(null); - } - else - { - array.Add(BinaryData.FromString(item.GetRawText())); - } - } - annotations = array; - continue; - } - if (property.NameEquals("folder"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - folder = DataFlowFolder.DeserializeDataFlowFolder(property.Value); - continue; - } - if (property.NameEquals("typeProperties"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - foreach (var property0 in property.Value.EnumerateObject()) - { - if (property0.NameEquals("sources"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property0.Value.EnumerateArray()) - { - array.Add(DataFlowSource.DeserializeDataFlowSource(item)); - } - sources = array; - continue; - } - if (property0.NameEquals("sinks"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property0.Value.EnumerateArray()) - { - array.Add(DataFlowSink.DeserializeDataFlowSink(item)); - } - sinks = array; - continue; - } - if (property0.NameEquals("transformations"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property0.Value.EnumerateArray()) - { - array.Add(DataFlowTransformation.DeserializeDataFlowTransformation(item)); - } - transformations = array; - continue; - } - if (property0.NameEquals("script"u8)) - { - script = property0.Value.GetString(); - continue; - } - if (property0.NameEquals("scriptLines"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property0.Value.EnumerateArray()) - { - array.Add(item.GetString()); - } - scriptLines = array; - continue; - } - } - continue; - } - } - return new DataFactoryFlowletProperties(type, description.Value, Optional.ToList(annotations), folder.Value, Optional.ToList(sources), Optional.ToList(sinks), Optional.ToList(transformations), script.Value, Optional.ToList(scriptLines)); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DataFactoryFlowletProperties.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DataFactoryFlowletProperties.cs deleted file mode 100644 index 037f3d04..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DataFactoryFlowletProperties.cs +++ /dev/null @@ -1,53 +0,0 @@ -// - -#nullable disable - -using Azure.Core; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// Data flow flowlet. - public partial class DataFactoryFlowletProperties : DataFactoryDataFlowProperties - { - /// Initializes a new instance of DataFactoryFlowletProperties. - public DataFactoryFlowletProperties() - { - Sources = new ChangeTrackingList(); - Sinks = new ChangeTrackingList(); - Transformations = new ChangeTrackingList(); - ScriptLines = new ChangeTrackingList(); - DataFlowType = "Flowlet"; - } - - /// Initializes a new instance of DataFactoryFlowletProperties. - /// Type of data flow. - /// The description of the data flow. - /// List of tags that can be used for describing the data flow. - /// The folder that this data flow is in. If not specified, Data flow will appear at the root level. - /// List of sources in Flowlet. - /// List of sinks in Flowlet. - /// List of transformations in Flowlet. - /// Flowlet script. - /// Flowlet script lines. - internal DataFactoryFlowletProperties(string dataFlowType, string description, IList annotations, DataFlowFolder folder, IList sources, IList sinks, IList transformations, string script, IList scriptLines) : base(dataFlowType, description, annotations, folder) - { - Sources = sources; - Sinks = sinks; - Transformations = transformations; - Script = script; - ScriptLines = scriptLines; - DataFlowType = dataFlowType ?? "Flowlet"; - } - - /// List of sources in Flowlet. - public IList Sources { get; } - /// List of sinks in Flowlet. - public IList Sinks { get; } - /// List of transformations in Flowlet. - public IList Transformations { get; } - /// Flowlet script. - public string Script { get; set; } - /// Flowlet script lines. - public IList ScriptLines { get; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DataFactoryGlobalParameterData.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DataFactoryGlobalParameterData.Serialization.cs deleted file mode 100644 index ce4f1056..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DataFactoryGlobalParameterData.Serialization.cs +++ /dev/null @@ -1,89 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; -using AzureDataFactory.TestingFramework.Models; -using Azure.ResourceManager.Models; - -namespace Azure.ResourceManager.DataFactory -{ - public partial class DataFactoryGlobalParameterData : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - writer.WritePropertyName("properties"u8); - writer.WriteStartObject(); - foreach (var item in Properties) - { - writer.WritePropertyName(item.Key); - writer.WriteObjectValue(item.Value); - } - writer.WriteEndObject(); - writer.WriteEndObject(); - } - - internal static DataFactoryGlobalParameterData DeserializeDataFactoryGlobalParameterData(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - IDictionary properties = default; - Optional etag = default; - ResourceIdentifier id = default; - string name = default; - ResourceType type = default; - Optional systemData = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("properties"u8)) - { - Dictionary dictionary = new Dictionary(); - foreach (var property0 in property.Value.EnumerateObject()) - { - dictionary.Add(property0.Name, DataFactoryGlobalParameterProperties.DeserializeDataFactoryGlobalParameterProperties(property0.Value)); - } - properties = dictionary; - continue; - } - if (property.NameEquals("etag"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - etag = new ETag(property.Value.GetString()); - continue; - } - if (property.NameEquals("id"u8)) - { - id = new ResourceIdentifier(property.Value.GetString()); - continue; - } - if (property.NameEquals("name"u8)) - { - name = property.Value.GetString(); - continue; - } - if (property.NameEquals("type"u8)) - { - type = new ResourceType(property.Value.GetString()); - continue; - } - if (property.NameEquals("systemData"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - systemData = JsonSerializer.Deserialize(property.Value.GetRawText()); - continue; - } - } - return new DataFactoryGlobalParameterData(id, name, type, systemData.Value, properties, Optional.ToNullable(etag)); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DataFactoryGlobalParameterListResult.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DataFactoryGlobalParameterListResult.Serialization.cs deleted file mode 100644 index a9e8ddd2..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DataFactoryGlobalParameterListResult.Serialization.cs +++ /dev/null @@ -1,42 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; -using Azure.ResourceManager.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - internal partial class DataFactoryGlobalParameterListResult - { - internal static DataFactoryGlobalParameterListResult DeserializeDataFactoryGlobalParameterListResult(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - IReadOnlyList value = default; - Optional nextLink = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("value"u8)) - { - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - array.Add(DataFactoryGlobalParameterData.DeserializeDataFactoryGlobalParameterData(item)); - } - value = array; - continue; - } - if (property.NameEquals("nextLink"u8)) - { - nextLink = property.Value.GetString(); - continue; - } - } - return new DataFactoryGlobalParameterListResult(value, nextLink.Value); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DataFactoryGlobalParameterListResult.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DataFactoryGlobalParameterListResult.cs deleted file mode 100644 index 56fcfbaa..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DataFactoryGlobalParameterListResult.cs +++ /dev/null @@ -1,37 +0,0 @@ -// - -#nullable disable - -using Azure.Core; -using Azure.ResourceManager.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// A list of Global parameters. - internal partial class DataFactoryGlobalParameterListResult - { - /// Initializes a new instance of DataFactoryGlobalParameterListResult. - /// List of global parameters. - /// is null. - internal DataFactoryGlobalParameterListResult(IEnumerable value) - { - Argument.AssertNotNull(value, nameof(value)); - - Value = value.ToList(); - } - - /// Initializes a new instance of DataFactoryGlobalParameterListResult. - /// List of global parameters. - /// The link to the next page of results, if any remaining results exist. - internal DataFactoryGlobalParameterListResult(IReadOnlyList value, string nextLink) - { - Value = value; - NextLink = nextLink; - } - - /// List of global parameters. - public IReadOnlyList Value { get; } - /// The link to the next page of results, if any remaining results exist. - public string NextLink { get; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DataFactoryGlobalParameterProperties.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DataFactoryGlobalParameterProperties.Serialization.cs deleted file mode 100644 index 5eefa91a..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DataFactoryGlobalParameterProperties.Serialization.cs +++ /dev/null @@ -1,50 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class DataFactoryGlobalParameterProperties : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - writer.WritePropertyName("type"u8); - writer.WriteStringValue(GlobalParameterType.ToString()); - writer.WritePropertyName("value"u8); -#if NET6_0_OR_GREATER - writer.WriteRawValue(Value); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(Value.ToString()).RootElement); -#endif - writer.WriteEndObject(); - } - - internal static DataFactoryGlobalParameterProperties DeserializeDataFactoryGlobalParameterProperties(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - DataFactoryGlobalParameterType type = default; - BinaryData value = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("type"u8)) - { - type = new DataFactoryGlobalParameterType(property.Value.GetString()); - continue; - } - if (property.NameEquals("value"u8)) - { - value = BinaryData.FromString(property.Value.GetRawText()); - continue; - } - } - return new DataFactoryGlobalParameterProperties(type, value); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DataFactoryGlobalParameterProperties.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DataFactoryGlobalParameterProperties.cs deleted file mode 100644 index ea777b74..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DataFactoryGlobalParameterProperties.cs +++ /dev/null @@ -1,58 +0,0 @@ -// - -#nullable disable - -using Azure.Core; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// Definition of a single parameter for an entity. - public partial class DataFactoryGlobalParameterProperties - { - /// Initializes a new instance of DataFactoryGlobalParameterProperties. - /// Global Parameter type. - /// Value of parameter. - /// is null. - public DataFactoryGlobalParameterProperties(DataFactoryGlobalParameterType globalParameterType, BinaryData value) - { - Argument.AssertNotNull(value, nameof(value)); - - GlobalParameterType = globalParameterType; - Value = value; - } - - /// Global Parameter type. - public DataFactoryGlobalParameterType GlobalParameterType { get; set; } - /// - /// Value of parameter. - /// - /// To assign an object to this property use . - /// - /// - /// To assign an already formated json string to this property use . - /// - /// - /// Examples: - /// - /// - /// BinaryData.FromObjectAsJson("foo") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromString("\"foo\"") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromObjectAsJson(new { key = "value" }) - /// Creates a payload of { "key": "value" }. - /// - /// - /// BinaryData.FromString("{\"key\": \"value\"}") - /// Creates a payload of { "key": "value" }. - /// - /// - /// - /// - public BinaryData Value { get; set; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DataFactoryGlobalParameterType.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DataFactoryGlobalParameterType.cs deleted file mode 100644 index f1d6d5ff..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DataFactoryGlobalParameterType.cs +++ /dev/null @@ -1,59 +0,0 @@ -// - -#nullable disable - -using System.ComponentModel; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// Global Parameter type. - public readonly partial struct DataFactoryGlobalParameterType : IEquatable - { - private readonly string _value; - - /// Initializes a new instance of . - /// is null. - public DataFactoryGlobalParameterType(string value) - { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } - - private const string ObjectValue = "Object"; - private const string StringValue = "String"; - private const string IntValue = "Int"; - private const string FloatValue = "Float"; - private const string BoolValue = "Bool"; - private const string ArrayValue = "Array"; - - /// Object. - public static DataFactoryGlobalParameterType Object { get; } = new DataFactoryGlobalParameterType(ObjectValue); - /// String. - public static DataFactoryGlobalParameterType String { get; } = new DataFactoryGlobalParameterType(StringValue); - /// Int. - public static DataFactoryGlobalParameterType Int { get; } = new DataFactoryGlobalParameterType(IntValue); - /// Float. - public static DataFactoryGlobalParameterType Float { get; } = new DataFactoryGlobalParameterType(FloatValue); - /// Bool. - public static DataFactoryGlobalParameterType Bool { get; } = new DataFactoryGlobalParameterType(BoolValue); - /// Array. - public static DataFactoryGlobalParameterType Array { get; } = new DataFactoryGlobalParameterType(ArrayValue); - /// Determines if two values are the same. - public static bool operator ==(DataFactoryGlobalParameterType left, DataFactoryGlobalParameterType right) => left.Equals(right); - /// Determines if two values are not the same. - public static bool operator !=(DataFactoryGlobalParameterType left, DataFactoryGlobalParameterType right) => !left.Equals(right); - /// Converts a string to a . - public static implicit operator DataFactoryGlobalParameterType(string value) => new DataFactoryGlobalParameterType(value); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override bool Equals(object obj) => obj is DataFactoryGlobalParameterType other && Equals(other); - /// - public bool Equals(DataFactoryGlobalParameterType other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override int GetHashCode() => _value?.GetHashCode() ?? 0; - /// - public override string ToString() => _value; - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DataFactoryHttpDataset.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DataFactoryHttpDataset.Serialization.cs deleted file mode 100644 index 901a83e8..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DataFactoryHttpDataset.Serialization.cs +++ /dev/null @@ -1,287 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class DataFactoryHttpDataset : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - writer.WritePropertyName("type"u8); - writer.WriteStringValue(DatasetType); - if (Optional.IsDefined(Description)) - { - writer.WritePropertyName("description"u8); - writer.WriteStringValue(Description); - } - if (Optional.IsDefined(Structure)) - { - writer.WritePropertyName("structure"u8); - JsonSerializer.Serialize(writer, Structure); - } - if (Optional.IsDefined(Schema)) - { - writer.WritePropertyName("schema"u8); - JsonSerializer.Serialize(writer, Schema); - } - writer.WritePropertyName("linkedServiceName"u8); - JsonSerializer.Serialize(writer, LinkedServiceName); if (Optional.IsCollectionDefined(Parameters)) - { - writer.WritePropertyName("parameters"u8); - writer.WriteStartObject(); - foreach (var item in Parameters) - { - writer.WritePropertyName(item.Key); - writer.WriteObjectValue(item.Value); - } - writer.WriteEndObject(); - } - if (Optional.IsCollectionDefined(Annotations)) - { - writer.WritePropertyName("annotations"u8); - writer.WriteStartArray(); - foreach (var item in Annotations) - { - if (item == null) - { - writer.WriteNullValue(); - continue; - } -#if NET6_0_OR_GREATER - writer.WriteRawValue(item); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.ToString()).RootElement); -#endif - } - writer.WriteEndArray(); - } - if (Optional.IsDefined(Folder)) - { - writer.WritePropertyName("folder"u8); - writer.WriteObjectValue(Folder); - } - writer.WritePropertyName("typeProperties"u8); - writer.WriteStartObject(); - if (Optional.IsDefined(RelativeUri)) - { - writer.WritePropertyName("relativeUrl"u8); - JsonSerializer.Serialize(writer, RelativeUri); - } - if (Optional.IsDefined(RequestMethod)) - { - writer.WritePropertyName("requestMethod"u8); - JsonSerializer.Serialize(writer, RequestMethod); - } - if (Optional.IsDefined(RequestBody)) - { - writer.WritePropertyName("requestBody"u8); - JsonSerializer.Serialize(writer, RequestBody); - } - if (Optional.IsDefined(AdditionalHeaders)) - { - writer.WritePropertyName("additionalHeaders"u8); - JsonSerializer.Serialize(writer, AdditionalHeaders); - } - if (Optional.IsDefined(Format)) - { - writer.WritePropertyName("format"u8); - writer.WriteObjectValue(Format); - } - if (Optional.IsDefined(Compression)) - { - writer.WritePropertyName("compression"u8); - writer.WriteObjectValue(Compression); - } - writer.WriteEndObject(); - foreach (var item in AdditionalProperties) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.Value.ToString()).RootElement); -#endif - } - writer.WriteEndObject(); - } - - internal static DataFactoryHttpDataset DeserializeDataFactoryHttpDataset(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - string type = default; - Optional description = default; - Optional>> structure = default; - Optional>> schema = default; - DataFactoryLinkedServiceReference linkedServiceName = default; - Optional> parameters = default; - Optional> annotations = default; - Optional folder = default; - Optional> relativeUrl = default; - Optional> requestMethod = default; - Optional> requestBody = default; - Optional> additionalHeaders = default; - Optional format = default; - Optional compression = default; - IDictionary> additionalProperties = default; - Dictionary> additionalPropertiesDictionary = new Dictionary>(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("type"u8)) - { - type = property.Value.GetString(); - continue; - } - if (property.NameEquals("description"u8)) - { - description = property.Value.GetString(); - continue; - } - if (property.NameEquals("structure"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - structure = JsonSerializer.Deserialize>>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("schema"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - schema = JsonSerializer.Deserialize>>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("linkedServiceName"u8)) - { - linkedServiceName = JsonSerializer.Deserialize(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("parameters"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - Dictionary dictionary = new Dictionary(); - foreach (var property0 in property.Value.EnumerateObject()) - { - dictionary.Add(property0.Name, EntityParameterSpecification.DeserializeEntityParameterSpecification(property0.Value)); - } - parameters = dictionary; - continue; - } - if (property.NameEquals("annotations"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - if (item.ValueKind == JsonValueKind.Null) - { - array.Add(null); - } - else - { - array.Add(BinaryData.FromString(item.GetRawText())); - } - } - annotations = array; - continue; - } - if (property.NameEquals("folder"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - folder = DatasetFolder.DeserializeDatasetFolder(property.Value); - continue; - } - if (property.NameEquals("typeProperties"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - foreach (var property0 in property.Value.EnumerateObject()) - { - if (property0.NameEquals("relativeUrl"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - relativeUrl = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("requestMethod"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - requestMethod = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("requestBody"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - requestBody = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("additionalHeaders"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - additionalHeaders = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("format"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - format = DatasetStorageFormat.DeserializeDatasetStorageFormat(property0.Value); - continue; - } - if (property0.NameEquals("compression"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - compression = DatasetCompression.DeserializeDatasetCompression(property0.Value); - continue; - } - } - continue; - } - additionalPropertiesDictionary.Add(property.Name, JsonSerializer.Deserialize>(property.Value.GetRawText())); - } - additionalProperties = additionalPropertiesDictionary; - return new DataFactoryHttpDataset(type, description.Value, structure.Value, schema.Value, linkedServiceName, Optional.ToDictionary(parameters), Optional.ToList(annotations), folder.Value, additionalProperties, relativeUrl.Value, requestMethod.Value, requestBody.Value, additionalHeaders.Value, format.Value, compression.Value); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DataFactoryHttpDataset.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DataFactoryHttpDataset.cs deleted file mode 100644 index cb755db4..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DataFactoryHttpDataset.cs +++ /dev/null @@ -1,79 +0,0 @@ -// - -#nullable disable - -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// A file in an HTTP web server. - public partial class DataFactoryHttpDataset : DataFactoryDatasetProperties - { - /// Initializes a new instance of DataFactoryHttpDataset. - /// Linked service reference. - /// is null. - public DataFactoryHttpDataset(DataFactoryLinkedServiceReference linkedServiceName) : base(linkedServiceName) - { - Argument.AssertNotNull(linkedServiceName, nameof(linkedServiceName)); - - DatasetType = "HttpFile"; - } - - /// Initializes a new instance of DataFactoryHttpDataset. - /// Type of dataset. - /// Dataset description. - /// Columns that define the structure of the dataset. Type: array (or Expression with resultType array), itemType: DatasetDataElement. - /// Columns that define the physical type schema of the dataset. Type: array (or Expression with resultType array), itemType: DatasetSchemaDataElement. - /// Linked service reference. - /// Parameters for dataset. - /// List of tags that can be used for describing the Dataset. - /// The folder that this Dataset is in. If not specified, Dataset will appear at the root level. - /// Additional Properties. - /// The relative URL based on the URL in the HttpLinkedService refers to an HTTP file Type: string (or Expression with resultType string). - /// The HTTP method for the HTTP request. Type: string (or Expression with resultType string). - /// The body for the HTTP request. Type: string (or Expression with resultType string). - /// - /// The headers for the HTTP Request. e.g. request-header-name-1:request-header-value-1 - /// ... - /// request-header-name-n:request-header-value-n Type: string (or Expression with resultType string). - /// - /// - /// The format of files. - /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. - /// The available derived classes include , , , and . - /// - /// The data compression method used on files. - internal DataFactoryHttpDataset(string datasetType, string description, DataFactoryElement> structure, DataFactoryElement> schema, DataFactoryLinkedServiceReference linkedServiceName, IDictionary parameters, IList annotations, DatasetFolder folder, IDictionary> additionalProperties, DataFactoryElement relativeUri, DataFactoryElement requestMethod, DataFactoryElement requestBody, DataFactoryElement additionalHeaders, DatasetStorageFormat format, DatasetCompression compression) : base(datasetType, description, structure, schema, linkedServiceName, parameters, annotations, folder, additionalProperties) - { - RelativeUri = relativeUri; - RequestMethod = requestMethod; - RequestBody = requestBody; - AdditionalHeaders = additionalHeaders; - Format = format; - Compression = compression; - DatasetType = datasetType ?? "HttpFile"; - } - - /// The relative URL based on the URL in the HttpLinkedService refers to an HTTP file Type: string (or Expression with resultType string). - public DataFactoryElement RelativeUri { get; set; } - /// The HTTP method for the HTTP request. Type: string (or Expression with resultType string). - public DataFactoryElement RequestMethod { get; set; } - /// The body for the HTTP request. Type: string (or Expression with resultType string). - public DataFactoryElement RequestBody { get; set; } - /// - /// The headers for the HTTP Request. e.g. request-header-name-1:request-header-value-1 - /// ... - /// request-header-name-n:request-header-value-n Type: string (or Expression with resultType string). - /// - public DataFactoryElement AdditionalHeaders { get; set; } - /// - /// The format of files. - /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. - /// The available derived classes include , , , and . - /// - public DatasetStorageFormat Format { get; set; } - /// The data compression method used on files. - public DatasetCompression Compression { get; set; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DataFactoryHttpFileSource.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DataFactoryHttpFileSource.Serialization.cs deleted file mode 100644 index 56c0c7e7..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DataFactoryHttpFileSource.Serialization.cs +++ /dev/null @@ -1,127 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class DataFactoryHttpFileSource : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - if (Optional.IsDefined(HttpRequestTimeout)) - { - writer.WritePropertyName("httpRequestTimeout"u8); - JsonSerializer.Serialize(writer, HttpRequestTimeout); - } - writer.WritePropertyName("type"u8); - writer.WriteStringValue(CopySourceType); - if (Optional.IsDefined(SourceRetryCount)) - { - writer.WritePropertyName("sourceRetryCount"u8); - JsonSerializer.Serialize(writer, SourceRetryCount); - } - if (Optional.IsDefined(SourceRetryWait)) - { - writer.WritePropertyName("sourceRetryWait"u8); - JsonSerializer.Serialize(writer, SourceRetryWait); - } - if (Optional.IsDefined(MaxConcurrentConnections)) - { - writer.WritePropertyName("maxConcurrentConnections"u8); - JsonSerializer.Serialize(writer, MaxConcurrentConnections); - } - if (Optional.IsDefined(DisableMetricsCollection)) - { - writer.WritePropertyName("disableMetricsCollection"u8); - JsonSerializer.Serialize(writer, DisableMetricsCollection); - } - foreach (var item in AdditionalProperties) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.Value.ToString()).RootElement); -#endif - } - writer.WriteEndObject(); - } - - internal static DataFactoryHttpFileSource DeserializeDataFactoryHttpFileSource(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - Optional> httpRequestTimeout = default; - string type = default; - Optional> sourceRetryCount = default; - Optional> sourceRetryWait = default; - Optional> maxConcurrentConnections = default; - Optional> disableMetricsCollection = default; - IDictionary> additionalProperties = default; - Dictionary> additionalPropertiesDictionary = new Dictionary>(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("httpRequestTimeout"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - httpRequestTimeout = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("type"u8)) - { - type = property.Value.GetString(); - continue; - } - if (property.NameEquals("sourceRetryCount"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - sourceRetryCount = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("sourceRetryWait"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - sourceRetryWait = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("maxConcurrentConnections"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - maxConcurrentConnections = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("disableMetricsCollection"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - disableMetricsCollection = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - additionalPropertiesDictionary.Add(property.Name, JsonSerializer.Deserialize>(property.Value.GetRawText())); - } - additionalProperties = additionalPropertiesDictionary; - return new DataFactoryHttpFileSource(type, sourceRetryCount.Value, sourceRetryWait.Value, maxConcurrentConnections.Value, disableMetricsCollection.Value, additionalProperties, httpRequestTimeout.Value); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DataFactoryHttpFileSource.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DataFactoryHttpFileSource.cs deleted file mode 100644 index 500ffae1..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DataFactoryHttpFileSource.cs +++ /dev/null @@ -1,35 +0,0 @@ -// - -#nullable disable - -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// A copy activity source for an HTTP file. - public partial class DataFactoryHttpFileSource : CopyActivitySource - { - /// Initializes a new instance of DataFactoryHttpFileSource. - public DataFactoryHttpFileSource() - { - CopySourceType = "HttpSource"; - } - - /// Initializes a new instance of DataFactoryHttpFileSource. - /// Copy source type. - /// Source retry count. Type: integer (or Expression with resultType integer). - /// Source retry wait. Type: string (or Expression with resultType string), pattern: ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). - /// The maximum concurrent connection count for the source data store. Type: integer (or Expression with resultType integer). - /// If true, disable data store metrics collection. Default is false. Type: boolean (or Expression with resultType boolean). - /// Additional Properties. - /// Specifies the timeout for a HTTP client to get HTTP response from HTTP server. The default value is equivalent to System.Net.HttpWebRequest.Timeout. Type: string (or Expression with resultType string), pattern: ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). - internal DataFactoryHttpFileSource(string copySourceType, DataFactoryElement sourceRetryCount, DataFactoryElement sourceRetryWait, DataFactoryElement maxConcurrentConnections, DataFactoryElement disableMetricsCollection, IDictionary> additionalProperties, DataFactoryElement httpRequestTimeout) : base(copySourceType, sourceRetryCount, sourceRetryWait, maxConcurrentConnections, disableMetricsCollection, additionalProperties) - { - HttpRequestTimeout = httpRequestTimeout; - CopySourceType = copySourceType ?? "HttpSource"; - } - - /// Specifies the timeout for a HTTP client to get HTTP response from HTTP server. The default value is equivalent to System.Net.HttpWebRequest.Timeout. Type: string (or Expression with resultType string), pattern: ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). - public DataFactoryElement HttpRequestTimeout { get; set; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DataFactoryIntegrationRuntimeData.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DataFactoryIntegrationRuntimeData.Serialization.cs deleted file mode 100644 index c46aa95f..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DataFactoryIntegrationRuntimeData.Serialization.cs +++ /dev/null @@ -1,78 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; -using AzureDataFactory.TestingFramework.Models; -using Azure.ResourceManager.Models; - -namespace Azure.ResourceManager.DataFactory -{ - public partial class DataFactoryIntegrationRuntimeData : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - writer.WritePropertyName("properties"u8); - writer.WriteObjectValue(Properties); - writer.WriteEndObject(); - } - - internal static DataFactoryIntegrationRuntimeData DeserializeDataFactoryIntegrationRuntimeData(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - DataFactoryIntegrationRuntimeProperties properties = default; - Optional etag = default; - ResourceIdentifier id = default; - string name = default; - ResourceType type = default; - Optional systemData = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("properties"u8)) - { - properties = DataFactoryIntegrationRuntimeProperties.DeserializeDataFactoryIntegrationRuntimeProperties(property.Value); - continue; - } - if (property.NameEquals("etag"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - etag = new ETag(property.Value.GetString()); - continue; - } - if (property.NameEquals("id"u8)) - { - id = new ResourceIdentifier(property.Value.GetString()); - continue; - } - if (property.NameEquals("name"u8)) - { - name = property.Value.GetString(); - continue; - } - if (property.NameEquals("type"u8)) - { - type = new ResourceType(property.Value.GetString()); - continue; - } - if (property.NameEquals("systemData"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - systemData = JsonSerializer.Deserialize(property.Value.GetRawText()); - continue; - } - } - return new DataFactoryIntegrationRuntimeData(id, name, type, systemData.Value, properties, Optional.ToNullable(etag)); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DataFactoryIntegrationRuntimeDebugInfo.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DataFactoryIntegrationRuntimeDebugInfo.Serialization.cs deleted file mode 100644 index 04fcbd62..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DataFactoryIntegrationRuntimeDebugInfo.Serialization.cs +++ /dev/null @@ -1,25 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class DataFactoryIntegrationRuntimeDebugInfo : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - writer.WritePropertyName("properties"u8); - writer.WriteObjectValue(Properties); - if (Optional.IsDefined(Name)) - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - writer.WriteEndObject(); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DataFactoryIntegrationRuntimeDebugInfo.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DataFactoryIntegrationRuntimeDebugInfo.cs deleted file mode 100644 index 420b5660..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DataFactoryIntegrationRuntimeDebugInfo.cs +++ /dev/null @@ -1,33 +0,0 @@ -// - -#nullable disable - -using Azure.Core; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// Integration runtime debug resource. - public partial class DataFactoryIntegrationRuntimeDebugInfo : DataFactoryDebugInfo - { - /// Initializes a new instance of DataFactoryIntegrationRuntimeDebugInfo. - /// - /// Integration runtime properties. - /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. - /// The available derived classes include and . - /// - /// is null. - public DataFactoryIntegrationRuntimeDebugInfo(DataFactoryIntegrationRuntimeProperties properties) - { - Argument.AssertNotNull(properties, nameof(properties)); - - Properties = properties; - } - - /// - /// Integration runtime properties. - /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. - /// The available derived classes include and . - /// - public DataFactoryIntegrationRuntimeProperties Properties { get; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DataFactoryIntegrationRuntimeListResult.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DataFactoryIntegrationRuntimeListResult.Serialization.cs deleted file mode 100644 index be23edba..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DataFactoryIntegrationRuntimeListResult.Serialization.cs +++ /dev/null @@ -1,42 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; -using Azure.ResourceManager.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - internal partial class DataFactoryIntegrationRuntimeListResult - { - internal static DataFactoryIntegrationRuntimeListResult DeserializeDataFactoryIntegrationRuntimeListResult(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - IReadOnlyList value = default; - Optional nextLink = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("value"u8)) - { - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - array.Add(DataFactoryIntegrationRuntimeData.DeserializeDataFactoryIntegrationRuntimeData(item)); - } - value = array; - continue; - } - if (property.NameEquals("nextLink"u8)) - { - nextLink = property.Value.GetString(); - continue; - } - } - return new DataFactoryIntegrationRuntimeListResult(value, nextLink.Value); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DataFactoryIntegrationRuntimeListResult.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DataFactoryIntegrationRuntimeListResult.cs deleted file mode 100644 index 6bfbad91..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DataFactoryIntegrationRuntimeListResult.cs +++ /dev/null @@ -1,37 +0,0 @@ -// - -#nullable disable - -using Azure.Core; -using Azure.ResourceManager.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// A list of integration runtime resources. - internal partial class DataFactoryIntegrationRuntimeListResult - { - /// Initializes a new instance of DataFactoryIntegrationRuntimeListResult. - /// List of integration runtimes. - /// is null. - internal DataFactoryIntegrationRuntimeListResult(IEnumerable value) - { - Argument.AssertNotNull(value, nameof(value)); - - Value = value.ToList(); - } - - /// Initializes a new instance of DataFactoryIntegrationRuntimeListResult. - /// List of integration runtimes. - /// The link to the next page of results, if any remaining results exist. - internal DataFactoryIntegrationRuntimeListResult(IReadOnlyList value, string nextLink) - { - Value = value; - NextLink = nextLink; - } - - /// List of integration runtimes. - public IReadOnlyList Value { get; } - /// The link to the next page of results, if any remaining results exist. - public string NextLink { get; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DataFactoryIntegrationRuntimePatch.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DataFactoryIntegrationRuntimePatch.Serialization.cs deleted file mode 100644 index 12c90ad4..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DataFactoryIntegrationRuntimePatch.Serialization.cs +++ /dev/null @@ -1,28 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class DataFactoryIntegrationRuntimePatch : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - if (Optional.IsDefined(AutoUpdate)) - { - writer.WritePropertyName("autoUpdate"u8); - writer.WriteStringValue(AutoUpdate.Value.ToString()); - } - if (Optional.IsDefined(UpdateDelayOffset)) - { - writer.WritePropertyName("updateDelayOffset"u8); - writer.WriteStringValue(UpdateDelayOffset.Value, "P"); - } - writer.WriteEndObject(); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DataFactoryIntegrationRuntimePatch.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DataFactoryIntegrationRuntimePatch.cs deleted file mode 100644 index ec99b90c..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DataFactoryIntegrationRuntimePatch.cs +++ /dev/null @@ -1,20 +0,0 @@ -// - -#nullable disable - -namespace AzureDataFactory.TestingFramework.Models -{ - /// Update integration runtime request. - public partial class DataFactoryIntegrationRuntimePatch - { - /// Initializes a new instance of DataFactoryIntegrationRuntimePatch. - public DataFactoryIntegrationRuntimePatch() - { - } - - /// Enables or disables the auto-update feature of the self-hosted integration runtime. See https://go.microsoft.com/fwlink/?linkid=854189. - public IntegrationRuntimeAutoUpdateState? AutoUpdate { get; set; } - /// The time offset (in hours) in the day, e.g., PT03H is 3 hours. The integration runtime auto update will happen on that time. - public TimeSpan? UpdateDelayOffset { get; set; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DataFactoryIntegrationRuntimeProperties.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DataFactoryIntegrationRuntimeProperties.Serialization.cs deleted file mode 100644 index 0ebf6de2..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DataFactoryIntegrationRuntimeProperties.Serialization.cs +++ /dev/null @@ -1,51 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class DataFactoryIntegrationRuntimeProperties : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - writer.WritePropertyName("type"u8); - writer.WriteStringValue(IntegrationRuntimeType.ToString()); - if (Optional.IsDefined(Description)) - { - writer.WritePropertyName("description"u8); - writer.WriteStringValue(Description); - } - foreach (var item in AdditionalProperties) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.Value.ToString()).RootElement); -#endif - } - writer.WriteEndObject(); - } - - internal static DataFactoryIntegrationRuntimeProperties DeserializeDataFactoryIntegrationRuntimeProperties(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - if (element.TryGetProperty("type", out JsonElement discriminator)) - { - switch (discriminator.GetString()) - { - case "Managed": return ManagedIntegrationRuntime.DeserializeManagedIntegrationRuntime(element); - case "SelfHosted": return SelfHostedIntegrationRuntime.DeserializeSelfHostedIntegrationRuntime(element); - } - } - return UnknownIntegrationRuntime.DeserializeUnknownIntegrationRuntime(element); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DataFactoryIntegrationRuntimeProperties.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DataFactoryIntegrationRuntimeProperties.cs deleted file mode 100644 index aa87bdb9..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DataFactoryIntegrationRuntimeProperties.cs +++ /dev/null @@ -1,70 +0,0 @@ -// - -#nullable disable - -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// - /// Azure Data Factory nested object which serves as a compute resource for activities. - /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. - /// The available derived classes include and . - /// - public partial class DataFactoryIntegrationRuntimeProperties - { - /// Initializes a new instance of DataFactoryIntegrationRuntimeProperties. - public DataFactoryIntegrationRuntimeProperties() - { - AdditionalProperties = new ChangeTrackingDictionary>(); - } - - /// Initializes a new instance of DataFactoryIntegrationRuntimeProperties. - /// Type of integration runtime. - /// Integration runtime description. - /// Additional Properties. - internal DataFactoryIntegrationRuntimeProperties(IntegrationRuntimeType integrationRuntimeType, string description, IDictionary> additionalProperties) - { - IntegrationRuntimeType = integrationRuntimeType; - Description = description; - AdditionalProperties = additionalProperties; - } - - /// Type of integration runtime. - internal IntegrationRuntimeType IntegrationRuntimeType { get; set; } - /// Integration runtime description. - public string Description { get; set; } - /// - /// Additional Properties - /// - /// To assign an object to the value of this property use . - /// - /// - /// To assign an already formated json string to this property use . - /// - /// - /// Examples: - /// - /// - /// BinaryData.FromObjectAsJson("foo") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromString("\"foo\"") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromObjectAsJson(new { key = "value" }) - /// Creates a payload of { "key": "value" }. - /// - /// - /// BinaryData.FromString("{\"key\": \"value\"}") - /// Creates a payload of { "key": "value" }. - /// - /// - /// - /// - public IDictionary> AdditionalProperties { get; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DataFactoryIntegrationRuntimeStatusResult.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DataFactoryIntegrationRuntimeStatusResult.Serialization.cs deleted file mode 100644 index 64ca8103..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DataFactoryIntegrationRuntimeStatusResult.Serialization.cs +++ /dev/null @@ -1,36 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class DataFactoryIntegrationRuntimeStatusResult - { - internal static DataFactoryIntegrationRuntimeStatusResult DeserializeDataFactoryIntegrationRuntimeStatusResult(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - Optional name = default; - IntegrationRuntimeStatus properties = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("name"u8)) - { - name = property.Value.GetString(); - continue; - } - if (property.NameEquals("properties"u8)) - { - properties = IntegrationRuntimeStatus.DeserializeIntegrationRuntimeStatus(property.Value); - continue; - } - } - return new DataFactoryIntegrationRuntimeStatusResult(name.Value, properties); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DataFactoryIntegrationRuntimeStatusResult.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DataFactoryIntegrationRuntimeStatusResult.cs deleted file mode 100644 index e3da6720..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DataFactoryIntegrationRuntimeStatusResult.cs +++ /dev/null @@ -1,48 +0,0 @@ -// - -#nullable disable - -using Azure.Core; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// Integration runtime status response. - public partial class DataFactoryIntegrationRuntimeStatusResult - { - /// Initializes a new instance of DataFactoryIntegrationRuntimeStatusResult. - /// - /// Integration runtime properties. - /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. - /// The available derived classes include and . - /// - /// is null. - internal DataFactoryIntegrationRuntimeStatusResult(IntegrationRuntimeStatus properties) - { - Argument.AssertNotNull(properties, nameof(properties)); - - Properties = properties; - } - - /// Initializes a new instance of DataFactoryIntegrationRuntimeStatusResult. - /// The integration runtime name. - /// - /// Integration runtime properties. - /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. - /// The available derived classes include and . - /// - internal DataFactoryIntegrationRuntimeStatusResult(string name, IntegrationRuntimeStatus properties) - { - Name = name; - Properties = properties; - } - - /// The integration runtime name. - public string Name { get; } - /// - /// Integration runtime properties. - /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. - /// The available derived classes include and . - /// - public IntegrationRuntimeStatus Properties { get; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DataFactoryLinkedServiceData.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DataFactoryLinkedServiceData.Serialization.cs deleted file mode 100644 index 317bdf02..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DataFactoryLinkedServiceData.Serialization.cs +++ /dev/null @@ -1,78 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; -using AzureDataFactory.TestingFramework.Models; -using Azure.ResourceManager.Models; - -namespace Azure.ResourceManager.DataFactory -{ - public partial class DataFactoryLinkedServiceData : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - writer.WritePropertyName("properties"u8); - writer.WriteObjectValue(Properties); - writer.WriteEndObject(); - } - - internal static DataFactoryLinkedServiceData DeserializeDataFactoryLinkedServiceData(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - DataFactoryLinkedServiceProperties properties = default; - Optional etag = default; - ResourceIdentifier id = default; - string name = default; - ResourceType type = default; - Optional systemData = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("properties"u8)) - { - properties = DataFactoryLinkedServiceProperties.DeserializeDataFactoryLinkedServiceProperties(property.Value); - continue; - } - if (property.NameEquals("etag"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - etag = new ETag(property.Value.GetString()); - continue; - } - if (property.NameEquals("id"u8)) - { - id = new ResourceIdentifier(property.Value.GetString()); - continue; - } - if (property.NameEquals("name"u8)) - { - name = property.Value.GetString(); - continue; - } - if (property.NameEquals("type"u8)) - { - type = new ResourceType(property.Value.GetString()); - continue; - } - if (property.NameEquals("systemData"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - systemData = JsonSerializer.Deserialize(property.Value.GetRawText()); - continue; - } - } - return new DataFactoryLinkedServiceData(id, name, type, systemData.Value, properties, Optional.ToNullable(etag)); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DataFactoryLinkedServiceDebugInfo.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DataFactoryLinkedServiceDebugInfo.Serialization.cs deleted file mode 100644 index 66602a4f..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DataFactoryLinkedServiceDebugInfo.Serialization.cs +++ /dev/null @@ -1,25 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class DataFactoryLinkedServiceDebugInfo : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - writer.WritePropertyName("properties"u8); - writer.WriteObjectValue(Properties); - if (Optional.IsDefined(Name)) - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - writer.WriteEndObject(); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DataFactoryLinkedServiceDebugInfo.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DataFactoryLinkedServiceDebugInfo.cs deleted file mode 100644 index 842e3272..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DataFactoryLinkedServiceDebugInfo.cs +++ /dev/null @@ -1,33 +0,0 @@ -// - -#nullable disable - -using Azure.Core; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// Linked service debug resource. - public partial class DataFactoryLinkedServiceDebugInfo : DataFactoryDebugInfo - { - /// Initializes a new instance of DataFactoryLinkedServiceDebugInfo. - /// - /// Properties of linked service. - /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. - /// The available derived classes include , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , and . - /// - /// is null. - public DataFactoryLinkedServiceDebugInfo(DataFactoryLinkedServiceProperties properties) - { - Argument.AssertNotNull(properties, nameof(properties)); - - Properties = properties; - } - - /// - /// Properties of linked service. - /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. - /// The available derived classes include , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , and . - /// - public DataFactoryLinkedServiceProperties Properties { get; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DataFactoryLinkedServiceListResult.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DataFactoryLinkedServiceListResult.Serialization.cs deleted file mode 100644 index deabdbdd..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DataFactoryLinkedServiceListResult.Serialization.cs +++ /dev/null @@ -1,42 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; -using Azure.ResourceManager.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - internal partial class DataFactoryLinkedServiceListResult - { - internal static DataFactoryLinkedServiceListResult DeserializeDataFactoryLinkedServiceListResult(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - IReadOnlyList value = default; - Optional nextLink = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("value"u8)) - { - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - array.Add(DataFactoryLinkedServiceData.DeserializeDataFactoryLinkedServiceData(item)); - } - value = array; - continue; - } - if (property.NameEquals("nextLink"u8)) - { - nextLink = property.Value.GetString(); - continue; - } - } - return new DataFactoryLinkedServiceListResult(value, nextLink.Value); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DataFactoryLinkedServiceListResult.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DataFactoryLinkedServiceListResult.cs deleted file mode 100644 index 815b9e55..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DataFactoryLinkedServiceListResult.cs +++ /dev/null @@ -1,37 +0,0 @@ -// - -#nullable disable - -using Azure.Core; -using Azure.ResourceManager.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// A list of linked service resources. - internal partial class DataFactoryLinkedServiceListResult - { - /// Initializes a new instance of DataFactoryLinkedServiceListResult. - /// List of linked services. - /// is null. - internal DataFactoryLinkedServiceListResult(IEnumerable value) - { - Argument.AssertNotNull(value, nameof(value)); - - Value = value.ToList(); - } - - /// Initializes a new instance of DataFactoryLinkedServiceListResult. - /// List of linked services. - /// The link to the next page of results, if any remaining results exist. - internal DataFactoryLinkedServiceListResult(IReadOnlyList value, string nextLink) - { - Value = value; - NextLink = nextLink; - } - - /// List of linked services. - public IReadOnlyList Value { get; } - /// The link to the next page of results, if any remaining results exist. - public string NextLink { get; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DataFactoryLinkedServiceProperties.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DataFactoryLinkedServiceProperties.Serialization.cs deleted file mode 100644 index ec57f5e6..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DataFactoryLinkedServiceProperties.Serialization.cs +++ /dev/null @@ -1,197 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class DataFactoryLinkedServiceProperties : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - writer.WritePropertyName("type"u8); - writer.WriteStringValue(LinkedServiceType); - if (Optional.IsDefined(ConnectVia)) - { - writer.WritePropertyName("connectVia"u8); - writer.WriteObjectValue(ConnectVia); - } - if (Optional.IsDefined(Description)) - { - writer.WritePropertyName("description"u8); - writer.WriteStringValue(Description); - } - if (Optional.IsCollectionDefined(Parameters)) - { - writer.WritePropertyName("parameters"u8); - writer.WriteStartObject(); - foreach (var item in Parameters) - { - writer.WritePropertyName(item.Key); - writer.WriteObjectValue(item.Value); - } - writer.WriteEndObject(); - } - if (Optional.IsCollectionDefined(Annotations)) - { - writer.WritePropertyName("annotations"u8); - writer.WriteStartArray(); - foreach (var item in Annotations) - { - if (item == null) - { - writer.WriteNullValue(); - continue; - } -#if NET6_0_OR_GREATER - writer.WriteRawValue(item); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.ToString()).RootElement); -#endif - } - writer.WriteEndArray(); - } - foreach (var item in AdditionalProperties) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.Value.ToString()).RootElement); -#endif - } - writer.WriteEndObject(); - } - - internal static DataFactoryLinkedServiceProperties DeserializeDataFactoryLinkedServiceProperties(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - if (element.TryGetProperty("type", out JsonElement discriminator)) - { - switch (discriminator.GetString()) - { - case "AmazonMWS": return AmazonMwsLinkedService.DeserializeAmazonMwsLinkedService(element); - case "AmazonRdsForOracle": return AmazonRdsForOracleLinkedService.DeserializeAmazonRdsForOracleLinkedService(element); - case "AmazonRdsForSqlServer": return AmazonRdsForSqlServerLinkedService.DeserializeAmazonRdsForSqlServerLinkedService(element); - case "AmazonRedshift": return AmazonRedshiftLinkedService.DeserializeAmazonRedshiftLinkedService(element); - case "AmazonS3": return AmazonS3LinkedService.DeserializeAmazonS3LinkedService(element); - case "AmazonS3Compatible": return AmazonS3CompatibleLinkedService.DeserializeAmazonS3CompatibleLinkedService(element); - case "AppFigures": return AppFiguresLinkedService.DeserializeAppFiguresLinkedService(element); - case "Asana": return AsanaLinkedService.DeserializeAsanaLinkedService(element); - case "AzureBatch": return AzureBatchLinkedService.DeserializeAzureBatchLinkedService(element); - case "AzureBlobFS": return AzureBlobFSLinkedService.DeserializeAzureBlobFSLinkedService(element); - case "AzureBlobStorage": return AzureBlobStorageLinkedService.DeserializeAzureBlobStorageLinkedService(element); - case "AzureDataExplorer": return AzureDataExplorerLinkedService.DeserializeAzureDataExplorerLinkedService(element); - case "AzureDataLakeAnalytics": return AzureDataLakeAnalyticsLinkedService.DeserializeAzureDataLakeAnalyticsLinkedService(element); - case "AzureDataLakeStore": return AzureDataLakeStoreLinkedService.DeserializeAzureDataLakeStoreLinkedService(element); - case "AzureDatabricks": return AzureDatabricksLinkedService.DeserializeAzureDatabricksLinkedService(element); - case "AzureDatabricksDeltaLake": return AzureDatabricksDeltaLakeLinkedService.DeserializeAzureDatabricksDeltaLakeLinkedService(element); - case "AzureFileStorage": return AzureFileStorageLinkedService.DeserializeAzureFileStorageLinkedService(element); - case "AzureFunction": return AzureFunctionLinkedService.DeserializeAzureFunctionLinkedService(element); - case "AzureKeyVault": return AzureKeyVaultLinkedService.DeserializeAzureKeyVaultLinkedService(element); - case "AzureML": return AzureMLLinkedService.DeserializeAzureMLLinkedService(element); - case "AzureMLService": return AzureMLServiceLinkedService.DeserializeAzureMLServiceLinkedService(element); - case "AzureMariaDB": return AzureMariaDBLinkedService.DeserializeAzureMariaDBLinkedService(element); - case "AzureMySql": return AzureMySqlLinkedService.DeserializeAzureMySqlLinkedService(element); - case "AzurePostgreSql": return AzurePostgreSqlLinkedService.DeserializeAzurePostgreSqlLinkedService(element); - case "AzureSearch": return AzureSearchLinkedService.DeserializeAzureSearchLinkedService(element); - case "AzureSqlDW": return AzureSqlDWLinkedService.DeserializeAzureSqlDWLinkedService(element); - case "AzureSqlDatabase": return AzureSqlDatabaseLinkedService.DeserializeAzureSqlDatabaseLinkedService(element); - case "AzureSqlMI": return AzureSqlMILinkedService.DeserializeAzureSqlMILinkedService(element); - case "AzureStorage": return AzureStorageLinkedService.DeserializeAzureStorageLinkedService(element); - case "AzureSynapseArtifacts": return AzureSynapseArtifactsLinkedService.DeserializeAzureSynapseArtifactsLinkedService(element); - case "AzureTableStorage": return AzureTableStorageLinkedService.DeserializeAzureTableStorageLinkedService(element); - case "Cassandra": return CassandraLinkedService.DeserializeCassandraLinkedService(element); - case "CommonDataServiceForApps": return CommonDataServiceForAppsLinkedService.DeserializeCommonDataServiceForAppsLinkedService(element); - case "Concur": return ConcurLinkedService.DeserializeConcurLinkedService(element); - case "CosmosDb": return CosmosDBLinkedService.DeserializeCosmosDBLinkedService(element); - case "CosmosDbMongoDbApi": return CosmosDBMongoDBApiLinkedService.DeserializeCosmosDBMongoDBApiLinkedService(element); - case "Couchbase": return CouchbaseLinkedService.DeserializeCouchbaseLinkedService(element); - case "CustomDataSource": return CustomDataSourceLinkedService.DeserializeCustomDataSourceLinkedService(element); - case "Dataworld": return DataworldLinkedService.DeserializeDataworldLinkedService(element); - case "Db2": return Db2LinkedService.DeserializeDb2LinkedService(element); - case "Drill": return DrillLinkedService.DeserializeDrillLinkedService(element); - case "Dynamics": return DynamicsLinkedService.DeserializeDynamicsLinkedService(element); - case "DynamicsAX": return DynamicsAXLinkedService.DeserializeDynamicsAXLinkedService(element); - case "DynamicsCrm": return DynamicsCrmLinkedService.DeserializeDynamicsCrmLinkedService(element); - case "Eloqua": return EloquaLinkedService.DeserializeEloquaLinkedService(element); - case "FileServer": return FileServerLinkedService.DeserializeFileServerLinkedService(element); - case "FtpServer": return FtpServerLinkedService.DeserializeFtpServerLinkedService(element); - case "GoogleAdWords": return GoogleAdWordsLinkedService.DeserializeGoogleAdWordsLinkedService(element); - case "GoogleBigQuery": return GoogleBigQueryLinkedService.DeserializeGoogleBigQueryLinkedService(element); - case "GoogleCloudStorage": return GoogleCloudStorageLinkedService.DeserializeGoogleCloudStorageLinkedService(element); - case "GoogleSheets": return GoogleSheetsLinkedService.DeserializeGoogleSheetsLinkedService(element); - case "Greenplum": return GreenplumLinkedService.DeserializeGreenplumLinkedService(element); - case "HBase": return HBaseLinkedService.DeserializeHBaseLinkedService(element); - case "HDInsight": return HDInsightLinkedService.DeserializeHDInsightLinkedService(element); - case "HDInsightOnDemand": return HDInsightOnDemandLinkedService.DeserializeHDInsightOnDemandLinkedService(element); - case "Hdfs": return HdfsLinkedService.DeserializeHdfsLinkedService(element); - case "Hive": return HiveLinkedService.DeserializeHiveLinkedService(element); - case "HttpServer": return HttpLinkedService.DeserializeHttpLinkedService(element); - case "Hubspot": return HubspotLinkedService.DeserializeHubspotLinkedService(element); - case "Impala": return ImpalaLinkedService.DeserializeImpalaLinkedService(element); - case "Informix": return InformixLinkedService.DeserializeInformixLinkedService(element); - case "Jira": return JiraLinkedService.DeserializeJiraLinkedService(element); - case "Magento": return MagentoLinkedService.DeserializeMagentoLinkedService(element); - case "MariaDB": return MariaDBLinkedService.DeserializeMariaDBLinkedService(element); - case "Marketo": return MarketoLinkedService.DeserializeMarketoLinkedService(element); - case "MicrosoftAccess": return MicrosoftAccessLinkedService.DeserializeMicrosoftAccessLinkedService(element); - case "MongoDb": return MongoDBLinkedService.DeserializeMongoDBLinkedService(element); - case "MongoDbAtlas": return MongoDBAtlasLinkedService.DeserializeMongoDBAtlasLinkedService(element); - case "MongoDbV2": return MongoDBV2LinkedService.DeserializeMongoDBV2LinkedService(element); - case "MySql": return MySqlLinkedService.DeserializeMySqlLinkedService(element); - case "Netezza": return NetezzaLinkedService.DeserializeNetezzaLinkedService(element); - case "OData": return ODataLinkedService.DeserializeODataLinkedService(element); - case "Odbc": return OdbcLinkedService.DeserializeOdbcLinkedService(element); - case "Office365": return Office365LinkedService.DeserializeOffice365LinkedService(element); - case "Oracle": return OracleLinkedService.DeserializeOracleLinkedService(element); - case "OracleCloudStorage": return OracleCloudStorageLinkedService.DeserializeOracleCloudStorageLinkedService(element); - case "OracleServiceCloud": return OracleServiceCloudLinkedService.DeserializeOracleServiceCloudLinkedService(element); - case "Paypal": return PaypalLinkedService.DeserializePaypalLinkedService(element); - case "Phoenix": return PhoenixLinkedService.DeserializePhoenixLinkedService(element); - case "PostgreSql": return PostgreSqlLinkedService.DeserializePostgreSqlLinkedService(element); - case "Presto": return PrestoLinkedService.DeserializePrestoLinkedService(element); - case "QuickBooks": return QuickBooksLinkedService.DeserializeQuickBooksLinkedService(element); - case "Quickbase": return QuickbaseLinkedService.DeserializeQuickbaseLinkedService(element); - case "Responsys": return ResponsysLinkedService.DeserializeResponsysLinkedService(element); - case "RestService": return RestServiceLinkedService.DeserializeRestServiceLinkedService(element); - case "Salesforce": return SalesforceLinkedService.DeserializeSalesforceLinkedService(element); - case "SalesforceMarketingCloud": return SalesforceMarketingCloudLinkedService.DeserializeSalesforceMarketingCloudLinkedService(element); - case "SalesforceServiceCloud": return SalesforceServiceCloudLinkedService.DeserializeSalesforceServiceCloudLinkedService(element); - case "SapBW": return SapBWLinkedService.DeserializeSapBWLinkedService(element); - case "SapCloudForCustomer": return SapCloudForCustomerLinkedService.DeserializeSapCloudForCustomerLinkedService(element); - case "SapEcc": return SapEccLinkedService.DeserializeSapEccLinkedService(element); - case "SapHana": return SapHanaLinkedService.DeserializeSapHanaLinkedService(element); - case "SapOdp": return SapOdpLinkedService.DeserializeSapOdpLinkedService(element); - case "SapOpenHub": return SapOpenHubLinkedService.DeserializeSapOpenHubLinkedService(element); - case "SapTable": return SapTableLinkedService.DeserializeSapTableLinkedService(element); - case "ServiceNow": return ServiceNowLinkedService.DeserializeServiceNowLinkedService(element); - case "Sftp": return SftpServerLinkedService.DeserializeSftpServerLinkedService(element); - case "SharePointOnlineList": return SharePointOnlineListLinkedService.DeserializeSharePointOnlineListLinkedService(element); - case "Shopify": return ShopifyLinkedService.DeserializeShopifyLinkedService(element); - case "Smartsheet": return SmartsheetLinkedService.DeserializeSmartsheetLinkedService(element); - case "Snowflake": return SnowflakeLinkedService.DeserializeSnowflakeLinkedService(element); - case "Spark": return SparkLinkedService.DeserializeSparkLinkedService(element); - case "SqlServer": return SqlServerLinkedService.DeserializeSqlServerLinkedService(element); - case "Square": return SquareLinkedService.DeserializeSquareLinkedService(element); - case "Sybase": return SybaseLinkedService.DeserializeSybaseLinkedService(element); - case "TeamDesk": return TeamDeskLinkedService.DeserializeTeamDeskLinkedService(element); - case "Teradata": return TeradataLinkedService.DeserializeTeradataLinkedService(element); - case "Twilio": return TwilioLinkedService.DeserializeTwilioLinkedService(element); - case "Vertica": return VerticaLinkedService.DeserializeVerticaLinkedService(element); - case "Web": return WebLinkedService.DeserializeWebLinkedService(element); - case "Xero": return XeroLinkedService.DeserializeXeroLinkedService(element); - case "Zendesk": return ZendeskLinkedService.DeserializeZendeskLinkedService(element); - case "Zoho": return ZohoLinkedService.DeserializeZohoLinkedService(element); - } - } - return UnknownLinkedService.DeserializeUnknownLinkedService(element); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DataFactoryLinkedServiceProperties.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DataFactoryLinkedServiceProperties.cs deleted file mode 100644 index 0085af3d..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DataFactoryLinkedServiceProperties.cs +++ /dev/null @@ -1,113 +0,0 @@ -// - -#nullable disable - -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// - /// The nested object which contains the information and credential which can be used to connect with related store or compute resource. - /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. - /// The available derived classes include , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , and . - /// - public partial class DataFactoryLinkedServiceProperties - { - /// Initializes a new instance of DataFactoryLinkedServiceProperties. - public DataFactoryLinkedServiceProperties() - { - Parameters = new ChangeTrackingDictionary(); - Annotations = new ChangeTrackingList(); - AdditionalProperties = new ChangeTrackingDictionary>(); - } - - /// Initializes a new instance of DataFactoryLinkedServiceProperties. - /// Type of linked service. - /// The integration runtime reference. - /// Linked service description. - /// Parameters for linked service. - /// List of tags that can be used for describing the linked service. - /// Additional Properties. - internal DataFactoryLinkedServiceProperties(string linkedServiceType, IntegrationRuntimeReference connectVia, string description, IDictionary parameters, IList annotations, IDictionary> additionalProperties) - { - LinkedServiceType = linkedServiceType; - ConnectVia = connectVia; - Description = description; - Parameters = parameters; - Annotations = annotations; - AdditionalProperties = additionalProperties; - } - - /// Type of linked service. - internal string LinkedServiceType { get; set; } - /// The integration runtime reference. - public IntegrationRuntimeReference ConnectVia { get; set; } - /// Linked service description. - public string Description { get; set; } - /// Parameters for linked service. - public IDictionary Parameters { get; } - /// - /// List of tags that can be used for describing the linked service. - /// - /// To assign an object to the element of this property use . - /// - /// - /// To assign an already formated json string to this property use . - /// - /// - /// Examples: - /// - /// - /// BinaryData.FromObjectAsJson("foo") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromString("\"foo\"") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromObjectAsJson(new { key = "value" }) - /// Creates a payload of { "key": "value" }. - /// - /// - /// BinaryData.FromString("{\"key\": \"value\"}") - /// Creates a payload of { "key": "value" }. - /// - /// - /// - /// - public IList Annotations { get; } - /// - /// Additional Properties - /// - /// To assign an object to the value of this property use . - /// - /// - /// To assign an already formated json string to this property use . - /// - /// - /// Examples: - /// - /// - /// BinaryData.FromObjectAsJson("foo") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromString("\"foo\"") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromObjectAsJson(new { key = "value" }) - /// Creates a payload of { "key": "value" }. - /// - /// - /// BinaryData.FromString("{\"key\": \"value\"}") - /// Creates a payload of { "key": "value" }. - /// - /// - /// - /// - public IDictionary> AdditionalProperties { get; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DataFactoryListResult.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DataFactoryListResult.Serialization.cs deleted file mode 100644 index e81ff555..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DataFactoryListResult.Serialization.cs +++ /dev/null @@ -1,42 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; -using Azure.ResourceManager.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - internal partial class DataFactoryListResult - { - internal static DataFactoryListResult DeserializeDataFactoryListResult(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - IReadOnlyList value = default; - Optional nextLink = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("value"u8)) - { - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - array.Add(DataFactoryData.DeserializeDataFactoryData(item)); - } - value = array; - continue; - } - if (property.NameEquals("nextLink"u8)) - { - nextLink = property.Value.GetString(); - continue; - } - } - return new DataFactoryListResult(value, nextLink.Value); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DataFactoryListResult.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DataFactoryListResult.cs deleted file mode 100644 index 65ac7094..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DataFactoryListResult.cs +++ /dev/null @@ -1,37 +0,0 @@ -// - -#nullable disable - -using Azure.Core; -using Azure.ResourceManager.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// A list of factory resources. - internal partial class DataFactoryListResult - { - /// Initializes a new instance of DataFactoryListResult. - /// List of factories. - /// is null. - internal DataFactoryListResult(IEnumerable value) - { - Argument.AssertNotNull(value, nameof(value)); - - Value = value.ToList(); - } - - /// Initializes a new instance of DataFactoryListResult. - /// List of factories. - /// The link to the next page of results, if any remaining results exist. - internal DataFactoryListResult(IReadOnlyList value, string nextLink) - { - Value = value; - NextLink = nextLink; - } - - /// List of factories. - public IReadOnlyList Value { get; } - /// The link to the next page of results, if any remaining results exist. - public string NextLink { get; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DataFactoryLogSettings.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DataFactoryLogSettings.Serialization.cs deleted file mode 100644 index 9b5fe12d..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DataFactoryLogSettings.Serialization.cs +++ /dev/null @@ -1,69 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class DataFactoryLogSettings : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - if (Optional.IsDefined(EnableCopyActivityLog)) - { - writer.WritePropertyName("enableCopyActivityLog"u8); - JsonSerializer.Serialize(writer, EnableCopyActivityLog); - } - if (Optional.IsDefined(CopyActivityLogSettings)) - { - writer.WritePropertyName("copyActivityLogSettings"u8); - writer.WriteObjectValue(CopyActivityLogSettings); - } - writer.WritePropertyName("logLocationSettings"u8); - writer.WriteObjectValue(LogLocationSettings); - writer.WriteEndObject(); - } - - internal static DataFactoryLogSettings DeserializeDataFactoryLogSettings(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - Optional> enableCopyActivityLog = default; - Optional copyActivityLogSettings = default; - LogLocationSettings logLocationSettings = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("enableCopyActivityLog"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - enableCopyActivityLog = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("copyActivityLogSettings"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - copyActivityLogSettings = CopyActivityLogSettings.DeserializeCopyActivityLogSettings(property.Value); - continue; - } - if (property.NameEquals("logLocationSettings"u8)) - { - logLocationSettings = LogLocationSettings.DeserializeLogLocationSettings(property.Value); - continue; - } - } - return new DataFactoryLogSettings(enableCopyActivityLog.Value, copyActivityLogSettings.Value, logLocationSettings); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DataFactoryLogSettings.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DataFactoryLogSettings.cs deleted file mode 100644 index 61b25c01..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DataFactoryLogSettings.cs +++ /dev/null @@ -1,41 +0,0 @@ -// - -#nullable disable - -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// Log settings. - public partial class DataFactoryLogSettings - { - /// Initializes a new instance of DataFactoryLogSettings. - /// Log location settings customer needs to provide when enabling log. - /// is null. - public DataFactoryLogSettings(LogLocationSettings logLocationSettings) - { - Argument.AssertNotNull(logLocationSettings, nameof(logLocationSettings)); - - LogLocationSettings = logLocationSettings; - } - - /// Initializes a new instance of DataFactoryLogSettings. - /// Specifies whether to enable copy activity log. Type: boolean (or Expression with resultType boolean). - /// Specifies settings for copy activity log. - /// Log location settings customer needs to provide when enabling log. - internal DataFactoryLogSettings(DataFactoryElement enableCopyActivityLog, CopyActivityLogSettings copyActivityLogSettings, LogLocationSettings logLocationSettings) - { - EnableCopyActivityLog = enableCopyActivityLog; - CopyActivityLogSettings = copyActivityLogSettings; - LogLocationSettings = logLocationSettings; - } - - /// Specifies whether to enable copy activity log. Type: boolean (or Expression with resultType boolean). - public DataFactoryElement EnableCopyActivityLog { get; set; } - /// Specifies settings for copy activity log. - public CopyActivityLogSettings CopyActivityLogSettings { get; set; } - /// Log location settings customer needs to provide when enabling log. - public LogLocationSettings LogLocationSettings { get; set; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DataFactoryManagedIdentityCredentialData.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DataFactoryManagedIdentityCredentialData.Serialization.cs deleted file mode 100644 index aaa4f358..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DataFactoryManagedIdentityCredentialData.Serialization.cs +++ /dev/null @@ -1,78 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; -using AzureDataFactory.TestingFramework.Models; -using Azure.ResourceManager.Models; - -namespace Azure.ResourceManager.DataFactory -{ - public partial class DataFactoryManagedIdentityCredentialData : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - writer.WritePropertyName("properties"u8); - writer.WriteObjectValue(Properties); - writer.WriteEndObject(); - } - - internal static DataFactoryManagedIdentityCredentialData DeserializeDataFactoryManagedIdentityCredentialData(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - DataFactoryManagedIdentityCredentialProperties properties = default; - Optional etag = default; - ResourceIdentifier id = default; - string name = default; - ResourceType type = default; - Optional systemData = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("properties"u8)) - { - properties = DataFactoryManagedIdentityCredentialProperties.DeserializeDataFactoryManagedIdentityCredentialProperties(property.Value); - continue; - } - if (property.NameEquals("etag"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - etag = new ETag(property.Value.GetString()); - continue; - } - if (property.NameEquals("id"u8)) - { - id = new ResourceIdentifier(property.Value.GetString()); - continue; - } - if (property.NameEquals("name"u8)) - { - name = property.Value.GetString(); - continue; - } - if (property.NameEquals("type"u8)) - { - type = new ResourceType(property.Value.GetString()); - continue; - } - if (property.NameEquals("systemData"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - systemData = JsonSerializer.Deserialize(property.Value.GetRawText()); - continue; - } - } - return new DataFactoryManagedIdentityCredentialData(id, name, type, systemData.Value, properties, Optional.ToNullable(etag)); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DataFactoryManagedIdentityCredentialProperties.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DataFactoryManagedIdentityCredentialProperties.Serialization.cs deleted file mode 100644 index 4d19c9ae..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DataFactoryManagedIdentityCredentialProperties.Serialization.cs +++ /dev/null @@ -1,134 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class DataFactoryManagedIdentityCredentialProperties : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - writer.WritePropertyName("type"u8); - writer.WriteStringValue(CredentialType); - if (Optional.IsDefined(Description)) - { - writer.WritePropertyName("description"u8); - writer.WriteStringValue(Description); - } - if (Optional.IsCollectionDefined(Annotations)) - { - writer.WritePropertyName("annotations"u8); - writer.WriteStartArray(); - foreach (var item in Annotations) - { - if (item == null) - { - writer.WriteNullValue(); - continue; - } -#if NET6_0_OR_GREATER - writer.WriteRawValue(item); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.ToString()).RootElement); -#endif - } - writer.WriteEndArray(); - } - writer.WritePropertyName("typeProperties"u8); - writer.WriteStartObject(); - if (Optional.IsDefined(ResourceId)) - { - writer.WritePropertyName("resourceId"u8); - writer.WriteStringValue(ResourceId); - } - writer.WriteEndObject(); - foreach (var item in AdditionalProperties) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.Value.ToString()).RootElement); -#endif - } - writer.WriteEndObject(); - } - - internal static DataFactoryManagedIdentityCredentialProperties DeserializeDataFactoryManagedIdentityCredentialProperties(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - string type = default; - Optional description = default; - Optional> annotations = default; - Optional resourceId = default; - IDictionary> additionalProperties = default; - Dictionary> additionalPropertiesDictionary = new Dictionary>(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("type"u8)) - { - type = property.Value.GetString(); - continue; - } - if (property.NameEquals("description"u8)) - { - description = property.Value.GetString(); - continue; - } - if (property.NameEquals("annotations"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - if (item.ValueKind == JsonValueKind.Null) - { - array.Add(null); - } - else - { - array.Add(BinaryData.FromString(item.GetRawText())); - } - } - annotations = array; - continue; - } - if (property.NameEquals("typeProperties"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - foreach (var property0 in property.Value.EnumerateObject()) - { - if (property0.NameEquals("resourceId"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - resourceId = new ResourceIdentifier(property0.Value.GetString()); - continue; - } - } - continue; - } - additionalPropertiesDictionary.Add(property.Name, JsonSerializer.Deserialize>(property.Value.GetRawText())); - } - additionalProperties = additionalPropertiesDictionary; - return new DataFactoryManagedIdentityCredentialProperties(type, description.Value, Optional.ToList(annotations), additionalProperties, resourceId.Value); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DataFactoryManagedIdentityCredentialProperties.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DataFactoryManagedIdentityCredentialProperties.cs deleted file mode 100644 index a44ff6e2..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DataFactoryManagedIdentityCredentialProperties.cs +++ /dev/null @@ -1,34 +0,0 @@ -// - -#nullable disable - -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// Managed identity credential. - public partial class DataFactoryManagedIdentityCredentialProperties : DataFactoryCredential - { - /// Initializes a new instance of DataFactoryManagedIdentityCredentialProperties. - public DataFactoryManagedIdentityCredentialProperties() - { - CredentialType = "ManagedIdentity"; - } - - /// Initializes a new instance of DataFactoryManagedIdentityCredentialProperties. - /// Type of credential. - /// Credential description. - /// List of tags that can be used for describing the Credential. - /// Additional Properties. - /// The resource id of user assigned managed identity. - internal DataFactoryManagedIdentityCredentialProperties(string credentialType, string description, IList annotations, IDictionary> additionalProperties, ResourceIdentifier resourceId) : base(credentialType, description, annotations, additionalProperties) - { - ResourceId = resourceId; - CredentialType = credentialType ?? "ManagedIdentity"; - } - - /// The resource id of user assigned managed identity. - public ResourceIdentifier ResourceId { get; set; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DataFactoryManagedVirtualNetworkData.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DataFactoryManagedVirtualNetworkData.Serialization.cs deleted file mode 100644 index 1dfa9aa9..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DataFactoryManagedVirtualNetworkData.Serialization.cs +++ /dev/null @@ -1,78 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; -using AzureDataFactory.TestingFramework.Models; -using Azure.ResourceManager.Models; - -namespace Azure.ResourceManager.DataFactory -{ - public partial class DataFactoryManagedVirtualNetworkData : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - writer.WritePropertyName("properties"u8); - writer.WriteObjectValue(Properties); - writer.WriteEndObject(); - } - - internal static DataFactoryManagedVirtualNetworkData DeserializeDataFactoryManagedVirtualNetworkData(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - DataFactoryManagedVirtualNetworkProperties properties = default; - Optional etag = default; - ResourceIdentifier id = default; - string name = default; - ResourceType type = default; - Optional systemData = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("properties"u8)) - { - properties = DataFactoryManagedVirtualNetworkProperties.DeserializeDataFactoryManagedVirtualNetworkProperties(property.Value); - continue; - } - if (property.NameEquals("etag"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - etag = new ETag(property.Value.GetString()); - continue; - } - if (property.NameEquals("id"u8)) - { - id = new ResourceIdentifier(property.Value.GetString()); - continue; - } - if (property.NameEquals("name"u8)) - { - name = property.Value.GetString(); - continue; - } - if (property.NameEquals("type"u8)) - { - type = new ResourceType(property.Value.GetString()); - continue; - } - if (property.NameEquals("systemData"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - systemData = JsonSerializer.Deserialize(property.Value.GetRawText()); - continue; - } - } - return new DataFactoryManagedVirtualNetworkData(id, name, type, systemData.Value, properties, Optional.ToNullable(etag)); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DataFactoryManagedVirtualNetworkListResult.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DataFactoryManagedVirtualNetworkListResult.Serialization.cs deleted file mode 100644 index 0718a2e7..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DataFactoryManagedVirtualNetworkListResult.Serialization.cs +++ /dev/null @@ -1,42 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; -using Azure.ResourceManager.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - internal partial class DataFactoryManagedVirtualNetworkListResult - { - internal static DataFactoryManagedVirtualNetworkListResult DeserializeDataFactoryManagedVirtualNetworkListResult(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - IReadOnlyList value = default; - Optional nextLink = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("value"u8)) - { - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - array.Add(DataFactoryManagedVirtualNetworkData.DeserializeDataFactoryManagedVirtualNetworkData(item)); - } - value = array; - continue; - } - if (property.NameEquals("nextLink"u8)) - { - nextLink = property.Value.GetString(); - continue; - } - } - return new DataFactoryManagedVirtualNetworkListResult(value, nextLink.Value); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DataFactoryManagedVirtualNetworkListResult.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DataFactoryManagedVirtualNetworkListResult.cs deleted file mode 100644 index c48ada96..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DataFactoryManagedVirtualNetworkListResult.cs +++ /dev/null @@ -1,37 +0,0 @@ -// - -#nullable disable - -using Azure.Core; -using Azure.ResourceManager.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// A list of managed Virtual Network resources. - internal partial class DataFactoryManagedVirtualNetworkListResult - { - /// Initializes a new instance of DataFactoryManagedVirtualNetworkListResult. - /// List of managed Virtual Networks. - /// is null. - internal DataFactoryManagedVirtualNetworkListResult(IEnumerable value) - { - Argument.AssertNotNull(value, nameof(value)); - - Value = value.ToList(); - } - - /// Initializes a new instance of DataFactoryManagedVirtualNetworkListResult. - /// List of managed Virtual Networks. - /// The link to the next page of results, if any remaining results exist. - internal DataFactoryManagedVirtualNetworkListResult(IReadOnlyList value, string nextLink) - { - Value = value; - NextLink = nextLink; - } - - /// List of managed Virtual Networks. - public IReadOnlyList Value { get; } - /// The link to the next page of results, if any remaining results exist. - public string NextLink { get; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DataFactoryManagedVirtualNetworkProperties.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DataFactoryManagedVirtualNetworkProperties.Serialization.cs deleted file mode 100644 index 78acbbb8..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DataFactoryManagedVirtualNetworkProperties.Serialization.cs +++ /dev/null @@ -1,60 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class DataFactoryManagedVirtualNetworkProperties : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - foreach (var item in AdditionalProperties) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.Value.ToString()).RootElement); -#endif - } - writer.WriteEndObject(); - } - - internal static DataFactoryManagedVirtualNetworkProperties DeserializeDataFactoryManagedVirtualNetworkProperties(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - Optional vnetId = default; - Optional @alias = default; - IDictionary> additionalProperties = default; - Dictionary> additionalPropertiesDictionary = new Dictionary>(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("vNetId"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - vnetId = property.Value.GetGuid(); - continue; - } - if (property.NameEquals("alias"u8)) - { - @alias = property.Value.GetString(); - continue; - } - additionalPropertiesDictionary.Add(property.Name, JsonSerializer.Deserialize>(property.Value.GetRawText())); - } - additionalProperties = additionalPropertiesDictionary; - return new DataFactoryManagedVirtualNetworkProperties(Optional.ToNullable(vnetId), @alias.Value, additionalProperties); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DataFactoryManagedVirtualNetworkProperties.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DataFactoryManagedVirtualNetworkProperties.cs deleted file mode 100644 index f252ba2c..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DataFactoryManagedVirtualNetworkProperties.cs +++ /dev/null @@ -1,66 +0,0 @@ -// - -#nullable disable - -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// A managed Virtual Network associated with the Azure Data Factory. - public partial class DataFactoryManagedVirtualNetworkProperties - { - /// Initializes a new instance of DataFactoryManagedVirtualNetworkProperties. - public DataFactoryManagedVirtualNetworkProperties() - { - AdditionalProperties = new ChangeTrackingDictionary>(); - } - - /// Initializes a new instance of DataFactoryManagedVirtualNetworkProperties. - /// Managed Virtual Network ID. - /// Managed Virtual Network alias. - /// Additional Properties. - internal DataFactoryManagedVirtualNetworkProperties(Guid? vnetId, string @alias, IDictionary> additionalProperties) - { - VnetId = vnetId; - Alias = @alias; - AdditionalProperties = additionalProperties; - } - - /// Managed Virtual Network ID. - public Guid? VnetId { get; } - /// Managed Virtual Network alias. - public string Alias { get; } - /// - /// Additional Properties - /// - /// To assign an object to the value of this property use . - /// - /// - /// To assign an already formated json string to this property use . - /// - /// - /// Examples: - /// - /// - /// BinaryData.FromObjectAsJson("foo") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromString("\"foo\"") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromObjectAsJson(new { key = "value" }) - /// Creates a payload of { "key": "value" }. - /// - /// - /// BinaryData.FromString("{\"key\": \"value\"}") - /// Creates a payload of { "key": "value" }. - /// - /// - /// - /// - public IDictionary> AdditionalProperties { get; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DataFactoryMappingDataFlowProperties.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DataFactoryMappingDataFlowProperties.Serialization.cs deleted file mode 100644 index 1d09d457..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DataFactoryMappingDataFlowProperties.Serialization.cs +++ /dev/null @@ -1,231 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class DataFactoryMappingDataFlowProperties : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - writer.WritePropertyName("type"u8); - writer.WriteStringValue(DataFlowType); - if (Optional.IsDefined(Description)) - { - writer.WritePropertyName("description"u8); - writer.WriteStringValue(Description); - } - if (Optional.IsCollectionDefined(Annotations)) - { - writer.WritePropertyName("annotations"u8); - writer.WriteStartArray(); - foreach (var item in Annotations) - { - if (item == null) - { - writer.WriteNullValue(); - continue; - } -#if NET6_0_OR_GREATER - writer.WriteRawValue(item); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.ToString()).RootElement); -#endif - } - writer.WriteEndArray(); - } - if (Optional.IsDefined(Folder)) - { - writer.WritePropertyName("folder"u8); - writer.WriteObjectValue(Folder); - } - writer.WritePropertyName("typeProperties"u8); - writer.WriteStartObject(); - if (Optional.IsCollectionDefined(Sources)) - { - writer.WritePropertyName("sources"u8); - writer.WriteStartArray(); - foreach (var item in Sources) - { - writer.WriteObjectValue(item); - } - writer.WriteEndArray(); - } - if (Optional.IsCollectionDefined(Sinks)) - { - writer.WritePropertyName("sinks"u8); - writer.WriteStartArray(); - foreach (var item in Sinks) - { - writer.WriteObjectValue(item); - } - writer.WriteEndArray(); - } - if (Optional.IsCollectionDefined(Transformations)) - { - writer.WritePropertyName("transformations"u8); - writer.WriteStartArray(); - foreach (var item in Transformations) - { - writer.WriteObjectValue(item); - } - writer.WriteEndArray(); - } - if (Optional.IsDefined(Script)) - { - writer.WritePropertyName("script"u8); - writer.WriteStringValue(Script); - } - if (Optional.IsCollectionDefined(ScriptLines)) - { - writer.WritePropertyName("scriptLines"u8); - writer.WriteStartArray(); - foreach (var item in ScriptLines) - { - writer.WriteStringValue(item); - } - writer.WriteEndArray(); - } - writer.WriteEndObject(); - writer.WriteEndObject(); - } - - internal static DataFactoryMappingDataFlowProperties DeserializeDataFactoryMappingDataFlowProperties(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - string type = default; - Optional description = default; - Optional> annotations = default; - Optional folder = default; - Optional> sources = default; - Optional> sinks = default; - Optional> transformations = default; - Optional script = default; - Optional> scriptLines = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("type"u8)) - { - type = property.Value.GetString(); - continue; - } - if (property.NameEquals("description"u8)) - { - description = property.Value.GetString(); - continue; - } - if (property.NameEquals("annotations"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - if (item.ValueKind == JsonValueKind.Null) - { - array.Add(null); - } - else - { - array.Add(BinaryData.FromString(item.GetRawText())); - } - } - annotations = array; - continue; - } - if (property.NameEquals("folder"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - folder = DataFlowFolder.DeserializeDataFlowFolder(property.Value); - continue; - } - if (property.NameEquals("typeProperties"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - foreach (var property0 in property.Value.EnumerateObject()) - { - if (property0.NameEquals("sources"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property0.Value.EnumerateArray()) - { - array.Add(DataFlowSource.DeserializeDataFlowSource(item)); - } - sources = array; - continue; - } - if (property0.NameEquals("sinks"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property0.Value.EnumerateArray()) - { - array.Add(DataFlowSink.DeserializeDataFlowSink(item)); - } - sinks = array; - continue; - } - if (property0.NameEquals("transformations"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property0.Value.EnumerateArray()) - { - array.Add(DataFlowTransformation.DeserializeDataFlowTransformation(item)); - } - transformations = array; - continue; - } - if (property0.NameEquals("script"u8)) - { - script = property0.Value.GetString(); - continue; - } - if (property0.NameEquals("scriptLines"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property0.Value.EnumerateArray()) - { - array.Add(item.GetString()); - } - scriptLines = array; - continue; - } - } - continue; - } - } - return new DataFactoryMappingDataFlowProperties(type, description.Value, Optional.ToList(annotations), folder.Value, Optional.ToList(sources), Optional.ToList(sinks), Optional.ToList(transformations), script.Value, Optional.ToList(scriptLines)); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DataFactoryMappingDataFlowProperties.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DataFactoryMappingDataFlowProperties.cs deleted file mode 100644 index 38fe0745..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DataFactoryMappingDataFlowProperties.cs +++ /dev/null @@ -1,53 +0,0 @@ -// - -#nullable disable - -using Azure.Core; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// Mapping data flow. - public partial class DataFactoryMappingDataFlowProperties : DataFactoryDataFlowProperties - { - /// Initializes a new instance of DataFactoryMappingDataFlowProperties. - public DataFactoryMappingDataFlowProperties() - { - Sources = new ChangeTrackingList(); - Sinks = new ChangeTrackingList(); - Transformations = new ChangeTrackingList(); - ScriptLines = new ChangeTrackingList(); - DataFlowType = "MappingDataFlow"; - } - - /// Initializes a new instance of DataFactoryMappingDataFlowProperties. - /// Type of data flow. - /// The description of the data flow. - /// List of tags that can be used for describing the data flow. - /// The folder that this data flow is in. If not specified, Data flow will appear at the root level. - /// List of sources in data flow. - /// List of sinks in data flow. - /// List of transformations in data flow. - /// DataFlow script. - /// Data flow script lines. - internal DataFactoryMappingDataFlowProperties(string dataFlowType, string description, IList annotations, DataFlowFolder folder, IList sources, IList sinks, IList transformations, string script, IList scriptLines) : base(dataFlowType, description, annotations, folder) - { - Sources = sources; - Sinks = sinks; - Transformations = transformations; - Script = script; - ScriptLines = scriptLines; - DataFlowType = dataFlowType ?? "MappingDataFlow"; - } - - /// List of sources in data flow. - public IList Sources { get; } - /// List of sinks in data flow. - public IList Sinks { get; } - /// List of transformations in data flow. - public IList Transformations { get; } - /// DataFlow script. - public string Script { get; set; } - /// Data flow script lines. - public IList ScriptLines { get; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DataFactoryMetadataItemInfo.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DataFactoryMetadataItemInfo.Serialization.cs deleted file mode 100644 index 6930d31e..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DataFactoryMetadataItemInfo.Serialization.cs +++ /dev/null @@ -1,61 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class DataFactoryMetadataItemInfo : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - if (Optional.IsDefined(Name)) - { - writer.WritePropertyName("name"u8); - JsonSerializer.Serialize(writer, Name); - } - if (Optional.IsDefined(Value)) - { - writer.WritePropertyName("value"u8); - JsonSerializer.Serialize(writer, Value); - } - writer.WriteEndObject(); - } - - internal static DataFactoryMetadataItemInfo DeserializeDataFactoryMetadataItemInfo(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - Optional> name = default; - Optional> value = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("name"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - name = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("value"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - value = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - } - return new DataFactoryMetadataItemInfo(name.Value, value.Value); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DataFactoryMetadataItemInfo.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DataFactoryMetadataItemInfo.cs deleted file mode 100644 index ae1def5a..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DataFactoryMetadataItemInfo.cs +++ /dev/null @@ -1,31 +0,0 @@ -// - -#nullable disable - -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// Specify the name and value of custom metadata item. - public partial class DataFactoryMetadataItemInfo - { - /// Initializes a new instance of DataFactoryMetadataItemInfo. - public DataFactoryMetadataItemInfo() - { - } - - /// Initializes a new instance of DataFactoryMetadataItemInfo. - /// Metadata item key name. Type: string (or Expression with resultType string). - /// Metadata item value. Type: string (or Expression with resultType string). - internal DataFactoryMetadataItemInfo(DataFactoryElement name, DataFactoryElement value) - { - Name = name; - Value = value; - } - - /// Metadata item key name. Type: string (or Expression with resultType string). - public DataFactoryElement Name { get; set; } - /// Metadata item value. Type: string (or Expression with resultType string). - public DataFactoryElement Value { get; set; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DataFactoryPackageStore.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DataFactoryPackageStore.Serialization.cs deleted file mode 100644 index 9004153a..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DataFactoryPackageStore.Serialization.cs +++ /dev/null @@ -1,46 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class DataFactoryPackageStore : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - writer.WritePropertyName("packageStoreLinkedService"u8); - writer.WriteObjectValue(PackageStoreLinkedService); - writer.WriteEndObject(); - } - - internal static DataFactoryPackageStore DeserializeDataFactoryPackageStore(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - string name = default; - EntityReference packageStoreLinkedService = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("name"u8)) - { - name = property.Value.GetString(); - continue; - } - if (property.NameEquals("packageStoreLinkedService"u8)) - { - packageStoreLinkedService = EntityReference.DeserializeEntityReference(property.Value); - continue; - } - } - return new DataFactoryPackageStore(name, packageStoreLinkedService); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DataFactoryPackageStore.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DataFactoryPackageStore.cs deleted file mode 100644 index a0eb9826..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DataFactoryPackageStore.cs +++ /dev/null @@ -1,30 +0,0 @@ -// - -#nullable disable - -using Azure.Core; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// Package store for the SSIS integration runtime. - public partial class DataFactoryPackageStore - { - /// Initializes a new instance of DataFactoryPackageStore. - /// The name of the package store. - /// The package store linked service reference. - /// or is null. - public DataFactoryPackageStore(string name, EntityReference packageStoreLinkedService) - { - Argument.AssertNotNull(name, nameof(name)); - Argument.AssertNotNull(packageStoreLinkedService, nameof(packageStoreLinkedService)); - - Name = name; - PackageStoreLinkedService = packageStoreLinkedService; - } - - /// The name of the package store. - public string Name { get; set; } - /// The package store linked service reference. - public EntityReference PackageStoreLinkedService { get; set; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DataFactoryPatch.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DataFactoryPatch.Serialization.cs deleted file mode 100644 index 49d152aa..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DataFactoryPatch.Serialization.cs +++ /dev/null @@ -1,44 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; -using Azure.ResourceManager.Models; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class DataFactoryPatch : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - if (Optional.IsCollectionDefined(Tags)) - { - writer.WritePropertyName("tags"u8); - writer.WriteStartObject(); - foreach (var item in Tags) - { - writer.WritePropertyName(item.Key); - writer.WriteStringValue(item.Value); - } - writer.WriteEndObject(); - } - if (Optional.IsDefined(Identity)) - { - writer.WritePropertyName("identity"u8); - var serializeOptions = new JsonSerializerOptions { Converters = { new ManagedServiceIdentityTypeV3Converter() } }; - JsonSerializer.Serialize(writer, Identity, serializeOptions); - } - writer.WritePropertyName("properties"u8); - writer.WriteStartObject(); - if (Optional.IsDefined(PublicNetworkAccess)) - { - writer.WritePropertyName("publicNetworkAccess"u8); - writer.WriteStringValue(PublicNetworkAccess.Value.ToString()); - } - writer.WriteEndObject(); - writer.WriteEndObject(); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DataFactoryPatch.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DataFactoryPatch.cs deleted file mode 100644 index 6dfd1968..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DataFactoryPatch.cs +++ /dev/null @@ -1,26 +0,0 @@ -// - -#nullable disable - -using Azure.Core; -using Azure.ResourceManager.Models; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// Parameters for updating a factory resource. - public partial class DataFactoryPatch - { - /// Initializes a new instance of DataFactoryPatch. - public DataFactoryPatch() - { - Tags = new ChangeTrackingDictionary(); - } - - /// The resource tags. - public IDictionary Tags { get; } - /// Managed service identity of the factory. Current supported identity types: SystemAssigned, UserAssigned, SystemAssigned,UserAssigned. - public ManagedServiceIdentity Identity { get; set; } - /// Whether or not public network access is allowed for the data factory. - public DataFactoryPublicNetworkAccess? PublicNetworkAccess { get; set; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DataFactoryPipelineData.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DataFactoryPipelineData.Serialization.cs deleted file mode 100644 index 32e2eba7..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DataFactoryPipelineData.Serialization.cs +++ /dev/null @@ -1,315 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; -using Azure.Core.Expressions.DataFactory; -using AzureDataFactory.TestingFramework.Models; -using Azure.ResourceManager.Models; - -namespace Azure.ResourceManager.DataFactory -{ - public partial class Pipeline : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - writer.WritePropertyName("properties"u8); - writer.WriteStartObject(); - if (Optional.IsDefined(Description)) - { - writer.WritePropertyName("description"u8); - writer.WriteStringValue(Description); - } - if (Optional.IsCollectionDefined(Activities)) - { - writer.WritePropertyName("activities"u8); - writer.WriteStartArray(); - foreach (var item in Activities) - { - writer.WriteObjectValue(item); - } - writer.WriteEndArray(); - } - if (Optional.IsCollectionDefined(Parameters)) - { - writer.WritePropertyName("parameters"u8); - writer.WriteStartObject(); - foreach (var item in Parameters) - { - writer.WritePropertyName(item.Key); - writer.WriteObjectValue(item.Value); - } - writer.WriteEndObject(); - } - if (Optional.IsCollectionDefined(Variables)) - { - writer.WritePropertyName("variables"u8); - writer.WriteStartObject(); - foreach (var item in Variables) - { - writer.WritePropertyName(item.Key); - writer.WriteObjectValue(item.Value); - } - writer.WriteEndObject(); - } - if (Optional.IsDefined(Concurrency)) - { - writer.WritePropertyName("concurrency"u8); - writer.WriteNumberValue(Concurrency.Value); - } - if (Optional.IsCollectionDefined(Annotations)) - { - writer.WritePropertyName("annotations"u8); - writer.WriteStartArray(); - foreach (var item in Annotations) - { - if (item == null) - { - writer.WriteNullValue(); - continue; - } -#if NET6_0_OR_GREATER - writer.WriteRawValue(item); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.ToString()).RootElement); -#endif - } - writer.WriteEndArray(); - } - if (Optional.IsCollectionDefined(RunDimensions)) - { - writer.WritePropertyName("runDimensions"u8); - writer.WriteStartObject(); - foreach (var item in RunDimensions) - { - writer.WritePropertyName(item.Key); - if (item.Value == null) - { - writer.WriteNullValue(); - continue; - } -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.Value.ToString()).RootElement); -#endif - } - writer.WriteEndObject(); - } - if (Optional.IsDefined(Folder)) - { - writer.WritePropertyName("folder"u8); - writer.WriteObjectValue(Folder); - } - if (Optional.IsDefined(Policy)) - { - writer.WritePropertyName("policy"u8); - writer.WriteObjectValue(Policy); - } - writer.WriteEndObject(); - foreach (var item in AdditionalProperties) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.Value.ToString()).RootElement); -#endif - } - writer.WriteEndObject(); - } - - internal static Pipeline DeserializeDataFactoryPipelineData(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - Optional etag = default; - ResourceIdentifier id = default; - string name = default; - ResourceType type = default; - Optional systemData = default; - Optional description = default; - Optional> activities = default; - Optional> parameters = default; - Optional> variables = default; - Optional concurrency = default; - Optional> annotations = default; - Optional>> runDimensions = default; - Optional folder = default; - Optional policy = default; - IDictionary> additionalProperties = default; - Dictionary> additionalPropertiesDictionary = new Dictionary>(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("etag"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - etag = new ETag(property.Value.GetString()); - continue; - } - if (property.NameEquals("id"u8)) - { - id = new ResourceIdentifier(property.Value.GetString()); - continue; - } - if (property.NameEquals("name"u8)) - { - name = property.Value.GetString(); - continue; - } - if (property.NameEquals("type"u8)) - { - type = new ResourceType(property.Value.GetString()); - continue; - } - if (property.NameEquals("systemData"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - systemData = JsonSerializer.Deserialize(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("properties"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - foreach (var property0 in property.Value.EnumerateObject()) - { - if (property0.NameEquals("description"u8)) - { - description = property0.Value.GetString(); - continue; - } - if (property0.NameEquals("activities"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property0.Value.EnumerateArray()) - { - array.Add(PipelineActivity.DeserializePipelineActivity(item)); - } - activities = array; - continue; - } - if (property0.NameEquals("parameters"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - Dictionary dictionary = new Dictionary(); - foreach (var property1 in property0.Value.EnumerateObject()) - { - dictionary.Add(property1.Name, EntityParameterSpecification.DeserializeEntityParameterSpecification(property1.Value)); - } - parameters = dictionary; - continue; - } - if (property0.NameEquals("variables"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - Dictionary dictionary = new Dictionary(); - foreach (var property1 in property0.Value.EnumerateObject()) - { - dictionary.Add(property1.Name, PipelineVariableSpecification.DeserializePipelineVariableSpecification(property1.Value)); - } - variables = dictionary; - continue; - } - if (property0.NameEquals("concurrency"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - concurrency = property0.Value.GetInt32(); - continue; - } - if (property0.NameEquals("annotations"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property0.Value.EnumerateArray()) - { - if (item.ValueKind == JsonValueKind.Null) - { - array.Add(null); - } - else - { - array.Add(BinaryData.FromString(item.GetRawText())); - } - } - annotations = array; - continue; - } - if (property0.NameEquals("runDimensions"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - Dictionary> dictionary = new Dictionary>(); - foreach (var property1 in property0.Value.EnumerateObject()) - { - if (property1.Value.ValueKind == JsonValueKind.Null) - { - dictionary.Add(property1.Name, null); - } - else - { - dictionary.Add(property1.Name, JsonSerializer.Deserialize>(property1.Value.GetRawText())); - } - } - runDimensions = dictionary; - continue; - } - if (property0.NameEquals("folder"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - folder = PipelineFolder.DeserializePipelineFolder(property0.Value); - continue; - } - if (property0.NameEquals("policy"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - policy = DataFactoryPipelinePolicy.DeserializeDataFactoryPipelinePolicy(property0.Value); - continue; - } - } - continue; - } - additionalPropertiesDictionary.Add(property.Name, JsonSerializer.Deserialize>(property.Value.GetRawText())); - } - additionalProperties = additionalPropertiesDictionary; - return new Pipeline(id, name, type, systemData.Value, description.Value, Optional.ToList(activities), Optional.ToDictionary(parameters), Optional.ToDictionary(variables), Optional.ToNullable(concurrency), Optional.ToList(annotations), Optional.ToDictionary(runDimensions), folder.Value, policy.Value, Optional.ToNullable(etag), additionalProperties); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DataFactoryPipelineListResult.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DataFactoryPipelineListResult.Serialization.cs deleted file mode 100644 index 6185357a..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DataFactoryPipelineListResult.Serialization.cs +++ /dev/null @@ -1,42 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; -using Azure.ResourceManager.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - internal partial class DataFactoryPipelineListResult - { - internal static DataFactoryPipelineListResult DeserializeDataFactoryPipelineListResult(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - IReadOnlyList value = default; - Optional nextLink = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("value"u8)) - { - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - array.Add(Pipeline.DeserializeDataFactoryPipelineData(item)); - } - value = array; - continue; - } - if (property.NameEquals("nextLink"u8)) - { - nextLink = property.Value.GetString(); - continue; - } - } - return new DataFactoryPipelineListResult(value, nextLink.Value); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DataFactoryPipelineListResult.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DataFactoryPipelineListResult.cs deleted file mode 100644 index 46af41f6..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DataFactoryPipelineListResult.cs +++ /dev/null @@ -1,37 +0,0 @@ -// - -#nullable disable - -using Azure.Core; -using Azure.ResourceManager.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// A list of pipeline resources. - internal partial class DataFactoryPipelineListResult - { - /// Initializes a new instance of DataFactoryPipelineListResult. - /// List of pipelines. - /// is null. - internal DataFactoryPipelineListResult(IEnumerable value) - { - Argument.AssertNotNull(value, nameof(value)); - - Value = value.ToList(); - } - - /// Initializes a new instance of DataFactoryPipelineListResult. - /// List of pipelines. - /// The link to the next page of results, if any remaining results exist. - internal DataFactoryPipelineListResult(IReadOnlyList value, string nextLink) - { - Value = value; - NextLink = nextLink; - } - - /// List of pipelines. - public IReadOnlyList Value { get; } - /// The link to the next page of results, if any remaining results exist. - public string NextLink { get; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DataFactoryPipelinePolicy.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DataFactoryPipelinePolicy.Serialization.cs deleted file mode 100644 index 95309b64..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DataFactoryPipelinePolicy.Serialization.cs +++ /dev/null @@ -1,45 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; - -namespace AzureDataFactory.TestingFramework.Models -{ - internal partial class DataFactoryPipelinePolicy : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - if (Optional.IsDefined(ElapsedTimeMetric)) - { - writer.WritePropertyName("elapsedTimeMetric"u8); - writer.WriteObjectValue(ElapsedTimeMetric); - } - writer.WriteEndObject(); - } - - internal static DataFactoryPipelinePolicy DeserializeDataFactoryPipelinePolicy(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - Optional elapsedTimeMetric = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("elapsedTimeMetric"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - elapsedTimeMetric = PipelineElapsedTimeMetricPolicy.DeserializePipelineElapsedTimeMetricPolicy(property.Value); - continue; - } - } - return new DataFactoryPipelinePolicy(elapsedTimeMetric.Value); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DataFactoryPipelinePolicy.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DataFactoryPipelinePolicy.cs deleted file mode 100644 index 27559b1d..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DataFactoryPipelinePolicy.cs +++ /dev/null @@ -1,65 +0,0 @@ -// - -#nullable disable - -namespace AzureDataFactory.TestingFramework.Models -{ - /// Pipeline Policy. - internal partial class DataFactoryPipelinePolicy - { - /// Initializes a new instance of DataFactoryPipelinePolicy. - public DataFactoryPipelinePolicy() - { - } - - /// Initializes a new instance of DataFactoryPipelinePolicy. - /// Pipeline ElapsedTime Metric Policy. - internal DataFactoryPipelinePolicy(PipelineElapsedTimeMetricPolicy elapsedTimeMetric) - { - ElapsedTimeMetric = elapsedTimeMetric; - } - - /// Pipeline ElapsedTime Metric Policy. - internal PipelineElapsedTimeMetricPolicy ElapsedTimeMetric { get; set; } - /// - /// TimeSpan value, after which an Azure Monitoring Metric is fired. - /// - /// To assign an object to this property use . - /// - /// - /// To assign an already formated json string to this property use . - /// - /// - /// Examples: - /// - /// - /// BinaryData.FromObjectAsJson("foo") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromString("\"foo\"") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromObjectAsJson(new { key = "value" }) - /// Creates a payload of { "key": "value" }. - /// - /// - /// BinaryData.FromString("{\"key\": \"value\"}") - /// Creates a payload of { "key": "value" }. - /// - /// - /// - /// - public BinaryData ElapsedTimeMetricDuration - { - get => ElapsedTimeMetric is null ? default : ElapsedTimeMetric.Duration; - set - { - if (ElapsedTimeMetric is null) - ElapsedTimeMetric = new PipelineElapsedTimeMetricPolicy(); - ElapsedTimeMetric.Duration = value; - } - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DataFactoryPipelineReference.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DataFactoryPipelineReference.Serialization.cs deleted file mode 100644 index 56fc1a02..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DataFactoryPipelineReference.Serialization.cs +++ /dev/null @@ -1,57 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class DataFactoryPipelineReference : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ReferenceType.ToString()); - writer.WritePropertyName("referenceName"u8); - writer.WriteStringValue(ReferenceName); - if (Optional.IsDefined(Name)) - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - writer.WriteEndObject(); - } - - internal static DataFactoryPipelineReference DeserializeDataFactoryPipelineReference(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - DataFactoryPipelineReferenceType type = default; - string referenceName = default; - Optional name = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("type"u8)) - { - type = new DataFactoryPipelineReferenceType(property.Value.GetString()); - continue; - } - if (property.NameEquals("referenceName"u8)) - { - referenceName = property.Value.GetString(); - continue; - } - if (property.NameEquals("name"u8)) - { - name = property.Value.GetString(); - continue; - } - } - return new DataFactoryPipelineReference(type, referenceName, name.Value); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DataFactoryPipelineReference.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DataFactoryPipelineReference.cs deleted file mode 100644 index 3dc4cf56..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DataFactoryPipelineReference.cs +++ /dev/null @@ -1,42 +0,0 @@ -// - -#nullable disable - -using Azure.Core; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// Pipeline reference type. - public partial class DataFactoryPipelineReference - { - /// Initializes a new instance of DataFactoryPipelineReference. - /// Pipeline reference type. - /// Reference pipeline name. - /// is null. - public DataFactoryPipelineReference(DataFactoryPipelineReferenceType referenceType, string referenceName) - { - Argument.AssertNotNull(referenceName, nameof(referenceName)); - - ReferenceType = referenceType; - ReferenceName = referenceName; - } - - /// Initializes a new instance of DataFactoryPipelineReference. - /// Pipeline reference type. - /// Reference pipeline name. - /// Reference name. - internal DataFactoryPipelineReference(DataFactoryPipelineReferenceType referenceType, string referenceName, string name) - { - ReferenceType = referenceType; - ReferenceName = referenceName; - Name = name; - } - - /// Pipeline reference type. - public DataFactoryPipelineReferenceType ReferenceType { get; set; } - /// Reference pipeline name. - public string ReferenceName { get; set; } - /// Reference name. - public string Name { get; set; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DataFactoryPipelineReferenceType.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DataFactoryPipelineReferenceType.cs deleted file mode 100644 index f9a5f426..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DataFactoryPipelineReferenceType.cs +++ /dev/null @@ -1,44 +0,0 @@ -// - -#nullable disable - -using System.ComponentModel; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// Pipeline reference type. - public readonly partial struct DataFactoryPipelineReferenceType : IEquatable - { - private readonly string _value; - - /// Initializes a new instance of . - /// is null. - public DataFactoryPipelineReferenceType(string value) - { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } - - private const string PipelineReferenceValue = "PipelineReference"; - - /// PipelineReference. - public static DataFactoryPipelineReferenceType PipelineReference { get; } = new DataFactoryPipelineReferenceType(PipelineReferenceValue); - /// Determines if two values are the same. - public static bool operator ==(DataFactoryPipelineReferenceType left, DataFactoryPipelineReferenceType right) => left.Equals(right); - /// Determines if two values are not the same. - public static bool operator !=(DataFactoryPipelineReferenceType left, DataFactoryPipelineReferenceType right) => !left.Equals(right); - /// Converts a string to a . - public static implicit operator DataFactoryPipelineReferenceType(string value) => new DataFactoryPipelineReferenceType(value); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override bool Equals(object obj) => obj is DataFactoryPipelineReferenceType other && Equals(other); - /// - public bool Equals(DataFactoryPipelineReferenceType other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override int GetHashCode() => _value?.GetHashCode() ?? 0; - /// - public override string ToString() => _value; - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DataFactoryPipelineRunEntityInfo.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DataFactoryPipelineRunEntityInfo.Serialization.cs deleted file mode 100644 index 4d8a2f2e..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DataFactoryPipelineRunEntityInfo.Serialization.cs +++ /dev/null @@ -1,58 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class DataFactoryPipelineRunEntityInfo - { - internal static DataFactoryPipelineRunEntityInfo DeserializeDataFactoryPipelineRunEntityInfo(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - Optional name = default; - Optional id = default; - Optional invokedByType = default; - Optional pipelineName = default; - Optional pipelineRunId = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("name"u8)) - { - name = property.Value.GetString(); - continue; - } - if (property.NameEquals("id"u8)) - { - id = property.Value.GetString(); - continue; - } - if (property.NameEquals("invokedByType"u8)) - { - invokedByType = property.Value.GetString(); - continue; - } - if (property.NameEquals("pipelineName"u8)) - { - pipelineName = property.Value.GetString(); - continue; - } - if (property.NameEquals("pipelineRunId"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - pipelineRunId = property.Value.GetGuid(); - continue; - } - } - return new DataFactoryPipelineRunEntityInfo(name.Value, id.Value, invokedByType.Value, pipelineName.Value, Optional.ToNullable(pipelineRunId)); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DataFactoryPipelineRunEntityInfo.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DataFactoryPipelineRunEntityInfo.cs deleted file mode 100644 index d4d6f138..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DataFactoryPipelineRunEntityInfo.cs +++ /dev/null @@ -1,41 +0,0 @@ -// - -#nullable disable - -namespace AzureDataFactory.TestingFramework.Models -{ - /// Provides entity name and id that started the pipeline run. - public partial class DataFactoryPipelineRunEntityInfo - { - /// Initializes a new instance of DataFactoryPipelineRunEntityInfo. - internal DataFactoryPipelineRunEntityInfo() - { - } - - /// Initializes a new instance of DataFactoryPipelineRunEntityInfo. - /// Name of the entity that started the pipeline run. - /// The ID of the entity that started the run. - /// The type of the entity that started the run. - /// The name of the pipeline that triggered the run, if any. - /// The run id of the pipeline that triggered the run, if any. - internal DataFactoryPipelineRunEntityInfo(string name, string id, string invokedByType, string pipelineName, Guid? pipelineRunId) - { - Name = name; - Id = id; - InvokedByType = invokedByType; - PipelineName = pipelineName; - PipelineRunId = pipelineRunId; - } - - /// Name of the entity that started the pipeline run. - public string Name { get; } - /// The ID of the entity that started the run. - public string Id { get; } - /// The type of the entity that started the run. - public string InvokedByType { get; } - /// The name of the pipeline that triggered the run, if any. - public string PipelineName { get; } - /// The run id of the pipeline that triggered the run, if any. - public Guid? PipelineRunId { get; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DataFactoryPipelineRunInfo.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DataFactoryPipelineRunInfo.Serialization.cs deleted file mode 100644 index 4fe61a8d..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DataFactoryPipelineRunInfo.Serialization.cs +++ /dev/null @@ -1,153 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class DataFactoryPipelineRunInfo - { - internal static DataFactoryPipelineRunInfo DeserializeDataFactoryPipelineRunInfo(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - Optional runId = default; - Optional runGroupId = default; - Optional isLatest = default; - Optional pipelineName = default; - Optional> parameters = default; - Optional> runDimensions = default; - Optional invokedBy = default; - Optional lastUpdated = default; - Optional runStart = default; - Optional runEnd = default; - Optional durationInMs = default; - Optional status = default; - Optional message = default; - IReadOnlyDictionary> additionalProperties = default; - Dictionary> additionalPropertiesDictionary = new Dictionary>(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("runId"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - runId = property.Value.GetGuid(); - continue; - } - if (property.NameEquals("runGroupId"u8)) - { - runGroupId = property.Value.GetString(); - continue; - } - if (property.NameEquals("isLatest"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - isLatest = property.Value.GetBoolean(); - continue; - } - if (property.NameEquals("pipelineName"u8)) - { - pipelineName = property.Value.GetString(); - continue; - } - if (property.NameEquals("parameters"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - Dictionary dictionary = new Dictionary(); - foreach (var property0 in property.Value.EnumerateObject()) - { - dictionary.Add(property0.Name, property0.Value.GetString()); - } - parameters = dictionary; - continue; - } - if (property.NameEquals("runDimensions"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - Dictionary dictionary = new Dictionary(); - foreach (var property0 in property.Value.EnumerateObject()) - { - dictionary.Add(property0.Name, property0.Value.GetString()); - } - runDimensions = dictionary; - continue; - } - if (property.NameEquals("invokedBy"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - invokedBy = DataFactoryPipelineRunEntityInfo.DeserializeDataFactoryPipelineRunEntityInfo(property.Value); - continue; - } - if (property.NameEquals("lastUpdated"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - lastUpdated = property.Value.GetDateTimeOffset("O"); - continue; - } - if (property.NameEquals("runStart"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - runStart = property.Value.GetDateTimeOffset("O"); - continue; - } - if (property.NameEquals("runEnd"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - runEnd = property.Value.GetDateTimeOffset("O"); - continue; - } - if (property.NameEquals("durationInMs"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - durationInMs = property.Value.GetInt32(); - continue; - } - if (property.NameEquals("status"u8)) - { - status = property.Value.GetString(); - continue; - } - if (property.NameEquals("message"u8)) - { - message = property.Value.GetString(); - continue; - } - additionalPropertiesDictionary.Add(property.Name, JsonSerializer.Deserialize>(property.Value.GetRawText())); - } - additionalProperties = additionalPropertiesDictionary; - return new DataFactoryPipelineRunInfo(Optional.ToNullable(runId), runGroupId.Value, Optional.ToNullable(isLatest), pipelineName.Value, Optional.ToDictionary(parameters), Optional.ToDictionary(runDimensions), invokedBy.Value, Optional.ToNullable(lastUpdated), Optional.ToNullable(runStart), Optional.ToNullable(runEnd), Optional.ToNullable(durationInMs), status.Value, message.Value, additionalProperties); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DataFactoryPipelineRunInfo.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DataFactoryPipelineRunInfo.cs deleted file mode 100644 index 5c3fe152..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DataFactoryPipelineRunInfo.cs +++ /dev/null @@ -1,112 +0,0 @@ -// - -#nullable disable - -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// Information about a pipeline run. - public partial class DataFactoryPipelineRunInfo - { - /// Initializes a new instance of DataFactoryPipelineRunInfo. - internal DataFactoryPipelineRunInfo() - { - Parameters = new ChangeTrackingDictionary(); - RunDimensions = new ChangeTrackingDictionary(); - AdditionalProperties = new ChangeTrackingDictionary>(); - } - - /// Initializes a new instance of DataFactoryPipelineRunInfo. - /// Identifier of a run. - /// Identifier that correlates all the recovery runs of a pipeline run. - /// Indicates if the recovered pipeline run is the latest in its group. - /// The pipeline name. - /// The full or partial list of parameter name, value pair used in the pipeline run. - /// Run dimensions emitted by Pipeline run. - /// Entity that started the pipeline run. - /// The last updated timestamp for the pipeline run event in ISO8601 format. - /// The start time of a pipeline run in ISO8601 format. - /// The end time of a pipeline run in ISO8601 format. - /// The duration of a pipeline run. - /// The status of a pipeline run. Possible values: Queued, InProgress, Succeeded, Failed, Canceling, Cancelled. - /// The message from a pipeline run. - /// Additional Properties. - internal DataFactoryPipelineRunInfo(Guid? runId, string runGroupId, bool? isLatest, string pipelineName, IReadOnlyDictionary parameters, IReadOnlyDictionary runDimensions, DataFactoryPipelineRunEntityInfo invokedBy, DateTimeOffset? lastUpdatedOn, DateTimeOffset? runStartOn, DateTimeOffset? runEndOn, int? durationInMs, string status, string message, IReadOnlyDictionary> additionalProperties) - { - RunId = runId; - RunGroupId = runGroupId; - IsLatest = isLatest; - PipelineName = pipelineName; - Parameters = parameters; - RunDimensions = runDimensions; - InvokedBy = invokedBy; - LastUpdatedOn = lastUpdatedOn; - RunStartOn = runStartOn; - RunEndOn = runEndOn; - DurationInMs = durationInMs; - Status = status; - Message = message; - AdditionalProperties = additionalProperties; - } - - /// Identifier of a run. - public Guid? RunId { get; } - /// Identifier that correlates all the recovery runs of a pipeline run. - public string RunGroupId { get; } - /// Indicates if the recovered pipeline run is the latest in its group. - public bool? IsLatest { get; } - /// The pipeline name. - public string PipelineName { get; } - /// The full or partial list of parameter name, value pair used in the pipeline run. - public IReadOnlyDictionary Parameters { get; } - /// Run dimensions emitted by Pipeline run. - public IReadOnlyDictionary RunDimensions { get; } - /// Entity that started the pipeline run. - public DataFactoryPipelineRunEntityInfo InvokedBy { get; } - /// The last updated timestamp for the pipeline run event in ISO8601 format. - public DateTimeOffset? LastUpdatedOn { get; } - /// The start time of a pipeline run in ISO8601 format. - public DateTimeOffset? RunStartOn { get; } - /// The end time of a pipeline run in ISO8601 format. - public DateTimeOffset? RunEndOn { get; } - /// The duration of a pipeline run. - public int? DurationInMs { get; } - /// The status of a pipeline run. Possible values: Queued, InProgress, Succeeded, Failed, Canceling, Cancelled. - public string Status { get; } - /// The message from a pipeline run. - public string Message { get; } - /// - /// Additional Properties - /// - /// To assign an object to the value of this property use . - /// - /// - /// To assign an already formated json string to this property use . - /// - /// - /// Examples: - /// - /// - /// BinaryData.FromObjectAsJson("foo") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromString("\"foo\"") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromObjectAsJson(new { key = "value" }) - /// Creates a payload of { "key": "value" }. - /// - /// - /// BinaryData.FromString("{\"key\": \"value\"}") - /// Creates a payload of { "key": "value" }. - /// - /// - /// - /// - public IReadOnlyDictionary> AdditionalProperties { get; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DataFactoryPipelineRunsQueryResult.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DataFactoryPipelineRunsQueryResult.Serialization.cs deleted file mode 100644 index f3c2076b..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DataFactoryPipelineRunsQueryResult.Serialization.cs +++ /dev/null @@ -1,41 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; - -namespace AzureDataFactory.TestingFramework.Models -{ - internal partial class DataFactoryPipelineRunsQueryResult - { - internal static DataFactoryPipelineRunsQueryResult DeserializeDataFactoryPipelineRunsQueryResult(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - IReadOnlyList value = default; - Optional continuationToken = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("value"u8)) - { - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - array.Add(DataFactoryPipelineRunInfo.DeserializeDataFactoryPipelineRunInfo(item)); - } - value = array; - continue; - } - if (property.NameEquals("continuationToken"u8)) - { - continuationToken = property.Value.GetString(); - continue; - } - } - return new DataFactoryPipelineRunsQueryResult(value, continuationToken.Value); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DataFactoryPipelineRunsQueryResult.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DataFactoryPipelineRunsQueryResult.cs deleted file mode 100644 index f8a8cd27..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DataFactoryPipelineRunsQueryResult.cs +++ /dev/null @@ -1,36 +0,0 @@ -// - -#nullable disable - -using Azure.Core; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// A list pipeline runs. - internal partial class DataFactoryPipelineRunsQueryResult - { - /// Initializes a new instance of DataFactoryPipelineRunsQueryResult. - /// List of pipeline runs. - /// is null. - internal DataFactoryPipelineRunsQueryResult(IEnumerable value) - { - Argument.AssertNotNull(value, nameof(value)); - - Value = value.ToList(); - } - - /// Initializes a new instance of DataFactoryPipelineRunsQueryResult. - /// List of pipeline runs. - /// The continuation token for getting the next page of results, if any remaining results exist, null otherwise. - internal DataFactoryPipelineRunsQueryResult(IReadOnlyList value, string continuationToken) - { - Value = value; - ContinuationToken = continuationToken; - } - - /// List of pipeline runs. - public IReadOnlyList Value { get; } - /// The continuation token for getting the next page of results, if any remaining results exist, null otherwise. - public string ContinuationToken { get; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DataFactoryPrivateEndpointConnectionCreateOrUpdateContent.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DataFactoryPrivateEndpointConnectionCreateOrUpdateContent.Serialization.cs deleted file mode 100644 index 750d31bc..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DataFactoryPrivateEndpointConnectionCreateOrUpdateContent.Serialization.cs +++ /dev/null @@ -1,85 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure; -using Azure.Core; -using Azure.ResourceManager.Models; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class DataFactoryPrivateEndpointConnectionCreateOrUpdateContent : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - if (Optional.IsDefined(Properties)) - { - writer.WritePropertyName("properties"u8); - writer.WriteObjectValue(Properties); - } - writer.WriteEndObject(); - } - - internal static DataFactoryPrivateEndpointConnectionCreateOrUpdateContent DeserializeDataFactoryPrivateEndpointConnectionCreateOrUpdateContent(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - Optional properties = default; - Optional etag = default; - ResourceIdentifier id = default; - string name = default; - ResourceType type = default; - Optional systemData = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("properties"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - properties = PrivateLinkConnectionApprovalRequest.DeserializePrivateLinkConnectionApprovalRequest(property.Value); - continue; - } - if (property.NameEquals("etag"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - etag = new ETag(property.Value.GetString()); - continue; - } - if (property.NameEquals("id"u8)) - { - id = new ResourceIdentifier(property.Value.GetString()); - continue; - } - if (property.NameEquals("name"u8)) - { - name = property.Value.GetString(); - continue; - } - if (property.NameEquals("type"u8)) - { - type = new ResourceType(property.Value.GetString()); - continue; - } - if (property.NameEquals("systemData"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - systemData = JsonSerializer.Deserialize(property.Value.GetRawText()); - continue; - } - } - return new DataFactoryPrivateEndpointConnectionCreateOrUpdateContent(id, name, type, systemData.Value, properties.Value, Optional.ToNullable(etag)); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DataFactoryPrivateEndpointConnectionCreateOrUpdateContent.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DataFactoryPrivateEndpointConnectionCreateOrUpdateContent.cs deleted file mode 100644 index 95998edd..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DataFactoryPrivateEndpointConnectionCreateOrUpdateContent.cs +++ /dev/null @@ -1,37 +0,0 @@ -// - -#nullable disable - -using Azure; -using Azure.Core; -using Azure.ResourceManager.Models; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// Private Endpoint Connection Approval ARM resource. - public partial class DataFactoryPrivateEndpointConnectionCreateOrUpdateContent : ResourceData - { - /// Initializes a new instance of DataFactoryPrivateEndpointConnectionCreateOrUpdateContent. - public DataFactoryPrivateEndpointConnectionCreateOrUpdateContent() - { - } - - /// Initializes a new instance of DataFactoryPrivateEndpointConnectionCreateOrUpdateContent. - /// The id. - /// The name. - /// The resourceType. - /// The systemData. - /// Core resource properties. - /// Etag identifies change in the resource. - internal DataFactoryPrivateEndpointConnectionCreateOrUpdateContent(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, PrivateLinkConnectionApprovalRequest properties, ETag? eTag) : base(id, name, resourceType, systemData) - { - Properties = properties; - ETag = eTag; - } - - /// Core resource properties. - public PrivateLinkConnectionApprovalRequest Properties { get; set; } - /// Etag identifies change in the resource. - public ETag? ETag { get; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DataFactoryPrivateEndpointConnectionData.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DataFactoryPrivateEndpointConnectionData.Serialization.cs deleted file mode 100644 index a1ed9bf9..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DataFactoryPrivateEndpointConnectionData.Serialization.cs +++ /dev/null @@ -1,85 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; -using AzureDataFactory.TestingFramework.Models; -using Azure.ResourceManager.Models; - -namespace Azure.ResourceManager.DataFactory -{ - public partial class DataFactoryPrivateEndpointConnectionData : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - if (Optional.IsDefined(Properties)) - { - writer.WritePropertyName("properties"u8); - writer.WriteObjectValue(Properties); - } - writer.WriteEndObject(); - } - - internal static DataFactoryPrivateEndpointConnectionData DeserializeDataFactoryPrivateEndpointConnectionData(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - Optional properties = default; - Optional etag = default; - ResourceIdentifier id = default; - string name = default; - ResourceType type = default; - Optional systemData = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("properties"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - properties = DataFactoryPrivateEndpointConnectionProperties.DeserializeDataFactoryPrivateEndpointConnectionProperties(property.Value); - continue; - } - if (property.NameEquals("etag"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - etag = new ETag(property.Value.GetString()); - continue; - } - if (property.NameEquals("id"u8)) - { - id = new ResourceIdentifier(property.Value.GetString()); - continue; - } - if (property.NameEquals("name"u8)) - { - name = property.Value.GetString(); - continue; - } - if (property.NameEquals("type"u8)) - { - type = new ResourceType(property.Value.GetString()); - continue; - } - if (property.NameEquals("systemData"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - systemData = JsonSerializer.Deserialize(property.Value.GetRawText()); - continue; - } - } - return new DataFactoryPrivateEndpointConnectionData(id, name, type, systemData.Value, properties.Value, Optional.ToNullable(etag)); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DataFactoryPrivateEndpointConnectionListResult.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DataFactoryPrivateEndpointConnectionListResult.Serialization.cs deleted file mode 100644 index 9a4692ad..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DataFactoryPrivateEndpointConnectionListResult.Serialization.cs +++ /dev/null @@ -1,42 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; -using Azure.ResourceManager.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - internal partial class DataFactoryPrivateEndpointConnectionListResult - { - internal static DataFactoryPrivateEndpointConnectionListResult DeserializeDataFactoryPrivateEndpointConnectionListResult(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - IReadOnlyList value = default; - Optional nextLink = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("value"u8)) - { - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - array.Add(DataFactoryPrivateEndpointConnectionData.DeserializeDataFactoryPrivateEndpointConnectionData(item)); - } - value = array; - continue; - } - if (property.NameEquals("nextLink"u8)) - { - nextLink = property.Value.GetString(); - continue; - } - } - return new DataFactoryPrivateEndpointConnectionListResult(value, nextLink.Value); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DataFactoryPrivateEndpointConnectionListResult.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DataFactoryPrivateEndpointConnectionListResult.cs deleted file mode 100644 index 59b8f2af..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DataFactoryPrivateEndpointConnectionListResult.cs +++ /dev/null @@ -1,37 +0,0 @@ -// - -#nullable disable - -using Azure.Core; -using Azure.ResourceManager.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// A list of linked service resources. - internal partial class DataFactoryPrivateEndpointConnectionListResult - { - /// Initializes a new instance of DataFactoryPrivateEndpointConnectionListResult. - /// List of Private Endpoint Connections. - /// is null. - internal DataFactoryPrivateEndpointConnectionListResult(IEnumerable value) - { - Argument.AssertNotNull(value, nameof(value)); - - Value = value.ToList(); - } - - /// Initializes a new instance of DataFactoryPrivateEndpointConnectionListResult. - /// List of Private Endpoint Connections. - /// The link to the next page of results, if any remaining results exist. - internal DataFactoryPrivateEndpointConnectionListResult(IReadOnlyList value, string nextLink) - { - Value = value; - NextLink = nextLink; - } - - /// List of Private Endpoint Connections. - public IReadOnlyList Value { get; } - /// The link to the next page of results, if any remaining results exist. - public string NextLink { get; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DataFactoryPrivateEndpointConnectionProperties.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DataFactoryPrivateEndpointConnectionProperties.Serialization.cs deleted file mode 100644 index 32710395..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DataFactoryPrivateEndpointConnectionProperties.Serialization.cs +++ /dev/null @@ -1,67 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; -using Azure.ResourceManager.Resources.Models; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class DataFactoryPrivateEndpointConnectionProperties : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - if (Optional.IsDefined(PrivateEndpoint)) - { - writer.WritePropertyName("privateEndpoint"u8); - JsonSerializer.Serialize(writer, PrivateEndpoint); - } - if (Optional.IsDefined(PrivateLinkServiceConnectionState)) - { - writer.WritePropertyName("privateLinkServiceConnectionState"u8); - writer.WriteObjectValue(PrivateLinkServiceConnectionState); - } - writer.WriteEndObject(); - } - - internal static DataFactoryPrivateEndpointConnectionProperties DeserializeDataFactoryPrivateEndpointConnectionProperties(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - Optional provisioningState = default; - Optional privateEndpoint = default; - Optional privateLinkServiceConnectionState = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("provisioningState"u8)) - { - provisioningState = property.Value.GetString(); - continue; - } - if (property.NameEquals("privateEndpoint"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - privateEndpoint = JsonSerializer.Deserialize(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("privateLinkServiceConnectionState"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - privateLinkServiceConnectionState = PrivateLinkConnectionState.DeserializePrivateLinkConnectionState(property.Value); - continue; - } - } - return new DataFactoryPrivateEndpointConnectionProperties(provisioningState.Value, privateEndpoint, privateLinkServiceConnectionState.Value); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DataFactoryPrivateEndpointConnectionProperties.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DataFactoryPrivateEndpointConnectionProperties.cs deleted file mode 100644 index e53f00ab..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DataFactoryPrivateEndpointConnectionProperties.cs +++ /dev/null @@ -1,42 +0,0 @@ -// - -#nullable disable - -using Azure.Core; -using Azure.ResourceManager.Resources.Models; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// A remote private endpoint connection. - public partial class DataFactoryPrivateEndpointConnectionProperties - { - /// Initializes a new instance of DataFactoryPrivateEndpointConnectionProperties. - public DataFactoryPrivateEndpointConnectionProperties() - { - } - - /// Initializes a new instance of DataFactoryPrivateEndpointConnectionProperties. - /// - /// PrivateEndpoint of a remote private endpoint connection. - /// The state of a private link connection. - internal DataFactoryPrivateEndpointConnectionProperties(string provisioningState, SubResource privateEndpoint, PrivateLinkConnectionState privateLinkServiceConnectionState) - { - ProvisioningState = provisioningState; - PrivateEndpoint = privateEndpoint; - PrivateLinkServiceConnectionState = privateLinkServiceConnectionState; - } - - /// Gets the provisioning state. - public string ProvisioningState { get; } - /// PrivateEndpoint of a remote private endpoint connection. - internal SubResource PrivateEndpoint { get; set; } - /// Gets Id. - public ResourceIdentifier PrivateEndpointId - { - get => PrivateEndpoint is null ? default : PrivateEndpoint.Id; - } - - /// The state of a private link connection. - public PrivateLinkConnectionState PrivateLinkServiceConnectionState { get; set; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DataFactoryPrivateEndpointData.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DataFactoryPrivateEndpointData.Serialization.cs deleted file mode 100644 index acdec9a8..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DataFactoryPrivateEndpointData.Serialization.cs +++ /dev/null @@ -1,78 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; -using AzureDataFactory.TestingFramework.Models; -using Azure.ResourceManager.Models; - -namespace Azure.ResourceManager.DataFactory -{ - public partial class DataFactoryPrivateEndpointData : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - writer.WritePropertyName("properties"u8); - writer.WriteObjectValue(Properties); - writer.WriteEndObject(); - } - - internal static DataFactoryPrivateEndpointData DeserializeDataFactoryPrivateEndpointData(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - DataFactoryPrivateEndpointProperties properties = default; - Optional etag = default; - ResourceIdentifier id = default; - string name = default; - ResourceType type = default; - Optional systemData = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("properties"u8)) - { - properties = DataFactoryPrivateEndpointProperties.DeserializeDataFactoryPrivateEndpointProperties(property.Value); - continue; - } - if (property.NameEquals("etag"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - etag = new ETag(property.Value.GetString()); - continue; - } - if (property.NameEquals("id"u8)) - { - id = new ResourceIdentifier(property.Value.GetString()); - continue; - } - if (property.NameEquals("name"u8)) - { - name = property.Value.GetString(); - continue; - } - if (property.NameEquals("type"u8)) - { - type = new ResourceType(property.Value.GetString()); - continue; - } - if (property.NameEquals("systemData"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - systemData = JsonSerializer.Deserialize(property.Value.GetRawText()); - continue; - } - } - return new DataFactoryPrivateEndpointData(id, name, type, systemData.Value, properties, Optional.ToNullable(etag)); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DataFactoryPrivateEndpointListResult.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DataFactoryPrivateEndpointListResult.Serialization.cs deleted file mode 100644 index 5e0f41e5..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DataFactoryPrivateEndpointListResult.Serialization.cs +++ /dev/null @@ -1,42 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; -using Azure.ResourceManager.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - internal partial class DataFactoryPrivateEndpointListResult - { - internal static DataFactoryPrivateEndpointListResult DeserializeDataFactoryPrivateEndpointListResult(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - IReadOnlyList value = default; - Optional nextLink = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("value"u8)) - { - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - array.Add(DataFactoryPrivateEndpointData.DeserializeDataFactoryPrivateEndpointData(item)); - } - value = array; - continue; - } - if (property.NameEquals("nextLink"u8)) - { - nextLink = property.Value.GetString(); - continue; - } - } - return new DataFactoryPrivateEndpointListResult(value, nextLink.Value); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DataFactoryPrivateEndpointListResult.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DataFactoryPrivateEndpointListResult.cs deleted file mode 100644 index 7d9ebeb3..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DataFactoryPrivateEndpointListResult.cs +++ /dev/null @@ -1,37 +0,0 @@ -// - -#nullable disable - -using Azure.Core; -using Azure.ResourceManager.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// A list of managed private endpoint resources. - internal partial class DataFactoryPrivateEndpointListResult - { - /// Initializes a new instance of DataFactoryPrivateEndpointListResult. - /// List of managed private endpoints. - /// is null. - internal DataFactoryPrivateEndpointListResult(IEnumerable value) - { - Argument.AssertNotNull(value, nameof(value)); - - Value = value.ToList(); - } - - /// Initializes a new instance of DataFactoryPrivateEndpointListResult. - /// List of managed private endpoints. - /// The link to the next page of results, if any remaining results exist. - internal DataFactoryPrivateEndpointListResult(IReadOnlyList value, string nextLink) - { - Value = value; - NextLink = nextLink; - } - - /// List of managed private endpoints. - public IReadOnlyList Value { get; } - /// The link to the next page of results, if any remaining results exist. - public string NextLink { get; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DataFactoryPrivateEndpointProperties.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DataFactoryPrivateEndpointProperties.Serialization.cs deleted file mode 100644 index d35e6648..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DataFactoryPrivateEndpointProperties.Serialization.cs +++ /dev/null @@ -1,126 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class DataFactoryPrivateEndpointProperties : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - if (Optional.IsDefined(ConnectionState)) - { - writer.WritePropertyName("connectionState"u8); - writer.WriteObjectValue(ConnectionState); - } - if (Optional.IsCollectionDefined(Fqdns)) - { - writer.WritePropertyName("fqdns"u8); - writer.WriteStartArray(); - foreach (var item in Fqdns) - { - writer.WriteStringValue(item); - } - writer.WriteEndArray(); - } - if (Optional.IsDefined(GroupId)) - { - writer.WritePropertyName("groupId"u8); - writer.WriteStringValue(GroupId); - } - if (Optional.IsDefined(PrivateLinkResourceId)) - { - writer.WritePropertyName("privateLinkResourceId"u8); - writer.WriteStringValue(PrivateLinkResourceId); - } - foreach (var item in AdditionalProperties) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.Value.ToString()).RootElement); -#endif - } - writer.WriteEndObject(); - } - - internal static DataFactoryPrivateEndpointProperties DeserializeDataFactoryPrivateEndpointProperties(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - Optional connectionState = default; - Optional> fqdns = default; - Optional groupId = default; - Optional isReserved = default; - Optional privateLinkResourceId = default; - Optional provisioningState = default; - IDictionary> additionalProperties = default; - Dictionary> additionalPropertiesDictionary = new Dictionary>(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("connectionState"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - connectionState = ConnectionStateProperties.DeserializeConnectionStateProperties(property.Value); - continue; - } - if (property.NameEquals("fqdns"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - array.Add(item.GetString()); - } - fqdns = array; - continue; - } - if (property.NameEquals("groupId"u8)) - { - groupId = property.Value.GetString(); - continue; - } - if (property.NameEquals("isReserved"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - isReserved = property.Value.GetBoolean(); - continue; - } - if (property.NameEquals("privateLinkResourceId"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - privateLinkResourceId = new ResourceIdentifier(property.Value.GetString()); - continue; - } - if (property.NameEquals("provisioningState"u8)) - { - provisioningState = property.Value.GetString(); - continue; - } - additionalPropertiesDictionary.Add(property.Name, JsonSerializer.Deserialize>(property.Value.GetRawText())); - } - additionalProperties = additionalPropertiesDictionary; - return new DataFactoryPrivateEndpointProperties(connectionState.Value, Optional.ToList(fqdns), groupId.Value, Optional.ToNullable(isReserved), privateLinkResourceId.Value, provisioningState.Value, additionalProperties); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DataFactoryPrivateEndpointProperties.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DataFactoryPrivateEndpointProperties.cs deleted file mode 100644 index 6eea124f..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DataFactoryPrivateEndpointProperties.cs +++ /dev/null @@ -1,83 +0,0 @@ -// - -#nullable disable - -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// Properties of a managed private endpoint. - public partial class DataFactoryPrivateEndpointProperties - { - /// Initializes a new instance of DataFactoryPrivateEndpointProperties. - public DataFactoryPrivateEndpointProperties() - { - Fqdns = new ChangeTrackingList(); - AdditionalProperties = new ChangeTrackingDictionary>(); - } - - /// Initializes a new instance of DataFactoryPrivateEndpointProperties. - /// The managed private endpoint connection state. - /// Fully qualified domain names. - /// The groupId to which the managed private endpoint is created. - /// Denotes whether the managed private endpoint is reserved. - /// The ARM resource ID of the resource to which the managed private endpoint is created. - /// The managed private endpoint provisioning state. - /// Additional Properties. - internal DataFactoryPrivateEndpointProperties(ConnectionStateProperties connectionState, IList fqdns, string groupId, bool? isReserved, ResourceIdentifier privateLinkResourceId, string provisioningState, IDictionary> additionalProperties) - { - ConnectionState = connectionState; - Fqdns = fqdns; - GroupId = groupId; - IsReserved = isReserved; - PrivateLinkResourceId = privateLinkResourceId; - ProvisioningState = provisioningState; - AdditionalProperties = additionalProperties; - } - - /// The managed private endpoint connection state. - public ConnectionStateProperties ConnectionState { get; set; } - /// Fully qualified domain names. - public IList Fqdns { get; } - /// The groupId to which the managed private endpoint is created. - public string GroupId { get; set; } - /// Denotes whether the managed private endpoint is reserved. - public bool? IsReserved { get; } - /// The ARM resource ID of the resource to which the managed private endpoint is created. - public ResourceIdentifier PrivateLinkResourceId { get; set; } - /// The managed private endpoint provisioning state. - public string ProvisioningState { get; } - /// - /// Additional Properties - /// - /// To assign an object to the value of this property use . - /// - /// - /// To assign an already formated json string to this property use . - /// - /// - /// Examples: - /// - /// - /// BinaryData.FromObjectAsJson("foo") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromString("\"foo\"") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromObjectAsJson(new { key = "value" }) - /// Creates a payload of { "key": "value" }. - /// - /// - /// BinaryData.FromString("{\"key\": \"value\"}") - /// Creates a payload of { "key": "value" }. - /// - /// - /// - /// - public IDictionary> AdditionalProperties { get; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DataFactoryPrivateLinkResource.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DataFactoryPrivateLinkResource.Serialization.cs deleted file mode 100644 index fc139536..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DataFactoryPrivateLinkResource.Serialization.cs +++ /dev/null @@ -1,85 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure; -using Azure.Core; -using Azure.ResourceManager.Models; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class DataFactoryPrivateLinkResource : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - if (Optional.IsDefined(Properties)) - { - writer.WritePropertyName("properties"u8); - writer.WriteObjectValue(Properties); - } - writer.WriteEndObject(); - } - - internal static DataFactoryPrivateLinkResource DeserializeDataFactoryPrivateLinkResource(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - Optional properties = default; - Optional etag = default; - ResourceIdentifier id = default; - string name = default; - ResourceType type = default; - Optional systemData = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("properties"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - properties = DataFactoryPrivateLinkResourceProperties.DeserializeDataFactoryPrivateLinkResourceProperties(property.Value); - continue; - } - if (property.NameEquals("etag"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - etag = new ETag(property.Value.GetString()); - continue; - } - if (property.NameEquals("id"u8)) - { - id = new ResourceIdentifier(property.Value.GetString()); - continue; - } - if (property.NameEquals("name"u8)) - { - name = property.Value.GetString(); - continue; - } - if (property.NameEquals("type"u8)) - { - type = new ResourceType(property.Value.GetString()); - continue; - } - if (property.NameEquals("systemData"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - systemData = JsonSerializer.Deserialize(property.Value.GetRawText()); - continue; - } - } - return new DataFactoryPrivateLinkResource(id, name, type, systemData.Value, properties.Value, Optional.ToNullable(etag)); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DataFactoryPrivateLinkResource.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DataFactoryPrivateLinkResource.cs deleted file mode 100644 index 5edf181b..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DataFactoryPrivateLinkResource.cs +++ /dev/null @@ -1,37 +0,0 @@ -// - -#nullable disable - -using Azure; -using Azure.Core; -using Azure.ResourceManager.Models; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// A private link resource. - public partial class DataFactoryPrivateLinkResource : ResourceData - { - /// Initializes a new instance of DataFactoryPrivateLinkResource. - public DataFactoryPrivateLinkResource() - { - } - - /// Initializes a new instance of DataFactoryPrivateLinkResource. - /// The id. - /// The name. - /// The resourceType. - /// The systemData. - /// Core resource properties. - /// Etag identifies change in the resource. - internal DataFactoryPrivateLinkResource(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, DataFactoryPrivateLinkResourceProperties properties, ETag? eTag) : base(id, name, resourceType, systemData) - { - Properties = properties; - ETag = eTag; - } - - /// Core resource properties. - public DataFactoryPrivateLinkResourceProperties Properties { get; set; } - /// Etag identifies change in the resource. - public ETag? ETag { get; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DataFactoryPrivateLinkResourceProperties.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DataFactoryPrivateLinkResourceProperties.Serialization.cs deleted file mode 100644 index 526a6a88..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DataFactoryPrivateLinkResourceProperties.Serialization.cs +++ /dev/null @@ -1,66 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class DataFactoryPrivateLinkResourceProperties : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - writer.WriteEndObject(); - } - - internal static DataFactoryPrivateLinkResourceProperties DeserializeDataFactoryPrivateLinkResourceProperties(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - Optional groupId = default; - Optional> requiredMembers = default; - Optional> requiredZoneNames = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("groupId"u8)) - { - groupId = property.Value.GetString(); - continue; - } - if (property.NameEquals("requiredMembers"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - array.Add(item.GetString()); - } - requiredMembers = array; - continue; - } - if (property.NameEquals("requiredZoneNames"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - array.Add(item.GetString()); - } - requiredZoneNames = array; - continue; - } - } - return new DataFactoryPrivateLinkResourceProperties(groupId.Value, Optional.ToList(requiredMembers), Optional.ToList(requiredZoneNames)); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DataFactoryPrivateLinkResourceProperties.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DataFactoryPrivateLinkResourceProperties.cs deleted file mode 100644 index 96c6bab7..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DataFactoryPrivateLinkResourceProperties.cs +++ /dev/null @@ -1,37 +0,0 @@ -// - -#nullable disable - -using Azure.Core; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// Properties of a private link resource. - public partial class DataFactoryPrivateLinkResourceProperties - { - /// Initializes a new instance of DataFactoryPrivateLinkResourceProperties. - public DataFactoryPrivateLinkResourceProperties() - { - RequiredMembers = new ChangeTrackingList(); - RequiredZoneNames = new ChangeTrackingList(); - } - - /// Initializes a new instance of DataFactoryPrivateLinkResourceProperties. - /// GroupId of a private link resource. - /// RequiredMembers of a private link resource. - /// RequiredZoneNames of a private link resource. - internal DataFactoryPrivateLinkResourceProperties(string groupId, IReadOnlyList requiredMembers, IReadOnlyList requiredZoneNames) - { - GroupId = groupId; - RequiredMembers = requiredMembers; - RequiredZoneNames = requiredZoneNames; - } - - /// GroupId of a private link resource. - public string GroupId { get; } - /// RequiredMembers of a private link resource. - public IReadOnlyList RequiredMembers { get; } - /// RequiredZoneNames of a private link resource. - public IReadOnlyList RequiredZoneNames { get; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DataFactoryPublicNetworkAccess.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DataFactoryPublicNetworkAccess.cs deleted file mode 100644 index b0b36d87..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DataFactoryPublicNetworkAccess.cs +++ /dev/null @@ -1,47 +0,0 @@ -// - -#nullable disable - -using System.ComponentModel; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// Whether or not public network access is allowed for the data factory. - public readonly partial struct DataFactoryPublicNetworkAccess : IEquatable - { - private readonly string _value; - - /// Initializes a new instance of . - /// is null. - public DataFactoryPublicNetworkAccess(string value) - { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } - - private const string EnabledValue = "Enabled"; - private const string DisabledValue = "Disabled"; - - /// Enabled. - public static DataFactoryPublicNetworkAccess Enabled { get; } = new DataFactoryPublicNetworkAccess(EnabledValue); - /// Disabled. - public static DataFactoryPublicNetworkAccess Disabled { get; } = new DataFactoryPublicNetworkAccess(DisabledValue); - /// Determines if two values are the same. - public static bool operator ==(DataFactoryPublicNetworkAccess left, DataFactoryPublicNetworkAccess right) => left.Equals(right); - /// Determines if two values are not the same. - public static bool operator !=(DataFactoryPublicNetworkAccess left, DataFactoryPublicNetworkAccess right) => !left.Equals(right); - /// Converts a string to a . - public static implicit operator DataFactoryPublicNetworkAccess(string value) => new DataFactoryPublicNetworkAccess(value); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override bool Equals(object obj) => obj is DataFactoryPublicNetworkAccess other && Equals(other); - /// - public bool Equals(DataFactoryPublicNetworkAccess other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override int GetHashCode() => _value?.GetHashCode() ?? 0; - /// - public override string ToString() => _value; - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DataFactoryPurviewConfiguration.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DataFactoryPurviewConfiguration.Serialization.cs deleted file mode 100644 index 66a593ed..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DataFactoryPurviewConfiguration.Serialization.cs +++ /dev/null @@ -1,45 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; - -namespace AzureDataFactory.TestingFramework.Models -{ - internal partial class DataFactoryPurviewConfiguration : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - if (Optional.IsDefined(PurviewResourceId)) - { - writer.WritePropertyName("purviewResourceId"u8); - writer.WriteStringValue(PurviewResourceId); - } - writer.WriteEndObject(); - } - - internal static DataFactoryPurviewConfiguration DeserializeDataFactoryPurviewConfiguration(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - Optional purviewResourceId = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("purviewResourceId"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - purviewResourceId = new ResourceIdentifier(property.Value.GetString()); - continue; - } - } - return new DataFactoryPurviewConfiguration(purviewResourceId.Value); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DataFactoryPurviewConfiguration.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DataFactoryPurviewConfiguration.cs deleted file mode 100644 index 3847b8bb..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DataFactoryPurviewConfiguration.cs +++ /dev/null @@ -1,27 +0,0 @@ -// - -#nullable disable - -using Azure.Core; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// Purview configuration. - internal partial class DataFactoryPurviewConfiguration - { - /// Initializes a new instance of DataFactoryPurviewConfiguration. - public DataFactoryPurviewConfiguration() - { - } - - /// Initializes a new instance of DataFactoryPurviewConfiguration. - /// Purview resource id. - internal DataFactoryPurviewConfiguration(ResourceIdentifier purviewResourceId) - { - PurviewResourceId = purviewResourceId; - } - - /// Purview resource id. - public ResourceIdentifier PurviewResourceId { get; set; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DataFactoryRecurrenceFrequency.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DataFactoryRecurrenceFrequency.cs deleted file mode 100644 index 3fe60189..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DataFactoryRecurrenceFrequency.cs +++ /dev/null @@ -1,62 +0,0 @@ -// - -#nullable disable - -using System.ComponentModel; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// Enumerates possible frequency option for the schedule trigger. - public readonly partial struct DataFactoryRecurrenceFrequency : IEquatable - { - private readonly string _value; - - /// Initializes a new instance of . - /// is null. - public DataFactoryRecurrenceFrequency(string value) - { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } - - private const string NotSpecifiedValue = "NotSpecified"; - private const string MinuteValue = "Minute"; - private const string HourValue = "Hour"; - private const string DayValue = "Day"; - private const string WeekValue = "Week"; - private const string MonthValue = "Month"; - private const string YearValue = "Year"; - - /// NotSpecified. - public static DataFactoryRecurrenceFrequency NotSpecified { get; } = new DataFactoryRecurrenceFrequency(NotSpecifiedValue); - /// Minute. - public static DataFactoryRecurrenceFrequency Minute { get; } = new DataFactoryRecurrenceFrequency(MinuteValue); - /// Hour. - public static DataFactoryRecurrenceFrequency Hour { get; } = new DataFactoryRecurrenceFrequency(HourValue); - /// Day. - public static DataFactoryRecurrenceFrequency Day { get; } = new DataFactoryRecurrenceFrequency(DayValue); - /// Week. - public static DataFactoryRecurrenceFrequency Week { get; } = new DataFactoryRecurrenceFrequency(WeekValue); - /// Month. - public static DataFactoryRecurrenceFrequency Month { get; } = new DataFactoryRecurrenceFrequency(MonthValue); - /// Year. - public static DataFactoryRecurrenceFrequency Year { get; } = new DataFactoryRecurrenceFrequency(YearValue); - /// Determines if two values are the same. - public static bool operator ==(DataFactoryRecurrenceFrequency left, DataFactoryRecurrenceFrequency right) => left.Equals(right); - /// Determines if two values are not the same. - public static bool operator !=(DataFactoryRecurrenceFrequency left, DataFactoryRecurrenceFrequency right) => !left.Equals(right); - /// Converts a string to a . - public static implicit operator DataFactoryRecurrenceFrequency(string value) => new DataFactoryRecurrenceFrequency(value); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override bool Equals(object obj) => obj is DataFactoryRecurrenceFrequency other && Equals(other); - /// - public bool Equals(DataFactoryRecurrenceFrequency other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override int GetHashCode() => _value?.GetHashCode() ?? 0; - /// - public override string ToString() => _value; - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DataFactoryRecurrenceSchedule.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DataFactoryRecurrenceSchedule.Serialization.cs deleted file mode 100644 index 36943a79..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DataFactoryRecurrenceSchedule.Serialization.cs +++ /dev/null @@ -1,169 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class DataFactoryRecurrenceSchedule : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - if (Optional.IsCollectionDefined(Minutes)) - { - writer.WritePropertyName("minutes"u8); - writer.WriteStartArray(); - foreach (var item in Minutes) - { - writer.WriteNumberValue(item); - } - writer.WriteEndArray(); - } - if (Optional.IsCollectionDefined(Hours)) - { - writer.WritePropertyName("hours"u8); - writer.WriteStartArray(); - foreach (var item in Hours) - { - writer.WriteNumberValue(item); - } - writer.WriteEndArray(); - } - if (Optional.IsCollectionDefined(WeekDays)) - { - writer.WritePropertyName("weekDays"u8); - writer.WriteStartArray(); - foreach (var item in WeekDays) - { - writer.WriteStringValue(item.ToSerialString()); - } - writer.WriteEndArray(); - } - if (Optional.IsCollectionDefined(MonthDays)) - { - writer.WritePropertyName("monthDays"u8); - writer.WriteStartArray(); - foreach (var item in MonthDays) - { - writer.WriteNumberValue(item); - } - writer.WriteEndArray(); - } - if (Optional.IsCollectionDefined(MonthlyOccurrences)) - { - writer.WritePropertyName("monthlyOccurrences"u8); - writer.WriteStartArray(); - foreach (var item in MonthlyOccurrences) - { - writer.WriteObjectValue(item); - } - writer.WriteEndArray(); - } - foreach (var item in AdditionalProperties) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.Value.ToString()).RootElement); -#endif - } - writer.WriteEndObject(); - } - - internal static DataFactoryRecurrenceSchedule DeserializeDataFactoryRecurrenceSchedule(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - Optional> minutes = default; - Optional> hours = default; - Optional> weekDays = default; - Optional> monthDays = default; - Optional> monthlyOccurrences = default; - IDictionary> additionalProperties = default; - Dictionary> additionalPropertiesDictionary = new Dictionary>(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("minutes"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - array.Add(item.GetInt32()); - } - minutes = array; - continue; - } - if (property.NameEquals("hours"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - array.Add(item.GetInt32()); - } - hours = array; - continue; - } - if (property.NameEquals("weekDays"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - array.Add(item.GetString().ToDataFactoryDayOfWeek()); - } - weekDays = array; - continue; - } - if (property.NameEquals("monthDays"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - array.Add(item.GetInt32()); - } - monthDays = array; - continue; - } - if (property.NameEquals("monthlyOccurrences"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - array.Add(DataFactoryRecurrenceScheduleOccurrence.DeserializeDataFactoryRecurrenceScheduleOccurrence(item)); - } - monthlyOccurrences = array; - continue; - } - additionalPropertiesDictionary.Add(property.Name, JsonSerializer.Deserialize>(property.Value.GetRawText())); - } - additionalProperties = additionalPropertiesDictionary; - return new DataFactoryRecurrenceSchedule(Optional.ToList(minutes), Optional.ToList(hours), Optional.ToList(weekDays), Optional.ToList(monthDays), Optional.ToList(monthlyOccurrences), additionalProperties); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DataFactoryRecurrenceSchedule.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DataFactoryRecurrenceSchedule.cs deleted file mode 100644 index 4029921c..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DataFactoryRecurrenceSchedule.cs +++ /dev/null @@ -1,83 +0,0 @@ -// - -#nullable disable - -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// The recurrence schedule. - public partial class DataFactoryRecurrenceSchedule - { - /// Initializes a new instance of DataFactoryRecurrenceSchedule. - public DataFactoryRecurrenceSchedule() - { - Minutes = new ChangeTrackingList(); - Hours = new ChangeTrackingList(); - WeekDays = new ChangeTrackingList(); - MonthDays = new ChangeTrackingList(); - MonthlyOccurrences = new ChangeTrackingList(); - AdditionalProperties = new ChangeTrackingDictionary>(); - } - - /// Initializes a new instance of DataFactoryRecurrenceSchedule. - /// The minutes. - /// The hours. - /// The days of the week. - /// The month days. - /// The monthly occurrences. - /// Additional Properties. - internal DataFactoryRecurrenceSchedule(IList minutes, IList hours, IList weekDays, IList monthDays, IList monthlyOccurrences, IDictionary> additionalProperties) - { - Minutes = minutes; - Hours = hours; - WeekDays = weekDays; - MonthDays = monthDays; - MonthlyOccurrences = monthlyOccurrences; - AdditionalProperties = additionalProperties; - } - - /// The minutes. - public IList Minutes { get; } - /// The hours. - public IList Hours { get; } - /// The days of the week. - public IList WeekDays { get; } - /// The month days. - public IList MonthDays { get; } - /// The monthly occurrences. - public IList MonthlyOccurrences { get; } - /// - /// Additional Properties - /// - /// To assign an object to the value of this property use . - /// - /// - /// To assign an already formated json string to this property use . - /// - /// - /// Examples: - /// - /// - /// BinaryData.FromObjectAsJson("foo") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromString("\"foo\"") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromObjectAsJson(new { key = "value" }) - /// Creates a payload of { "key": "value" }. - /// - /// - /// BinaryData.FromString("{\"key\": \"value\"}") - /// Creates a payload of { "key": "value" }. - /// - /// - /// - /// - public IDictionary> AdditionalProperties { get; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DataFactoryRecurrenceScheduleOccurrence.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DataFactoryRecurrenceScheduleOccurrence.Serialization.cs deleted file mode 100644 index 210309c1..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DataFactoryRecurrenceScheduleOccurrence.Serialization.cs +++ /dev/null @@ -1,74 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class DataFactoryRecurrenceScheduleOccurrence : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - if (Optional.IsDefined(Day)) - { - writer.WritePropertyName("day"u8); - writer.WriteStringValue(Day.Value.ToSerialString()); - } - if (Optional.IsDefined(Occurrence)) - { - writer.WritePropertyName("occurrence"u8); - writer.WriteNumberValue(Occurrence.Value); - } - foreach (var item in AdditionalProperties) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.Value.ToString()).RootElement); -#endif - } - writer.WriteEndObject(); - } - - internal static DataFactoryRecurrenceScheduleOccurrence DeserializeDataFactoryRecurrenceScheduleOccurrence(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - Optional day = default; - Optional occurrence = default; - IDictionary> additionalProperties = default; - Dictionary> additionalPropertiesDictionary = new Dictionary>(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("day"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - day = property.Value.GetString().ToDataFactoryDayOfWeek(); - continue; - } - if (property.NameEquals("occurrence"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - occurrence = property.Value.GetInt32(); - continue; - } - additionalPropertiesDictionary.Add(property.Name, JsonSerializer.Deserialize>(property.Value.GetRawText())); - } - additionalProperties = additionalPropertiesDictionary; - return new DataFactoryRecurrenceScheduleOccurrence(Optional.ToNullable(day), Optional.ToNullable(occurrence), additionalProperties); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DataFactoryRecurrenceScheduleOccurrence.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DataFactoryRecurrenceScheduleOccurrence.cs deleted file mode 100644 index 8a55b1ec..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DataFactoryRecurrenceScheduleOccurrence.cs +++ /dev/null @@ -1,66 +0,0 @@ -// - -#nullable disable - -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// The recurrence schedule occurrence. - public partial class DataFactoryRecurrenceScheduleOccurrence - { - /// Initializes a new instance of DataFactoryRecurrenceScheduleOccurrence. - public DataFactoryRecurrenceScheduleOccurrence() - { - AdditionalProperties = new ChangeTrackingDictionary>(); - } - - /// Initializes a new instance of DataFactoryRecurrenceScheduleOccurrence. - /// The day of the week. - /// The occurrence. - /// Additional Properties. - internal DataFactoryRecurrenceScheduleOccurrence(DataFactoryDayOfWeek? day, int? occurrence, IDictionary> additionalProperties) - { - Day = day; - Occurrence = occurrence; - AdditionalProperties = additionalProperties; - } - - /// The day of the week. - public DataFactoryDayOfWeek? Day { get; set; } - /// The occurrence. - public int? Occurrence { get; set; } - /// - /// Additional Properties - /// - /// To assign an object to the value of this property use . - /// - /// - /// To assign an already formated json string to this property use . - /// - /// - /// Examples: - /// - /// - /// BinaryData.FromObjectAsJson("foo") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromString("\"foo\"") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromObjectAsJson(new { key = "value" }) - /// Creates a payload of { "key": "value" }. - /// - /// - /// BinaryData.FromString("{\"key\": \"value\"}") - /// Creates a payload of { "key": "value" }. - /// - /// - /// - /// - public IDictionary> AdditionalProperties { get; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DataFactoryScheduleTrigger.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DataFactoryScheduleTrigger.Serialization.cs deleted file mode 100644 index eda681aa..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DataFactoryScheduleTrigger.Serialization.cs +++ /dev/null @@ -1,162 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class DataFactoryScheduleTrigger : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - if (Optional.IsCollectionDefined(Pipelines)) - { - writer.WritePropertyName("pipelines"u8); - writer.WriteStartArray(); - foreach (var item in Pipelines) - { - writer.WriteObjectValue(item); - } - writer.WriteEndArray(); - } - writer.WritePropertyName("type"u8); - writer.WriteStringValue(TriggerType); - if (Optional.IsDefined(Description)) - { - writer.WritePropertyName("description"u8); - writer.WriteStringValue(Description); - } - if (Optional.IsCollectionDefined(Annotations)) - { - writer.WritePropertyName("annotations"u8); - writer.WriteStartArray(); - foreach (var item in Annotations) - { - if (item == null) - { - writer.WriteNullValue(); - continue; - } -#if NET6_0_OR_GREATER - writer.WriteRawValue(item); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.ToString()).RootElement); -#endif - } - writer.WriteEndArray(); - } - writer.WritePropertyName("typeProperties"u8); - writer.WriteStartObject(); - writer.WritePropertyName("recurrence"u8); - writer.WriteObjectValue(Recurrence); - writer.WriteEndObject(); - foreach (var item in AdditionalProperties) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.Value.ToString()).RootElement); -#endif - } - writer.WriteEndObject(); - } - - internal static DataFactoryScheduleTrigger DeserializeDataFactoryScheduleTrigger(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - Optional> pipelines = default; - string type = default; - Optional description = default; - Optional runtimeState = default; - Optional> annotations = default; - ScheduleTriggerRecurrence recurrence = default; - IDictionary> additionalProperties = default; - Dictionary> additionalPropertiesDictionary = new Dictionary>(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("pipelines"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - array.Add(TriggerPipelineReference.DeserializeTriggerPipelineReference(item)); - } - pipelines = array; - continue; - } - if (property.NameEquals("type"u8)) - { - type = property.Value.GetString(); - continue; - } - if (property.NameEquals("description"u8)) - { - description = property.Value.GetString(); - continue; - } - if (property.NameEquals("runtimeState"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - runtimeState = new DataFactoryTriggerRuntimeState(property.Value.GetString()); - continue; - } - if (property.NameEquals("annotations"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - if (item.ValueKind == JsonValueKind.Null) - { - array.Add(null); - } - else - { - array.Add(BinaryData.FromString(item.GetRawText())); - } - } - annotations = array; - continue; - } - if (property.NameEquals("typeProperties"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - foreach (var property0 in property.Value.EnumerateObject()) - { - if (property0.NameEquals("recurrence"u8)) - { - recurrence = ScheduleTriggerRecurrence.DeserializeScheduleTriggerRecurrence(property0.Value); - continue; - } - } - continue; - } - additionalPropertiesDictionary.Add(property.Name, JsonSerializer.Deserialize>(property.Value.GetRawText())); - } - additionalProperties = additionalPropertiesDictionary; - return new DataFactoryScheduleTrigger(type, description.Value, Optional.ToNullable(runtimeState), Optional.ToList(annotations), additionalProperties, Optional.ToList(pipelines), recurrence); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DataFactoryScheduleTrigger.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DataFactoryScheduleTrigger.cs deleted file mode 100644 index c082c8fe..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DataFactoryScheduleTrigger.cs +++ /dev/null @@ -1,41 +0,0 @@ -// - -#nullable disable - -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// Trigger that creates pipeline runs periodically, on schedule. - public partial class DataFactoryScheduleTrigger : MultiplePipelineTrigger - { - /// Initializes a new instance of DataFactoryScheduleTrigger. - /// Recurrence schedule configuration. - /// is null. - public DataFactoryScheduleTrigger(ScheduleTriggerRecurrence recurrence) - { - Argument.AssertNotNull(recurrence, nameof(recurrence)); - - Recurrence = recurrence; - TriggerType = "ScheduleTrigger"; - } - - /// Initializes a new instance of DataFactoryScheduleTrigger. - /// Trigger type. - /// Trigger description. - /// Indicates if trigger is running or not. Updated when Start/Stop APIs are called on the Trigger. - /// List of tags that can be used for describing the trigger. - /// Additional Properties. - /// Pipelines that need to be started. - /// Recurrence schedule configuration. - internal DataFactoryScheduleTrigger(string triggerType, string description, DataFactoryTriggerRuntimeState? runtimeState, IList annotations, IDictionary> additionalProperties, IList pipelines, ScheduleTriggerRecurrence recurrence) : base(triggerType, description, runtimeState, annotations, additionalProperties, pipelines) - { - Recurrence = recurrence; - TriggerType = triggerType ?? "ScheduleTrigger"; - } - - /// Recurrence schedule configuration. - public ScheduleTriggerRecurrence Recurrence { get; set; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DataFactoryScriptAction.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DataFactoryScriptAction.Serialization.cs deleted file mode 100644 index 836f2c08..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DataFactoryScriptAction.Serialization.cs +++ /dev/null @@ -1,69 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class DataFactoryScriptAction : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - writer.WritePropertyName("uri"u8); - writer.WriteStringValue(Uri.AbsoluteUri); - writer.WritePropertyName("roles"u8); -#if NET6_0_OR_GREATER - writer.WriteRawValue(Roles); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(Roles.ToString()).RootElement); -#endif - if (Optional.IsDefined(Parameters)) - { - writer.WritePropertyName("parameters"u8); - writer.WriteStringValue(Parameters); - } - writer.WriteEndObject(); - } - - internal static DataFactoryScriptAction DeserializeDataFactoryScriptAction(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - string name = default; - Uri uri = default; - BinaryData roles = default; - Optional parameters = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("name"u8)) - { - name = property.Value.GetString(); - continue; - } - if (property.NameEquals("uri"u8)) - { - uri = new Uri(property.Value.GetString()); - continue; - } - if (property.NameEquals("roles"u8)) - { - roles = BinaryData.FromString(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("parameters"u8)) - { - parameters = property.Value.GetString(); - continue; - } - } - return new DataFactoryScriptAction(name, uri, roles, parameters.Value); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DataFactoryScriptAction.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DataFactoryScriptAction.cs deleted file mode 100644 index 000194a5..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DataFactoryScriptAction.cs +++ /dev/null @@ -1,79 +0,0 @@ -// - -#nullable disable - -using Azure.Core; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// Custom script action to run on HDI ondemand cluster once it's up. - public partial class DataFactoryScriptAction - { - /// Initializes a new instance of DataFactoryScriptAction. - /// The user provided name of the script action. - /// The URI for the script action. - /// The node types on which the script action should be executed. - /// , or is null. - public DataFactoryScriptAction(string name, Uri uri, BinaryData roles) - { - Argument.AssertNotNull(name, nameof(name)); - Argument.AssertNotNull(uri, nameof(uri)); - Argument.AssertNotNull(roles, nameof(roles)); - - Name = name; - Uri = uri; - Roles = roles; - } - - /// Initializes a new instance of DataFactoryScriptAction. - /// The user provided name of the script action. - /// The URI for the script action. - /// The node types on which the script action should be executed. - /// The parameters for the script action. - internal DataFactoryScriptAction(string name, Uri uri, BinaryData roles, string parameters) - { - Name = name; - Uri = uri; - Roles = roles; - Parameters = parameters; - } - - /// The user provided name of the script action. - public string Name { get; set; } - /// The URI for the script action. - public Uri Uri { get; set; } - /// - /// The node types on which the script action should be executed. - /// - /// To assign an object to this property use . - /// - /// - /// To assign an already formated json string to this property use . - /// - /// - /// Examples: - /// - /// - /// BinaryData.FromObjectAsJson("foo") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromString("\"foo\"") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromObjectAsJson(new { key = "value" }) - /// Creates a payload of { "key": "value" }. - /// - /// - /// BinaryData.FromString("{\"key\": \"value\"}") - /// Creates a payload of { "key": "value" }. - /// - /// - /// - /// - public BinaryData Roles { get; set; } - /// The parameters for the script action. - public string Parameters { get; set; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DataFactoryScriptActivity.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DataFactoryScriptActivity.Serialization.cs deleted file mode 100644 index dd289744..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DataFactoryScriptActivity.Serialization.cs +++ /dev/null @@ -1,251 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class DataFactoryScriptActivity : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - if (Optional.IsDefined(LinkedServiceName)) - { - writer.WritePropertyName("linkedServiceName"u8); - JsonSerializer.Serialize(writer, LinkedServiceName); - } - if (Optional.IsDefined(Policy)) - { - writer.WritePropertyName("policy"u8); - writer.WriteObjectValue(Policy); - } - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ActivityType); - if (Optional.IsDefined(Description)) - { - writer.WritePropertyName("description"u8); - writer.WriteStringValue(Description); - } - if (Optional.IsDefined(State)) - { - writer.WritePropertyName("state"u8); - writer.WriteStringValue(State.Value.ToString()); - } - if (Optional.IsDefined(OnInactiveMarkAs)) - { - writer.WritePropertyName("onInactiveMarkAs"u8); - writer.WriteStringValue(OnInactiveMarkAs.Value.ToString()); - } - if (Optional.IsCollectionDefined(DependsOn)) - { - writer.WritePropertyName("dependsOn"u8); - writer.WriteStartArray(); - foreach (var item in DependsOn) - { - writer.WriteObjectValue(item); - } - writer.WriteEndArray(); - } - if (Optional.IsCollectionDefined(UserProperties)) - { - writer.WritePropertyName("userProperties"u8); - writer.WriteStartArray(); - foreach (var item in UserProperties) - { - writer.WriteObjectValue(item); - } - writer.WriteEndArray(); - } - writer.WritePropertyName("typeProperties"u8); - writer.WriteStartObject(); - if (Optional.IsDefined(ScriptBlockExecutionTimeout)) - { - writer.WritePropertyName("scriptBlockExecutionTimeout"u8); - JsonSerializer.Serialize(writer, ScriptBlockExecutionTimeout); - } - if (Optional.IsCollectionDefined(Scripts)) - { - writer.WritePropertyName("scripts"u8); - writer.WriteStartArray(); - foreach (var item in Scripts) - { - writer.WriteObjectValue(item); - } - writer.WriteEndArray(); - } - if (Optional.IsDefined(LogSettings)) - { - writer.WritePropertyName("logSettings"u8); - writer.WriteObjectValue(LogSettings); - } - writer.WriteEndObject(); - foreach (var item in AdditionalProperties) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.Value.ToString()).RootElement); -#endif - } - writer.WriteEndObject(); - } - - internal static DataFactoryScriptActivity DeserializeDataFactoryScriptActivity(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - Optional linkedServiceName = default; - Optional policy = default; - string name = default; - string type = default; - Optional description = default; - Optional state = default; - Optional onInactiveMarkAs = default; - Optional> dependsOn = default; - Optional> userProperties = default; - Optional> scriptBlockExecutionTimeout = default; - Optional> scripts = default; - Optional logSettings = default; - IDictionary> additionalProperties = default; - Dictionary> additionalPropertiesDictionary = new Dictionary>(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("linkedServiceName"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - linkedServiceName = JsonSerializer.Deserialize(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("policy"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - policy = PipelineActivityPolicy.DeserializePipelineActivityPolicy(property.Value); - continue; - } - if (property.NameEquals("name"u8)) - { - name = property.Value.GetString(); - continue; - } - if (property.NameEquals("type"u8)) - { - type = property.Value.GetString(); - continue; - } - if (property.NameEquals("description"u8)) - { - description = property.Value.GetString(); - continue; - } - if (property.NameEquals("state"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - state = new PipelineActivityState(property.Value.GetString()); - continue; - } - if (property.NameEquals("onInactiveMarkAs"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - onInactiveMarkAs = new ActivityOnInactiveMarkAs(property.Value.GetString()); - continue; - } - if (property.NameEquals("dependsOn"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - array.Add(PipelineActivityDependency.DeserializePipelineActivityDependency(item)); - } - dependsOn = array; - continue; - } - if (property.NameEquals("userProperties"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - array.Add(PipelineActivityUserProperty.DeserializePipelineActivityUserProperty(item)); - } - userProperties = array; - continue; - } - if (property.NameEquals("typeProperties"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - foreach (var property0 in property.Value.EnumerateObject()) - { - if (property0.NameEquals("scriptBlockExecutionTimeout"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - scriptBlockExecutionTimeout = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("scripts"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property0.Value.EnumerateArray()) - { - array.Add(ScriptActivityScriptBlock.DeserializeScriptActivityScriptBlock(item)); - } - scripts = array; - continue; - } - if (property0.NameEquals("logSettings"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - logSettings = ScriptActivityTypeLogSettings.DeserializeScriptActivityTypeLogSettings(property0.Value); - continue; - } - } - continue; - } - additionalPropertiesDictionary.Add(property.Name, JsonSerializer.Deserialize>(property.Value.GetRawText())); - } - additionalProperties = additionalPropertiesDictionary; - return new DataFactoryScriptActivity(name, type, description.Value, Optional.ToNullable(state), Optional.ToNullable(onInactiveMarkAs), Optional.ToList(dependsOn), Optional.ToList(userProperties), additionalProperties, linkedServiceName, policy.Value, scriptBlockExecutionTimeout.Value, Optional.ToList(scripts), logSettings.Value); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DataFactoryScriptActivity.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DataFactoryScriptActivity.cs deleted file mode 100644 index e870b183..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DataFactoryScriptActivity.cs +++ /dev/null @@ -1,53 +0,0 @@ -// - -#nullable disable - -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// Script activity type. - public partial class DataFactoryScriptActivity : ExecutionActivity - { - /// Initializes a new instance of DataFactoryScriptActivity. - /// Activity name. - /// is null. - public DataFactoryScriptActivity(string name) : base(name) - { - Argument.AssertNotNull(name, nameof(name)); - - Scripts = new ChangeTrackingList(); - ActivityType = "Script"; - } - - /// Initializes a new instance of DataFactoryScriptActivity. - /// Activity name. - /// Type of activity. - /// Activity description. - /// Activity state. This is an optional property and if not provided, the state will be Active by default. - /// 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. - /// Activity depends on condition. - /// Activity user properties. - /// Additional Properties. - /// Linked service reference. - /// Activity policy. - /// ScriptBlock execution timeout. Type: string (or Expression with resultType string), pattern: ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). - /// Array of script blocks. Type: array. - /// Log settings of script activity. - internal DataFactoryScriptActivity(string name, string activityType, string description, PipelineActivityState? state, ActivityOnInactiveMarkAs? onInactiveMarkAs, IList dependsOn, IList userProperties, IDictionary> additionalProperties, DataFactoryLinkedServiceReference linkedServiceName, PipelineActivityPolicy policy, DataFactoryElement scriptBlockExecutionTimeout, IList scripts, ScriptActivityTypeLogSettings logSettings) : base(name, activityType, description, state, onInactiveMarkAs, dependsOn, userProperties, additionalProperties, linkedServiceName, policy) - { - ScriptBlockExecutionTimeout = scriptBlockExecutionTimeout; - Scripts = scripts; - LogSettings = logSettings; - ActivityType = activityType ?? "Script"; - } - - /// ScriptBlock execution timeout. Type: string (or Expression with resultType string), pattern: ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). - public DataFactoryElement ScriptBlockExecutionTimeout { get; set; } - /// Array of script blocks. Type: array. - public IList Scripts { get; } - /// Log settings of script activity. - public ScriptActivityTypeLogSettings LogSettings { get; set; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DataFactoryScriptType.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DataFactoryScriptType.cs deleted file mode 100644 index b86f294c..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DataFactoryScriptType.cs +++ /dev/null @@ -1,47 +0,0 @@ -// - -#nullable disable - -using System.ComponentModel; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// The type of the query. Type: string. - public readonly partial struct DataFactoryScriptType : IEquatable - { - private readonly string _value; - - /// Initializes a new instance of . - /// is null. - public DataFactoryScriptType(string value) - { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } - - private const string QueryValue = "Query"; - private const string NonQueryValue = "NonQuery"; - - /// Query. - public static DataFactoryScriptType Query { get; } = new DataFactoryScriptType(QueryValue); - /// NonQuery. - public static DataFactoryScriptType NonQuery { get; } = new DataFactoryScriptType(NonQueryValue); - /// Determines if two values are the same. - public static bool operator ==(DataFactoryScriptType left, DataFactoryScriptType right) => left.Equals(right); - /// Determines if two values are not the same. - public static bool operator !=(DataFactoryScriptType left, DataFactoryScriptType right) => !left.Equals(right); - /// Converts a string to a . - public static implicit operator DataFactoryScriptType(string value) => new DataFactoryScriptType(value); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override bool Equals(object obj) => obj is DataFactoryScriptType other && Equals(other); - /// - public bool Equals(DataFactoryScriptType other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override int GetHashCode() => _value?.GetHashCode() ?? 0; - /// - public override string ToString() => _value; - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DataFactorySparkConfigurationType.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DataFactorySparkConfigurationType.cs deleted file mode 100644 index 9449bbd5..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DataFactorySparkConfigurationType.cs +++ /dev/null @@ -1,50 +0,0 @@ -// - -#nullable disable - -using System.ComponentModel; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// The type of the spark config. - public readonly partial struct DataFactorySparkConfigurationType : IEquatable - { - private readonly string _value; - - /// Initializes a new instance of . - /// is null. - public DataFactorySparkConfigurationType(string value) - { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } - - private const string DefaultValue = "Default"; - private const string CustomizedValue = "Customized"; - private const string ArtifactValue = "Artifact"; - - /// Default. - public static DataFactorySparkConfigurationType Default { get; } = new DataFactorySparkConfigurationType(DefaultValue); - /// Customized. - public static DataFactorySparkConfigurationType Customized { get; } = new DataFactorySparkConfigurationType(CustomizedValue); - /// Artifact. - public static DataFactorySparkConfigurationType Artifact { get; } = new DataFactorySparkConfigurationType(ArtifactValue); - /// Determines if two values are the same. - public static bool operator ==(DataFactorySparkConfigurationType left, DataFactorySparkConfigurationType right) => left.Equals(right); - /// Determines if two values are not the same. - public static bool operator !=(DataFactorySparkConfigurationType left, DataFactorySparkConfigurationType right) => !left.Equals(right); - /// Converts a string to a . - public static implicit operator DataFactorySparkConfigurationType(string value) => new DataFactorySparkConfigurationType(value); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override bool Equals(object obj) => obj is DataFactorySparkConfigurationType other && Equals(other); - /// - public bool Equals(DataFactorySparkConfigurationType other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override int GetHashCode() => _value?.GetHashCode() ?? 0; - /// - public override string ToString() => _value; - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DataFactoryTriggerData.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DataFactoryTriggerData.Serialization.cs deleted file mode 100644 index 77949ead..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DataFactoryTriggerData.Serialization.cs +++ /dev/null @@ -1,78 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; -using AzureDataFactory.TestingFramework.Models; -using Azure.ResourceManager.Models; - -namespace Azure.ResourceManager.DataFactory -{ - public partial class DataFactoryTriggerData : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - writer.WritePropertyName("properties"u8); - writer.WriteObjectValue(Properties); - writer.WriteEndObject(); - } - - internal static DataFactoryTriggerData DeserializeDataFactoryTriggerData(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - DataFactoryTriggerProperties properties = default; - Optional etag = default; - ResourceIdentifier id = default; - string name = default; - ResourceType type = default; - Optional systemData = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("properties"u8)) - { - properties = DataFactoryTriggerProperties.DeserializeDataFactoryTriggerProperties(property.Value); - continue; - } - if (property.NameEquals("etag"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - etag = new ETag(property.Value.GetString()); - continue; - } - if (property.NameEquals("id"u8)) - { - id = new ResourceIdentifier(property.Value.GetString()); - continue; - } - if (property.NameEquals("name"u8)) - { - name = property.Value.GetString(); - continue; - } - if (property.NameEquals("type"u8)) - { - type = new ResourceType(property.Value.GetString()); - continue; - } - if (property.NameEquals("systemData"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - systemData = JsonSerializer.Deserialize(property.Value.GetRawText()); - continue; - } - } - return new DataFactoryTriggerData(id, name, type, systemData.Value, properties, Optional.ToNullable(etag)); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DataFactoryTriggerListResult.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DataFactoryTriggerListResult.Serialization.cs deleted file mode 100644 index 0a544426..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DataFactoryTriggerListResult.Serialization.cs +++ /dev/null @@ -1,42 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; -using Azure.ResourceManager.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - internal partial class DataFactoryTriggerListResult - { - internal static DataFactoryTriggerListResult DeserializeDataFactoryTriggerListResult(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - IReadOnlyList value = default; - Optional nextLink = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("value"u8)) - { - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - array.Add(DataFactoryTriggerData.DeserializeDataFactoryTriggerData(item)); - } - value = array; - continue; - } - if (property.NameEquals("nextLink"u8)) - { - nextLink = property.Value.GetString(); - continue; - } - } - return new DataFactoryTriggerListResult(value, nextLink.Value); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DataFactoryTriggerListResult.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DataFactoryTriggerListResult.cs deleted file mode 100644 index 96e48ae0..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DataFactoryTriggerListResult.cs +++ /dev/null @@ -1,37 +0,0 @@ -// - -#nullable disable - -using Azure.Core; -using Azure.ResourceManager.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// A list of trigger resources. - internal partial class DataFactoryTriggerListResult - { - /// Initializes a new instance of DataFactoryTriggerListResult. - /// List of triggers. - /// is null. - internal DataFactoryTriggerListResult(IEnumerable value) - { - Argument.AssertNotNull(value, nameof(value)); - - Value = value.ToList(); - } - - /// Initializes a new instance of DataFactoryTriggerListResult. - /// List of triggers. - /// The link to the next page of results, if any remaining results exist. - internal DataFactoryTriggerListResult(IReadOnlyList value, string nextLink) - { - Value = value; - NextLink = nextLink; - } - - /// List of triggers. - public IReadOnlyList Value { get; } - /// The link to the next page of results, if any remaining results exist. - public string NextLink { get; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DataFactoryTriggerProperties.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DataFactoryTriggerProperties.Serialization.cs deleted file mode 100644 index 7bf0d585..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DataFactoryTriggerProperties.Serialization.cs +++ /dev/null @@ -1,76 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class DataFactoryTriggerProperties : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - writer.WritePropertyName("type"u8); - writer.WriteStringValue(TriggerType); - if (Optional.IsDefined(Description)) - { - writer.WritePropertyName("description"u8); - writer.WriteStringValue(Description); - } - if (Optional.IsCollectionDefined(Annotations)) - { - writer.WritePropertyName("annotations"u8); - writer.WriteStartArray(); - foreach (var item in Annotations) - { - if (item == null) - { - writer.WriteNullValue(); - continue; - } -#if NET6_0_OR_GREATER - writer.WriteRawValue(item); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.ToString()).RootElement); -#endif - } - writer.WriteEndArray(); - } - foreach (var item in AdditionalProperties) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.Value.ToString()).RootElement); -#endif - } - writer.WriteEndObject(); - } - - internal static DataFactoryTriggerProperties DeserializeDataFactoryTriggerProperties(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - if (element.TryGetProperty("type", out JsonElement discriminator)) - { - switch (discriminator.GetString()) - { - case "BlobEventsTrigger": return DataFactoryBlobEventsTrigger.DeserializeDataFactoryBlobEventsTrigger(element); - case "BlobTrigger": return DataFactoryBlobTrigger.DeserializeDataFactoryBlobTrigger(element); - case "ChainingTrigger": return ChainingTrigger.DeserializeChainingTrigger(element); - case "CustomEventsTrigger": return CustomEventsTrigger.DeserializeCustomEventsTrigger(element); - case "MultiplePipelineTrigger": return MultiplePipelineTrigger.DeserializeMultiplePipelineTrigger(element); - case "RerunTumblingWindowTrigger": return RerunTumblingWindowTrigger.DeserializeRerunTumblingWindowTrigger(element); - case "ScheduleTrigger": return DataFactoryScheduleTrigger.DeserializeDataFactoryScheduleTrigger(element); - case "TumblingWindowTrigger": return TumblingWindowTrigger.DeserializeTumblingWindowTrigger(element); - } - } - return UnknownTrigger.DeserializeUnknownTrigger(element); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DataFactoryTriggerProperties.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DataFactoryTriggerProperties.cs deleted file mode 100644 index e6f11ec3..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DataFactoryTriggerProperties.cs +++ /dev/null @@ -1,108 +0,0 @@ -// - -#nullable disable - -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// - /// Azure data factory nested object which contains information about creating pipeline run - /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. - /// The available derived classes include , , , , , , and . - /// - public partial class DataFactoryTriggerProperties - { - /// Initializes a new instance of DataFactoryTriggerProperties. - public DataFactoryTriggerProperties() - { - Annotations = new ChangeTrackingList(); - AdditionalProperties = new ChangeTrackingDictionary>(); - } - - /// Initializes a new instance of DataFactoryTriggerProperties. - /// Trigger type. - /// Trigger description. - /// Indicates if trigger is running or not. Updated when Start/Stop APIs are called on the Trigger. - /// List of tags that can be used for describing the trigger. - /// Additional Properties. - internal DataFactoryTriggerProperties(string triggerType, string description, DataFactoryTriggerRuntimeState? runtimeState, IList annotations, IDictionary> additionalProperties) - { - TriggerType = triggerType; - Description = description; - RuntimeState = runtimeState; - Annotations = annotations; - AdditionalProperties = additionalProperties; - } - - /// Trigger type. - internal string TriggerType { get; set; } - /// Trigger description. - public string Description { get; set; } - /// Indicates if trigger is running or not. Updated when Start/Stop APIs are called on the Trigger. - public DataFactoryTriggerRuntimeState? RuntimeState { get; } - /// - /// List of tags that can be used for describing the trigger. - /// - /// To assign an object to the element of this property use . - /// - /// - /// To assign an already formated json string to this property use . - /// - /// - /// Examples: - /// - /// - /// BinaryData.FromObjectAsJson("foo") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromString("\"foo\"") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromObjectAsJson(new { key = "value" }) - /// Creates a payload of { "key": "value" }. - /// - /// - /// BinaryData.FromString("{\"key\": \"value\"}") - /// Creates a payload of { "key": "value" }. - /// - /// - /// - /// - public IList Annotations { get; } - /// - /// Additional Properties - /// - /// To assign an object to the value of this property use . - /// - /// - /// To assign an already formated json string to this property use . - /// - /// - /// Examples: - /// - /// - /// BinaryData.FromObjectAsJson("foo") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromString("\"foo\"") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromObjectAsJson(new { key = "value" }) - /// Creates a payload of { "key": "value" }. - /// - /// - /// BinaryData.FromString("{\"key\": \"value\"}") - /// Creates a payload of { "key": "value" }. - /// - /// - /// - /// - public IDictionary> AdditionalProperties { get; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DataFactoryTriggerQueryResult.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DataFactoryTriggerQueryResult.Serialization.cs deleted file mode 100644 index 159e882a..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DataFactoryTriggerQueryResult.Serialization.cs +++ /dev/null @@ -1,42 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; -using Azure.ResourceManager.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - internal partial class DataFactoryTriggerQueryResult - { - internal static DataFactoryTriggerQueryResult DeserializeDataFactoryTriggerQueryResult(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - IReadOnlyList value = default; - Optional continuationToken = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("value"u8)) - { - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - array.Add(DataFactoryTriggerData.DeserializeDataFactoryTriggerData(item)); - } - value = array; - continue; - } - if (property.NameEquals("continuationToken"u8)) - { - continuationToken = property.Value.GetString(); - continue; - } - } - return new DataFactoryTriggerQueryResult(value, continuationToken.Value); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DataFactoryTriggerQueryResult.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DataFactoryTriggerQueryResult.cs deleted file mode 100644 index 38686664..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DataFactoryTriggerQueryResult.cs +++ /dev/null @@ -1,37 +0,0 @@ -// - -#nullable disable - -using Azure.Core; -using Azure.ResourceManager.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// A query of triggers. - internal partial class DataFactoryTriggerQueryResult - { - /// Initializes a new instance of DataFactoryTriggerQueryResult. - /// List of triggers. - /// is null. - internal DataFactoryTriggerQueryResult(IEnumerable value) - { - Argument.AssertNotNull(value, nameof(value)); - - Value = value.ToList(); - } - - /// Initializes a new instance of DataFactoryTriggerQueryResult. - /// List of triggers. - /// The continuation token for getting the next page of results, if any remaining results exist, null otherwise. - internal DataFactoryTriggerQueryResult(IReadOnlyList value, string continuationToken) - { - Value = value; - ContinuationToken = continuationToken; - } - - /// List of triggers. - public IReadOnlyList Value { get; } - /// The continuation token for getting the next page of results, if any remaining results exist, null otherwise. - public string ContinuationToken { get; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DataFactoryTriggerReference.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DataFactoryTriggerReference.Serialization.cs deleted file mode 100644 index 169cd9f6..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DataFactoryTriggerReference.Serialization.cs +++ /dev/null @@ -1,46 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class DataFactoryTriggerReference : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ReferenceType.ToString()); - writer.WritePropertyName("referenceName"u8); - writer.WriteStringValue(ReferenceName); - writer.WriteEndObject(); - } - - internal static DataFactoryTriggerReference DeserializeDataFactoryTriggerReference(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - DataFactoryTriggerReferenceType type = default; - string referenceName = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("type"u8)) - { - type = new DataFactoryTriggerReferenceType(property.Value.GetString()); - continue; - } - if (property.NameEquals("referenceName"u8)) - { - referenceName = property.Value.GetString(); - continue; - } - } - return new DataFactoryTriggerReference(type, referenceName); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DataFactoryTriggerReference.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DataFactoryTriggerReference.cs deleted file mode 100644 index 983c43b6..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DataFactoryTriggerReference.cs +++ /dev/null @@ -1,29 +0,0 @@ -// - -#nullable disable - -using Azure.Core; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// Trigger reference type. - public partial class DataFactoryTriggerReference - { - /// Initializes a new instance of DataFactoryTriggerReference. - /// Trigger reference type. - /// Reference trigger name. - /// is null. - public DataFactoryTriggerReference(DataFactoryTriggerReferenceType referenceType, string referenceName) - { - Argument.AssertNotNull(referenceName, nameof(referenceName)); - - ReferenceType = referenceType; - ReferenceName = referenceName; - } - - /// Trigger reference type. - public DataFactoryTriggerReferenceType ReferenceType { get; set; } - /// Reference trigger name. - public string ReferenceName { get; set; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DataFactoryTriggerReferenceType.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DataFactoryTriggerReferenceType.cs deleted file mode 100644 index a3b402e9..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DataFactoryTriggerReferenceType.cs +++ /dev/null @@ -1,44 +0,0 @@ -// - -#nullable disable - -using System.ComponentModel; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// Trigger reference type. - public readonly partial struct DataFactoryTriggerReferenceType : IEquatable - { - private readonly string _value; - - /// Initializes a new instance of . - /// is null. - public DataFactoryTriggerReferenceType(string value) - { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } - - private const string TriggerReferenceValue = "TriggerReference"; - - /// TriggerReference. - public static DataFactoryTriggerReferenceType TriggerReference { get; } = new DataFactoryTriggerReferenceType(TriggerReferenceValue); - /// Determines if two values are the same. - public static bool operator ==(DataFactoryTriggerReferenceType left, DataFactoryTriggerReferenceType right) => left.Equals(right); - /// Determines if two values are not the same. - public static bool operator !=(DataFactoryTriggerReferenceType left, DataFactoryTriggerReferenceType right) => !left.Equals(right); - /// Converts a string to a . - public static implicit operator DataFactoryTriggerReferenceType(string value) => new DataFactoryTriggerReferenceType(value); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override bool Equals(object obj) => obj is DataFactoryTriggerReferenceType other && Equals(other); - /// - public bool Equals(DataFactoryTriggerReferenceType other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override int GetHashCode() => _value?.GetHashCode() ?? 0; - /// - public override string ToString() => _value; - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DataFactoryTriggerRun.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DataFactoryTriggerRun.Serialization.cs deleted file mode 100644 index ad48b851..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DataFactoryTriggerRun.Serialization.cs +++ /dev/null @@ -1,140 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class DataFactoryTriggerRun - { - internal static DataFactoryTriggerRun DeserializeDataFactoryTriggerRun(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - Optional triggerRunId = default; - Optional triggerName = default; - Optional triggerType = default; - Optional triggerRunTimestamp = default; - Optional status = default; - Optional message = default; - Optional> properties = default; - Optional> triggeredPipelines = default; - Optional> runDimension = default; - Optional>> dependencyStatus = default; - IReadOnlyDictionary> additionalProperties = default; - Dictionary> additionalPropertiesDictionary = new Dictionary>(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("triggerRunId"u8)) - { - triggerRunId = property.Value.GetString(); - continue; - } - if (property.NameEquals("triggerName"u8)) - { - triggerName = property.Value.GetString(); - continue; - } - if (property.NameEquals("triggerType"u8)) - { - triggerType = property.Value.GetString(); - continue; - } - if (property.NameEquals("triggerRunTimestamp"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - triggerRunTimestamp = property.Value.GetDateTimeOffset("O"); - continue; - } - if (property.NameEquals("status"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - status = new DataFactoryTriggerRunStatus(property.Value.GetString()); - continue; - } - if (property.NameEquals("message"u8)) - { - message = property.Value.GetString(); - continue; - } - if (property.NameEquals("properties"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - Dictionary dictionary = new Dictionary(); - foreach (var property0 in property.Value.EnumerateObject()) - { - dictionary.Add(property0.Name, property0.Value.GetString()); - } - properties = dictionary; - continue; - } - if (property.NameEquals("triggeredPipelines"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - Dictionary dictionary = new Dictionary(); - foreach (var property0 in property.Value.EnumerateObject()) - { - dictionary.Add(property0.Name, property0.Value.GetString()); - } - triggeredPipelines = dictionary; - continue; - } - if (property.NameEquals("runDimension"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - Dictionary dictionary = new Dictionary(); - foreach (var property0 in property.Value.EnumerateObject()) - { - dictionary.Add(property0.Name, property0.Value.GetString()); - } - runDimension = dictionary; - continue; - } - if (property.NameEquals("dependencyStatus"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - Dictionary> dictionary = new Dictionary>(); - foreach (var property0 in property.Value.EnumerateObject()) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - dictionary.Add(property0.Name, null); - } - else - { - dictionary.Add(property0.Name, JsonSerializer.Deserialize>(property0.Value.GetRawText())); - } - } - dependencyStatus = dictionary; - continue; - } - additionalPropertiesDictionary.Add(property.Name, JsonSerializer.Deserialize>(property.Value.GetRawText())); - } - additionalProperties = additionalPropertiesDictionary; - return new DataFactoryTriggerRun(triggerRunId.Value, triggerName.Value, triggerType.Value, Optional.ToNullable(triggerRunTimestamp), Optional.ToNullable(status), message.Value, Optional.ToDictionary(properties), Optional.ToDictionary(triggeredPipelines), Optional.ToDictionary(runDimension), Optional.ToDictionary(dependencyStatus), additionalProperties); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DataFactoryTriggerRun.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DataFactoryTriggerRun.cs deleted file mode 100644 index ccb77690..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DataFactoryTriggerRun.cs +++ /dev/null @@ -1,131 +0,0 @@ -// - -#nullable disable - -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// Trigger runs. - public partial class DataFactoryTriggerRun - { - /// Initializes a new instance of DataFactoryTriggerRun. - internal DataFactoryTriggerRun() - { - Properties = new ChangeTrackingDictionary(); - TriggeredPipelines = new ChangeTrackingDictionary(); - RunDimension = new ChangeTrackingDictionary(); - DependencyStatus = new ChangeTrackingDictionary>(); - AdditionalProperties = new ChangeTrackingDictionary>(); - } - - /// Initializes a new instance of DataFactoryTriggerRun. - /// Trigger run id. - /// Trigger name. - /// Trigger type. - /// Trigger run start time. - /// Trigger run status. - /// Trigger error message. - /// List of property name and value related to trigger run. Name, value pair depends on type of trigger. - /// List of pipeline name and run Id triggered by the trigger run. - /// Run dimension for which trigger was fired. - /// Status of the upstream pipelines. - /// Additional Properties. - internal DataFactoryTriggerRun(string triggerRunId, string triggerName, string triggerType, DateTimeOffset? triggerRunTimestamp, DataFactoryTriggerRunStatus? status, string message, IReadOnlyDictionary properties, IReadOnlyDictionary triggeredPipelines, IReadOnlyDictionary runDimension, IReadOnlyDictionary> dependencyStatus, IReadOnlyDictionary> additionalProperties) - { - TriggerRunId = triggerRunId; - TriggerName = triggerName; - TriggerType = triggerType; - TriggerRunTimestamp = triggerRunTimestamp; - Status = status; - Message = message; - Properties = properties; - TriggeredPipelines = triggeredPipelines; - RunDimension = runDimension; - DependencyStatus = dependencyStatus; - AdditionalProperties = additionalProperties; - } - - /// Trigger run id. - public string TriggerRunId { get; } - /// Trigger name. - public string TriggerName { get; } - /// Trigger type. - public string TriggerType { get; } - /// Trigger run start time. - public DateTimeOffset? TriggerRunTimestamp { get; } - /// Trigger run status. - public DataFactoryTriggerRunStatus? Status { get; } - /// Trigger error message. - public string Message { get; } - /// List of property name and value related to trigger run. Name, value pair depends on type of trigger. - public IReadOnlyDictionary Properties { get; } - /// List of pipeline name and run Id triggered by the trigger run. - public IReadOnlyDictionary TriggeredPipelines { get; } - /// Run dimension for which trigger was fired. - public IReadOnlyDictionary RunDimension { get; } - /// - /// Status of the upstream pipelines. - /// - /// To assign an object to the value of this property use . - /// - /// - /// To assign an already formated json string to this property use . - /// - /// - /// Examples: - /// - /// - /// BinaryData.FromObjectAsJson("foo") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromString("\"foo\"") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromObjectAsJson(new { key = "value" }) - /// Creates a payload of { "key": "value" }. - /// - /// - /// BinaryData.FromString("{\"key\": \"value\"}") - /// Creates a payload of { "key": "value" }. - /// - /// - /// - /// - public IReadOnlyDictionary> DependencyStatus { get; } - /// - /// Additional Properties - /// - /// To assign an object to the value of this property use . - /// - /// - /// To assign an already formated json string to this property use . - /// - /// - /// Examples: - /// - /// - /// BinaryData.FromObjectAsJson("foo") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromString("\"foo\"") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromObjectAsJson(new { key = "value" }) - /// Creates a payload of { "key": "value" }. - /// - /// - /// BinaryData.FromString("{\"key\": \"value\"}") - /// Creates a payload of { "key": "value" }. - /// - /// - /// - /// - public IReadOnlyDictionary> AdditionalProperties { get; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DataFactoryTriggerRunStatus.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DataFactoryTriggerRunStatus.cs deleted file mode 100644 index 1e4a3797..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DataFactoryTriggerRunStatus.cs +++ /dev/null @@ -1,50 +0,0 @@ -// - -#nullable disable - -using System.ComponentModel; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// Trigger run status. - public readonly partial struct DataFactoryTriggerRunStatus : IEquatable - { - private readonly string _value; - - /// Initializes a new instance of . - /// is null. - public DataFactoryTriggerRunStatus(string value) - { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } - - private const string SucceededValue = "Succeeded"; - private const string FailedValue = "Failed"; - private const string InprogressValue = "Inprogress"; - - /// Succeeded. - public static DataFactoryTriggerRunStatus Succeeded { get; } = new DataFactoryTriggerRunStatus(SucceededValue); - /// Failed. - public static DataFactoryTriggerRunStatus Failed { get; } = new DataFactoryTriggerRunStatus(FailedValue); - /// Inprogress. - public static DataFactoryTriggerRunStatus Inprogress { get; } = new DataFactoryTriggerRunStatus(InprogressValue); - /// Determines if two values are the same. - public static bool operator ==(DataFactoryTriggerRunStatus left, DataFactoryTriggerRunStatus right) => left.Equals(right); - /// Determines if two values are not the same. - public static bool operator !=(DataFactoryTriggerRunStatus left, DataFactoryTriggerRunStatus right) => !left.Equals(right); - /// Converts a string to a . - public static implicit operator DataFactoryTriggerRunStatus(string value) => new DataFactoryTriggerRunStatus(value); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override bool Equals(object obj) => obj is DataFactoryTriggerRunStatus other && Equals(other); - /// - public bool Equals(DataFactoryTriggerRunStatus other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override int GetHashCode() => _value?.GetHashCode() ?? 0; - /// - public override string ToString() => _value; - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DataFactoryTriggerRunsQueryResult.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DataFactoryTriggerRunsQueryResult.Serialization.cs deleted file mode 100644 index f3624426..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DataFactoryTriggerRunsQueryResult.Serialization.cs +++ /dev/null @@ -1,41 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; - -namespace AzureDataFactory.TestingFramework.Models -{ - internal partial class DataFactoryTriggerRunsQueryResult - { - internal static DataFactoryTriggerRunsQueryResult DeserializeDataFactoryTriggerRunsQueryResult(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - IReadOnlyList value = default; - Optional continuationToken = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("value"u8)) - { - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - array.Add(DataFactoryTriggerRun.DeserializeDataFactoryTriggerRun(item)); - } - value = array; - continue; - } - if (property.NameEquals("continuationToken"u8)) - { - continuationToken = property.Value.GetString(); - continue; - } - } - return new DataFactoryTriggerRunsQueryResult(value, continuationToken.Value); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DataFactoryTriggerRunsQueryResult.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DataFactoryTriggerRunsQueryResult.cs deleted file mode 100644 index b012e87e..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DataFactoryTriggerRunsQueryResult.cs +++ /dev/null @@ -1,36 +0,0 @@ -// - -#nullable disable - -using Azure.Core; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// A list of trigger runs. - internal partial class DataFactoryTriggerRunsQueryResult - { - /// Initializes a new instance of DataFactoryTriggerRunsQueryResult. - /// List of trigger runs. - /// is null. - internal DataFactoryTriggerRunsQueryResult(IEnumerable value) - { - Argument.AssertNotNull(value, nameof(value)); - - Value = value.ToList(); - } - - /// Initializes a new instance of DataFactoryTriggerRunsQueryResult. - /// List of trigger runs. - /// The continuation token for getting the next page of results, if any remaining results exist, null otherwise. - internal DataFactoryTriggerRunsQueryResult(IReadOnlyList value, string continuationToken) - { - Value = value; - ContinuationToken = continuationToken; - } - - /// List of trigger runs. - public IReadOnlyList Value { get; } - /// The continuation token for getting the next page of results, if any remaining results exist, null otherwise. - public string ContinuationToken { get; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DataFactoryTriggerRuntimeState.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DataFactoryTriggerRuntimeState.cs deleted file mode 100644 index 92e71f0d..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DataFactoryTriggerRuntimeState.cs +++ /dev/null @@ -1,50 +0,0 @@ -// - -#nullable disable - -using System.ComponentModel; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// Enumerates possible state of Triggers. - public readonly partial struct DataFactoryTriggerRuntimeState : IEquatable - { - private readonly string _value; - - /// Initializes a new instance of . - /// is null. - public DataFactoryTriggerRuntimeState(string value) - { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } - - private const string StartedValue = "Started"; - private const string StoppedValue = "Stopped"; - private const string DisabledValue = "Disabled"; - - /// Started. - public static DataFactoryTriggerRuntimeState Started { get; } = new DataFactoryTriggerRuntimeState(StartedValue); - /// Stopped. - public static DataFactoryTriggerRuntimeState Stopped { get; } = new DataFactoryTriggerRuntimeState(StoppedValue); - /// Disabled. - public static DataFactoryTriggerRuntimeState Disabled { get; } = new DataFactoryTriggerRuntimeState(DisabledValue); - /// Determines if two values are the same. - public static bool operator ==(DataFactoryTriggerRuntimeState left, DataFactoryTriggerRuntimeState right) => left.Equals(right); - /// Determines if two values are not the same. - public static bool operator !=(DataFactoryTriggerRuntimeState left, DataFactoryTriggerRuntimeState right) => !left.Equals(right); - /// Converts a string to a . - public static implicit operator DataFactoryTriggerRuntimeState(string value) => new DataFactoryTriggerRuntimeState(value); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override bool Equals(object obj) => obj is DataFactoryTriggerRuntimeState other && Equals(other); - /// - public bool Equals(DataFactoryTriggerRuntimeState other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override int GetHashCode() => _value?.GetHashCode() ?? 0; - /// - public override string ToString() => _value; - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DataFactoryTriggerSubscriptionOperationResult.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DataFactoryTriggerSubscriptionOperationResult.Serialization.cs deleted file mode 100644 index 143dd437..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DataFactoryTriggerSubscriptionOperationResult.Serialization.cs +++ /dev/null @@ -1,40 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class DataFactoryTriggerSubscriptionOperationResult - { - internal static DataFactoryTriggerSubscriptionOperationResult DeserializeDataFactoryTriggerSubscriptionOperationResult(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - Optional triggerName = default; - Optional status = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("triggerName"u8)) - { - triggerName = property.Value.GetString(); - continue; - } - if (property.NameEquals("status"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - status = new EventSubscriptionStatus(property.Value.GetString()); - continue; - } - } - return new DataFactoryTriggerSubscriptionOperationResult(triggerName.Value, Optional.ToNullable(status)); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DataFactoryTriggerSubscriptionOperationResult.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DataFactoryTriggerSubscriptionOperationResult.cs deleted file mode 100644 index 2ecae624..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DataFactoryTriggerSubscriptionOperationResult.cs +++ /dev/null @@ -1,29 +0,0 @@ -// - -#nullable disable - -namespace AzureDataFactory.TestingFramework.Models -{ - /// Defines the response of a trigger subscription operation. - public partial class DataFactoryTriggerSubscriptionOperationResult - { - /// Initializes a new instance of DataFactoryTriggerSubscriptionOperationResult. - internal DataFactoryTriggerSubscriptionOperationResult() - { - } - - /// Initializes a new instance of DataFactoryTriggerSubscriptionOperationResult. - /// Trigger name. - /// Event Subscription Status. - internal DataFactoryTriggerSubscriptionOperationResult(string triggerName, EventSubscriptionStatus? status) - { - TriggerName = triggerName; - Status = status; - } - - /// Trigger name. - public string TriggerName { get; } - /// Event Subscription Status. - public EventSubscriptionStatus? Status { get; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DataFactoryWranglingDataFlowProperties.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DataFactoryWranglingDataFlowProperties.Serialization.cs deleted file mode 100644 index 82c2f1a6..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DataFactoryWranglingDataFlowProperties.Serialization.cs +++ /dev/null @@ -1,167 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class DataFactoryWranglingDataFlowProperties : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - writer.WritePropertyName("type"u8); - writer.WriteStringValue(DataFlowType); - if (Optional.IsDefined(Description)) - { - writer.WritePropertyName("description"u8); - writer.WriteStringValue(Description); - } - if (Optional.IsCollectionDefined(Annotations)) - { - writer.WritePropertyName("annotations"u8); - writer.WriteStartArray(); - foreach (var item in Annotations) - { - if (item == null) - { - writer.WriteNullValue(); - continue; - } -#if NET6_0_OR_GREATER - writer.WriteRawValue(item); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.ToString()).RootElement); -#endif - } - writer.WriteEndArray(); - } - if (Optional.IsDefined(Folder)) - { - writer.WritePropertyName("folder"u8); - writer.WriteObjectValue(Folder); - } - writer.WritePropertyName("typeProperties"u8); - writer.WriteStartObject(); - if (Optional.IsCollectionDefined(Sources)) - { - writer.WritePropertyName("sources"u8); - writer.WriteStartArray(); - foreach (var item in Sources) - { - writer.WriteObjectValue(item); - } - writer.WriteEndArray(); - } - if (Optional.IsDefined(Script)) - { - writer.WritePropertyName("script"u8); - writer.WriteStringValue(Script); - } - if (Optional.IsDefined(DocumentLocale)) - { - writer.WritePropertyName("documentLocale"u8); - writer.WriteStringValue(DocumentLocale); - } - writer.WriteEndObject(); - writer.WriteEndObject(); - } - - internal static DataFactoryWranglingDataFlowProperties DeserializeDataFactoryWranglingDataFlowProperties(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - string type = default; - Optional description = default; - Optional> annotations = default; - Optional folder = default; - Optional> sources = default; - Optional script = default; - Optional documentLocale = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("type"u8)) - { - type = property.Value.GetString(); - continue; - } - if (property.NameEquals("description"u8)) - { - description = property.Value.GetString(); - continue; - } - if (property.NameEquals("annotations"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - if (item.ValueKind == JsonValueKind.Null) - { - array.Add(null); - } - else - { - array.Add(BinaryData.FromString(item.GetRawText())); - } - } - annotations = array; - continue; - } - if (property.NameEquals("folder"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - folder = DataFlowFolder.DeserializeDataFlowFolder(property.Value); - continue; - } - if (property.NameEquals("typeProperties"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - foreach (var property0 in property.Value.EnumerateObject()) - { - if (property0.NameEquals("sources"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property0.Value.EnumerateArray()) - { - array.Add(PowerQuerySource.DeserializePowerQuerySource(item)); - } - sources = array; - continue; - } - if (property0.NameEquals("script"u8)) - { - script = property0.Value.GetString(); - continue; - } - if (property0.NameEquals("documentLocale"u8)) - { - documentLocale = property0.Value.GetString(); - continue; - } - } - continue; - } - } - return new DataFactoryWranglingDataFlowProperties(type, description.Value, Optional.ToList(annotations), folder.Value, Optional.ToList(sources), script.Value, documentLocale.Value); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DataFactoryWranglingDataFlowProperties.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DataFactoryWranglingDataFlowProperties.cs deleted file mode 100644 index 7bec9d68..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DataFactoryWranglingDataFlowProperties.cs +++ /dev/null @@ -1,42 +0,0 @@ -// - -#nullable disable - -using Azure.Core; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// Power Query data flow. - public partial class DataFactoryWranglingDataFlowProperties : DataFactoryDataFlowProperties - { - /// Initializes a new instance of DataFactoryWranglingDataFlowProperties. - public DataFactoryWranglingDataFlowProperties() - { - Sources = new ChangeTrackingList(); - DataFlowType = "WranglingDataFlow"; - } - - /// Initializes a new instance of DataFactoryWranglingDataFlowProperties. - /// Type of data flow. - /// The description of the data flow. - /// List of tags that can be used for describing the data flow. - /// The folder that this data flow is in. If not specified, Data flow will appear at the root level. - /// List of sources in Power Query. - /// Power query mashup script. - /// Locale of the Power query mashup document. - internal DataFactoryWranglingDataFlowProperties(string dataFlowType, string description, IList annotations, DataFlowFolder folder, IList sources, string script, string documentLocale) : base(dataFlowType, description, annotations, folder) - { - Sources = sources; - Script = script; - DocumentLocale = documentLocale; - DataFlowType = dataFlowType ?? "WranglingDataFlow"; - } - - /// List of sources in Power Query. - public IList Sources { get; } - /// Power query mashup script. - public string Script { get; set; } - /// Locale of the Power query mashup document. - public string DocumentLocale { get; set; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DataFlowComputeType.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DataFlowComputeType.cs deleted file mode 100644 index 9e56d9f3..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DataFlowComputeType.cs +++ /dev/null @@ -1,50 +0,0 @@ -// - -#nullable disable - -using System.ComponentModel; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// Compute type of the cluster which will execute data flow job. - public readonly partial struct DataFlowComputeType : IEquatable - { - private readonly string _value; - - /// Initializes a new instance of . - /// is null. - public DataFlowComputeType(string value) - { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } - - private const string GeneralValue = "General"; - private const string MemoryOptimizedValue = "MemoryOptimized"; - private const string ComputeOptimizedValue = "ComputeOptimized"; - - /// General. - public static DataFlowComputeType General { get; } = new DataFlowComputeType(GeneralValue); - /// MemoryOptimized. - public static DataFlowComputeType MemoryOptimized { get; } = new DataFlowComputeType(MemoryOptimizedValue); - /// ComputeOptimized. - public static DataFlowComputeType ComputeOptimized { get; } = new DataFlowComputeType(ComputeOptimizedValue); - /// Determines if two values are the same. - public static bool operator ==(DataFlowComputeType left, DataFlowComputeType right) => left.Equals(right); - /// Determines if two values are not the same. - public static bool operator !=(DataFlowComputeType left, DataFlowComputeType right) => !left.Equals(right); - /// Converts a string to a . - public static implicit operator DataFlowComputeType(string value) => new DataFlowComputeType(value); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override bool Equals(object obj) => obj is DataFlowComputeType other && Equals(other); - /// - public bool Equals(DataFlowComputeType other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override int GetHashCode() => _value?.GetHashCode() ?? 0; - /// - public override string ToString() => _value; - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DataFlowDebugCommandContent.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DataFlowDebugCommandContent.Serialization.cs deleted file mode 100644 index 40125630..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DataFlowDebugCommandContent.Serialization.cs +++ /dev/null @@ -1,33 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class DataFlowDebugCommandContent : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - if (Optional.IsDefined(SessionId)) - { - writer.WritePropertyName("sessionId"u8); - writer.WriteStringValue(SessionId.Value); - } - if (Optional.IsDefined(Command)) - { - writer.WritePropertyName("command"u8); - writer.WriteStringValue(Command.Value.ToString()); - } - if (Optional.IsDefined(CommandPayload)) - { - writer.WritePropertyName("commandPayload"u8); - writer.WriteObjectValue(CommandPayload); - } - writer.WriteEndObject(); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DataFlowDebugCommandContent.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DataFlowDebugCommandContent.cs deleted file mode 100644 index 13a79793..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DataFlowDebugCommandContent.cs +++ /dev/null @@ -1,22 +0,0 @@ -// - -#nullable disable - -namespace AzureDataFactory.TestingFramework.Models -{ - /// Request body structure for data flow debug command. - public partial class DataFlowDebugCommandContent - { - /// Initializes a new instance of DataFlowDebugCommandContent. - public DataFlowDebugCommandContent() - { - } - - /// The ID of data flow debug session. - public Guid? SessionId { get; set; } - /// The command type. - public DataFlowDebugCommandType? Command { get; set; } - /// The command payload object. - public DataFlowDebugCommandPayload CommandPayload { get; set; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DataFlowDebugCommandPayload.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DataFlowDebugCommandPayload.Serialization.cs deleted file mode 100644 index 9d4fdd46..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DataFlowDebugCommandPayload.Serialization.cs +++ /dev/null @@ -1,40 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class DataFlowDebugCommandPayload : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - writer.WritePropertyName("streamName"u8); - writer.WriteStringValue(StreamName); - if (Optional.IsDefined(RowLimits)) - { - writer.WritePropertyName("rowLimits"u8); - writer.WriteNumberValue(RowLimits.Value); - } - if (Optional.IsCollectionDefined(Columns)) - { - writer.WritePropertyName("columns"u8); - writer.WriteStartArray(); - foreach (var item in Columns) - { - writer.WriteStringValue(item); - } - writer.WriteEndArray(); - } - if (Optional.IsDefined(Expression)) - { - writer.WritePropertyName("expression"u8); - writer.WriteStringValue(Expression); - } - writer.WriteEndObject(); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DataFlowDebugCommandPayload.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DataFlowDebugCommandPayload.cs deleted file mode 100644 index 8c056e8d..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DataFlowDebugCommandPayload.cs +++ /dev/null @@ -1,32 +0,0 @@ -// - -#nullable disable - -using Azure.Core; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// Structure of command payload. - public partial class DataFlowDebugCommandPayload - { - /// Initializes a new instance of DataFlowDebugCommandPayload. - /// The stream name which is used for preview. - /// is null. - public DataFlowDebugCommandPayload(string streamName) - { - Argument.AssertNotNull(streamName, nameof(streamName)); - - StreamName = streamName; - Columns = new ChangeTrackingList(); - } - - /// The stream name which is used for preview. - public string StreamName { get; } - /// Row limits for preview response. - public int? RowLimits { get; set; } - /// Array of column names. - public IList Columns { get; } - /// The expression which is used for preview. - public string Expression { get; set; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DataFlowDebugCommandType.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DataFlowDebugCommandType.cs deleted file mode 100644 index ac28ea85..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DataFlowDebugCommandType.cs +++ /dev/null @@ -1,50 +0,0 @@ -// - -#nullable disable - -using System.ComponentModel; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// The command type. - public readonly partial struct DataFlowDebugCommandType : IEquatable - { - private readonly string _value; - - /// Initializes a new instance of . - /// is null. - public DataFlowDebugCommandType(string value) - { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } - - private const string ExecutePreviewQueryValue = "executePreviewQuery"; - private const string ExecuteStatisticsQueryValue = "executeStatisticsQuery"; - private const string ExecuteExpressionQueryValue = "executeExpressionQuery"; - - /// executePreviewQuery. - public static DataFlowDebugCommandType ExecutePreviewQuery { get; } = new DataFlowDebugCommandType(ExecutePreviewQueryValue); - /// executeStatisticsQuery. - public static DataFlowDebugCommandType ExecuteStatisticsQuery { get; } = new DataFlowDebugCommandType(ExecuteStatisticsQueryValue); - /// executeExpressionQuery. - public static DataFlowDebugCommandType ExecuteExpressionQuery { get; } = new DataFlowDebugCommandType(ExecuteExpressionQueryValue); - /// Determines if two values are the same. - public static bool operator ==(DataFlowDebugCommandType left, DataFlowDebugCommandType right) => left.Equals(right); - /// Determines if two values are not the same. - public static bool operator !=(DataFlowDebugCommandType left, DataFlowDebugCommandType right) => !left.Equals(right); - /// Converts a string to a . - public static implicit operator DataFlowDebugCommandType(string value) => new DataFlowDebugCommandType(value); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override bool Equals(object obj) => obj is DataFlowDebugCommandType other && Equals(other); - /// - public bool Equals(DataFlowDebugCommandType other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override int GetHashCode() => _value?.GetHashCode() ?? 0; - /// - public override string ToString() => _value; - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DataFlowDebugPackageDebugSettings.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DataFlowDebugPackageDebugSettings.Serialization.cs deleted file mode 100644 index e967dff8..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DataFlowDebugPackageDebugSettings.Serialization.cs +++ /dev/null @@ -1,57 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class DataFlowDebugPackageDebugSettings : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - if (Optional.IsCollectionDefined(SourceSettings)) - { - writer.WritePropertyName("sourceSettings"u8); - writer.WriteStartArray(); - foreach (var item in SourceSettings) - { - writer.WriteObjectValue(item); - } - writer.WriteEndArray(); - } - if (Optional.IsCollectionDefined(Parameters)) - { - writer.WritePropertyName("parameters"u8); - writer.WriteStartObject(); - foreach (var item in Parameters) - { - writer.WritePropertyName(item.Key); - if (item.Value == null) - { - writer.WriteNullValue(); - continue; - } -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.Value.ToString()).RootElement); -#endif - } - writer.WriteEndObject(); - } - if (Optional.IsDefined(DatasetParameters)) - { - writer.WritePropertyName("datasetParameters"u8); -#if NET6_0_OR_GREATER - writer.WriteRawValue(DatasetParameters); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(DatasetParameters.ToString()).RootElement); -#endif - } - writer.WriteEndObject(); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DataFlowDebugPackageDebugSettings.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DataFlowDebugPackageDebugSettings.cs deleted file mode 100644 index fc8078c5..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DataFlowDebugPackageDebugSettings.cs +++ /dev/null @@ -1,85 +0,0 @@ -// - -#nullable disable - -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// Data flow debug settings. - public partial class DataFlowDebugPackageDebugSettings - { - /// Initializes a new instance of DataFlowDebugPackageDebugSettings. - public DataFlowDebugPackageDebugSettings() - { - SourceSettings = new ChangeTrackingList(); - Parameters = new ChangeTrackingDictionary>(); - } - - /// Source setting for data flow debug. - public IList SourceSettings { get; } - /// - /// Data flow parameters. - /// - /// To assign an object to the value of this property use . - /// - /// - /// To assign an already formated json string to this property use . - /// - /// - /// Examples: - /// - /// - /// BinaryData.FromObjectAsJson("foo") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromString("\"foo\"") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromObjectAsJson(new { key = "value" }) - /// Creates a payload of { "key": "value" }. - /// - /// - /// BinaryData.FromString("{\"key\": \"value\"}") - /// Creates a payload of { "key": "value" }. - /// - /// - /// - /// - public IDictionary> Parameters { get; } - /// - /// Parameters for dataset. - /// - /// To assign an object to this property use . - /// - /// - /// To assign an already formated json string to this property use . - /// - /// - /// Examples: - /// - /// - /// BinaryData.FromObjectAsJson("foo") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromString("\"foo\"") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromObjectAsJson(new { key = "value" }) - /// Creates a payload of { "key": "value" }. - /// - /// - /// BinaryData.FromString("{\"key\": \"value\"}") - /// Creates a payload of { "key": "value" }. - /// - /// - /// - /// - public BinaryData DatasetParameters { get; set; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DataFlowDebugSessionInfo.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DataFlowDebugSessionInfo.Serialization.cs deleted file mode 100644 index c3e8a6f8..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DataFlowDebugSessionInfo.Serialization.cs +++ /dev/null @@ -1,107 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class DataFlowDebugSessionInfo - { - internal static DataFlowDebugSessionInfo DeserializeDataFlowDebugSessionInfo(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - Optional dataFlowName = default; - Optional computeType = default; - Optional coreCount = default; - Optional nodeCount = default; - Optional integrationRuntimeName = default; - Optional sessionId = default; - Optional startTime = default; - Optional timeToLiveInMinutes = default; - Optional lastActivityTime = default; - IReadOnlyDictionary> additionalProperties = default; - Dictionary> additionalPropertiesDictionary = new Dictionary>(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("dataFlowName"u8)) - { - dataFlowName = property.Value.GetString(); - continue; - } - if (property.NameEquals("computeType"u8)) - { - computeType = property.Value.GetString(); - continue; - } - if (property.NameEquals("coreCount"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - coreCount = property.Value.GetInt32(); - continue; - } - if (property.NameEquals("nodeCount"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - nodeCount = property.Value.GetInt32(); - continue; - } - if (property.NameEquals("integrationRuntimeName"u8)) - { - integrationRuntimeName = property.Value.GetString(); - continue; - } - if (property.NameEquals("sessionId"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - sessionId = property.Value.GetGuid(); - continue; - } - if (property.NameEquals("startTime"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - startTime = property.Value.GetDateTimeOffset("O"); - continue; - } - if (property.NameEquals("timeToLiveInMinutes"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - timeToLiveInMinutes = property.Value.GetInt32(); - continue; - } - if (property.NameEquals("lastActivityTime"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - lastActivityTime = property.Value.GetDateTimeOffset("O"); - continue; - } - additionalPropertiesDictionary.Add(property.Name, JsonSerializer.Deserialize>(property.Value.GetRawText())); - } - additionalProperties = additionalPropertiesDictionary; - return new DataFlowDebugSessionInfo(dataFlowName.Value, computeType.Value, Optional.ToNullable(coreCount), Optional.ToNullable(nodeCount), integrationRuntimeName.Value, Optional.ToNullable(sessionId), Optional.ToNullable(startTime), Optional.ToNullable(timeToLiveInMinutes), Optional.ToNullable(lastActivityTime), additionalProperties); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DataFlowDebugSessionInfo.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DataFlowDebugSessionInfo.cs deleted file mode 100644 index 05313650..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DataFlowDebugSessionInfo.cs +++ /dev/null @@ -1,94 +0,0 @@ -// - -#nullable disable - -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// Data flow debug session info. - public partial class DataFlowDebugSessionInfo - { - /// Initializes a new instance of DataFlowDebugSessionInfo. - internal DataFlowDebugSessionInfo() - { - AdditionalProperties = new ChangeTrackingDictionary>(); - } - - /// Initializes a new instance of DataFlowDebugSessionInfo. - /// The name of the data flow. - /// Compute type of the cluster. - /// Core count of the cluster. - /// Node count of the cluster. (deprecated property). - /// Attached integration runtime name of data flow debug session. - /// The ID of data flow debug session. - /// Start time of data flow debug session. - /// Compute type of the cluster. - /// Last activity time of data flow debug session. - /// Additional Properties. - internal DataFlowDebugSessionInfo(string dataFlowName, string computeType, int? coreCount, int? nodeCount, string integrationRuntimeName, Guid? sessionId, DateTimeOffset? startOn, int? timeToLiveInMinutes, DateTimeOffset? lastActivityOn, IReadOnlyDictionary> additionalProperties) - { - DataFlowName = dataFlowName; - ComputeType = computeType; - CoreCount = coreCount; - NodeCount = nodeCount; - IntegrationRuntimeName = integrationRuntimeName; - SessionId = sessionId; - StartOn = startOn; - TimeToLiveInMinutes = timeToLiveInMinutes; - LastActivityOn = lastActivityOn; - AdditionalProperties = additionalProperties; - } - - /// The name of the data flow. - public string DataFlowName { get; } - /// Compute type of the cluster. - public string ComputeType { get; } - /// Core count of the cluster. - public int? CoreCount { get; } - /// Node count of the cluster. (deprecated property). - public int? NodeCount { get; } - /// Attached integration runtime name of data flow debug session. - public string IntegrationRuntimeName { get; } - /// The ID of data flow debug session. - public Guid? SessionId { get; } - /// Start time of data flow debug session. - public DateTimeOffset? StartOn { get; } - /// Compute type of the cluster. - public int? TimeToLiveInMinutes { get; } - /// Last activity time of data flow debug session. - public DateTimeOffset? LastActivityOn { get; } - /// - /// Additional Properties - /// - /// To assign an object to the value of this property use . - /// - /// - /// To assign an already formated json string to this property use . - /// - /// - /// Examples: - /// - /// - /// BinaryData.FromObjectAsJson("foo") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromString("\"foo\"") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromObjectAsJson(new { key = "value" }) - /// Creates a payload of { "key": "value" }. - /// - /// - /// BinaryData.FromString("{\"key\": \"value\"}") - /// Creates a payload of { "key": "value" }. - /// - /// - /// - /// - public IReadOnlyDictionary> AdditionalProperties { get; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DataFlowDebugSessionInfoListResult.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DataFlowDebugSessionInfoListResult.Serialization.cs deleted file mode 100644 index 13fd00df..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DataFlowDebugSessionInfoListResult.Serialization.cs +++ /dev/null @@ -1,45 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; - -namespace AzureDataFactory.TestingFramework.Models -{ - internal partial class DataFlowDebugSessionInfoListResult - { - internal static DataFlowDebugSessionInfoListResult DeserializeDataFlowDebugSessionInfoListResult(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - Optional> value = default; - Optional nextLink = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("value"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - array.Add(DataFlowDebugSessionInfo.DeserializeDataFlowDebugSessionInfo(item)); - } - value = array; - continue; - } - if (property.NameEquals("nextLink"u8)) - { - nextLink = property.Value.GetString(); - continue; - } - } - return new DataFlowDebugSessionInfoListResult(Optional.ToList(value), nextLink.Value); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DataFlowDebugSessionInfoListResult.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DataFlowDebugSessionInfoListResult.cs deleted file mode 100644 index ea498ab3..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DataFlowDebugSessionInfoListResult.cs +++ /dev/null @@ -1,32 +0,0 @@ -// - -#nullable disable - -using Azure.Core; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// A list of active debug sessions. - internal partial class DataFlowDebugSessionInfoListResult - { - /// Initializes a new instance of DataFlowDebugSessionInfoListResult. - internal DataFlowDebugSessionInfoListResult() - { - Value = new ChangeTrackingList(); - } - - /// Initializes a new instance of DataFlowDebugSessionInfoListResult. - /// Array with all active debug sessions. - /// The link to the next page of results, if any remaining results exist. - internal DataFlowDebugSessionInfoListResult(IReadOnlyList value, string nextLink) - { - Value = value; - NextLink = nextLink; - } - - /// Array with all active debug sessions. - public IReadOnlyList Value { get; } - /// The link to the next page of results, if any remaining results exist. - public string NextLink { get; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DataFlowFolder.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DataFlowFolder.Serialization.cs deleted file mode 100644 index 8540a401..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DataFlowFolder.Serialization.cs +++ /dev/null @@ -1,41 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; - -namespace AzureDataFactory.TestingFramework.Models -{ - internal partial class DataFlowFolder : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - if (Optional.IsDefined(Name)) - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - writer.WriteEndObject(); - } - - internal static DataFlowFolder DeserializeDataFlowFolder(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - Optional name = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("name"u8)) - { - name = property.Value.GetString(); - continue; - } - } - return new DataFlowFolder(name.Value); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DataFlowFolder.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DataFlowFolder.cs deleted file mode 100644 index 9fc7a846..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DataFlowFolder.cs +++ /dev/null @@ -1,25 +0,0 @@ -// - -#nullable disable - -namespace AzureDataFactory.TestingFramework.Models -{ - /// The folder that this data flow is in. If not specified, Data flow will appear at the root level. - internal partial class DataFlowFolder - { - /// Initializes a new instance of DataFlowFolder. - public DataFlowFolder() - { - } - - /// Initializes a new instance of DataFlowFolder. - /// The name of the folder that this data flow is in. - internal DataFlowFolder(string name) - { - Name = name; - } - - /// The name of the folder that this data flow is in. - public string Name { get; set; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DataFlowReference.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DataFlowReference.Serialization.cs deleted file mode 100644 index b4702295..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DataFlowReference.Serialization.cs +++ /dev/null @@ -1,121 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class DataFlowReference : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ReferenceType.ToString()); - writer.WritePropertyName("referenceName"u8); - writer.WriteStringValue(ReferenceName); - if (Optional.IsDefined(DatasetParameters)) - { - writer.WritePropertyName("datasetParameters"u8); -#if NET6_0_OR_GREATER - writer.WriteRawValue(DatasetParameters); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(DatasetParameters.ToString()).RootElement); -#endif - } - if (Optional.IsCollectionDefined(Parameters)) - { - writer.WritePropertyName("parameters"u8); - writer.WriteStartObject(); - foreach (var item in Parameters) - { - writer.WritePropertyName(item.Key); - if (item.Value == null) - { - writer.WriteNullValue(); - continue; - } -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.Value.ToString()).RootElement); -#endif - } - writer.WriteEndObject(); - } - foreach (var item in AdditionalProperties) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.Value.ToString()).RootElement); -#endif - } - writer.WriteEndObject(); - } - - internal static DataFlowReference DeserializeDataFlowReference(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - DataFlowReferenceType type = default; - string referenceName = default; - Optional datasetParameters = default; - Optional>> parameters = default; - IDictionary> additionalProperties = default; - Dictionary> additionalPropertiesDictionary = new Dictionary>(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("type"u8)) - { - type = new DataFlowReferenceType(property.Value.GetString()); - continue; - } - if (property.NameEquals("referenceName"u8)) - { - referenceName = property.Value.GetString(); - continue; - } - if (property.NameEquals("datasetParameters"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - datasetParameters = BinaryData.FromString(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("parameters"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - Dictionary> dictionary = new Dictionary>(); - foreach (var property0 in property.Value.EnumerateObject()) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - dictionary.Add(property0.Name, null); - } - else - { - dictionary.Add(property0.Name, JsonSerializer.Deserialize>(property0.Value.GetRawText())); - } - } - parameters = dictionary; - continue; - } - additionalPropertiesDictionary.Add(property.Name, JsonSerializer.Deserialize>(property.Value.GetRawText())); - } - additionalProperties = additionalPropertiesDictionary; - return new DataFlowReference(type, referenceName, datasetParameters.Value, Optional.ToDictionary(parameters), additionalProperties); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DataFlowReference.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DataFlowReference.cs deleted file mode 100644 index c2ccd2b2..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DataFlowReference.cs +++ /dev/null @@ -1,140 +0,0 @@ -// - -#nullable disable - -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// Data flow reference type. - public partial class DataFlowReference - { - /// Initializes a new instance of DataFlowReference. - /// Data flow reference type. - /// Reference data flow name. - /// is null. - public DataFlowReference(DataFlowReferenceType referenceType, string referenceName) - { - Argument.AssertNotNull(referenceName, nameof(referenceName)); - - ReferenceType = referenceType; - ReferenceName = referenceName; - Parameters = new ChangeTrackingDictionary>(); - AdditionalProperties = new ChangeTrackingDictionary>(); - } - - /// Initializes a new instance of DataFlowReference. - /// Data flow reference type. - /// Reference data flow name. - /// Reference data flow parameters from dataset. - /// Data flow parameters. - /// Additional Properties. - internal DataFlowReference(DataFlowReferenceType referenceType, string referenceName, BinaryData datasetParameters, IDictionary> parameters, IDictionary> additionalProperties) - { - ReferenceType = referenceType; - ReferenceName = referenceName; - DatasetParameters = datasetParameters; - Parameters = parameters; - AdditionalProperties = additionalProperties; - } - - /// Data flow reference type. - public DataFlowReferenceType ReferenceType { get; set; } - /// Reference data flow name. - public string ReferenceName { get; set; } - /// - /// Reference data flow parameters from dataset. - /// - /// To assign an object to this property use . - /// - /// - /// To assign an already formated json string to this property use . - /// - /// - /// Examples: - /// - /// - /// BinaryData.FromObjectAsJson("foo") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromString("\"foo\"") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromObjectAsJson(new { key = "value" }) - /// Creates a payload of { "key": "value" }. - /// - /// - /// BinaryData.FromString("{\"key\": \"value\"}") - /// Creates a payload of { "key": "value" }. - /// - /// - /// - /// - public BinaryData DatasetParameters { get; set; } - /// - /// Data flow parameters - /// - /// To assign an object to the value of this property use . - /// - /// - /// To assign an already formated json string to this property use . - /// - /// - /// Examples: - /// - /// - /// BinaryData.FromObjectAsJson("foo") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromString("\"foo\"") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromObjectAsJson(new { key = "value" }) - /// Creates a payload of { "key": "value" }. - /// - /// - /// BinaryData.FromString("{\"key\": \"value\"}") - /// Creates a payload of { "key": "value" }. - /// - /// - /// - /// - public IDictionary> Parameters { get; } - /// - /// Additional Properties - /// - /// To assign an object to the value of this property use . - /// - /// - /// To assign an already formated json string to this property use . - /// - /// - /// Examples: - /// - /// - /// BinaryData.FromObjectAsJson("foo") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromString("\"foo\"") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromObjectAsJson(new { key = "value" }) - /// Creates a payload of { "key": "value" }. - /// - /// - /// BinaryData.FromString("{\"key\": \"value\"}") - /// Creates a payload of { "key": "value" }. - /// - /// - /// - /// - public IDictionary> AdditionalProperties { get; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DataFlowReferenceType.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DataFlowReferenceType.cs deleted file mode 100644 index ba5c1e4c..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DataFlowReferenceType.cs +++ /dev/null @@ -1,44 +0,0 @@ -// - -#nullable disable - -using System.ComponentModel; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// Data flow reference type. - public readonly partial struct DataFlowReferenceType : IEquatable - { - private readonly string _value; - - /// Initializes a new instance of . - /// is null. - public DataFlowReferenceType(string value) - { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } - - private const string DataFlowReferenceValue = "DataFlowReference"; - - /// DataFlowReference. - public static DataFlowReferenceType DataFlowReference { get; } = new DataFlowReferenceType(DataFlowReferenceValue); - /// Determines if two values are the same. - public static bool operator ==(DataFlowReferenceType left, DataFlowReferenceType right) => left.Equals(right); - /// Determines if two values are not the same. - public static bool operator !=(DataFlowReferenceType left, DataFlowReferenceType right) => !left.Equals(right); - /// Converts a string to a . - public static implicit operator DataFlowReferenceType(string value) => new DataFlowReferenceType(value); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override bool Equals(object obj) => obj is DataFlowReferenceType other && Equals(other); - /// - public bool Equals(DataFlowReferenceType other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override int GetHashCode() => _value?.GetHashCode() ?? 0; - /// - public override string ToString() => _value; - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DataFlowSink.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DataFlowSink.Serialization.cs deleted file mode 100644 index 92dcae32..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DataFlowSink.Serialization.cs +++ /dev/null @@ -1,125 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class DataFlowSink : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - if (Optional.IsDefined(SchemaLinkedService)) - { - writer.WritePropertyName("schemaLinkedService"u8); - JsonSerializer.Serialize(writer, SchemaLinkedService); - } - if (Optional.IsDefined(RejectedDataLinkedService)) - { - writer.WritePropertyName("rejectedDataLinkedService"u8); - JsonSerializer.Serialize(writer, RejectedDataLinkedService); - } - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - if (Optional.IsDefined(Description)) - { - writer.WritePropertyName("description"u8); - writer.WriteStringValue(Description); - } - if (Optional.IsDefined(Dataset)) - { - writer.WritePropertyName("dataset"u8); - writer.WriteObjectValue(Dataset); - } - if (Optional.IsDefined(LinkedService)) - { - writer.WritePropertyName("linkedService"u8); - JsonSerializer.Serialize(writer, LinkedService); - } - if (Optional.IsDefined(Flowlet)) - { - writer.WritePropertyName("flowlet"u8); - writer.WriteObjectValue(Flowlet); - } - writer.WriteEndObject(); - } - - internal static DataFlowSink DeserializeDataFlowSink(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - Optional schemaLinkedService = default; - Optional rejectedDataLinkedService = default; - string name = default; - Optional description = default; - Optional dataset = default; - Optional linkedService = default; - Optional flowlet = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("schemaLinkedService"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - schemaLinkedService = JsonSerializer.Deserialize(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("rejectedDataLinkedService"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - rejectedDataLinkedService = JsonSerializer.Deserialize(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("name"u8)) - { - name = property.Value.GetString(); - continue; - } - if (property.NameEquals("description"u8)) - { - description = property.Value.GetString(); - continue; - } - if (property.NameEquals("dataset"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - dataset = DatasetReference.DeserializeDatasetReference(property.Value); - continue; - } - if (property.NameEquals("linkedService"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - linkedService = JsonSerializer.Deserialize(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("flowlet"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - flowlet = DataFlowReference.DeserializeDataFlowReference(property.Value); - continue; - } - } - return new DataFlowSink(name, description.Value, dataset.Value, linkedService, flowlet.Value, schemaLinkedService, rejectedDataLinkedService); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DataFlowSink.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DataFlowSink.cs deleted file mode 100644 index e08e486d..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DataFlowSink.cs +++ /dev/null @@ -1,40 +0,0 @@ -// - -#nullable disable - -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// Transformation for data flow sink. - public partial class DataFlowSink : DataFlowTransformation - { - /// Initializes a new instance of DataFlowSink. - /// Transformation name. - /// is null. - public DataFlowSink(string name) : base(name) - { - Argument.AssertNotNull(name, nameof(name)); - } - - /// Initializes a new instance of DataFlowSink. - /// Transformation name. - /// Transformation description. - /// Dataset reference. - /// Linked service reference. - /// Flowlet Reference. - /// Schema linked service reference. - /// Rejected data linked service reference. - internal DataFlowSink(string name, string description, DatasetReference dataset, DataFactoryLinkedServiceReference linkedService, DataFlowReference flowlet, DataFactoryLinkedServiceReference schemaLinkedService, DataFactoryLinkedServiceReference rejectedDataLinkedService) : base(name, description, dataset, linkedService, flowlet) - { - SchemaLinkedService = schemaLinkedService; - RejectedDataLinkedService = rejectedDataLinkedService; - } - - /// Schema linked service reference. - public DataFactoryLinkedServiceReference SchemaLinkedService { get; set; } - /// Rejected data linked service reference. - public DataFactoryLinkedServiceReference RejectedDataLinkedService { get; set; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DataFlowSource.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DataFlowSource.Serialization.cs deleted file mode 100644 index ea78a507..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DataFlowSource.Serialization.cs +++ /dev/null @@ -1,110 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class DataFlowSource : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - if (Optional.IsDefined(SchemaLinkedService)) - { - writer.WritePropertyName("schemaLinkedService"u8); - JsonSerializer.Serialize(writer, SchemaLinkedService); - } - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - if (Optional.IsDefined(Description)) - { - writer.WritePropertyName("description"u8); - writer.WriteStringValue(Description); - } - if (Optional.IsDefined(Dataset)) - { - writer.WritePropertyName("dataset"u8); - writer.WriteObjectValue(Dataset); - } - if (Optional.IsDefined(LinkedService)) - { - writer.WritePropertyName("linkedService"u8); - JsonSerializer.Serialize(writer, LinkedService); - } - if (Optional.IsDefined(Flowlet)) - { - writer.WritePropertyName("flowlet"u8); - writer.WriteObjectValue(Flowlet); - } - writer.WriteEndObject(); - } - - internal static DataFlowSource DeserializeDataFlowSource(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - Optional schemaLinkedService = default; - string name = default; - Optional description = default; - Optional dataset = default; - Optional linkedService = default; - Optional flowlet = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("schemaLinkedService"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - schemaLinkedService = JsonSerializer.Deserialize(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("name"u8)) - { - name = property.Value.GetString(); - continue; - } - if (property.NameEquals("description"u8)) - { - description = property.Value.GetString(); - continue; - } - if (property.NameEquals("dataset"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - dataset = DatasetReference.DeserializeDatasetReference(property.Value); - continue; - } - if (property.NameEquals("linkedService"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - linkedService = JsonSerializer.Deserialize(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("flowlet"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - flowlet = DataFlowReference.DeserializeDataFlowReference(property.Value); - continue; - } - } - return new DataFlowSource(name, description.Value, dataset.Value, linkedService, flowlet.Value, schemaLinkedService); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DataFlowSource.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DataFlowSource.cs deleted file mode 100644 index ef3c3eb8..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DataFlowSource.cs +++ /dev/null @@ -1,36 +0,0 @@ -// - -#nullable disable - -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// Transformation for data flow source. - public partial class DataFlowSource : DataFlowTransformation - { - /// Initializes a new instance of DataFlowSource. - /// Transformation name. - /// is null. - public DataFlowSource(string name) : base(name) - { - Argument.AssertNotNull(name, nameof(name)); - } - - /// Initializes a new instance of DataFlowSource. - /// Transformation name. - /// Transformation description. - /// Dataset reference. - /// Linked service reference. - /// Flowlet Reference. - /// Schema linked service reference. - internal DataFlowSource(string name, string description, DatasetReference dataset, DataFactoryLinkedServiceReference linkedService, DataFlowReference flowlet, DataFactoryLinkedServiceReference schemaLinkedService) : base(name, description, dataset, linkedService, flowlet) - { - SchemaLinkedService = schemaLinkedService; - } - - /// Schema linked service reference. - public DataFactoryLinkedServiceReference SchemaLinkedService { get; set; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DataFlowSourceSetting.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DataFlowSourceSetting.Serialization.cs deleted file mode 100644 index e94e04ec..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DataFlowSourceSetting.Serialization.cs +++ /dev/null @@ -1,37 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class DataFlowSourceSetting : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - if (Optional.IsDefined(SourceName)) - { - writer.WritePropertyName("sourceName"u8); - writer.WriteStringValue(SourceName); - } - if (Optional.IsDefined(RowLimit)) - { - writer.WritePropertyName("rowLimit"u8); - writer.WriteNumberValue(RowLimit.Value); - } - foreach (var item in AdditionalProperties) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.Value.ToString()).RootElement); -#endif - } - writer.WriteEndObject(); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DataFlowSourceSetting.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DataFlowSourceSetting.cs deleted file mode 100644 index b8a2d22b..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DataFlowSourceSetting.cs +++ /dev/null @@ -1,55 +0,0 @@ -// - -#nullable disable - -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// Definition of data flow source setting for debug. - public partial class DataFlowSourceSetting - { - /// Initializes a new instance of DataFlowSourceSetting. - public DataFlowSourceSetting() - { - AdditionalProperties = new ChangeTrackingDictionary>(); - } - - /// The data flow source name. - public string SourceName { get; set; } - /// Defines the row limit of data flow source in debug. - public int? RowLimit { get; set; } - /// - /// Additional Properties - /// - /// To assign an object to the value of this property use . - /// - /// - /// To assign an already formated json string to this property use . - /// - /// - /// Examples: - /// - /// - /// BinaryData.FromObjectAsJson("foo") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromString("\"foo\"") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromObjectAsJson(new { key = "value" }) - /// Creates a payload of { "key": "value" }. - /// - /// - /// BinaryData.FromString("{\"key\": \"value\"}") - /// Creates a payload of { "key": "value" }. - /// - /// - /// - /// - public IDictionary> AdditionalProperties { get; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DataFlowStagingInfo.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DataFlowStagingInfo.Serialization.cs deleted file mode 100644 index 899b9358..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DataFlowStagingInfo.Serialization.cs +++ /dev/null @@ -1,61 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class DataFlowStagingInfo : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - if (Optional.IsDefined(LinkedService)) - { - writer.WritePropertyName("linkedService"u8); - JsonSerializer.Serialize(writer, LinkedService); - } - if (Optional.IsDefined(FolderPath)) - { - writer.WritePropertyName("folderPath"u8); - JsonSerializer.Serialize(writer, FolderPath); - } - writer.WriteEndObject(); - } - - internal static DataFlowStagingInfo DeserializeDataFlowStagingInfo(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - Optional linkedService = default; - Optional> folderPath = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("linkedService"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - linkedService = JsonSerializer.Deserialize(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("folderPath"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - folderPath = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - } - return new DataFlowStagingInfo(linkedService, folderPath.Value); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DataFlowStagingInfo.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DataFlowStagingInfo.cs deleted file mode 100644 index 48abcfd7..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DataFlowStagingInfo.cs +++ /dev/null @@ -1,31 +0,0 @@ -// - -#nullable disable - -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// Staging info for execute data flow activity. - public partial class DataFlowStagingInfo - { - /// Initializes a new instance of DataFlowStagingInfo. - public DataFlowStagingInfo() - { - } - - /// Initializes a new instance of DataFlowStagingInfo. - /// Staging linked service reference. - /// Folder path for staging blob. Type: string (or Expression with resultType string). - internal DataFlowStagingInfo(DataFactoryLinkedServiceReference linkedService, DataFactoryElement folderPath) - { - LinkedService = linkedService; - FolderPath = folderPath; - } - - /// Staging linked service reference. - public DataFactoryLinkedServiceReference LinkedService { get; set; } - /// Folder path for staging blob. Type: string (or Expression with resultType string). - public DataFactoryElement FolderPath { get; set; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DataFlowTransformation.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DataFlowTransformation.Serialization.cs deleted file mode 100644 index 8522effa..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DataFlowTransformation.Serialization.cs +++ /dev/null @@ -1,95 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class DataFlowTransformation : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - if (Optional.IsDefined(Description)) - { - writer.WritePropertyName("description"u8); - writer.WriteStringValue(Description); - } - if (Optional.IsDefined(Dataset)) - { - writer.WritePropertyName("dataset"u8); - writer.WriteObjectValue(Dataset); - } - if (Optional.IsDefined(LinkedService)) - { - writer.WritePropertyName("linkedService"u8); - JsonSerializer.Serialize(writer, LinkedService); - } - if (Optional.IsDefined(Flowlet)) - { - writer.WritePropertyName("flowlet"u8); - writer.WriteObjectValue(Flowlet); - } - writer.WriteEndObject(); - } - - internal static DataFlowTransformation DeserializeDataFlowTransformation(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - string name = default; - Optional description = default; - Optional dataset = default; - Optional linkedService = default; - Optional flowlet = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("name"u8)) - { - name = property.Value.GetString(); - continue; - } - if (property.NameEquals("description"u8)) - { - description = property.Value.GetString(); - continue; - } - if (property.NameEquals("dataset"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - dataset = DatasetReference.DeserializeDatasetReference(property.Value); - continue; - } - if (property.NameEquals("linkedService"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - linkedService = JsonSerializer.Deserialize(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("flowlet"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - flowlet = DataFlowReference.DeserializeDataFlowReference(property.Value); - continue; - } - } - return new DataFlowTransformation(name, description.Value, dataset.Value, linkedService, flowlet.Value); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DataFlowTransformation.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DataFlowTransformation.cs deleted file mode 100644 index 659cd466..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DataFlowTransformation.cs +++ /dev/null @@ -1,49 +0,0 @@ -// - -#nullable disable - -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// A data flow transformation. - public partial class DataFlowTransformation - { - /// Initializes a new instance of DataFlowTransformation. - /// Transformation name. - /// is null. - public DataFlowTransformation(string name) - { - Argument.AssertNotNull(name, nameof(name)); - - Name = name; - } - - /// Initializes a new instance of DataFlowTransformation. - /// Transformation name. - /// Transformation description. - /// Dataset reference. - /// Linked service reference. - /// Flowlet Reference. - internal DataFlowTransformation(string name, string description, DatasetReference dataset, DataFactoryLinkedServiceReference linkedService, DataFlowReference flowlet) - { - Name = name; - Description = description; - Dataset = dataset; - LinkedService = linkedService; - Flowlet = flowlet; - } - - /// Transformation name. - public string Name { get; set; } - /// Transformation description. - public string Description { get; set; } - /// Dataset reference. - public DatasetReference Dataset { get; set; } - /// Linked service reference. - public DataFactoryLinkedServiceReference LinkedService { get; set; } - /// Flowlet Reference. - public DataFlowReference Flowlet { get; set; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DataLakeAnalyticsUsqlActivity.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DataLakeAnalyticsUsqlActivity.Serialization.cs deleted file mode 100644 index 155a7ccd..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DataLakeAnalyticsUsqlActivity.Serialization.cs +++ /dev/null @@ -1,313 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class DataLakeAnalyticsUsqlActivity : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - if (Optional.IsDefined(LinkedServiceName)) - { - writer.WritePropertyName("linkedServiceName"u8); - JsonSerializer.Serialize(writer, LinkedServiceName); - } - if (Optional.IsDefined(Policy)) - { - writer.WritePropertyName("policy"u8); - writer.WriteObjectValue(Policy); - } - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ActivityType); - if (Optional.IsDefined(Description)) - { - writer.WritePropertyName("description"u8); - writer.WriteStringValue(Description); - } - if (Optional.IsDefined(State)) - { - writer.WritePropertyName("state"u8); - writer.WriteStringValue(State.Value.ToString()); - } - if (Optional.IsDefined(OnInactiveMarkAs)) - { - writer.WritePropertyName("onInactiveMarkAs"u8); - writer.WriteStringValue(OnInactiveMarkAs.Value.ToString()); - } - if (Optional.IsCollectionDefined(DependsOn)) - { - writer.WritePropertyName("dependsOn"u8); - writer.WriteStartArray(); - foreach (var item in DependsOn) - { - writer.WriteObjectValue(item); - } - writer.WriteEndArray(); - } - if (Optional.IsCollectionDefined(UserProperties)) - { - writer.WritePropertyName("userProperties"u8); - writer.WriteStartArray(); - foreach (var item in UserProperties) - { - writer.WriteObjectValue(item); - } - writer.WriteEndArray(); - } - writer.WritePropertyName("typeProperties"u8); - writer.WriteStartObject(); - writer.WritePropertyName("scriptPath"u8); - JsonSerializer.Serialize(writer, ScriptPath); - writer.WritePropertyName("scriptLinkedService"u8); - JsonSerializer.Serialize(writer, ScriptLinkedService); if (Optional.IsDefined(DegreeOfParallelism)) - { - writer.WritePropertyName("degreeOfParallelism"u8); - JsonSerializer.Serialize(writer, DegreeOfParallelism); - } - if (Optional.IsDefined(Priority)) - { - writer.WritePropertyName("priority"u8); - JsonSerializer.Serialize(writer, Priority); - } - if (Optional.IsCollectionDefined(Parameters)) - { - writer.WritePropertyName("parameters"u8); - writer.WriteStartObject(); - foreach (var item in Parameters) - { - writer.WritePropertyName(item.Key); - if (item.Value == null) - { - writer.WriteNullValue(); - continue; - } -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.Value.ToString()).RootElement); -#endif - } - writer.WriteEndObject(); - } - if (Optional.IsDefined(RuntimeVersion)) - { - writer.WritePropertyName("runtimeVersion"u8); - JsonSerializer.Serialize(writer, RuntimeVersion); - } - if (Optional.IsDefined(CompilationMode)) - { - writer.WritePropertyName("compilationMode"u8); - JsonSerializer.Serialize(writer, CompilationMode); - } - writer.WriteEndObject(); - foreach (var item in AdditionalProperties) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.Value.ToString()).RootElement); -#endif - } - writer.WriteEndObject(); - } - - internal static DataLakeAnalyticsUsqlActivity DeserializeDataLakeAnalyticsUsqlActivity(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - Optional linkedServiceName = default; - Optional policy = default; - string name = default; - string type = default; - Optional description = default; - Optional state = default; - Optional onInactiveMarkAs = default; - Optional> dependsOn = default; - Optional> userProperties = default; - DataFactoryElement scriptPath = default; - DataFactoryLinkedServiceReference scriptLinkedService = default; - Optional> degreeOfParallelism = default; - Optional> priority = default; - Optional>> parameters = default; - Optional> runtimeVersion = default; - Optional> compilationMode = default; - IDictionary> additionalProperties = default; - Dictionary> additionalPropertiesDictionary = new Dictionary>(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("linkedServiceName"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - linkedServiceName = JsonSerializer.Deserialize(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("policy"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - policy = PipelineActivityPolicy.DeserializePipelineActivityPolicy(property.Value); - continue; - } - if (property.NameEquals("name"u8)) - { - name = property.Value.GetString(); - continue; - } - if (property.NameEquals("type"u8)) - { - type = property.Value.GetString(); - continue; - } - if (property.NameEquals("description"u8)) - { - description = property.Value.GetString(); - continue; - } - if (property.NameEquals("state"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - state = new PipelineActivityState(property.Value.GetString()); - continue; - } - if (property.NameEquals("onInactiveMarkAs"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - onInactiveMarkAs = new ActivityOnInactiveMarkAs(property.Value.GetString()); - continue; - } - if (property.NameEquals("dependsOn"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - array.Add(PipelineActivityDependency.DeserializePipelineActivityDependency(item)); - } - dependsOn = array; - continue; - } - if (property.NameEquals("userProperties"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - array.Add(PipelineActivityUserProperty.DeserializePipelineActivityUserProperty(item)); - } - userProperties = array; - continue; - } - if (property.NameEquals("typeProperties"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - foreach (var property0 in property.Value.EnumerateObject()) - { - if (property0.NameEquals("scriptPath"u8)) - { - scriptPath = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("scriptLinkedService"u8)) - { - scriptLinkedService = JsonSerializer.Deserialize(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("degreeOfParallelism"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - degreeOfParallelism = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("priority"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - priority = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("parameters"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - Dictionary> dictionary = new Dictionary>(); - foreach (var property1 in property0.Value.EnumerateObject()) - { - if (property1.Value.ValueKind == JsonValueKind.Null) - { - dictionary.Add(property1.Name, null); - } - else - { - dictionary.Add(property1.Name, JsonSerializer.Deserialize>(property1.Value.GetRawText())); - } - } - parameters = dictionary; - continue; - } - if (property0.NameEquals("runtimeVersion"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - runtimeVersion = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("compilationMode"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - compilationMode = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - } - continue; - } - additionalPropertiesDictionary.Add(property.Name, JsonSerializer.Deserialize>(property.Value.GetRawText())); - } - additionalProperties = additionalPropertiesDictionary; - return new DataLakeAnalyticsUsqlActivity(name, type, description.Value, Optional.ToNullable(state), Optional.ToNullable(onInactiveMarkAs), Optional.ToList(dependsOn), Optional.ToList(userProperties), additionalProperties, linkedServiceName, policy.Value, scriptPath, scriptLinkedService, degreeOfParallelism.Value, priority.Value, Optional.ToDictionary(parameters), runtimeVersion.Value, compilationMode.Value); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DataLakeAnalyticsUsqlActivity.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DataLakeAnalyticsUsqlActivity.cs deleted file mode 100644 index decb8aee..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DataLakeAnalyticsUsqlActivity.cs +++ /dev/null @@ -1,104 +0,0 @@ -// - -#nullable disable - -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// Data Lake Analytics U-SQL activity. - public partial class DataLakeAnalyticsUsqlActivity : ExecutionActivity - { - /// Initializes a new instance of DataLakeAnalyticsUsqlActivity. - /// Activity name. - /// Case-sensitive path to folder that contains the U-SQL script. Type: string (or Expression with resultType string). - /// Script linked service reference. - /// , or is null. - public DataLakeAnalyticsUsqlActivity(string name, DataFactoryElement scriptPath, DataFactoryLinkedServiceReference scriptLinkedService) : base(name) - { - Argument.AssertNotNull(name, nameof(name)); - Argument.AssertNotNull(scriptPath, nameof(scriptPath)); - Argument.AssertNotNull(scriptLinkedService, nameof(scriptLinkedService)); - - ScriptPath = scriptPath; - ScriptLinkedService = scriptLinkedService; - Parameters = new ChangeTrackingDictionary>(); - ActivityType = "DataLakeAnalyticsU-SQL"; - } - - /// Initializes a new instance of DataLakeAnalyticsUsqlActivity. - /// Activity name. - /// Type of activity. - /// Activity description. - /// Activity state. This is an optional property and if not provided, the state will be Active by default. - /// 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. - /// Activity depends on condition. - /// Activity user properties. - /// Additional Properties. - /// Linked service reference. - /// Activity policy. - /// Case-sensitive path to folder that contains the U-SQL script. Type: string (or Expression with resultType string). - /// Script linked service reference. - /// The maximum number of nodes simultaneously used to run the job. Default value is 1. Type: integer (or Expression with resultType integer), minimum: 1. - /// Determines which jobs out of all that are queued should be selected to run first. The lower the number, the higher the priority. Default value is 1000. Type: integer (or Expression with resultType integer), minimum: 1. - /// Parameters for U-SQL job request. - /// Runtime version of the U-SQL engine to use. Type: string (or Expression with resultType string). - /// Compilation mode of U-SQL. Must be one of these values : Semantic, Full and SingleBox. Type: string (or Expression with resultType string). - internal DataLakeAnalyticsUsqlActivity(string name, string activityType, string description, PipelineActivityState? state, ActivityOnInactiveMarkAs? onInactiveMarkAs, IList dependsOn, IList userProperties, IDictionary> additionalProperties, DataFactoryLinkedServiceReference linkedServiceName, PipelineActivityPolicy policy, DataFactoryElement scriptPath, DataFactoryLinkedServiceReference scriptLinkedService, DataFactoryElement degreeOfParallelism, DataFactoryElement priority, IDictionary> parameters, DataFactoryElement runtimeVersion, DataFactoryElement compilationMode) : base(name, activityType, description, state, onInactiveMarkAs, dependsOn, userProperties, additionalProperties, linkedServiceName, policy) - { - ScriptPath = scriptPath; - ScriptLinkedService = scriptLinkedService; - DegreeOfParallelism = degreeOfParallelism; - Priority = priority; - Parameters = parameters; - RuntimeVersion = runtimeVersion; - CompilationMode = compilationMode; - ActivityType = activityType ?? "DataLakeAnalyticsU-SQL"; - } - - /// Case-sensitive path to folder that contains the U-SQL script. Type: string (or Expression with resultType string). - public DataFactoryElement ScriptPath { get; set; } - /// Script linked service reference. - public DataFactoryLinkedServiceReference ScriptLinkedService { get; set; } - /// The maximum number of nodes simultaneously used to run the job. Default value is 1. Type: integer (or Expression with resultType integer), minimum: 1. - public DataFactoryElement DegreeOfParallelism { get; set; } - /// Determines which jobs out of all that are queued should be selected to run first. The lower the number, the higher the priority. Default value is 1000. Type: integer (or Expression with resultType integer), minimum: 1. - public DataFactoryElement Priority { get; set; } - /// - /// Parameters for U-SQL job request. - /// - /// To assign an object to the value of this property use . - /// - /// - /// To assign an already formated json string to this property use . - /// - /// - /// Examples: - /// - /// - /// BinaryData.FromObjectAsJson("foo") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromString("\"foo\"") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromObjectAsJson(new { key = "value" }) - /// Creates a payload of { "key": "value" }. - /// - /// - /// BinaryData.FromString("{\"key\": \"value\"}") - /// Creates a payload of { "key": "value" }. - /// - /// - /// - /// - public IDictionary> Parameters { get; } - /// Runtime version of the U-SQL engine to use. Type: string (or Expression with resultType string). - public DataFactoryElement RuntimeVersion { get; set; } - /// Compilation mode of U-SQL. Must be one of these values : Semantic, Full and SingleBox. Type: string (or Expression with resultType string). - public DataFactoryElement CompilationMode { get; set; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DataMapperMapping.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DataMapperMapping.Serialization.cs deleted file mode 100644 index f60440d3..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DataMapperMapping.Serialization.cs +++ /dev/null @@ -1,101 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class DataMapperMapping : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - if (Optional.IsDefined(TargetEntityName)) - { - writer.WritePropertyName("targetEntityName"u8); - writer.WriteStringValue(TargetEntityName); - } - if (Optional.IsDefined(SourceEntityName)) - { - writer.WritePropertyName("sourceEntityName"u8); - writer.WriteStringValue(SourceEntityName); - } - if (Optional.IsDefined(SourceConnectionReference)) - { - writer.WritePropertyName("sourceConnectionReference"u8); - writer.WriteObjectValue(SourceConnectionReference); - } - if (Optional.IsDefined(AttributeMappingInfo)) - { - writer.WritePropertyName("attributeMappingInfo"u8); - writer.WriteObjectValue(AttributeMappingInfo); - } - if (Optional.IsDefined(SourceDenormalizeInfo)) - { - writer.WritePropertyName("sourceDenormalizeInfo"u8); -#if NET6_0_OR_GREATER - writer.WriteRawValue(SourceDenormalizeInfo); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(SourceDenormalizeInfo.ToString()).RootElement); -#endif - } - writer.WriteEndObject(); - } - - internal static DataMapperMapping DeserializeDataMapperMapping(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - Optional targetEntityName = default; - Optional sourceEntityName = default; - Optional sourceConnectionReference = default; - Optional attributeMappingInfo = default; - Optional sourceDenormalizeInfo = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("targetEntityName"u8)) - { - targetEntityName = property.Value.GetString(); - continue; - } - if (property.NameEquals("sourceEntityName"u8)) - { - sourceEntityName = property.Value.GetString(); - continue; - } - if (property.NameEquals("sourceConnectionReference"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - sourceConnectionReference = MapperConnectionReference.DeserializeMapperConnectionReference(property.Value); - continue; - } - if (property.NameEquals("attributeMappingInfo"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - attributeMappingInfo = MapperAttributeMappings.DeserializeMapperAttributeMappings(property.Value); - continue; - } - if (property.NameEquals("sourceDenormalizeInfo"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - sourceDenormalizeInfo = BinaryData.FromString(property.Value.GetRawText()); - continue; - } - } - return new DataMapperMapping(targetEntityName.Value, sourceEntityName.Value, sourceConnectionReference.Value, attributeMappingInfo.Value, sourceDenormalizeInfo.Value); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DataMapperMapping.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DataMapperMapping.cs deleted file mode 100644 index 5186ea2b..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DataMapperMapping.cs +++ /dev/null @@ -1,81 +0,0 @@ -// - -#nullable disable - -namespace AzureDataFactory.TestingFramework.Models -{ - /// Source and target table mapping details. - public partial class DataMapperMapping - { - /// Initializes a new instance of DataMapperMapping. - public DataMapperMapping() - { - } - - /// Initializes a new instance of DataMapperMapping. - /// Name of the target table. - /// Name of the source table. - /// The connection reference for the source connection. - /// This holds the user provided attribute mapping information. - /// This holds the source denormalization information used while joining multiple sources. - internal DataMapperMapping(string targetEntityName, string sourceEntityName, MapperConnectionReference sourceConnectionReference, MapperAttributeMappings attributeMappingInfo, BinaryData sourceDenormalizeInfo) - { - TargetEntityName = targetEntityName; - SourceEntityName = sourceEntityName; - SourceConnectionReference = sourceConnectionReference; - AttributeMappingInfo = attributeMappingInfo; - SourceDenormalizeInfo = sourceDenormalizeInfo; - } - - /// Name of the target table. - public string TargetEntityName { get; set; } - /// Name of the source table. - public string SourceEntityName { get; set; } - /// The connection reference for the source connection. - public MapperConnectionReference SourceConnectionReference { get; set; } - /// This holds the user provided attribute mapping information. - internal MapperAttributeMappings AttributeMappingInfo { get; set; } - /// List of attribute mappings. - public IList AttributeMappings - { - get - { - if (AttributeMappingInfo is null) - AttributeMappingInfo = new MapperAttributeMappings(); - return AttributeMappingInfo.AttributeMappings; - } - } - - /// - /// This holds the source denormalization information used while joining multiple sources. - /// - /// To assign an object to this property use . - /// - /// - /// To assign an already formated json string to this property use . - /// - /// - /// Examples: - /// - /// - /// BinaryData.FromObjectAsJson("foo") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromString("\"foo\"") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromObjectAsJson(new { key = "value" }) - /// Creates a payload of { "key": "value" }. - /// - /// - /// BinaryData.FromString("{\"key\": \"value\"}") - /// Creates a payload of { "key": "value" }. - /// - /// - /// - /// - public BinaryData SourceDenormalizeInfo { get; set; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DatabricksNotebookActivity.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DatabricksNotebookActivity.Serialization.cs deleted file mode 100644 index 282799ca..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DatabricksNotebookActivity.Serialization.cs +++ /dev/null @@ -1,310 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class DatabricksNotebookActivity : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - if (Optional.IsDefined(LinkedServiceName)) - { - writer.WritePropertyName("linkedServiceName"u8); - JsonSerializer.Serialize(writer, LinkedServiceName); - } - if (Optional.IsDefined(Policy)) - { - writer.WritePropertyName("policy"u8); - writer.WriteObjectValue(Policy); - } - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ActivityType); - if (Optional.IsDefined(Description)) - { - writer.WritePropertyName("description"u8); - writer.WriteStringValue(Description); - } - if (Optional.IsDefined(State)) - { - writer.WritePropertyName("state"u8); - writer.WriteStringValue(State.Value.ToString()); - } - if (Optional.IsDefined(OnInactiveMarkAs)) - { - writer.WritePropertyName("onInactiveMarkAs"u8); - writer.WriteStringValue(OnInactiveMarkAs.Value.ToString()); - } - if (Optional.IsCollectionDefined(DependsOn)) - { - writer.WritePropertyName("dependsOn"u8); - writer.WriteStartArray(); - foreach (var item in DependsOn) - { - writer.WriteObjectValue(item); - } - writer.WriteEndArray(); - } - if (Optional.IsCollectionDefined(UserProperties)) - { - writer.WritePropertyName("userProperties"u8); - writer.WriteStartArray(); - foreach (var item in UserProperties) - { - writer.WriteObjectValue(item); - } - writer.WriteEndArray(); - } - writer.WritePropertyName("typeProperties"u8); - writer.WriteStartObject(); - writer.WritePropertyName("notebookPath"u8); - JsonSerializer.Serialize(writer, NotebookPath); - if (Optional.IsCollectionDefined(BaseParameters)) - { - writer.WritePropertyName("baseParameters"u8); - writer.WriteStartObject(); - foreach (var item in BaseParameters) - { - writer.WritePropertyName(item.Key); - if (item.Value == null) - { - writer.WriteNullValue(); - continue; - } -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.Value.ToString()).RootElement); -#endif - } - writer.WriteEndObject(); - } - if (Optional.IsCollectionDefined(Libraries)) - { - writer.WritePropertyName("libraries"u8); - writer.WriteStartArray(); - foreach (var item in Libraries) - { - if (item == null) - { - writer.WriteNullValue(); - continue; - } - writer.WriteStartObject(); - foreach (var item0 in item) - { - writer.WritePropertyName(item0.Key); - if (item0.Value == null) - { - writer.WriteNullValue(); - continue; - } -#if NET6_0_OR_GREATER - writer.WriteRawValue(item0.Value); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item0.Value.ToString()).RootElement); -#endif - } - writer.WriteEndObject(); - } - writer.WriteEndArray(); - } - writer.WriteEndObject(); - foreach (var item in AdditionalProperties) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.Value.ToString()).RootElement); -#endif - } - writer.WriteEndObject(); - } - - internal static DatabricksNotebookActivity DeserializeDatabricksNotebookActivity(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - Optional linkedServiceName = default; - Optional policy = default; - string name = default; - string type = default; - Optional description = default; - Optional state = default; - Optional onInactiveMarkAs = default; - Optional> dependsOn = default; - Optional> userProperties = default; - DataFactoryElement notebookPath = default; - Optional>> baseParameters = default; - Optional>>> libraries = default; - IDictionary> additionalProperties = default; - Dictionary> additionalPropertiesDictionary = new Dictionary>(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("linkedServiceName"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - linkedServiceName = JsonSerializer.Deserialize(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("policy"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - policy = PipelineActivityPolicy.DeserializePipelineActivityPolicy(property.Value); - continue; - } - if (property.NameEquals("name"u8)) - { - name = property.Value.GetString(); - continue; - } - if (property.NameEquals("type"u8)) - { - type = property.Value.GetString(); - continue; - } - if (property.NameEquals("description"u8)) - { - description = property.Value.GetString(); - continue; - } - if (property.NameEquals("state"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - state = new PipelineActivityState(property.Value.GetString()); - continue; - } - if (property.NameEquals("onInactiveMarkAs"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - onInactiveMarkAs = new ActivityOnInactiveMarkAs(property.Value.GetString()); - continue; - } - if (property.NameEquals("dependsOn"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - array.Add(PipelineActivityDependency.DeserializePipelineActivityDependency(item)); - } - dependsOn = array; - continue; - } - if (property.NameEquals("userProperties"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - array.Add(PipelineActivityUserProperty.DeserializePipelineActivityUserProperty(item)); - } - userProperties = array; - continue; - } - if (property.NameEquals("typeProperties"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - foreach (var property0 in property.Value.EnumerateObject()) - { - if (property0.NameEquals("notebookPath"u8)) - { - notebookPath = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("baseParameters"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - Dictionary> dictionary = new Dictionary>(); - foreach (var property1 in property0.Value.EnumerateObject()) - { - if (property1.Value.ValueKind == JsonValueKind.Null) - { - dictionary.Add(property1.Name, null); - } - else - { - dictionary.Add(property1.Name, JsonSerializer.Deserialize>(property1.Value.GetRawText())); - } - } - baseParameters = dictionary; - continue; - } - if (property0.NameEquals("libraries"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List>> array = new List>>(); - foreach (var item in property0.Value.EnumerateArray()) - { - if (item.ValueKind == JsonValueKind.Null) - { - array.Add(null); - } - else - { - Dictionary> dictionary = new Dictionary>(); - foreach (var property1 in item.EnumerateObject()) - { - if (property1.Value.ValueKind == JsonValueKind.Null) - { - dictionary.Add(property1.Name, null); - } - else - { - dictionary.Add(property1.Name, JsonSerializer.Deserialize>(property1.Value.GetRawText())); - } - } - array.Add(dictionary); - } - } - libraries = array; - continue; - } - } - continue; - } - additionalPropertiesDictionary.Add(property.Name, JsonSerializer.Deserialize>(property.Value.GetRawText())); - } - additionalProperties = additionalPropertiesDictionary; - return new DatabricksNotebookActivity(name, type, description.Value, Optional.ToNullable(state), Optional.ToNullable(onInactiveMarkAs), Optional.ToList(dependsOn), Optional.ToList(userProperties), additionalProperties, linkedServiceName, policy.Value, notebookPath, Optional.ToDictionary(baseParameters), Optional.ToList(libraries)); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DatabricksNotebookActivity.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DatabricksNotebookActivity.cs deleted file mode 100644 index 86365019..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DatabricksNotebookActivity.cs +++ /dev/null @@ -1,86 +0,0 @@ -// - -#nullable disable - -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// DatabricksNotebook activity. - public partial class DatabricksNotebookActivity : ExecutionActivity - { - /// Initializes a new instance of DatabricksNotebookActivity. - /// Activity name. - /// The absolute path of the notebook to be run in the Databricks Workspace. This path must begin with a slash. Type: string (or Expression with resultType string). - /// or is null. - public DatabricksNotebookActivity(string name, DataFactoryElement notebookPath) : base(name) - { - Argument.AssertNotNull(name, nameof(name)); - Argument.AssertNotNull(notebookPath, nameof(notebookPath)); - - NotebookPath = notebookPath; - BaseParameters = new ChangeTrackingDictionary>(); - Libraries = new ChangeTrackingList>>(); - ActivityType = "DatabricksNotebook"; - } - - /// Initializes a new instance of DatabricksNotebookActivity. - /// Activity name. - /// Type of activity. - /// Activity description. - /// Activity state. This is an optional property and if not provided, the state will be Active by default. - /// 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. - /// Activity depends on condition. - /// Activity user properties. - /// Additional Properties. - /// Linked service reference. - /// Activity policy. - /// The absolute path of the notebook to be run in the Databricks Workspace. This path must begin with a slash. Type: string (or Expression with resultType string). - /// Base parameters to be used for each run of this job.If the notebook takes a parameter that is not specified, the default value from the notebook will be used. - /// A list of libraries to be installed on the cluster that will execute the job. - internal DatabricksNotebookActivity(string name, string activityType, string description, PipelineActivityState? state, ActivityOnInactiveMarkAs? onInactiveMarkAs, IList dependsOn, IList userProperties, IDictionary> additionalProperties, DataFactoryLinkedServiceReference linkedServiceName, PipelineActivityPolicy policy, DataFactoryElement notebookPath, IDictionary> baseParameters, IList>> libraries) : base(name, activityType, description, state, onInactiveMarkAs, dependsOn, userProperties, additionalProperties, linkedServiceName, policy) - { - NotebookPath = notebookPath; - BaseParameters = baseParameters; - Libraries = libraries; - ActivityType = activityType ?? "DatabricksNotebook"; - } - - /// The absolute path of the notebook to be run in the Databricks Workspace. This path must begin with a slash. Type: string (or Expression with resultType string). - public DataFactoryElement NotebookPath { get; set; } - /// - /// Base parameters to be used for each run of this job.If the notebook takes a parameter that is not specified, the default value from the notebook will be used. - /// - /// To assign an object to the value of this property use . - /// - /// - /// To assign an already formated json string to this property use . - /// - /// - /// Examples: - /// - /// - /// BinaryData.FromObjectAsJson("foo") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromString("\"foo\"") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromObjectAsJson(new { key = "value" }) - /// Creates a payload of { "key": "value" }. - /// - /// - /// BinaryData.FromString("{\"key\": \"value\"}") - /// Creates a payload of { "key": "value" }. - /// - /// - /// - /// - public IDictionary> BaseParameters { get; } - /// A list of libraries to be installed on the cluster that will execute the job. - public IList>> Libraries { get; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DatabricksSparkJarActivity.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DatabricksSparkJarActivity.Serialization.cs deleted file mode 100644 index b0bbbfdd..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DatabricksSparkJarActivity.Serialization.cs +++ /dev/null @@ -1,309 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class DatabricksSparkJarActivity : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - if (Optional.IsDefined(LinkedServiceName)) - { - writer.WritePropertyName("linkedServiceName"u8); - JsonSerializer.Serialize(writer, LinkedServiceName); - } - if (Optional.IsDefined(Policy)) - { - writer.WritePropertyName("policy"u8); - writer.WriteObjectValue(Policy); - } - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ActivityType); - if (Optional.IsDefined(Description)) - { - writer.WritePropertyName("description"u8); - writer.WriteStringValue(Description); - } - if (Optional.IsDefined(State)) - { - writer.WritePropertyName("state"u8); - writer.WriteStringValue(State.Value.ToString()); - } - if (Optional.IsDefined(OnInactiveMarkAs)) - { - writer.WritePropertyName("onInactiveMarkAs"u8); - writer.WriteStringValue(OnInactiveMarkAs.Value.ToString()); - } - if (Optional.IsCollectionDefined(DependsOn)) - { - writer.WritePropertyName("dependsOn"u8); - writer.WriteStartArray(); - foreach (var item in DependsOn) - { - writer.WriteObjectValue(item); - } - writer.WriteEndArray(); - } - if (Optional.IsCollectionDefined(UserProperties)) - { - writer.WritePropertyName("userProperties"u8); - writer.WriteStartArray(); - foreach (var item in UserProperties) - { - writer.WriteObjectValue(item); - } - writer.WriteEndArray(); - } - writer.WritePropertyName("typeProperties"u8); - writer.WriteStartObject(); - writer.WritePropertyName("mainClassName"u8); - JsonSerializer.Serialize(writer, MainClassName); - if (Optional.IsCollectionDefined(Parameters)) - { - writer.WritePropertyName("parameters"u8); - writer.WriteStartArray(); - foreach (var item in Parameters) - { - if (item == null) - { - writer.WriteNullValue(); - continue; - } -#if NET6_0_OR_GREATER - writer.WriteRawValue(item); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.ToString()).RootElement); -#endif - } - writer.WriteEndArray(); - } - if (Optional.IsCollectionDefined(Libraries)) - { - writer.WritePropertyName("libraries"u8); - writer.WriteStartArray(); - foreach (var item in Libraries) - { - if (item == null) - { - writer.WriteNullValue(); - continue; - } - writer.WriteStartObject(); - foreach (var item0 in item) - { - writer.WritePropertyName(item0.Key); - if (item0.Value == null) - { - writer.WriteNullValue(); - continue; - } -#if NET6_0_OR_GREATER - writer.WriteRawValue(item0.Value); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item0.Value.ToString()).RootElement); -#endif - } - writer.WriteEndObject(); - } - writer.WriteEndArray(); - } - writer.WriteEndObject(); - foreach (var item in AdditionalProperties) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.Value.ToString()).RootElement); -#endif - } - writer.WriteEndObject(); - } - - internal static DatabricksSparkJarActivity DeserializeDatabricksSparkJarActivity(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - Optional linkedServiceName = default; - Optional policy = default; - string name = default; - string type = default; - Optional description = default; - Optional state = default; - Optional onInactiveMarkAs = default; - Optional> dependsOn = default; - Optional> userProperties = default; - DataFactoryElement mainClassName = default; - Optional> parameters = default; - Optional>>> libraries = default; - IDictionary> additionalProperties = default; - Dictionary> additionalPropertiesDictionary = new Dictionary>(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("linkedServiceName"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - linkedServiceName = JsonSerializer.Deserialize(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("policy"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - policy = PipelineActivityPolicy.DeserializePipelineActivityPolicy(property.Value); - continue; - } - if (property.NameEquals("name"u8)) - { - name = property.Value.GetString(); - continue; - } - if (property.NameEquals("type"u8)) - { - type = property.Value.GetString(); - continue; - } - if (property.NameEquals("description"u8)) - { - description = property.Value.GetString(); - continue; - } - if (property.NameEquals("state"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - state = new PipelineActivityState(property.Value.GetString()); - continue; - } - if (property.NameEquals("onInactiveMarkAs"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - onInactiveMarkAs = new ActivityOnInactiveMarkAs(property.Value.GetString()); - continue; - } - if (property.NameEquals("dependsOn"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - array.Add(PipelineActivityDependency.DeserializePipelineActivityDependency(item)); - } - dependsOn = array; - continue; - } - if (property.NameEquals("userProperties"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - array.Add(PipelineActivityUserProperty.DeserializePipelineActivityUserProperty(item)); - } - userProperties = array; - continue; - } - if (property.NameEquals("typeProperties"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - foreach (var property0 in property.Value.EnumerateObject()) - { - if (property0.NameEquals("mainClassName"u8)) - { - mainClassName = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("parameters"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property0.Value.EnumerateArray()) - { - if (item.ValueKind == JsonValueKind.Null) - { - array.Add(null); - } - else - { - array.Add(BinaryData.FromString(item.GetRawText())); - } - } - parameters = array; - continue; - } - if (property0.NameEquals("libraries"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List>> array = new List>>(); - foreach (var item in property0.Value.EnumerateArray()) - { - if (item.ValueKind == JsonValueKind.Null) - { - array.Add(null); - } - else - { - Dictionary> dictionary = new Dictionary>(); - foreach (var property1 in item.EnumerateObject()) - { - if (property1.Value.ValueKind == JsonValueKind.Null) - { - dictionary.Add(property1.Name, null); - } - else - { - dictionary.Add(property1.Name, JsonSerializer.Deserialize>(property1.Value.GetRawText())); - } - } - array.Add(dictionary); - } - } - libraries = array; - continue; - } - } - continue; - } - additionalPropertiesDictionary.Add(property.Name, JsonSerializer.Deserialize>(property.Value.GetRawText())); - } - additionalProperties = additionalPropertiesDictionary; - return new DatabricksSparkJarActivity(name, type, description.Value, Optional.ToNullable(state), Optional.ToNullable(onInactiveMarkAs), Optional.ToList(dependsOn), Optional.ToList(userProperties), additionalProperties, linkedServiceName, policy.Value, mainClassName, Optional.ToList(parameters), Optional.ToList(libraries)); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DatabricksSparkJarActivity.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DatabricksSparkJarActivity.cs deleted file mode 100644 index c201b7a5..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DatabricksSparkJarActivity.cs +++ /dev/null @@ -1,86 +0,0 @@ -// - -#nullable disable - -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// DatabricksSparkJar activity. - public partial class DatabricksSparkJarActivity : ExecutionActivity - { - /// Initializes a new instance of DatabricksSparkJarActivity. - /// Activity name. - /// The full name of the class containing the main method to be executed. This class must be contained in a JAR provided as a library. Type: string (or Expression with resultType string). - /// or is null. - public DatabricksSparkJarActivity(string name, DataFactoryElement mainClassName) : base(name) - { - Argument.AssertNotNull(name, nameof(name)); - Argument.AssertNotNull(mainClassName, nameof(mainClassName)); - - MainClassName = mainClassName; - Parameters = new ChangeTrackingList(); - Libraries = new ChangeTrackingList>>(); - ActivityType = "DatabricksSparkJar"; - } - - /// Initializes a new instance of DatabricksSparkJarActivity. - /// Activity name. - /// Type of activity. - /// Activity description. - /// Activity state. This is an optional property and if not provided, the state will be Active by default. - /// 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. - /// Activity depends on condition. - /// Activity user properties. - /// Additional Properties. - /// Linked service reference. - /// Activity policy. - /// The full name of the class containing the main method to be executed. This class must be contained in a JAR provided as a library. Type: string (or Expression with resultType string). - /// Parameters that will be passed to the main method. - /// A list of libraries to be installed on the cluster that will execute the job. - internal DatabricksSparkJarActivity(string name, string activityType, string description, PipelineActivityState? state, ActivityOnInactiveMarkAs? onInactiveMarkAs, IList dependsOn, IList userProperties, IDictionary> additionalProperties, DataFactoryLinkedServiceReference linkedServiceName, PipelineActivityPolicy policy, DataFactoryElement mainClassName, IList parameters, IList>> libraries) : base(name, activityType, description, state, onInactiveMarkAs, dependsOn, userProperties, additionalProperties, linkedServiceName, policy) - { - MainClassName = mainClassName; - Parameters = parameters; - Libraries = libraries; - ActivityType = activityType ?? "DatabricksSparkJar"; - } - - /// The full name of the class containing the main method to be executed. This class must be contained in a JAR provided as a library. Type: string (or Expression with resultType string). - public DataFactoryElement MainClassName { get; set; } - /// - /// Parameters that will be passed to the main method. - /// - /// To assign an object to the element of this property use . - /// - /// - /// To assign an already formated json string to this property use . - /// - /// - /// Examples: - /// - /// - /// BinaryData.FromObjectAsJson("foo") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromString("\"foo\"") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromObjectAsJson(new { key = "value" }) - /// Creates a payload of { "key": "value" }. - /// - /// - /// BinaryData.FromString("{\"key\": \"value\"}") - /// Creates a payload of { "key": "value" }. - /// - /// - /// - /// - public IList Parameters { get; } - /// A list of libraries to be installed on the cluster that will execute the job. - public IList>> Libraries { get; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DatabricksSparkPythonActivity.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DatabricksSparkPythonActivity.Serialization.cs deleted file mode 100644 index 975986cf..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DatabricksSparkPythonActivity.Serialization.cs +++ /dev/null @@ -1,309 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class DatabricksSparkPythonActivity : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - if (Optional.IsDefined(LinkedServiceName)) - { - writer.WritePropertyName("linkedServiceName"u8); - JsonSerializer.Serialize(writer, LinkedServiceName); - } - if (Optional.IsDefined(Policy)) - { - writer.WritePropertyName("policy"u8); - writer.WriteObjectValue(Policy); - } - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ActivityType); - if (Optional.IsDefined(Description)) - { - writer.WritePropertyName("description"u8); - writer.WriteStringValue(Description); - } - if (Optional.IsDefined(State)) - { - writer.WritePropertyName("state"u8); - writer.WriteStringValue(State.Value.ToString()); - } - if (Optional.IsDefined(OnInactiveMarkAs)) - { - writer.WritePropertyName("onInactiveMarkAs"u8); - writer.WriteStringValue(OnInactiveMarkAs.Value.ToString()); - } - if (Optional.IsCollectionDefined(DependsOn)) - { - writer.WritePropertyName("dependsOn"u8); - writer.WriteStartArray(); - foreach (var item in DependsOn) - { - writer.WriteObjectValue(item); - } - writer.WriteEndArray(); - } - if (Optional.IsCollectionDefined(UserProperties)) - { - writer.WritePropertyName("userProperties"u8); - writer.WriteStartArray(); - foreach (var item in UserProperties) - { - writer.WriteObjectValue(item); - } - writer.WriteEndArray(); - } - writer.WritePropertyName("typeProperties"u8); - writer.WriteStartObject(); - writer.WritePropertyName("pythonFile"u8); - JsonSerializer.Serialize(writer, PythonFile); - if (Optional.IsCollectionDefined(Parameters)) - { - writer.WritePropertyName("parameters"u8); - writer.WriteStartArray(); - foreach (var item in Parameters) - { - if (item == null) - { - writer.WriteNullValue(); - continue; - } -#if NET6_0_OR_GREATER - writer.WriteRawValue(item); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.ToString()).RootElement); -#endif - } - writer.WriteEndArray(); - } - if (Optional.IsCollectionDefined(Libraries)) - { - writer.WritePropertyName("libraries"u8); - writer.WriteStartArray(); - foreach (var item in Libraries) - { - if (item == null) - { - writer.WriteNullValue(); - continue; - } - writer.WriteStartObject(); - foreach (var item0 in item) - { - writer.WritePropertyName(item0.Key); - if (item0.Value == null) - { - writer.WriteNullValue(); - continue; - } -#if NET6_0_OR_GREATER - writer.WriteRawValue(item0.Value); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item0.Value.ToString()).RootElement); -#endif - } - writer.WriteEndObject(); - } - writer.WriteEndArray(); - } - writer.WriteEndObject(); - foreach (var item in AdditionalProperties) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.Value.ToString()).RootElement); -#endif - } - writer.WriteEndObject(); - } - - internal static DatabricksSparkPythonActivity DeserializeDatabricksSparkPythonActivity(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - Optional linkedServiceName = default; - Optional policy = default; - string name = default; - string type = default; - Optional description = default; - Optional state = default; - Optional onInactiveMarkAs = default; - Optional> dependsOn = default; - Optional> userProperties = default; - DataFactoryElement pythonFile = default; - Optional> parameters = default; - Optional>>> libraries = default; - IDictionary> additionalProperties = default; - Dictionary> additionalPropertiesDictionary = new Dictionary>(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("linkedServiceName"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - linkedServiceName = JsonSerializer.Deserialize(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("policy"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - policy = PipelineActivityPolicy.DeserializePipelineActivityPolicy(property.Value); - continue; - } - if (property.NameEquals("name"u8)) - { - name = property.Value.GetString(); - continue; - } - if (property.NameEquals("type"u8)) - { - type = property.Value.GetString(); - continue; - } - if (property.NameEquals("description"u8)) - { - description = property.Value.GetString(); - continue; - } - if (property.NameEquals("state"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - state = new PipelineActivityState(property.Value.GetString()); - continue; - } - if (property.NameEquals("onInactiveMarkAs"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - onInactiveMarkAs = new ActivityOnInactiveMarkAs(property.Value.GetString()); - continue; - } - if (property.NameEquals("dependsOn"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - array.Add(PipelineActivityDependency.DeserializePipelineActivityDependency(item)); - } - dependsOn = array; - continue; - } - if (property.NameEquals("userProperties"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - array.Add(PipelineActivityUserProperty.DeserializePipelineActivityUserProperty(item)); - } - userProperties = array; - continue; - } - if (property.NameEquals("typeProperties"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - foreach (var property0 in property.Value.EnumerateObject()) - { - if (property0.NameEquals("pythonFile"u8)) - { - pythonFile = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("parameters"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property0.Value.EnumerateArray()) - { - if (item.ValueKind == JsonValueKind.Null) - { - array.Add(null); - } - else - { - array.Add(BinaryData.FromString(item.GetRawText())); - } - } - parameters = array; - continue; - } - if (property0.NameEquals("libraries"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List>> array = new List>>(); - foreach (var item in property0.Value.EnumerateArray()) - { - if (item.ValueKind == JsonValueKind.Null) - { - array.Add(null); - } - else - { - Dictionary> dictionary = new Dictionary>(); - foreach (var property1 in item.EnumerateObject()) - { - if (property1.Value.ValueKind == JsonValueKind.Null) - { - dictionary.Add(property1.Name, null); - } - else - { - dictionary.Add(property1.Name, JsonSerializer.Deserialize>(property1.Value.GetRawText())); - } - } - array.Add(dictionary); - } - } - libraries = array; - continue; - } - } - continue; - } - additionalPropertiesDictionary.Add(property.Name, JsonSerializer.Deserialize>(property.Value.GetRawText())); - } - additionalProperties = additionalPropertiesDictionary; - return new DatabricksSparkPythonActivity(name, type, description.Value, Optional.ToNullable(state), Optional.ToNullable(onInactiveMarkAs), Optional.ToList(dependsOn), Optional.ToList(userProperties), additionalProperties, linkedServiceName, policy.Value, pythonFile, Optional.ToList(parameters), Optional.ToList(libraries)); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DatabricksSparkPythonActivity.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DatabricksSparkPythonActivity.cs deleted file mode 100644 index 1e152d49..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DatabricksSparkPythonActivity.cs +++ /dev/null @@ -1,86 +0,0 @@ -// - -#nullable disable - -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// DatabricksSparkPython activity. - public partial class DatabricksSparkPythonActivity : ExecutionActivity - { - /// Initializes a new instance of DatabricksSparkPythonActivity. - /// Activity name. - /// The URI of the Python file to be executed. DBFS paths are supported. Type: string (or Expression with resultType string). - /// or is null. - public DatabricksSparkPythonActivity(string name, DataFactoryElement pythonFile) : base(name) - { - Argument.AssertNotNull(name, nameof(name)); - Argument.AssertNotNull(pythonFile, nameof(pythonFile)); - - PythonFile = pythonFile; - Parameters = new ChangeTrackingList(); - Libraries = new ChangeTrackingList>>(); - ActivityType = "DatabricksSparkPython"; - } - - /// Initializes a new instance of DatabricksSparkPythonActivity. - /// Activity name. - /// Type of activity. - /// Activity description. - /// Activity state. This is an optional property and if not provided, the state will be Active by default. - /// 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. - /// Activity depends on condition. - /// Activity user properties. - /// Additional Properties. - /// Linked service reference. - /// Activity policy. - /// The URI of the Python file to be executed. DBFS paths are supported. Type: string (or Expression with resultType string). - /// Command line parameters that will be passed to the Python file. - /// A list of libraries to be installed on the cluster that will execute the job. - internal DatabricksSparkPythonActivity(string name, string activityType, string description, PipelineActivityState? state, ActivityOnInactiveMarkAs? onInactiveMarkAs, IList dependsOn, IList userProperties, IDictionary> additionalProperties, DataFactoryLinkedServiceReference linkedServiceName, PipelineActivityPolicy policy, DataFactoryElement pythonFile, IList parameters, IList>> libraries) : base(name, activityType, description, state, onInactiveMarkAs, dependsOn, userProperties, additionalProperties, linkedServiceName, policy) - { - PythonFile = pythonFile; - Parameters = parameters; - Libraries = libraries; - ActivityType = activityType ?? "DatabricksSparkPython"; - } - - /// The URI of the Python file to be executed. DBFS paths are supported. Type: string (or Expression with resultType string). - public DataFactoryElement PythonFile { get; set; } - /// - /// Command line parameters that will be passed to the Python file. - /// - /// To assign an object to the element of this property use . - /// - /// - /// To assign an already formated json string to this property use . - /// - /// - /// Examples: - /// - /// - /// BinaryData.FromObjectAsJson("foo") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromString("\"foo\"") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromObjectAsJson(new { key = "value" }) - /// Creates a payload of { "key": "value" }. - /// - /// - /// BinaryData.FromString("{\"key\": \"value\"}") - /// Creates a payload of { "key": "value" }. - /// - /// - /// - /// - public IList Parameters { get; } - /// A list of libraries to be installed on the cluster that will execute the job. - public IList>> Libraries { get; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DatasetAvroFormat.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DatasetAvroFormat.Serialization.cs deleted file mode 100644 index 00ff2957..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DatasetAvroFormat.Serialization.cs +++ /dev/null @@ -1,82 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class DatasetAvroFormat : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - writer.WritePropertyName("type"u8); - writer.WriteStringValue(DatasetStorageFormatType); - if (Optional.IsDefined(Serializer)) - { - writer.WritePropertyName("serializer"u8); - JsonSerializer.Serialize(writer, Serializer); - } - if (Optional.IsDefined(Deserializer)) - { - writer.WritePropertyName("deserializer"u8); - JsonSerializer.Serialize(writer, Deserializer); - } - foreach (var item in AdditionalProperties) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.Value.ToString()).RootElement); -#endif - } - writer.WriteEndObject(); - } - - internal static DatasetAvroFormat DeserializeDatasetAvroFormat(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - string type = default; - Optional> serializer = default; - Optional> deserializer = default; - IDictionary> additionalProperties = default; - Dictionary> additionalPropertiesDictionary = new Dictionary>(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("type"u8)) - { - type = property.Value.GetString(); - continue; - } - if (property.NameEquals("serializer"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - serializer = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("deserializer"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - deserializer = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - additionalPropertiesDictionary.Add(property.Name, JsonSerializer.Deserialize>(property.Value.GetRawText())); - } - additionalProperties = additionalPropertiesDictionary; - return new DatasetAvroFormat(type, serializer.Value, deserializer.Value, additionalProperties); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DatasetAvroFormat.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DatasetAvroFormat.cs deleted file mode 100644 index e628d208..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DatasetAvroFormat.cs +++ /dev/null @@ -1,28 +0,0 @@ -// - -#nullable disable - -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// The data stored in Avro format. - public partial class DatasetAvroFormat : DatasetStorageFormat - { - /// Initializes a new instance of DatasetAvroFormat. - public DatasetAvroFormat() - { - DatasetStorageFormatType = "AvroFormat"; - } - - /// Initializes a new instance of DatasetAvroFormat. - /// Type of dataset storage format. - /// Serializer. Type: string (or Expression with resultType string). - /// Deserializer. Type: string (or Expression with resultType string). - /// Additional Properties. - internal DatasetAvroFormat(string datasetStorageFormatType, DataFactoryElement serializer, DataFactoryElement deserializer, IDictionary> additionalProperties) : base(datasetStorageFormatType, serializer, deserializer, additionalProperties) - { - DatasetStorageFormatType = datasetStorageFormatType ?? "AvroFormat"; - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DatasetCompression.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DatasetCompression.Serialization.cs deleted file mode 100644 index 1698e79c..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DatasetCompression.Serialization.cs +++ /dev/null @@ -1,67 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class DatasetCompression : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - writer.WritePropertyName("type"u8); - JsonSerializer.Serialize(writer, DatasetCompressionType); - if (Optional.IsDefined(Level)) - { - writer.WritePropertyName("level"u8); - JsonSerializer.Serialize(writer, Level); - } - foreach (var item in AdditionalProperties) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.Value.ToString()).RootElement); -#endif - } - writer.WriteEndObject(); - } - - internal static DatasetCompression DeserializeDatasetCompression(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - DataFactoryElement type = default; - Optional> level = default; - IDictionary> additionalProperties = default; - Dictionary> additionalPropertiesDictionary = new Dictionary>(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("type"u8)) - { - type = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("level"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - level = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - additionalPropertiesDictionary.Add(property.Name, JsonSerializer.Deserialize>(property.Value.GetRawText())); - } - additionalProperties = additionalPropertiesDictionary; - return new DatasetCompression(type, level.Value, additionalProperties); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DatasetCompression.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DatasetCompression.cs deleted file mode 100644 index 6d5518df..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DatasetCompression.cs +++ /dev/null @@ -1,71 +0,0 @@ -// - -#nullable disable - -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// The compression method used on a dataset. - public partial class DatasetCompression - { - /// Initializes a new instance of DatasetCompression. - /// Type of dataset compression. Type: string (or Expression with resultType string). - /// is null. - public DatasetCompression(DataFactoryElement datasetCompressionType) - { - Argument.AssertNotNull(datasetCompressionType, nameof(datasetCompressionType)); - - DatasetCompressionType = datasetCompressionType; - AdditionalProperties = new ChangeTrackingDictionary>(); - } - - /// Initializes a new instance of DatasetCompression. - /// Type of dataset compression. Type: string (or Expression with resultType string). - /// The dataset compression level. Type: string (or Expression with resultType string). - /// Additional Properties. - internal DatasetCompression(DataFactoryElement datasetCompressionType, DataFactoryElement level, IDictionary> additionalProperties) - { - DatasetCompressionType = datasetCompressionType; - Level = level; - AdditionalProperties = additionalProperties; - } - - /// Type of dataset compression. Type: string (or Expression with resultType string). - public DataFactoryElement DatasetCompressionType { get; set; } - /// The dataset compression level. Type: string (or Expression with resultType string). - public DataFactoryElement Level { get; set; } - /// - /// Additional Properties - /// - /// To assign an object to the value of this property use . - /// - /// - /// To assign an already formated json string to this property use . - /// - /// - /// Examples: - /// - /// - /// BinaryData.FromObjectAsJson("foo") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromString("\"foo\"") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromObjectAsJson(new { key = "value" }) - /// Creates a payload of { "key": "value" }. - /// - /// - /// BinaryData.FromString("{\"key\": \"value\"}") - /// Creates a payload of { "key": "value" }. - /// - /// - /// - /// - public IDictionary> AdditionalProperties { get; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DatasetDataElement.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DatasetDataElement.Serialization.cs deleted file mode 100644 index f2ef3249..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DatasetDataElement.Serialization.cs +++ /dev/null @@ -1,76 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using System.Text.Json.Serialization; -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - [JsonConverter(typeof(DatasetDataElementConverter))] - public partial class DatasetDataElement : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - if (Optional.IsDefined(ColumnName)) - { - writer.WritePropertyName("name"u8); - JsonSerializer.Serialize(writer, ColumnName); - } - if (Optional.IsDefined(ColumnType)) - { - writer.WritePropertyName("type"u8); - JsonSerializer.Serialize(writer, ColumnType); - } - writer.WriteEndObject(); - } - - internal static DatasetDataElement DeserializeDatasetDataElement(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - Optional> name = default; - Optional> type = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("name"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - name = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("type"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - type = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - } - return new DatasetDataElement(name.Value, type.Value); - } - - internal partial class DatasetDataElementConverter : JsonConverter - { - public override void Write(Utf8JsonWriter writer, DatasetDataElement model, JsonSerializerOptions options) - { - writer.WriteObjectValue(model); - } - public override DatasetDataElement Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) - { - using var document = JsonDocument.ParseValue(ref reader); - return DeserializeDatasetDataElement(document.RootElement); - } - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DatasetDataElement.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DatasetDataElement.cs deleted file mode 100644 index e6f7c846..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DatasetDataElement.cs +++ /dev/null @@ -1,31 +0,0 @@ -// - -#nullable disable - -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// Columns that define the structure of the dataset. - public partial class DatasetDataElement - { - /// Initializes a new instance of DatasetDataElement. - public DatasetDataElement() - { - } - - /// Initializes a new instance of DatasetDataElement. - /// Name of the column. Type: string (or Expression with resultType string). - /// Type of the column. Type: string (or Expression with resultType string). - internal DatasetDataElement(DataFactoryElement columnName, DataFactoryElement columnType) - { - ColumnName = columnName; - ColumnType = columnType; - } - - /// Name of the column. Type: string (or Expression with resultType string). - public DataFactoryElement ColumnName { get; set; } - /// Type of the column. Type: string (or Expression with resultType string). - public DataFactoryElement ColumnType { get; set; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DatasetFolder.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DatasetFolder.Serialization.cs deleted file mode 100644 index 3dcb05c9..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DatasetFolder.Serialization.cs +++ /dev/null @@ -1,41 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; - -namespace AzureDataFactory.TestingFramework.Models -{ - internal partial class DatasetFolder : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - if (Optional.IsDefined(Name)) - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - writer.WriteEndObject(); - } - - internal static DatasetFolder DeserializeDatasetFolder(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - Optional name = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("name"u8)) - { - name = property.Value.GetString(); - continue; - } - } - return new DatasetFolder(name.Value); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DatasetFolder.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DatasetFolder.cs deleted file mode 100644 index c594289f..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DatasetFolder.cs +++ /dev/null @@ -1,25 +0,0 @@ -// - -#nullable disable - -namespace AzureDataFactory.TestingFramework.Models -{ - /// The folder that this Dataset is in. If not specified, Dataset will appear at the root level. - internal partial class DatasetFolder - { - /// Initializes a new instance of DatasetFolder. - public DatasetFolder() - { - } - - /// Initializes a new instance of DatasetFolder. - /// The name of the folder that this Dataset is in. - internal DatasetFolder(string name) - { - Name = name; - } - - /// The name of the folder that this Dataset is in. - public string Name { get; set; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DatasetJsonFormat.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DatasetJsonFormat.Serialization.cs deleted file mode 100644 index dc879609..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DatasetJsonFormat.Serialization.cs +++ /dev/null @@ -1,165 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class DatasetJsonFormat : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - if (Optional.IsDefined(FilePattern)) - { - writer.WritePropertyName("filePattern"u8); -#if NET6_0_OR_GREATER - writer.WriteRawValue(FilePattern); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(FilePattern.ToString()).RootElement); -#endif - } - if (Optional.IsDefined(NestingSeparator)) - { - writer.WritePropertyName("nestingSeparator"u8); - JsonSerializer.Serialize(writer, NestingSeparator); - } - if (Optional.IsDefined(EncodingName)) - { - writer.WritePropertyName("encodingName"u8); - JsonSerializer.Serialize(writer, EncodingName); - } - if (Optional.IsDefined(JsonNodeReference)) - { - writer.WritePropertyName("jsonNodeReference"u8); - JsonSerializer.Serialize(writer, JsonNodeReference); - } - if (Optional.IsDefined(JsonPathDefinition)) - { - writer.WritePropertyName("jsonPathDefinition"u8); -#if NET6_0_OR_GREATER - writer.WriteRawValue(JsonPathDefinition); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(JsonPathDefinition.ToString()).RootElement); -#endif - } - writer.WritePropertyName("type"u8); - writer.WriteStringValue(DatasetStorageFormatType); - if (Optional.IsDefined(Serializer)) - { - writer.WritePropertyName("serializer"u8); - JsonSerializer.Serialize(writer, Serializer); - } - if (Optional.IsDefined(Deserializer)) - { - writer.WritePropertyName("deserializer"u8); - JsonSerializer.Serialize(writer, Deserializer); - } - foreach (var item in AdditionalProperties) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.Value.ToString()).RootElement); -#endif - } - writer.WriteEndObject(); - } - - internal static DatasetJsonFormat DeserializeDatasetJsonFormat(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - Optional filePattern = default; - Optional> nestingSeparator = default; - Optional> encodingName = default; - Optional> jsonNodeReference = default; - Optional jsonPathDefinition = default; - string type = default; - Optional> serializer = default; - Optional> deserializer = default; - IDictionary> additionalProperties = default; - Dictionary> additionalPropertiesDictionary = new Dictionary>(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("filePattern"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - filePattern = BinaryData.FromString(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("nestingSeparator"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - nestingSeparator = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("encodingName"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - encodingName = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("jsonNodeReference"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - jsonNodeReference = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("jsonPathDefinition"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - jsonPathDefinition = BinaryData.FromString(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("type"u8)) - { - type = property.Value.GetString(); - continue; - } - if (property.NameEquals("serializer"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - serializer = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("deserializer"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - deserializer = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - additionalPropertiesDictionary.Add(property.Name, JsonSerializer.Deserialize>(property.Value.GetRawText())); - } - additionalProperties = additionalPropertiesDictionary; - return new DatasetJsonFormat(type, serializer.Value, deserializer.Value, additionalProperties, filePattern.Value, nestingSeparator.Value, encodingName.Value, jsonNodeReference.Value, jsonPathDefinition.Value); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DatasetJsonFormat.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DatasetJsonFormat.cs deleted file mode 100644 index 98a8f62c..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DatasetJsonFormat.cs +++ /dev/null @@ -1,107 +0,0 @@ -// - -#nullable disable - -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// The data stored in JSON format. - public partial class DatasetJsonFormat : DatasetStorageFormat - { - /// Initializes a new instance of DatasetJsonFormat. - public DatasetJsonFormat() - { - DatasetStorageFormatType = "JsonFormat"; - } - - /// Initializes a new instance of DatasetJsonFormat. - /// Type of dataset storage format. - /// Serializer. Type: string (or Expression with resultType string). - /// Deserializer. Type: string (or Expression with resultType string). - /// Additional Properties. - /// File pattern of JSON. To be more specific, the way of separating a collection of JSON objects. The default value is 'setOfObjects'. It is case-sensitive. - /// The character used to separate nesting levels. Default value is '.' (dot). Type: string (or Expression with resultType string). - /// The code page name of the preferred encoding. If not provided, the default value is 'utf-8', unless the byte order mark (BOM) denotes another Unicode encoding. The full list of supported values can be found in the 'Name' column of the table of encodings in the following reference: https://go.microsoft.com/fwlink/?linkid=861078. Type: string (or Expression with resultType string). - /// The JSONPath of the JSON array element to be flattened. Example: "$.ArrayPath". Type: string (or Expression with resultType string). - /// The JSONPath definition for each column mapping with a customized column name to extract data from JSON file. For fields under root object, start with "$"; for fields inside the array chosen by jsonNodeReference property, start from the array element. Example: {"Column1": "$.Column1Path", "Column2": "Column2PathInArray"}. Type: object (or Expression with resultType object). - internal DatasetJsonFormat(string datasetStorageFormatType, DataFactoryElement serializer, DataFactoryElement deserializer, IDictionary> additionalProperties, BinaryData filePattern, DataFactoryElement nestingSeparator, DataFactoryElement encodingName, DataFactoryElement jsonNodeReference, BinaryData jsonPathDefinition) : base(datasetStorageFormatType, serializer, deserializer, additionalProperties) - { - FilePattern = filePattern; - NestingSeparator = nestingSeparator; - EncodingName = encodingName; - JsonNodeReference = jsonNodeReference; - JsonPathDefinition = jsonPathDefinition; - DatasetStorageFormatType = datasetStorageFormatType ?? "JsonFormat"; - } - - /// - /// File pattern of JSON. To be more specific, the way of separating a collection of JSON objects. The default value is 'setOfObjects'. It is case-sensitive. - /// - /// To assign an object to this property use . - /// - /// - /// To assign an already formated json string to this property use . - /// - /// - /// Examples: - /// - /// - /// BinaryData.FromObjectAsJson("foo") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromString("\"foo\"") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromObjectAsJson(new { key = "value" }) - /// Creates a payload of { "key": "value" }. - /// - /// - /// BinaryData.FromString("{\"key\": \"value\"}") - /// Creates a payload of { "key": "value" }. - /// - /// - /// - /// - public BinaryData FilePattern { get; set; } - /// The character used to separate nesting levels. Default value is '.' (dot). Type: string (or Expression with resultType string). - public DataFactoryElement NestingSeparator { get; set; } - /// The code page name of the preferred encoding. If not provided, the default value is 'utf-8', unless the byte order mark (BOM) denotes another Unicode encoding. The full list of supported values can be found in the 'Name' column of the table of encodings in the following reference: https://go.microsoft.com/fwlink/?linkid=861078. Type: string (or Expression with resultType string). - public DataFactoryElement EncodingName { get; set; } - /// The JSONPath of the JSON array element to be flattened. Example: "$.ArrayPath". Type: string (or Expression with resultType string). - public DataFactoryElement JsonNodeReference { get; set; } - /// - /// The JSONPath definition for each column mapping with a customized column name to extract data from JSON file. For fields under root object, start with "$"; for fields inside the array chosen by jsonNodeReference property, start from the array element. Example: {"Column1": "$.Column1Path", "Column2": "Column2PathInArray"}. Type: object (or Expression with resultType object). - /// - /// To assign an object to this property use . - /// - /// - /// To assign an already formated json string to this property use . - /// - /// - /// Examples: - /// - /// - /// BinaryData.FromObjectAsJson("foo") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromString("\"foo\"") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromObjectAsJson(new { key = "value" }) - /// Creates a payload of { "key": "value" }. - /// - /// - /// BinaryData.FromString("{\"key\": \"value\"}") - /// Creates a payload of { "key": "value" }. - /// - /// - /// - /// - public BinaryData JsonPathDefinition { get; set; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DatasetLocation.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DatasetLocation.Serialization.cs deleted file mode 100644 index 6ccb4b4b..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DatasetLocation.Serialization.cs +++ /dev/null @@ -1,67 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class DatasetLocation : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - writer.WritePropertyName("type"u8); - writer.WriteStringValue(DatasetLocationType); - if (Optional.IsDefined(FolderPath)) - { - writer.WritePropertyName("folderPath"u8); - JsonSerializer.Serialize(writer, FolderPath); - } - if (Optional.IsDefined(FileName)) - { - writer.WritePropertyName("fileName"u8); - JsonSerializer.Serialize(writer, FileName); - } - foreach (var item in AdditionalProperties) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.Value.ToString()).RootElement); -#endif - } - writer.WriteEndObject(); - } - - internal static DatasetLocation DeserializeDatasetLocation(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - if (element.TryGetProperty("type", out JsonElement discriminator)) - { - switch (discriminator.GetString()) - { - case "AmazonS3CompatibleLocation": return AmazonS3CompatibleLocation.DeserializeAmazonS3CompatibleLocation(element); - case "AmazonS3Location": return AmazonS3Location.DeserializeAmazonS3Location(element); - case "AzureBlobFSLocation": return AzureBlobFSLocation.DeserializeAzureBlobFSLocation(element); - case "AzureBlobStorageLocation": return AzureBlobStorageLocation.DeserializeAzureBlobStorageLocation(element); - case "AzureDataLakeStoreLocation": return AzureDataLakeStoreLocation.DeserializeAzureDataLakeStoreLocation(element); - case "AzureFileStorageLocation": return AzureFileStorageLocation.DeserializeAzureFileStorageLocation(element); - case "FileServerLocation": return FileServerLocation.DeserializeFileServerLocation(element); - case "FtpServerLocation": return FtpServerLocation.DeserializeFtpServerLocation(element); - case "GoogleCloudStorageLocation": return GoogleCloudStorageLocation.DeserializeGoogleCloudStorageLocation(element); - case "HdfsLocation": return HdfsLocation.DeserializeHdfsLocation(element); - case "HttpServerLocation": return HttpServerLocation.DeserializeHttpServerLocation(element); - case "OracleCloudStorageLocation": return OracleCloudStorageLocation.DeserializeOracleCloudStorageLocation(element); - case "SftpLocation": return SftpLocation.DeserializeSftpLocation(element); - } - } - return UnknownDatasetLocation.DeserializeUnknownDatasetLocation(element); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DatasetLocation.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DatasetLocation.cs deleted file mode 100644 index 49fbd94d..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DatasetLocation.cs +++ /dev/null @@ -1,74 +0,0 @@ -// - -#nullable disable - -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// - /// Dataset location. - /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. - /// The available derived classes include , , , , , , , , , , , and . - /// - public partial class DatasetLocation - { - /// Initializes a new instance of DatasetLocation. - public DatasetLocation() - { - AdditionalProperties = new ChangeTrackingDictionary>(); - } - - /// Initializes a new instance of DatasetLocation. - /// Type of dataset storage location. - /// Specify the folder path of dataset. Type: string (or Expression with resultType string). - /// Specify the file name of dataset. Type: string (or Expression with resultType string). - /// Additional Properties. - internal DatasetLocation(string datasetLocationType, DataFactoryElement folderPath, DataFactoryElement fileName, IDictionary> additionalProperties) - { - DatasetLocationType = datasetLocationType; - FolderPath = folderPath; - FileName = fileName; - AdditionalProperties = additionalProperties; - } - - /// Type of dataset storage location. - internal string DatasetLocationType { get; set; } - /// Specify the folder path of dataset. Type: string (or Expression with resultType string). - public DataFactoryElement FolderPath { get; set; } - /// Specify the file name of dataset. Type: string (or Expression with resultType string). - public DataFactoryElement FileName { get; set; } - /// - /// Additional Properties - /// - /// To assign an object to the value of this property use . - /// - /// - /// To assign an already formated json string to this property use . - /// - /// - /// Examples: - /// - /// - /// BinaryData.FromObjectAsJson("foo") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromString("\"foo\"") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromObjectAsJson(new { key = "value" }) - /// Creates a payload of { "key": "value" }. - /// - /// - /// BinaryData.FromString("{\"key\": \"value\"}") - /// Creates a payload of { "key": "value" }. - /// - /// - /// - /// - public IDictionary> AdditionalProperties { get; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DatasetOrcFormat.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DatasetOrcFormat.Serialization.cs deleted file mode 100644 index 3625fcd8..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DatasetOrcFormat.Serialization.cs +++ /dev/null @@ -1,82 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class DatasetOrcFormat : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - writer.WritePropertyName("type"u8); - writer.WriteStringValue(DatasetStorageFormatType); - if (Optional.IsDefined(Serializer)) - { - writer.WritePropertyName("serializer"u8); - JsonSerializer.Serialize(writer, Serializer); - } - if (Optional.IsDefined(Deserializer)) - { - writer.WritePropertyName("deserializer"u8); - JsonSerializer.Serialize(writer, Deserializer); - } - foreach (var item in AdditionalProperties) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.Value.ToString()).RootElement); -#endif - } - writer.WriteEndObject(); - } - - internal static DatasetOrcFormat DeserializeDatasetOrcFormat(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - string type = default; - Optional> serializer = default; - Optional> deserializer = default; - IDictionary> additionalProperties = default; - Dictionary> additionalPropertiesDictionary = new Dictionary>(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("type"u8)) - { - type = property.Value.GetString(); - continue; - } - if (property.NameEquals("serializer"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - serializer = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("deserializer"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - deserializer = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - additionalPropertiesDictionary.Add(property.Name, JsonSerializer.Deserialize>(property.Value.GetRawText())); - } - additionalProperties = additionalPropertiesDictionary; - return new DatasetOrcFormat(type, serializer.Value, deserializer.Value, additionalProperties); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DatasetOrcFormat.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DatasetOrcFormat.cs deleted file mode 100644 index d1bbee1c..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DatasetOrcFormat.cs +++ /dev/null @@ -1,28 +0,0 @@ -// - -#nullable disable - -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// The data stored in Optimized Row Columnar (ORC) format. - public partial class DatasetOrcFormat : DatasetStorageFormat - { - /// Initializes a new instance of DatasetOrcFormat. - public DatasetOrcFormat() - { - DatasetStorageFormatType = "OrcFormat"; - } - - /// Initializes a new instance of DatasetOrcFormat. - /// Type of dataset storage format. - /// Serializer. Type: string (or Expression with resultType string). - /// Deserializer. Type: string (or Expression with resultType string). - /// Additional Properties. - internal DatasetOrcFormat(string datasetStorageFormatType, DataFactoryElement serializer, DataFactoryElement deserializer, IDictionary> additionalProperties) : base(datasetStorageFormatType, serializer, deserializer, additionalProperties) - { - DatasetStorageFormatType = datasetStorageFormatType ?? "OrcFormat"; - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DatasetParquetFormat.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DatasetParquetFormat.Serialization.cs deleted file mode 100644 index f2f2281a..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DatasetParquetFormat.Serialization.cs +++ /dev/null @@ -1,82 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class DatasetParquetFormat : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - writer.WritePropertyName("type"u8); - writer.WriteStringValue(DatasetStorageFormatType); - if (Optional.IsDefined(Serializer)) - { - writer.WritePropertyName("serializer"u8); - JsonSerializer.Serialize(writer, Serializer); - } - if (Optional.IsDefined(Deserializer)) - { - writer.WritePropertyName("deserializer"u8); - JsonSerializer.Serialize(writer, Deserializer); - } - foreach (var item in AdditionalProperties) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.Value.ToString()).RootElement); -#endif - } - writer.WriteEndObject(); - } - - internal static DatasetParquetFormat DeserializeDatasetParquetFormat(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - string type = default; - Optional> serializer = default; - Optional> deserializer = default; - IDictionary> additionalProperties = default; - Dictionary> additionalPropertiesDictionary = new Dictionary>(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("type"u8)) - { - type = property.Value.GetString(); - continue; - } - if (property.NameEquals("serializer"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - serializer = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("deserializer"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - deserializer = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - additionalPropertiesDictionary.Add(property.Name, JsonSerializer.Deserialize>(property.Value.GetRawText())); - } - additionalProperties = additionalPropertiesDictionary; - return new DatasetParquetFormat(type, serializer.Value, deserializer.Value, additionalProperties); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DatasetParquetFormat.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DatasetParquetFormat.cs deleted file mode 100644 index 3fc14964..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DatasetParquetFormat.cs +++ /dev/null @@ -1,28 +0,0 @@ -// - -#nullable disable - -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// The data stored in Parquet format. - public partial class DatasetParquetFormat : DatasetStorageFormat - { - /// Initializes a new instance of DatasetParquetFormat. - public DatasetParquetFormat() - { - DatasetStorageFormatType = "ParquetFormat"; - } - - /// Initializes a new instance of DatasetParquetFormat. - /// Type of dataset storage format. - /// Serializer. Type: string (or Expression with resultType string). - /// Deserializer. Type: string (or Expression with resultType string). - /// Additional Properties. - internal DatasetParquetFormat(string datasetStorageFormatType, DataFactoryElement serializer, DataFactoryElement deserializer, IDictionary> additionalProperties) : base(datasetStorageFormatType, serializer, deserializer, additionalProperties) - { - DatasetStorageFormatType = datasetStorageFormatType ?? "ParquetFormat"; - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DatasetReference.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DatasetReference.Serialization.cs deleted file mode 100644 index c75141a1..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DatasetReference.Serialization.cs +++ /dev/null @@ -1,89 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class DatasetReference : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ReferenceType.ToString()); - writer.WritePropertyName("referenceName"u8); - writer.WriteStringValue(ReferenceName); - if (Optional.IsCollectionDefined(Parameters)) - { - writer.WritePropertyName("parameters"u8); - writer.WriteStartObject(); - foreach (var item in Parameters) - { - writer.WritePropertyName(item.Key); - if (item.Value == null) - { - writer.WriteNullValue(); - continue; - } -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.Value.ToString()).RootElement); -#endif - } - writer.WriteEndObject(); - } - writer.WriteEndObject(); - } - - internal static DatasetReference DeserializeDatasetReference(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - DatasetReferenceType type = default; - string referenceName = default; - Optional>> parameters = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("type"u8)) - { - type = new DatasetReferenceType(property.Value.GetString()); - continue; - } - if (property.NameEquals("referenceName"u8)) - { - referenceName = property.Value.GetString(); - continue; - } - if (property.NameEquals("parameters"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - Dictionary> dictionary = new Dictionary>(); - foreach (var property0 in property.Value.EnumerateObject()) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - dictionary.Add(property0.Name, null); - } - else - { - dictionary.Add(property0.Name, JsonSerializer.Deserialize>(property0.Value.GetRawText())); - } - } - parameters = dictionary; - continue; - } - } - return new DatasetReference(type, referenceName, Optional.ToDictionary(parameters)); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DatasetReference.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DatasetReference.cs deleted file mode 100644 index af2ffa16..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DatasetReference.cs +++ /dev/null @@ -1,73 +0,0 @@ -// - -#nullable disable - -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// Dataset reference type. - public partial class DatasetReference - { - /// Initializes a new instance of DatasetReference. - /// Dataset reference type. - /// Reference dataset name. - /// is null. - public DatasetReference(DatasetReferenceType referenceType, string referenceName) - { - Argument.AssertNotNull(referenceName, nameof(referenceName)); - - ReferenceType = referenceType; - ReferenceName = referenceName; - Parameters = new ChangeTrackingDictionary>(); - } - - /// Initializes a new instance of DatasetReference. - /// Dataset reference type. - /// Reference dataset name. - /// Arguments for dataset. - internal DatasetReference(DatasetReferenceType referenceType, string referenceName, IDictionary> parameters) - { - ReferenceType = referenceType; - ReferenceName = referenceName; - Parameters = parameters; - } - - /// Dataset reference type. - public DatasetReferenceType ReferenceType { get; set; } - /// Reference dataset name. - public string ReferenceName { get; set; } - /// - /// Arguments for dataset. - /// - /// To assign an object to the value of this property use . - /// - /// - /// To assign an already formated json string to this property use . - /// - /// - /// Examples: - /// - /// - /// BinaryData.FromObjectAsJson("foo") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromString("\"foo\"") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromObjectAsJson(new { key = "value" }) - /// Creates a payload of { "key": "value" }. - /// - /// - /// BinaryData.FromString("{\"key\": \"value\"}") - /// Creates a payload of { "key": "value" }. - /// - /// - /// - /// - public IDictionary> Parameters { get; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DatasetReferenceType.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DatasetReferenceType.cs deleted file mode 100644 index 4d39e8ed..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DatasetReferenceType.cs +++ /dev/null @@ -1,44 +0,0 @@ -// - -#nullable disable - -using System.ComponentModel; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// Dataset reference type. - public readonly partial struct DatasetReferenceType : IEquatable - { - private readonly string _value; - - /// Initializes a new instance of . - /// is null. - public DatasetReferenceType(string value) - { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } - - private const string DatasetReferenceValue = "DatasetReference"; - - /// DatasetReference. - public static DatasetReferenceType DatasetReference { get; } = new DatasetReferenceType(DatasetReferenceValue); - /// Determines if two values are the same. - public static bool operator ==(DatasetReferenceType left, DatasetReferenceType right) => left.Equals(right); - /// Determines if two values are not the same. - public static bool operator !=(DatasetReferenceType left, DatasetReferenceType right) => !left.Equals(right); - /// Converts a string to a . - public static implicit operator DatasetReferenceType(string value) => new DatasetReferenceType(value); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override bool Equals(object obj) => obj is DatasetReferenceType other && Equals(other); - /// - public bool Equals(DatasetReferenceType other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override int GetHashCode() => _value?.GetHashCode() ?? 0; - /// - public override string ToString() => _value; - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DatasetSchemaDataElement.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DatasetSchemaDataElement.Serialization.cs deleted file mode 100644 index 2efcf475..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DatasetSchemaDataElement.Serialization.cs +++ /dev/null @@ -1,89 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using System.Text.Json.Serialization; -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - [JsonConverter(typeof(DatasetSchemaDataElementConverter))] - public partial class DatasetSchemaDataElement : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - if (Optional.IsDefined(SchemaColumnName)) - { - writer.WritePropertyName("name"u8); - JsonSerializer.Serialize(writer, SchemaColumnName); - } - if (Optional.IsDefined(SchemaColumnType)) - { - writer.WritePropertyName("type"u8); - JsonSerializer.Serialize(writer, SchemaColumnType); - } - foreach (var item in AdditionalProperties) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.Value.ToString()).RootElement); -#endif - } - writer.WriteEndObject(); - } - - internal static DatasetSchemaDataElement DeserializeDatasetSchemaDataElement(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - Optional> name = default; - Optional> type = default; - IDictionary> additionalProperties = default; - Dictionary> additionalPropertiesDictionary = new Dictionary>(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("name"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - name = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("type"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - type = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - additionalPropertiesDictionary.Add(property.Name, JsonSerializer.Deserialize>(property.Value.GetRawText())); - } - additionalProperties = additionalPropertiesDictionary; - return new DatasetSchemaDataElement(name.Value, type.Value, additionalProperties); - } - - internal partial class DatasetSchemaDataElementConverter : JsonConverter - { - public override void Write(Utf8JsonWriter writer, DatasetSchemaDataElement model, JsonSerializerOptions options) - { - writer.WriteObjectValue(model); - } - public override DatasetSchemaDataElement Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) - { - using var document = JsonDocument.ParseValue(ref reader); - return DeserializeDatasetSchemaDataElement(document.RootElement); - } - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DatasetSchemaDataElement.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DatasetSchemaDataElement.cs deleted file mode 100644 index 2045ec7d..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DatasetSchemaDataElement.cs +++ /dev/null @@ -1,66 +0,0 @@ -// - -#nullable disable - -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// Columns that define the physical type schema of the dataset. - public partial class DatasetSchemaDataElement - { - /// Initializes a new instance of DatasetSchemaDataElement. - public DatasetSchemaDataElement() - { - AdditionalProperties = new ChangeTrackingDictionary>(); - } - - /// Initializes a new instance of DatasetSchemaDataElement. - /// Name of the schema column. Type: string (or Expression with resultType string). - /// Type of the schema column. Type: string (or Expression with resultType string). - /// Additional Properties. - internal DatasetSchemaDataElement(DataFactoryElement schemaColumnName, DataFactoryElement schemaColumnType, IDictionary> additionalProperties) - { - SchemaColumnName = schemaColumnName; - SchemaColumnType = schemaColumnType; - AdditionalProperties = additionalProperties; - } - - /// Name of the schema column. Type: string (or Expression with resultType string). - public DataFactoryElement SchemaColumnName { get; set; } - /// Type of the schema column. Type: string (or Expression with resultType string). - public DataFactoryElement SchemaColumnType { get; set; } - /// - /// Additional Properties - /// - /// To assign an object to the value of this property use . - /// - /// - /// To assign an already formated json string to this property use . - /// - /// - /// Examples: - /// - /// - /// BinaryData.FromObjectAsJson("foo") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromString("\"foo\"") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromObjectAsJson(new { key = "value" }) - /// Creates a payload of { "key": "value" }. - /// - /// - /// BinaryData.FromString("{\"key\": \"value\"}") - /// Creates a payload of { "key": "value" }. - /// - /// - /// - /// - public IDictionary> AdditionalProperties { get; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DatasetStorageFormat.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DatasetStorageFormat.Serialization.cs deleted file mode 100644 index b1a959d8..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DatasetStorageFormat.Serialization.cs +++ /dev/null @@ -1,59 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class DatasetStorageFormat : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - writer.WritePropertyName("type"u8); - writer.WriteStringValue(DatasetStorageFormatType); - if (Optional.IsDefined(Serializer)) - { - writer.WritePropertyName("serializer"u8); - JsonSerializer.Serialize(writer, Serializer); - } - if (Optional.IsDefined(Deserializer)) - { - writer.WritePropertyName("deserializer"u8); - JsonSerializer.Serialize(writer, Deserializer); - } - foreach (var item in AdditionalProperties) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.Value.ToString()).RootElement); -#endif - } - writer.WriteEndObject(); - } - - internal static DatasetStorageFormat DeserializeDatasetStorageFormat(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - if (element.TryGetProperty("type", out JsonElement discriminator)) - { - switch (discriminator.GetString()) - { - case "AvroFormat": return DatasetAvroFormat.DeserializeDatasetAvroFormat(element); - case "JsonFormat": return DatasetJsonFormat.DeserializeDatasetJsonFormat(element); - case "OrcFormat": return DatasetOrcFormat.DeserializeDatasetOrcFormat(element); - case "ParquetFormat": return DatasetParquetFormat.DeserializeDatasetParquetFormat(element); - case "TextFormat": return DatasetTextFormat.DeserializeDatasetTextFormat(element); - } - } - return UnknownDatasetStorageFormat.DeserializeUnknownDatasetStorageFormat(element); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DatasetStorageFormat.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DatasetStorageFormat.cs deleted file mode 100644 index f05aae90..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DatasetStorageFormat.cs +++ /dev/null @@ -1,74 +0,0 @@ -// - -#nullable disable - -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// - /// The format definition of a storage. - /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. - /// The available derived classes include , , , and . - /// - public partial class DatasetStorageFormat - { - /// Initializes a new instance of DatasetStorageFormat. - public DatasetStorageFormat() - { - AdditionalProperties = new ChangeTrackingDictionary>(); - } - - /// Initializes a new instance of DatasetStorageFormat. - /// Type of dataset storage format. - /// Serializer. Type: string (or Expression with resultType string). - /// Deserializer. Type: string (or Expression with resultType string). - /// Additional Properties. - internal DatasetStorageFormat(string datasetStorageFormatType, DataFactoryElement serializer, DataFactoryElement deserializer, IDictionary> additionalProperties) - { - DatasetStorageFormatType = datasetStorageFormatType; - Serializer = serializer; - Deserializer = deserializer; - AdditionalProperties = additionalProperties; - } - - /// Type of dataset storage format. - internal string DatasetStorageFormatType { get; set; } - /// Serializer. Type: string (or Expression with resultType string). - public DataFactoryElement Serializer { get; set; } - /// Deserializer. Type: string (or Expression with resultType string). - public DataFactoryElement Deserializer { get; set; } - /// - /// Additional Properties - /// - /// To assign an object to the value of this property use . - /// - /// - /// To assign an already formated json string to this property use . - /// - /// - /// Examples: - /// - /// - /// BinaryData.FromObjectAsJson("foo") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromString("\"foo\"") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromObjectAsJson(new { key = "value" }) - /// Creates a payload of { "key": "value" }. - /// - /// - /// BinaryData.FromString("{\"key\": \"value\"}") - /// Creates a payload of { "key": "value" }. - /// - /// - /// - /// - public IDictionary> AdditionalProperties { get; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DatasetTextFormat.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DatasetTextFormat.Serialization.cs deleted file mode 100644 index e2df0aff..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DatasetTextFormat.Serialization.cs +++ /dev/null @@ -1,217 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class DatasetTextFormat : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - if (Optional.IsDefined(ColumnDelimiter)) - { - writer.WritePropertyName("columnDelimiter"u8); - JsonSerializer.Serialize(writer, ColumnDelimiter); - } - if (Optional.IsDefined(RowDelimiter)) - { - writer.WritePropertyName("rowDelimiter"u8); - JsonSerializer.Serialize(writer, RowDelimiter); - } - if (Optional.IsDefined(EscapeChar)) - { - writer.WritePropertyName("escapeChar"u8); - JsonSerializer.Serialize(writer, EscapeChar); - } - if (Optional.IsDefined(QuoteChar)) - { - writer.WritePropertyName("quoteChar"u8); - JsonSerializer.Serialize(writer, QuoteChar); - } - if (Optional.IsDefined(NullValue)) - { - writer.WritePropertyName("nullValue"u8); - JsonSerializer.Serialize(writer, NullValue); - } - if (Optional.IsDefined(EncodingName)) - { - writer.WritePropertyName("encodingName"u8); - JsonSerializer.Serialize(writer, EncodingName); - } - if (Optional.IsDefined(TreatEmptyAsNull)) - { - writer.WritePropertyName("treatEmptyAsNull"u8); - JsonSerializer.Serialize(writer, TreatEmptyAsNull); - } - if (Optional.IsDefined(SkipLineCount)) - { - writer.WritePropertyName("skipLineCount"u8); - JsonSerializer.Serialize(writer, SkipLineCount); - } - if (Optional.IsDefined(FirstRowAsHeader)) - { - writer.WritePropertyName("firstRowAsHeader"u8); - JsonSerializer.Serialize(writer, FirstRowAsHeader); - } - writer.WritePropertyName("type"u8); - writer.WriteStringValue(DatasetStorageFormatType); - if (Optional.IsDefined(Serializer)) - { - writer.WritePropertyName("serializer"u8); - JsonSerializer.Serialize(writer, Serializer); - } - if (Optional.IsDefined(Deserializer)) - { - writer.WritePropertyName("deserializer"u8); - JsonSerializer.Serialize(writer, Deserializer); - } - foreach (var item in AdditionalProperties) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.Value.ToString()).RootElement); -#endif - } - writer.WriteEndObject(); - } - - internal static DatasetTextFormat DeserializeDatasetTextFormat(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - Optional> columnDelimiter = default; - Optional> rowDelimiter = default; - Optional> escapeChar = default; - Optional> quoteChar = default; - Optional> nullValue = default; - Optional> encodingName = default; - Optional> treatEmptyAsNull = default; - Optional> skipLineCount = default; - Optional> firstRowAsHeader = default; - string type = default; - Optional> serializer = default; - Optional> deserializer = default; - IDictionary> additionalProperties = default; - Dictionary> additionalPropertiesDictionary = new Dictionary>(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("columnDelimiter"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - columnDelimiter = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("rowDelimiter"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - rowDelimiter = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("escapeChar"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - escapeChar = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("quoteChar"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - quoteChar = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("nullValue"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - nullValue = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("encodingName"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - encodingName = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("treatEmptyAsNull"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - treatEmptyAsNull = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("skipLineCount"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - skipLineCount = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("firstRowAsHeader"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - firstRowAsHeader = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("type"u8)) - { - type = property.Value.GetString(); - continue; - } - if (property.NameEquals("serializer"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - serializer = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("deserializer"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - deserializer = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - additionalPropertiesDictionary.Add(property.Name, JsonSerializer.Deserialize>(property.Value.GetRawText())); - } - additionalProperties = additionalPropertiesDictionary; - return new DatasetTextFormat(type, serializer.Value, deserializer.Value, additionalProperties, columnDelimiter.Value, rowDelimiter.Value, escapeChar.Value, quoteChar.Value, nullValue.Value, encodingName.Value, treatEmptyAsNull.Value, skipLineCount.Value, firstRowAsHeader.Value); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DatasetTextFormat.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DatasetTextFormat.cs deleted file mode 100644 index 6f2f1ec3..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DatasetTextFormat.cs +++ /dev/null @@ -1,65 +0,0 @@ -// - -#nullable disable - -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// The data stored in text format. - public partial class DatasetTextFormat : DatasetStorageFormat - { - /// Initializes a new instance of DatasetTextFormat. - public DatasetTextFormat() - { - DatasetStorageFormatType = "TextFormat"; - } - - /// Initializes a new instance of DatasetTextFormat. - /// Type of dataset storage format. - /// Serializer. Type: string (or Expression with resultType string). - /// Deserializer. Type: string (or Expression with resultType string). - /// Additional Properties. - /// The column delimiter. Type: string (or Expression with resultType string). - /// The row delimiter. Type: string (or Expression with resultType string). - /// The escape character. Type: string (or Expression with resultType string). - /// The quote character. Type: string (or Expression with resultType string). - /// The null value string. Type: string (or Expression with resultType string). - /// The code page name of the preferred encoding. If miss, the default value is ΓÇ£utf-8ΓÇ¥, unless BOM denotes another Unicode encoding. Refer to the ΓÇ£NameΓÇ¥ column of the table in the following link to set supported values: https://msdn.microsoft.com/library/system.text.encoding.aspx. Type: string (or Expression with resultType string). - /// Treat empty column values in the text file as null. The default value is true. Type: boolean (or Expression with resultType boolean). - /// The number of lines/rows to be skipped when parsing text files. The default value is 0. Type: integer (or Expression with resultType integer). - /// When used as input, treat the first row of data as headers. When used as output,write the headers into the output as the first row of data. The default value is false. Type: boolean (or Expression with resultType boolean). - internal DatasetTextFormat(string datasetStorageFormatType, DataFactoryElement serializer, DataFactoryElement deserializer, IDictionary> additionalProperties, DataFactoryElement columnDelimiter, DataFactoryElement rowDelimiter, DataFactoryElement escapeChar, DataFactoryElement quoteChar, DataFactoryElement nullValue, DataFactoryElement encodingName, DataFactoryElement treatEmptyAsNull, DataFactoryElement skipLineCount, DataFactoryElement firstRowAsHeader) : base(datasetStorageFormatType, serializer, deserializer, additionalProperties) - { - ColumnDelimiter = columnDelimiter; - RowDelimiter = rowDelimiter; - EscapeChar = escapeChar; - QuoteChar = quoteChar; - NullValue = nullValue; - EncodingName = encodingName; - TreatEmptyAsNull = treatEmptyAsNull; - SkipLineCount = skipLineCount; - FirstRowAsHeader = firstRowAsHeader; - DatasetStorageFormatType = datasetStorageFormatType ?? "TextFormat"; - } - - /// The column delimiter. Type: string (or Expression with resultType string). - public DataFactoryElement ColumnDelimiter { get; set; } - /// The row delimiter. Type: string (or Expression with resultType string). - public DataFactoryElement RowDelimiter { get; set; } - /// The escape character. Type: string (or Expression with resultType string). - public DataFactoryElement EscapeChar { get; set; } - /// The quote character. Type: string (or Expression with resultType string). - public DataFactoryElement QuoteChar { get; set; } - /// The null value string. Type: string (or Expression with resultType string). - public DataFactoryElement NullValue { get; set; } - /// The code page name of the preferred encoding. If miss, the default value is ΓÇ£utf-8ΓÇ¥, unless BOM denotes another Unicode encoding. Refer to the ΓÇ£NameΓÇ¥ column of the table in the following link to set supported values: https://msdn.microsoft.com/library/system.text.encoding.aspx. Type: string (or Expression with resultType string). - public DataFactoryElement EncodingName { get; set; } - /// Treat empty column values in the text file as null. The default value is true. Type: boolean (or Expression with resultType boolean). - public DataFactoryElement TreatEmptyAsNull { get; set; } - /// The number of lines/rows to be skipped when parsing text files. The default value is 0. Type: integer (or Expression with resultType integer). - public DataFactoryElement SkipLineCount { get; set; } - /// When used as input, treat the first row of data as headers. When used as output,write the headers into the output as the first row of data. The default value is false. Type: boolean (or Expression with resultType boolean). - public DataFactoryElement FirstRowAsHeader { get; set; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DataworldLinkedService.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DataworldLinkedService.Serialization.cs deleted file mode 100644 index 483c7bac..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DataworldLinkedService.Serialization.cs +++ /dev/null @@ -1,178 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class DataworldLinkedService : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - writer.WritePropertyName("type"u8); - writer.WriteStringValue(LinkedServiceType); - if (Optional.IsDefined(ConnectVia)) - { - writer.WritePropertyName("connectVia"u8); - writer.WriteObjectValue(ConnectVia); - } - if (Optional.IsDefined(Description)) - { - writer.WritePropertyName("description"u8); - writer.WriteStringValue(Description); - } - if (Optional.IsCollectionDefined(Parameters)) - { - writer.WritePropertyName("parameters"u8); - writer.WriteStartObject(); - foreach (var item in Parameters) - { - writer.WritePropertyName(item.Key); - writer.WriteObjectValue(item.Value); - } - writer.WriteEndObject(); - } - if (Optional.IsCollectionDefined(Annotations)) - { - writer.WritePropertyName("annotations"u8); - writer.WriteStartArray(); - foreach (var item in Annotations) - { - if (item == null) - { - writer.WriteNullValue(); - continue; - } -#if NET6_0_OR_GREATER - writer.WriteRawValue(item); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.ToString()).RootElement); -#endif - } - writer.WriteEndArray(); - } - writer.WritePropertyName("typeProperties"u8); - writer.WriteStartObject(); - writer.WritePropertyName("apiToken"u8); - JsonSerializer.Serialize(writer, ApiToken); if (Optional.IsDefined(EncryptedCredential)) - { - writer.WritePropertyName("encryptedCredential"u8); - writer.WriteStringValue(EncryptedCredential); - } - writer.WriteEndObject(); - foreach (var item in AdditionalProperties) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.Value.ToString()).RootElement); -#endif - } - writer.WriteEndObject(); - } - - internal static DataworldLinkedService DeserializeDataworldLinkedService(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - string type = default; - Optional connectVia = default; - Optional description = default; - Optional> parameters = default; - Optional> annotations = default; - DataFactorySecretBaseDefinition apiToken = default; - Optional encryptedCredential = default; - IDictionary> additionalProperties = default; - Dictionary> additionalPropertiesDictionary = new Dictionary>(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("type"u8)) - { - type = property.Value.GetString(); - continue; - } - if (property.NameEquals("connectVia"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - connectVia = IntegrationRuntimeReference.DeserializeIntegrationRuntimeReference(property.Value); - continue; - } - if (property.NameEquals("description"u8)) - { - description = property.Value.GetString(); - continue; - } - if (property.NameEquals("parameters"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - Dictionary dictionary = new Dictionary(); - foreach (var property0 in property.Value.EnumerateObject()) - { - dictionary.Add(property0.Name, EntityParameterSpecification.DeserializeEntityParameterSpecification(property0.Value)); - } - parameters = dictionary; - continue; - } - if (property.NameEquals("annotations"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - if (item.ValueKind == JsonValueKind.Null) - { - array.Add(null); - } - else - { - array.Add(BinaryData.FromString(item.GetRawText())); - } - } - annotations = array; - continue; - } - if (property.NameEquals("typeProperties"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - foreach (var property0 in property.Value.EnumerateObject()) - { - if (property0.NameEquals("apiToken"u8)) - { - apiToken = JsonSerializer.Deserialize(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("encryptedCredential"u8)) - { - encryptedCredential = property0.Value.GetString(); - continue; - } - } - continue; - } - additionalPropertiesDictionary.Add(property.Name, JsonSerializer.Deserialize>(property.Value.GetRawText())); - } - additionalProperties = additionalPropertiesDictionary; - return new DataworldLinkedService(type, connectVia.Value, description.Value, Optional.ToDictionary(parameters), Optional.ToList(annotations), additionalProperties, apiToken, encryptedCredential.Value); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DataworldLinkedService.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DataworldLinkedService.cs deleted file mode 100644 index 75f61286..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DataworldLinkedService.cs +++ /dev/null @@ -1,45 +0,0 @@ -// - -#nullable disable - -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// Linked service for Dataworld. - public partial class DataworldLinkedService : DataFactoryLinkedServiceProperties - { - /// Initializes a new instance of DataworldLinkedService. - /// The api token for the Dataworld source. - /// is null. - public DataworldLinkedService(DataFactorySecretBaseDefinition apiToken) - { - Argument.AssertNotNull(apiToken, nameof(apiToken)); - - ApiToken = apiToken; - LinkedServiceType = "Dataworld"; - } - - /// Initializes a new instance of DataworldLinkedService. - /// Type of linked service. - /// The integration runtime reference. - /// Linked service description. - /// Parameters for linked service. - /// List of tags that can be used for describing the linked service. - /// Additional Properties. - /// The api token for the Dataworld source. - /// The encrypted credential used for authentication. Credentials are encrypted using the integration runtime credential manager. Type: string. - internal DataworldLinkedService(string linkedServiceType, IntegrationRuntimeReference connectVia, string description, IDictionary parameters, IList annotations, IDictionary> additionalProperties, DataFactorySecretBaseDefinition apiToken, string encryptedCredential) : base(linkedServiceType, connectVia, description, parameters, annotations, additionalProperties) - { - ApiToken = apiToken; - EncryptedCredential = encryptedCredential; - LinkedServiceType = linkedServiceType ?? "Dataworld"; - } - - /// The api token for the Dataworld source. - public DataFactorySecretBaseDefinition ApiToken { get; set; } - /// The encrypted credential used for authentication. Credentials are encrypted using the integration runtime credential manager. Type: string. - public string EncryptedCredential { get; set; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/Db2AuthenticationType.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/Db2AuthenticationType.cs deleted file mode 100644 index e8780332..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/Db2AuthenticationType.cs +++ /dev/null @@ -1,44 +0,0 @@ -// - -#nullable disable - -using System.ComponentModel; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// AuthenticationType to be used for connection. It is mutually exclusive with connectionString property. - public readonly partial struct Db2AuthenticationType : IEquatable - { - private readonly string _value; - - /// Initializes a new instance of . - /// is null. - public Db2AuthenticationType(string value) - { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } - - private const string BasicValue = "Basic"; - - /// Basic. - public static Db2AuthenticationType Basic { get; } = new Db2AuthenticationType(BasicValue); - /// Determines if two values are the same. - public static bool operator ==(Db2AuthenticationType left, Db2AuthenticationType right) => left.Equals(right); - /// Determines if two values are not the same. - public static bool operator !=(Db2AuthenticationType left, Db2AuthenticationType right) => !left.Equals(right); - /// Converts a string to a . - public static implicit operator Db2AuthenticationType(string value) => new Db2AuthenticationType(value); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override bool Equals(object obj) => obj is Db2AuthenticationType other && Equals(other); - /// - public bool Equals(Db2AuthenticationType other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override int GetHashCode() => _value?.GetHashCode() ?? 0; - /// - public override string ToString() => _value; - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/Db2LinkedService.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/Db2LinkedService.Serialization.cs deleted file mode 100644 index 0708147d..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/Db2LinkedService.Serialization.cs +++ /dev/null @@ -1,291 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class Db2LinkedService : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - writer.WritePropertyName("type"u8); - writer.WriteStringValue(LinkedServiceType); - if (Optional.IsDefined(ConnectVia)) - { - writer.WritePropertyName("connectVia"u8); - writer.WriteObjectValue(ConnectVia); - } - if (Optional.IsDefined(Description)) - { - writer.WritePropertyName("description"u8); - writer.WriteStringValue(Description); - } - if (Optional.IsCollectionDefined(Parameters)) - { - writer.WritePropertyName("parameters"u8); - writer.WriteStartObject(); - foreach (var item in Parameters) - { - writer.WritePropertyName(item.Key); - writer.WriteObjectValue(item.Value); - } - writer.WriteEndObject(); - } - if (Optional.IsCollectionDefined(Annotations)) - { - writer.WritePropertyName("annotations"u8); - writer.WriteStartArray(); - foreach (var item in Annotations) - { - if (item == null) - { - writer.WriteNullValue(); - continue; - } -#if NET6_0_OR_GREATER - writer.WriteRawValue(item); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.ToString()).RootElement); -#endif - } - writer.WriteEndArray(); - } - writer.WritePropertyName("typeProperties"u8); - writer.WriteStartObject(); - if (Optional.IsDefined(ConnectionString)) - { - writer.WritePropertyName("connectionString"u8); - JsonSerializer.Serialize(writer, ConnectionString); - } - if (Optional.IsDefined(Server)) - { - writer.WritePropertyName("server"u8); - JsonSerializer.Serialize(writer, Server); - } - if (Optional.IsDefined(Database)) - { - writer.WritePropertyName("database"u8); - JsonSerializer.Serialize(writer, Database); - } - if (Optional.IsDefined(AuthenticationType)) - { - writer.WritePropertyName("authenticationType"u8); - writer.WriteStringValue(AuthenticationType.Value.ToString()); - } - if (Optional.IsDefined(Username)) - { - writer.WritePropertyName("username"u8); - JsonSerializer.Serialize(writer, Username); - } - if (Optional.IsDefined(Password)) - { - writer.WritePropertyName("password"u8); - JsonSerializer.Serialize(writer, Password); - } - if (Optional.IsDefined(PackageCollection)) - { - writer.WritePropertyName("packageCollection"u8); - JsonSerializer.Serialize(writer, PackageCollection); - } - if (Optional.IsDefined(CertificateCommonName)) - { - writer.WritePropertyName("certificateCommonName"u8); - JsonSerializer.Serialize(writer, CertificateCommonName); - } - if (Optional.IsDefined(EncryptedCredential)) - { - writer.WritePropertyName("encryptedCredential"u8); - writer.WriteStringValue(EncryptedCredential); - } - writer.WriteEndObject(); - foreach (var item in AdditionalProperties) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.Value.ToString()).RootElement); -#endif - } - writer.WriteEndObject(); - } - - internal static Db2LinkedService DeserializeDb2LinkedService(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - string type = default; - Optional connectVia = default; - Optional description = default; - Optional> parameters = default; - Optional> annotations = default; - Optional> connectionString = default; - Optional> server = default; - Optional> database = default; - Optional authenticationType = default; - Optional> username = default; - Optional password = default; - Optional> packageCollection = default; - Optional> certificateCommonName = default; - Optional encryptedCredential = default; - IDictionary> additionalProperties = default; - Dictionary> additionalPropertiesDictionary = new Dictionary>(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("type"u8)) - { - type = property.Value.GetString(); - continue; - } - if (property.NameEquals("connectVia"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - connectVia = IntegrationRuntimeReference.DeserializeIntegrationRuntimeReference(property.Value); - continue; - } - if (property.NameEquals("description"u8)) - { - description = property.Value.GetString(); - continue; - } - if (property.NameEquals("parameters"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - Dictionary dictionary = new Dictionary(); - foreach (var property0 in property.Value.EnumerateObject()) - { - dictionary.Add(property0.Name, EntityParameterSpecification.DeserializeEntityParameterSpecification(property0.Value)); - } - parameters = dictionary; - continue; - } - if (property.NameEquals("annotations"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - if (item.ValueKind == JsonValueKind.Null) - { - array.Add(null); - } - else - { - array.Add(BinaryData.FromString(item.GetRawText())); - } - } - annotations = array; - continue; - } - if (property.NameEquals("typeProperties"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - foreach (var property0 in property.Value.EnumerateObject()) - { - if (property0.NameEquals("connectionString"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - connectionString = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("server"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - server = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("database"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - database = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("authenticationType"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - authenticationType = new Db2AuthenticationType(property0.Value.GetString()); - continue; - } - if (property0.NameEquals("username"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - username = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("password"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - password = JsonSerializer.Deserialize(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("packageCollection"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - packageCollection = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("certificateCommonName"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - certificateCommonName = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("encryptedCredential"u8)) - { - encryptedCredential = property0.Value.GetString(); - continue; - } - } - continue; - } - additionalPropertiesDictionary.Add(property.Name, JsonSerializer.Deserialize>(property.Value.GetRawText())); - } - additionalProperties = additionalPropertiesDictionary; - return new Db2LinkedService(type, connectVia.Value, description.Value, Optional.ToDictionary(parameters), Optional.ToList(annotations), additionalProperties, connectionString.Value, server.Value, database.Value, Optional.ToNullable(authenticationType), username.Value, password, packageCollection.Value, certificateCommonName.Value, encryptedCredential.Value); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/Db2LinkedService.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/Db2LinkedService.cs deleted file mode 100644 index 9ee8a5d1..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/Db2LinkedService.cs +++ /dev/null @@ -1,67 +0,0 @@ -// - -#nullable disable - -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// Linked service for DB2 data source. - public partial class Db2LinkedService : DataFactoryLinkedServiceProperties - { - /// Initializes a new instance of Db2LinkedService. - public Db2LinkedService() - { - LinkedServiceType = "Db2"; - } - - /// Initializes a new instance of Db2LinkedService. - /// Type of linked service. - /// The integration runtime reference. - /// Linked service description. - /// Parameters for linked service. - /// List of tags that can be used for describing the linked service. - /// Additional Properties. - /// The connection string. It is mutually exclusive with server, database, authenticationType, userName, packageCollection and certificateCommonName property. Type: string, SecureString or AzureKeyVaultSecretReference. - /// Server name for connection. It is mutually exclusive with connectionString property. Type: string (or Expression with resultType string). - /// Database name for connection. It is mutually exclusive with connectionString property. Type: string (or Expression with resultType string). - /// AuthenticationType to be used for connection. It is mutually exclusive with connectionString property. - /// Username for authentication. It is mutually exclusive with connectionString property. Type: string (or Expression with resultType string). - /// Password for authentication. - /// Under where packages are created when querying database. It is mutually exclusive with connectionString property. Type: string (or Expression with resultType string). - /// Certificate Common Name when TLS is enabled. It is mutually exclusive with connectionString property. Type: string (or Expression with resultType string). - /// The encrypted credential used for authentication. Credentials are encrypted using the integration runtime credential manager. It is mutually exclusive with connectionString property. Type: string. - internal Db2LinkedService(string linkedServiceType, IntegrationRuntimeReference connectVia, string description, IDictionary parameters, IList annotations, IDictionary> additionalProperties, DataFactoryElement connectionString, DataFactoryElement server, DataFactoryElement database, Db2AuthenticationType? authenticationType, DataFactoryElement username, DataFactorySecretBaseDefinition password, DataFactoryElement packageCollection, DataFactoryElement certificateCommonName, string encryptedCredential) : base(linkedServiceType, connectVia, description, parameters, annotations, additionalProperties) - { - ConnectionString = connectionString; - Server = server; - Database = database; - AuthenticationType = authenticationType; - Username = username; - Password = password; - PackageCollection = packageCollection; - CertificateCommonName = certificateCommonName; - EncryptedCredential = encryptedCredential; - LinkedServiceType = linkedServiceType ?? "Db2"; - } - - /// The connection string. It is mutually exclusive with server, database, authenticationType, userName, packageCollection and certificateCommonName property. Type: string, SecureString or AzureKeyVaultSecretReference. - public DataFactoryElement ConnectionString { get; set; } - /// Server name for connection. It is mutually exclusive with connectionString property. Type: string (or Expression with resultType string). - public DataFactoryElement Server { get; set; } - /// Database name for connection. It is mutually exclusive with connectionString property. Type: string (or Expression with resultType string). - public DataFactoryElement Database { get; set; } - /// AuthenticationType to be used for connection. It is mutually exclusive with connectionString property. - public Db2AuthenticationType? AuthenticationType { get; set; } - /// Username for authentication. It is mutually exclusive with connectionString property. Type: string (or Expression with resultType string). - public DataFactoryElement Username { get; set; } - /// Password for authentication. - public DataFactorySecretBaseDefinition Password { get; set; } - /// Under where packages are created when querying database. It is mutually exclusive with connectionString property. Type: string (or Expression with resultType string). - public DataFactoryElement PackageCollection { get; set; } - /// Certificate Common Name when TLS is enabled. It is mutually exclusive with connectionString property. Type: string (or Expression with resultType string). - public DataFactoryElement CertificateCommonName { get; set; } - /// The encrypted credential used for authentication. Credentials are encrypted using the integration runtime credential manager. It is mutually exclusive with connectionString property. Type: string. - public string EncryptedCredential { get; set; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/Db2Source.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/Db2Source.Serialization.cs deleted file mode 100644 index 94f56e45..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/Db2Source.Serialization.cs +++ /dev/null @@ -1,161 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class Db2Source : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - if (Optional.IsDefined(Query)) - { - writer.WritePropertyName("query"u8); - JsonSerializer.Serialize(writer, Query); - } - if (Optional.IsDefined(QueryTimeout)) - { - writer.WritePropertyName("queryTimeout"u8); - JsonSerializer.Serialize(writer, QueryTimeout); - } - if (Optional.IsDefined(AdditionalColumns)) - { - writer.WritePropertyName("additionalColumns"u8); -#if NET6_0_OR_GREATER - writer.WriteRawValue(AdditionalColumns); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(AdditionalColumns.ToString()).RootElement); -#endif - } - writer.WritePropertyName("type"u8); - writer.WriteStringValue(CopySourceType); - if (Optional.IsDefined(SourceRetryCount)) - { - writer.WritePropertyName("sourceRetryCount"u8); - JsonSerializer.Serialize(writer, SourceRetryCount); - } - if (Optional.IsDefined(SourceRetryWait)) - { - writer.WritePropertyName("sourceRetryWait"u8); - JsonSerializer.Serialize(writer, SourceRetryWait); - } - if (Optional.IsDefined(MaxConcurrentConnections)) - { - writer.WritePropertyName("maxConcurrentConnections"u8); - JsonSerializer.Serialize(writer, MaxConcurrentConnections); - } - if (Optional.IsDefined(DisableMetricsCollection)) - { - writer.WritePropertyName("disableMetricsCollection"u8); - JsonSerializer.Serialize(writer, DisableMetricsCollection); - } - foreach (var item in AdditionalProperties) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.Value.ToString()).RootElement); -#endif - } - writer.WriteEndObject(); - } - - internal static Db2Source DeserializeDb2Source(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - Optional> query = default; - Optional> queryTimeout = default; - Optional additionalColumns = default; - string type = default; - Optional> sourceRetryCount = default; - Optional> sourceRetryWait = default; - Optional> maxConcurrentConnections = default; - Optional> disableMetricsCollection = default; - IDictionary> additionalProperties = default; - Dictionary> additionalPropertiesDictionary = new Dictionary>(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("query"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - query = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("queryTimeout"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - queryTimeout = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("additionalColumns"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - additionalColumns = BinaryData.FromString(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("type"u8)) - { - type = property.Value.GetString(); - continue; - } - if (property.NameEquals("sourceRetryCount"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - sourceRetryCount = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("sourceRetryWait"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - sourceRetryWait = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("maxConcurrentConnections"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - maxConcurrentConnections = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("disableMetricsCollection"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - disableMetricsCollection = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - additionalPropertiesDictionary.Add(property.Name, JsonSerializer.Deserialize>(property.Value.GetRawText())); - } - additionalProperties = additionalPropertiesDictionary; - return new Db2Source(type, sourceRetryCount.Value, sourceRetryWait.Value, maxConcurrentConnections.Value, disableMetricsCollection.Value, additionalProperties, queryTimeout.Value, additionalColumns.Value, query.Value); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/Db2Source.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/Db2Source.cs deleted file mode 100644 index f8d96b1a..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/Db2Source.cs +++ /dev/null @@ -1,37 +0,0 @@ -// - -#nullable disable - -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// A copy activity source for Db2 databases. - public partial class Db2Source : TabularSource - { - /// Initializes a new instance of Db2Source. - public Db2Source() - { - CopySourceType = "Db2Source"; - } - - /// Initializes a new instance of Db2Source. - /// Copy source type. - /// Source retry count. Type: integer (or Expression with resultType integer). - /// Source retry wait. Type: string (or Expression with resultType string), pattern: ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). - /// The maximum concurrent connection count for the source data store. Type: integer (or Expression with resultType integer). - /// If true, disable data store metrics collection. Default is false. Type: boolean (or Expression with resultType boolean). - /// Additional Properties. - /// 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). - /// Database query. Type: string (or Expression with resultType string). - internal Db2Source(string copySourceType, DataFactoryElement sourceRetryCount, DataFactoryElement sourceRetryWait, DataFactoryElement maxConcurrentConnections, DataFactoryElement disableMetricsCollection, IDictionary> additionalProperties, DataFactoryElement queryTimeout, BinaryData additionalColumns, DataFactoryElement query) : base(copySourceType, sourceRetryCount, sourceRetryWait, maxConcurrentConnections, disableMetricsCollection, additionalProperties, queryTimeout, additionalColumns) - { - Query = query; - CopySourceType = copySourceType ?? "Db2Source"; - } - - /// Database query. Type: string (or Expression with resultType string). - public DataFactoryElement Query { get; set; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/Db2TableDataset.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/Db2TableDataset.Serialization.cs deleted file mode 100644 index da93e6fb..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/Db2TableDataset.Serialization.cs +++ /dev/null @@ -1,246 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class Db2TableDataset : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - writer.WritePropertyName("type"u8); - writer.WriteStringValue(DatasetType); - if (Optional.IsDefined(Description)) - { - writer.WritePropertyName("description"u8); - writer.WriteStringValue(Description); - } - if (Optional.IsDefined(Structure)) - { - writer.WritePropertyName("structure"u8); - JsonSerializer.Serialize(writer, Structure); - } - if (Optional.IsDefined(Schema)) - { - writer.WritePropertyName("schema"u8); - JsonSerializer.Serialize(writer, Schema); - } - writer.WritePropertyName("linkedServiceName"u8); - JsonSerializer.Serialize(writer, LinkedServiceName); if (Optional.IsCollectionDefined(Parameters)) - { - writer.WritePropertyName("parameters"u8); - writer.WriteStartObject(); - foreach (var item in Parameters) - { - writer.WritePropertyName(item.Key); - writer.WriteObjectValue(item.Value); - } - writer.WriteEndObject(); - } - if (Optional.IsCollectionDefined(Annotations)) - { - writer.WritePropertyName("annotations"u8); - writer.WriteStartArray(); - foreach (var item in Annotations) - { - if (item == null) - { - writer.WriteNullValue(); - continue; - } -#if NET6_0_OR_GREATER - writer.WriteRawValue(item); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.ToString()).RootElement); -#endif - } - writer.WriteEndArray(); - } - if (Optional.IsDefined(Folder)) - { - writer.WritePropertyName("folder"u8); - writer.WriteObjectValue(Folder); - } - writer.WritePropertyName("typeProperties"u8); - writer.WriteStartObject(); - if (Optional.IsDefined(TableName)) - { - writer.WritePropertyName("tableName"u8); -#if NET6_0_OR_GREATER - writer.WriteRawValue(TableName); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(TableName.ToString()).RootElement); -#endif - } - if (Optional.IsDefined(SchemaTypePropertiesSchema)) - { - writer.WritePropertyName("schema"u8); - JsonSerializer.Serialize(writer, SchemaTypePropertiesSchema); - } - if (Optional.IsDefined(Table)) - { - writer.WritePropertyName("table"u8); - JsonSerializer.Serialize(writer, Table); - } - writer.WriteEndObject(); - foreach (var item in AdditionalProperties) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.Value.ToString()).RootElement); -#endif - } - writer.WriteEndObject(); - } - - internal static Db2TableDataset DeserializeDb2TableDataset(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - string type = default; - Optional description = default; - Optional>> structure = default; - Optional>> schema = default; - DataFactoryLinkedServiceReference linkedServiceName = default; - Optional> parameters = default; - Optional> annotations = default; - Optional folder = default; - Optional tableName = default; - Optional> schema0 = default; - Optional> table = default; - IDictionary> additionalProperties = default; - Dictionary> additionalPropertiesDictionary = new Dictionary>(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("type"u8)) - { - type = property.Value.GetString(); - continue; - } - if (property.NameEquals("description"u8)) - { - description = property.Value.GetString(); - continue; - } - if (property.NameEquals("structure"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - structure = JsonSerializer.Deserialize>>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("schema"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - schema = JsonSerializer.Deserialize>>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("linkedServiceName"u8)) - { - linkedServiceName = JsonSerializer.Deserialize(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("parameters"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - Dictionary dictionary = new Dictionary(); - foreach (var property0 in property.Value.EnumerateObject()) - { - dictionary.Add(property0.Name, EntityParameterSpecification.DeserializeEntityParameterSpecification(property0.Value)); - } - parameters = dictionary; - continue; - } - if (property.NameEquals("annotations"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - if (item.ValueKind == JsonValueKind.Null) - { - array.Add(null); - } - else - { - array.Add(BinaryData.FromString(item.GetRawText())); - } - } - annotations = array; - continue; - } - if (property.NameEquals("folder"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - folder = DatasetFolder.DeserializeDatasetFolder(property.Value); - continue; - } - if (property.NameEquals("typeProperties"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - foreach (var property0 in property.Value.EnumerateObject()) - { - if (property0.NameEquals("tableName"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - tableName = BinaryData.FromString(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("schema"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - schema0 = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("table"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - table = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - } - continue; - } - additionalPropertiesDictionary.Add(property.Name, JsonSerializer.Deserialize>(property.Value.GetRawText())); - } - additionalProperties = additionalPropertiesDictionary; - return new Db2TableDataset(type, description.Value, structure.Value, schema.Value, linkedServiceName, Optional.ToDictionary(parameters), Optional.ToList(annotations), folder.Value, additionalProperties, tableName.Value, schema0.Value, table.Value); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/Db2TableDataset.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/Db2TableDataset.cs deleted file mode 100644 index 965a919d..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/Db2TableDataset.cs +++ /dev/null @@ -1,80 +0,0 @@ -// - -#nullable disable - -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// The Db2 table dataset. - public partial class Db2TableDataset : DataFactoryDatasetProperties - { - /// Initializes a new instance of Db2TableDataset. - /// Linked service reference. - /// is null. - public Db2TableDataset(DataFactoryLinkedServiceReference linkedServiceName) : base(linkedServiceName) - { - Argument.AssertNotNull(linkedServiceName, nameof(linkedServiceName)); - - DatasetType = "Db2Table"; - } - - /// Initializes a new instance of Db2TableDataset. - /// Type of dataset. - /// Dataset description. - /// Columns that define the structure of the dataset. Type: array (or Expression with resultType array), itemType: DatasetDataElement. - /// Columns that define the physical type schema of the dataset. Type: array (or Expression with resultType array), itemType: DatasetSchemaDataElement. - /// Linked service reference. - /// Parameters for dataset. - /// List of tags that can be used for describing the Dataset. - /// The folder that this Dataset is in. If not specified, Dataset will appear at the root level. - /// Additional Properties. - /// This property will be retired. Please consider using schema + table properties instead. - /// The Db2 schema name. Type: string (or Expression with resultType string). - /// The Db2 table name. Type: string (or Expression with resultType string). - internal Db2TableDataset(string datasetType, string description, DataFactoryElement> structure, DataFactoryElement> schema, DataFactoryLinkedServiceReference linkedServiceName, IDictionary parameters, IList annotations, DatasetFolder folder, IDictionary> additionalProperties, BinaryData tableName, DataFactoryElement schemaTypePropertiesSchema, DataFactoryElement table) : base(datasetType, description, structure, schema, linkedServiceName, parameters, annotations, folder, additionalProperties) - { - TableName = tableName; - SchemaTypePropertiesSchema = schemaTypePropertiesSchema; - Table = table; - DatasetType = datasetType ?? "Db2Table"; - } - - /// - /// This property will be retired. Please consider using schema + table properties instead. - /// - /// To assign an object to this property use . - /// - /// - /// To assign an already formated json string to this property use . - /// - /// - /// Examples: - /// - /// - /// BinaryData.FromObjectAsJson("foo") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromString("\"foo\"") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromObjectAsJson(new { key = "value" }) - /// Creates a payload of { "key": "value" }. - /// - /// - /// BinaryData.FromString("{\"key\": \"value\"}") - /// Creates a payload of { "key": "value" }. - /// - /// - /// - /// - public BinaryData TableName { get; set; } - /// The Db2 schema name. Type: string (or Expression with resultType string). - public DataFactoryElement SchemaTypePropertiesSchema { get; set; } - /// The Db2 table name. Type: string (or Expression with resultType string). - public DataFactoryElement Table { get; set; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DeleteActivity.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DeleteActivity.Serialization.cs deleted file mode 100644 index 21f94ebd..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DeleteActivity.Serialization.cs +++ /dev/null @@ -1,279 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class DeleteActivity : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - if (Optional.IsDefined(LinkedServiceName)) - { - writer.WritePropertyName("linkedServiceName"u8); - JsonSerializer.Serialize(writer, LinkedServiceName); - } - if (Optional.IsDefined(Policy)) - { - writer.WritePropertyName("policy"u8); - writer.WriteObjectValue(Policy); - } - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ActivityType); - if (Optional.IsDefined(Description)) - { - writer.WritePropertyName("description"u8); - writer.WriteStringValue(Description); - } - if (Optional.IsDefined(State)) - { - writer.WritePropertyName("state"u8); - writer.WriteStringValue(State.Value.ToString()); - } - if (Optional.IsDefined(OnInactiveMarkAs)) - { - writer.WritePropertyName("onInactiveMarkAs"u8); - writer.WriteStringValue(OnInactiveMarkAs.Value.ToString()); - } - if (Optional.IsCollectionDefined(DependsOn)) - { - writer.WritePropertyName("dependsOn"u8); - writer.WriteStartArray(); - foreach (var item in DependsOn) - { - writer.WriteObjectValue(item); - } - writer.WriteEndArray(); - } - if (Optional.IsCollectionDefined(UserProperties)) - { - writer.WritePropertyName("userProperties"u8); - writer.WriteStartArray(); - foreach (var item in UserProperties) - { - writer.WriteObjectValue(item); - } - writer.WriteEndArray(); - } - writer.WritePropertyName("typeProperties"u8); - writer.WriteStartObject(); - if (Optional.IsDefined(Recursive)) - { - writer.WritePropertyName("recursive"u8); - JsonSerializer.Serialize(writer, Recursive); - } - if (Optional.IsDefined(MaxConcurrentConnections)) - { - writer.WritePropertyName("maxConcurrentConnections"u8); - writer.WriteNumberValue(MaxConcurrentConnections.Value); - } - if (Optional.IsDefined(EnableLogging)) - { - writer.WritePropertyName("enableLogging"u8); - JsonSerializer.Serialize(writer, EnableLogging); - } - if (Optional.IsDefined(LogStorageSettings)) - { - writer.WritePropertyName("logStorageSettings"u8); - writer.WriteObjectValue(LogStorageSettings); - } - writer.WritePropertyName("dataset"u8); - writer.WriteObjectValue(Dataset); - if (Optional.IsDefined(StoreSettings)) - { - writer.WritePropertyName("storeSettings"u8); - writer.WriteObjectValue(StoreSettings); - } - writer.WriteEndObject(); - foreach (var item in AdditionalProperties) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.Value.ToString()).RootElement); -#endif - } - writer.WriteEndObject(); - } - - internal static DeleteActivity DeserializeDeleteActivity(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - Optional linkedServiceName = default; - Optional policy = default; - string name = default; - string type = default; - Optional description = default; - Optional state = default; - Optional onInactiveMarkAs = default; - Optional> dependsOn = default; - Optional> userProperties = default; - Optional> recursive = default; - Optional maxConcurrentConnections = default; - Optional> enableLogging = default; - Optional logStorageSettings = default; - DatasetReference dataset = default; - Optional storeSettings = default; - IDictionary> additionalProperties = default; - Dictionary> additionalPropertiesDictionary = new Dictionary>(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("linkedServiceName"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - linkedServiceName = JsonSerializer.Deserialize(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("policy"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - policy = PipelineActivityPolicy.DeserializePipelineActivityPolicy(property.Value); - continue; - } - if (property.NameEquals("name"u8)) - { - name = property.Value.GetString(); - continue; - } - if (property.NameEquals("type"u8)) - { - type = property.Value.GetString(); - continue; - } - if (property.NameEquals("description"u8)) - { - description = property.Value.GetString(); - continue; - } - if (property.NameEquals("state"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - state = new PipelineActivityState(property.Value.GetString()); - continue; - } - if (property.NameEquals("onInactiveMarkAs"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - onInactiveMarkAs = new ActivityOnInactiveMarkAs(property.Value.GetString()); - continue; - } - if (property.NameEquals("dependsOn"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - array.Add(PipelineActivityDependency.DeserializePipelineActivityDependency(item)); - } - dependsOn = array; - continue; - } - if (property.NameEquals("userProperties"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - array.Add(PipelineActivityUserProperty.DeserializePipelineActivityUserProperty(item)); - } - userProperties = array; - continue; - } - if (property.NameEquals("typeProperties"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - foreach (var property0 in property.Value.EnumerateObject()) - { - if (property0.NameEquals("recursive"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - recursive = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("maxConcurrentConnections"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - maxConcurrentConnections = property0.Value.GetInt32(); - continue; - } - if (property0.NameEquals("enableLogging"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - enableLogging = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("logStorageSettings"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - logStorageSettings = LogStorageSettings.DeserializeLogStorageSettings(property0.Value); - continue; - } - if (property0.NameEquals("dataset"u8)) - { - dataset = DatasetReference.DeserializeDatasetReference(property0.Value); - continue; - } - if (property0.NameEquals("storeSettings"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - storeSettings = StoreReadSettings.DeserializeStoreReadSettings(property0.Value); - continue; - } - } - continue; - } - additionalPropertiesDictionary.Add(property.Name, JsonSerializer.Deserialize>(property.Value.GetRawText())); - } - additionalProperties = additionalPropertiesDictionary; - return new DeleteActivity(name, type, description.Value, Optional.ToNullable(state), Optional.ToNullable(onInactiveMarkAs), Optional.ToList(dependsOn), Optional.ToList(userProperties), additionalProperties, linkedServiceName, policy.Value, recursive.Value, Optional.ToNullable(maxConcurrentConnections), enableLogging.Value, logStorageSettings.Value, dataset, storeSettings.Value); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DeleteActivity.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DeleteActivity.cs deleted file mode 100644 index 2304693d..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DeleteActivity.cs +++ /dev/null @@ -1,75 +0,0 @@ -// - -#nullable disable - -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// Delete activity. - public partial class DeleteActivity : ExecutionActivity - { - /// Initializes a new instance of DeleteActivity. - /// Activity name. - /// Delete activity dataset reference. - /// or is null. - public DeleteActivity(string name, DatasetReference dataset) : base(name) - { - Argument.AssertNotNull(name, nameof(name)); - Argument.AssertNotNull(dataset, nameof(dataset)); - - Dataset = dataset; - ActivityType = "Delete"; - } - - /// Initializes a new instance of DeleteActivity. - /// Activity name. - /// Type of activity. - /// Activity description. - /// Activity state. This is an optional property and if not provided, the state will be Active by default. - /// 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. - /// Activity depends on condition. - /// Activity user properties. - /// Additional Properties. - /// Linked service reference. - /// Activity policy. - /// If true, files or sub-folders under current folder path will be deleted recursively. Default is false. Type: boolean (or Expression with resultType boolean). - /// The max concurrent connections to connect data source at the same time. - /// Whether to record detailed logs of delete-activity execution. Default value is false. Type: boolean (or Expression with resultType boolean). - /// Log storage settings customer need to provide when enableLogging is true. - /// Delete activity dataset reference. - /// - /// Delete activity store settings. - /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. - /// The available derived classes include , , , , , , , , , , , and . - /// - internal DeleteActivity(string name, string activityType, string description, PipelineActivityState? state, ActivityOnInactiveMarkAs? onInactiveMarkAs, IList dependsOn, IList userProperties, IDictionary> additionalProperties, DataFactoryLinkedServiceReference linkedServiceName, PipelineActivityPolicy policy, DataFactoryElement recursive, int? maxConcurrentConnections, DataFactoryElement enableLogging, LogStorageSettings logStorageSettings, DatasetReference dataset, StoreReadSettings storeSettings) : base(name, activityType, description, state, onInactiveMarkAs, dependsOn, userProperties, additionalProperties, linkedServiceName, policy) - { - Recursive = recursive; - MaxConcurrentConnections = maxConcurrentConnections; - EnableLogging = enableLogging; - LogStorageSettings = logStorageSettings; - Dataset = dataset; - StoreSettings = storeSettings; - ActivityType = activityType ?? "Delete"; - } - - /// If true, files or sub-folders under current folder path will be deleted recursively. Default is false. Type: boolean (or Expression with resultType boolean). - public DataFactoryElement Recursive { get; set; } - /// The max concurrent connections to connect data source at the same time. - public int? MaxConcurrentConnections { get; set; } - /// Whether to record detailed logs of delete-activity execution. Default value is false. Type: boolean (or Expression with resultType boolean). - public DataFactoryElement EnableLogging { get; set; } - /// Log storage settings customer need to provide when enableLogging is true. - public LogStorageSettings LogStorageSettings { get; set; } - /// Delete activity dataset reference. - public DatasetReference Dataset { get; set; } - /// - /// Delete activity store settings. - /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. - /// The available derived classes include , , , , , , , , , , , and . - /// - public StoreReadSettings StoreSettings { get; set; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DeleteDataFlowDebugSessionContent.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DeleteDataFlowDebugSessionContent.Serialization.cs deleted file mode 100644 index e46c813b..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DeleteDataFlowDebugSessionContent.Serialization.cs +++ /dev/null @@ -1,23 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class DeleteDataFlowDebugSessionContent : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - if (Optional.IsDefined(SessionId)) - { - writer.WritePropertyName("sessionId"u8); - writer.WriteStringValue(SessionId.Value); - } - writer.WriteEndObject(); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DeleteDataFlowDebugSessionContent.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DeleteDataFlowDebugSessionContent.cs deleted file mode 100644 index e01918b8..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DeleteDataFlowDebugSessionContent.cs +++ /dev/null @@ -1,18 +0,0 @@ -// - -#nullable disable - -namespace AzureDataFactory.TestingFramework.Models -{ - /// Request body structure for deleting data flow debug session. - public partial class DeleteDataFlowDebugSessionContent - { - /// Initializes a new instance of DeleteDataFlowDebugSessionContent. - public DeleteDataFlowDebugSessionContent() - { - } - - /// The ID of data flow debug session. - public Guid? SessionId { get; set; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DelimitedTextDataset.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DelimitedTextDataset.Serialization.cs deleted file mode 100644 index 20cc23cc..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DelimitedTextDataset.Serialization.cs +++ /dev/null @@ -1,351 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class DelimitedTextDataset : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - writer.WritePropertyName("type"u8); - writer.WriteStringValue(DatasetType); - if (Optional.IsDefined(Description)) - { - writer.WritePropertyName("description"u8); - writer.WriteStringValue(Description); - } - if (Optional.IsDefined(Structure)) - { - writer.WritePropertyName("structure"u8); - JsonSerializer.Serialize(writer, Structure); - } - if (Optional.IsDefined(Schema)) - { - writer.WritePropertyName("schema"u8); - JsonSerializer.Serialize(writer, Schema); - } - writer.WritePropertyName("linkedServiceName"u8); - JsonSerializer.Serialize(writer, LinkedServiceName); if (Optional.IsCollectionDefined(Parameters)) - { - writer.WritePropertyName("parameters"u8); - writer.WriteStartObject(); - foreach (var item in Parameters) - { - writer.WritePropertyName(item.Key); - writer.WriteObjectValue(item.Value); - } - writer.WriteEndObject(); - } - if (Optional.IsCollectionDefined(Annotations)) - { - writer.WritePropertyName("annotations"u8); - writer.WriteStartArray(); - foreach (var item in Annotations) - { - if (item == null) - { - writer.WriteNullValue(); - continue; - } -#if NET6_0_OR_GREATER - writer.WriteRawValue(item); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.ToString()).RootElement); -#endif - } - writer.WriteEndArray(); - } - if (Optional.IsDefined(Folder)) - { - writer.WritePropertyName("folder"u8); - writer.WriteObjectValue(Folder); - } - writer.WritePropertyName("typeProperties"u8); - writer.WriteStartObject(); - if (Optional.IsDefined(DataLocation)) - { - writer.WritePropertyName("location"u8); - writer.WriteObjectValue(DataLocation); - } - if (Optional.IsDefined(ColumnDelimiter)) - { - writer.WritePropertyName("columnDelimiter"u8); - JsonSerializer.Serialize(writer, ColumnDelimiter); - } - if (Optional.IsDefined(RowDelimiter)) - { - writer.WritePropertyName("rowDelimiter"u8); - JsonSerializer.Serialize(writer, RowDelimiter); - } - if (Optional.IsDefined(EncodingName)) - { - writer.WritePropertyName("encodingName"u8); - JsonSerializer.Serialize(writer, EncodingName); - } - if (Optional.IsDefined(CompressionCodec)) - { - writer.WritePropertyName("compressionCodec"u8); - JsonSerializer.Serialize(writer, CompressionCodec); - } - if (Optional.IsDefined(CompressionLevel)) - { - writer.WritePropertyName("compressionLevel"u8); -#if NET6_0_OR_GREATER - writer.WriteRawValue(CompressionLevel); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(CompressionLevel.ToString()).RootElement); -#endif - } - if (Optional.IsDefined(QuoteChar)) - { - writer.WritePropertyName("quoteChar"u8); - JsonSerializer.Serialize(writer, QuoteChar); - } - if (Optional.IsDefined(EscapeChar)) - { - writer.WritePropertyName("escapeChar"u8); - JsonSerializer.Serialize(writer, EscapeChar); - } - if (Optional.IsDefined(FirstRowAsHeader)) - { - writer.WritePropertyName("firstRowAsHeader"u8); - JsonSerializer.Serialize(writer, FirstRowAsHeader); - } - if (Optional.IsDefined(NullValue)) - { - writer.WritePropertyName("nullValue"u8); - JsonSerializer.Serialize(writer, NullValue); - } - writer.WriteEndObject(); - foreach (var item in AdditionalProperties) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.Value.ToString()).RootElement); -#endif - } - writer.WriteEndObject(); - } - - internal static DelimitedTextDataset DeserializeDelimitedTextDataset(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - string type = default; - Optional description = default; - Optional>> structure = default; - Optional>> schema = default; - DataFactoryLinkedServiceReference linkedServiceName = default; - Optional> parameters = default; - Optional> annotations = default; - Optional folder = default; - Optional location = default; - Optional> columnDelimiter = default; - Optional> rowDelimiter = default; - Optional> encodingName = default; - Optional> compressionCodec = default; - Optional compressionLevel = default; - Optional> quoteChar = default; - Optional> escapeChar = default; - Optional> firstRowAsHeader = default; - Optional> nullValue = default; - IDictionary> additionalProperties = default; - Dictionary> additionalPropertiesDictionary = new Dictionary>(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("type"u8)) - { - type = property.Value.GetString(); - continue; - } - if (property.NameEquals("description"u8)) - { - description = property.Value.GetString(); - continue; - } - if (property.NameEquals("structure"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - structure = JsonSerializer.Deserialize>>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("schema"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - schema = JsonSerializer.Deserialize>>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("linkedServiceName"u8)) - { - linkedServiceName = JsonSerializer.Deserialize(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("parameters"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - Dictionary dictionary = new Dictionary(); - foreach (var property0 in property.Value.EnumerateObject()) - { - dictionary.Add(property0.Name, EntityParameterSpecification.DeserializeEntityParameterSpecification(property0.Value)); - } - parameters = dictionary; - continue; - } - if (property.NameEquals("annotations"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - if (item.ValueKind == JsonValueKind.Null) - { - array.Add(null); - } - else - { - array.Add(BinaryData.FromString(item.GetRawText())); - } - } - annotations = array; - continue; - } - if (property.NameEquals("folder"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - folder = DatasetFolder.DeserializeDatasetFolder(property.Value); - continue; - } - if (property.NameEquals("typeProperties"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - foreach (var property0 in property.Value.EnumerateObject()) - { - if (property0.NameEquals("location"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - location = DatasetLocation.DeserializeDatasetLocation(property0.Value); - continue; - } - if (property0.NameEquals("columnDelimiter"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - columnDelimiter = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("rowDelimiter"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - rowDelimiter = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("encodingName"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - encodingName = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("compressionCodec"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - compressionCodec = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("compressionLevel"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - compressionLevel = BinaryData.FromString(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("quoteChar"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - quoteChar = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("escapeChar"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - escapeChar = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("firstRowAsHeader"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - firstRowAsHeader = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("nullValue"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - nullValue = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - } - continue; - } - additionalPropertiesDictionary.Add(property.Name, JsonSerializer.Deserialize>(property.Value.GetRawText())); - } - additionalProperties = additionalPropertiesDictionary; - return new DelimitedTextDataset(type, description.Value, structure.Value, schema.Value, linkedServiceName, Optional.ToDictionary(parameters), Optional.ToList(annotations), folder.Value, additionalProperties, location.Value, columnDelimiter.Value, rowDelimiter.Value, encodingName.Value, compressionCodec.Value, compressionLevel.Value, quoteChar.Value, escapeChar.Value, firstRowAsHeader.Value, nullValue.Value); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DelimitedTextDataset.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DelimitedTextDataset.cs deleted file mode 100644 index cc711b4c..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DelimitedTextDataset.cs +++ /dev/null @@ -1,116 +0,0 @@ -// - -#nullable disable - -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// Delimited text dataset. - public partial class DelimitedTextDataset : DataFactoryDatasetProperties - { - /// Initializes a new instance of DelimitedTextDataset. - /// Linked service reference. - /// is null. - public DelimitedTextDataset(DataFactoryLinkedServiceReference linkedServiceName) : base(linkedServiceName) - { - Argument.AssertNotNull(linkedServiceName, nameof(linkedServiceName)); - - DatasetType = "DelimitedText"; - } - - /// Initializes a new instance of DelimitedTextDataset. - /// Type of dataset. - /// Dataset description. - /// Columns that define the structure of the dataset. Type: array (or Expression with resultType array), itemType: DatasetDataElement. - /// Columns that define the physical type schema of the dataset. Type: array (or Expression with resultType array), itemType: DatasetSchemaDataElement. - /// Linked service reference. - /// Parameters for dataset. - /// List of tags that can be used for describing the Dataset. - /// The folder that this Dataset is in. If not specified, Dataset will appear at the root level. - /// Additional Properties. - /// - /// The location of the delimited text storage. - /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. - /// The available derived classes include , , , , , , , , , , , and . - /// - /// The column delimiter. Type: string (or Expression with resultType string). - /// The row delimiter. Type: string (or Expression with resultType string). - /// The code page name of the preferred encoding. If miss, the default value is UTF-8, unless BOM denotes another Unicode encoding. Refer to the name column of the table in the following link to set supported values: https://msdn.microsoft.com/library/system.text.encoding.aspx. Type: string (or Expression with resultType string). - /// The data compressionCodec. Type: string (or Expression with resultType string). - /// The data compression method used for DelimitedText. - /// The quote character. Type: string (or Expression with resultType string). - /// The escape character. Type: string (or Expression with resultType string). - /// When used as input, treat the first row of data as headers. When used as output,write the headers into the output as the first row of data. The default value is false. Type: boolean (or Expression with resultType boolean). - /// The null value string. Type: string (or Expression with resultType string). - internal DelimitedTextDataset(string datasetType, string description, DataFactoryElement> structure, DataFactoryElement> schema, DataFactoryLinkedServiceReference linkedServiceName, IDictionary parameters, IList annotations, DatasetFolder folder, IDictionary> additionalProperties, DatasetLocation dataLocation, DataFactoryElement columnDelimiter, DataFactoryElement rowDelimiter, DataFactoryElement encodingName, DataFactoryElement compressionCodec, BinaryData compressionLevel, DataFactoryElement quoteChar, DataFactoryElement escapeChar, DataFactoryElement firstRowAsHeader, DataFactoryElement nullValue) : base(datasetType, description, structure, schema, linkedServiceName, parameters, annotations, folder, additionalProperties) - { - DataLocation = dataLocation; - ColumnDelimiter = columnDelimiter; - RowDelimiter = rowDelimiter; - EncodingName = encodingName; - CompressionCodec = compressionCodec; - CompressionLevel = compressionLevel; - QuoteChar = quoteChar; - EscapeChar = escapeChar; - FirstRowAsHeader = firstRowAsHeader; - NullValue = nullValue; - DatasetType = datasetType ?? "DelimitedText"; - } - - /// - /// The location of the delimited text storage. - /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. - /// The available derived classes include , , , , , , , , , , , and . - /// - public DatasetLocation DataLocation { get; set; } - /// The column delimiter. Type: string (or Expression with resultType string). - public DataFactoryElement ColumnDelimiter { get; set; } - /// The row delimiter. Type: string (or Expression with resultType string). - public DataFactoryElement RowDelimiter { get; set; } - /// The code page name of the preferred encoding. If miss, the default value is UTF-8, unless BOM denotes another Unicode encoding. Refer to the name column of the table in the following link to set supported values: https://msdn.microsoft.com/library/system.text.encoding.aspx. Type: string (or Expression with resultType string). - public DataFactoryElement EncodingName { get; set; } - /// The data compressionCodec. Type: string (or Expression with resultType string). - public DataFactoryElement CompressionCodec { get; set; } - /// - /// The data compression method used for DelimitedText. - /// - /// To assign an object to this property use . - /// - /// - /// To assign an already formated json string to this property use . - /// - /// - /// Examples: - /// - /// - /// BinaryData.FromObjectAsJson("foo") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromString("\"foo\"") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromObjectAsJson(new { key = "value" }) - /// Creates a payload of { "key": "value" }. - /// - /// - /// BinaryData.FromString("{\"key\": \"value\"}") - /// Creates a payload of { "key": "value" }. - /// - /// - /// - /// - public BinaryData CompressionLevel { get; set; } - /// The quote character. Type: string (or Expression with resultType string). - public DataFactoryElement QuoteChar { get; set; } - /// The escape character. Type: string (or Expression with resultType string). - public DataFactoryElement EscapeChar { get; set; } - /// When used as input, treat the first row of data as headers. When used as output,write the headers into the output as the first row of data. The default value is false. Type: boolean (or Expression with resultType boolean). - public DataFactoryElement FirstRowAsHeader { get; set; } - /// The null value string. Type: string (or Expression with resultType string). - public DataFactoryElement NullValue { get; set; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DelimitedTextReadSettings.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DelimitedTextReadSettings.Serialization.cs deleted file mode 100644 index f517c0a6..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DelimitedTextReadSettings.Serialization.cs +++ /dev/null @@ -1,82 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class DelimitedTextReadSettings : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - if (Optional.IsDefined(SkipLineCount)) - { - writer.WritePropertyName("skipLineCount"u8); - JsonSerializer.Serialize(writer, SkipLineCount); - } - if (Optional.IsDefined(CompressionProperties)) - { - writer.WritePropertyName("compressionProperties"u8); - writer.WriteObjectValue(CompressionProperties); - } - writer.WritePropertyName("type"u8); - writer.WriteStringValue(FormatReadSettingsType); - foreach (var item in AdditionalProperties) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.Value.ToString()).RootElement); -#endif - } - writer.WriteEndObject(); - } - - internal static DelimitedTextReadSettings DeserializeDelimitedTextReadSettings(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - Optional> skipLineCount = default; - Optional compressionProperties = default; - string type = default; - IDictionary> additionalProperties = default; - Dictionary> additionalPropertiesDictionary = new Dictionary>(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("skipLineCount"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - skipLineCount = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("compressionProperties"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - compressionProperties = CompressionReadSettings.DeserializeCompressionReadSettings(property.Value); - continue; - } - if (property.NameEquals("type"u8)) - { - type = property.Value.GetString(); - continue; - } - additionalPropertiesDictionary.Add(property.Name, JsonSerializer.Deserialize>(property.Value.GetRawText())); - } - additionalProperties = additionalPropertiesDictionary; - return new DelimitedTextReadSettings(type, additionalProperties, skipLineCount.Value, compressionProperties.Value); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DelimitedTextReadSettings.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DelimitedTextReadSettings.cs deleted file mode 100644 index a2f9dc9e..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DelimitedTextReadSettings.cs +++ /dev/null @@ -1,43 +0,0 @@ -// - -#nullable disable - -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// Delimited text read settings. - public partial class DelimitedTextReadSettings : FormatReadSettings - { - /// Initializes a new instance of DelimitedTextReadSettings. - public DelimitedTextReadSettings() - { - FormatReadSettingsType = "DelimitedTextReadSettings"; - } - - /// Initializes a new instance of DelimitedTextReadSettings. - /// The read setting type. - /// Additional Properties. - /// Indicates the number of non-empty rows to skip when reading data from input files. Type: integer (or Expression with resultType integer). - /// - /// Compression settings. - /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. - /// The available derived classes include , and . - /// - internal DelimitedTextReadSettings(string formatReadSettingsType, IDictionary> additionalProperties, DataFactoryElement skipLineCount, CompressionReadSettings compressionProperties) : base(formatReadSettingsType, additionalProperties) - { - SkipLineCount = skipLineCount; - CompressionProperties = compressionProperties; - FormatReadSettingsType = formatReadSettingsType ?? "DelimitedTextReadSettings"; - } - - /// Indicates the number of non-empty rows to skip when reading data from input files. Type: integer (or Expression with resultType integer). - public DataFactoryElement SkipLineCount { get; set; } - /// - /// Compression settings. - /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. - /// The available derived classes include , and . - /// - public CompressionReadSettings CompressionProperties { get; set; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DelimitedTextSink.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DelimitedTextSink.Serialization.cs deleted file mode 100644 index 6d6b0624..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DelimitedTextSink.Serialization.cs +++ /dev/null @@ -1,172 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class DelimitedTextSink : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - if (Optional.IsDefined(StoreSettings)) - { - writer.WritePropertyName("storeSettings"u8); - writer.WriteObjectValue(StoreSettings); - } - if (Optional.IsDefined(FormatSettings)) - { - writer.WritePropertyName("formatSettings"u8); - writer.WriteObjectValue(FormatSettings); - } - writer.WritePropertyName("type"u8); - writer.WriteStringValue(CopySinkType); - if (Optional.IsDefined(WriteBatchSize)) - { - writer.WritePropertyName("writeBatchSize"u8); - JsonSerializer.Serialize(writer, WriteBatchSize); - } - if (Optional.IsDefined(WriteBatchTimeout)) - { - writer.WritePropertyName("writeBatchTimeout"u8); - JsonSerializer.Serialize(writer, WriteBatchTimeout); - } - if (Optional.IsDefined(SinkRetryCount)) - { - writer.WritePropertyName("sinkRetryCount"u8); - JsonSerializer.Serialize(writer, SinkRetryCount); - } - if (Optional.IsDefined(SinkRetryWait)) - { - writer.WritePropertyName("sinkRetryWait"u8); - JsonSerializer.Serialize(writer, SinkRetryWait); - } - if (Optional.IsDefined(MaxConcurrentConnections)) - { - writer.WritePropertyName("maxConcurrentConnections"u8); - JsonSerializer.Serialize(writer, MaxConcurrentConnections); - } - if (Optional.IsDefined(DisableMetricsCollection)) - { - writer.WritePropertyName("disableMetricsCollection"u8); - JsonSerializer.Serialize(writer, DisableMetricsCollection); - } - foreach (var item in AdditionalProperties) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.Value.ToString()).RootElement); -#endif - } - writer.WriteEndObject(); - } - - internal static DelimitedTextSink DeserializeDelimitedTextSink(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - Optional storeSettings = default; - Optional formatSettings = default; - string type = default; - Optional> writeBatchSize = default; - Optional> writeBatchTimeout = default; - Optional> sinkRetryCount = default; - Optional> sinkRetryWait = default; - Optional> maxConcurrentConnections = default; - Optional> disableMetricsCollection = default; - IDictionary> additionalProperties = default; - Dictionary> additionalPropertiesDictionary = new Dictionary>(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("storeSettings"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - storeSettings = StoreWriteSettings.DeserializeStoreWriteSettings(property.Value); - continue; - } - if (property.NameEquals("formatSettings"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - formatSettings = DelimitedTextWriteSettings.DeserializeDelimitedTextWriteSettings(property.Value); - continue; - } - if (property.NameEquals("type"u8)) - { - type = property.Value.GetString(); - continue; - } - if (property.NameEquals("writeBatchSize"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - writeBatchSize = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("writeBatchTimeout"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - writeBatchTimeout = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("sinkRetryCount"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - sinkRetryCount = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("sinkRetryWait"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - sinkRetryWait = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("maxConcurrentConnections"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - maxConcurrentConnections = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("disableMetricsCollection"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - disableMetricsCollection = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - additionalPropertiesDictionary.Add(property.Name, JsonSerializer.Deserialize>(property.Value.GetRawText())); - } - additionalProperties = additionalPropertiesDictionary; - return new DelimitedTextSink(type, writeBatchSize.Value, writeBatchTimeout.Value, sinkRetryCount.Value, sinkRetryWait.Value, maxConcurrentConnections.Value, disableMetricsCollection.Value, additionalProperties, storeSettings.Value, formatSettings.Value); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DelimitedTextSink.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DelimitedTextSink.cs deleted file mode 100644 index d2f35f8b..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DelimitedTextSink.cs +++ /dev/null @@ -1,49 +0,0 @@ -// - -#nullable disable - -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// A copy activity DelimitedText sink. - public partial class DelimitedTextSink : CopySink - { - /// Initializes a new instance of DelimitedTextSink. - public DelimitedTextSink() - { - CopySinkType = "DelimitedTextSink"; - } - - /// Initializes a new instance of DelimitedTextSink. - /// Copy sink type. - /// Write batch size. Type: integer (or Expression with resultType integer), minimum: 0. - /// Write batch timeout. Type: string (or Expression with resultType string), pattern: ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). - /// Sink retry count. Type: integer (or Expression with resultType integer). - /// Sink retry wait. Type: string (or Expression with resultType string), pattern: ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). - /// The maximum concurrent connection count for the sink data store. Type: integer (or Expression with resultType integer). - /// If true, disable data store metrics collection. Default is false. Type: boolean (or Expression with resultType boolean). - /// Additional Properties. - /// - /// DelimitedText store settings. - /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. - /// The available derived classes include , , , , and . - /// - /// DelimitedText format settings. - internal DelimitedTextSink(string copySinkType, DataFactoryElement writeBatchSize, DataFactoryElement writeBatchTimeout, DataFactoryElement sinkRetryCount, DataFactoryElement sinkRetryWait, DataFactoryElement maxConcurrentConnections, DataFactoryElement disableMetricsCollection, IDictionary> additionalProperties, StoreWriteSettings storeSettings, DelimitedTextWriteSettings formatSettings) : base(copySinkType, writeBatchSize, writeBatchTimeout, sinkRetryCount, sinkRetryWait, maxConcurrentConnections, disableMetricsCollection, additionalProperties) - { - StoreSettings = storeSettings; - FormatSettings = formatSettings; - CopySinkType = copySinkType ?? "DelimitedTextSink"; - } - - /// - /// DelimitedText store settings. - /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. - /// The available derived classes include , , , , and . - /// - public StoreWriteSettings StoreSettings { get; set; } - /// DelimitedText format settings. - public DelimitedTextWriteSettings FormatSettings { get; set; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DelimitedTextSource.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DelimitedTextSource.Serialization.cs deleted file mode 100644 index a1fad128..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DelimitedTextSource.Serialization.cs +++ /dev/null @@ -1,161 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class DelimitedTextSource : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - if (Optional.IsDefined(StoreSettings)) - { - writer.WritePropertyName("storeSettings"u8); - writer.WriteObjectValue(StoreSettings); - } - if (Optional.IsDefined(FormatSettings)) - { - writer.WritePropertyName("formatSettings"u8); - writer.WriteObjectValue(FormatSettings); - } - if (Optional.IsDefined(AdditionalColumns)) - { - writer.WritePropertyName("additionalColumns"u8); -#if NET6_0_OR_GREATER - writer.WriteRawValue(AdditionalColumns); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(AdditionalColumns.ToString()).RootElement); -#endif - } - writer.WritePropertyName("type"u8); - writer.WriteStringValue(CopySourceType); - if (Optional.IsDefined(SourceRetryCount)) - { - writer.WritePropertyName("sourceRetryCount"u8); - JsonSerializer.Serialize(writer, SourceRetryCount); - } - if (Optional.IsDefined(SourceRetryWait)) - { - writer.WritePropertyName("sourceRetryWait"u8); - JsonSerializer.Serialize(writer, SourceRetryWait); - } - if (Optional.IsDefined(MaxConcurrentConnections)) - { - writer.WritePropertyName("maxConcurrentConnections"u8); - JsonSerializer.Serialize(writer, MaxConcurrentConnections); - } - if (Optional.IsDefined(DisableMetricsCollection)) - { - writer.WritePropertyName("disableMetricsCollection"u8); - JsonSerializer.Serialize(writer, DisableMetricsCollection); - } - foreach (var item in AdditionalProperties) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.Value.ToString()).RootElement); -#endif - } - writer.WriteEndObject(); - } - - internal static DelimitedTextSource DeserializeDelimitedTextSource(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - Optional storeSettings = default; - Optional formatSettings = default; - Optional additionalColumns = default; - string type = default; - Optional> sourceRetryCount = default; - Optional> sourceRetryWait = default; - Optional> maxConcurrentConnections = default; - Optional> disableMetricsCollection = default; - IDictionary> additionalProperties = default; - Dictionary> additionalPropertiesDictionary = new Dictionary>(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("storeSettings"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - storeSettings = StoreReadSettings.DeserializeStoreReadSettings(property.Value); - continue; - } - if (property.NameEquals("formatSettings"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - formatSettings = DelimitedTextReadSettings.DeserializeDelimitedTextReadSettings(property.Value); - continue; - } - if (property.NameEquals("additionalColumns"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - additionalColumns = BinaryData.FromString(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("type"u8)) - { - type = property.Value.GetString(); - continue; - } - if (property.NameEquals("sourceRetryCount"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - sourceRetryCount = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("sourceRetryWait"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - sourceRetryWait = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("maxConcurrentConnections"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - maxConcurrentConnections = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("disableMetricsCollection"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - disableMetricsCollection = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - additionalPropertiesDictionary.Add(property.Name, JsonSerializer.Deserialize>(property.Value.GetRawText())); - } - additionalProperties = additionalPropertiesDictionary; - return new DelimitedTextSource(type, sourceRetryCount.Value, sourceRetryWait.Value, maxConcurrentConnections.Value, disableMetricsCollection.Value, additionalProperties, storeSettings.Value, formatSettings.Value, additionalColumns.Value); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DelimitedTextSource.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DelimitedTextSource.cs deleted file mode 100644 index 2d2b33c1..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DelimitedTextSource.cs +++ /dev/null @@ -1,80 +0,0 @@ -// - -#nullable disable - -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// A copy activity DelimitedText source. - public partial class DelimitedTextSource : CopyActivitySource - { - /// Initializes a new instance of DelimitedTextSource. - public DelimitedTextSource() - { - CopySourceType = "DelimitedTextSource"; - } - - /// Initializes a new instance of DelimitedTextSource. - /// Copy source type. - /// Source retry count. Type: integer (or Expression with resultType integer). - /// Source retry wait. Type: string (or Expression with resultType string), pattern: ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). - /// The maximum concurrent connection count for the source data store. Type: integer (or Expression with resultType integer). - /// If true, disable data store metrics collection. Default is false. Type: boolean (or Expression with resultType boolean). - /// Additional Properties. - /// - /// DelimitedText store settings. - /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. - /// The available derived classes include , , , , , , , , , , , and . - /// - /// DelimitedText format settings. - /// Specifies the additional columns to be added to source data. Type: array of objects(AdditionalColumns) (or Expression with resultType array of objects). - internal DelimitedTextSource(string copySourceType, DataFactoryElement sourceRetryCount, DataFactoryElement sourceRetryWait, DataFactoryElement maxConcurrentConnections, DataFactoryElement disableMetricsCollection, IDictionary> additionalProperties, StoreReadSettings storeSettings, DelimitedTextReadSettings formatSettings, BinaryData additionalColumns) : base(copySourceType, sourceRetryCount, sourceRetryWait, maxConcurrentConnections, disableMetricsCollection, additionalProperties) - { - StoreSettings = storeSettings; - FormatSettings = formatSettings; - AdditionalColumns = additionalColumns; - CopySourceType = copySourceType ?? "DelimitedTextSource"; - } - - /// - /// DelimitedText store settings. - /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. - /// The available derived classes include , , , , , , , , , , , and . - /// - public StoreReadSettings StoreSettings { get; set; } - /// DelimitedText format settings. - public DelimitedTextReadSettings FormatSettings { get; set; } - /// - /// Specifies the additional columns to be added to source data. Type: array of objects(AdditionalColumns) (or Expression with resultType array of objects). - /// - /// To assign an object to this property use . - /// - /// - /// To assign an already formated json string to this property use . - /// - /// - /// Examples: - /// - /// - /// BinaryData.FromObjectAsJson("foo") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromString("\"foo\"") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromObjectAsJson(new { key = "value" }) - /// Creates a payload of { "key": "value" }. - /// - /// - /// BinaryData.FromString("{\"key\": \"value\"}") - /// Creates a payload of { "key": "value" }. - /// - /// - /// - /// - public BinaryData AdditionalColumns { get; set; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DelimitedTextWriteSettings.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DelimitedTextWriteSettings.Serialization.cs deleted file mode 100644 index 19b0a1fc..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DelimitedTextWriteSettings.Serialization.cs +++ /dev/null @@ -1,105 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class DelimitedTextWriteSettings : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - if (Optional.IsDefined(QuoteAllText)) - { - writer.WritePropertyName("quoteAllText"u8); - JsonSerializer.Serialize(writer, QuoteAllText); - } - writer.WritePropertyName("fileExtension"u8); - JsonSerializer.Serialize(writer, FileExtension); - if (Optional.IsDefined(MaxRowsPerFile)) - { - writer.WritePropertyName("maxRowsPerFile"u8); - JsonSerializer.Serialize(writer, MaxRowsPerFile); - } - if (Optional.IsDefined(FileNamePrefix)) - { - writer.WritePropertyName("fileNamePrefix"u8); - JsonSerializer.Serialize(writer, FileNamePrefix); - } - writer.WritePropertyName("type"u8); - writer.WriteStringValue(FormatWriteSettingsType); - foreach (var item in AdditionalProperties) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.Value.ToString()).RootElement); -#endif - } - writer.WriteEndObject(); - } - - internal static DelimitedTextWriteSettings DeserializeDelimitedTextWriteSettings(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - Optional> quoteAllText = default; - DataFactoryElement fileExtension = default; - Optional> maxRowsPerFile = default; - Optional> fileNamePrefix = default; - string type = default; - IDictionary> additionalProperties = default; - Dictionary> additionalPropertiesDictionary = new Dictionary>(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("quoteAllText"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - quoteAllText = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("fileExtension"u8)) - { - fileExtension = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("maxRowsPerFile"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - maxRowsPerFile = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("fileNamePrefix"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - fileNamePrefix = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("type"u8)) - { - type = property.Value.GetString(); - continue; - } - additionalPropertiesDictionary.Add(property.Name, JsonSerializer.Deserialize>(property.Value.GetRawText())); - } - additionalProperties = additionalPropertiesDictionary; - return new DelimitedTextWriteSettings(type, additionalProperties, quoteAllText.Value, fileExtension, maxRowsPerFile.Value, fileNamePrefix.Value); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DelimitedTextWriteSettings.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DelimitedTextWriteSettings.cs deleted file mode 100644 index d8fa6ba9..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DelimitedTextWriteSettings.cs +++ /dev/null @@ -1,49 +0,0 @@ -// - -#nullable disable - -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// Delimited text write settings. - public partial class DelimitedTextWriteSettings : FormatWriteSettings - { - /// Initializes a new instance of DelimitedTextWriteSettings. - /// The file extension used to create the files. Type: string (or Expression with resultType string). - /// is null. - public DelimitedTextWriteSettings(DataFactoryElement fileExtension) - { - Argument.AssertNotNull(fileExtension, nameof(fileExtension)); - - FileExtension = fileExtension; - FormatWriteSettingsType = "DelimitedTextWriteSettings"; - } - - /// Initializes a new instance of DelimitedTextWriteSettings. - /// The write setting type. - /// Additional Properties. - /// Indicates whether string values should always be enclosed with quotes. Type: boolean (or Expression with resultType boolean). - /// The file extension used to create the files. Type: string (or Expression with resultType string). - /// Limit the written file's row count to be smaller than or equal to the specified count. Type: integer (or Expression with resultType integer). - /// Specifies the file name pattern <fileNamePrefix>_<fileIndex>.<fileExtension> when copy from non-file based store without partitionOptions. Type: string (or Expression with resultType string). - internal DelimitedTextWriteSettings(string formatWriteSettingsType, IDictionary> additionalProperties, DataFactoryElement quoteAllText, DataFactoryElement fileExtension, DataFactoryElement maxRowsPerFile, DataFactoryElement fileNamePrefix) : base(formatWriteSettingsType, additionalProperties) - { - QuoteAllText = quoteAllText; - FileExtension = fileExtension; - MaxRowsPerFile = maxRowsPerFile; - FileNamePrefix = fileNamePrefix; - FormatWriteSettingsType = formatWriteSettingsType ?? "DelimitedTextWriteSettings"; - } - - /// Indicates whether string values should always be enclosed with quotes. Type: boolean (or Expression with resultType boolean). - public DataFactoryElement QuoteAllText { get; set; } - /// The file extension used to create the files. Type: string (or Expression with resultType string). - public DataFactoryElement FileExtension { get; set; } - /// Limit the written file's row count to be smaller than or equal to the specified count. Type: integer (or Expression with resultType integer). - public DataFactoryElement MaxRowsPerFile { get; set; } - /// Specifies the file name pattern <fileNamePrefix>_<fileIndex>.<fileExtension> when copy from non-file based store without partitionOptions. Type: string (or Expression with resultType string). - public DataFactoryElement FileNamePrefix { get; set; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DependencyCondition.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DependencyCondition.cs deleted file mode 100644 index 995a8ba7..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DependencyCondition.cs +++ /dev/null @@ -1,53 +0,0 @@ -// - -#nullable disable - -using System.ComponentModel; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// The DependencyCondition. - public readonly partial struct DependencyCondition : IEquatable - { - private readonly string _value; - - /// Initializes a new instance of . - /// is null. - public DependencyCondition(string value) - { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } - - private const string SucceededValue = "Succeeded"; - private const string FailedValue = "Failed"; - private const string SkippedValue = "Skipped"; - private const string CompletedValue = "Completed"; - - /// Succeeded. - public static DependencyCondition Succeeded { get; } = new DependencyCondition(SucceededValue); - /// Failed. - public static DependencyCondition Failed { get; } = new DependencyCondition(FailedValue); - /// Skipped. - public static DependencyCondition Skipped { get; } = new DependencyCondition(SkippedValue); - /// Completed. - public static DependencyCondition Completed { get; } = new DependencyCondition(CompletedValue); - /// Determines if two values are the same. - public static bool operator ==(DependencyCondition left, DependencyCondition right) => left.Equals(right); - /// Determines if two values are not the same. - public static bool operator !=(DependencyCondition left, DependencyCondition right) => !left.Equals(right); - /// Converts a string to a . - public static implicit operator DependencyCondition(string value) => new DependencyCondition(value); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override bool Equals(object obj) => obj is DependencyCondition other && Equals(other); - /// - public bool Equals(DependencyCondition other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override int GetHashCode() => _value?.GetHashCode() ?? 0; - /// - public override string ToString() => _value; - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DependencyReference.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DependencyReference.Serialization.cs deleted file mode 100644 index 3de58dce..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DependencyReference.Serialization.cs +++ /dev/null @@ -1,38 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class DependencyReference : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - writer.WritePropertyName("type"u8); - writer.WriteStringValue(DependencyReferenceType); - writer.WriteEndObject(); - } - - internal static DependencyReference DeserializeDependencyReference(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - if (element.TryGetProperty("type", out JsonElement discriminator)) - { - switch (discriminator.GetString()) - { - case "SelfDependencyTumblingWindowTriggerReference": return SelfDependencyTumblingWindowTriggerReference.DeserializeSelfDependencyTumblingWindowTriggerReference(element); - case "TriggerDependencyReference": return TriggerDependencyReference.DeserializeTriggerDependencyReference(element); - case "TumblingWindowTriggerDependencyReference": return TumblingWindowTriggerDependencyReference.DeserializeTumblingWindowTriggerDependencyReference(element); - } - } - return UnknownDependencyReference.DeserializeUnknownDependencyReference(element); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DependencyReference.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DependencyReference.cs deleted file mode 100644 index b1803eb8..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DependencyReference.cs +++ /dev/null @@ -1,29 +0,0 @@ -// - -#nullable disable - -namespace AzureDataFactory.TestingFramework.Models -{ - /// - /// Referenced dependency. - /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. - /// The available derived classes include , and . - /// - public abstract partial class DependencyReference - { - /// Initializes a new instance of DependencyReference. - protected DependencyReference() - { - } - - /// Initializes a new instance of DependencyReference. - /// The type of dependency reference. - internal DependencyReference(string dependencyReferenceType) - { - DependencyReferenceType = dependencyReferenceType; - } - - /// The type of dependency reference. - internal string DependencyReferenceType { get; set; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DistcpSettings.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DistcpSettings.Serialization.cs deleted file mode 100644 index a7a36817..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DistcpSettings.Serialization.cs +++ /dev/null @@ -1,62 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class DistcpSettings : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - writer.WritePropertyName("resourceManagerEndpoint"u8); - JsonSerializer.Serialize(writer, ResourceManagerEndpoint); - writer.WritePropertyName("tempScriptPath"u8); - JsonSerializer.Serialize(writer, TempScriptPath); - if (Optional.IsDefined(DistcpOptions)) - { - writer.WritePropertyName("distcpOptions"u8); - JsonSerializer.Serialize(writer, DistcpOptions); - } - writer.WriteEndObject(); - } - - internal static DistcpSettings DeserializeDistcpSettings(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - DataFactoryElement resourceManagerEndpoint = default; - DataFactoryElement tempScriptPath = default; - Optional> distcpOptions = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("resourceManagerEndpoint"u8)) - { - resourceManagerEndpoint = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("tempScriptPath"u8)) - { - tempScriptPath = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("distcpOptions"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - distcpOptions = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - } - return new DistcpSettings(resourceManagerEndpoint, tempScriptPath, distcpOptions.Value); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DistcpSettings.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DistcpSettings.cs deleted file mode 100644 index 9b9cc8c1..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DistcpSettings.cs +++ /dev/null @@ -1,44 +0,0 @@ -// - -#nullable disable - -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// Distcp settings. - public partial class DistcpSettings - { - /// Initializes a new instance of DistcpSettings. - /// Specifies the Yarn ResourceManager endpoint. Type: string (or Expression with resultType string). - /// Specifies an existing folder path which will be used to store temp Distcp command script. The script file is generated by ADF and will be removed after Copy job finished. Type: string (or Expression with resultType string). - /// or is null. - public DistcpSettings(DataFactoryElement resourceManagerEndpoint, DataFactoryElement tempScriptPath) - { - Argument.AssertNotNull(resourceManagerEndpoint, nameof(resourceManagerEndpoint)); - Argument.AssertNotNull(tempScriptPath, nameof(tempScriptPath)); - - ResourceManagerEndpoint = resourceManagerEndpoint; - TempScriptPath = tempScriptPath; - } - - /// Initializes a new instance of DistcpSettings. - /// Specifies the Yarn ResourceManager endpoint. Type: string (or Expression with resultType string). - /// Specifies an existing folder path which will be used to store temp Distcp command script. The script file is generated by ADF and will be removed after Copy job finished. Type: string (or Expression with resultType string). - /// Specifies the Distcp options. Type: string (or Expression with resultType string). - internal DistcpSettings(DataFactoryElement resourceManagerEndpoint, DataFactoryElement tempScriptPath, DataFactoryElement distcpOptions) - { - ResourceManagerEndpoint = resourceManagerEndpoint; - TempScriptPath = tempScriptPath; - DistcpOptions = distcpOptions; - } - - /// Specifies the Yarn ResourceManager endpoint. Type: string (or Expression with resultType string). - public DataFactoryElement ResourceManagerEndpoint { get; set; } - /// Specifies an existing folder path which will be used to store temp Distcp command script. The script file is generated by ADF and will be removed after Copy job finished. Type: string (or Expression with resultType string). - public DataFactoryElement TempScriptPath { get; set; } - /// Specifies the Distcp options. Type: string (or Expression with resultType string). - public DataFactoryElement DistcpOptions { get; set; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DocumentDBCollectionDataset.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DocumentDBCollectionDataset.Serialization.cs deleted file mode 100644 index 5eebb625..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DocumentDBCollectionDataset.Serialization.cs +++ /dev/null @@ -1,205 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class DocumentDBCollectionDataset : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - writer.WritePropertyName("type"u8); - writer.WriteStringValue(DatasetType); - if (Optional.IsDefined(Description)) - { - writer.WritePropertyName("description"u8); - writer.WriteStringValue(Description); - } - if (Optional.IsDefined(Structure)) - { - writer.WritePropertyName("structure"u8); - JsonSerializer.Serialize(writer, Structure); - } - if (Optional.IsDefined(Schema)) - { - writer.WritePropertyName("schema"u8); - JsonSerializer.Serialize(writer, Schema); - } - writer.WritePropertyName("linkedServiceName"u8); - JsonSerializer.Serialize(writer, LinkedServiceName); if (Optional.IsCollectionDefined(Parameters)) - { - writer.WritePropertyName("parameters"u8); - writer.WriteStartObject(); - foreach (var item in Parameters) - { - writer.WritePropertyName(item.Key); - writer.WriteObjectValue(item.Value); - } - writer.WriteEndObject(); - } - if (Optional.IsCollectionDefined(Annotations)) - { - writer.WritePropertyName("annotations"u8); - writer.WriteStartArray(); - foreach (var item in Annotations) - { - if (item == null) - { - writer.WriteNullValue(); - continue; - } -#if NET6_0_OR_GREATER - writer.WriteRawValue(item); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.ToString()).RootElement); -#endif - } - writer.WriteEndArray(); - } - if (Optional.IsDefined(Folder)) - { - writer.WritePropertyName("folder"u8); - writer.WriteObjectValue(Folder); - } - writer.WritePropertyName("typeProperties"u8); - writer.WriteStartObject(); - writer.WritePropertyName("collectionName"u8); - JsonSerializer.Serialize(writer, CollectionName); - writer.WriteEndObject(); - foreach (var item in AdditionalProperties) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.Value.ToString()).RootElement); -#endif - } - writer.WriteEndObject(); - } - - internal static DocumentDBCollectionDataset DeserializeDocumentDBCollectionDataset(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - string type = default; - Optional description = default; - Optional>> structure = default; - Optional>> schema = default; - DataFactoryLinkedServiceReference linkedServiceName = default; - Optional> parameters = default; - Optional> annotations = default; - Optional folder = default; - DataFactoryElement collectionName = default; - IDictionary> additionalProperties = default; - Dictionary> additionalPropertiesDictionary = new Dictionary>(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("type"u8)) - { - type = property.Value.GetString(); - continue; - } - if (property.NameEquals("description"u8)) - { - description = property.Value.GetString(); - continue; - } - if (property.NameEquals("structure"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - structure = JsonSerializer.Deserialize>>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("schema"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - schema = JsonSerializer.Deserialize>>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("linkedServiceName"u8)) - { - linkedServiceName = JsonSerializer.Deserialize(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("parameters"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - Dictionary dictionary = new Dictionary(); - foreach (var property0 in property.Value.EnumerateObject()) - { - dictionary.Add(property0.Name, EntityParameterSpecification.DeserializeEntityParameterSpecification(property0.Value)); - } - parameters = dictionary; - continue; - } - if (property.NameEquals("annotations"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - if (item.ValueKind == JsonValueKind.Null) - { - array.Add(null); - } - else - { - array.Add(BinaryData.FromString(item.GetRawText())); - } - } - annotations = array; - continue; - } - if (property.NameEquals("folder"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - folder = DatasetFolder.DeserializeDatasetFolder(property.Value); - continue; - } - if (property.NameEquals("typeProperties"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - foreach (var property0 in property.Value.EnumerateObject()) - { - if (property0.NameEquals("collectionName"u8)) - { - collectionName = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - } - continue; - } - additionalPropertiesDictionary.Add(property.Name, JsonSerializer.Deserialize>(property.Value.GetRawText())); - } - additionalProperties = additionalPropertiesDictionary; - return new DocumentDBCollectionDataset(type, description.Value, structure.Value, schema.Value, linkedServiceName, Optional.ToDictionary(parameters), Optional.ToList(annotations), folder.Value, additionalProperties, collectionName); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DocumentDBCollectionDataset.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DocumentDBCollectionDataset.cs deleted file mode 100644 index ba64e1eb..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DocumentDBCollectionDataset.cs +++ /dev/null @@ -1,46 +0,0 @@ -// - -#nullable disable - -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// Microsoft Azure Document Database Collection dataset. - public partial class DocumentDBCollectionDataset : DataFactoryDatasetProperties - { - /// Initializes a new instance of DocumentDBCollectionDataset. - /// Linked service reference. - /// Document Database collection name. Type: string (or Expression with resultType string). - /// or is null. - public DocumentDBCollectionDataset(DataFactoryLinkedServiceReference linkedServiceName, DataFactoryElement collectionName) : base(linkedServiceName) - { - Argument.AssertNotNull(linkedServiceName, nameof(linkedServiceName)); - Argument.AssertNotNull(collectionName, nameof(collectionName)); - - CollectionName = collectionName; - DatasetType = "DocumentDbCollection"; - } - - /// Initializes a new instance of DocumentDBCollectionDataset. - /// Type of dataset. - /// Dataset description. - /// Columns that define the structure of the dataset. Type: array (or Expression with resultType array), itemType: DatasetDataElement. - /// Columns that define the physical type schema of the dataset. Type: array (or Expression with resultType array), itemType: DatasetSchemaDataElement. - /// Linked service reference. - /// Parameters for dataset. - /// List of tags that can be used for describing the Dataset. - /// The folder that this Dataset is in. If not specified, Dataset will appear at the root level. - /// Additional Properties. - /// Document Database collection name. Type: string (or Expression with resultType string). - internal DocumentDBCollectionDataset(string datasetType, string description, DataFactoryElement> structure, DataFactoryElement> schema, DataFactoryLinkedServiceReference linkedServiceName, IDictionary parameters, IList annotations, DatasetFolder folder, IDictionary> additionalProperties, DataFactoryElement collectionName) : base(datasetType, description, structure, schema, linkedServiceName, parameters, annotations, folder, additionalProperties) - { - CollectionName = collectionName; - DatasetType = datasetType ?? "DocumentDbCollection"; - } - - /// Document Database collection name. Type: string (or Expression with resultType string). - public DataFactoryElement CollectionName { get; set; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DocumentDBCollectionSink.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DocumentDBCollectionSink.Serialization.cs deleted file mode 100644 index a9b498cb..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DocumentDBCollectionSink.Serialization.cs +++ /dev/null @@ -1,172 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class DocumentDBCollectionSink : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - if (Optional.IsDefined(NestingSeparator)) - { - writer.WritePropertyName("nestingSeparator"u8); - JsonSerializer.Serialize(writer, NestingSeparator); - } - if (Optional.IsDefined(WriteBehavior)) - { - writer.WritePropertyName("writeBehavior"u8); - JsonSerializer.Serialize(writer, WriteBehavior); - } - writer.WritePropertyName("type"u8); - writer.WriteStringValue(CopySinkType); - if (Optional.IsDefined(WriteBatchSize)) - { - writer.WritePropertyName("writeBatchSize"u8); - JsonSerializer.Serialize(writer, WriteBatchSize); - } - if (Optional.IsDefined(WriteBatchTimeout)) - { - writer.WritePropertyName("writeBatchTimeout"u8); - JsonSerializer.Serialize(writer, WriteBatchTimeout); - } - if (Optional.IsDefined(SinkRetryCount)) - { - writer.WritePropertyName("sinkRetryCount"u8); - JsonSerializer.Serialize(writer, SinkRetryCount); - } - if (Optional.IsDefined(SinkRetryWait)) - { - writer.WritePropertyName("sinkRetryWait"u8); - JsonSerializer.Serialize(writer, SinkRetryWait); - } - if (Optional.IsDefined(MaxConcurrentConnections)) - { - writer.WritePropertyName("maxConcurrentConnections"u8); - JsonSerializer.Serialize(writer, MaxConcurrentConnections); - } - if (Optional.IsDefined(DisableMetricsCollection)) - { - writer.WritePropertyName("disableMetricsCollection"u8); - JsonSerializer.Serialize(writer, DisableMetricsCollection); - } - foreach (var item in AdditionalProperties) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.Value.ToString()).RootElement); -#endif - } - writer.WriteEndObject(); - } - - internal static DocumentDBCollectionSink DeserializeDocumentDBCollectionSink(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - Optional> nestingSeparator = default; - Optional> writeBehavior = default; - string type = default; - Optional> writeBatchSize = default; - Optional> writeBatchTimeout = default; - Optional> sinkRetryCount = default; - Optional> sinkRetryWait = default; - Optional> maxConcurrentConnections = default; - Optional> disableMetricsCollection = default; - IDictionary> additionalProperties = default; - Dictionary> additionalPropertiesDictionary = new Dictionary>(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("nestingSeparator"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - nestingSeparator = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("writeBehavior"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - writeBehavior = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("type"u8)) - { - type = property.Value.GetString(); - continue; - } - if (property.NameEquals("writeBatchSize"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - writeBatchSize = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("writeBatchTimeout"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - writeBatchTimeout = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("sinkRetryCount"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - sinkRetryCount = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("sinkRetryWait"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - sinkRetryWait = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("maxConcurrentConnections"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - maxConcurrentConnections = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("disableMetricsCollection"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - disableMetricsCollection = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - additionalPropertiesDictionary.Add(property.Name, JsonSerializer.Deserialize>(property.Value.GetRawText())); - } - additionalProperties = additionalPropertiesDictionary; - return new DocumentDBCollectionSink(type, writeBatchSize.Value, writeBatchTimeout.Value, sinkRetryCount.Value, sinkRetryWait.Value, maxConcurrentConnections.Value, disableMetricsCollection.Value, additionalProperties, nestingSeparator.Value, writeBehavior.Value); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DocumentDBCollectionSink.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DocumentDBCollectionSink.cs deleted file mode 100644 index c60bc12a..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DocumentDBCollectionSink.cs +++ /dev/null @@ -1,41 +0,0 @@ -// - -#nullable disable - -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// A copy activity Document Database Collection sink. - public partial class DocumentDBCollectionSink : CopySink - { - /// Initializes a new instance of DocumentDBCollectionSink. - public DocumentDBCollectionSink() - { - CopySinkType = "DocumentDbCollectionSink"; - } - - /// Initializes a new instance of DocumentDBCollectionSink. - /// Copy sink type. - /// Write batch size. Type: integer (or Expression with resultType integer), minimum: 0. - /// Write batch timeout. Type: string (or Expression with resultType string), pattern: ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). - /// Sink retry count. Type: integer (or Expression with resultType integer). - /// Sink retry wait. Type: string (or Expression with resultType string), pattern: ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). - /// The maximum concurrent connection count for the sink data store. Type: integer (or Expression with resultType integer). - /// If true, disable data store metrics collection. Default is false. Type: boolean (or Expression with resultType boolean). - /// Additional Properties. - /// Nested properties separator. Default is . (dot). Type: string (or Expression with resultType string). - /// Describes how to write data to Azure Cosmos DB. Type: string (or Expression with resultType string). Allowed values: insert and upsert. - internal DocumentDBCollectionSink(string copySinkType, DataFactoryElement writeBatchSize, DataFactoryElement writeBatchTimeout, DataFactoryElement sinkRetryCount, DataFactoryElement sinkRetryWait, DataFactoryElement maxConcurrentConnections, DataFactoryElement disableMetricsCollection, IDictionary> additionalProperties, DataFactoryElement nestingSeparator, DataFactoryElement writeBehavior) : base(copySinkType, writeBatchSize, writeBatchTimeout, sinkRetryCount, sinkRetryWait, maxConcurrentConnections, disableMetricsCollection, additionalProperties) - { - NestingSeparator = nestingSeparator; - WriteBehavior = writeBehavior; - CopySinkType = copySinkType ?? "DocumentDbCollectionSink"; - } - - /// Nested properties separator. Default is . (dot). Type: string (or Expression with resultType string). - public DataFactoryElement NestingSeparator { get; set; } - /// Describes how to write data to Azure Cosmos DB. Type: string (or Expression with resultType string). Allowed values: insert and upsert. - public DataFactoryElement WriteBehavior { get; set; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DocumentDBCollectionSource.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DocumentDBCollectionSource.Serialization.cs deleted file mode 100644 index 3c4b80e5..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DocumentDBCollectionSource.Serialization.cs +++ /dev/null @@ -1,176 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class DocumentDBCollectionSource : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - if (Optional.IsDefined(Query)) - { - writer.WritePropertyName("query"u8); - JsonSerializer.Serialize(writer, Query); - } - if (Optional.IsDefined(NestingSeparator)) - { - writer.WritePropertyName("nestingSeparator"u8); - JsonSerializer.Serialize(writer, NestingSeparator); - } - if (Optional.IsDefined(QueryTimeout)) - { - writer.WritePropertyName("queryTimeout"u8); - JsonSerializer.Serialize(writer, QueryTimeout); - } - if (Optional.IsDefined(AdditionalColumns)) - { - writer.WritePropertyName("additionalColumns"u8); -#if NET6_0_OR_GREATER - writer.WriteRawValue(AdditionalColumns); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(AdditionalColumns.ToString()).RootElement); -#endif - } - writer.WritePropertyName("type"u8); - writer.WriteStringValue(CopySourceType); - if (Optional.IsDefined(SourceRetryCount)) - { - writer.WritePropertyName("sourceRetryCount"u8); - JsonSerializer.Serialize(writer, SourceRetryCount); - } - if (Optional.IsDefined(SourceRetryWait)) - { - writer.WritePropertyName("sourceRetryWait"u8); - JsonSerializer.Serialize(writer, SourceRetryWait); - } - if (Optional.IsDefined(MaxConcurrentConnections)) - { - writer.WritePropertyName("maxConcurrentConnections"u8); - JsonSerializer.Serialize(writer, MaxConcurrentConnections); - } - if (Optional.IsDefined(DisableMetricsCollection)) - { - writer.WritePropertyName("disableMetricsCollection"u8); - JsonSerializer.Serialize(writer, DisableMetricsCollection); - } - foreach (var item in AdditionalProperties) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.Value.ToString()).RootElement); -#endif - } - writer.WriteEndObject(); - } - - internal static DocumentDBCollectionSource DeserializeDocumentDBCollectionSource(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - Optional> query = default; - Optional> nestingSeparator = default; - Optional> queryTimeout = default; - Optional additionalColumns = default; - string type = default; - Optional> sourceRetryCount = default; - Optional> sourceRetryWait = default; - Optional> maxConcurrentConnections = default; - Optional> disableMetricsCollection = default; - IDictionary> additionalProperties = default; - Dictionary> additionalPropertiesDictionary = new Dictionary>(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("query"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - query = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("nestingSeparator"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - nestingSeparator = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("queryTimeout"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - queryTimeout = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("additionalColumns"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - additionalColumns = BinaryData.FromString(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("type"u8)) - { - type = property.Value.GetString(); - continue; - } - if (property.NameEquals("sourceRetryCount"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - sourceRetryCount = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("sourceRetryWait"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - sourceRetryWait = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("maxConcurrentConnections"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - maxConcurrentConnections = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("disableMetricsCollection"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - disableMetricsCollection = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - additionalPropertiesDictionary.Add(property.Name, JsonSerializer.Deserialize>(property.Value.GetRawText())); - } - additionalProperties = additionalPropertiesDictionary; - return new DocumentDBCollectionSource(type, sourceRetryCount.Value, sourceRetryWait.Value, maxConcurrentConnections.Value, disableMetricsCollection.Value, additionalProperties, query.Value, nestingSeparator.Value, queryTimeout.Value, additionalColumns.Value); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DocumentDBCollectionSource.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DocumentDBCollectionSource.cs deleted file mode 100644 index 8e3c1286..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DocumentDBCollectionSource.cs +++ /dev/null @@ -1,76 +0,0 @@ -// - -#nullable disable - -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// A copy activity Document Database Collection source. - public partial class DocumentDBCollectionSource : CopyActivitySource - { - /// Initializes a new instance of DocumentDBCollectionSource. - public DocumentDBCollectionSource() - { - CopySourceType = "DocumentDbCollectionSource"; - } - - /// Initializes a new instance of DocumentDBCollectionSource. - /// Copy source type. - /// Source retry count. Type: integer (or Expression with resultType integer). - /// Source retry wait. Type: string (or Expression with resultType string), pattern: ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). - /// The maximum concurrent connection count for the source data store. Type: integer (or Expression with resultType integer). - /// If true, disable data store metrics collection. Default is false. Type: boolean (or Expression with resultType boolean). - /// Additional Properties. - /// Documents query. Type: string (or Expression with resultType string). - /// Nested properties separator. Type: string (or Expression with resultType string). - /// 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). - internal DocumentDBCollectionSource(string copySourceType, DataFactoryElement sourceRetryCount, DataFactoryElement sourceRetryWait, DataFactoryElement maxConcurrentConnections, DataFactoryElement disableMetricsCollection, IDictionary> additionalProperties, DataFactoryElement query, DataFactoryElement nestingSeparator, DataFactoryElement queryTimeout, BinaryData additionalColumns) : base(copySourceType, sourceRetryCount, sourceRetryWait, maxConcurrentConnections, disableMetricsCollection, additionalProperties) - { - Query = query; - NestingSeparator = nestingSeparator; - QueryTimeout = queryTimeout; - AdditionalColumns = additionalColumns; - CopySourceType = copySourceType ?? "DocumentDbCollectionSource"; - } - - /// Documents query. Type: string (or Expression with resultType string). - public DataFactoryElement Query { get; set; } - /// Nested properties separator. Type: string (or Expression with resultType string). - public DataFactoryElement NestingSeparator { get; set; } - /// Query timeout. Type: string (or Expression with resultType string), pattern: ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). - public DataFactoryElement QueryTimeout { get; set; } - /// - /// Specifies the additional columns to be added to source data. Type: array of objects(AdditionalColumns) (or Expression with resultType array of objects). - /// - /// To assign an object to this property use . - /// - /// - /// To assign an already formated json string to this property use . - /// - /// - /// Examples: - /// - /// - /// BinaryData.FromObjectAsJson("foo") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromString("\"foo\"") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromObjectAsJson(new { key = "value" }) - /// Creates a payload of { "key": "value" }. - /// - /// - /// BinaryData.FromString("{\"key\": \"value\"}") - /// Creates a payload of { "key": "value" }. - /// - /// - /// - /// - public BinaryData AdditionalColumns { get; set; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DrillLinkedService.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DrillLinkedService.Serialization.cs deleted file mode 100644 index 0fb0a5ec..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DrillLinkedService.Serialization.cs +++ /dev/null @@ -1,201 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class DrillLinkedService : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - writer.WritePropertyName("type"u8); - writer.WriteStringValue(LinkedServiceType); - if (Optional.IsDefined(ConnectVia)) - { - writer.WritePropertyName("connectVia"u8); - writer.WriteObjectValue(ConnectVia); - } - if (Optional.IsDefined(Description)) - { - writer.WritePropertyName("description"u8); - writer.WriteStringValue(Description); - } - if (Optional.IsCollectionDefined(Parameters)) - { - writer.WritePropertyName("parameters"u8); - writer.WriteStartObject(); - foreach (var item in Parameters) - { - writer.WritePropertyName(item.Key); - writer.WriteObjectValue(item.Value); - } - writer.WriteEndObject(); - } - if (Optional.IsCollectionDefined(Annotations)) - { - writer.WritePropertyName("annotations"u8); - writer.WriteStartArray(); - foreach (var item in Annotations) - { - if (item == null) - { - writer.WriteNullValue(); - continue; - } -#if NET6_0_OR_GREATER - writer.WriteRawValue(item); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.ToString()).RootElement); -#endif - } - writer.WriteEndArray(); - } - writer.WritePropertyName("typeProperties"u8); - writer.WriteStartObject(); - if (Optional.IsDefined(ConnectionString)) - { - writer.WritePropertyName("connectionString"u8); - JsonSerializer.Serialize(writer, ConnectionString); - } - if (Optional.IsDefined(Password)) - { - writer.WritePropertyName("pwd"u8); - JsonSerializer.Serialize(writer, Password); - } - if (Optional.IsDefined(EncryptedCredential)) - { - writer.WritePropertyName("encryptedCredential"u8); - writer.WriteStringValue(EncryptedCredential); - } - writer.WriteEndObject(); - foreach (var item in AdditionalProperties) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.Value.ToString()).RootElement); -#endif - } - writer.WriteEndObject(); - } - - internal static DrillLinkedService DeserializeDrillLinkedService(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - string type = default; - Optional connectVia = default; - Optional description = default; - Optional> parameters = default; - Optional> annotations = default; - Optional> connectionString = default; - Optional password = default; - Optional encryptedCredential = default; - IDictionary> additionalProperties = default; - Dictionary> additionalPropertiesDictionary = new Dictionary>(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("type"u8)) - { - type = property.Value.GetString(); - continue; - } - if (property.NameEquals("connectVia"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - connectVia = IntegrationRuntimeReference.DeserializeIntegrationRuntimeReference(property.Value); - continue; - } - if (property.NameEquals("description"u8)) - { - description = property.Value.GetString(); - continue; - } - if (property.NameEquals("parameters"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - Dictionary dictionary = new Dictionary(); - foreach (var property0 in property.Value.EnumerateObject()) - { - dictionary.Add(property0.Name, EntityParameterSpecification.DeserializeEntityParameterSpecification(property0.Value)); - } - parameters = dictionary; - continue; - } - if (property.NameEquals("annotations"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - if (item.ValueKind == JsonValueKind.Null) - { - array.Add(null); - } - else - { - array.Add(BinaryData.FromString(item.GetRawText())); - } - } - annotations = array; - continue; - } - if (property.NameEquals("typeProperties"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - foreach (var property0 in property.Value.EnumerateObject()) - { - if (property0.NameEquals("connectionString"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - connectionString = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("pwd"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - password = JsonSerializer.Deserialize(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("encryptedCredential"u8)) - { - encryptedCredential = property0.Value.GetString(); - continue; - } - } - continue; - } - additionalPropertiesDictionary.Add(property.Name, JsonSerializer.Deserialize>(property.Value.GetRawText())); - } - additionalProperties = additionalPropertiesDictionary; - return new DrillLinkedService(type, connectVia.Value, description.Value, Optional.ToDictionary(parameters), Optional.ToList(annotations), additionalProperties, connectionString.Value, password, encryptedCredential.Value); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DrillLinkedService.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DrillLinkedService.cs deleted file mode 100644 index 80b158dd..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DrillLinkedService.cs +++ /dev/null @@ -1,43 +0,0 @@ -// - -#nullable disable - -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// Drill server linked service. - public partial class DrillLinkedService : DataFactoryLinkedServiceProperties - { - /// Initializes a new instance of DrillLinkedService. - public DrillLinkedService() - { - LinkedServiceType = "Drill"; - } - - /// Initializes a new instance of DrillLinkedService. - /// Type of linked service. - /// The integration runtime reference. - /// Linked service description. - /// Parameters for linked service. - /// List of tags that can be used for describing the linked service. - /// Additional Properties. - /// An ODBC connection string. Type: string, SecureString or AzureKeyVaultSecretReference. - /// The Azure key vault secret reference of password in connection string. - /// The encrypted credential used for authentication. Credentials are encrypted using the integration runtime credential manager. Type: string. - internal DrillLinkedService(string linkedServiceType, IntegrationRuntimeReference connectVia, string description, IDictionary parameters, IList annotations, IDictionary> additionalProperties, DataFactoryElement connectionString, DataFactoryKeyVaultSecretReference password, string encryptedCredential) : base(linkedServiceType, connectVia, description, parameters, annotations, additionalProperties) - { - ConnectionString = connectionString; - Password = password; - EncryptedCredential = encryptedCredential; - LinkedServiceType = linkedServiceType ?? "Drill"; - } - - /// An ODBC connection string. Type: string, SecureString or AzureKeyVaultSecretReference. - public DataFactoryElement ConnectionString { get; set; } - /// The Azure key vault secret reference of password in connection string. - public DataFactoryKeyVaultSecretReference Password { get; set; } - /// The encrypted credential used for authentication. Credentials are encrypted using the integration runtime credential manager. Type: string. - public string EncryptedCredential { get; set; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DrillSource.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DrillSource.Serialization.cs deleted file mode 100644 index 65889df5..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DrillSource.Serialization.cs +++ /dev/null @@ -1,161 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class DrillSource : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - if (Optional.IsDefined(Query)) - { - writer.WritePropertyName("query"u8); - JsonSerializer.Serialize(writer, Query); - } - if (Optional.IsDefined(QueryTimeout)) - { - writer.WritePropertyName("queryTimeout"u8); - JsonSerializer.Serialize(writer, QueryTimeout); - } - if (Optional.IsDefined(AdditionalColumns)) - { - writer.WritePropertyName("additionalColumns"u8); -#if NET6_0_OR_GREATER - writer.WriteRawValue(AdditionalColumns); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(AdditionalColumns.ToString()).RootElement); -#endif - } - writer.WritePropertyName("type"u8); - writer.WriteStringValue(CopySourceType); - if (Optional.IsDefined(SourceRetryCount)) - { - writer.WritePropertyName("sourceRetryCount"u8); - JsonSerializer.Serialize(writer, SourceRetryCount); - } - if (Optional.IsDefined(SourceRetryWait)) - { - writer.WritePropertyName("sourceRetryWait"u8); - JsonSerializer.Serialize(writer, SourceRetryWait); - } - if (Optional.IsDefined(MaxConcurrentConnections)) - { - writer.WritePropertyName("maxConcurrentConnections"u8); - JsonSerializer.Serialize(writer, MaxConcurrentConnections); - } - if (Optional.IsDefined(DisableMetricsCollection)) - { - writer.WritePropertyName("disableMetricsCollection"u8); - JsonSerializer.Serialize(writer, DisableMetricsCollection); - } - foreach (var item in AdditionalProperties) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.Value.ToString()).RootElement); -#endif - } - writer.WriteEndObject(); - } - - internal static DrillSource DeserializeDrillSource(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - Optional> query = default; - Optional> queryTimeout = default; - Optional additionalColumns = default; - string type = default; - Optional> sourceRetryCount = default; - Optional> sourceRetryWait = default; - Optional> maxConcurrentConnections = default; - Optional> disableMetricsCollection = default; - IDictionary> additionalProperties = default; - Dictionary> additionalPropertiesDictionary = new Dictionary>(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("query"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - query = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("queryTimeout"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - queryTimeout = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("additionalColumns"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - additionalColumns = BinaryData.FromString(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("type"u8)) - { - type = property.Value.GetString(); - continue; - } - if (property.NameEquals("sourceRetryCount"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - sourceRetryCount = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("sourceRetryWait"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - sourceRetryWait = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("maxConcurrentConnections"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - maxConcurrentConnections = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("disableMetricsCollection"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - disableMetricsCollection = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - additionalPropertiesDictionary.Add(property.Name, JsonSerializer.Deserialize>(property.Value.GetRawText())); - } - additionalProperties = additionalPropertiesDictionary; - return new DrillSource(type, sourceRetryCount.Value, sourceRetryWait.Value, maxConcurrentConnections.Value, disableMetricsCollection.Value, additionalProperties, queryTimeout.Value, additionalColumns.Value, query.Value); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DrillSource.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DrillSource.cs deleted file mode 100644 index d51483a4..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DrillSource.cs +++ /dev/null @@ -1,37 +0,0 @@ -// - -#nullable disable - -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// A copy activity Drill server source. - public partial class DrillSource : TabularSource - { - /// Initializes a new instance of DrillSource. - public DrillSource() - { - CopySourceType = "DrillSource"; - } - - /// Initializes a new instance of DrillSource. - /// Copy source type. - /// Source retry count. Type: integer (or Expression with resultType integer). - /// Source retry wait. Type: string (or Expression with resultType string), pattern: ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). - /// The maximum concurrent connection count for the source data store. Type: integer (or Expression with resultType integer). - /// If true, disable data store metrics collection. Default is false. Type: boolean (or Expression with resultType boolean). - /// Additional Properties. - /// 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). - /// A query to retrieve data from source. Type: string (or Expression with resultType string). - internal DrillSource(string copySourceType, DataFactoryElement sourceRetryCount, DataFactoryElement sourceRetryWait, DataFactoryElement maxConcurrentConnections, DataFactoryElement disableMetricsCollection, IDictionary> additionalProperties, DataFactoryElement queryTimeout, BinaryData additionalColumns, DataFactoryElement query) : base(copySourceType, sourceRetryCount, sourceRetryWait, maxConcurrentConnections, disableMetricsCollection, additionalProperties, queryTimeout, additionalColumns) - { - Query = query; - CopySourceType = copySourceType ?? "DrillSource"; - } - - /// A query to retrieve data from source. Type: string (or Expression with resultType string). - public DataFactoryElement Query { get; set; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DrillTableDataset.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DrillTableDataset.Serialization.cs deleted file mode 100644 index e0a8e02e..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DrillTableDataset.Serialization.cs +++ /dev/null @@ -1,246 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class DrillTableDataset : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - writer.WritePropertyName("type"u8); - writer.WriteStringValue(DatasetType); - if (Optional.IsDefined(Description)) - { - writer.WritePropertyName("description"u8); - writer.WriteStringValue(Description); - } - if (Optional.IsDefined(Structure)) - { - writer.WritePropertyName("structure"u8); - JsonSerializer.Serialize(writer, Structure); - } - if (Optional.IsDefined(Schema)) - { - writer.WritePropertyName("schema"u8); - JsonSerializer.Serialize(writer, Schema); - } - writer.WritePropertyName("linkedServiceName"u8); - JsonSerializer.Serialize(writer, LinkedServiceName); if (Optional.IsCollectionDefined(Parameters)) - { - writer.WritePropertyName("parameters"u8); - writer.WriteStartObject(); - foreach (var item in Parameters) - { - writer.WritePropertyName(item.Key); - writer.WriteObjectValue(item.Value); - } - writer.WriteEndObject(); - } - if (Optional.IsCollectionDefined(Annotations)) - { - writer.WritePropertyName("annotations"u8); - writer.WriteStartArray(); - foreach (var item in Annotations) - { - if (item == null) - { - writer.WriteNullValue(); - continue; - } -#if NET6_0_OR_GREATER - writer.WriteRawValue(item); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.ToString()).RootElement); -#endif - } - writer.WriteEndArray(); - } - if (Optional.IsDefined(Folder)) - { - writer.WritePropertyName("folder"u8); - writer.WriteObjectValue(Folder); - } - writer.WritePropertyName("typeProperties"u8); - writer.WriteStartObject(); - if (Optional.IsDefined(TableName)) - { - writer.WritePropertyName("tableName"u8); -#if NET6_0_OR_GREATER - writer.WriteRawValue(TableName); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(TableName.ToString()).RootElement); -#endif - } - if (Optional.IsDefined(Table)) - { - writer.WritePropertyName("table"u8); - JsonSerializer.Serialize(writer, Table); - } - if (Optional.IsDefined(SchemaTypePropertiesSchema)) - { - writer.WritePropertyName("schema"u8); - JsonSerializer.Serialize(writer, SchemaTypePropertiesSchema); - } - writer.WriteEndObject(); - foreach (var item in AdditionalProperties) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.Value.ToString()).RootElement); -#endif - } - writer.WriteEndObject(); - } - - internal static DrillTableDataset DeserializeDrillTableDataset(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - string type = default; - Optional description = default; - Optional>> structure = default; - Optional>> schema = default; - DataFactoryLinkedServiceReference linkedServiceName = default; - Optional> parameters = default; - Optional> annotations = default; - Optional folder = default; - Optional tableName = default; - Optional> table = default; - Optional> schema0 = default; - IDictionary> additionalProperties = default; - Dictionary> additionalPropertiesDictionary = new Dictionary>(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("type"u8)) - { - type = property.Value.GetString(); - continue; - } - if (property.NameEquals("description"u8)) - { - description = property.Value.GetString(); - continue; - } - if (property.NameEquals("structure"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - structure = JsonSerializer.Deserialize>>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("schema"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - schema = JsonSerializer.Deserialize>>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("linkedServiceName"u8)) - { - linkedServiceName = JsonSerializer.Deserialize(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("parameters"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - Dictionary dictionary = new Dictionary(); - foreach (var property0 in property.Value.EnumerateObject()) - { - dictionary.Add(property0.Name, EntityParameterSpecification.DeserializeEntityParameterSpecification(property0.Value)); - } - parameters = dictionary; - continue; - } - if (property.NameEquals("annotations"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - if (item.ValueKind == JsonValueKind.Null) - { - array.Add(null); - } - else - { - array.Add(BinaryData.FromString(item.GetRawText())); - } - } - annotations = array; - continue; - } - if (property.NameEquals("folder"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - folder = DatasetFolder.DeserializeDatasetFolder(property.Value); - continue; - } - if (property.NameEquals("typeProperties"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - foreach (var property0 in property.Value.EnumerateObject()) - { - if (property0.NameEquals("tableName"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - tableName = BinaryData.FromString(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("table"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - table = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("schema"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - schema0 = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - } - continue; - } - additionalPropertiesDictionary.Add(property.Name, JsonSerializer.Deserialize>(property.Value.GetRawText())); - } - additionalProperties = additionalPropertiesDictionary; - return new DrillTableDataset(type, description.Value, structure.Value, schema.Value, linkedServiceName, Optional.ToDictionary(parameters), Optional.ToList(annotations), folder.Value, additionalProperties, tableName.Value, table.Value, schema0.Value); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DrillTableDataset.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DrillTableDataset.cs deleted file mode 100644 index 2f5d2e7a..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DrillTableDataset.cs +++ /dev/null @@ -1,80 +0,0 @@ -// - -#nullable disable - -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// Drill server dataset. - public partial class DrillTableDataset : DataFactoryDatasetProperties - { - /// Initializes a new instance of DrillTableDataset. - /// Linked service reference. - /// is null. - public DrillTableDataset(DataFactoryLinkedServiceReference linkedServiceName) : base(linkedServiceName) - { - Argument.AssertNotNull(linkedServiceName, nameof(linkedServiceName)); - - DatasetType = "DrillTable"; - } - - /// Initializes a new instance of DrillTableDataset. - /// Type of dataset. - /// Dataset description. - /// Columns that define the structure of the dataset. Type: array (or Expression with resultType array), itemType: DatasetDataElement. - /// Columns that define the physical type schema of the dataset. Type: array (or Expression with resultType array), itemType: DatasetSchemaDataElement. - /// Linked service reference. - /// Parameters for dataset. - /// List of tags that can be used for describing the Dataset. - /// The folder that this Dataset is in. If not specified, Dataset will appear at the root level. - /// Additional Properties. - /// This property will be retired. Please consider using schema + table properties instead. - /// The table name of the Drill. Type: string (or Expression with resultType string). - /// The schema name of the Drill. Type: string (or Expression with resultType string). - internal DrillTableDataset(string datasetType, string description, DataFactoryElement> structure, DataFactoryElement> schema, DataFactoryLinkedServiceReference linkedServiceName, IDictionary parameters, IList annotations, DatasetFolder folder, IDictionary> additionalProperties, BinaryData tableName, DataFactoryElement table, DataFactoryElement schemaTypePropertiesSchema) : base(datasetType, description, structure, schema, linkedServiceName, parameters, annotations, folder, additionalProperties) - { - TableName = tableName; - Table = table; - SchemaTypePropertiesSchema = schemaTypePropertiesSchema; - DatasetType = datasetType ?? "DrillTable"; - } - - /// - /// This property will be retired. Please consider using schema + table properties instead. - /// - /// To assign an object to this property use . - /// - /// - /// To assign an already formated json string to this property use . - /// - /// - /// Examples: - /// - /// - /// BinaryData.FromObjectAsJson("foo") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromString("\"foo\"") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromObjectAsJson(new { key = "value" }) - /// Creates a payload of { "key": "value" }. - /// - /// - /// BinaryData.FromString("{\"key\": \"value\"}") - /// Creates a payload of { "key": "value" }. - /// - /// - /// - /// - public BinaryData TableName { get; set; } - /// The table name of the Drill. Type: string (or Expression with resultType string). - public DataFactoryElement Table { get; set; } - /// The schema name of the Drill. Type: string (or Expression with resultType string). - public DataFactoryElement SchemaTypePropertiesSchema { get; set; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DynamicsAXLinkedService.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DynamicsAXLinkedService.Serialization.cs deleted file mode 100644 index acfc2793..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DynamicsAXLinkedService.Serialization.cs +++ /dev/null @@ -1,214 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class DynamicsAXLinkedService : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - writer.WritePropertyName("type"u8); - writer.WriteStringValue(LinkedServiceType); - if (Optional.IsDefined(ConnectVia)) - { - writer.WritePropertyName("connectVia"u8); - writer.WriteObjectValue(ConnectVia); - } - if (Optional.IsDefined(Description)) - { - writer.WritePropertyName("description"u8); - writer.WriteStringValue(Description); - } - if (Optional.IsCollectionDefined(Parameters)) - { - writer.WritePropertyName("parameters"u8); - writer.WriteStartObject(); - foreach (var item in Parameters) - { - writer.WritePropertyName(item.Key); - writer.WriteObjectValue(item.Value); - } - writer.WriteEndObject(); - } - if (Optional.IsCollectionDefined(Annotations)) - { - writer.WritePropertyName("annotations"u8); - writer.WriteStartArray(); - foreach (var item in Annotations) - { - if (item == null) - { - writer.WriteNullValue(); - continue; - } -#if NET6_0_OR_GREATER - writer.WriteRawValue(item); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.ToString()).RootElement); -#endif - } - writer.WriteEndArray(); - } - writer.WritePropertyName("typeProperties"u8); - writer.WriteStartObject(); - writer.WritePropertyName("url"u8); -#if NET6_0_OR_GREATER - writer.WriteRawValue(Uri); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(Uri.ToString()).RootElement); -#endif - writer.WritePropertyName("servicePrincipalId"u8); - JsonSerializer.Serialize(writer, ServicePrincipalId); - writer.WritePropertyName("servicePrincipalKey"u8); - JsonSerializer.Serialize(writer, ServicePrincipalKey); writer.WritePropertyName("tenant"u8); - JsonSerializer.Serialize(writer, Tenant); - writer.WritePropertyName("aadResourceId"u8); - JsonSerializer.Serialize(writer, AadResourceId); - if (Optional.IsDefined(EncryptedCredential)) - { - writer.WritePropertyName("encryptedCredential"u8); - writer.WriteStringValue(EncryptedCredential); - } - writer.WriteEndObject(); - foreach (var item in AdditionalProperties) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.Value.ToString()).RootElement); -#endif - } - writer.WriteEndObject(); - } - - internal static DynamicsAXLinkedService DeserializeDynamicsAXLinkedService(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - string type = default; - Optional connectVia = default; - Optional description = default; - Optional> parameters = default; - Optional> annotations = default; - BinaryData url = default; - DataFactoryElement servicePrincipalId = default; - DataFactorySecretBaseDefinition servicePrincipalKey = default; - DataFactoryElement tenant = default; - DataFactoryElement aadResourceId = default; - Optional encryptedCredential = default; - IDictionary> additionalProperties = default; - Dictionary> additionalPropertiesDictionary = new Dictionary>(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("type"u8)) - { - type = property.Value.GetString(); - continue; - } - if (property.NameEquals("connectVia"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - connectVia = IntegrationRuntimeReference.DeserializeIntegrationRuntimeReference(property.Value); - continue; - } - if (property.NameEquals("description"u8)) - { - description = property.Value.GetString(); - continue; - } - if (property.NameEquals("parameters"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - Dictionary dictionary = new Dictionary(); - foreach (var property0 in property.Value.EnumerateObject()) - { - dictionary.Add(property0.Name, EntityParameterSpecification.DeserializeEntityParameterSpecification(property0.Value)); - } - parameters = dictionary; - continue; - } - if (property.NameEquals("annotations"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - if (item.ValueKind == JsonValueKind.Null) - { - array.Add(null); - } - else - { - array.Add(BinaryData.FromString(item.GetRawText())); - } - } - annotations = array; - continue; - } - if (property.NameEquals("typeProperties"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - foreach (var property0 in property.Value.EnumerateObject()) - { - if (property0.NameEquals("url"u8)) - { - url = BinaryData.FromString(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("servicePrincipalId"u8)) - { - servicePrincipalId = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("servicePrincipalKey"u8)) - { - servicePrincipalKey = JsonSerializer.Deserialize(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("tenant"u8)) - { - tenant = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("aadResourceId"u8)) - { - aadResourceId = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("encryptedCredential"u8)) - { - encryptedCredential = property0.Value.GetString(); - continue; - } - } - continue; - } - additionalPropertiesDictionary.Add(property.Name, JsonSerializer.Deserialize>(property.Value.GetRawText())); - } - additionalProperties = additionalPropertiesDictionary; - return new DynamicsAXLinkedService(type, connectVia.Value, description.Value, Optional.ToDictionary(parameters), Optional.ToList(annotations), additionalProperties, url, servicePrincipalId, servicePrincipalKey, tenant, aadResourceId, encryptedCredential.Value); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DynamicsAXLinkedService.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DynamicsAXLinkedService.cs deleted file mode 100644 index 070428a2..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DynamicsAXLinkedService.cs +++ /dev/null @@ -1,102 +0,0 @@ -// - -#nullable disable - -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// Dynamics AX linked service. - public partial class DynamicsAXLinkedService : DataFactoryLinkedServiceProperties - { - /// Initializes a new instance of DynamicsAXLinkedService. - /// The Dynamics AX (or Dynamics 365 Finance and Operations) instance OData endpoint. - /// Specify the application's client ID. Type: string (or Expression with resultType string). - /// Specify the application's key. Mark this field as a SecureString to store it securely in Data Factory, or reference a secret stored in Azure Key Vault. Type: string (or Expression with resultType string). - /// Specify the tenant information (domain name or tenant ID) under which your application resides. Retrieve it by hovering the mouse in the top-right corner of the Azure portal. Type: string (or Expression with resultType string). - /// Specify the resource you are requesting authorization. Type: string (or Expression with resultType string). - /// , , , or is null. - public DynamicsAXLinkedService(BinaryData uri, DataFactoryElement servicePrincipalId, DataFactorySecretBaseDefinition servicePrincipalKey, DataFactoryElement tenant, DataFactoryElement aadResourceId) - { - Argument.AssertNotNull(uri, nameof(uri)); - Argument.AssertNotNull(servicePrincipalId, nameof(servicePrincipalId)); - Argument.AssertNotNull(servicePrincipalKey, nameof(servicePrincipalKey)); - Argument.AssertNotNull(tenant, nameof(tenant)); - Argument.AssertNotNull(aadResourceId, nameof(aadResourceId)); - - Uri = uri; - ServicePrincipalId = servicePrincipalId; - ServicePrincipalKey = servicePrincipalKey; - Tenant = tenant; - AadResourceId = aadResourceId; - LinkedServiceType = "DynamicsAX"; - } - - /// Initializes a new instance of DynamicsAXLinkedService. - /// Type of linked service. - /// The integration runtime reference. - /// Linked service description. - /// Parameters for linked service. - /// List of tags that can be used for describing the linked service. - /// Additional Properties. - /// The Dynamics AX (or Dynamics 365 Finance and Operations) instance OData endpoint. - /// Specify the application's client ID. Type: string (or Expression with resultType string). - /// Specify the application's key. Mark this field as a SecureString to store it securely in Data Factory, or reference a secret stored in Azure Key Vault. Type: string (or Expression with resultType string). - /// Specify the tenant information (domain name or tenant ID) under which your application resides. Retrieve it by hovering the mouse in the top-right corner of the Azure portal. Type: string (or Expression with resultType string). - /// Specify the resource you are requesting authorization. Type: string (or Expression with resultType string). - /// The encrypted credential used for authentication. Credentials are encrypted using the integration runtime credential manager. Type: string. - internal DynamicsAXLinkedService(string linkedServiceType, IntegrationRuntimeReference connectVia, string description, IDictionary parameters, IList annotations, IDictionary> additionalProperties, BinaryData uri, DataFactoryElement servicePrincipalId, DataFactorySecretBaseDefinition servicePrincipalKey, DataFactoryElement tenant, DataFactoryElement aadResourceId, string encryptedCredential) : base(linkedServiceType, connectVia, description, parameters, annotations, additionalProperties) - { - Uri = uri; - ServicePrincipalId = servicePrincipalId; - ServicePrincipalKey = servicePrincipalKey; - Tenant = tenant; - AadResourceId = aadResourceId; - EncryptedCredential = encryptedCredential; - LinkedServiceType = linkedServiceType ?? "DynamicsAX"; - } - - /// - /// The Dynamics AX (or Dynamics 365 Finance and Operations) instance OData endpoint. - /// - /// To assign an object to this property use . - /// - /// - /// To assign an already formated json string to this property use . - /// - /// - /// Examples: - /// - /// - /// BinaryData.FromObjectAsJson("foo") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromString("\"foo\"") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromObjectAsJson(new { key = "value" }) - /// Creates a payload of { "key": "value" }. - /// - /// - /// BinaryData.FromString("{\"key\": \"value\"}") - /// Creates a payload of { "key": "value" }. - /// - /// - /// - /// - public BinaryData Uri { get; set; } - /// Specify the application's client ID. Type: string (or Expression with resultType string). - public DataFactoryElement ServicePrincipalId { get; set; } - /// Specify the application's key. Mark this field as a SecureString to store it securely in Data Factory, or reference a secret stored in Azure Key Vault. Type: string (or Expression with resultType string). - public DataFactorySecretBaseDefinition ServicePrincipalKey { get; set; } - /// Specify the tenant information (domain name or tenant ID) under which your application resides. Retrieve it by hovering the mouse in the top-right corner of the Azure portal. Type: string (or Expression with resultType string). - public DataFactoryElement Tenant { get; set; } - /// Specify the resource you are requesting authorization. Type: string (or Expression with resultType string). - public DataFactoryElement AadResourceId { get; set; } - /// The encrypted credential used for authentication. Credentials are encrypted using the integration runtime credential manager. Type: string. - public string EncryptedCredential { get; set; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DynamicsAXResourceDataset.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DynamicsAXResourceDataset.Serialization.cs deleted file mode 100644 index 4747ae78..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DynamicsAXResourceDataset.Serialization.cs +++ /dev/null @@ -1,205 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class DynamicsAXResourceDataset : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - writer.WritePropertyName("type"u8); - writer.WriteStringValue(DatasetType); - if (Optional.IsDefined(Description)) - { - writer.WritePropertyName("description"u8); - writer.WriteStringValue(Description); - } - if (Optional.IsDefined(Structure)) - { - writer.WritePropertyName("structure"u8); - JsonSerializer.Serialize(writer, Structure); - } - if (Optional.IsDefined(Schema)) - { - writer.WritePropertyName("schema"u8); - JsonSerializer.Serialize(writer, Schema); - } - writer.WritePropertyName("linkedServiceName"u8); - JsonSerializer.Serialize(writer, LinkedServiceName); if (Optional.IsCollectionDefined(Parameters)) - { - writer.WritePropertyName("parameters"u8); - writer.WriteStartObject(); - foreach (var item in Parameters) - { - writer.WritePropertyName(item.Key); - writer.WriteObjectValue(item.Value); - } - writer.WriteEndObject(); - } - if (Optional.IsCollectionDefined(Annotations)) - { - writer.WritePropertyName("annotations"u8); - writer.WriteStartArray(); - foreach (var item in Annotations) - { - if (item == null) - { - writer.WriteNullValue(); - continue; - } -#if NET6_0_OR_GREATER - writer.WriteRawValue(item); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.ToString()).RootElement); -#endif - } - writer.WriteEndArray(); - } - if (Optional.IsDefined(Folder)) - { - writer.WritePropertyName("folder"u8); - writer.WriteObjectValue(Folder); - } - writer.WritePropertyName("typeProperties"u8); - writer.WriteStartObject(); - writer.WritePropertyName("path"u8); - JsonSerializer.Serialize(writer, Path); - writer.WriteEndObject(); - foreach (var item in AdditionalProperties) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.Value.ToString()).RootElement); -#endif - } - writer.WriteEndObject(); - } - - internal static DynamicsAXResourceDataset DeserializeDynamicsAXResourceDataset(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - string type = default; - Optional description = default; - Optional>> structure = default; - Optional>> schema = default; - DataFactoryLinkedServiceReference linkedServiceName = default; - Optional> parameters = default; - Optional> annotations = default; - Optional folder = default; - DataFactoryElement path = default; - IDictionary> additionalProperties = default; - Dictionary> additionalPropertiesDictionary = new Dictionary>(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("type"u8)) - { - type = property.Value.GetString(); - continue; - } - if (property.NameEquals("description"u8)) - { - description = property.Value.GetString(); - continue; - } - if (property.NameEquals("structure"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - structure = JsonSerializer.Deserialize>>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("schema"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - schema = JsonSerializer.Deserialize>>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("linkedServiceName"u8)) - { - linkedServiceName = JsonSerializer.Deserialize(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("parameters"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - Dictionary dictionary = new Dictionary(); - foreach (var property0 in property.Value.EnumerateObject()) - { - dictionary.Add(property0.Name, EntityParameterSpecification.DeserializeEntityParameterSpecification(property0.Value)); - } - parameters = dictionary; - continue; - } - if (property.NameEquals("annotations"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - if (item.ValueKind == JsonValueKind.Null) - { - array.Add(null); - } - else - { - array.Add(BinaryData.FromString(item.GetRawText())); - } - } - annotations = array; - continue; - } - if (property.NameEquals("folder"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - folder = DatasetFolder.DeserializeDatasetFolder(property.Value); - continue; - } - if (property.NameEquals("typeProperties"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - foreach (var property0 in property.Value.EnumerateObject()) - { - if (property0.NameEquals("path"u8)) - { - path = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - } - continue; - } - additionalPropertiesDictionary.Add(property.Name, JsonSerializer.Deserialize>(property.Value.GetRawText())); - } - additionalProperties = additionalPropertiesDictionary; - return new DynamicsAXResourceDataset(type, description.Value, structure.Value, schema.Value, linkedServiceName, Optional.ToDictionary(parameters), Optional.ToList(annotations), folder.Value, additionalProperties, path); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DynamicsAXResourceDataset.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DynamicsAXResourceDataset.cs deleted file mode 100644 index 5efab501..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DynamicsAXResourceDataset.cs +++ /dev/null @@ -1,46 +0,0 @@ -// - -#nullable disable - -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// The path of the Dynamics AX OData entity. - public partial class DynamicsAXResourceDataset : DataFactoryDatasetProperties - { - /// Initializes a new instance of DynamicsAXResourceDataset. - /// Linked service reference. - /// The path of the Dynamics AX OData entity. Type: string (or Expression with resultType string). - /// or is null. - public DynamicsAXResourceDataset(DataFactoryLinkedServiceReference linkedServiceName, DataFactoryElement path) : base(linkedServiceName) - { - Argument.AssertNotNull(linkedServiceName, nameof(linkedServiceName)); - Argument.AssertNotNull(path, nameof(path)); - - Path = path; - DatasetType = "DynamicsAXResource"; - } - - /// Initializes a new instance of DynamicsAXResourceDataset. - /// Type of dataset. - /// Dataset description. - /// Columns that define the structure of the dataset. Type: array (or Expression with resultType array), itemType: DatasetDataElement. - /// Columns that define the physical type schema of the dataset. Type: array (or Expression with resultType array), itemType: DatasetSchemaDataElement. - /// Linked service reference. - /// Parameters for dataset. - /// List of tags that can be used for describing the Dataset. - /// The folder that this Dataset is in. If not specified, Dataset will appear at the root level. - /// Additional Properties. - /// The path of the Dynamics AX OData entity. Type: string (or Expression with resultType string). - internal DynamicsAXResourceDataset(string datasetType, string description, DataFactoryElement> structure, DataFactoryElement> schema, DataFactoryLinkedServiceReference linkedServiceName, IDictionary parameters, IList annotations, DatasetFolder folder, IDictionary> additionalProperties, DataFactoryElement path) : base(datasetType, description, structure, schema, linkedServiceName, parameters, annotations, folder, additionalProperties) - { - Path = path; - DatasetType = datasetType ?? "DynamicsAXResource"; - } - - /// The path of the Dynamics AX OData entity. Type: string (or Expression with resultType string). - public DataFactoryElement Path { get; set; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DynamicsAXSource.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DynamicsAXSource.Serialization.cs deleted file mode 100644 index 9a0cc0d3..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DynamicsAXSource.Serialization.cs +++ /dev/null @@ -1,176 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class DynamicsAXSource : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - if (Optional.IsDefined(Query)) - { - writer.WritePropertyName("query"u8); - JsonSerializer.Serialize(writer, Query); - } - if (Optional.IsDefined(HttpRequestTimeout)) - { - writer.WritePropertyName("httpRequestTimeout"u8); - JsonSerializer.Serialize(writer, HttpRequestTimeout); - } - if (Optional.IsDefined(QueryTimeout)) - { - writer.WritePropertyName("queryTimeout"u8); - JsonSerializer.Serialize(writer, QueryTimeout); - } - if (Optional.IsDefined(AdditionalColumns)) - { - writer.WritePropertyName("additionalColumns"u8); -#if NET6_0_OR_GREATER - writer.WriteRawValue(AdditionalColumns); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(AdditionalColumns.ToString()).RootElement); -#endif - } - writer.WritePropertyName("type"u8); - writer.WriteStringValue(CopySourceType); - if (Optional.IsDefined(SourceRetryCount)) - { - writer.WritePropertyName("sourceRetryCount"u8); - JsonSerializer.Serialize(writer, SourceRetryCount); - } - if (Optional.IsDefined(SourceRetryWait)) - { - writer.WritePropertyName("sourceRetryWait"u8); - JsonSerializer.Serialize(writer, SourceRetryWait); - } - if (Optional.IsDefined(MaxConcurrentConnections)) - { - writer.WritePropertyName("maxConcurrentConnections"u8); - JsonSerializer.Serialize(writer, MaxConcurrentConnections); - } - if (Optional.IsDefined(DisableMetricsCollection)) - { - writer.WritePropertyName("disableMetricsCollection"u8); - JsonSerializer.Serialize(writer, DisableMetricsCollection); - } - foreach (var item in AdditionalProperties) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.Value.ToString()).RootElement); -#endif - } - writer.WriteEndObject(); - } - - internal static DynamicsAXSource DeserializeDynamicsAXSource(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - Optional> query = default; - Optional> httpRequestTimeout = default; - Optional> queryTimeout = default; - Optional additionalColumns = default; - string type = default; - Optional> sourceRetryCount = default; - Optional> sourceRetryWait = default; - Optional> maxConcurrentConnections = default; - Optional> disableMetricsCollection = default; - IDictionary> additionalProperties = default; - Dictionary> additionalPropertiesDictionary = new Dictionary>(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("query"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - query = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("httpRequestTimeout"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - httpRequestTimeout = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("queryTimeout"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - queryTimeout = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("additionalColumns"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - additionalColumns = BinaryData.FromString(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("type"u8)) - { - type = property.Value.GetString(); - continue; - } - if (property.NameEquals("sourceRetryCount"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - sourceRetryCount = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("sourceRetryWait"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - sourceRetryWait = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("maxConcurrentConnections"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - maxConcurrentConnections = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("disableMetricsCollection"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - disableMetricsCollection = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - additionalPropertiesDictionary.Add(property.Name, JsonSerializer.Deserialize>(property.Value.GetRawText())); - } - additionalProperties = additionalPropertiesDictionary; - return new DynamicsAXSource(type, sourceRetryCount.Value, sourceRetryWait.Value, maxConcurrentConnections.Value, disableMetricsCollection.Value, additionalProperties, queryTimeout.Value, additionalColumns.Value, query.Value, httpRequestTimeout.Value); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DynamicsAXSource.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DynamicsAXSource.cs deleted file mode 100644 index 2bb38afd..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DynamicsAXSource.cs +++ /dev/null @@ -1,41 +0,0 @@ -// - -#nullable disable - -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// A copy activity Dynamics AX source. - public partial class DynamicsAXSource : TabularSource - { - /// Initializes a new instance of DynamicsAXSource. - public DynamicsAXSource() - { - CopySourceType = "DynamicsAXSource"; - } - - /// Initializes a new instance of DynamicsAXSource. - /// Copy source type. - /// Source retry count. Type: integer (or Expression with resultType integer). - /// Source retry wait. Type: string (or Expression with resultType string), pattern: ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). - /// The maximum concurrent connection count for the source data store. Type: integer (or Expression with resultType integer). - /// If true, disable data store metrics collection. Default is false. Type: boolean (or Expression with resultType boolean). - /// Additional Properties. - /// 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). - /// A query to retrieve data from source. Type: string (or Expression with resultType string). - /// The timeout (TimeSpan) to get an HTTP response. It is the timeout to get a response, not the timeout to read response data. Default value: 00:05:00. Type: string (or Expression with resultType string), pattern: ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). - internal DynamicsAXSource(string copySourceType, DataFactoryElement sourceRetryCount, DataFactoryElement sourceRetryWait, DataFactoryElement maxConcurrentConnections, DataFactoryElement disableMetricsCollection, IDictionary> additionalProperties, DataFactoryElement queryTimeout, BinaryData additionalColumns, DataFactoryElement query, DataFactoryElement httpRequestTimeout) : base(copySourceType, sourceRetryCount, sourceRetryWait, maxConcurrentConnections, disableMetricsCollection, additionalProperties, queryTimeout, additionalColumns) - { - Query = query; - HttpRequestTimeout = httpRequestTimeout; - CopySourceType = copySourceType ?? "DynamicsAXSource"; - } - - /// A query to retrieve data from source. Type: string (or Expression with resultType string). - public DataFactoryElement Query { get; set; } - /// The timeout (TimeSpan) to get an HTTP response. It is the timeout to get a response, not the timeout to read response data. Default value: 00:05:00. Type: string (or Expression with resultType string), pattern: ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). - public DataFactoryElement HttpRequestTimeout { get; set; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DynamicsCrmEntityDataset.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DynamicsCrmEntityDataset.Serialization.cs deleted file mode 100644 index 6877c1d9..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DynamicsCrmEntityDataset.Serialization.cs +++ /dev/null @@ -1,212 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class DynamicsCrmEntityDataset : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - writer.WritePropertyName("type"u8); - writer.WriteStringValue(DatasetType); - if (Optional.IsDefined(Description)) - { - writer.WritePropertyName("description"u8); - writer.WriteStringValue(Description); - } - if (Optional.IsDefined(Structure)) - { - writer.WritePropertyName("structure"u8); - JsonSerializer.Serialize(writer, Structure); - } - if (Optional.IsDefined(Schema)) - { - writer.WritePropertyName("schema"u8); - JsonSerializer.Serialize(writer, Schema); - } - writer.WritePropertyName("linkedServiceName"u8); - JsonSerializer.Serialize(writer, LinkedServiceName); if (Optional.IsCollectionDefined(Parameters)) - { - writer.WritePropertyName("parameters"u8); - writer.WriteStartObject(); - foreach (var item in Parameters) - { - writer.WritePropertyName(item.Key); - writer.WriteObjectValue(item.Value); - } - writer.WriteEndObject(); - } - if (Optional.IsCollectionDefined(Annotations)) - { - writer.WritePropertyName("annotations"u8); - writer.WriteStartArray(); - foreach (var item in Annotations) - { - if (item == null) - { - writer.WriteNullValue(); - continue; - } -#if NET6_0_OR_GREATER - writer.WriteRawValue(item); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.ToString()).RootElement); -#endif - } - writer.WriteEndArray(); - } - if (Optional.IsDefined(Folder)) - { - writer.WritePropertyName("folder"u8); - writer.WriteObjectValue(Folder); - } - writer.WritePropertyName("typeProperties"u8); - writer.WriteStartObject(); - if (Optional.IsDefined(EntityName)) - { - writer.WritePropertyName("entityName"u8); - JsonSerializer.Serialize(writer, EntityName); - } - writer.WriteEndObject(); - foreach (var item in AdditionalProperties) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.Value.ToString()).RootElement); -#endif - } - writer.WriteEndObject(); - } - - internal static DynamicsCrmEntityDataset DeserializeDynamicsCrmEntityDataset(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - string type = default; - Optional description = default; - Optional>> structure = default; - Optional>> schema = default; - DataFactoryLinkedServiceReference linkedServiceName = default; - Optional> parameters = default; - Optional> annotations = default; - Optional folder = default; - Optional> entityName = default; - IDictionary> additionalProperties = default; - Dictionary> additionalPropertiesDictionary = new Dictionary>(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("type"u8)) - { - type = property.Value.GetString(); - continue; - } - if (property.NameEquals("description"u8)) - { - description = property.Value.GetString(); - continue; - } - if (property.NameEquals("structure"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - structure = JsonSerializer.Deserialize>>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("schema"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - schema = JsonSerializer.Deserialize>>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("linkedServiceName"u8)) - { - linkedServiceName = JsonSerializer.Deserialize(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("parameters"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - Dictionary dictionary = new Dictionary(); - foreach (var property0 in property.Value.EnumerateObject()) - { - dictionary.Add(property0.Name, EntityParameterSpecification.DeserializeEntityParameterSpecification(property0.Value)); - } - parameters = dictionary; - continue; - } - if (property.NameEquals("annotations"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - if (item.ValueKind == JsonValueKind.Null) - { - array.Add(null); - } - else - { - array.Add(BinaryData.FromString(item.GetRawText())); - } - } - annotations = array; - continue; - } - if (property.NameEquals("folder"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - folder = DatasetFolder.DeserializeDatasetFolder(property.Value); - continue; - } - if (property.NameEquals("typeProperties"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - foreach (var property0 in property.Value.EnumerateObject()) - { - if (property0.NameEquals("entityName"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - entityName = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - } - continue; - } - additionalPropertiesDictionary.Add(property.Name, JsonSerializer.Deserialize>(property.Value.GetRawText())); - } - additionalProperties = additionalPropertiesDictionary; - return new DynamicsCrmEntityDataset(type, description.Value, structure.Value, schema.Value, linkedServiceName, Optional.ToDictionary(parameters), Optional.ToList(annotations), folder.Value, additionalProperties, entityName.Value); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DynamicsCrmEntityDataset.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DynamicsCrmEntityDataset.cs deleted file mode 100644 index 9ef3b6d1..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DynamicsCrmEntityDataset.cs +++ /dev/null @@ -1,43 +0,0 @@ -// - -#nullable disable - -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// The Dynamics CRM entity dataset. - public partial class DynamicsCrmEntityDataset : DataFactoryDatasetProperties - { - /// Initializes a new instance of DynamicsCrmEntityDataset. - /// Linked service reference. - /// is null. - public DynamicsCrmEntityDataset(DataFactoryLinkedServiceReference linkedServiceName) : base(linkedServiceName) - { - Argument.AssertNotNull(linkedServiceName, nameof(linkedServiceName)); - - DatasetType = "DynamicsCrmEntity"; - } - - /// Initializes a new instance of DynamicsCrmEntityDataset. - /// Type of dataset. - /// Dataset description. - /// Columns that define the structure of the dataset. Type: array (or Expression with resultType array), itemType: DatasetDataElement. - /// Columns that define the physical type schema of the dataset. Type: array (or Expression with resultType array), itemType: DatasetSchemaDataElement. - /// Linked service reference. - /// Parameters for dataset. - /// List of tags that can be used for describing the Dataset. - /// The folder that this Dataset is in. If not specified, Dataset will appear at the root level. - /// Additional Properties. - /// The logical name of the entity. Type: string (or Expression with resultType string). - internal DynamicsCrmEntityDataset(string datasetType, string description, DataFactoryElement> structure, DataFactoryElement> schema, DataFactoryLinkedServiceReference linkedServiceName, IDictionary parameters, IList annotations, DatasetFolder folder, IDictionary> additionalProperties, DataFactoryElement entityName) : base(datasetType, description, structure, schema, linkedServiceName, parameters, annotations, folder, additionalProperties) - { - EntityName = entityName; - DatasetType = datasetType ?? "DynamicsCrmEntity"; - } - - /// The logical name of the entity. Type: string (or Expression with resultType string). - public DataFactoryElement EntityName { get; set; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DynamicsCrmLinkedService.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DynamicsCrmLinkedService.Serialization.cs deleted file mode 100644 index d4048138..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DynamicsCrmLinkedService.Serialization.cs +++ /dev/null @@ -1,322 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class DynamicsCrmLinkedService : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - writer.WritePropertyName("type"u8); - writer.WriteStringValue(LinkedServiceType); - if (Optional.IsDefined(ConnectVia)) - { - writer.WritePropertyName("connectVia"u8); - writer.WriteObjectValue(ConnectVia); - } - if (Optional.IsDefined(Description)) - { - writer.WritePropertyName("description"u8); - writer.WriteStringValue(Description); - } - if (Optional.IsCollectionDefined(Parameters)) - { - writer.WritePropertyName("parameters"u8); - writer.WriteStartObject(); - foreach (var item in Parameters) - { - writer.WritePropertyName(item.Key); - writer.WriteObjectValue(item.Value); - } - writer.WriteEndObject(); - } - if (Optional.IsCollectionDefined(Annotations)) - { - writer.WritePropertyName("annotations"u8); - writer.WriteStartArray(); - foreach (var item in Annotations) - { - if (item == null) - { - writer.WriteNullValue(); - continue; - } -#if NET6_0_OR_GREATER - writer.WriteRawValue(item); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.ToString()).RootElement); -#endif - } - writer.WriteEndArray(); - } - writer.WritePropertyName("typeProperties"u8); - writer.WriteStartObject(); - writer.WritePropertyName("deploymentType"u8); - JsonSerializer.Serialize(writer, DeploymentType); - if (Optional.IsDefined(HostName)) - { - writer.WritePropertyName("hostName"u8); - JsonSerializer.Serialize(writer, HostName); - } - if (Optional.IsDefined(Port)) - { - writer.WritePropertyName("port"u8); - JsonSerializer.Serialize(writer, Port); - } - if (Optional.IsDefined(ServiceUri)) - { - writer.WritePropertyName("serviceUri"u8); - JsonSerializer.Serialize(writer, ServiceUri); - } - if (Optional.IsDefined(OrganizationName)) - { - writer.WritePropertyName("organizationName"u8); - JsonSerializer.Serialize(writer, OrganizationName); - } - writer.WritePropertyName("authenticationType"u8); - JsonSerializer.Serialize(writer, AuthenticationType); - if (Optional.IsDefined(Username)) - { - writer.WritePropertyName("username"u8); - JsonSerializer.Serialize(writer, Username); - } - if (Optional.IsDefined(Password)) - { - writer.WritePropertyName("password"u8); - JsonSerializer.Serialize(writer, Password); - } - if (Optional.IsDefined(ServicePrincipalId)) - { - writer.WritePropertyName("servicePrincipalId"u8); - JsonSerializer.Serialize(writer, ServicePrincipalId); - } - if (Optional.IsDefined(ServicePrincipalCredentialType)) - { - writer.WritePropertyName("servicePrincipalCredentialType"u8); - JsonSerializer.Serialize(writer, ServicePrincipalCredentialType); - } - if (Optional.IsDefined(ServicePrincipalCredential)) - { - writer.WritePropertyName("servicePrincipalCredential"u8); - JsonSerializer.Serialize(writer, ServicePrincipalCredential); - } - if (Optional.IsDefined(EncryptedCredential)) - { - writer.WritePropertyName("encryptedCredential"u8); - writer.WriteStringValue(EncryptedCredential); - } - writer.WriteEndObject(); - foreach (var item in AdditionalProperties) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.Value.ToString()).RootElement); -#endif - } - writer.WriteEndObject(); - } - - internal static DynamicsCrmLinkedService DeserializeDynamicsCrmLinkedService(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - string type = default; - Optional connectVia = default; - Optional description = default; - Optional> parameters = default; - Optional> annotations = default; - DataFactoryElement deploymentType = default; - Optional> hostName = default; - Optional> port = default; - Optional> serviceUri = default; - Optional> organizationName = default; - DataFactoryElement authenticationType = default; - Optional> username = default; - Optional password = default; - Optional> servicePrincipalId = default; - Optional> servicePrincipalCredentialType = default; - Optional servicePrincipalCredential = default; - Optional encryptedCredential = default; - IDictionary> additionalProperties = default; - Dictionary> additionalPropertiesDictionary = new Dictionary>(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("type"u8)) - { - type = property.Value.GetString(); - continue; - } - if (property.NameEquals("connectVia"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - connectVia = IntegrationRuntimeReference.DeserializeIntegrationRuntimeReference(property.Value); - continue; - } - if (property.NameEquals("description"u8)) - { - description = property.Value.GetString(); - continue; - } - if (property.NameEquals("parameters"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - Dictionary dictionary = new Dictionary(); - foreach (var property0 in property.Value.EnumerateObject()) - { - dictionary.Add(property0.Name, EntityParameterSpecification.DeserializeEntityParameterSpecification(property0.Value)); - } - parameters = dictionary; - continue; - } - if (property.NameEquals("annotations"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - if (item.ValueKind == JsonValueKind.Null) - { - array.Add(null); - } - else - { - array.Add(BinaryData.FromString(item.GetRawText())); - } - } - annotations = array; - continue; - } - if (property.NameEquals("typeProperties"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - foreach (var property0 in property.Value.EnumerateObject()) - { - if (property0.NameEquals("deploymentType"u8)) - { - deploymentType = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("hostName"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - hostName = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("port"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - port = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("serviceUri"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - serviceUri = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("organizationName"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - organizationName = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("authenticationType"u8)) - { - authenticationType = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("username"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - username = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("password"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - password = JsonSerializer.Deserialize(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("servicePrincipalId"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - servicePrincipalId = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("servicePrincipalCredentialType"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - servicePrincipalCredentialType = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("servicePrincipalCredential"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - servicePrincipalCredential = JsonSerializer.Deserialize(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("encryptedCredential"u8)) - { - encryptedCredential = property0.Value.GetString(); - continue; - } - } - continue; - } - additionalPropertiesDictionary.Add(property.Name, JsonSerializer.Deserialize>(property.Value.GetRawText())); - } - additionalProperties = additionalPropertiesDictionary; - return new DynamicsCrmLinkedService(type, connectVia.Value, description.Value, Optional.ToDictionary(parameters), Optional.ToList(annotations), additionalProperties, deploymentType, hostName.Value, port.Value, serviceUri.Value, organizationName.Value, authenticationType, username.Value, password, servicePrincipalId.Value, servicePrincipalCredentialType.Value, servicePrincipalCredential, encryptedCredential.Value); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DynamicsCrmLinkedService.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DynamicsCrmLinkedService.cs deleted file mode 100644 index 2903edb8..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DynamicsCrmLinkedService.cs +++ /dev/null @@ -1,88 +0,0 @@ -// - -#nullable disable - -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// Dynamics CRM linked service. - public partial class DynamicsCrmLinkedService : DataFactoryLinkedServiceProperties - { - /// Initializes a new instance of DynamicsCrmLinkedService. - /// The deployment type of the Dynamics CRM instance. 'Online' for Dynamics CRM Online and 'OnPremisesWithIfd' for Dynamics CRM on-premises with Ifd. Type: string (or Expression with resultType string). - /// The authentication type to connect to Dynamics CRM server. 'Office365' for online scenario, 'Ifd' for on-premises with Ifd scenario, 'AADServicePrincipal' for Server-To-Server authentication in online scenario. Type: string (or Expression with resultType string). - /// or is null. - public DynamicsCrmLinkedService(DataFactoryElement deploymentType, DataFactoryElement authenticationType) - { - Argument.AssertNotNull(deploymentType, nameof(deploymentType)); - Argument.AssertNotNull(authenticationType, nameof(authenticationType)); - - DeploymentType = deploymentType; - AuthenticationType = authenticationType; - LinkedServiceType = "DynamicsCrm"; - } - - /// Initializes a new instance of DynamicsCrmLinkedService. - /// Type of linked service. - /// The integration runtime reference. - /// Linked service description. - /// Parameters for linked service. - /// List of tags that can be used for describing the linked service. - /// Additional Properties. - /// The deployment type of the Dynamics CRM instance. 'Online' for Dynamics CRM Online and 'OnPremisesWithIfd' for Dynamics CRM on-premises with Ifd. Type: string (or Expression with resultType string). - /// The host name of the on-premises Dynamics CRM server. The property is required for on-prem and not allowed for online. Type: string (or Expression with resultType string). - /// The port of on-premises Dynamics CRM server. The property is required for on-prem and not allowed for online. Default is 443. Type: integer (or Expression with resultType integer), minimum: 0. - /// The URL to the Microsoft Dynamics CRM server. The property is required for on-line and not allowed for on-prem. Type: string (or Expression with resultType string). - /// The organization name of the Dynamics CRM instance. The property is required for on-prem and required for online when there are more than one Dynamics CRM instances associated with the user. Type: string (or Expression with resultType string). - /// The authentication type to connect to Dynamics CRM server. 'Office365' for online scenario, 'Ifd' for on-premises with Ifd scenario, 'AADServicePrincipal' for Server-To-Server authentication in online scenario. Type: string (or Expression with resultType string). - /// User name to access the Dynamics CRM instance. Type: string (or Expression with resultType string). - /// Password to access the Dynamics CRM instance. - /// The client ID of the application in Azure Active Directory used for Server-To-Server authentication. Type: string (or Expression with resultType string). - /// The service principal credential type to use in Server-To-Server authentication. 'ServicePrincipalKey' for key/secret, 'ServicePrincipalCert' for certificate. Type: string (or Expression with resultType string). - /// The credential of the service principal object in Azure Active Directory. If servicePrincipalCredentialType is 'ServicePrincipalKey', servicePrincipalCredential can be SecureString or AzureKeyVaultSecretReference. If servicePrincipalCredentialType is 'ServicePrincipalCert', servicePrincipalCredential can only be AzureKeyVaultSecretReference. - /// The encrypted credential used for authentication. Credentials are encrypted using the integration runtime credential manager. Type: string. - internal DynamicsCrmLinkedService(string linkedServiceType, IntegrationRuntimeReference connectVia, string description, IDictionary parameters, IList annotations, IDictionary> additionalProperties, DataFactoryElement deploymentType, DataFactoryElement hostName, DataFactoryElement port, DataFactoryElement serviceUri, DataFactoryElement organizationName, DataFactoryElement authenticationType, DataFactoryElement username, DataFactorySecretBaseDefinition password, DataFactoryElement servicePrincipalId, DataFactoryElement servicePrincipalCredentialType, DataFactorySecretBaseDefinition servicePrincipalCredential, string encryptedCredential) : base(linkedServiceType, connectVia, description, parameters, annotations, additionalProperties) - { - DeploymentType = deploymentType; - HostName = hostName; - Port = port; - ServiceUri = serviceUri; - OrganizationName = organizationName; - AuthenticationType = authenticationType; - Username = username; - Password = password; - ServicePrincipalId = servicePrincipalId; - ServicePrincipalCredentialType = servicePrincipalCredentialType; - ServicePrincipalCredential = servicePrincipalCredential; - EncryptedCredential = encryptedCredential; - LinkedServiceType = linkedServiceType ?? "DynamicsCrm"; - } - - /// The deployment type of the Dynamics CRM instance. 'Online' for Dynamics CRM Online and 'OnPremisesWithIfd' for Dynamics CRM on-premises with Ifd. Type: string (or Expression with resultType string). - public DataFactoryElement DeploymentType { get; set; } - /// The host name of the on-premises Dynamics CRM server. The property is required for on-prem and not allowed for online. Type: string (or Expression with resultType string). - public DataFactoryElement HostName { get; set; } - /// The port of on-premises Dynamics CRM server. The property is required for on-prem and not allowed for online. Default is 443. Type: integer (or Expression with resultType integer), minimum: 0. - public DataFactoryElement Port { get; set; } - /// The URL to the Microsoft Dynamics CRM server. The property is required for on-line and not allowed for on-prem. Type: string (or Expression with resultType string). - public DataFactoryElement ServiceUri { get; set; } - /// The organization name of the Dynamics CRM instance. The property is required for on-prem and required for online when there are more than one Dynamics CRM instances associated with the user. Type: string (or Expression with resultType string). - public DataFactoryElement OrganizationName { get; set; } - /// The authentication type to connect to Dynamics CRM server. 'Office365' for online scenario, 'Ifd' for on-premises with Ifd scenario, 'AADServicePrincipal' for Server-To-Server authentication in online scenario. Type: string (or Expression with resultType string). - public DataFactoryElement AuthenticationType { get; set; } - /// User name to access the Dynamics CRM instance. Type: string (or Expression with resultType string). - public DataFactoryElement Username { get; set; } - /// Password to access the Dynamics CRM instance. - public DataFactorySecretBaseDefinition Password { get; set; } - /// The client ID of the application in Azure Active Directory used for Server-To-Server authentication. Type: string (or Expression with resultType string). - public DataFactoryElement ServicePrincipalId { get; set; } - /// The service principal credential type to use in Server-To-Server authentication. 'ServicePrincipalKey' for key/secret, 'ServicePrincipalCert' for certificate. Type: string (or Expression with resultType string). - public DataFactoryElement ServicePrincipalCredentialType { get; set; } - /// The credential of the service principal object in Azure Active Directory. If servicePrincipalCredentialType is 'ServicePrincipalKey', servicePrincipalCredential can be SecureString or AzureKeyVaultSecretReference. If servicePrincipalCredentialType is 'ServicePrincipalCert', servicePrincipalCredential can only be AzureKeyVaultSecretReference. - public DataFactorySecretBaseDefinition ServicePrincipalCredential { get; set; } - /// The encrypted credential used for authentication. Credentials are encrypted using the integration runtime credential manager. Type: string. - public string EncryptedCredential { get; set; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DynamicsCrmSink.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DynamicsCrmSink.Serialization.cs deleted file mode 100644 index 9e4b6aeb..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DynamicsCrmSink.Serialization.cs +++ /dev/null @@ -1,180 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class DynamicsCrmSink : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - writer.WritePropertyName("writeBehavior"u8); - writer.WriteStringValue(WriteBehavior.ToString()); - if (Optional.IsDefined(IgnoreNullValues)) - { - writer.WritePropertyName("ignoreNullValues"u8); - JsonSerializer.Serialize(writer, IgnoreNullValues); - } - if (Optional.IsDefined(AlternateKeyName)) - { - writer.WritePropertyName("alternateKeyName"u8); - JsonSerializer.Serialize(writer, AlternateKeyName); - } - writer.WritePropertyName("type"u8); - writer.WriteStringValue(CopySinkType); - if (Optional.IsDefined(WriteBatchSize)) - { - writer.WritePropertyName("writeBatchSize"u8); - JsonSerializer.Serialize(writer, WriteBatchSize); - } - if (Optional.IsDefined(WriteBatchTimeout)) - { - writer.WritePropertyName("writeBatchTimeout"u8); - JsonSerializer.Serialize(writer, WriteBatchTimeout); - } - if (Optional.IsDefined(SinkRetryCount)) - { - writer.WritePropertyName("sinkRetryCount"u8); - JsonSerializer.Serialize(writer, SinkRetryCount); - } - if (Optional.IsDefined(SinkRetryWait)) - { - writer.WritePropertyName("sinkRetryWait"u8); - JsonSerializer.Serialize(writer, SinkRetryWait); - } - if (Optional.IsDefined(MaxConcurrentConnections)) - { - writer.WritePropertyName("maxConcurrentConnections"u8); - JsonSerializer.Serialize(writer, MaxConcurrentConnections); - } - if (Optional.IsDefined(DisableMetricsCollection)) - { - writer.WritePropertyName("disableMetricsCollection"u8); - JsonSerializer.Serialize(writer, DisableMetricsCollection); - } - foreach (var item in AdditionalProperties) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.Value.ToString()).RootElement); -#endif - } - writer.WriteEndObject(); - } - - internal static DynamicsCrmSink DeserializeDynamicsCrmSink(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - DynamicsSinkWriteBehavior writeBehavior = default; - Optional> ignoreNullValues = default; - Optional> alternateKeyName = default; - string type = default; - Optional> writeBatchSize = default; - Optional> writeBatchTimeout = default; - Optional> sinkRetryCount = default; - Optional> sinkRetryWait = default; - Optional> maxConcurrentConnections = default; - Optional> disableMetricsCollection = default; - IDictionary> additionalProperties = default; - Dictionary> additionalPropertiesDictionary = new Dictionary>(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("writeBehavior"u8)) - { - writeBehavior = new DynamicsSinkWriteBehavior(property.Value.GetString()); - continue; - } - if (property.NameEquals("ignoreNullValues"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - ignoreNullValues = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("alternateKeyName"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - alternateKeyName = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("type"u8)) - { - type = property.Value.GetString(); - continue; - } - if (property.NameEquals("writeBatchSize"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - writeBatchSize = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("writeBatchTimeout"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - writeBatchTimeout = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("sinkRetryCount"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - sinkRetryCount = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("sinkRetryWait"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - sinkRetryWait = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("maxConcurrentConnections"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - maxConcurrentConnections = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("disableMetricsCollection"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - disableMetricsCollection = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - additionalPropertiesDictionary.Add(property.Name, JsonSerializer.Deserialize>(property.Value.GetRawText())); - } - additionalProperties = additionalPropertiesDictionary; - return new DynamicsCrmSink(type, writeBatchSize.Value, writeBatchTimeout.Value, sinkRetryCount.Value, sinkRetryWait.Value, maxConcurrentConnections.Value, disableMetricsCollection.Value, additionalProperties, writeBehavior, ignoreNullValues.Value, alternateKeyName.Value); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DynamicsCrmSink.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DynamicsCrmSink.cs deleted file mode 100644 index a1d3e73b..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DynamicsCrmSink.cs +++ /dev/null @@ -1,47 +0,0 @@ -// - -#nullable disable - -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// A copy activity Dynamics CRM sink. - public partial class DynamicsCrmSink : CopySink - { - /// Initializes a new instance of DynamicsCrmSink. - /// The write behavior for the operation. - public DynamicsCrmSink(DynamicsSinkWriteBehavior writeBehavior) - { - WriteBehavior = writeBehavior; - CopySinkType = "DynamicsCrmSink"; - } - - /// Initializes a new instance of DynamicsCrmSink. - /// Copy sink type. - /// Write batch size. Type: integer (or Expression with resultType integer), minimum: 0. - /// Write batch timeout. Type: string (or Expression with resultType string), pattern: ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). - /// Sink retry count. Type: integer (or Expression with resultType integer). - /// Sink retry wait. Type: string (or Expression with resultType string), pattern: ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). - /// The maximum concurrent connection count for the sink data store. Type: integer (or Expression with resultType integer). - /// If true, disable data store metrics collection. Default is false. Type: boolean (or Expression with resultType boolean). - /// Additional Properties. - /// The write behavior for the operation. - /// The flag indicating whether to ignore null values from input dataset (except key fields) during write operation. Default is false. Type: boolean (or Expression with resultType boolean). - /// The logical name of the alternate key which will be used when upserting records. Type: string (or Expression with resultType string). - internal DynamicsCrmSink(string copySinkType, DataFactoryElement writeBatchSize, DataFactoryElement writeBatchTimeout, DataFactoryElement sinkRetryCount, DataFactoryElement sinkRetryWait, DataFactoryElement maxConcurrentConnections, DataFactoryElement disableMetricsCollection, IDictionary> additionalProperties, DynamicsSinkWriteBehavior writeBehavior, DataFactoryElement ignoreNullValues, DataFactoryElement alternateKeyName) : base(copySinkType, writeBatchSize, writeBatchTimeout, sinkRetryCount, sinkRetryWait, maxConcurrentConnections, disableMetricsCollection, additionalProperties) - { - WriteBehavior = writeBehavior; - IgnoreNullValues = ignoreNullValues; - AlternateKeyName = alternateKeyName; - CopySinkType = copySinkType ?? "DynamicsCrmSink"; - } - - /// The write behavior for the operation. - public DynamicsSinkWriteBehavior WriteBehavior { get; set; } - /// The flag indicating whether to ignore null values from input dataset (except key fields) during write operation. Default is false. Type: boolean (or Expression with resultType boolean). - public DataFactoryElement IgnoreNullValues { get; set; } - /// The logical name of the alternate key which will be used when upserting records. Type: string (or Expression with resultType string). - public DataFactoryElement AlternateKeyName { get; set; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DynamicsCrmSource.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DynamicsCrmSource.Serialization.cs deleted file mode 100644 index 6ab254be..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DynamicsCrmSource.Serialization.cs +++ /dev/null @@ -1,146 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class DynamicsCrmSource : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - if (Optional.IsDefined(Query)) - { - writer.WritePropertyName("query"u8); - JsonSerializer.Serialize(writer, Query); - } - if (Optional.IsDefined(AdditionalColumns)) - { - writer.WritePropertyName("additionalColumns"u8); -#if NET6_0_OR_GREATER - writer.WriteRawValue(AdditionalColumns); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(AdditionalColumns.ToString()).RootElement); -#endif - } - writer.WritePropertyName("type"u8); - writer.WriteStringValue(CopySourceType); - if (Optional.IsDefined(SourceRetryCount)) - { - writer.WritePropertyName("sourceRetryCount"u8); - JsonSerializer.Serialize(writer, SourceRetryCount); - } - if (Optional.IsDefined(SourceRetryWait)) - { - writer.WritePropertyName("sourceRetryWait"u8); - JsonSerializer.Serialize(writer, SourceRetryWait); - } - if (Optional.IsDefined(MaxConcurrentConnections)) - { - writer.WritePropertyName("maxConcurrentConnections"u8); - JsonSerializer.Serialize(writer, MaxConcurrentConnections); - } - if (Optional.IsDefined(DisableMetricsCollection)) - { - writer.WritePropertyName("disableMetricsCollection"u8); - JsonSerializer.Serialize(writer, DisableMetricsCollection); - } - foreach (var item in AdditionalProperties) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.Value.ToString()).RootElement); -#endif - } - writer.WriteEndObject(); - } - - internal static DynamicsCrmSource DeserializeDynamicsCrmSource(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - Optional> query = default; - Optional additionalColumns = default; - string type = default; - Optional> sourceRetryCount = default; - Optional> sourceRetryWait = default; - Optional> maxConcurrentConnections = default; - Optional> disableMetricsCollection = default; - IDictionary> additionalProperties = default; - Dictionary> additionalPropertiesDictionary = new Dictionary>(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("query"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - query = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("additionalColumns"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - additionalColumns = BinaryData.FromString(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("type"u8)) - { - type = property.Value.GetString(); - continue; - } - if (property.NameEquals("sourceRetryCount"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - sourceRetryCount = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("sourceRetryWait"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - sourceRetryWait = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("maxConcurrentConnections"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - maxConcurrentConnections = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("disableMetricsCollection"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - disableMetricsCollection = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - additionalPropertiesDictionary.Add(property.Name, JsonSerializer.Deserialize>(property.Value.GetRawText())); - } - additionalProperties = additionalPropertiesDictionary; - return new DynamicsCrmSource(type, sourceRetryCount.Value, sourceRetryWait.Value, maxConcurrentConnections.Value, disableMetricsCollection.Value, additionalProperties, query.Value, additionalColumns.Value); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DynamicsCrmSource.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DynamicsCrmSource.cs deleted file mode 100644 index 336b04c4..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DynamicsCrmSource.cs +++ /dev/null @@ -1,68 +0,0 @@ -// - -#nullable disable - -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// A copy activity Dynamics CRM source. - public partial class DynamicsCrmSource : CopyActivitySource - { - /// Initializes a new instance of DynamicsCrmSource. - public DynamicsCrmSource() - { - CopySourceType = "DynamicsCrmSource"; - } - - /// Initializes a new instance of DynamicsCrmSource. - /// Copy source type. - /// Source retry count. Type: integer (or Expression with resultType integer). - /// Source retry wait. Type: string (or Expression with resultType string), pattern: ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). - /// The maximum concurrent connection count for the source data store. Type: integer (or Expression with resultType integer). - /// If true, disable data store metrics collection. Default is false. Type: boolean (or Expression with resultType boolean). - /// Additional Properties. - /// FetchXML is a proprietary query language that is used in Microsoft Dynamics CRM (online & on-premises). Type: string (or Expression with resultType string). - /// Specifies the additional columns to be added to source data. Type: array of objects(AdditionalColumns) (or Expression with resultType array of objects). - internal DynamicsCrmSource(string copySourceType, DataFactoryElement sourceRetryCount, DataFactoryElement sourceRetryWait, DataFactoryElement maxConcurrentConnections, DataFactoryElement disableMetricsCollection, IDictionary> additionalProperties, DataFactoryElement query, BinaryData additionalColumns) : base(copySourceType, sourceRetryCount, sourceRetryWait, maxConcurrentConnections, disableMetricsCollection, additionalProperties) - { - Query = query; - AdditionalColumns = additionalColumns; - CopySourceType = copySourceType ?? "DynamicsCrmSource"; - } - - /// FetchXML is a proprietary query language that is used in Microsoft Dynamics CRM (online & on-premises). Type: string (or Expression with resultType string). - public DataFactoryElement Query { get; set; } - /// - /// Specifies the additional columns to be added to source data. Type: array of objects(AdditionalColumns) (or Expression with resultType array of objects). - /// - /// To assign an object to this property use . - /// - /// - /// To assign an already formated json string to this property use . - /// - /// - /// Examples: - /// - /// - /// BinaryData.FromObjectAsJson("foo") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromString("\"foo\"") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromObjectAsJson(new { key = "value" }) - /// Creates a payload of { "key": "value" }. - /// - /// - /// BinaryData.FromString("{\"key\": \"value\"}") - /// Creates a payload of { "key": "value" }. - /// - /// - /// - /// - public BinaryData AdditionalColumns { get; set; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DynamicsEntityDataset.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DynamicsEntityDataset.Serialization.cs deleted file mode 100644 index 0b73475f..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DynamicsEntityDataset.Serialization.cs +++ /dev/null @@ -1,212 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class DynamicsEntityDataset : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - writer.WritePropertyName("type"u8); - writer.WriteStringValue(DatasetType); - if (Optional.IsDefined(Description)) - { - writer.WritePropertyName("description"u8); - writer.WriteStringValue(Description); - } - if (Optional.IsDefined(Structure)) - { - writer.WritePropertyName("structure"u8); - JsonSerializer.Serialize(writer, Structure); - } - if (Optional.IsDefined(Schema)) - { - writer.WritePropertyName("schema"u8); - JsonSerializer.Serialize(writer, Schema); - } - writer.WritePropertyName("linkedServiceName"u8); - JsonSerializer.Serialize(writer, LinkedServiceName); if (Optional.IsCollectionDefined(Parameters)) - { - writer.WritePropertyName("parameters"u8); - writer.WriteStartObject(); - foreach (var item in Parameters) - { - writer.WritePropertyName(item.Key); - writer.WriteObjectValue(item.Value); - } - writer.WriteEndObject(); - } - if (Optional.IsCollectionDefined(Annotations)) - { - writer.WritePropertyName("annotations"u8); - writer.WriteStartArray(); - foreach (var item in Annotations) - { - if (item == null) - { - writer.WriteNullValue(); - continue; - } -#if NET6_0_OR_GREATER - writer.WriteRawValue(item); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.ToString()).RootElement); -#endif - } - writer.WriteEndArray(); - } - if (Optional.IsDefined(Folder)) - { - writer.WritePropertyName("folder"u8); - writer.WriteObjectValue(Folder); - } - writer.WritePropertyName("typeProperties"u8); - writer.WriteStartObject(); - if (Optional.IsDefined(EntityName)) - { - writer.WritePropertyName("entityName"u8); - JsonSerializer.Serialize(writer, EntityName); - } - writer.WriteEndObject(); - foreach (var item in AdditionalProperties) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.Value.ToString()).RootElement); -#endif - } - writer.WriteEndObject(); - } - - internal static DynamicsEntityDataset DeserializeDynamicsEntityDataset(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - string type = default; - Optional description = default; - Optional>> structure = default; - Optional>> schema = default; - DataFactoryLinkedServiceReference linkedServiceName = default; - Optional> parameters = default; - Optional> annotations = default; - Optional folder = default; - Optional> entityName = default; - IDictionary> additionalProperties = default; - Dictionary> additionalPropertiesDictionary = new Dictionary>(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("type"u8)) - { - type = property.Value.GetString(); - continue; - } - if (property.NameEquals("description"u8)) - { - description = property.Value.GetString(); - continue; - } - if (property.NameEquals("structure"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - structure = JsonSerializer.Deserialize>>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("schema"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - schema = JsonSerializer.Deserialize>>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("linkedServiceName"u8)) - { - linkedServiceName = JsonSerializer.Deserialize(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("parameters"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - Dictionary dictionary = new Dictionary(); - foreach (var property0 in property.Value.EnumerateObject()) - { - dictionary.Add(property0.Name, EntityParameterSpecification.DeserializeEntityParameterSpecification(property0.Value)); - } - parameters = dictionary; - continue; - } - if (property.NameEquals("annotations"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - if (item.ValueKind == JsonValueKind.Null) - { - array.Add(null); - } - else - { - array.Add(BinaryData.FromString(item.GetRawText())); - } - } - annotations = array; - continue; - } - if (property.NameEquals("folder"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - folder = DatasetFolder.DeserializeDatasetFolder(property.Value); - continue; - } - if (property.NameEquals("typeProperties"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - foreach (var property0 in property.Value.EnumerateObject()) - { - if (property0.NameEquals("entityName"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - entityName = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - } - continue; - } - additionalPropertiesDictionary.Add(property.Name, JsonSerializer.Deserialize>(property.Value.GetRawText())); - } - additionalProperties = additionalPropertiesDictionary; - return new DynamicsEntityDataset(type, description.Value, structure.Value, schema.Value, linkedServiceName, Optional.ToDictionary(parameters), Optional.ToList(annotations), folder.Value, additionalProperties, entityName.Value); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DynamicsEntityDataset.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DynamicsEntityDataset.cs deleted file mode 100644 index df782558..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DynamicsEntityDataset.cs +++ /dev/null @@ -1,43 +0,0 @@ -// - -#nullable disable - -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// The Dynamics entity dataset. - public partial class DynamicsEntityDataset : DataFactoryDatasetProperties - { - /// Initializes a new instance of DynamicsEntityDataset. - /// Linked service reference. - /// is null. - public DynamicsEntityDataset(DataFactoryLinkedServiceReference linkedServiceName) : base(linkedServiceName) - { - Argument.AssertNotNull(linkedServiceName, nameof(linkedServiceName)); - - DatasetType = "DynamicsEntity"; - } - - /// Initializes a new instance of DynamicsEntityDataset. - /// Type of dataset. - /// Dataset description. - /// Columns that define the structure of the dataset. Type: array (or Expression with resultType array), itemType: DatasetDataElement. - /// Columns that define the physical type schema of the dataset. Type: array (or Expression with resultType array), itemType: DatasetSchemaDataElement. - /// Linked service reference. - /// Parameters for dataset. - /// List of tags that can be used for describing the Dataset. - /// The folder that this Dataset is in. If not specified, Dataset will appear at the root level. - /// Additional Properties. - /// The logical name of the entity. Type: string (or Expression with resultType string). - internal DynamicsEntityDataset(string datasetType, string description, DataFactoryElement> structure, DataFactoryElement> schema, DataFactoryLinkedServiceReference linkedServiceName, IDictionary parameters, IList annotations, DatasetFolder folder, IDictionary> additionalProperties, DataFactoryElement entityName) : base(datasetType, description, structure, schema, linkedServiceName, parameters, annotations, folder, additionalProperties) - { - EntityName = entityName; - DatasetType = datasetType ?? "DynamicsEntity"; - } - - /// The logical name of the entity. Type: string (or Expression with resultType string). - public DataFactoryElement EntityName { get; set; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DynamicsLinkedService.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DynamicsLinkedService.Serialization.cs deleted file mode 100644 index 82cfea5c..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DynamicsLinkedService.Serialization.cs +++ /dev/null @@ -1,337 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class DynamicsLinkedService : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - writer.WritePropertyName("type"u8); - writer.WriteStringValue(LinkedServiceType); - if (Optional.IsDefined(ConnectVia)) - { - writer.WritePropertyName("connectVia"u8); - writer.WriteObjectValue(ConnectVia); - } - if (Optional.IsDefined(Description)) - { - writer.WritePropertyName("description"u8); - writer.WriteStringValue(Description); - } - if (Optional.IsCollectionDefined(Parameters)) - { - writer.WritePropertyName("parameters"u8); - writer.WriteStartObject(); - foreach (var item in Parameters) - { - writer.WritePropertyName(item.Key); - writer.WriteObjectValue(item.Value); - } - writer.WriteEndObject(); - } - if (Optional.IsCollectionDefined(Annotations)) - { - writer.WritePropertyName("annotations"u8); - writer.WriteStartArray(); - foreach (var item in Annotations) - { - if (item == null) - { - writer.WriteNullValue(); - continue; - } -#if NET6_0_OR_GREATER - writer.WriteRawValue(item); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.ToString()).RootElement); -#endif - } - writer.WriteEndArray(); - } - writer.WritePropertyName("typeProperties"u8); - writer.WriteStartObject(); - writer.WritePropertyName("deploymentType"u8); - JsonSerializer.Serialize(writer, DeploymentType); - if (Optional.IsDefined(HostName)) - { - writer.WritePropertyName("hostName"u8); - JsonSerializer.Serialize(writer, HostName); - } - if (Optional.IsDefined(Port)) - { - writer.WritePropertyName("port"u8); - JsonSerializer.Serialize(writer, Port); - } - if (Optional.IsDefined(ServiceUri)) - { - writer.WritePropertyName("serviceUri"u8); - JsonSerializer.Serialize(writer, ServiceUri); - } - if (Optional.IsDefined(OrganizationName)) - { - writer.WritePropertyName("organizationName"u8); - JsonSerializer.Serialize(writer, OrganizationName); - } - writer.WritePropertyName("authenticationType"u8); - JsonSerializer.Serialize(writer, AuthenticationType); - if (Optional.IsDefined(Username)) - { - writer.WritePropertyName("username"u8); - JsonSerializer.Serialize(writer, Username); - } - if (Optional.IsDefined(Password)) - { - writer.WritePropertyName("password"u8); - JsonSerializer.Serialize(writer, Password); - } - if (Optional.IsDefined(ServicePrincipalId)) - { - writer.WritePropertyName("servicePrincipalId"u8); - JsonSerializer.Serialize(writer, ServicePrincipalId); - } - if (Optional.IsDefined(ServicePrincipalCredentialType)) - { - writer.WritePropertyName("servicePrincipalCredentialType"u8); - JsonSerializer.Serialize(writer, ServicePrincipalCredentialType); - } - if (Optional.IsDefined(ServicePrincipalCredential)) - { - writer.WritePropertyName("servicePrincipalCredential"u8); - JsonSerializer.Serialize(writer, ServicePrincipalCredential); - } - if (Optional.IsDefined(EncryptedCredential)) - { - writer.WritePropertyName("encryptedCredential"u8); - writer.WriteStringValue(EncryptedCredential); - } - if (Optional.IsDefined(Credential)) - { - writer.WritePropertyName("credential"u8); - writer.WriteObjectValue(Credential); - } - writer.WriteEndObject(); - foreach (var item in AdditionalProperties) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.Value.ToString()).RootElement); -#endif - } - writer.WriteEndObject(); - } - - internal static DynamicsLinkedService DeserializeDynamicsLinkedService(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - string type = default; - Optional connectVia = default; - Optional description = default; - Optional> parameters = default; - Optional> annotations = default; - DataFactoryElement deploymentType = default; - Optional> hostName = default; - Optional> port = default; - Optional> serviceUri = default; - Optional> organizationName = default; - DataFactoryElement authenticationType = default; - Optional> username = default; - Optional password = default; - Optional> servicePrincipalId = default; - Optional> servicePrincipalCredentialType = default; - Optional servicePrincipalCredential = default; - Optional encryptedCredential = default; - Optional credential = default; - IDictionary> additionalProperties = default; - Dictionary> additionalPropertiesDictionary = new Dictionary>(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("type"u8)) - { - type = property.Value.GetString(); - continue; - } - if (property.NameEquals("connectVia"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - connectVia = IntegrationRuntimeReference.DeserializeIntegrationRuntimeReference(property.Value); - continue; - } - if (property.NameEquals("description"u8)) - { - description = property.Value.GetString(); - continue; - } - if (property.NameEquals("parameters"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - Dictionary dictionary = new Dictionary(); - foreach (var property0 in property.Value.EnumerateObject()) - { - dictionary.Add(property0.Name, EntityParameterSpecification.DeserializeEntityParameterSpecification(property0.Value)); - } - parameters = dictionary; - continue; - } - if (property.NameEquals("annotations"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - if (item.ValueKind == JsonValueKind.Null) - { - array.Add(null); - } - else - { - array.Add(BinaryData.FromString(item.GetRawText())); - } - } - annotations = array; - continue; - } - if (property.NameEquals("typeProperties"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - foreach (var property0 in property.Value.EnumerateObject()) - { - if (property0.NameEquals("deploymentType"u8)) - { - deploymentType = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("hostName"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - hostName = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("port"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - port = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("serviceUri"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - serviceUri = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("organizationName"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - organizationName = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("authenticationType"u8)) - { - authenticationType = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("username"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - username = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("password"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - password = JsonSerializer.Deserialize(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("servicePrincipalId"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - servicePrincipalId = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("servicePrincipalCredentialType"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - servicePrincipalCredentialType = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("servicePrincipalCredential"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - servicePrincipalCredential = JsonSerializer.Deserialize(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("encryptedCredential"u8)) - { - encryptedCredential = property0.Value.GetString(); - continue; - } - if (property0.NameEquals("credential"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - credential = DataFactoryCredentialReference.DeserializeDataFactoryCredentialReference(property0.Value); - continue; - } - } - continue; - } - additionalPropertiesDictionary.Add(property.Name, JsonSerializer.Deserialize>(property.Value.GetRawText())); - } - additionalProperties = additionalPropertiesDictionary; - return new DynamicsLinkedService(type, connectVia.Value, description.Value, Optional.ToDictionary(parameters), Optional.ToList(annotations), additionalProperties, deploymentType, hostName.Value, port.Value, serviceUri.Value, organizationName.Value, authenticationType, username.Value, password, servicePrincipalId.Value, servicePrincipalCredentialType.Value, servicePrincipalCredential, encryptedCredential.Value, credential.Value); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DynamicsLinkedService.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DynamicsLinkedService.cs deleted file mode 100644 index e2601f50..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DynamicsLinkedService.cs +++ /dev/null @@ -1,92 +0,0 @@ -// - -#nullable disable - -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// Dynamics linked service. - public partial class DynamicsLinkedService : DataFactoryLinkedServiceProperties - { - /// Initializes a new instance of DynamicsLinkedService. - /// The deployment type of the Dynamics instance. 'Online' for Dynamics Online and 'OnPremisesWithIfd' for Dynamics on-premises with Ifd. Type: string (or Expression with resultType string). - /// The authentication type to connect to Dynamics server. 'Office365' for online scenario, 'Ifd' for on-premises with Ifd scenario, 'AADServicePrincipal' for Server-To-Server authentication in online scenario. Type: string (or Expression with resultType string). - /// or is null. - public DynamicsLinkedService(DataFactoryElement deploymentType, DataFactoryElement authenticationType) - { - Argument.AssertNotNull(deploymentType, nameof(deploymentType)); - Argument.AssertNotNull(authenticationType, nameof(authenticationType)); - - DeploymentType = deploymentType; - AuthenticationType = authenticationType; - LinkedServiceType = "Dynamics"; - } - - /// Initializes a new instance of DynamicsLinkedService. - /// Type of linked service. - /// The integration runtime reference. - /// Linked service description. - /// Parameters for linked service. - /// List of tags that can be used for describing the linked service. - /// Additional Properties. - /// The deployment type of the Dynamics instance. 'Online' for Dynamics Online and 'OnPremisesWithIfd' for Dynamics on-premises with Ifd. Type: string (or Expression with resultType string). - /// The host name of the on-premises Dynamics server. The property is required for on-prem and not allowed for online. Type: string (or Expression with resultType string). - /// The port of on-premises Dynamics server. The property is required for on-prem and not allowed for online. Default is 443. Type: integer (or Expression with resultType integer), minimum: 0. - /// The URL to the Microsoft Dynamics server. The property is required for on-line and not allowed for on-prem. Type: string (or Expression with resultType string). - /// The organization name of the Dynamics instance. The property is required for on-prem and required for online when there are more than one Dynamics instances associated with the user. Type: string (or Expression with resultType string). - /// The authentication type to connect to Dynamics server. 'Office365' for online scenario, 'Ifd' for on-premises with Ifd scenario, 'AADServicePrincipal' for Server-To-Server authentication in online scenario. Type: string (or Expression with resultType string). - /// User name to access the Dynamics instance. Type: string (or Expression with resultType string). - /// Password to access the Dynamics instance. - /// The client ID of the application in Azure Active Directory used for Server-To-Server authentication. Type: string (or Expression with resultType string). - /// The service principal credential type to use in Server-To-Server authentication. 'ServicePrincipalKey' for key/secret, 'ServicePrincipalCert' for certificate. Type: string (or Expression with resultType string). - /// The credential of the service principal object in Azure Active Directory. If servicePrincipalCredentialType is 'ServicePrincipalKey', servicePrincipalCredential can be SecureString or AzureKeyVaultSecretReference. If servicePrincipalCredentialType is 'ServicePrincipalCert', servicePrincipalCredential can only be AzureKeyVaultSecretReference. - /// The encrypted credential used for authentication. Credentials are encrypted using the integration runtime credential manager. Type: string. - /// The credential reference containing authentication information. - internal DynamicsLinkedService(string linkedServiceType, IntegrationRuntimeReference connectVia, string description, IDictionary parameters, IList annotations, IDictionary> additionalProperties, DataFactoryElement deploymentType, DataFactoryElement hostName, DataFactoryElement port, DataFactoryElement serviceUri, DataFactoryElement organizationName, DataFactoryElement authenticationType, DataFactoryElement username, DataFactorySecretBaseDefinition password, DataFactoryElement servicePrincipalId, DataFactoryElement servicePrincipalCredentialType, DataFactorySecretBaseDefinition servicePrincipalCredential, string encryptedCredential, DataFactoryCredentialReference credential) : base(linkedServiceType, connectVia, description, parameters, annotations, additionalProperties) - { - DeploymentType = deploymentType; - HostName = hostName; - Port = port; - ServiceUri = serviceUri; - OrganizationName = organizationName; - AuthenticationType = authenticationType; - Username = username; - Password = password; - ServicePrincipalId = servicePrincipalId; - ServicePrincipalCredentialType = servicePrincipalCredentialType; - ServicePrincipalCredential = servicePrincipalCredential; - EncryptedCredential = encryptedCredential; - Credential = credential; - LinkedServiceType = linkedServiceType ?? "Dynamics"; - } - - /// The deployment type of the Dynamics instance. 'Online' for Dynamics Online and 'OnPremisesWithIfd' for Dynamics on-premises with Ifd. Type: string (or Expression with resultType string). - public DataFactoryElement DeploymentType { get; set; } - /// The host name of the on-premises Dynamics server. The property is required for on-prem and not allowed for online. Type: string (or Expression with resultType string). - public DataFactoryElement HostName { get; set; } - /// The port of on-premises Dynamics server. The property is required for on-prem and not allowed for online. Default is 443. Type: integer (or Expression with resultType integer), minimum: 0. - public DataFactoryElement Port { get; set; } - /// The URL to the Microsoft Dynamics server. The property is required for on-line and not allowed for on-prem. Type: string (or Expression with resultType string). - public DataFactoryElement ServiceUri { get; set; } - /// The organization name of the Dynamics instance. The property is required for on-prem and required for online when there are more than one Dynamics instances associated with the user. Type: string (or Expression with resultType string). - public DataFactoryElement OrganizationName { get; set; } - /// The authentication type to connect to Dynamics server. 'Office365' for online scenario, 'Ifd' for on-premises with Ifd scenario, 'AADServicePrincipal' for Server-To-Server authentication in online scenario. Type: string (or Expression with resultType string). - public DataFactoryElement AuthenticationType { get; set; } - /// User name to access the Dynamics instance. Type: string (or Expression with resultType string). - public DataFactoryElement Username { get; set; } - /// Password to access the Dynamics instance. - public DataFactorySecretBaseDefinition Password { get; set; } - /// The client ID of the application in Azure Active Directory used for Server-To-Server authentication. Type: string (or Expression with resultType string). - public DataFactoryElement ServicePrincipalId { get; set; } - /// The service principal credential type to use in Server-To-Server authentication. 'ServicePrincipalKey' for key/secret, 'ServicePrincipalCert' for certificate. Type: string (or Expression with resultType string). - public DataFactoryElement ServicePrincipalCredentialType { get; set; } - /// The credential of the service principal object in Azure Active Directory. If servicePrincipalCredentialType is 'ServicePrincipalKey', servicePrincipalCredential can be SecureString or AzureKeyVaultSecretReference. If servicePrincipalCredentialType is 'ServicePrincipalCert', servicePrincipalCredential can only be AzureKeyVaultSecretReference. - public DataFactorySecretBaseDefinition ServicePrincipalCredential { get; set; } - /// The encrypted credential used for authentication. Credentials are encrypted using the integration runtime credential manager. Type: string. - public string EncryptedCredential { get; set; } - /// The credential reference containing authentication information. - public DataFactoryCredentialReference Credential { get; set; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DynamicsSink.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DynamicsSink.Serialization.cs deleted file mode 100644 index 5ef1121c..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DynamicsSink.Serialization.cs +++ /dev/null @@ -1,180 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class DynamicsSink : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - writer.WritePropertyName("writeBehavior"u8); - writer.WriteStringValue(WriteBehavior.ToString()); - if (Optional.IsDefined(IgnoreNullValues)) - { - writer.WritePropertyName("ignoreNullValues"u8); - JsonSerializer.Serialize(writer, IgnoreNullValues); - } - if (Optional.IsDefined(AlternateKeyName)) - { - writer.WritePropertyName("alternateKeyName"u8); - JsonSerializer.Serialize(writer, AlternateKeyName); - } - writer.WritePropertyName("type"u8); - writer.WriteStringValue(CopySinkType); - if (Optional.IsDefined(WriteBatchSize)) - { - writer.WritePropertyName("writeBatchSize"u8); - JsonSerializer.Serialize(writer, WriteBatchSize); - } - if (Optional.IsDefined(WriteBatchTimeout)) - { - writer.WritePropertyName("writeBatchTimeout"u8); - JsonSerializer.Serialize(writer, WriteBatchTimeout); - } - if (Optional.IsDefined(SinkRetryCount)) - { - writer.WritePropertyName("sinkRetryCount"u8); - JsonSerializer.Serialize(writer, SinkRetryCount); - } - if (Optional.IsDefined(SinkRetryWait)) - { - writer.WritePropertyName("sinkRetryWait"u8); - JsonSerializer.Serialize(writer, SinkRetryWait); - } - if (Optional.IsDefined(MaxConcurrentConnections)) - { - writer.WritePropertyName("maxConcurrentConnections"u8); - JsonSerializer.Serialize(writer, MaxConcurrentConnections); - } - if (Optional.IsDefined(DisableMetricsCollection)) - { - writer.WritePropertyName("disableMetricsCollection"u8); - JsonSerializer.Serialize(writer, DisableMetricsCollection); - } - foreach (var item in AdditionalProperties) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.Value.ToString()).RootElement); -#endif - } - writer.WriteEndObject(); - } - - internal static DynamicsSink DeserializeDynamicsSink(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - DynamicsSinkWriteBehavior writeBehavior = default; - Optional> ignoreNullValues = default; - Optional> alternateKeyName = default; - string type = default; - Optional> writeBatchSize = default; - Optional> writeBatchTimeout = default; - Optional> sinkRetryCount = default; - Optional> sinkRetryWait = default; - Optional> maxConcurrentConnections = default; - Optional> disableMetricsCollection = default; - IDictionary> additionalProperties = default; - Dictionary> additionalPropertiesDictionary = new Dictionary>(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("writeBehavior"u8)) - { - writeBehavior = new DynamicsSinkWriteBehavior(property.Value.GetString()); - continue; - } - if (property.NameEquals("ignoreNullValues"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - ignoreNullValues = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("alternateKeyName"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - alternateKeyName = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("type"u8)) - { - type = property.Value.GetString(); - continue; - } - if (property.NameEquals("writeBatchSize"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - writeBatchSize = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("writeBatchTimeout"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - writeBatchTimeout = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("sinkRetryCount"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - sinkRetryCount = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("sinkRetryWait"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - sinkRetryWait = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("maxConcurrentConnections"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - maxConcurrentConnections = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("disableMetricsCollection"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - disableMetricsCollection = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - additionalPropertiesDictionary.Add(property.Name, JsonSerializer.Deserialize>(property.Value.GetRawText())); - } - additionalProperties = additionalPropertiesDictionary; - return new DynamicsSink(type, writeBatchSize.Value, writeBatchTimeout.Value, sinkRetryCount.Value, sinkRetryWait.Value, maxConcurrentConnections.Value, disableMetricsCollection.Value, additionalProperties, writeBehavior, ignoreNullValues.Value, alternateKeyName.Value); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DynamicsSink.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DynamicsSink.cs deleted file mode 100644 index e07b9224..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DynamicsSink.cs +++ /dev/null @@ -1,47 +0,0 @@ -// - -#nullable disable - -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// A copy activity Dynamics sink. - public partial class DynamicsSink : CopySink - { - /// Initializes a new instance of DynamicsSink. - /// The write behavior for the operation. - public DynamicsSink(DynamicsSinkWriteBehavior writeBehavior) - { - WriteBehavior = writeBehavior; - CopySinkType = "DynamicsSink"; - } - - /// Initializes a new instance of DynamicsSink. - /// Copy sink type. - /// Write batch size. Type: integer (or Expression with resultType integer), minimum: 0. - /// Write batch timeout. Type: string (or Expression with resultType string), pattern: ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). - /// Sink retry count. Type: integer (or Expression with resultType integer). - /// Sink retry wait. Type: string (or Expression with resultType string), pattern: ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). - /// The maximum concurrent connection count for the sink data store. Type: integer (or Expression with resultType integer). - /// If true, disable data store metrics collection. Default is false. Type: boolean (or Expression with resultType boolean). - /// Additional Properties. - /// The write behavior for the operation. - /// The flag indicating whether ignore null values from input dataset (except key fields) during write operation. Default is false. Type: boolean (or Expression with resultType boolean). - /// The logical name of the alternate key which will be used when upserting records. Type: string (or Expression with resultType string). - internal DynamicsSink(string copySinkType, DataFactoryElement writeBatchSize, DataFactoryElement writeBatchTimeout, DataFactoryElement sinkRetryCount, DataFactoryElement sinkRetryWait, DataFactoryElement maxConcurrentConnections, DataFactoryElement disableMetricsCollection, IDictionary> additionalProperties, DynamicsSinkWriteBehavior writeBehavior, DataFactoryElement ignoreNullValues, DataFactoryElement alternateKeyName) : base(copySinkType, writeBatchSize, writeBatchTimeout, sinkRetryCount, sinkRetryWait, maxConcurrentConnections, disableMetricsCollection, additionalProperties) - { - WriteBehavior = writeBehavior; - IgnoreNullValues = ignoreNullValues; - AlternateKeyName = alternateKeyName; - CopySinkType = copySinkType ?? "DynamicsSink"; - } - - /// The write behavior for the operation. - public DynamicsSinkWriteBehavior WriteBehavior { get; set; } - /// The flag indicating whether ignore null values from input dataset (except key fields) during write operation. Default is false. Type: boolean (or Expression with resultType boolean). - public DataFactoryElement IgnoreNullValues { get; set; } - /// The logical name of the alternate key which will be used when upserting records. Type: string (or Expression with resultType string). - public DataFactoryElement AlternateKeyName { get; set; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DynamicsSinkWriteBehavior.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DynamicsSinkWriteBehavior.cs deleted file mode 100644 index 9e50f99b..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DynamicsSinkWriteBehavior.cs +++ /dev/null @@ -1,44 +0,0 @@ -// - -#nullable disable - -using System.ComponentModel; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// Defines values for DynamicsSinkWriteBehavior. - public readonly partial struct DynamicsSinkWriteBehavior : IEquatable - { - private readonly string _value; - - /// Initializes a new instance of . - /// is null. - public DynamicsSinkWriteBehavior(string value) - { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } - - private const string UpsertValue = "Upsert"; - - /// Upsert. - public static DynamicsSinkWriteBehavior Upsert { get; } = new DynamicsSinkWriteBehavior(UpsertValue); - /// Determines if two values are the same. - public static bool operator ==(DynamicsSinkWriteBehavior left, DynamicsSinkWriteBehavior right) => left.Equals(right); - /// Determines if two values are not the same. - public static bool operator !=(DynamicsSinkWriteBehavior left, DynamicsSinkWriteBehavior right) => !left.Equals(right); - /// Converts a string to a . - public static implicit operator DynamicsSinkWriteBehavior(string value) => new DynamicsSinkWriteBehavior(value); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override bool Equals(object obj) => obj is DynamicsSinkWriteBehavior other && Equals(other); - /// - public bool Equals(DynamicsSinkWriteBehavior other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override int GetHashCode() => _value?.GetHashCode() ?? 0; - /// - public override string ToString() => _value; - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DynamicsSource.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DynamicsSource.Serialization.cs deleted file mode 100644 index 7d317637..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DynamicsSource.Serialization.cs +++ /dev/null @@ -1,146 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class DynamicsSource : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - if (Optional.IsDefined(Query)) - { - writer.WritePropertyName("query"u8); - JsonSerializer.Serialize(writer, Query); - } - if (Optional.IsDefined(AdditionalColumns)) - { - writer.WritePropertyName("additionalColumns"u8); -#if NET6_0_OR_GREATER - writer.WriteRawValue(AdditionalColumns); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(AdditionalColumns.ToString()).RootElement); -#endif - } - writer.WritePropertyName("type"u8); - writer.WriteStringValue(CopySourceType); - if (Optional.IsDefined(SourceRetryCount)) - { - writer.WritePropertyName("sourceRetryCount"u8); - JsonSerializer.Serialize(writer, SourceRetryCount); - } - if (Optional.IsDefined(SourceRetryWait)) - { - writer.WritePropertyName("sourceRetryWait"u8); - JsonSerializer.Serialize(writer, SourceRetryWait); - } - if (Optional.IsDefined(MaxConcurrentConnections)) - { - writer.WritePropertyName("maxConcurrentConnections"u8); - JsonSerializer.Serialize(writer, MaxConcurrentConnections); - } - if (Optional.IsDefined(DisableMetricsCollection)) - { - writer.WritePropertyName("disableMetricsCollection"u8); - JsonSerializer.Serialize(writer, DisableMetricsCollection); - } - foreach (var item in AdditionalProperties) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.Value.ToString()).RootElement); -#endif - } - writer.WriteEndObject(); - } - - internal static DynamicsSource DeserializeDynamicsSource(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - Optional> query = default; - Optional additionalColumns = default; - string type = default; - Optional> sourceRetryCount = default; - Optional> sourceRetryWait = default; - Optional> maxConcurrentConnections = default; - Optional> disableMetricsCollection = default; - IDictionary> additionalProperties = default; - Dictionary> additionalPropertiesDictionary = new Dictionary>(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("query"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - query = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("additionalColumns"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - additionalColumns = BinaryData.FromString(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("type"u8)) - { - type = property.Value.GetString(); - continue; - } - if (property.NameEquals("sourceRetryCount"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - sourceRetryCount = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("sourceRetryWait"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - sourceRetryWait = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("maxConcurrentConnections"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - maxConcurrentConnections = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("disableMetricsCollection"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - disableMetricsCollection = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - additionalPropertiesDictionary.Add(property.Name, JsonSerializer.Deserialize>(property.Value.GetRawText())); - } - additionalProperties = additionalPropertiesDictionary; - return new DynamicsSource(type, sourceRetryCount.Value, sourceRetryWait.Value, maxConcurrentConnections.Value, disableMetricsCollection.Value, additionalProperties, query.Value, additionalColumns.Value); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DynamicsSource.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DynamicsSource.cs deleted file mode 100644 index 02299b36..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/DynamicsSource.cs +++ /dev/null @@ -1,68 +0,0 @@ -// - -#nullable disable - -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// A copy activity Dynamics source. - public partial class DynamicsSource : CopyActivitySource - { - /// Initializes a new instance of DynamicsSource. - public DynamicsSource() - { - CopySourceType = "DynamicsSource"; - } - - /// Initializes a new instance of DynamicsSource. - /// Copy source type. - /// Source retry count. Type: integer (or Expression with resultType integer). - /// Source retry wait. Type: string (or Expression with resultType string), pattern: ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). - /// The maximum concurrent connection count for the source data store. Type: integer (or Expression with resultType integer). - /// If true, disable data store metrics collection. Default is false. Type: boolean (or Expression with resultType boolean). - /// Additional Properties. - /// FetchXML is a proprietary query language that is used in Microsoft Dynamics (online & on-premises). Type: string (or Expression with resultType string). - /// Specifies the additional columns to be added to source data. Type: array of objects(AdditionalColumns) (or Expression with resultType array of objects). - internal DynamicsSource(string copySourceType, DataFactoryElement sourceRetryCount, DataFactoryElement sourceRetryWait, DataFactoryElement maxConcurrentConnections, DataFactoryElement disableMetricsCollection, IDictionary> additionalProperties, DataFactoryElement query, BinaryData additionalColumns) : base(copySourceType, sourceRetryCount, sourceRetryWait, maxConcurrentConnections, disableMetricsCollection, additionalProperties) - { - Query = query; - AdditionalColumns = additionalColumns; - CopySourceType = copySourceType ?? "DynamicsSource"; - } - - /// FetchXML is a proprietary query language that is used in Microsoft Dynamics (online & on-premises). Type: string (or Expression with resultType string). - public DataFactoryElement Query { get; set; } - /// - /// Specifies the additional columns to be added to source data. Type: array of objects(AdditionalColumns) (or Expression with resultType array of objects). - /// - /// To assign an object to this property use . - /// - /// - /// To assign an already formated json string to this property use . - /// - /// - /// Examples: - /// - /// - /// BinaryData.FromObjectAsJson("foo") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromString("\"foo\"") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromObjectAsJson(new { key = "value" }) - /// Creates a payload of { "key": "value" }. - /// - /// - /// BinaryData.FromString("{\"key\": \"value\"}") - /// Creates a payload of { "key": "value" }. - /// - /// - /// - /// - public BinaryData AdditionalColumns { get; set; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/EloquaLinkedService.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/EloquaLinkedService.Serialization.cs deleted file mode 100644 index 42f60a2a..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/EloquaLinkedService.Serialization.cs +++ /dev/null @@ -1,247 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class EloquaLinkedService : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - writer.WritePropertyName("type"u8); - writer.WriteStringValue(LinkedServiceType); - if (Optional.IsDefined(ConnectVia)) - { - writer.WritePropertyName("connectVia"u8); - writer.WriteObjectValue(ConnectVia); - } - if (Optional.IsDefined(Description)) - { - writer.WritePropertyName("description"u8); - writer.WriteStringValue(Description); - } - if (Optional.IsCollectionDefined(Parameters)) - { - writer.WritePropertyName("parameters"u8); - writer.WriteStartObject(); - foreach (var item in Parameters) - { - writer.WritePropertyName(item.Key); - writer.WriteObjectValue(item.Value); - } - writer.WriteEndObject(); - } - if (Optional.IsCollectionDefined(Annotations)) - { - writer.WritePropertyName("annotations"u8); - writer.WriteStartArray(); - foreach (var item in Annotations) - { - if (item == null) - { - writer.WriteNullValue(); - continue; - } -#if NET6_0_OR_GREATER - writer.WriteRawValue(item); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.ToString()).RootElement); -#endif - } - writer.WriteEndArray(); - } - writer.WritePropertyName("typeProperties"u8); - writer.WriteStartObject(); - writer.WritePropertyName("endpoint"u8); - JsonSerializer.Serialize(writer, Endpoint); - writer.WritePropertyName("username"u8); - JsonSerializer.Serialize(writer, Username); - if (Optional.IsDefined(Password)) - { - writer.WritePropertyName("password"u8); - JsonSerializer.Serialize(writer, Password); - } - if (Optional.IsDefined(UseEncryptedEndpoints)) - { - writer.WritePropertyName("useEncryptedEndpoints"u8); - JsonSerializer.Serialize(writer, UseEncryptedEndpoints); - } - if (Optional.IsDefined(UseHostVerification)) - { - writer.WritePropertyName("useHostVerification"u8); - JsonSerializer.Serialize(writer, UseHostVerification); - } - if (Optional.IsDefined(UsePeerVerification)) - { - writer.WritePropertyName("usePeerVerification"u8); - JsonSerializer.Serialize(writer, UsePeerVerification); - } - if (Optional.IsDefined(EncryptedCredential)) - { - writer.WritePropertyName("encryptedCredential"u8); - writer.WriteStringValue(EncryptedCredential); - } - writer.WriteEndObject(); - foreach (var item in AdditionalProperties) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.Value.ToString()).RootElement); -#endif - } - writer.WriteEndObject(); - } - - internal static EloquaLinkedService DeserializeEloquaLinkedService(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - string type = default; - Optional connectVia = default; - Optional description = default; - Optional> parameters = default; - Optional> annotations = default; - DataFactoryElement endpoint = default; - DataFactoryElement username = default; - Optional password = default; - Optional> useEncryptedEndpoints = default; - Optional> useHostVerification = default; - Optional> usePeerVerification = default; - Optional encryptedCredential = default; - IDictionary> additionalProperties = default; - Dictionary> additionalPropertiesDictionary = new Dictionary>(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("type"u8)) - { - type = property.Value.GetString(); - continue; - } - if (property.NameEquals("connectVia"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - connectVia = IntegrationRuntimeReference.DeserializeIntegrationRuntimeReference(property.Value); - continue; - } - if (property.NameEquals("description"u8)) - { - description = property.Value.GetString(); - continue; - } - if (property.NameEquals("parameters"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - Dictionary dictionary = new Dictionary(); - foreach (var property0 in property.Value.EnumerateObject()) - { - dictionary.Add(property0.Name, EntityParameterSpecification.DeserializeEntityParameterSpecification(property0.Value)); - } - parameters = dictionary; - continue; - } - if (property.NameEquals("annotations"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - if (item.ValueKind == JsonValueKind.Null) - { - array.Add(null); - } - else - { - array.Add(BinaryData.FromString(item.GetRawText())); - } - } - annotations = array; - continue; - } - if (property.NameEquals("typeProperties"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - foreach (var property0 in property.Value.EnumerateObject()) - { - if (property0.NameEquals("endpoint"u8)) - { - endpoint = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("username"u8)) - { - username = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("password"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - password = JsonSerializer.Deserialize(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("useEncryptedEndpoints"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - useEncryptedEndpoints = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("useHostVerification"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - useHostVerification = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("usePeerVerification"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - usePeerVerification = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("encryptedCredential"u8)) - { - encryptedCredential = property0.Value.GetString(); - continue; - } - } - continue; - } - additionalPropertiesDictionary.Add(property.Name, JsonSerializer.Deserialize>(property.Value.GetRawText())); - } - additionalProperties = additionalPropertiesDictionary; - return new EloquaLinkedService(type, connectVia.Value, description.Value, Optional.ToDictionary(parameters), Optional.ToList(annotations), additionalProperties, endpoint, username, password, useEncryptedEndpoints.Value, useHostVerification.Value, usePeerVerification.Value, encryptedCredential.Value); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/EloquaLinkedService.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/EloquaLinkedService.cs deleted file mode 100644 index a0ba4a32..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/EloquaLinkedService.cs +++ /dev/null @@ -1,68 +0,0 @@ -// - -#nullable disable - -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// Eloqua server linked service. - public partial class EloquaLinkedService : DataFactoryLinkedServiceProperties - { - /// Initializes a new instance of EloquaLinkedService. - /// The endpoint of the Eloqua server. (i.e. eloqua.example.com). - /// The site name and user name of your Eloqua account in the form: sitename/username. (i.e. Eloqua/Alice). - /// or is null. - public EloquaLinkedService(DataFactoryElement endpoint, DataFactoryElement username) - { - Argument.AssertNotNull(endpoint, nameof(endpoint)); - Argument.AssertNotNull(username, nameof(username)); - - Endpoint = endpoint; - Username = username; - LinkedServiceType = "Eloqua"; - } - - /// Initializes a new instance of EloquaLinkedService. - /// Type of linked service. - /// The integration runtime reference. - /// Linked service description. - /// Parameters for linked service. - /// List of tags that can be used for describing the linked service. - /// Additional Properties. - /// The endpoint of the Eloqua server. (i.e. eloqua.example.com). - /// The site name and user name of your Eloqua account in the form: sitename/username. (i.e. Eloqua/Alice). - /// The password corresponding to the user name. - /// Specifies whether the data source endpoints are encrypted using HTTPS. The default value is true. - /// 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. - /// Specifies whether to verify the identity of the server when connecting over SSL. The default value is true. - /// The encrypted credential used for authentication. Credentials are encrypted using the integration runtime credential manager. Type: string. - internal EloquaLinkedService(string linkedServiceType, IntegrationRuntimeReference connectVia, string description, IDictionary parameters, IList annotations, IDictionary> additionalProperties, DataFactoryElement endpoint, DataFactoryElement username, DataFactorySecretBaseDefinition password, DataFactoryElement useEncryptedEndpoints, DataFactoryElement useHostVerification, DataFactoryElement usePeerVerification, string encryptedCredential) : base(linkedServiceType, connectVia, description, parameters, annotations, additionalProperties) - { - Endpoint = endpoint; - Username = username; - Password = password; - UseEncryptedEndpoints = useEncryptedEndpoints; - UseHostVerification = useHostVerification; - UsePeerVerification = usePeerVerification; - EncryptedCredential = encryptedCredential; - LinkedServiceType = linkedServiceType ?? "Eloqua"; - } - - /// The endpoint of the Eloqua server. (i.e. eloqua.example.com). - public DataFactoryElement Endpoint { get; set; } - /// The site name and user name of your Eloqua account in the form: sitename/username. (i.e. Eloqua/Alice). - public DataFactoryElement Username { get; set; } - /// The password corresponding to the user name. - public DataFactorySecretBaseDefinition Password { get; set; } - /// Specifies whether the data source endpoints are encrypted using HTTPS. The default value is true. - public DataFactoryElement UseEncryptedEndpoints { get; set; } - /// 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. - public DataFactoryElement UseHostVerification { get; set; } - /// Specifies whether to verify the identity of the server when connecting over SSL. The default value is true. - public DataFactoryElement UsePeerVerification { get; set; } - /// The encrypted credential used for authentication. Credentials are encrypted using the integration runtime credential manager. Type: string. - public string EncryptedCredential { get; set; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/EloquaObjectDataset.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/EloquaObjectDataset.Serialization.cs deleted file mode 100644 index 94803922..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/EloquaObjectDataset.Serialization.cs +++ /dev/null @@ -1,212 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class EloquaObjectDataset : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - writer.WritePropertyName("type"u8); - writer.WriteStringValue(DatasetType); - if (Optional.IsDefined(Description)) - { - writer.WritePropertyName("description"u8); - writer.WriteStringValue(Description); - } - if (Optional.IsDefined(Structure)) - { - writer.WritePropertyName("structure"u8); - JsonSerializer.Serialize(writer, Structure); - } - if (Optional.IsDefined(Schema)) - { - writer.WritePropertyName("schema"u8); - JsonSerializer.Serialize(writer, Schema); - } - writer.WritePropertyName("linkedServiceName"u8); - JsonSerializer.Serialize(writer, LinkedServiceName); if (Optional.IsCollectionDefined(Parameters)) - { - writer.WritePropertyName("parameters"u8); - writer.WriteStartObject(); - foreach (var item in Parameters) - { - writer.WritePropertyName(item.Key); - writer.WriteObjectValue(item.Value); - } - writer.WriteEndObject(); - } - if (Optional.IsCollectionDefined(Annotations)) - { - writer.WritePropertyName("annotations"u8); - writer.WriteStartArray(); - foreach (var item in Annotations) - { - if (item == null) - { - writer.WriteNullValue(); - continue; - } -#if NET6_0_OR_GREATER - writer.WriteRawValue(item); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.ToString()).RootElement); -#endif - } - writer.WriteEndArray(); - } - if (Optional.IsDefined(Folder)) - { - writer.WritePropertyName("folder"u8); - writer.WriteObjectValue(Folder); - } - writer.WritePropertyName("typeProperties"u8); - writer.WriteStartObject(); - if (Optional.IsDefined(TableName)) - { - writer.WritePropertyName("tableName"u8); - JsonSerializer.Serialize(writer, TableName); - } - writer.WriteEndObject(); - foreach (var item in AdditionalProperties) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.Value.ToString()).RootElement); -#endif - } - writer.WriteEndObject(); - } - - internal static EloquaObjectDataset DeserializeEloquaObjectDataset(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - string type = default; - Optional description = default; - Optional>> structure = default; - Optional>> schema = default; - DataFactoryLinkedServiceReference linkedServiceName = default; - Optional> parameters = default; - Optional> annotations = default; - Optional folder = default; - Optional> tableName = default; - IDictionary> additionalProperties = default; - Dictionary> additionalPropertiesDictionary = new Dictionary>(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("type"u8)) - { - type = property.Value.GetString(); - continue; - } - if (property.NameEquals("description"u8)) - { - description = property.Value.GetString(); - continue; - } - if (property.NameEquals("structure"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - structure = JsonSerializer.Deserialize>>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("schema"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - schema = JsonSerializer.Deserialize>>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("linkedServiceName"u8)) - { - linkedServiceName = JsonSerializer.Deserialize(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("parameters"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - Dictionary dictionary = new Dictionary(); - foreach (var property0 in property.Value.EnumerateObject()) - { - dictionary.Add(property0.Name, EntityParameterSpecification.DeserializeEntityParameterSpecification(property0.Value)); - } - parameters = dictionary; - continue; - } - if (property.NameEquals("annotations"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - if (item.ValueKind == JsonValueKind.Null) - { - array.Add(null); - } - else - { - array.Add(BinaryData.FromString(item.GetRawText())); - } - } - annotations = array; - continue; - } - if (property.NameEquals("folder"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - folder = DatasetFolder.DeserializeDatasetFolder(property.Value); - continue; - } - if (property.NameEquals("typeProperties"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - foreach (var property0 in property.Value.EnumerateObject()) - { - if (property0.NameEquals("tableName"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - tableName = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - } - continue; - } - additionalPropertiesDictionary.Add(property.Name, JsonSerializer.Deserialize>(property.Value.GetRawText())); - } - additionalProperties = additionalPropertiesDictionary; - return new EloquaObjectDataset(type, description.Value, structure.Value, schema.Value, linkedServiceName, Optional.ToDictionary(parameters), Optional.ToList(annotations), folder.Value, additionalProperties, tableName.Value); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/EloquaObjectDataset.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/EloquaObjectDataset.cs deleted file mode 100644 index 5548ca9b..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/EloquaObjectDataset.cs +++ /dev/null @@ -1,43 +0,0 @@ -// - -#nullable disable - -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// Eloqua server dataset. - public partial class EloquaObjectDataset : DataFactoryDatasetProperties - { - /// Initializes a new instance of EloquaObjectDataset. - /// Linked service reference. - /// is null. - public EloquaObjectDataset(DataFactoryLinkedServiceReference linkedServiceName) : base(linkedServiceName) - { - Argument.AssertNotNull(linkedServiceName, nameof(linkedServiceName)); - - DatasetType = "EloquaObject"; - } - - /// Initializes a new instance of EloquaObjectDataset. - /// Type of dataset. - /// Dataset description. - /// Columns that define the structure of the dataset. Type: array (or Expression with resultType array), itemType: DatasetDataElement. - /// Columns that define the physical type schema of the dataset. Type: array (or Expression with resultType array), itemType: DatasetSchemaDataElement. - /// Linked service reference. - /// Parameters for dataset. - /// List of tags that can be used for describing the Dataset. - /// The folder that this Dataset is in. If not specified, Dataset will appear at the root level. - /// Additional Properties. - /// The table name. Type: string (or Expression with resultType string). - internal EloquaObjectDataset(string datasetType, string description, DataFactoryElement> structure, DataFactoryElement> schema, DataFactoryLinkedServiceReference linkedServiceName, IDictionary parameters, IList annotations, DatasetFolder folder, IDictionary> additionalProperties, DataFactoryElement tableName) : base(datasetType, description, structure, schema, linkedServiceName, parameters, annotations, folder, additionalProperties) - { - TableName = tableName; - DatasetType = datasetType ?? "EloquaObject"; - } - - /// The table name. Type: string (or Expression with resultType string). - public DataFactoryElement TableName { get; set; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/EloquaSource.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/EloquaSource.Serialization.cs deleted file mode 100644 index e426ef92..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/EloquaSource.Serialization.cs +++ /dev/null @@ -1,161 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class EloquaSource : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - if (Optional.IsDefined(Query)) - { - writer.WritePropertyName("query"u8); - JsonSerializer.Serialize(writer, Query); - } - if (Optional.IsDefined(QueryTimeout)) - { - writer.WritePropertyName("queryTimeout"u8); - JsonSerializer.Serialize(writer, QueryTimeout); - } - if (Optional.IsDefined(AdditionalColumns)) - { - writer.WritePropertyName("additionalColumns"u8); -#if NET6_0_OR_GREATER - writer.WriteRawValue(AdditionalColumns); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(AdditionalColumns.ToString()).RootElement); -#endif - } - writer.WritePropertyName("type"u8); - writer.WriteStringValue(CopySourceType); - if (Optional.IsDefined(SourceRetryCount)) - { - writer.WritePropertyName("sourceRetryCount"u8); - JsonSerializer.Serialize(writer, SourceRetryCount); - } - if (Optional.IsDefined(SourceRetryWait)) - { - writer.WritePropertyName("sourceRetryWait"u8); - JsonSerializer.Serialize(writer, SourceRetryWait); - } - if (Optional.IsDefined(MaxConcurrentConnections)) - { - writer.WritePropertyName("maxConcurrentConnections"u8); - JsonSerializer.Serialize(writer, MaxConcurrentConnections); - } - if (Optional.IsDefined(DisableMetricsCollection)) - { - writer.WritePropertyName("disableMetricsCollection"u8); - JsonSerializer.Serialize(writer, DisableMetricsCollection); - } - foreach (var item in AdditionalProperties) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.Value.ToString()).RootElement); -#endif - } - writer.WriteEndObject(); - } - - internal static EloquaSource DeserializeEloquaSource(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - Optional> query = default; - Optional> queryTimeout = default; - Optional additionalColumns = default; - string type = default; - Optional> sourceRetryCount = default; - Optional> sourceRetryWait = default; - Optional> maxConcurrentConnections = default; - Optional> disableMetricsCollection = default; - IDictionary> additionalProperties = default; - Dictionary> additionalPropertiesDictionary = new Dictionary>(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("query"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - query = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("queryTimeout"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - queryTimeout = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("additionalColumns"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - additionalColumns = BinaryData.FromString(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("type"u8)) - { - type = property.Value.GetString(); - continue; - } - if (property.NameEquals("sourceRetryCount"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - sourceRetryCount = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("sourceRetryWait"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - sourceRetryWait = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("maxConcurrentConnections"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - maxConcurrentConnections = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("disableMetricsCollection"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - disableMetricsCollection = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - additionalPropertiesDictionary.Add(property.Name, JsonSerializer.Deserialize>(property.Value.GetRawText())); - } - additionalProperties = additionalPropertiesDictionary; - return new EloquaSource(type, sourceRetryCount.Value, sourceRetryWait.Value, maxConcurrentConnections.Value, disableMetricsCollection.Value, additionalProperties, queryTimeout.Value, additionalColumns.Value, query.Value); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/EloquaSource.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/EloquaSource.cs deleted file mode 100644 index db74a6b9..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/EloquaSource.cs +++ /dev/null @@ -1,37 +0,0 @@ -// - -#nullable disable - -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// A copy activity Eloqua server source. - public partial class EloquaSource : TabularSource - { - /// Initializes a new instance of EloquaSource. - public EloquaSource() - { - CopySourceType = "EloquaSource"; - } - - /// Initializes a new instance of EloquaSource. - /// Copy source type. - /// Source retry count. Type: integer (or Expression with resultType integer). - /// Source retry wait. Type: string (or Expression with resultType string), pattern: ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). - /// The maximum concurrent connection count for the source data store. Type: integer (or Expression with resultType integer). - /// If true, disable data store metrics collection. Default is false. Type: boolean (or Expression with resultType boolean). - /// Additional Properties. - /// 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). - /// A query to retrieve data from source. Type: string (or Expression with resultType string). - internal EloquaSource(string copySourceType, DataFactoryElement sourceRetryCount, DataFactoryElement sourceRetryWait, DataFactoryElement maxConcurrentConnections, DataFactoryElement disableMetricsCollection, IDictionary> additionalProperties, DataFactoryElement queryTimeout, BinaryData additionalColumns, DataFactoryElement query) : base(copySourceType, sourceRetryCount, sourceRetryWait, maxConcurrentConnections, disableMetricsCollection, additionalProperties, queryTimeout, additionalColumns) - { - Query = query; - CopySourceType = copySourceType ?? "EloquaSource"; - } - - /// A query to retrieve data from source. Type: string (or Expression with resultType string). - public DataFactoryElement Query { get; set; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/EntityParameterSpecification.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/EntityParameterSpecification.Serialization.cs deleted file mode 100644 index 7ed01bb0..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/EntityParameterSpecification.Serialization.cs +++ /dev/null @@ -1,57 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class EntityParameterSpecification : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ParameterType.ToString()); - if (Optional.IsDefined(DefaultValue)) - { - writer.WritePropertyName("defaultValue"u8); -#if NET6_0_OR_GREATER - writer.WriteRawValue(DefaultValue); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(DefaultValue.ToString()).RootElement); -#endif - } - writer.WriteEndObject(); - } - - internal static EntityParameterSpecification DeserializeEntityParameterSpecification(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - EntityParameterType type = default; - Optional defaultValue = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("type"u8)) - { - type = new EntityParameterType(property.Value.GetString()); - continue; - } - if (property.NameEquals("defaultValue"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - defaultValue = BinaryData.FromString(property.Value.GetRawText()); - continue; - } - } - return new EntityParameterSpecification(type, defaultValue.Value); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/EntityParameterSpecification.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/EntityParameterSpecification.cs deleted file mode 100644 index c249ac70..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/EntityParameterSpecification.cs +++ /dev/null @@ -1,60 +0,0 @@ -// - -#nullable disable - -namespace AzureDataFactory.TestingFramework.Models -{ - /// Definition of a single parameter for an entity. - public partial class EntityParameterSpecification - { - /// Initializes a new instance of EntityParameterSpecification. - /// Parameter type. - public EntityParameterSpecification(EntityParameterType parameterType) - { - ParameterType = parameterType; - } - - /// Initializes a new instance of EntityParameterSpecification. - /// Parameter type. - /// Default value of parameter. - internal EntityParameterSpecification(EntityParameterType parameterType, BinaryData defaultValue) - { - ParameterType = parameterType; - DefaultValue = defaultValue; - } - - /// Parameter type. - public EntityParameterType ParameterType { get; set; } - /// - /// Default value of parameter. - /// - /// To assign an object to this property use . - /// - /// - /// To assign an already formated json string to this property use . - /// - /// - /// Examples: - /// - /// - /// BinaryData.FromObjectAsJson("foo") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromString("\"foo\"") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromObjectAsJson(new { key = "value" }) - /// Creates a payload of { "key": "value" }. - /// - /// - /// BinaryData.FromString("{\"key\": \"value\"}") - /// Creates a payload of { "key": "value" }. - /// - /// - /// - /// - public BinaryData DefaultValue { get; set; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/EntityParameterType.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/EntityParameterType.cs deleted file mode 100644 index 59b7692c..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/EntityParameterType.cs +++ /dev/null @@ -1,62 +0,0 @@ -// - -#nullable disable - -using System.ComponentModel; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// Parameter type. - public readonly partial struct EntityParameterType : IEquatable - { - private readonly string _value; - - /// Initializes a new instance of . - /// is null. - public EntityParameterType(string value) - { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } - - private const string ObjectValue = "Object"; - private const string StringValue = "String"; - private const string IntValue = "Int"; - private const string FloatValue = "Float"; - private const string BoolValue = "Bool"; - private const string ArrayValue = "Array"; - private const string SecureStringValue = "SecureString"; - - /// Object. - public static EntityParameterType Object { get; } = new EntityParameterType(ObjectValue); - /// String. - public static EntityParameterType String { get; } = new EntityParameterType(StringValue); - /// Int. - public static EntityParameterType Int { get; } = new EntityParameterType(IntValue); - /// Float. - public static EntityParameterType Float { get; } = new EntityParameterType(FloatValue); - /// Bool. - public static EntityParameterType Bool { get; } = new EntityParameterType(BoolValue); - /// Array. - public static EntityParameterType Array { get; } = new EntityParameterType(ArrayValue); - /// SecureString. - public static EntityParameterType SecureString { get; } = new EntityParameterType(SecureStringValue); - /// Determines if two values are the same. - public static bool operator ==(EntityParameterType left, EntityParameterType right) => left.Equals(right); - /// Determines if two values are not the same. - public static bool operator !=(EntityParameterType left, EntityParameterType right) => !left.Equals(right); - /// Converts a string to a . - public static implicit operator EntityParameterType(string value) => new EntityParameterType(value); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override bool Equals(object obj) => obj is EntityParameterType other && Equals(other); - /// - public bool Equals(EntityParameterType other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override int GetHashCode() => _value?.GetHashCode() ?? 0; - /// - public override string ToString() => _value; - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/EntityReference.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/EntityReference.Serialization.cs deleted file mode 100644 index 24423140..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/EntityReference.Serialization.cs +++ /dev/null @@ -1,56 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class EntityReference : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - if (Optional.IsDefined(IntegrationRuntimeEntityReferenceType)) - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(IntegrationRuntimeEntityReferenceType.Value.ToString()); - } - if (Optional.IsDefined(ReferenceName)) - { - writer.WritePropertyName("referenceName"u8); - writer.WriteStringValue(ReferenceName); - } - writer.WriteEndObject(); - } - - internal static EntityReference DeserializeEntityReference(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - Optional type = default; - Optional referenceName = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("type"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - type = new IntegrationRuntimeEntityReferenceType(property.Value.GetString()); - continue; - } - if (property.NameEquals("referenceName"u8)) - { - referenceName = property.Value.GetString(); - continue; - } - } - return new EntityReference(Optional.ToNullable(type), referenceName.Value); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/EntityReference.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/EntityReference.cs deleted file mode 100644 index 30847c23..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/EntityReference.cs +++ /dev/null @@ -1,29 +0,0 @@ -// - -#nullable disable - -namespace AzureDataFactory.TestingFramework.Models -{ - /// The entity reference. - public partial class EntityReference - { - /// Initializes a new instance of EntityReference. - public EntityReference() - { - } - - /// Initializes a new instance of EntityReference. - /// The type of this referenced entity. - /// The name of this referenced entity. - internal EntityReference(IntegrationRuntimeEntityReferenceType? integrationRuntimeEntityReferenceType, string referenceName) - { - IntegrationRuntimeEntityReferenceType = integrationRuntimeEntityReferenceType; - ReferenceName = referenceName; - } - - /// The type of this referenced entity. - public IntegrationRuntimeEntityReferenceType? IntegrationRuntimeEntityReferenceType { get; set; } - /// The name of this referenced entity. - public string ReferenceName { get; set; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/EnvironmentVariableSetup.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/EnvironmentVariableSetup.Serialization.cs deleted file mode 100644 index 5c32e808..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/EnvironmentVariableSetup.Serialization.cs +++ /dev/null @@ -1,69 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class EnvironmentVariableSetup : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - writer.WritePropertyName("type"u8); - writer.WriteStringValue(CustomSetupBaseType); - writer.WritePropertyName("typeProperties"u8); - writer.WriteStartObject(); - writer.WritePropertyName("variableName"u8); - writer.WriteStringValue(VariableName); - writer.WritePropertyName("variableValue"u8); - writer.WriteStringValue(VariableValue); - writer.WriteEndObject(); - writer.WriteEndObject(); - } - - internal static EnvironmentVariableSetup DeserializeEnvironmentVariableSetup(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - string type = default; - string variableName = default; - string variableValue = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("type"u8)) - { - type = property.Value.GetString(); - continue; - } - if (property.NameEquals("typeProperties"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - foreach (var property0 in property.Value.EnumerateObject()) - { - if (property0.NameEquals("variableName"u8)) - { - variableName = property0.Value.GetString(); - continue; - } - if (property0.NameEquals("variableValue"u8)) - { - variableValue = property0.Value.GetString(); - continue; - } - } - continue; - } - } - return new EnvironmentVariableSetup(type, variableName, variableValue); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/EnvironmentVariableSetup.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/EnvironmentVariableSetup.cs deleted file mode 100644 index 658f1bd8..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/EnvironmentVariableSetup.cs +++ /dev/null @@ -1,42 +0,0 @@ -// - -#nullable disable - -using Azure.Core; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// The custom setup of setting environment variable. - public partial class EnvironmentVariableSetup : CustomSetupBase - { - /// Initializes a new instance of EnvironmentVariableSetup. - /// The name of the environment variable. - /// The value of the environment variable. - /// or is null. - public EnvironmentVariableSetup(string variableName, string variableValue) - { - Argument.AssertNotNull(variableName, nameof(variableName)); - Argument.AssertNotNull(variableValue, nameof(variableValue)); - - VariableName = variableName; - VariableValue = variableValue; - CustomSetupBaseType = "EnvironmentVariableSetup"; - } - - /// Initializes a new instance of EnvironmentVariableSetup. - /// The type of custom setup. - /// The name of the environment variable. - /// The value of the environment variable. - internal EnvironmentVariableSetup(string customSetupBaseType, string variableName, string variableValue) : base(customSetupBaseType) - { - VariableName = variableName; - VariableValue = variableValue; - CustomSetupBaseType = customSetupBaseType ?? "EnvironmentVariableSetup"; - } - - /// The name of the environment variable. - public string VariableName { get; set; } - /// The value of the environment variable. - public string VariableValue { get; set; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/EventSubscriptionStatus.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/EventSubscriptionStatus.cs deleted file mode 100644 index d8adcc5b..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/EventSubscriptionStatus.cs +++ /dev/null @@ -1,56 +0,0 @@ -// - -#nullable disable - -using System.ComponentModel; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// Event Subscription Status. - public readonly partial struct EventSubscriptionStatus : IEquatable - { - private readonly string _value; - - /// Initializes a new instance of . - /// is null. - public EventSubscriptionStatus(string value) - { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } - - private const string EnabledValue = "Enabled"; - private const string ProvisioningValue = "Provisioning"; - private const string DeprovisioningValue = "Deprovisioning"; - private const string DisabledValue = "Disabled"; - private const string UnknownValue = "Unknown"; - - /// Enabled. - public static EventSubscriptionStatus Enabled { get; } = new EventSubscriptionStatus(EnabledValue); - /// Provisioning. - public static EventSubscriptionStatus Provisioning { get; } = new EventSubscriptionStatus(ProvisioningValue); - /// Deprovisioning. - public static EventSubscriptionStatus Deprovisioning { get; } = new EventSubscriptionStatus(DeprovisioningValue); - /// Disabled. - public static EventSubscriptionStatus Disabled { get; } = new EventSubscriptionStatus(DisabledValue); - /// Unknown. - public static EventSubscriptionStatus Unknown { get; } = new EventSubscriptionStatus(UnknownValue); - /// Determines if two values are the same. - public static bool operator ==(EventSubscriptionStatus left, EventSubscriptionStatus right) => left.Equals(right); - /// Determines if two values are not the same. - public static bool operator !=(EventSubscriptionStatus left, EventSubscriptionStatus right) => !left.Equals(right); - /// Converts a string to a . - public static implicit operator EventSubscriptionStatus(string value) => new EventSubscriptionStatus(value); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override bool Equals(object obj) => obj is EventSubscriptionStatus other && Equals(other); - /// - public bool Equals(EventSubscriptionStatus other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override int GetHashCode() => _value?.GetHashCode() ?? 0; - /// - public override string ToString() => _value; - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/ExcelDataset.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/ExcelDataset.Serialization.cs deleted file mode 100644 index 661ec05e..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/ExcelDataset.Serialization.cs +++ /dev/null @@ -1,302 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class ExcelDataset : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - writer.WritePropertyName("type"u8); - writer.WriteStringValue(DatasetType); - if (Optional.IsDefined(Description)) - { - writer.WritePropertyName("description"u8); - writer.WriteStringValue(Description); - } - if (Optional.IsDefined(Structure)) - { - writer.WritePropertyName("structure"u8); - JsonSerializer.Serialize(writer, Structure); - } - if (Optional.IsDefined(Schema)) - { - writer.WritePropertyName("schema"u8); - JsonSerializer.Serialize(writer, Schema); - } - writer.WritePropertyName("linkedServiceName"u8); - JsonSerializer.Serialize(writer, LinkedServiceName); if (Optional.IsCollectionDefined(Parameters)) - { - writer.WritePropertyName("parameters"u8); - writer.WriteStartObject(); - foreach (var item in Parameters) - { - writer.WritePropertyName(item.Key); - writer.WriteObjectValue(item.Value); - } - writer.WriteEndObject(); - } - if (Optional.IsCollectionDefined(Annotations)) - { - writer.WritePropertyName("annotations"u8); - writer.WriteStartArray(); - foreach (var item in Annotations) - { - if (item == null) - { - writer.WriteNullValue(); - continue; - } -#if NET6_0_OR_GREATER - writer.WriteRawValue(item); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.ToString()).RootElement); -#endif - } - writer.WriteEndArray(); - } - if (Optional.IsDefined(Folder)) - { - writer.WritePropertyName("folder"u8); - writer.WriteObjectValue(Folder); - } - writer.WritePropertyName("typeProperties"u8); - writer.WriteStartObject(); - if (Optional.IsDefined(DataLocation)) - { - writer.WritePropertyName("location"u8); - writer.WriteObjectValue(DataLocation); - } - if (Optional.IsDefined(SheetName)) - { - writer.WritePropertyName("sheetName"u8); - JsonSerializer.Serialize(writer, SheetName); - } - if (Optional.IsDefined(SheetIndex)) - { - writer.WritePropertyName("sheetIndex"u8); - JsonSerializer.Serialize(writer, SheetIndex); - } - if (Optional.IsDefined(Range)) - { - writer.WritePropertyName("range"u8); - JsonSerializer.Serialize(writer, Range); - } - if (Optional.IsDefined(FirstRowAsHeader)) - { - writer.WritePropertyName("firstRowAsHeader"u8); - JsonSerializer.Serialize(writer, FirstRowAsHeader); - } - if (Optional.IsDefined(Compression)) - { - writer.WritePropertyName("compression"u8); - writer.WriteObjectValue(Compression); - } - if (Optional.IsDefined(NullValue)) - { - writer.WritePropertyName("nullValue"u8); - JsonSerializer.Serialize(writer, NullValue); - } - writer.WriteEndObject(); - foreach (var item in AdditionalProperties) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.Value.ToString()).RootElement); -#endif - } - writer.WriteEndObject(); - } - - internal static ExcelDataset DeserializeExcelDataset(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - string type = default; - Optional description = default; - Optional>> structure = default; - Optional>> schema = default; - DataFactoryLinkedServiceReference linkedServiceName = default; - Optional> parameters = default; - Optional> annotations = default; - Optional folder = default; - Optional location = default; - Optional> sheetName = default; - Optional> sheetIndex = default; - Optional> range = default; - Optional> firstRowAsHeader = default; - Optional compression = default; - Optional> nullValue = default; - IDictionary> additionalProperties = default; - Dictionary> additionalPropertiesDictionary = new Dictionary>(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("type"u8)) - { - type = property.Value.GetString(); - continue; - } - if (property.NameEquals("description"u8)) - { - description = property.Value.GetString(); - continue; - } - if (property.NameEquals("structure"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - structure = JsonSerializer.Deserialize>>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("schema"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - schema = JsonSerializer.Deserialize>>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("linkedServiceName"u8)) - { - linkedServiceName = JsonSerializer.Deserialize(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("parameters"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - Dictionary dictionary = new Dictionary(); - foreach (var property0 in property.Value.EnumerateObject()) - { - dictionary.Add(property0.Name, EntityParameterSpecification.DeserializeEntityParameterSpecification(property0.Value)); - } - parameters = dictionary; - continue; - } - if (property.NameEquals("annotations"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - if (item.ValueKind == JsonValueKind.Null) - { - array.Add(null); - } - else - { - array.Add(BinaryData.FromString(item.GetRawText())); - } - } - annotations = array; - continue; - } - if (property.NameEquals("folder"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - folder = DatasetFolder.DeserializeDatasetFolder(property.Value); - continue; - } - if (property.NameEquals("typeProperties"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - foreach (var property0 in property.Value.EnumerateObject()) - { - if (property0.NameEquals("location"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - location = DatasetLocation.DeserializeDatasetLocation(property0.Value); - continue; - } - if (property0.NameEquals("sheetName"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - sheetName = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("sheetIndex"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - sheetIndex = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("range"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - range = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("firstRowAsHeader"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - firstRowAsHeader = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("compression"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - compression = DatasetCompression.DeserializeDatasetCompression(property0.Value); - continue; - } - if (property0.NameEquals("nullValue"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - nullValue = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - } - continue; - } - additionalPropertiesDictionary.Add(property.Name, JsonSerializer.Deserialize>(property.Value.GetRawText())); - } - additionalProperties = additionalPropertiesDictionary; - return new ExcelDataset(type, description.Value, structure.Value, schema.Value, linkedServiceName, Optional.ToDictionary(parameters), Optional.ToList(annotations), folder.Value, additionalProperties, location.Value, sheetName.Value, sheetIndex.Value, range.Value, firstRowAsHeader.Value, compression.Value, nullValue.Value); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/ExcelDataset.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/ExcelDataset.cs deleted file mode 100644 index 7d4c4466..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/ExcelDataset.cs +++ /dev/null @@ -1,75 +0,0 @@ -// - -#nullable disable - -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// Excel dataset. - public partial class ExcelDataset : DataFactoryDatasetProperties - { - /// Initializes a new instance of ExcelDataset. - /// Linked service reference. - /// is null. - public ExcelDataset(DataFactoryLinkedServiceReference linkedServiceName) : base(linkedServiceName) - { - Argument.AssertNotNull(linkedServiceName, nameof(linkedServiceName)); - - DatasetType = "Excel"; - } - - /// Initializes a new instance of ExcelDataset. - /// Type of dataset. - /// Dataset description. - /// Columns that define the structure of the dataset. Type: array (or Expression with resultType array), itemType: DatasetDataElement. - /// Columns that define the physical type schema of the dataset. Type: array (or Expression with resultType array), itemType: DatasetSchemaDataElement. - /// Linked service reference. - /// Parameters for dataset. - /// List of tags that can be used for describing the Dataset. - /// The folder that this Dataset is in. If not specified, Dataset will appear at the root level. - /// Additional Properties. - /// - /// The location of the excel storage. - /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. - /// The available derived classes include , , , , , , , , , , , and . - /// - /// The sheet name of excel file. Type: string (or Expression with resultType string). - /// The sheet index of excel file and default value is 0. Type: integer (or Expression with resultType integer). - /// The partial data of one sheet. Type: string (or Expression with resultType string). - /// When used as input, treat the first row of data as headers. When used as output,write the headers into the output as the first row of data. The default value is false. Type: boolean (or Expression with resultType boolean). - /// The data compression method used for the json dataset. - /// The null value string. Type: string (or Expression with resultType string). - internal ExcelDataset(string datasetType, string description, DataFactoryElement> structure, DataFactoryElement> schema, DataFactoryLinkedServiceReference linkedServiceName, IDictionary parameters, IList annotations, DatasetFolder folder, IDictionary> additionalProperties, DatasetLocation dataLocation, DataFactoryElement sheetName, DataFactoryElement sheetIndex, DataFactoryElement range, DataFactoryElement firstRowAsHeader, DatasetCompression compression, DataFactoryElement nullValue) : base(datasetType, description, structure, schema, linkedServiceName, parameters, annotations, folder, additionalProperties) - { - DataLocation = dataLocation; - SheetName = sheetName; - SheetIndex = sheetIndex; - Range = range; - FirstRowAsHeader = firstRowAsHeader; - Compression = compression; - NullValue = nullValue; - DatasetType = datasetType ?? "Excel"; - } - - /// - /// The location of the excel storage. - /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. - /// The available derived classes include , , , , , , , , , , , and . - /// - public DatasetLocation DataLocation { get; set; } - /// The sheet name of excel file. Type: string (or Expression with resultType string). - public DataFactoryElement SheetName { get; set; } - /// The sheet index of excel file and default value is 0. Type: integer (or Expression with resultType integer). - public DataFactoryElement SheetIndex { get; set; } - /// The partial data of one sheet. Type: string (or Expression with resultType string). - public DataFactoryElement Range { get; set; } - /// When used as input, treat the first row of data as headers. When used as output,write the headers into the output as the first row of data. The default value is false. Type: boolean (or Expression with resultType boolean). - public DataFactoryElement FirstRowAsHeader { get; set; } - /// The data compression method used for the json dataset. - public DatasetCompression Compression { get; set; } - /// The null value string. Type: string (or Expression with resultType string). - public DataFactoryElement NullValue { get; set; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/ExcelSource.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/ExcelSource.Serialization.cs deleted file mode 100644 index 4fc15011..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/ExcelSource.Serialization.cs +++ /dev/null @@ -1,146 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class ExcelSource : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - if (Optional.IsDefined(StoreSettings)) - { - writer.WritePropertyName("storeSettings"u8); - writer.WriteObjectValue(StoreSettings); - } - if (Optional.IsDefined(AdditionalColumns)) - { - writer.WritePropertyName("additionalColumns"u8); -#if NET6_0_OR_GREATER - writer.WriteRawValue(AdditionalColumns); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(AdditionalColumns.ToString()).RootElement); -#endif - } - writer.WritePropertyName("type"u8); - writer.WriteStringValue(CopySourceType); - if (Optional.IsDefined(SourceRetryCount)) - { - writer.WritePropertyName("sourceRetryCount"u8); - JsonSerializer.Serialize(writer, SourceRetryCount); - } - if (Optional.IsDefined(SourceRetryWait)) - { - writer.WritePropertyName("sourceRetryWait"u8); - JsonSerializer.Serialize(writer, SourceRetryWait); - } - if (Optional.IsDefined(MaxConcurrentConnections)) - { - writer.WritePropertyName("maxConcurrentConnections"u8); - JsonSerializer.Serialize(writer, MaxConcurrentConnections); - } - if (Optional.IsDefined(DisableMetricsCollection)) - { - writer.WritePropertyName("disableMetricsCollection"u8); - JsonSerializer.Serialize(writer, DisableMetricsCollection); - } - foreach (var item in AdditionalProperties) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.Value.ToString()).RootElement); -#endif - } - writer.WriteEndObject(); - } - - internal static ExcelSource DeserializeExcelSource(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - Optional storeSettings = default; - Optional additionalColumns = default; - string type = default; - Optional> sourceRetryCount = default; - Optional> sourceRetryWait = default; - Optional> maxConcurrentConnections = default; - Optional> disableMetricsCollection = default; - IDictionary> additionalProperties = default; - Dictionary> additionalPropertiesDictionary = new Dictionary>(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("storeSettings"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - storeSettings = StoreReadSettings.DeserializeStoreReadSettings(property.Value); - continue; - } - if (property.NameEquals("additionalColumns"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - additionalColumns = BinaryData.FromString(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("type"u8)) - { - type = property.Value.GetString(); - continue; - } - if (property.NameEquals("sourceRetryCount"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - sourceRetryCount = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("sourceRetryWait"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - sourceRetryWait = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("maxConcurrentConnections"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - maxConcurrentConnections = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("disableMetricsCollection"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - disableMetricsCollection = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - additionalPropertiesDictionary.Add(property.Name, JsonSerializer.Deserialize>(property.Value.GetRawText())); - } - additionalProperties = additionalPropertiesDictionary; - return new ExcelSource(type, sourceRetryCount.Value, sourceRetryWait.Value, maxConcurrentConnections.Value, disableMetricsCollection.Value, additionalProperties, storeSettings.Value, additionalColumns.Value); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/ExcelSource.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/ExcelSource.cs deleted file mode 100644 index 52061300..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/ExcelSource.cs +++ /dev/null @@ -1,76 +0,0 @@ -// - -#nullable disable - -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// A copy activity excel source. - public partial class ExcelSource : CopyActivitySource - { - /// Initializes a new instance of ExcelSource. - public ExcelSource() - { - CopySourceType = "ExcelSource"; - } - - /// Initializes a new instance of ExcelSource. - /// Copy source type. - /// Source retry count. Type: integer (or Expression with resultType integer). - /// Source retry wait. Type: string (or Expression with resultType string), pattern: ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). - /// The maximum concurrent connection count for the source data store. Type: integer (or Expression with resultType integer). - /// If true, disable data store metrics collection. Default is false. Type: boolean (or Expression with resultType boolean). - /// Additional Properties. - /// - /// Excel store settings. - /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. - /// The available derived classes include , , , , , , , , , , , and . - /// - /// Specifies the additional columns to be added to source data. Type: array of objects(AdditionalColumns) (or Expression with resultType array of objects). - internal ExcelSource(string copySourceType, DataFactoryElement sourceRetryCount, DataFactoryElement sourceRetryWait, DataFactoryElement maxConcurrentConnections, DataFactoryElement disableMetricsCollection, IDictionary> additionalProperties, StoreReadSettings storeSettings, BinaryData additionalColumns) : base(copySourceType, sourceRetryCount, sourceRetryWait, maxConcurrentConnections, disableMetricsCollection, additionalProperties) - { - StoreSettings = storeSettings; - AdditionalColumns = additionalColumns; - CopySourceType = copySourceType ?? "ExcelSource"; - } - - /// - /// Excel store settings. - /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. - /// The available derived classes include , , , , , , , , , , , and . - /// - public StoreReadSettings StoreSettings { get; set; } - /// - /// Specifies the additional columns to be added to source data. Type: array of objects(AdditionalColumns) (or Expression with resultType array of objects). - /// - /// To assign an object to this property use . - /// - /// - /// To assign an already formated json string to this property use . - /// - /// - /// Examples: - /// - /// - /// BinaryData.FromObjectAsJson("foo") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromString("\"foo\"") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromObjectAsJson(new { key = "value" }) - /// Creates a payload of { "key": "value" }. - /// - /// - /// BinaryData.FromString("{\"key\": \"value\"}") - /// Creates a payload of { "key": "value" }. - /// - /// - /// - /// - public BinaryData AdditionalColumns { get; set; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/ExecuteDataFlowActivity.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/ExecuteDataFlowActivity.Serialization.cs deleted file mode 100644 index af539afa..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/ExecuteDataFlowActivity.Serialization.cs +++ /dev/null @@ -1,309 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class ExecuteDataFlowActivity : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - if (Optional.IsDefined(LinkedServiceName)) - { - writer.WritePropertyName("linkedServiceName"u8); - JsonSerializer.Serialize(writer, LinkedServiceName); - } - if (Optional.IsDefined(Policy)) - { - writer.WritePropertyName("policy"u8); - writer.WriteObjectValue(Policy); - } - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ActivityType); - if (Optional.IsDefined(Description)) - { - writer.WritePropertyName("description"u8); - writer.WriteStringValue(Description); - } - if (Optional.IsDefined(State)) - { - writer.WritePropertyName("state"u8); - writer.WriteStringValue(State.Value.ToString()); - } - if (Optional.IsDefined(OnInactiveMarkAs)) - { - writer.WritePropertyName("onInactiveMarkAs"u8); - writer.WriteStringValue(OnInactiveMarkAs.Value.ToString()); - } - if (Optional.IsCollectionDefined(DependsOn)) - { - writer.WritePropertyName("dependsOn"u8); - writer.WriteStartArray(); - foreach (var item in DependsOn) - { - writer.WriteObjectValue(item); - } - writer.WriteEndArray(); - } - if (Optional.IsCollectionDefined(UserProperties)) - { - writer.WritePropertyName("userProperties"u8); - writer.WriteStartArray(); - foreach (var item in UserProperties) - { - writer.WriteObjectValue(item); - } - writer.WriteEndArray(); - } - writer.WritePropertyName("typeProperties"u8); - writer.WriteStartObject(); - writer.WritePropertyName("dataFlow"u8); - writer.WriteObjectValue(DataFlow); - if (Optional.IsDefined(Staging)) - { - writer.WritePropertyName("staging"u8); - writer.WriteObjectValue(Staging); - } - if (Optional.IsDefined(IntegrationRuntime)) - { - writer.WritePropertyName("integrationRuntime"u8); - writer.WriteObjectValue(IntegrationRuntime); - } - if (Optional.IsDefined(Compute)) - { - writer.WritePropertyName("compute"u8); - writer.WriteObjectValue(Compute); - } - if (Optional.IsDefined(TraceLevel)) - { - writer.WritePropertyName("traceLevel"u8); - JsonSerializer.Serialize(writer, TraceLevel); - } - if (Optional.IsDefined(ContinueOnError)) - { - writer.WritePropertyName("continueOnError"u8); - JsonSerializer.Serialize(writer, ContinueOnError); - } - if (Optional.IsDefined(RunConcurrently)) - { - writer.WritePropertyName("runConcurrently"u8); - JsonSerializer.Serialize(writer, RunConcurrently); - } - if (Optional.IsDefined(SourceStagingConcurrency)) - { - writer.WritePropertyName("sourceStagingConcurrency"u8); - JsonSerializer.Serialize(writer, SourceStagingConcurrency); - } - writer.WriteEndObject(); - foreach (var item in AdditionalProperties) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.Value.ToString()).RootElement); -#endif - } - writer.WriteEndObject(); - } - - internal static ExecuteDataFlowActivity DeserializeExecuteDataFlowActivity(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - Optional linkedServiceName = default; - Optional policy = default; - string name = default; - string type = default; - Optional description = default; - Optional state = default; - Optional onInactiveMarkAs = default; - Optional> dependsOn = default; - Optional> userProperties = default; - DataFlowReference dataFlow = default; - Optional staging = default; - Optional integrationRuntime = default; - Optional compute = default; - Optional> traceLevel = default; - Optional> continueOnError = default; - Optional> runConcurrently = default; - Optional> sourceStagingConcurrency = default; - IDictionary> additionalProperties = default; - Dictionary> additionalPropertiesDictionary = new Dictionary>(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("linkedServiceName"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - linkedServiceName = JsonSerializer.Deserialize(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("policy"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - policy = PipelineActivityPolicy.DeserializePipelineActivityPolicy(property.Value); - continue; - } - if (property.NameEquals("name"u8)) - { - name = property.Value.GetString(); - continue; - } - if (property.NameEquals("type"u8)) - { - type = property.Value.GetString(); - continue; - } - if (property.NameEquals("description"u8)) - { - description = property.Value.GetString(); - continue; - } - if (property.NameEquals("state"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - state = new PipelineActivityState(property.Value.GetString()); - continue; - } - if (property.NameEquals("onInactiveMarkAs"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - onInactiveMarkAs = new ActivityOnInactiveMarkAs(property.Value.GetString()); - continue; - } - if (property.NameEquals("dependsOn"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - array.Add(PipelineActivityDependency.DeserializePipelineActivityDependency(item)); - } - dependsOn = array; - continue; - } - if (property.NameEquals("userProperties"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - array.Add(PipelineActivityUserProperty.DeserializePipelineActivityUserProperty(item)); - } - userProperties = array; - continue; - } - if (property.NameEquals("typeProperties"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - foreach (var property0 in property.Value.EnumerateObject()) - { - if (property0.NameEquals("dataFlow"u8)) - { - dataFlow = DataFlowReference.DeserializeDataFlowReference(property0.Value); - continue; - } - if (property0.NameEquals("staging"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - staging = DataFlowStagingInfo.DeserializeDataFlowStagingInfo(property0.Value); - continue; - } - if (property0.NameEquals("integrationRuntime"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - integrationRuntime = IntegrationRuntimeReference.DeserializeIntegrationRuntimeReference(property0.Value); - continue; - } - if (property0.NameEquals("compute"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - compute = ExecuteDataFlowActivityComputeType.DeserializeExecuteDataFlowActivityComputeType(property0.Value); - continue; - } - if (property0.NameEquals("traceLevel"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - traceLevel = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("continueOnError"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - continueOnError = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("runConcurrently"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - runConcurrently = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("sourceStagingConcurrency"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - sourceStagingConcurrency = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - } - continue; - } - additionalPropertiesDictionary.Add(property.Name, JsonSerializer.Deserialize>(property.Value.GetRawText())); - } - additionalProperties = additionalPropertiesDictionary; - return new ExecuteDataFlowActivity(name, type, description.Value, Optional.ToNullable(state), Optional.ToNullable(onInactiveMarkAs), Optional.ToList(dependsOn), Optional.ToList(userProperties), additionalProperties, linkedServiceName, policy.Value, dataFlow, staging.Value, integrationRuntime.Value, compute.Value, traceLevel.Value, continueOnError.Value, runConcurrently.Value, sourceStagingConcurrency.Value); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/ExecuteDataFlowActivity.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/ExecuteDataFlowActivity.cs deleted file mode 100644 index eba6a421..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/ExecuteDataFlowActivity.cs +++ /dev/null @@ -1,75 +0,0 @@ -// - -#nullable disable - -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// Execute data flow activity. - public partial class ExecuteDataFlowActivity : ExecutionActivity - { - /// Initializes a new instance of ExecuteDataFlowActivity. - /// Activity name. - /// Data flow reference. - /// or is null. - public ExecuteDataFlowActivity(string name, DataFlowReference dataFlow) : base(name) - { - Argument.AssertNotNull(name, nameof(name)); - Argument.AssertNotNull(dataFlow, nameof(dataFlow)); - - DataFlow = dataFlow; - ActivityType = "ExecuteDataFlow"; - } - - /// Initializes a new instance of ExecuteDataFlowActivity. - /// Activity name. - /// Type of activity. - /// Activity description. - /// Activity state. This is an optional property and if not provided, the state will be Active by default. - /// 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. - /// Activity depends on condition. - /// Activity user properties. - /// Additional Properties. - /// Linked service reference. - /// Activity policy. - /// Data flow reference. - /// Staging info for execute data flow activity. - /// The integration runtime reference. - /// Compute properties for data flow activity. - /// Trace level setting used for data flow monitoring output. Supported values are: 'coarse', 'fine', and 'none'. Type: string (or Expression with resultType string). - /// Continue on error setting used for data flow execution. Enables processing to continue if a sink fails. Type: boolean (or Expression with resultType boolean). - /// Concurrent run setting used for data flow execution. Allows sinks with the same save order to be processed concurrently. Type: boolean (or Expression with resultType boolean). - /// Specify number of parallel staging for sources applicable to the sink. Type: integer (or Expression with resultType integer). - internal ExecuteDataFlowActivity(string name, string activityType, string description, PipelineActivityState? state, ActivityOnInactiveMarkAs? onInactiveMarkAs, IList dependsOn, IList userProperties, IDictionary> additionalProperties, DataFactoryLinkedServiceReference linkedServiceName, PipelineActivityPolicy policy, DataFlowReference dataFlow, DataFlowStagingInfo staging, IntegrationRuntimeReference integrationRuntime, ExecuteDataFlowActivityComputeType compute, DataFactoryElement traceLevel, DataFactoryElement continueOnError, DataFactoryElement runConcurrently, DataFactoryElement sourceStagingConcurrency) : base(name, activityType, description, state, onInactiveMarkAs, dependsOn, userProperties, additionalProperties, linkedServiceName, policy) - { - DataFlow = dataFlow; - Staging = staging; - IntegrationRuntime = integrationRuntime; - Compute = compute; - TraceLevel = traceLevel; - ContinueOnError = continueOnError; - RunConcurrently = runConcurrently; - SourceStagingConcurrency = sourceStagingConcurrency; - ActivityType = activityType ?? "ExecuteDataFlow"; - } - - /// Data flow reference. - public DataFlowReference DataFlow { get; set; } - /// Staging info for execute data flow activity. - public DataFlowStagingInfo Staging { get; set; } - /// The integration runtime reference. - public IntegrationRuntimeReference IntegrationRuntime { get; set; } - /// Compute properties for data flow activity. - public ExecuteDataFlowActivityComputeType Compute { get; set; } - /// Trace level setting used for data flow monitoring output. Supported values are: 'coarse', 'fine', and 'none'. Type: string (or Expression with resultType string). - public DataFactoryElement TraceLevel { get; set; } - /// Continue on error setting used for data flow execution. Enables processing to continue if a sink fails. Type: boolean (or Expression with resultType boolean). - public DataFactoryElement ContinueOnError { get; set; } - /// Concurrent run setting used for data flow execution. Allows sinks with the same save order to be processed concurrently. Type: boolean (or Expression with resultType boolean). - public DataFactoryElement RunConcurrently { get; set; } - /// Specify number of parallel staging for sources applicable to the sink. Type: integer (or Expression with resultType integer). - public DataFactoryElement SourceStagingConcurrency { get; set; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/ExecuteDataFlowActivityComputeType.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/ExecuteDataFlowActivityComputeType.Serialization.cs deleted file mode 100644 index 52320aec..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/ExecuteDataFlowActivityComputeType.Serialization.cs +++ /dev/null @@ -1,61 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class ExecuteDataFlowActivityComputeType : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - if (Optional.IsDefined(ComputeType)) - { - writer.WritePropertyName("computeType"u8); - JsonSerializer.Serialize(writer, ComputeType); - } - if (Optional.IsDefined(CoreCount)) - { - writer.WritePropertyName("coreCount"u8); - JsonSerializer.Serialize(writer, CoreCount); - } - writer.WriteEndObject(); - } - - internal static ExecuteDataFlowActivityComputeType DeserializeExecuteDataFlowActivityComputeType(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - Optional> computeType = default; - Optional> coreCount = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("computeType"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - computeType = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("coreCount"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - coreCount = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - } - return new ExecuteDataFlowActivityComputeType(computeType.Value, coreCount.Value); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/ExecuteDataFlowActivityComputeType.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/ExecuteDataFlowActivityComputeType.cs deleted file mode 100644 index 69033f85..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/ExecuteDataFlowActivityComputeType.cs +++ /dev/null @@ -1,31 +0,0 @@ -// - -#nullable disable - -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// Compute properties for data flow activity. - public partial class ExecuteDataFlowActivityComputeType - { - /// Initializes a new instance of ExecuteDataFlowActivityComputeType. - public ExecuteDataFlowActivityComputeType() - { - } - - /// Initializes a new instance of ExecuteDataFlowActivityComputeType. - /// Compute type of the cluster which will execute data flow job. Possible values include: 'General', 'MemoryOptimized', 'ComputeOptimized'. Type: string (or Expression with resultType string). - /// Core count of the cluster which will execute data flow job. Supported values are: 8, 16, 32, 48, 80, 144 and 272. Type: integer (or Expression with resultType integer). - internal ExecuteDataFlowActivityComputeType(DataFactoryElement computeType, DataFactoryElement coreCount) - { - ComputeType = computeType; - CoreCount = coreCount; - } - - /// Compute type of the cluster which will execute data flow job. Possible values include: 'General', 'MemoryOptimized', 'ComputeOptimized'. Type: string (or Expression with resultType string). - public DataFactoryElement ComputeType { get; set; } - /// Core count of the cluster which will execute data flow job. Supported values are: 8, 16, 32, 48, 80, 144 and 272. Type: integer (or Expression with resultType integer). - public DataFactoryElement CoreCount { get; set; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/ExecutePipelineActivity.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/ExecutePipelineActivity.Serialization.cs deleted file mode 100644 index f76ecbce..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/ExecutePipelineActivity.Serialization.cs +++ /dev/null @@ -1,246 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class ExecutePipelineActivity : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - if (Optional.IsDefined(Policy)) - { - writer.WritePropertyName("policy"u8); - writer.WriteObjectValue(Policy); - } - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ActivityType); - if (Optional.IsDefined(Description)) - { - writer.WritePropertyName("description"u8); - writer.WriteStringValue(Description); - } - if (Optional.IsDefined(State)) - { - writer.WritePropertyName("state"u8); - writer.WriteStringValue(State.Value.ToString()); - } - if (Optional.IsDefined(OnInactiveMarkAs)) - { - writer.WritePropertyName("onInactiveMarkAs"u8); - writer.WriteStringValue(OnInactiveMarkAs.Value.ToString()); - } - if (Optional.IsCollectionDefined(DependsOn)) - { - writer.WritePropertyName("dependsOn"u8); - writer.WriteStartArray(); - foreach (var item in DependsOn) - { - writer.WriteObjectValue(item); - } - writer.WriteEndArray(); - } - if (Optional.IsCollectionDefined(UserProperties)) - { - writer.WritePropertyName("userProperties"u8); - writer.WriteStartArray(); - foreach (var item in UserProperties) - { - writer.WriteObjectValue(item); - } - writer.WriteEndArray(); - } - writer.WritePropertyName("typeProperties"u8); - writer.WriteStartObject(); - writer.WritePropertyName("pipeline"u8); - writer.WriteObjectValue(Pipeline); - if (Optional.IsCollectionDefined(Parameters)) - { - writer.WritePropertyName("parameters"u8); - writer.WriteStartObject(); - foreach (var item in Parameters) - { - writer.WritePropertyName(item.Key); - if (item.Value == null) - { - writer.WriteNullValue(); - continue; - } -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.ToString()); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.Value.ToString()).RootElement); -#endif - } - writer.WriteEndObject(); - } - if (Optional.IsDefined(WaitOnCompletion)) - { - writer.WritePropertyName("waitOnCompletion"u8); - writer.WriteBooleanValue(WaitOnCompletion.Value); - } - writer.WriteEndObject(); - foreach (var item in AdditionalProperties) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.Value.ToString()).RootElement); -#endif - } - writer.WriteEndObject(); - } - - internal static ExecutePipelineActivity DeserializeExecutePipelineActivity(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - Optional policy = default; - string name = default; - string type = default; - Optional description = default; - Optional state = default; - Optional onInactiveMarkAs = default; - Optional> dependsOn = default; - Optional> userProperties = default; - DataFactoryPipelineReference pipeline = default; - Optional>> parameters = default; - Optional waitOnCompletion = default; - IDictionary> additionalProperties = default; - Dictionary> additionalPropertiesDictionary = new Dictionary>(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("policy"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - policy = ExecutePipelineActivityPolicy.DeserializeExecutePipelineActivityPolicy(property.Value); - continue; - } - if (property.NameEquals("name"u8)) - { - name = property.Value.GetString(); - continue; - } - if (property.NameEquals("type"u8)) - { - type = property.Value.GetString(); - continue; - } - if (property.NameEquals("description"u8)) - { - description = property.Value.GetString(); - continue; - } - if (property.NameEquals("state"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - state = new PipelineActivityState(property.Value.GetString()); - continue; - } - if (property.NameEquals("onInactiveMarkAs"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - onInactiveMarkAs = new ActivityOnInactiveMarkAs(property.Value.GetString()); - continue; - } - if (property.NameEquals("dependsOn"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - array.Add(PipelineActivityDependency.DeserializePipelineActivityDependency(item)); - } - dependsOn = array; - continue; - } - if (property.NameEquals("userProperties"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - array.Add(PipelineActivityUserProperty.DeserializePipelineActivityUserProperty(item)); - } - userProperties = array; - continue; - } - if (property.NameEquals("typeProperties"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - foreach (var property0 in property.Value.EnumerateObject()) - { - if (property0.NameEquals("pipeline"u8)) - { - pipeline = DataFactoryPipelineReference.DeserializeDataFactoryPipelineReference(property0.Value); - continue; - } - if (property0.NameEquals("parameters"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - Dictionary> dictionary = new Dictionary>(); - foreach (var property1 in property0.Value.EnumerateObject()) - { - if (property1.Value.ValueKind == JsonValueKind.Null) - { - dictionary.Add(property1.Name, null); - } - else - { - dictionary.Add(property1.Name, JsonSerializer.Deserialize>(property1.Value.GetRawText())); - } - } - parameters = dictionary; - continue; - } - if (property0.NameEquals("waitOnCompletion"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - waitOnCompletion = property0.Value.GetBoolean(); - continue; - } - } - continue; - } - additionalPropertiesDictionary.Add(property.Name, JsonSerializer.Deserialize>(property.Value.GetRawText())); - } - additionalProperties = additionalPropertiesDictionary; - return new ExecutePipelineActivity(name, type, description.Value, Optional.ToNullable(state), Optional.ToNullable(onInactiveMarkAs), Optional.ToList(dependsOn), Optional.ToList(userProperties), additionalProperties, policy.Value, pipeline, Optional.ToDictionary(parameters), Optional.ToNullable(waitOnCompletion)); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/ExecutePipelineActivity.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/ExecutePipelineActivity.cs deleted file mode 100644 index e1be871d..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/ExecutePipelineActivity.cs +++ /dev/null @@ -1,87 +0,0 @@ -// - -#nullable disable - -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// Execute pipeline activity. - public partial class ExecutePipelineActivity : ControlActivity - { - /// Initializes a new instance of ExecutePipelineActivity. - /// Activity name. - /// Pipeline reference. - /// or is null. - public ExecutePipelineActivity(string name, DataFactoryPipelineReference pipeline) : base(name) - { - Argument.AssertNotNull(name, nameof(name)); - Argument.AssertNotNull(pipeline, nameof(pipeline)); - - Pipeline = pipeline; - Parameters = new ChangeTrackingDictionary>(); - ActivityType = "ExecutePipeline"; - } - - /// Initializes a new instance of ExecutePipelineActivity. - /// Activity name. - /// Type of activity. - /// Activity description. - /// Activity state. This is an optional property and if not provided, the state will be Active by default. - /// 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. - /// Activity depends on condition. - /// Activity user properties. - /// Additional Properties. - /// Execute pipeline activity policy. - /// Pipeline reference. - /// Pipeline parameters. - /// Defines whether activity execution will wait for the dependent pipeline execution to finish. Default is false. - internal ExecutePipelineActivity(string name, string activityType, string description, PipelineActivityState? state, ActivityOnInactiveMarkAs? onInactiveMarkAs, IList dependsOn, IList userProperties, IDictionary> additionalProperties, ExecutePipelineActivityPolicy policy, DataFactoryPipelineReference pipeline, IDictionary> parameters, bool? waitOnCompletion) : base(name, activityType, description, state, onInactiveMarkAs, dependsOn, userProperties, additionalProperties) - { - Policy = policy; - Pipeline = pipeline; - Parameters = parameters; - WaitOnCompletion = waitOnCompletion; - ActivityType = activityType ?? "ExecutePipeline"; - } - - /// Execute pipeline activity policy. - public ExecutePipelineActivityPolicy Policy { get; set; } - /// Pipeline reference. - public DataFactoryPipelineReference Pipeline { get; set; } - /// - /// Pipeline parameters. - /// - /// To assign an object to the value of this property use . - /// - /// - /// To assign an already formated json string to this property use . - /// - /// - /// Examples: - /// - /// - /// BinaryData.FromObjectAsJson("foo") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromString("\"foo\"") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromObjectAsJson(new { key = "value" }) - /// Creates a payload of { "key": "value" }. - /// - /// - /// BinaryData.FromString("{\"key\": \"value\"}") - /// Creates a payload of { "key": "value" }. - /// - /// - /// - /// - public IDictionary> Parameters { get; } - /// Defines whether activity execution will wait for the dependent pipeline execution to finish. Default is false. - public bool? WaitOnCompletion { get; set; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/ExecutePipelineActivityPolicy.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/ExecutePipelineActivityPolicy.Serialization.cs deleted file mode 100644 index 74cdb30c..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/ExecutePipelineActivityPolicy.Serialization.cs +++ /dev/null @@ -1,59 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class ExecutePipelineActivityPolicy : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - if (Optional.IsDefined(IsSecureInputEnabled)) - { - writer.WritePropertyName("secureInput"u8); - writer.WriteBooleanValue(IsSecureInputEnabled.Value); - } - foreach (var item in AdditionalProperties) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.Value.ToString()).RootElement); -#endif - } - writer.WriteEndObject(); - } - - internal static ExecutePipelineActivityPolicy DeserializeExecutePipelineActivityPolicy(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - Optional secureInput = default; - IDictionary> additionalProperties = default; - Dictionary> additionalPropertiesDictionary = new Dictionary>(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("secureInput"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - secureInput = property.Value.GetBoolean(); - continue; - } - additionalPropertiesDictionary.Add(property.Name, JsonSerializer.Deserialize>(property.Value.GetRawText())); - } - additionalProperties = additionalPropertiesDictionary; - return new ExecutePipelineActivityPolicy(Optional.ToNullable(secureInput), additionalProperties); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/ExecutePipelineActivityPolicy.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/ExecutePipelineActivityPolicy.cs deleted file mode 100644 index 24d95e44..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/ExecutePipelineActivityPolicy.cs +++ /dev/null @@ -1,62 +0,0 @@ -// - -#nullable disable - -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// Execution policy for an execute pipeline activity. - public partial class ExecutePipelineActivityPolicy - { - /// Initializes a new instance of ExecutePipelineActivityPolicy. - public ExecutePipelineActivityPolicy() - { - AdditionalProperties = new ChangeTrackingDictionary>(); - } - - /// Initializes a new instance of ExecutePipelineActivityPolicy. - /// When set to true, Input from activity is considered as secure and will not be logged to monitoring. - /// Additional Properties. - internal ExecutePipelineActivityPolicy(bool? isSecureInputEnabled, IDictionary> additionalProperties) - { - IsSecureInputEnabled = isSecureInputEnabled; - AdditionalProperties = additionalProperties; - } - - /// When set to true, Input from activity is considered as secure and will not be logged to monitoring. - public bool? IsSecureInputEnabled { get; set; } - /// - /// Additional Properties - /// - /// To assign an object to the value of this property use . - /// - /// - /// To assign an already formated json string to this property use . - /// - /// - /// Examples: - /// - /// - /// BinaryData.FromObjectAsJson("foo") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromString("\"foo\"") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromObjectAsJson(new { key = "value" }) - /// Creates a payload of { "key": "value" }. - /// - /// - /// BinaryData.FromString("{\"key\": \"value\"}") - /// Creates a payload of { "key": "value" }. - /// - /// - /// - /// - public IDictionary> AdditionalProperties { get; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/ExecuteSsisPackageActivity.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/ExecuteSsisPackageActivity.Serialization.cs deleted file mode 100644 index 7a8c7327..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/ExecuteSsisPackageActivity.Serialization.cs +++ /dev/null @@ -1,463 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class ExecuteSsisPackageActivity : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - if (Optional.IsDefined(LinkedServiceName)) - { - writer.WritePropertyName("linkedServiceName"u8); - JsonSerializer.Serialize(writer, LinkedServiceName); - } - if (Optional.IsDefined(Policy)) - { - writer.WritePropertyName("policy"u8); - writer.WriteObjectValue(Policy); - } - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ActivityType); - if (Optional.IsDefined(Description)) - { - writer.WritePropertyName("description"u8); - writer.WriteStringValue(Description); - } - if (Optional.IsDefined(State)) - { - writer.WritePropertyName("state"u8); - writer.WriteStringValue(State.Value.ToString()); - } - if (Optional.IsDefined(OnInactiveMarkAs)) - { - writer.WritePropertyName("onInactiveMarkAs"u8); - writer.WriteStringValue(OnInactiveMarkAs.Value.ToString()); - } - if (Optional.IsCollectionDefined(DependsOn)) - { - writer.WritePropertyName("dependsOn"u8); - writer.WriteStartArray(); - foreach (var item in DependsOn) - { - writer.WriteObjectValue(item); - } - writer.WriteEndArray(); - } - if (Optional.IsCollectionDefined(UserProperties)) - { - writer.WritePropertyName("userProperties"u8); - writer.WriteStartArray(); - foreach (var item in UserProperties) - { - writer.WriteObjectValue(item); - } - writer.WriteEndArray(); - } - writer.WritePropertyName("typeProperties"u8); - writer.WriteStartObject(); - writer.WritePropertyName("packageLocation"u8); - writer.WriteObjectValue(PackageLocation); - if (Optional.IsDefined(Runtime)) - { - writer.WritePropertyName("runtime"u8); - JsonSerializer.Serialize(writer, Runtime); - } - if (Optional.IsDefined(LoggingLevel)) - { - writer.WritePropertyName("loggingLevel"u8); - JsonSerializer.Serialize(writer, LoggingLevel); - } - if (Optional.IsDefined(EnvironmentPath)) - { - writer.WritePropertyName("environmentPath"u8); - JsonSerializer.Serialize(writer, EnvironmentPath); - } - if (Optional.IsDefined(ExecutionCredential)) - { - writer.WritePropertyName("executionCredential"u8); - writer.WriteObjectValue(ExecutionCredential); - } - writer.WritePropertyName("connectVia"u8); - writer.WriteObjectValue(ConnectVia); - if (Optional.IsCollectionDefined(ProjectParameters)) - { - writer.WritePropertyName("projectParameters"u8); - writer.WriteStartObject(); - foreach (var item in ProjectParameters) - { - writer.WritePropertyName(item.Key); - writer.WriteObjectValue(item.Value); - } - writer.WriteEndObject(); - } - if (Optional.IsCollectionDefined(PackageParameters)) - { - writer.WritePropertyName("packageParameters"u8); - writer.WriteStartObject(); - foreach (var item in PackageParameters) - { - writer.WritePropertyName(item.Key); - writer.WriteObjectValue(item.Value); - } - writer.WriteEndObject(); - } - if (Optional.IsCollectionDefined(ProjectConnectionManagers)) - { - writer.WritePropertyName("projectConnectionManagers"u8); - writer.WriteStartObject(); - foreach (var item in ProjectConnectionManagers) - { - writer.WritePropertyName(item.Key); - if (item.Value == null) - { - writer.WriteNullValue(); - continue; - } - writer.WriteStartObject(); - foreach (var item0 in item.Value) - { - writer.WritePropertyName(item0.Key); - writer.WriteObjectValue(item0.Value); - } - writer.WriteEndObject(); - } - writer.WriteEndObject(); - } - if (Optional.IsCollectionDefined(PackageConnectionManagers)) - { - writer.WritePropertyName("packageConnectionManagers"u8); - writer.WriteStartObject(); - foreach (var item in PackageConnectionManagers) - { - writer.WritePropertyName(item.Key); - if (item.Value == null) - { - writer.WriteNullValue(); - continue; - } - writer.WriteStartObject(); - foreach (var item0 in item.Value) - { - writer.WritePropertyName(item0.Key); - writer.WriteObjectValue(item0.Value); - } - writer.WriteEndObject(); - } - writer.WriteEndObject(); - } - if (Optional.IsCollectionDefined(PropertyOverrides)) - { - writer.WritePropertyName("propertyOverrides"u8); - writer.WriteStartObject(); - foreach (var item in PropertyOverrides) - { - writer.WritePropertyName(item.Key); - writer.WriteObjectValue(item.Value); - } - writer.WriteEndObject(); - } - if (Optional.IsDefined(LogLocation)) - { - writer.WritePropertyName("logLocation"u8); - writer.WriteObjectValue(LogLocation); - } - writer.WriteEndObject(); - foreach (var item in AdditionalProperties) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.Value.ToString()).RootElement); -#endif - } - writer.WriteEndObject(); - } - - internal static ExecuteSsisPackageActivity DeserializeExecuteSsisPackageActivity(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - Optional linkedServiceName = default; - Optional policy = default; - string name = default; - string type = default; - Optional description = default; - Optional state = default; - Optional onInactiveMarkAs = default; - Optional> dependsOn = default; - Optional> userProperties = default; - SsisPackageLocation packageLocation = default; - Optional> runtime = default; - Optional> loggingLevel = default; - Optional> environmentPath = default; - Optional executionCredential = default; - IntegrationRuntimeReference connectVia = default; - Optional> projectParameters = default; - Optional> packageParameters = default; - Optional>> projectConnectionManagers = default; - Optional>> packageConnectionManagers = default; - Optional> propertyOverrides = default; - Optional logLocation = default; - IDictionary> additionalProperties = default; - Dictionary> additionalPropertiesDictionary = new Dictionary>(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("linkedServiceName"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - linkedServiceName = JsonSerializer.Deserialize(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("policy"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - policy = PipelineActivityPolicy.DeserializePipelineActivityPolicy(property.Value); - continue; - } - if (property.NameEquals("name"u8)) - { - name = property.Value.GetString(); - continue; - } - if (property.NameEquals("type"u8)) - { - type = property.Value.GetString(); - continue; - } - if (property.NameEquals("description"u8)) - { - description = property.Value.GetString(); - continue; - } - if (property.NameEquals("state"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - state = new PipelineActivityState(property.Value.GetString()); - continue; - } - if (property.NameEquals("onInactiveMarkAs"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - onInactiveMarkAs = new ActivityOnInactiveMarkAs(property.Value.GetString()); - continue; - } - if (property.NameEquals("dependsOn"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - array.Add(PipelineActivityDependency.DeserializePipelineActivityDependency(item)); - } - dependsOn = array; - continue; - } - if (property.NameEquals("userProperties"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - array.Add(PipelineActivityUserProperty.DeserializePipelineActivityUserProperty(item)); - } - userProperties = array; - continue; - } - if (property.NameEquals("typeProperties"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - foreach (var property0 in property.Value.EnumerateObject()) - { - if (property0.NameEquals("packageLocation"u8)) - { - packageLocation = SsisPackageLocation.DeserializeSsisPackageLocation(property0.Value); - continue; - } - if (property0.NameEquals("runtime"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - runtime = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("loggingLevel"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - loggingLevel = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("environmentPath"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - environmentPath = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("executionCredential"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - executionCredential = SsisExecutionCredential.DeserializeSsisExecutionCredential(property0.Value); - continue; - } - if (property0.NameEquals("connectVia"u8)) - { - connectVia = IntegrationRuntimeReference.DeserializeIntegrationRuntimeReference(property0.Value); - continue; - } - if (property0.NameEquals("projectParameters"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - Dictionary dictionary = new Dictionary(); - foreach (var property1 in property0.Value.EnumerateObject()) - { - dictionary.Add(property1.Name, SsisExecutionParameter.DeserializeSsisExecutionParameter(property1.Value)); - } - projectParameters = dictionary; - continue; - } - if (property0.NameEquals("packageParameters"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - Dictionary dictionary = new Dictionary(); - foreach (var property1 in property0.Value.EnumerateObject()) - { - dictionary.Add(property1.Name, SsisExecutionParameter.DeserializeSsisExecutionParameter(property1.Value)); - } - packageParameters = dictionary; - continue; - } - if (property0.NameEquals("projectConnectionManagers"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - Dictionary> dictionary = new Dictionary>(); - foreach (var property1 in property0.Value.EnumerateObject()) - { - if (property1.Value.ValueKind == JsonValueKind.Null) - { - dictionary.Add(property1.Name, null); - } - else - { - Dictionary dictionary0 = new Dictionary(); - foreach (var property2 in property1.Value.EnumerateObject()) - { - dictionary0.Add(property2.Name, SsisExecutionParameter.DeserializeSsisExecutionParameter(property2.Value)); - } - dictionary.Add(property1.Name, dictionary0); - } - } - projectConnectionManagers = dictionary; - continue; - } - if (property0.NameEquals("packageConnectionManagers"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - Dictionary> dictionary = new Dictionary>(); - foreach (var property1 in property0.Value.EnumerateObject()) - { - if (property1.Value.ValueKind == JsonValueKind.Null) - { - dictionary.Add(property1.Name, null); - } - else - { - Dictionary dictionary0 = new Dictionary(); - foreach (var property2 in property1.Value.EnumerateObject()) - { - dictionary0.Add(property2.Name, SsisExecutionParameter.DeserializeSsisExecutionParameter(property2.Value)); - } - dictionary.Add(property1.Name, dictionary0); - } - } - packageConnectionManagers = dictionary; - continue; - } - if (property0.NameEquals("propertyOverrides"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - Dictionary dictionary = new Dictionary(); - foreach (var property1 in property0.Value.EnumerateObject()) - { - dictionary.Add(property1.Name, SsisPropertyOverride.DeserializeSsisPropertyOverride(property1.Value)); - } - propertyOverrides = dictionary; - continue; - } - if (property0.NameEquals("logLocation"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - logLocation = SsisLogLocation.DeserializeSsisLogLocation(property0.Value); - continue; - } - } - continue; - } - additionalPropertiesDictionary.Add(property.Name, JsonSerializer.Deserialize>(property.Value.GetRawText())); - } - additionalProperties = additionalPropertiesDictionary; - return new ExecuteSsisPackageActivity(name, type, description.Value, Optional.ToNullable(state), Optional.ToNullable(onInactiveMarkAs), Optional.ToList(dependsOn), Optional.ToList(userProperties), additionalProperties, linkedServiceName, policy.Value, packageLocation, runtime.Value, loggingLevel.Value, environmentPath.Value, executionCredential.Value, connectVia, Optional.ToDictionary(projectParameters), Optional.ToDictionary(packageParameters), Optional.ToDictionary(projectConnectionManagers), Optional.ToDictionary(packageConnectionManagers), Optional.ToDictionary(propertyOverrides), logLocation.Value); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/ExecuteSsisPackageActivity.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/ExecuteSsisPackageActivity.cs deleted file mode 100644 index f42efd94..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/ExecuteSsisPackageActivity.cs +++ /dev/null @@ -1,99 +0,0 @@ -// - -#nullable disable - -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// Execute SSIS package activity. - public partial class ExecuteSsisPackageActivity : ExecutionActivity - { - /// Initializes a new instance of ExecuteSsisPackageActivity. - /// Activity name. - /// SSIS package location. - /// The integration runtime reference. - /// , or is null. - public ExecuteSsisPackageActivity(string name, SsisPackageLocation packageLocation, IntegrationRuntimeReference connectVia) : base(name) - { - Argument.AssertNotNull(name, nameof(name)); - Argument.AssertNotNull(packageLocation, nameof(packageLocation)); - Argument.AssertNotNull(connectVia, nameof(connectVia)); - - PackageLocation = packageLocation; - ConnectVia = connectVia; - ProjectParameters = new ChangeTrackingDictionary(); - PackageParameters = new ChangeTrackingDictionary(); - ProjectConnectionManagers = new ChangeTrackingDictionary>(); - PackageConnectionManagers = new ChangeTrackingDictionary>(); - PropertyOverrides = new ChangeTrackingDictionary(); - ActivityType = "ExecuteSSISPackage"; - } - - /// Initializes a new instance of ExecuteSsisPackageActivity. - /// Activity name. - /// Type of activity. - /// Activity description. - /// Activity state. This is an optional property and if not provided, the state will be Active by default. - /// 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. - /// Activity depends on condition. - /// Activity user properties. - /// Additional Properties. - /// Linked service reference. - /// Activity policy. - /// SSIS package location. - /// Specifies the runtime to execute SSIS package. The value should be "x86" or "x64". Type: string (or Expression with resultType string). - /// The logging level of SSIS package execution. Type: string (or Expression with resultType string). - /// The environment path to execute the SSIS package. Type: string (or Expression with resultType string). - /// The package execution credential. - /// The integration runtime reference. - /// The project level parameters to execute the SSIS package. - /// The package level parameters to execute the SSIS package. - /// The project level connection managers to execute the SSIS package. - /// The package level connection managers to execute the SSIS package. - /// The property overrides to execute the SSIS package. - /// SSIS package execution log location. - internal ExecuteSsisPackageActivity(string name, string activityType, string description, PipelineActivityState? state, ActivityOnInactiveMarkAs? onInactiveMarkAs, IList dependsOn, IList userProperties, IDictionary> additionalProperties, DataFactoryLinkedServiceReference linkedServiceName, PipelineActivityPolicy policy, SsisPackageLocation packageLocation, DataFactoryElement runtime, DataFactoryElement loggingLevel, DataFactoryElement environmentPath, SsisExecutionCredential executionCredential, IntegrationRuntimeReference connectVia, IDictionary projectParameters, IDictionary packageParameters, IDictionary> projectConnectionManagers, IDictionary> packageConnectionManagers, IDictionary propertyOverrides, SsisLogLocation logLocation) : base(name, activityType, description, state, onInactiveMarkAs, dependsOn, userProperties, additionalProperties, linkedServiceName, policy) - { - PackageLocation = packageLocation; - Runtime = runtime; - LoggingLevel = loggingLevel; - EnvironmentPath = environmentPath; - ExecutionCredential = executionCredential; - ConnectVia = connectVia; - ProjectParameters = projectParameters; - PackageParameters = packageParameters; - ProjectConnectionManagers = projectConnectionManagers; - PackageConnectionManagers = packageConnectionManagers; - PropertyOverrides = propertyOverrides; - LogLocation = logLocation; - ActivityType = activityType ?? "ExecuteSSISPackage"; - } - - /// SSIS package location. - public SsisPackageLocation PackageLocation { get; set; } - /// Specifies the runtime to execute SSIS package. The value should be "x86" or "x64". Type: string (or Expression with resultType string). - public DataFactoryElement Runtime { get; set; } - /// The logging level of SSIS package execution. Type: string (or Expression with resultType string). - public DataFactoryElement LoggingLevel { get; set; } - /// The environment path to execute the SSIS package. Type: string (or Expression with resultType string). - public DataFactoryElement EnvironmentPath { get; set; } - /// The package execution credential. - public SsisExecutionCredential ExecutionCredential { get; set; } - /// The integration runtime reference. - public IntegrationRuntimeReference ConnectVia { get; set; } - /// The project level parameters to execute the SSIS package. - public IDictionary ProjectParameters { get; } - /// The package level parameters to execute the SSIS package. - public IDictionary PackageParameters { get; } - /// The project level connection managers to execute the SSIS package. - public IDictionary> ProjectConnectionManagers { get; } - /// The package level connection managers to execute the SSIS package. - public IDictionary> PackageConnectionManagers { get; } - /// The property overrides to execute the SSIS package. - public IDictionary PropertyOverrides { get; } - /// SSIS package execution log location. - public SsisLogLocation LogLocation { get; set; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/ExecuteWranglingDataflowActivity.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/ExecuteWranglingDataflowActivity.Serialization.cs deleted file mode 100644 index b627a9f1..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/ExecuteWranglingDataflowActivity.Serialization.cs +++ /dev/null @@ -1,345 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class ExecuteWranglingDataflowActivity : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - if (Optional.IsDefined(Policy)) - { - writer.WritePropertyName("policy"u8); - writer.WriteObjectValue(Policy); - } - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ActivityType); - if (Optional.IsDefined(Description)) - { - writer.WritePropertyName("description"u8); - writer.WriteStringValue(Description); - } - if (Optional.IsDefined(State)) - { - writer.WritePropertyName("state"u8); - writer.WriteStringValue(State.Value.ToString()); - } - if (Optional.IsDefined(OnInactiveMarkAs)) - { - writer.WritePropertyName("onInactiveMarkAs"u8); - writer.WriteStringValue(OnInactiveMarkAs.Value.ToString()); - } - if (Optional.IsCollectionDefined(DependsOn)) - { - writer.WritePropertyName("dependsOn"u8); - writer.WriteStartArray(); - foreach (var item in DependsOn) - { - writer.WriteObjectValue(item); - } - writer.WriteEndArray(); - } - if (Optional.IsCollectionDefined(UserProperties)) - { - writer.WritePropertyName("userProperties"u8); - writer.WriteStartArray(); - foreach (var item in UserProperties) - { - writer.WriteObjectValue(item); - } - writer.WriteEndArray(); - } - writer.WritePropertyName("typeProperties"u8); - writer.WriteStartObject(); - writer.WritePropertyName("dataFlow"u8); - writer.WriteObjectValue(DataFlow); - if (Optional.IsDefined(Staging)) - { - writer.WritePropertyName("staging"u8); - writer.WriteObjectValue(Staging); - } - if (Optional.IsDefined(IntegrationRuntime)) - { - writer.WritePropertyName("integrationRuntime"u8); - writer.WriteObjectValue(IntegrationRuntime); - } - if (Optional.IsDefined(Compute)) - { - writer.WritePropertyName("compute"u8); - writer.WriteObjectValue(Compute); - } - if (Optional.IsDefined(TraceLevel)) - { - writer.WritePropertyName("traceLevel"u8); - JsonSerializer.Serialize(writer, TraceLevel); - } - if (Optional.IsDefined(ContinueOnError)) - { - writer.WritePropertyName("continueOnError"u8); - JsonSerializer.Serialize(writer, ContinueOnError); - } - if (Optional.IsDefined(RunConcurrently)) - { - writer.WritePropertyName("runConcurrently"u8); - JsonSerializer.Serialize(writer, RunConcurrently); - } - if (Optional.IsDefined(SourceStagingConcurrency)) - { - writer.WritePropertyName("sourceStagingConcurrency"u8); - JsonSerializer.Serialize(writer, SourceStagingConcurrency); - } - if (Optional.IsCollectionDefined(Sinks)) - { - writer.WritePropertyName("sinks"u8); - writer.WriteStartObject(); - foreach (var item in Sinks) - { - writer.WritePropertyName(item.Key); - writer.WriteObjectValue(item.Value); - } - writer.WriteEndObject(); - } - if (Optional.IsCollectionDefined(Queries)) - { - writer.WritePropertyName("queries"u8); - writer.WriteStartArray(); - foreach (var item in Queries) - { - writer.WriteObjectValue(item); - } - writer.WriteEndArray(); - } - writer.WriteEndObject(); - foreach (var item in AdditionalProperties) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.Value.ToString()).RootElement); -#endif - } - writer.WriteEndObject(); - } - - internal static ExecuteWranglingDataflowActivity DeserializeExecuteWranglingDataflowActivity(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - Optional policy = default; - string name = default; - string type = default; - Optional description = default; - Optional state = default; - Optional onInactiveMarkAs = default; - Optional> dependsOn = default; - Optional> userProperties = default; - DataFlowReference dataFlow = default; - Optional staging = default; - Optional integrationRuntime = default; - Optional compute = default; - Optional> traceLevel = default; - Optional> continueOnError = default; - Optional> runConcurrently = default; - Optional> sourceStagingConcurrency = default; - Optional> sinks = default; - Optional> queries = default; - IDictionary> additionalProperties = default; - Dictionary> additionalPropertiesDictionary = new Dictionary>(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("policy"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - policy = PipelineActivityPolicy.DeserializePipelineActivityPolicy(property.Value); - continue; - } - if (property.NameEquals("name"u8)) - { - name = property.Value.GetString(); - continue; - } - if (property.NameEquals("type"u8)) - { - type = property.Value.GetString(); - continue; - } - if (property.NameEquals("description"u8)) - { - description = property.Value.GetString(); - continue; - } - if (property.NameEquals("state"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - state = new PipelineActivityState(property.Value.GetString()); - continue; - } - if (property.NameEquals("onInactiveMarkAs"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - onInactiveMarkAs = new ActivityOnInactiveMarkAs(property.Value.GetString()); - continue; - } - if (property.NameEquals("dependsOn"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - array.Add(PipelineActivityDependency.DeserializePipelineActivityDependency(item)); - } - dependsOn = array; - continue; - } - if (property.NameEquals("userProperties"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - array.Add(PipelineActivityUserProperty.DeserializePipelineActivityUserProperty(item)); - } - userProperties = array; - continue; - } - if (property.NameEquals("typeProperties"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - foreach (var property0 in property.Value.EnumerateObject()) - { - if (property0.NameEquals("dataFlow"u8)) - { - dataFlow = DataFlowReference.DeserializeDataFlowReference(property0.Value); - continue; - } - if (property0.NameEquals("staging"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - staging = DataFlowStagingInfo.DeserializeDataFlowStagingInfo(property0.Value); - continue; - } - if (property0.NameEquals("integrationRuntime"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - integrationRuntime = IntegrationRuntimeReference.DeserializeIntegrationRuntimeReference(property0.Value); - continue; - } - if (property0.NameEquals("compute"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - compute = ExecuteDataFlowActivityComputeType.DeserializeExecuteDataFlowActivityComputeType(property0.Value); - continue; - } - if (property0.NameEquals("traceLevel"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - traceLevel = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("continueOnError"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - continueOnError = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("runConcurrently"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - runConcurrently = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("sourceStagingConcurrency"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - sourceStagingConcurrency = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("sinks"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - Dictionary dictionary = new Dictionary(); - foreach (var property1 in property0.Value.EnumerateObject()) - { - dictionary.Add(property1.Name, PowerQuerySink.DeserializePowerQuerySink(property1.Value)); - } - sinks = dictionary; - continue; - } - if (property0.NameEquals("queries"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property0.Value.EnumerateArray()) - { - array.Add(PowerQuerySinkMapping.DeserializePowerQuerySinkMapping(item)); - } - queries = array; - continue; - } - } - continue; - } - additionalPropertiesDictionary.Add(property.Name, JsonSerializer.Deserialize>(property.Value.GetRawText())); - } - additionalProperties = additionalPropertiesDictionary; - return new ExecuteWranglingDataflowActivity(name, type, description.Value, Optional.ToNullable(state), Optional.ToNullable(onInactiveMarkAs), Optional.ToList(dependsOn), Optional.ToList(userProperties), additionalProperties, policy.Value, dataFlow, staging.Value, integrationRuntime.Value, compute.Value, traceLevel.Value, continueOnError.Value, runConcurrently.Value, sourceStagingConcurrency.Value, Optional.ToDictionary(sinks), Optional.ToList(queries)); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/ExecuteWranglingDataflowActivity.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/ExecuteWranglingDataflowActivity.cs deleted file mode 100644 index 83e0c209..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/ExecuteWranglingDataflowActivity.cs +++ /dev/null @@ -1,87 +0,0 @@ -// - -#nullable disable - -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// Execute power query activity. - public partial class ExecuteWranglingDataflowActivity : PipelineActivity - { - /// Initializes a new instance of ExecuteWranglingDataflowActivity. - /// Activity name. - /// Data flow reference. - /// or is null. - public ExecuteWranglingDataflowActivity(string name, DataFlowReference dataFlow) : base(name) - { - Argument.AssertNotNull(name, nameof(name)); - Argument.AssertNotNull(dataFlow, nameof(dataFlow)); - - DataFlow = dataFlow; - Sinks = new ChangeTrackingDictionary(); - Queries = new ChangeTrackingList(); - ActivityType = "ExecuteWranglingDataflow"; - } - - /// Initializes a new instance of ExecuteWranglingDataflowActivity. - /// Activity name. - /// Type of activity. - /// Activity description. - /// Activity state. This is an optional property and if not provided, the state will be Active by default. - /// 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. - /// Activity depends on condition. - /// Activity user properties. - /// Additional Properties. - /// Activity policy. - /// Data flow reference. - /// Staging info for execute data flow activity. - /// The integration runtime reference. - /// Compute properties for data flow activity. - /// Trace level setting used for data flow monitoring output. Supported values are: 'coarse', 'fine', and 'none'. Type: string (or Expression with resultType string). - /// Continue on error setting used for data flow execution. Enables processing to continue if a sink fails. Type: boolean (or Expression with resultType boolean). - /// Concurrent run setting used for data flow execution. Allows sinks with the same save order to be processed concurrently. Type: boolean (or Expression with resultType boolean). - /// Specify number of parallel staging for sources applicable to the sink. Type: integer (or Expression with resultType integer). - /// (Deprecated. Please use Queries). List of Power Query activity sinks mapped to a queryName. - /// List of mapping for Power Query mashup query to sink dataset(s). - internal ExecuteWranglingDataflowActivity(string name, string activityType, string description, PipelineActivityState? state, ActivityOnInactiveMarkAs? onInactiveMarkAs, IList dependsOn, IList userProperties, IDictionary> additionalProperties, PipelineActivityPolicy policy, DataFlowReference dataFlow, DataFlowStagingInfo staging, IntegrationRuntimeReference integrationRuntime, ExecuteDataFlowActivityComputeType compute, DataFactoryElement traceLevel, DataFactoryElement continueOnError, DataFactoryElement runConcurrently, DataFactoryElement sourceStagingConcurrency, IDictionary sinks, IList queries) : base(name, activityType, description, state, onInactiveMarkAs, dependsOn, userProperties, additionalProperties) - { - Policy = policy; - DataFlow = dataFlow; - Staging = staging; - IntegrationRuntime = integrationRuntime; - Compute = compute; - TraceLevel = traceLevel; - ContinueOnError = continueOnError; - RunConcurrently = runConcurrently; - SourceStagingConcurrency = sourceStagingConcurrency; - Sinks = sinks; - Queries = queries; - ActivityType = activityType ?? "ExecuteWranglingDataflow"; - } - - /// Activity policy. - public PipelineActivityPolicy Policy { get; set; } - /// Data flow reference. - public DataFlowReference DataFlow { get; set; } - /// Staging info for execute data flow activity. - public DataFlowStagingInfo Staging { get; set; } - /// The integration runtime reference. - public IntegrationRuntimeReference IntegrationRuntime { get; set; } - /// Compute properties for data flow activity. - public ExecuteDataFlowActivityComputeType Compute { get; set; } - /// Trace level setting used for data flow monitoring output. Supported values are: 'coarse', 'fine', and 'none'. Type: string (or Expression with resultType string). - public DataFactoryElement TraceLevel { get; set; } - /// Continue on error setting used for data flow execution. Enables processing to continue if a sink fails. Type: boolean (or Expression with resultType boolean). - public DataFactoryElement ContinueOnError { get; set; } - /// Concurrent run setting used for data flow execution. Allows sinks with the same save order to be processed concurrently. Type: boolean (or Expression with resultType boolean). - public DataFactoryElement RunConcurrently { get; set; } - /// Specify number of parallel staging for sources applicable to the sink. Type: integer (or Expression with resultType integer). - public DataFactoryElement SourceStagingConcurrency { get; set; } - /// (Deprecated. Please use Queries). List of Power Query activity sinks mapped to a queryName. - public IDictionary Sinks { get; } - /// List of mapping for Power Query mashup query to sink dataset(s). - public IList Queries { get; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/ExecutionActivity.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/ExecutionActivity.Serialization.cs deleted file mode 100644 index 8602a2eb..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/ExecutionActivity.Serialization.cs +++ /dev/null @@ -1,213 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class ExecutionActivity : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - if (Optional.IsDefined(LinkedServiceName)) - { - writer.WritePropertyName("linkedServiceName"u8); - JsonSerializer.Serialize(writer, LinkedServiceName); - } - if (Optional.IsDefined(Policy)) - { - writer.WritePropertyName("policy"u8); - writer.WriteObjectValue(Policy); - } - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ActivityType); - if (Optional.IsDefined(Description)) - { - writer.WritePropertyName("description"u8); - writer.WriteStringValue(Description); - } - if (Optional.IsDefined(State)) - { - writer.WritePropertyName("state"u8); - writer.WriteStringValue(State.Value.ToString()); - } - if (Optional.IsDefined(OnInactiveMarkAs)) - { - writer.WritePropertyName("onInactiveMarkAs"u8); - writer.WriteStringValue(OnInactiveMarkAs.Value.ToString()); - } - if (Optional.IsCollectionDefined(DependsOn)) - { - writer.WritePropertyName("dependsOn"u8); - writer.WriteStartArray(); - foreach (var item in DependsOn) - { - writer.WriteObjectValue(item); - } - writer.WriteEndArray(); - } - if (Optional.IsCollectionDefined(UserProperties)) - { - writer.WritePropertyName("userProperties"u8); - writer.WriteStartArray(); - foreach (var item in UserProperties) - { - writer.WriteObjectValue(item); - } - writer.WriteEndArray(); - } - foreach (var item in AdditionalProperties) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.Value.ToString()).RootElement); -#endif - } - writer.WriteEndObject(); - } - - internal static ExecutionActivity DeserializeExecutionActivity(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - if (element.TryGetProperty("type", out JsonElement discriminator)) - { - switch (discriminator.GetString()) - { - case "AzureDataExplorerCommand": return AzureDataExplorerCommandActivity.DeserializeAzureDataExplorerCommandActivity(element); - case "AzureFunctionActivity": return AzureFunctionActivity.DeserializeAzureFunctionActivity(element); - case "AzureMLBatchExecution": return AzureMLBatchExecutionActivity.DeserializeAzureMLBatchExecutionActivity(element); - case "AzureMLExecutePipeline": return AzureMLExecutePipelineActivity.DeserializeAzureMLExecutePipelineActivity(element); - case "AzureMLUpdateResource": return AzureMLUpdateResourceActivity.DeserializeAzureMLUpdateResourceActivity(element); - case "Copy": return CopyActivity.DeserializeCopyActivity(element); - case "Custom": return CustomActivity.DeserializeCustomActivity(element); - case "DataLakeAnalyticsU-SQL": return DataLakeAnalyticsUsqlActivity.DeserializeDataLakeAnalyticsUsqlActivity(element); - case "DatabricksNotebook": return DatabricksNotebookActivity.DeserializeDatabricksNotebookActivity(element); - case "DatabricksSparkJar": return DatabricksSparkJarActivity.DeserializeDatabricksSparkJarActivity(element); - case "DatabricksSparkPython": return DatabricksSparkPythonActivity.DeserializeDatabricksSparkPythonActivity(element); - case "Delete": return DeleteActivity.DeserializeDeleteActivity(element); - case "ExecuteDataFlow": return ExecuteDataFlowActivity.DeserializeExecuteDataFlowActivity(element); - case "ExecuteSSISPackage": return ExecuteSsisPackageActivity.DeserializeExecuteSsisPackageActivity(element); - case "GetMetadata": return GetDatasetMetadataActivity.DeserializeGetDatasetMetadataActivity(element); - case "HDInsightHive": return HDInsightHiveActivity.DeserializeHDInsightHiveActivity(element); - case "HDInsightMapReduce": return HDInsightMapReduceActivity.DeserializeHDInsightMapReduceActivity(element); - case "HDInsightPig": return HDInsightPigActivity.DeserializeHDInsightPigActivity(element); - case "HDInsightSpark": return HDInsightSparkActivity.DeserializeHDInsightSparkActivity(element); - case "HDInsightStreaming": return HDInsightStreamingActivity.DeserializeHDInsightStreamingActivity(element); - case "Lookup": return LookupActivity.DeserializeLookupActivity(element); - case "Script": return DataFactoryScriptActivity.DeserializeDataFactoryScriptActivity(element); - case "SparkJob": return SynapseSparkJobDefinitionActivity.DeserializeSynapseSparkJobDefinitionActivity(element); - case "SqlServerStoredProcedure": return SqlServerStoredProcedureActivity.DeserializeSqlServerStoredProcedureActivity(element); - case "SynapseNotebook": return SynapseNotebookActivity.DeserializeSynapseNotebookActivity(element); - case "WebActivity": return WebActivity.DeserializeWebActivity(element); - } - } - Optional linkedServiceName = default; - Optional policy = default; - string name = default; - string type = "Execution"; - Optional description = default; - Optional state = default; - Optional onInactiveMarkAs = default; - Optional> dependsOn = default; - Optional> userProperties = default; - IDictionary> additionalProperties = default; - Dictionary> additionalPropertiesDictionary = new Dictionary>(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("linkedServiceName"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - linkedServiceName = JsonSerializer.Deserialize(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("policy"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - policy = PipelineActivityPolicy.DeserializePipelineActivityPolicy(property.Value); - continue; - } - if (property.NameEquals("name"u8)) - { - name = property.Value.GetString(); - continue; - } - if (property.NameEquals("type"u8)) - { - type = property.Value.GetString(); - continue; - } - if (property.NameEquals("description"u8)) - { - description = property.Value.GetString(); - continue; - } - if (property.NameEquals("state"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - state = new PipelineActivityState(property.Value.GetString()); - continue; - } - if (property.NameEquals("onInactiveMarkAs"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - onInactiveMarkAs = new ActivityOnInactiveMarkAs(property.Value.GetString()); - continue; - } - if (property.NameEquals("dependsOn"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - array.Add(PipelineActivityDependency.DeserializePipelineActivityDependency(item)); - } - dependsOn = array; - continue; - } - if (property.NameEquals("userProperties"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - array.Add(PipelineActivityUserProperty.DeserializePipelineActivityUserProperty(item)); - } - userProperties = array; - continue; - } - additionalPropertiesDictionary.Add(property.Name, JsonSerializer.Deserialize>(property.Value.GetRawText())); - } - additionalProperties = additionalPropertiesDictionary; - return new ExecutionActivity(name, type, description.Value, Optional.ToNullable(state), Optional.ToNullable(onInactiveMarkAs), Optional.ToList(dependsOn), Optional.ToList(userProperties), additionalProperties, linkedServiceName, policy.Value); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/ExecutionActivity.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/ExecutionActivity.cs deleted file mode 100644 index 41fffc62..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/ExecutionActivity.cs +++ /dev/null @@ -1,50 +0,0 @@ -// - -#nullable disable - -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// - /// Base class for all execution activities. - /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. - /// The available derived classes include , , , , , , , , , , , , , , , , , , , , , , , , and . - /// - public partial class ExecutionActivity : PipelineActivity - { - /// Initializes a new instance of ExecutionActivity. - /// Activity name. - /// is null. - public ExecutionActivity(string name) : base(name) - { - Argument.AssertNotNull(name, nameof(name)); - - ActivityType = "Execution"; - } - - /// Initializes a new instance of ExecutionActivity. - /// Activity name. - /// Type of activity. - /// Activity description. - /// Activity state. This is an optional property and if not provided, the state will be Active by default. - /// 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. - /// Activity depends on condition. - /// Activity user properties. - /// Additional Properties. - /// Linked service reference. - /// Activity policy. - internal ExecutionActivity(string name, string activityType, string description, PipelineActivityState? state, ActivityOnInactiveMarkAs? onInactiveMarkAs, IList dependsOn, IList userProperties, IDictionary> additionalProperties, DataFactoryLinkedServiceReference linkedServiceName, PipelineActivityPolicy policy) : base(name, activityType, description, state, onInactiveMarkAs, dependsOn, userProperties, additionalProperties) - { - LinkedServiceName = linkedServiceName; - Policy = policy; - ActivityType = activityType ?? "Execution"; - } - - /// Linked service reference. - public DataFactoryLinkedServiceReference LinkedServiceName { get; set; } - /// Activity policy. - public PipelineActivityPolicy Policy { get; set; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/ExportSettings.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/ExportSettings.Serialization.cs deleted file mode 100644 index 853e1cb8..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/ExportSettings.Serialization.cs +++ /dev/null @@ -1,46 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class ExportSettings : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ExportSettingsType); - foreach (var item in AdditionalProperties) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.Value.ToString()).RootElement); -#endif - } - writer.WriteEndObject(); - } - - internal static ExportSettings DeserializeExportSettings(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - if (element.TryGetProperty("type", out JsonElement discriminator)) - { - switch (discriminator.GetString()) - { - case "AzureDatabricksDeltaLakeExportCommand": return AzureDatabricksDeltaLakeExportCommand.DeserializeAzureDatabricksDeltaLakeExportCommand(element); - case "SnowflakeExportCopyCommand": return SnowflakeExportCopyCommand.DeserializeSnowflakeExportCopyCommand(element); - } - } - return UnknownExportSettings.DeserializeUnknownExportSettings(element); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/ExportSettings.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/ExportSettings.cs deleted file mode 100644 index f0489906..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/ExportSettings.cs +++ /dev/null @@ -1,66 +0,0 @@ -// - -#nullable disable - -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// - /// Export command settings. - /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. - /// The available derived classes include and . - /// - public partial class ExportSettings - { - /// Initializes a new instance of ExportSettings. - public ExportSettings() - { - AdditionalProperties = new ChangeTrackingDictionary>(); - } - - /// Initializes a new instance of ExportSettings. - /// The export setting type. - /// Additional Properties. - internal ExportSettings(string exportSettingsType, IDictionary> additionalProperties) - { - ExportSettingsType = exportSettingsType; - AdditionalProperties = additionalProperties; - } - - /// The export setting type. - internal string ExportSettingsType { get; set; } - /// - /// Additional Properties - /// - /// To assign an object to the value of this property use . - /// - /// - /// To assign an already formated json string to this property use . - /// - /// - /// Examples: - /// - /// - /// BinaryData.FromObjectAsJson("foo") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromString("\"foo\"") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromObjectAsJson(new { key = "value" }) - /// Creates a payload of { "key": "value" }. - /// - /// - /// BinaryData.FromString("{\"key\": \"value\"}") - /// Creates a payload of { "key": "value" }. - /// - /// - /// - /// - public IDictionary> AdditionalProperties { get; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/ExposureControlBatchContent.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/ExposureControlBatchContent.Serialization.cs deleted file mode 100644 index a0ff0138..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/ExposureControlBatchContent.Serialization.cs +++ /dev/null @@ -1,25 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class ExposureControlBatchContent : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - writer.WritePropertyName("exposureControlRequests"u8); - writer.WriteStartArray(); - foreach (var item in ExposureControlRequests) - { - writer.WriteObjectValue(item); - } - writer.WriteEndArray(); - writer.WriteEndObject(); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/ExposureControlBatchContent.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/ExposureControlBatchContent.cs deleted file mode 100644 index 720f7069..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/ExposureControlBatchContent.cs +++ /dev/null @@ -1,25 +0,0 @@ -// - -#nullable disable - -using Azure.Core; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// A list of exposure control features. - public partial class ExposureControlBatchContent - { - /// Initializes a new instance of ExposureControlBatchContent. - /// List of exposure control features. - /// is null. - public ExposureControlBatchContent(IEnumerable exposureControlRequests) - { - Argument.AssertNotNull(exposureControlRequests, nameof(exposureControlRequests)); - - ExposureControlRequests = exposureControlRequests.ToList(); - } - - /// List of exposure control features. - public IList ExposureControlRequests { get; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/ExposureControlBatchResult.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/ExposureControlBatchResult.Serialization.cs deleted file mode 100644 index 7f885acb..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/ExposureControlBatchResult.Serialization.cs +++ /dev/null @@ -1,34 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class ExposureControlBatchResult - { - internal static ExposureControlBatchResult DeserializeExposureControlBatchResult(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - IReadOnlyList exposureControlResponses = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("exposureControlResponses"u8)) - { - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - array.Add(ExposureControlResult.DeserializeExposureControlResult(item)); - } - exposureControlResponses = array; - continue; - } - } - return new ExposureControlBatchResult(exposureControlResponses); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/ExposureControlBatchResult.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/ExposureControlBatchResult.cs deleted file mode 100644 index 8a8db9b0..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/ExposureControlBatchResult.cs +++ /dev/null @@ -1,32 +0,0 @@ -// - -#nullable disable - -using Azure.Core; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// A list of exposure control feature values. - public partial class ExposureControlBatchResult - { - /// Initializes a new instance of ExposureControlBatchResult. - /// List of exposure control feature values. - /// is null. - internal ExposureControlBatchResult(IEnumerable exposureControlResults) - { - Argument.AssertNotNull(exposureControlResults, nameof(exposureControlResults)); - - ExposureControlResults = exposureControlResults.ToList(); - } - - /// Initializes a new instance of ExposureControlBatchResult. - /// List of exposure control feature values. - internal ExposureControlBatchResult(IReadOnlyList exposureControlResults) - { - ExposureControlResults = exposureControlResults; - } - - /// List of exposure control feature values. - public IReadOnlyList ExposureControlResults { get; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/ExposureControlContent.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/ExposureControlContent.Serialization.cs deleted file mode 100644 index cc8e1996..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/ExposureControlContent.Serialization.cs +++ /dev/null @@ -1,28 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class ExposureControlContent : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - if (Optional.IsDefined(FeatureName)) - { - writer.WritePropertyName("featureName"u8); - writer.WriteStringValue(FeatureName); - } - if (Optional.IsDefined(FeatureType)) - { - writer.WritePropertyName("featureType"u8); - writer.WriteStringValue(FeatureType); - } - writer.WriteEndObject(); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/ExposureControlContent.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/ExposureControlContent.cs deleted file mode 100644 index 55a02b92..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/ExposureControlContent.cs +++ /dev/null @@ -1,20 +0,0 @@ -// - -#nullable disable - -namespace AzureDataFactory.TestingFramework.Models -{ - /// The exposure control request. - public partial class ExposureControlContent - { - /// Initializes a new instance of ExposureControlContent. - public ExposureControlContent() - { - } - - /// The feature name. - public string FeatureName { get; set; } - /// The feature type. - public string FeatureType { get; set; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/ExposureControlResult.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/ExposureControlResult.Serialization.cs deleted file mode 100644 index 73018814..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/ExposureControlResult.Serialization.cs +++ /dev/null @@ -1,36 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class ExposureControlResult - { - internal static ExposureControlResult DeserializeExposureControlResult(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - Optional featureName = default; - Optional value = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("featureName"u8)) - { - featureName = property.Value.GetString(); - continue; - } - if (property.NameEquals("value"u8)) - { - value = property.Value.GetString(); - continue; - } - } - return new ExposureControlResult(featureName.Value, value.Value); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/ExposureControlResult.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/ExposureControlResult.cs deleted file mode 100644 index e610154e..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/ExposureControlResult.cs +++ /dev/null @@ -1,29 +0,0 @@ -// - -#nullable disable - -namespace AzureDataFactory.TestingFramework.Models -{ - /// The exposure control response. - public partial class ExposureControlResult - { - /// Initializes a new instance of ExposureControlResult. - internal ExposureControlResult() - { - } - - /// Initializes a new instance of ExposureControlResult. - /// The feature name. - /// The feature value. - internal ExposureControlResult(string featureName, string value) - { - FeatureName = featureName; - Value = value; - } - - /// The feature name. - public string FeatureName { get; } - /// The feature value. - public string Value { get; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/FactoryGitHubClientSecret.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/FactoryGitHubClientSecret.Serialization.cs deleted file mode 100644 index 07724b37..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/FactoryGitHubClientSecret.Serialization.cs +++ /dev/null @@ -1,56 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class FactoryGitHubClientSecret : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - if (Optional.IsDefined(ByoaSecretAkvUri)) - { - writer.WritePropertyName("byoaSecretAkvUrl"u8); - writer.WriteStringValue(ByoaSecretAkvUri.AbsoluteUri); - } - if (Optional.IsDefined(ByoaSecretName)) - { - writer.WritePropertyName("byoaSecretName"u8); - writer.WriteStringValue(ByoaSecretName); - } - writer.WriteEndObject(); - } - - internal static FactoryGitHubClientSecret DeserializeFactoryGitHubClientSecret(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - Optional byoaSecretAkvUrl = default; - Optional byoaSecretName = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("byoaSecretAkvUrl"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - byoaSecretAkvUrl = new Uri(property.Value.GetString()); - continue; - } - if (property.NameEquals("byoaSecretName"u8)) - { - byoaSecretName = property.Value.GetString(); - continue; - } - } - return new FactoryGitHubClientSecret(byoaSecretAkvUrl.Value, byoaSecretName.Value); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/FactoryGitHubClientSecret.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/FactoryGitHubClientSecret.cs deleted file mode 100644 index 391baee5..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/FactoryGitHubClientSecret.cs +++ /dev/null @@ -1,29 +0,0 @@ -// - -#nullable disable - -namespace AzureDataFactory.TestingFramework.Models -{ - /// Client secret information for factory's bring your own app repository configuration. - public partial class FactoryGitHubClientSecret - { - /// Initializes a new instance of FactoryGitHubClientSecret. - public FactoryGitHubClientSecret() - { - } - - /// Initializes a new instance of FactoryGitHubClientSecret. - /// Bring your own app client secret AKV URL. - /// Bring your own app client secret name in AKV. - internal FactoryGitHubClientSecret(Uri byoaSecretAkvUri, string byoaSecretName) - { - ByoaSecretAkvUri = byoaSecretAkvUri; - ByoaSecretName = byoaSecretName; - } - - /// Bring your own app client secret AKV URL. - public Uri ByoaSecretAkvUri { get; set; } - /// Bring your own app client secret name in AKV. - public string ByoaSecretName { get; set; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/FactoryGitHubConfiguration.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/FactoryGitHubConfiguration.Serialization.cs deleted file mode 100644 index bfabcbd3..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/FactoryGitHubConfiguration.Serialization.cs +++ /dev/null @@ -1,133 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class FactoryGitHubConfiguration : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - if (Optional.IsDefined(HostName)) - { - writer.WritePropertyName("hostName"u8); - writer.WriteStringValue(HostName); - } - if (Optional.IsDefined(ClientId)) - { - writer.WritePropertyName("clientId"u8); - writer.WriteStringValue(ClientId); - } - if (Optional.IsDefined(ClientSecret)) - { - writer.WritePropertyName("clientSecret"u8); - writer.WriteObjectValue(ClientSecret); - } - writer.WritePropertyName("type"u8); - writer.WriteStringValue(FactoryRepoConfigurationType); - writer.WritePropertyName("accountName"u8); - writer.WriteStringValue(AccountName); - writer.WritePropertyName("repositoryName"u8); - writer.WriteStringValue(RepositoryName); - writer.WritePropertyName("collaborationBranch"u8); - writer.WriteStringValue(CollaborationBranch); - writer.WritePropertyName("rootFolder"u8); - writer.WriteStringValue(RootFolder); - if (Optional.IsDefined(LastCommitId)) - { - writer.WritePropertyName("lastCommitId"u8); - writer.WriteStringValue(LastCommitId); - } - if (Optional.IsDefined(DisablePublish)) - { - writer.WritePropertyName("disablePublish"u8); - writer.WriteBooleanValue(DisablePublish.Value); - } - writer.WriteEndObject(); - } - - internal static FactoryGitHubConfiguration DeserializeFactoryGitHubConfiguration(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - Optional hostName = default; - Optional clientId = default; - Optional clientSecret = default; - string type = default; - string accountName = default; - string repositoryName = default; - string collaborationBranch = default; - string rootFolder = default; - Optional lastCommitId = default; - Optional disablePublish = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("hostName"u8)) - { - hostName = property.Value.GetString(); - continue; - } - if (property.NameEquals("clientId"u8)) - { - clientId = property.Value.GetString(); - continue; - } - if (property.NameEquals("clientSecret"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - clientSecret = FactoryGitHubClientSecret.DeserializeFactoryGitHubClientSecret(property.Value); - continue; - } - if (property.NameEquals("type"u8)) - { - type = property.Value.GetString(); - continue; - } - if (property.NameEquals("accountName"u8)) - { - accountName = property.Value.GetString(); - continue; - } - if (property.NameEquals("repositoryName"u8)) - { - repositoryName = property.Value.GetString(); - continue; - } - if (property.NameEquals("collaborationBranch"u8)) - { - collaborationBranch = property.Value.GetString(); - continue; - } - if (property.NameEquals("rootFolder"u8)) - { - rootFolder = property.Value.GetString(); - continue; - } - if (property.NameEquals("lastCommitId"u8)) - { - lastCommitId = property.Value.GetString(); - continue; - } - if (property.NameEquals("disablePublish"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - disablePublish = property.Value.GetBoolean(); - continue; - } - } - return new FactoryGitHubConfiguration(type, accountName, repositoryName, collaborationBranch, rootFolder, lastCommitId.Value, Optional.ToNullable(disablePublish), hostName.Value, clientId.Value, clientSecret.Value); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/FactoryGitHubConfiguration.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/FactoryGitHubConfiguration.cs deleted file mode 100644 index 153fbfd9..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/FactoryGitHubConfiguration.cs +++ /dev/null @@ -1,54 +0,0 @@ -// - -#nullable disable - -using Azure.Core; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// Factory's GitHub repo information. - public partial class FactoryGitHubConfiguration : FactoryRepoConfiguration - { - /// Initializes a new instance of FactoryGitHubConfiguration. - /// Account name. - /// Repository name. - /// Collaboration branch. - /// Root folder. - /// , , or is null. - public FactoryGitHubConfiguration(string accountName, string repositoryName, string collaborationBranch, string rootFolder) : base(accountName, repositoryName, collaborationBranch, rootFolder) - { - Argument.AssertNotNull(accountName, nameof(accountName)); - Argument.AssertNotNull(repositoryName, nameof(repositoryName)); - Argument.AssertNotNull(collaborationBranch, nameof(collaborationBranch)); - Argument.AssertNotNull(rootFolder, nameof(rootFolder)); - - FactoryRepoConfigurationType = "FactoryGitHubConfiguration"; - } - - /// Initializes a new instance of FactoryGitHubConfiguration. - /// Type of repo configuration. - /// Account name. - /// Repository name. - /// Collaboration branch. - /// Root folder. - /// Last commit id. - /// Disable manual publish operation in ADF studio to favor automated publish. - /// GitHub Enterprise host name. For example: `https://github.mydomain.com`. - /// GitHub bring your own app client id. - /// GitHub bring your own app client secret information. - internal FactoryGitHubConfiguration(string factoryRepoConfigurationType, string accountName, string repositoryName, string collaborationBranch, string rootFolder, string lastCommitId, bool? disablePublish, string hostName, string clientId, FactoryGitHubClientSecret clientSecret) : base(factoryRepoConfigurationType, accountName, repositoryName, collaborationBranch, rootFolder, lastCommitId, disablePublish) - { - HostName = hostName; - ClientId = clientId; - ClientSecret = clientSecret; - FactoryRepoConfigurationType = factoryRepoConfigurationType ?? "FactoryGitHubConfiguration"; - } - - /// GitHub Enterprise host name. For example: `https://github.mydomain.com`. - public string HostName { get; set; } - /// GitHub bring your own app client id. - public string ClientId { get; set; } - /// GitHub bring your own app client secret information. - public FactoryGitHubClientSecret ClientSecret { get; set; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/FactoryRepoConfiguration.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/FactoryRepoConfiguration.Serialization.cs deleted file mode 100644 index ac1f9a61..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/FactoryRepoConfiguration.Serialization.cs +++ /dev/null @@ -1,55 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class FactoryRepoConfiguration : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - writer.WritePropertyName("type"u8); - writer.WriteStringValue(FactoryRepoConfigurationType); - writer.WritePropertyName("accountName"u8); - writer.WriteStringValue(AccountName); - writer.WritePropertyName("repositoryName"u8); - writer.WriteStringValue(RepositoryName); - writer.WritePropertyName("collaborationBranch"u8); - writer.WriteStringValue(CollaborationBranch); - writer.WritePropertyName("rootFolder"u8); - writer.WriteStringValue(RootFolder); - if (Optional.IsDefined(LastCommitId)) - { - writer.WritePropertyName("lastCommitId"u8); - writer.WriteStringValue(LastCommitId); - } - if (Optional.IsDefined(DisablePublish)) - { - writer.WritePropertyName("disablePublish"u8); - writer.WriteBooleanValue(DisablePublish.Value); - } - writer.WriteEndObject(); - } - - internal static FactoryRepoConfiguration DeserializeFactoryRepoConfiguration(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - if (element.TryGetProperty("type", out JsonElement discriminator)) - { - switch (discriminator.GetString()) - { - case "FactoryGitHubConfiguration": return FactoryGitHubConfiguration.DeserializeFactoryGitHubConfiguration(element); - case "FactoryVSTSConfiguration": return FactoryVstsConfiguration.DeserializeFactoryVstsConfiguration(element); - } - } - return UnknownFactoryRepoConfiguration.DeserializeUnknownFactoryRepoConfiguration(element); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/FactoryRepoConfiguration.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/FactoryRepoConfiguration.cs deleted file mode 100644 index 7312c136..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/FactoryRepoConfiguration.cs +++ /dev/null @@ -1,69 +0,0 @@ -// - -#nullable disable - -using Azure.Core; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// - /// Factory's git repo information. - /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. - /// The available derived classes include and . - /// - public abstract partial class FactoryRepoConfiguration - { - /// Initializes a new instance of FactoryRepoConfiguration. - /// Account name. - /// Repository name. - /// Collaboration branch. - /// Root folder. - /// , , or is null. - protected FactoryRepoConfiguration(string accountName, string repositoryName, string collaborationBranch, string rootFolder) - { - Argument.AssertNotNull(accountName, nameof(accountName)); - Argument.AssertNotNull(repositoryName, nameof(repositoryName)); - Argument.AssertNotNull(collaborationBranch, nameof(collaborationBranch)); - Argument.AssertNotNull(rootFolder, nameof(rootFolder)); - - AccountName = accountName; - RepositoryName = repositoryName; - CollaborationBranch = collaborationBranch; - RootFolder = rootFolder; - } - - /// Initializes a new instance of FactoryRepoConfiguration. - /// Type of repo configuration. - /// Account name. - /// Repository name. - /// Collaboration branch. - /// Root folder. - /// Last commit id. - /// Disable manual publish operation in ADF studio to favor automated publish. - internal FactoryRepoConfiguration(string factoryRepoConfigurationType, string accountName, string repositoryName, string collaborationBranch, string rootFolder, string lastCommitId, bool? disablePublish) - { - FactoryRepoConfigurationType = factoryRepoConfigurationType; - AccountName = accountName; - RepositoryName = repositoryName; - CollaborationBranch = collaborationBranch; - RootFolder = rootFolder; - LastCommitId = lastCommitId; - DisablePublish = disablePublish; - } - - /// Type of repo configuration. - internal string FactoryRepoConfigurationType { get; set; } - /// Account name. - public string AccountName { get; set; } - /// Repository name. - public string RepositoryName { get; set; } - /// Collaboration branch. - public string CollaborationBranch { get; set; } - /// Root folder. - public string RootFolder { get; set; } - /// Last commit id. - public string LastCommitId { get; set; } - /// Disable manual publish operation in ADF studio to favor automated publish. - public bool? DisablePublish { get; set; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/FactoryRepoContent.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/FactoryRepoContent.Serialization.cs deleted file mode 100644 index bdfa1c75..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/FactoryRepoContent.Serialization.cs +++ /dev/null @@ -1,28 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class FactoryRepoContent : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - if (Optional.IsDefined(FactoryResourceId)) - { - writer.WritePropertyName("factoryResourceId"u8); - writer.WriteStringValue(FactoryResourceId); - } - if (Optional.IsDefined(RepoConfiguration)) - { - writer.WritePropertyName("repoConfiguration"u8); - writer.WriteObjectValue(RepoConfiguration); - } - writer.WriteEndObject(); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/FactoryRepoContent.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/FactoryRepoContent.cs deleted file mode 100644 index 74646748..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/FactoryRepoContent.cs +++ /dev/null @@ -1,26 +0,0 @@ -// - -#nullable disable - -using Azure.Core; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// Factory's git repo information. - public partial class FactoryRepoContent - { - /// Initializes a new instance of FactoryRepoContent. - public FactoryRepoContent() - { - } - - /// The factory resource id. - public ResourceIdentifier FactoryResourceId { get; set; } - /// - /// Git repo information of the factory. - /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. - /// The available derived classes include and . - /// - public FactoryRepoConfiguration RepoConfiguration { get; set; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/FactoryVstsConfiguration.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/FactoryVstsConfiguration.Serialization.cs deleted file mode 100644 index f4817f74..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/FactoryVstsConfiguration.Serialization.cs +++ /dev/null @@ -1,119 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class FactoryVstsConfiguration : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - writer.WritePropertyName("projectName"u8); - writer.WriteStringValue(ProjectName); - if (Optional.IsDefined(TenantId)) - { - writer.WritePropertyName("tenantId"u8); - writer.WriteStringValue(TenantId.Value); - } - writer.WritePropertyName("type"u8); - writer.WriteStringValue(FactoryRepoConfigurationType); - writer.WritePropertyName("accountName"u8); - writer.WriteStringValue(AccountName); - writer.WritePropertyName("repositoryName"u8); - writer.WriteStringValue(RepositoryName); - writer.WritePropertyName("collaborationBranch"u8); - writer.WriteStringValue(CollaborationBranch); - writer.WritePropertyName("rootFolder"u8); - writer.WriteStringValue(RootFolder); - if (Optional.IsDefined(LastCommitId)) - { - writer.WritePropertyName("lastCommitId"u8); - writer.WriteStringValue(LastCommitId); - } - if (Optional.IsDefined(DisablePublish)) - { - writer.WritePropertyName("disablePublish"u8); - writer.WriteBooleanValue(DisablePublish.Value); - } - writer.WriteEndObject(); - } - - internal static FactoryVstsConfiguration DeserializeFactoryVstsConfiguration(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - string projectName = default; - Optional tenantId = default; - string type = default; - string accountName = default; - string repositoryName = default; - string collaborationBranch = default; - string rootFolder = default; - Optional lastCommitId = default; - Optional disablePublish = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("projectName"u8)) - { - projectName = property.Value.GetString(); - continue; - } - if (property.NameEquals("tenantId"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - tenantId = property.Value.GetGuid(); - continue; - } - if (property.NameEquals("type"u8)) - { - type = property.Value.GetString(); - continue; - } - if (property.NameEquals("accountName"u8)) - { - accountName = property.Value.GetString(); - continue; - } - if (property.NameEquals("repositoryName"u8)) - { - repositoryName = property.Value.GetString(); - continue; - } - if (property.NameEquals("collaborationBranch"u8)) - { - collaborationBranch = property.Value.GetString(); - continue; - } - if (property.NameEquals("rootFolder"u8)) - { - rootFolder = property.Value.GetString(); - continue; - } - if (property.NameEquals("lastCommitId"u8)) - { - lastCommitId = property.Value.GetString(); - continue; - } - if (property.NameEquals("disablePublish"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - disablePublish = property.Value.GetBoolean(); - continue; - } - } - return new FactoryVstsConfiguration(type, accountName, repositoryName, collaborationBranch, rootFolder, lastCommitId.Value, Optional.ToNullable(disablePublish), projectName, Optional.ToNullable(tenantId)); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/FactoryVstsConfiguration.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/FactoryVstsConfiguration.cs deleted file mode 100644 index 1aa52a4f..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/FactoryVstsConfiguration.cs +++ /dev/null @@ -1,53 +0,0 @@ -// - -#nullable disable - -using Azure.Core; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// Factory's VSTS repo information. - public partial class FactoryVstsConfiguration : FactoryRepoConfiguration - { - /// Initializes a new instance of FactoryVstsConfiguration. - /// Account name. - /// Repository name. - /// Collaboration branch. - /// Root folder. - /// VSTS project name. - /// , , , or is null. - public FactoryVstsConfiguration(string accountName, string repositoryName, string collaborationBranch, string rootFolder, string projectName) : base(accountName, repositoryName, collaborationBranch, rootFolder) - { - Argument.AssertNotNull(accountName, nameof(accountName)); - Argument.AssertNotNull(repositoryName, nameof(repositoryName)); - Argument.AssertNotNull(collaborationBranch, nameof(collaborationBranch)); - Argument.AssertNotNull(rootFolder, nameof(rootFolder)); - Argument.AssertNotNull(projectName, nameof(projectName)); - - ProjectName = projectName; - FactoryRepoConfigurationType = "FactoryVSTSConfiguration"; - } - - /// Initializes a new instance of FactoryVstsConfiguration. - /// Type of repo configuration. - /// Account name. - /// Repository name. - /// Collaboration branch. - /// Root folder. - /// Last commit id. - /// Disable manual publish operation in ADF studio to favor automated publish. - /// VSTS project name. - /// VSTS tenant id. - internal FactoryVstsConfiguration(string factoryRepoConfigurationType, string accountName, string repositoryName, string collaborationBranch, string rootFolder, string lastCommitId, bool? disablePublish, string projectName, Guid? tenantId) : base(factoryRepoConfigurationType, accountName, repositoryName, collaborationBranch, rootFolder, lastCommitId, disablePublish) - { - ProjectName = projectName; - TenantId = tenantId; - FactoryRepoConfigurationType = factoryRepoConfigurationType ?? "FactoryVSTSConfiguration"; - } - - /// VSTS project name. - public string ProjectName { get; set; } - /// VSTS tenant id. - public Guid? TenantId { get; set; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/FailActivity.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/FailActivity.Serialization.cs deleted file mode 100644 index 45d3d891..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/FailActivity.Serialization.cs +++ /dev/null @@ -1,182 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class FailActivity : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ActivityType); - if (Optional.IsDefined(Description)) - { - writer.WritePropertyName("description"u8); - writer.WriteStringValue(Description); - } - if (Optional.IsDefined(State)) - { - writer.WritePropertyName("state"u8); - writer.WriteStringValue(State.Value.ToString()); - } - if (Optional.IsDefined(OnInactiveMarkAs)) - { - writer.WritePropertyName("onInactiveMarkAs"u8); - writer.WriteStringValue(OnInactiveMarkAs.Value.ToString()); - } - if (Optional.IsCollectionDefined(DependsOn)) - { - writer.WritePropertyName("dependsOn"u8); - writer.WriteStartArray(); - foreach (var item in DependsOn) - { - writer.WriteObjectValue(item); - } - writer.WriteEndArray(); - } - if (Optional.IsCollectionDefined(UserProperties)) - { - writer.WritePropertyName("userProperties"u8); - writer.WriteStartArray(); - foreach (var item in UserProperties) - { - writer.WriteObjectValue(item); - } - writer.WriteEndArray(); - } - writer.WritePropertyName("typeProperties"u8); - writer.WriteStartObject(); - writer.WritePropertyName("message"u8); - JsonSerializer.Serialize(writer, Message); - writer.WritePropertyName("errorCode"u8); - JsonSerializer.Serialize(writer, ErrorCode); - writer.WriteEndObject(); - foreach (var item in AdditionalProperties) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.Value.ToString()).RootElement); -#endif - } - writer.WriteEndObject(); - } - - internal static FailActivity DeserializeFailActivity(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - string name = default; - string type = default; - Optional description = default; - Optional state = default; - Optional onInactiveMarkAs = default; - Optional> dependsOn = default; - Optional> userProperties = default; - DataFactoryElement message = default; - DataFactoryElement errorCode = default; - IDictionary> additionalProperties = default; - Dictionary> additionalPropertiesDictionary = new Dictionary>(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("name"u8)) - { - name = property.Value.GetString(); - continue; - } - if (property.NameEquals("type"u8)) - { - type = property.Value.GetString(); - continue; - } - if (property.NameEquals("description"u8)) - { - description = property.Value.GetString(); - continue; - } - if (property.NameEquals("state"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - state = new PipelineActivityState(property.Value.GetString()); - continue; - } - if (property.NameEquals("onInactiveMarkAs"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - onInactiveMarkAs = new ActivityOnInactiveMarkAs(property.Value.GetString()); - continue; - } - if (property.NameEquals("dependsOn"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - array.Add(PipelineActivityDependency.DeserializePipelineActivityDependency(item)); - } - dependsOn = array; - continue; - } - if (property.NameEquals("userProperties"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - array.Add(PipelineActivityUserProperty.DeserializePipelineActivityUserProperty(item)); - } - userProperties = array; - continue; - } - if (property.NameEquals("typeProperties"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - foreach (var property0 in property.Value.EnumerateObject()) - { - if (property0.NameEquals("message"u8)) - { - message = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("errorCode"u8)) - { - errorCode = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - } - continue; - } - additionalPropertiesDictionary.Add(property.Name, JsonSerializer.Deserialize>(property.Value.GetRawText())); - } - additionalProperties = additionalPropertiesDictionary; - return new FailActivity(name, type, description.Value, Optional.ToNullable(state), Optional.ToNullable(onInactiveMarkAs), Optional.ToList(dependsOn), Optional.ToList(userProperties), additionalProperties, message, errorCode); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/FailActivity.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/FailActivity.cs deleted file mode 100644 index e94e0e64..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/FailActivity.cs +++ /dev/null @@ -1,52 +0,0 @@ -// - -#nullable disable - -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// This activity will fail within its own scope and output a custom error message and error code. The error message and code can provided either as a string literal or as an expression that can be evaluated to a string at runtime. The activity scope can be the whole pipeline or a control activity (e.g. foreach, switch, until), if the fail activity is contained in it. - public partial class FailActivity : ControlActivity - { - /// Initializes a new instance of FailActivity. - /// Activity name. - /// The error message that surfaced in the Fail activity. It can be dynamic content that's evaluated to a non empty/blank string at runtime. Type: string (or Expression with resultType string). - /// The error code that categorizes the error type of the Fail activity. It can be dynamic content that's evaluated to a non empty/blank string at runtime. Type: string (or Expression with resultType string). - /// , or is null. - public FailActivity(string name, DataFactoryElement message, DataFactoryElement errorCode) : base(name) - { - Argument.AssertNotNull(name, nameof(name)); - Argument.AssertNotNull(message, nameof(message)); - Argument.AssertNotNull(errorCode, nameof(errorCode)); - - Message = message; - ErrorCode = errorCode; - ActivityType = "Fail"; - } - - /// Initializes a new instance of FailActivity. - /// Activity name. - /// Type of activity. - /// Activity description. - /// Activity state. This is an optional property and if not provided, the state will be Active by default. - /// 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. - /// Activity depends on condition. - /// Activity user properties. - /// Additional Properties. - /// The error message that surfaced in the Fail activity. It can be dynamic content that's evaluated to a non empty/blank string at runtime. Type: string (or Expression with resultType string). - /// The error code that categorizes the error type of the Fail activity. It can be dynamic content that's evaluated to a non empty/blank string at runtime. Type: string (or Expression with resultType string). - internal FailActivity(string name, string activityType, string description, PipelineActivityState? state, ActivityOnInactiveMarkAs? onInactiveMarkAs, IList dependsOn, IList userProperties, IDictionary> additionalProperties, DataFactoryElement message, DataFactoryElement errorCode) : base(name, activityType, description, state, onInactiveMarkAs, dependsOn, userProperties, additionalProperties) - { - Message = message; - ErrorCode = errorCode; - ActivityType = activityType ?? "Fail"; - } - - /// The error message that surfaced in the Fail activity. It can be dynamic content that's evaluated to a non empty/blank string at runtime. Type: string (or Expression with resultType string). - public DataFactoryElement Message { get; set; } - /// The error code that categorizes the error type of the Fail activity. It can be dynamic content that's evaluated to a non empty/blank string at runtime. Type: string (or Expression with resultType string). - public DataFactoryElement ErrorCode { get; set; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/FileServerLinkedService.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/FileServerLinkedService.Serialization.cs deleted file mode 100644 index d598e113..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/FileServerLinkedService.Serialization.cs +++ /dev/null @@ -1,209 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class FileServerLinkedService : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - writer.WritePropertyName("type"u8); - writer.WriteStringValue(LinkedServiceType); - if (Optional.IsDefined(ConnectVia)) - { - writer.WritePropertyName("connectVia"u8); - writer.WriteObjectValue(ConnectVia); - } - if (Optional.IsDefined(Description)) - { - writer.WritePropertyName("description"u8); - writer.WriteStringValue(Description); - } - if (Optional.IsCollectionDefined(Parameters)) - { - writer.WritePropertyName("parameters"u8); - writer.WriteStartObject(); - foreach (var item in Parameters) - { - writer.WritePropertyName(item.Key); - writer.WriteObjectValue(item.Value); - } - writer.WriteEndObject(); - } - if (Optional.IsCollectionDefined(Annotations)) - { - writer.WritePropertyName("annotations"u8); - writer.WriteStartArray(); - foreach (var item in Annotations) - { - if (item == null) - { - writer.WriteNullValue(); - continue; - } -#if NET6_0_OR_GREATER - writer.WriteRawValue(item); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.ToString()).RootElement); -#endif - } - writer.WriteEndArray(); - } - writer.WritePropertyName("typeProperties"u8); - writer.WriteStartObject(); - writer.WritePropertyName("host"u8); - JsonSerializer.Serialize(writer, Host); - if (Optional.IsDefined(UserId)) - { - writer.WritePropertyName("userId"u8); - JsonSerializer.Serialize(writer, UserId); - } - if (Optional.IsDefined(Password)) - { - writer.WritePropertyName("password"u8); - JsonSerializer.Serialize(writer, Password); - } - if (Optional.IsDefined(EncryptedCredential)) - { - writer.WritePropertyName("encryptedCredential"u8); - writer.WriteStringValue(EncryptedCredential); - } - writer.WriteEndObject(); - foreach (var item in AdditionalProperties) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.Value.ToString()).RootElement); -#endif - } - writer.WriteEndObject(); - } - - internal static FileServerLinkedService DeserializeFileServerLinkedService(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - string type = default; - Optional connectVia = default; - Optional description = default; - Optional> parameters = default; - Optional> annotations = default; - DataFactoryElement host = default; - Optional> userId = default; - Optional password = default; - Optional encryptedCredential = default; - IDictionary> additionalProperties = default; - Dictionary> additionalPropertiesDictionary = new Dictionary>(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("type"u8)) - { - type = property.Value.GetString(); - continue; - } - if (property.NameEquals("connectVia"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - connectVia = IntegrationRuntimeReference.DeserializeIntegrationRuntimeReference(property.Value); - continue; - } - if (property.NameEquals("description"u8)) - { - description = property.Value.GetString(); - continue; - } - if (property.NameEquals("parameters"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - Dictionary dictionary = new Dictionary(); - foreach (var property0 in property.Value.EnumerateObject()) - { - dictionary.Add(property0.Name, EntityParameterSpecification.DeserializeEntityParameterSpecification(property0.Value)); - } - parameters = dictionary; - continue; - } - if (property.NameEquals("annotations"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - if (item.ValueKind == JsonValueKind.Null) - { - array.Add(null); - } - else - { - array.Add(BinaryData.FromString(item.GetRawText())); - } - } - annotations = array; - continue; - } - if (property.NameEquals("typeProperties"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - foreach (var property0 in property.Value.EnumerateObject()) - { - if (property0.NameEquals("host"u8)) - { - host = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("userId"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - userId = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("password"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - password = JsonSerializer.Deserialize(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("encryptedCredential"u8)) - { - encryptedCredential = property0.Value.GetString(); - continue; - } - } - continue; - } - additionalPropertiesDictionary.Add(property.Name, JsonSerializer.Deserialize>(property.Value.GetRawText())); - } - additionalProperties = additionalPropertiesDictionary; - return new FileServerLinkedService(type, connectVia.Value, description.Value, Optional.ToDictionary(parameters), Optional.ToList(annotations), additionalProperties, host, userId.Value, password, encryptedCredential.Value); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/FileServerLinkedService.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/FileServerLinkedService.cs deleted file mode 100644 index 1036dcee..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/FileServerLinkedService.cs +++ /dev/null @@ -1,53 +0,0 @@ -// - -#nullable disable - -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// File system linked service. - public partial class FileServerLinkedService : DataFactoryLinkedServiceProperties - { - /// Initializes a new instance of FileServerLinkedService. - /// Host name of the server. Type: string (or Expression with resultType string). - /// is null. - public FileServerLinkedService(DataFactoryElement host) - { - Argument.AssertNotNull(host, nameof(host)); - - Host = host; - LinkedServiceType = "FileServer"; - } - - /// Initializes a new instance of FileServerLinkedService. - /// Type of linked service. - /// The integration runtime reference. - /// Linked service description. - /// Parameters for linked service. - /// List of tags that can be used for describing the linked service. - /// Additional Properties. - /// Host name of the server. Type: string (or Expression with resultType string). - /// User ID to logon the server. Type: string (or Expression with resultType string). - /// Password to logon the server. - /// The encrypted credential used for authentication. Credentials are encrypted using the integration runtime credential manager. Type: string. - internal FileServerLinkedService(string linkedServiceType, IntegrationRuntimeReference connectVia, string description, IDictionary parameters, IList annotations, IDictionary> additionalProperties, DataFactoryElement host, DataFactoryElement userId, DataFactorySecretBaseDefinition password, string encryptedCredential) : base(linkedServiceType, connectVia, description, parameters, annotations, additionalProperties) - { - Host = host; - UserId = userId; - Password = password; - EncryptedCredential = encryptedCredential; - LinkedServiceType = linkedServiceType ?? "FileServer"; - } - - /// Host name of the server. Type: string (or Expression with resultType string). - public DataFactoryElement Host { get; set; } - /// User ID to logon the server. Type: string (or Expression with resultType string). - public DataFactoryElement UserId { get; set; } - /// Password to logon the server. - public DataFactorySecretBaseDefinition Password { get; set; } - /// The encrypted credential used for authentication. Credentials are encrypted using the integration runtime credential manager. Type: string. - public string EncryptedCredential { get; set; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/FileServerLocation.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/FileServerLocation.Serialization.cs deleted file mode 100644 index 38782346..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/FileServerLocation.Serialization.cs +++ /dev/null @@ -1,82 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class FileServerLocation : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - writer.WritePropertyName("type"u8); - writer.WriteStringValue(DatasetLocationType); - if (Optional.IsDefined(FolderPath)) - { - writer.WritePropertyName("folderPath"u8); - JsonSerializer.Serialize(writer, FolderPath); - } - if (Optional.IsDefined(FileName)) - { - writer.WritePropertyName("fileName"u8); - JsonSerializer.Serialize(writer, FileName); - } - foreach (var item in AdditionalProperties) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.Value.ToString()).RootElement); -#endif - } - writer.WriteEndObject(); - } - - internal static FileServerLocation DeserializeFileServerLocation(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - string type = default; - Optional> folderPath = default; - Optional> fileName = default; - IDictionary> additionalProperties = default; - Dictionary> additionalPropertiesDictionary = new Dictionary>(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("type"u8)) - { - type = property.Value.GetString(); - continue; - } - if (property.NameEquals("folderPath"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - folderPath = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("fileName"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - fileName = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - additionalPropertiesDictionary.Add(property.Name, JsonSerializer.Deserialize>(property.Value.GetRawText())); - } - additionalProperties = additionalPropertiesDictionary; - return new FileServerLocation(type, folderPath.Value, fileName.Value, additionalProperties); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/FileServerLocation.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/FileServerLocation.cs deleted file mode 100644 index 2847574a..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/FileServerLocation.cs +++ /dev/null @@ -1,28 +0,0 @@ -// - -#nullable disable - -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// The location of file server dataset. - public partial class FileServerLocation : DatasetLocation - { - /// Initializes a new instance of FileServerLocation. - public FileServerLocation() - { - DatasetLocationType = "FileServerLocation"; - } - - /// Initializes a new instance of FileServerLocation. - /// Type of dataset storage location. - /// Specify the folder path of dataset. Type: string (or Expression with resultType string). - /// Specify the file name of dataset. Type: string (or Expression with resultType string). - /// Additional Properties. - internal FileServerLocation(string datasetLocationType, DataFactoryElement folderPath, DataFactoryElement fileName, IDictionary> additionalProperties) : base(datasetLocationType, folderPath, fileName, additionalProperties) - { - DatasetLocationType = datasetLocationType ?? "FileServerLocation"; - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/FileServerReadSettings.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/FileServerReadSettings.Serialization.cs deleted file mode 100644 index eae0da39..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/FileServerReadSettings.Serialization.cs +++ /dev/null @@ -1,232 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class FileServerReadSettings : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - if (Optional.IsDefined(Recursive)) - { - writer.WritePropertyName("recursive"u8); - JsonSerializer.Serialize(writer, Recursive); - } - if (Optional.IsDefined(WildcardFolderPath)) - { - writer.WritePropertyName("wildcardFolderPath"u8); - JsonSerializer.Serialize(writer, WildcardFolderPath); - } - if (Optional.IsDefined(WildcardFileName)) - { - writer.WritePropertyName("wildcardFileName"u8); - JsonSerializer.Serialize(writer, WildcardFileName); - } - if (Optional.IsDefined(FileListPath)) - { - writer.WritePropertyName("fileListPath"u8); - JsonSerializer.Serialize(writer, FileListPath); - } - if (Optional.IsDefined(EnablePartitionDiscovery)) - { - writer.WritePropertyName("enablePartitionDiscovery"u8); - JsonSerializer.Serialize(writer, EnablePartitionDiscovery); - } - if (Optional.IsDefined(PartitionRootPath)) - { - writer.WritePropertyName("partitionRootPath"u8); - JsonSerializer.Serialize(writer, PartitionRootPath); - } - if (Optional.IsDefined(DeleteFilesAfterCompletion)) - { - writer.WritePropertyName("deleteFilesAfterCompletion"u8); - JsonSerializer.Serialize(writer, DeleteFilesAfterCompletion); - } - if (Optional.IsDefined(ModifiedDatetimeStart)) - { - writer.WritePropertyName("modifiedDatetimeStart"u8); - JsonSerializer.Serialize(writer, ModifiedDatetimeStart); - } - if (Optional.IsDefined(ModifiedDatetimeEnd)) - { - writer.WritePropertyName("modifiedDatetimeEnd"u8); - JsonSerializer.Serialize(writer, ModifiedDatetimeEnd); - } - if (Optional.IsDefined(FileFilter)) - { - writer.WritePropertyName("fileFilter"u8); - JsonSerializer.Serialize(writer, FileFilter); - } - writer.WritePropertyName("type"u8); - writer.WriteStringValue(StoreReadSettingsType); - if (Optional.IsDefined(MaxConcurrentConnections)) - { - writer.WritePropertyName("maxConcurrentConnections"u8); - JsonSerializer.Serialize(writer, MaxConcurrentConnections); - } - if (Optional.IsDefined(DisableMetricsCollection)) - { - writer.WritePropertyName("disableMetricsCollection"u8); - JsonSerializer.Serialize(writer, DisableMetricsCollection); - } - foreach (var item in AdditionalProperties) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.Value.ToString()).RootElement); -#endif - } - writer.WriteEndObject(); - } - - internal static FileServerReadSettings DeserializeFileServerReadSettings(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - Optional> recursive = default; - Optional> wildcardFolderPath = default; - Optional> wildcardFileName = default; - Optional> fileListPath = default; - Optional> enablePartitionDiscovery = default; - Optional> partitionRootPath = default; - Optional> deleteFilesAfterCompletion = default; - Optional> modifiedDatetimeStart = default; - Optional> modifiedDatetimeEnd = default; - Optional> fileFilter = default; - string type = default; - Optional> maxConcurrentConnections = default; - Optional> disableMetricsCollection = default; - IDictionary> additionalProperties = default; - Dictionary> additionalPropertiesDictionary = new Dictionary>(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("recursive"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - recursive = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("wildcardFolderPath"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - wildcardFolderPath = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("wildcardFileName"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - wildcardFileName = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("fileListPath"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - fileListPath = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("enablePartitionDiscovery"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - enablePartitionDiscovery = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("partitionRootPath"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - partitionRootPath = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("deleteFilesAfterCompletion"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - deleteFilesAfterCompletion = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("modifiedDatetimeStart"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - modifiedDatetimeStart = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("modifiedDatetimeEnd"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - modifiedDatetimeEnd = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("fileFilter"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - fileFilter = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("type"u8)) - { - type = property.Value.GetString(); - continue; - } - if (property.NameEquals("maxConcurrentConnections"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - maxConcurrentConnections = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("disableMetricsCollection"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - disableMetricsCollection = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - additionalPropertiesDictionary.Add(property.Name, JsonSerializer.Deserialize>(property.Value.GetRawText())); - } - additionalProperties = additionalPropertiesDictionary; - return new FileServerReadSettings(type, maxConcurrentConnections.Value, disableMetricsCollection.Value, additionalProperties, recursive.Value, wildcardFolderPath.Value, wildcardFileName.Value, fileListPath.Value, enablePartitionDiscovery.Value, partitionRootPath.Value, deleteFilesAfterCompletion.Value, modifiedDatetimeStart.Value, modifiedDatetimeEnd.Value, fileFilter.Value); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/FileServerReadSettings.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/FileServerReadSettings.cs deleted file mode 100644 index 5b9ab001..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/FileServerReadSettings.cs +++ /dev/null @@ -1,69 +0,0 @@ -// - -#nullable disable - -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// File server read settings. - public partial class FileServerReadSettings : StoreReadSettings - { - /// Initializes a new instance of FileServerReadSettings. - public FileServerReadSettings() - { - StoreReadSettingsType = "FileServerReadSettings"; - } - - /// Initializes a new instance of FileServerReadSettings. - /// The read setting type. - /// The maximum concurrent connection count for the source data store. Type: integer (or Expression with resultType integer). - /// If true, disable data store metrics collection. Default is false. Type: boolean (or Expression with resultType boolean). - /// Additional Properties. - /// If true, files under the folder path will be read recursively. Default is true. Type: boolean (or Expression with resultType boolean). - /// FileServer wildcardFolderPath. Type: string (or Expression with resultType string). - /// FileServer wildcardFileName. Type: string (or Expression with resultType string). - /// Point to a text file that lists each file (relative path to the path configured in the dataset) that you want to copy. Type: string (or Expression with resultType string). - /// Indicates whether to enable partition discovery. Type: boolean (or Expression with resultType boolean). - /// Specify the root path where partition discovery starts from. Type: string (or Expression with resultType string). - /// Indicates whether the source files need to be deleted after copy completion. Default is false. Type: boolean (or Expression with resultType boolean). - /// The start of file's modified datetime. Type: string (or Expression with resultType string). - /// The end of file's modified datetime. Type: string (or Expression with resultType string). - /// Specify a filter to be used to select a subset of files in the folderPath rather than all files. Type: string (or Expression with resultType string). - internal FileServerReadSettings(string storeReadSettingsType, DataFactoryElement maxConcurrentConnections, DataFactoryElement disableMetricsCollection, IDictionary> additionalProperties, DataFactoryElement recursive, DataFactoryElement wildcardFolderPath, DataFactoryElement wildcardFileName, DataFactoryElement fileListPath, DataFactoryElement enablePartitionDiscovery, DataFactoryElement partitionRootPath, DataFactoryElement deleteFilesAfterCompletion, DataFactoryElement modifiedDatetimeStart, DataFactoryElement modifiedDatetimeEnd, DataFactoryElement fileFilter) : base(storeReadSettingsType, maxConcurrentConnections, disableMetricsCollection, additionalProperties) - { - Recursive = recursive; - WildcardFolderPath = wildcardFolderPath; - WildcardFileName = wildcardFileName; - FileListPath = fileListPath; - EnablePartitionDiscovery = enablePartitionDiscovery; - PartitionRootPath = partitionRootPath; - DeleteFilesAfterCompletion = deleteFilesAfterCompletion; - ModifiedDatetimeStart = modifiedDatetimeStart; - ModifiedDatetimeEnd = modifiedDatetimeEnd; - FileFilter = fileFilter; - StoreReadSettingsType = storeReadSettingsType ?? "FileServerReadSettings"; - } - - /// If true, files under the folder path will be read recursively. Default is true. Type: boolean (or Expression with resultType boolean). - public DataFactoryElement Recursive { get; set; } - /// FileServer wildcardFolderPath. Type: string (or Expression with resultType string). - public DataFactoryElement WildcardFolderPath { get; set; } - /// FileServer wildcardFileName. Type: string (or Expression with resultType string). - public DataFactoryElement WildcardFileName { get; set; } - /// Point to a text file that lists each file (relative path to the path configured in the dataset) that you want to copy. Type: string (or Expression with resultType string). - public DataFactoryElement FileListPath { get; set; } - /// Indicates whether to enable partition discovery. Type: boolean (or Expression with resultType boolean). - public DataFactoryElement EnablePartitionDiscovery { get; set; } - /// Specify the root path where partition discovery starts from. Type: string (or Expression with resultType string). - public DataFactoryElement PartitionRootPath { get; set; } - /// Indicates whether the source files need to be deleted after copy completion. Default is false. Type: boolean (or Expression with resultType boolean). - public DataFactoryElement DeleteFilesAfterCompletion { get; set; } - /// The start of file's modified datetime. Type: string (or Expression with resultType string). - public DataFactoryElement ModifiedDatetimeStart { get; set; } - /// The end of file's modified datetime. Type: string (or Expression with resultType string). - public DataFactoryElement ModifiedDatetimeEnd { get; set; } - /// Specify a filter to be used to select a subset of files in the folderPath rather than all files. Type: string (or Expression with resultType string). - public DataFactoryElement FileFilter { get; set; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/FileServerWriteSettings.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/FileServerWriteSettings.Serialization.cs deleted file mode 100644 index d24f4397..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/FileServerWriteSettings.Serialization.cs +++ /dev/null @@ -1,101 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class FileServerWriteSettings : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - writer.WritePropertyName("type"u8); - writer.WriteStringValue(StoreWriteSettingsType); - if (Optional.IsDefined(MaxConcurrentConnections)) - { - writer.WritePropertyName("maxConcurrentConnections"u8); - JsonSerializer.Serialize(writer, MaxConcurrentConnections); - } - if (Optional.IsDefined(DisableMetricsCollection)) - { - writer.WritePropertyName("disableMetricsCollection"u8); - JsonSerializer.Serialize(writer, DisableMetricsCollection); - } - if (Optional.IsDefined(CopyBehavior)) - { - writer.WritePropertyName("copyBehavior"u8); -#if NET6_0_OR_GREATER - writer.WriteRawValue(CopyBehavior); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(CopyBehavior.ToString()).RootElement); -#endif - } - foreach (var item in AdditionalProperties) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.Value.ToString()).RootElement); -#endif - } - writer.WriteEndObject(); - } - - internal static FileServerWriteSettings DeserializeFileServerWriteSettings(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - string type = default; - Optional> maxConcurrentConnections = default; - Optional> disableMetricsCollection = default; - Optional copyBehavior = default; - IDictionary> additionalProperties = default; - Dictionary> additionalPropertiesDictionary = new Dictionary>(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("type"u8)) - { - type = property.Value.GetString(); - continue; - } - if (property.NameEquals("maxConcurrentConnections"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - maxConcurrentConnections = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("disableMetricsCollection"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - disableMetricsCollection = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("copyBehavior"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - copyBehavior = BinaryData.FromString(property.Value.GetRawText()); - continue; - } - additionalPropertiesDictionary.Add(property.Name, JsonSerializer.Deserialize>(property.Value.GetRawText())); - } - additionalProperties = additionalPropertiesDictionary; - return new FileServerWriteSettings(type, maxConcurrentConnections.Value, disableMetricsCollection.Value, copyBehavior.Value, additionalProperties); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/FileServerWriteSettings.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/FileServerWriteSettings.cs deleted file mode 100644 index ccb15301..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/FileServerWriteSettings.cs +++ /dev/null @@ -1,29 +0,0 @@ -// - -#nullable disable - -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// File server write settings. - public partial class FileServerWriteSettings : StoreWriteSettings - { - /// Initializes a new instance of FileServerWriteSettings. - public FileServerWriteSettings() - { - StoreWriteSettingsType = "FileServerWriteSettings"; - } - - /// Initializes a new instance of FileServerWriteSettings. - /// The write setting type. - /// The maximum concurrent connection count for the source data store. Type: integer (or Expression with resultType integer). - /// If true, disable data store metrics collection. Default is false. Type: boolean (or Expression with resultType boolean). - /// The type of copy behavior for copy sink. - /// Additional Properties. - internal FileServerWriteSettings(string storeWriteSettingsType, DataFactoryElement maxConcurrentConnections, DataFactoryElement disableMetricsCollection, BinaryData copyBehavior, IDictionary> additionalProperties) : base(storeWriteSettingsType, maxConcurrentConnections, disableMetricsCollection, copyBehavior, additionalProperties) - { - StoreWriteSettingsType = storeWriteSettingsType ?? "FileServerWriteSettings"; - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/FileShareDataset.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/FileShareDataset.Serialization.cs deleted file mode 100644 index 11c54144..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/FileShareDataset.Serialization.cs +++ /dev/null @@ -1,302 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class FileShareDataset : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - writer.WritePropertyName("type"u8); - writer.WriteStringValue(DatasetType); - if (Optional.IsDefined(Description)) - { - writer.WritePropertyName("description"u8); - writer.WriteStringValue(Description); - } - if (Optional.IsDefined(Structure)) - { - writer.WritePropertyName("structure"u8); - JsonSerializer.Serialize(writer, Structure); - } - if (Optional.IsDefined(Schema)) - { - writer.WritePropertyName("schema"u8); - JsonSerializer.Serialize(writer, Schema); - } - writer.WritePropertyName("linkedServiceName"u8); - JsonSerializer.Serialize(writer, LinkedServiceName); if (Optional.IsCollectionDefined(Parameters)) - { - writer.WritePropertyName("parameters"u8); - writer.WriteStartObject(); - foreach (var item in Parameters) - { - writer.WritePropertyName(item.Key); - writer.WriteObjectValue(item.Value); - } - writer.WriteEndObject(); - } - if (Optional.IsCollectionDefined(Annotations)) - { - writer.WritePropertyName("annotations"u8); - writer.WriteStartArray(); - foreach (var item in Annotations) - { - if (item == null) - { - writer.WriteNullValue(); - continue; - } -#if NET6_0_OR_GREATER - writer.WriteRawValue(item); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.ToString()).RootElement); -#endif - } - writer.WriteEndArray(); - } - if (Optional.IsDefined(Folder)) - { - writer.WritePropertyName("folder"u8); - writer.WriteObjectValue(Folder); - } - writer.WritePropertyName("typeProperties"u8); - writer.WriteStartObject(); - if (Optional.IsDefined(FolderPath)) - { - writer.WritePropertyName("folderPath"u8); - JsonSerializer.Serialize(writer, FolderPath); - } - if (Optional.IsDefined(FileName)) - { - writer.WritePropertyName("fileName"u8); - JsonSerializer.Serialize(writer, FileName); - } - if (Optional.IsDefined(ModifiedDatetimeStart)) - { - writer.WritePropertyName("modifiedDatetimeStart"u8); - JsonSerializer.Serialize(writer, ModifiedDatetimeStart); - } - if (Optional.IsDefined(ModifiedDatetimeEnd)) - { - writer.WritePropertyName("modifiedDatetimeEnd"u8); - JsonSerializer.Serialize(writer, ModifiedDatetimeEnd); - } - if (Optional.IsDefined(Format)) - { - writer.WritePropertyName("format"u8); - writer.WriteObjectValue(Format); - } - if (Optional.IsDefined(FileFilter)) - { - writer.WritePropertyName("fileFilter"u8); - JsonSerializer.Serialize(writer, FileFilter); - } - if (Optional.IsDefined(Compression)) - { - writer.WritePropertyName("compression"u8); - writer.WriteObjectValue(Compression); - } - writer.WriteEndObject(); - foreach (var item in AdditionalProperties) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.Value.ToString()).RootElement); -#endif - } - writer.WriteEndObject(); - } - - internal static FileShareDataset DeserializeFileShareDataset(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - string type = default; - Optional description = default; - Optional>> structure = default; - Optional>> schema = default; - DataFactoryLinkedServiceReference linkedServiceName = default; - Optional> parameters = default; - Optional> annotations = default; - Optional folder = default; - Optional> folderPath = default; - Optional> fileName = default; - Optional> modifiedDatetimeStart = default; - Optional> modifiedDatetimeEnd = default; - Optional format = default; - Optional> fileFilter = default; - Optional compression = default; - IDictionary> additionalProperties = default; - Dictionary> additionalPropertiesDictionary = new Dictionary>(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("type"u8)) - { - type = property.Value.GetString(); - continue; - } - if (property.NameEquals("description"u8)) - { - description = property.Value.GetString(); - continue; - } - if (property.NameEquals("structure"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - structure = JsonSerializer.Deserialize>>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("schema"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - schema = JsonSerializer.Deserialize>>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("linkedServiceName"u8)) - { - linkedServiceName = JsonSerializer.Deserialize(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("parameters"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - Dictionary dictionary = new Dictionary(); - foreach (var property0 in property.Value.EnumerateObject()) - { - dictionary.Add(property0.Name, EntityParameterSpecification.DeserializeEntityParameterSpecification(property0.Value)); - } - parameters = dictionary; - continue; - } - if (property.NameEquals("annotations"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - if (item.ValueKind == JsonValueKind.Null) - { - array.Add(null); - } - else - { - array.Add(BinaryData.FromString(item.GetRawText())); - } - } - annotations = array; - continue; - } - if (property.NameEquals("folder"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - folder = DatasetFolder.DeserializeDatasetFolder(property.Value); - continue; - } - if (property.NameEquals("typeProperties"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - foreach (var property0 in property.Value.EnumerateObject()) - { - if (property0.NameEquals("folderPath"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - folderPath = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("fileName"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - fileName = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("modifiedDatetimeStart"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - modifiedDatetimeStart = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("modifiedDatetimeEnd"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - modifiedDatetimeEnd = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("format"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - format = DatasetStorageFormat.DeserializeDatasetStorageFormat(property0.Value); - continue; - } - if (property0.NameEquals("fileFilter"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - fileFilter = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("compression"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - compression = DatasetCompression.DeserializeDatasetCompression(property0.Value); - continue; - } - } - continue; - } - additionalPropertiesDictionary.Add(property.Name, JsonSerializer.Deserialize>(property.Value.GetRawText())); - } - additionalProperties = additionalPropertiesDictionary; - return new FileShareDataset(type, description.Value, structure.Value, schema.Value, linkedServiceName, Optional.ToDictionary(parameters), Optional.ToList(annotations), folder.Value, additionalProperties, folderPath.Value, fileName.Value, modifiedDatetimeStart.Value, modifiedDatetimeEnd.Value, format.Value, fileFilter.Value, compression.Value); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/FileShareDataset.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/FileShareDataset.cs deleted file mode 100644 index 3ad0fca4..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/FileShareDataset.cs +++ /dev/null @@ -1,75 +0,0 @@ -// - -#nullable disable - -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// An on-premises file system dataset. - public partial class FileShareDataset : DataFactoryDatasetProperties - { - /// Initializes a new instance of FileShareDataset. - /// Linked service reference. - /// is null. - public FileShareDataset(DataFactoryLinkedServiceReference linkedServiceName) : base(linkedServiceName) - { - Argument.AssertNotNull(linkedServiceName, nameof(linkedServiceName)); - - DatasetType = "FileShare"; - } - - /// Initializes a new instance of FileShareDataset. - /// Type of dataset. - /// Dataset description. - /// Columns that define the structure of the dataset. Type: array (or Expression with resultType array), itemType: DatasetDataElement. - /// Columns that define the physical type schema of the dataset. Type: array (or Expression with resultType array), itemType: DatasetSchemaDataElement. - /// Linked service reference. - /// Parameters for dataset. - /// List of tags that can be used for describing the Dataset. - /// The folder that this Dataset is in. If not specified, Dataset will appear at the root level. - /// Additional Properties. - /// The path of the on-premises file system. Type: string (or Expression with resultType string). - /// The name of the on-premises file system. Type: string (or Expression with resultType string). - /// The start of file's modified datetime. Type: string (or Expression with resultType string). - /// The end of file's modified datetime. Type: string (or Expression with resultType string). - /// - /// The format of the files. - /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. - /// The available derived classes include , , , and . - /// - /// Specify a filter to be used to select a subset of files in the folderPath rather than all files. Type: string (or Expression with resultType string). - /// The data compression method used for the file system. - internal FileShareDataset(string datasetType, string description, DataFactoryElement> structure, DataFactoryElement> schema, DataFactoryLinkedServiceReference linkedServiceName, IDictionary parameters, IList annotations, DatasetFolder folder, IDictionary> additionalProperties, DataFactoryElement folderPath, DataFactoryElement fileName, DataFactoryElement modifiedDatetimeStart, DataFactoryElement modifiedDatetimeEnd, DatasetStorageFormat format, DataFactoryElement fileFilter, DatasetCompression compression) : base(datasetType, description, structure, schema, linkedServiceName, parameters, annotations, folder, additionalProperties) - { - FolderPath = folderPath; - FileName = fileName; - ModifiedDatetimeStart = modifiedDatetimeStart; - ModifiedDatetimeEnd = modifiedDatetimeEnd; - Format = format; - FileFilter = fileFilter; - Compression = compression; - DatasetType = datasetType ?? "FileShare"; - } - - /// The path of the on-premises file system. Type: string (or Expression with resultType string). - public DataFactoryElement FolderPath { get; set; } - /// The name of the on-premises file system. Type: string (or Expression with resultType string). - public DataFactoryElement FileName { get; set; } - /// The start of file's modified datetime. Type: string (or Expression with resultType string). - public DataFactoryElement ModifiedDatetimeStart { get; set; } - /// The end of file's modified datetime. Type: string (or Expression with resultType string). - public DataFactoryElement ModifiedDatetimeEnd { get; set; } - /// - /// The format of the files. - /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. - /// The available derived classes include , , , and . - /// - public DatasetStorageFormat Format { get; set; } - /// Specify a filter to be used to select a subset of files in the folderPath rather than all files. Type: string (or Expression with resultType string). - public DataFactoryElement FileFilter { get; set; } - /// The data compression method used for the file system. - public DatasetCompression Compression { get; set; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/FileSystemSink.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/FileSystemSink.Serialization.cs deleted file mode 100644 index 7054cc27..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/FileSystemSink.Serialization.cs +++ /dev/null @@ -1,161 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class FileSystemSink : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - if (Optional.IsDefined(CopyBehavior)) - { - writer.WritePropertyName("copyBehavior"u8); -#if NET6_0_OR_GREATER - writer.WriteRawValue(CopyBehavior); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(CopyBehavior.ToString()).RootElement); -#endif - } - writer.WritePropertyName("type"u8); - writer.WriteStringValue(CopySinkType); - if (Optional.IsDefined(WriteBatchSize)) - { - writer.WritePropertyName("writeBatchSize"u8); - JsonSerializer.Serialize(writer, WriteBatchSize); - } - if (Optional.IsDefined(WriteBatchTimeout)) - { - writer.WritePropertyName("writeBatchTimeout"u8); - JsonSerializer.Serialize(writer, WriteBatchTimeout); - } - if (Optional.IsDefined(SinkRetryCount)) - { - writer.WritePropertyName("sinkRetryCount"u8); - JsonSerializer.Serialize(writer, SinkRetryCount); - } - if (Optional.IsDefined(SinkRetryWait)) - { - writer.WritePropertyName("sinkRetryWait"u8); - JsonSerializer.Serialize(writer, SinkRetryWait); - } - if (Optional.IsDefined(MaxConcurrentConnections)) - { - writer.WritePropertyName("maxConcurrentConnections"u8); - JsonSerializer.Serialize(writer, MaxConcurrentConnections); - } - if (Optional.IsDefined(DisableMetricsCollection)) - { - writer.WritePropertyName("disableMetricsCollection"u8); - JsonSerializer.Serialize(writer, DisableMetricsCollection); - } - foreach (var item in AdditionalProperties) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.Value.ToString()).RootElement); -#endif - } - writer.WriteEndObject(); - } - - internal static FileSystemSink DeserializeFileSystemSink(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - Optional copyBehavior = default; - string type = default; - Optional> writeBatchSize = default; - Optional> writeBatchTimeout = default; - Optional> sinkRetryCount = default; - Optional> sinkRetryWait = default; - Optional> maxConcurrentConnections = default; - Optional> disableMetricsCollection = default; - IDictionary> additionalProperties = default; - Dictionary> additionalPropertiesDictionary = new Dictionary>(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("copyBehavior"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - copyBehavior = BinaryData.FromString(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("type"u8)) - { - type = property.Value.GetString(); - continue; - } - if (property.NameEquals("writeBatchSize"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - writeBatchSize = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("writeBatchTimeout"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - writeBatchTimeout = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("sinkRetryCount"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - sinkRetryCount = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("sinkRetryWait"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - sinkRetryWait = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("maxConcurrentConnections"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - maxConcurrentConnections = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("disableMetricsCollection"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - disableMetricsCollection = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - additionalPropertiesDictionary.Add(property.Name, JsonSerializer.Deserialize>(property.Value.GetRawText())); - } - additionalProperties = additionalPropertiesDictionary; - return new FileSystemSink(type, writeBatchSize.Value, writeBatchTimeout.Value, sinkRetryCount.Value, sinkRetryWait.Value, maxConcurrentConnections.Value, disableMetricsCollection.Value, additionalProperties, copyBehavior.Value); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/FileSystemSink.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/FileSystemSink.cs deleted file mode 100644 index 46197320..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/FileSystemSink.cs +++ /dev/null @@ -1,66 +0,0 @@ -// - -#nullable disable - -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// A copy activity file system sink. - public partial class FileSystemSink : CopySink - { - /// Initializes a new instance of FileSystemSink. - public FileSystemSink() - { - CopySinkType = "FileSystemSink"; - } - - /// Initializes a new instance of FileSystemSink. - /// Copy sink type. - /// Write batch size. Type: integer (or Expression with resultType integer), minimum: 0. - /// Write batch timeout. Type: string (or Expression with resultType string), pattern: ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). - /// Sink retry count. Type: integer (or Expression with resultType integer). - /// Sink retry wait. Type: string (or Expression with resultType string), pattern: ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). - /// The maximum concurrent connection count for the sink data store. Type: integer (or Expression with resultType integer). - /// If true, disable data store metrics collection. Default is false. Type: boolean (or Expression with resultType boolean). - /// Additional Properties. - /// The type of copy behavior for copy sink. - internal FileSystemSink(string copySinkType, DataFactoryElement writeBatchSize, DataFactoryElement writeBatchTimeout, DataFactoryElement sinkRetryCount, DataFactoryElement sinkRetryWait, DataFactoryElement maxConcurrentConnections, DataFactoryElement disableMetricsCollection, IDictionary> additionalProperties, BinaryData copyBehavior) : base(copySinkType, writeBatchSize, writeBatchTimeout, sinkRetryCount, sinkRetryWait, maxConcurrentConnections, disableMetricsCollection, additionalProperties) - { - CopyBehavior = copyBehavior; - CopySinkType = copySinkType ?? "FileSystemSink"; - } - - /// - /// The type of copy behavior for copy sink. - /// - /// To assign an object to this property use . - /// - /// - /// To assign an already formated json string to this property use . - /// - /// - /// Examples: - /// - /// - /// BinaryData.FromObjectAsJson("foo") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromString("\"foo\"") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromObjectAsJson(new { key = "value" }) - /// Creates a payload of { "key": "value" }. - /// - /// - /// BinaryData.FromString("{\"key\": \"value\"}") - /// Creates a payload of { "key": "value" }. - /// - /// - /// - /// - public BinaryData CopyBehavior { get; set; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/FileSystemSource.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/FileSystemSource.Serialization.cs deleted file mode 100644 index 5083362d..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/FileSystemSource.Serialization.cs +++ /dev/null @@ -1,146 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class FileSystemSource : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - if (Optional.IsDefined(Recursive)) - { - writer.WritePropertyName("recursive"u8); - JsonSerializer.Serialize(writer, Recursive); - } - if (Optional.IsDefined(AdditionalColumns)) - { - writer.WritePropertyName("additionalColumns"u8); -#if NET6_0_OR_GREATER - writer.WriteRawValue(AdditionalColumns); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(AdditionalColumns.ToString()).RootElement); -#endif - } - writer.WritePropertyName("type"u8); - writer.WriteStringValue(CopySourceType); - if (Optional.IsDefined(SourceRetryCount)) - { - writer.WritePropertyName("sourceRetryCount"u8); - JsonSerializer.Serialize(writer, SourceRetryCount); - } - if (Optional.IsDefined(SourceRetryWait)) - { - writer.WritePropertyName("sourceRetryWait"u8); - JsonSerializer.Serialize(writer, SourceRetryWait); - } - if (Optional.IsDefined(MaxConcurrentConnections)) - { - writer.WritePropertyName("maxConcurrentConnections"u8); - JsonSerializer.Serialize(writer, MaxConcurrentConnections); - } - if (Optional.IsDefined(DisableMetricsCollection)) - { - writer.WritePropertyName("disableMetricsCollection"u8); - JsonSerializer.Serialize(writer, DisableMetricsCollection); - } - foreach (var item in AdditionalProperties) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.Value.ToString()).RootElement); -#endif - } - writer.WriteEndObject(); - } - - internal static FileSystemSource DeserializeFileSystemSource(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - Optional> recursive = default; - Optional additionalColumns = default; - string type = default; - Optional> sourceRetryCount = default; - Optional> sourceRetryWait = default; - Optional> maxConcurrentConnections = default; - Optional> disableMetricsCollection = default; - IDictionary> additionalProperties = default; - Dictionary> additionalPropertiesDictionary = new Dictionary>(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("recursive"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - recursive = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("additionalColumns"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - additionalColumns = BinaryData.FromString(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("type"u8)) - { - type = property.Value.GetString(); - continue; - } - if (property.NameEquals("sourceRetryCount"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - sourceRetryCount = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("sourceRetryWait"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - sourceRetryWait = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("maxConcurrentConnections"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - maxConcurrentConnections = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("disableMetricsCollection"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - disableMetricsCollection = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - additionalPropertiesDictionary.Add(property.Name, JsonSerializer.Deserialize>(property.Value.GetRawText())); - } - additionalProperties = additionalPropertiesDictionary; - return new FileSystemSource(type, sourceRetryCount.Value, sourceRetryWait.Value, maxConcurrentConnections.Value, disableMetricsCollection.Value, additionalProperties, recursive.Value, additionalColumns.Value); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/FileSystemSource.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/FileSystemSource.cs deleted file mode 100644 index 6c0179df..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/FileSystemSource.cs +++ /dev/null @@ -1,68 +0,0 @@ -// - -#nullable disable - -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// A copy activity file system source. - public partial class FileSystemSource : CopyActivitySource - { - /// Initializes a new instance of FileSystemSource. - public FileSystemSource() - { - CopySourceType = "FileSystemSource"; - } - - /// Initializes a new instance of FileSystemSource. - /// Copy source type. - /// Source retry count. Type: integer (or Expression with resultType integer). - /// Source retry wait. Type: string (or Expression with resultType string), pattern: ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). - /// The maximum concurrent connection count for the source data store. Type: integer (or Expression with resultType integer). - /// If true, disable data store metrics collection. Default is false. Type: boolean (or Expression with resultType boolean). - /// Additional Properties. - /// If true, files under the folder path will be read recursively. Default is true. Type: boolean (or Expression with resultType boolean). - /// Specifies the additional columns to be added to source data. Type: array of objects(AdditionalColumns) (or Expression with resultType array of objects). - internal FileSystemSource(string copySourceType, DataFactoryElement sourceRetryCount, DataFactoryElement sourceRetryWait, DataFactoryElement maxConcurrentConnections, DataFactoryElement disableMetricsCollection, IDictionary> additionalProperties, DataFactoryElement recursive, BinaryData additionalColumns) : base(copySourceType, sourceRetryCount, sourceRetryWait, maxConcurrentConnections, disableMetricsCollection, additionalProperties) - { - Recursive = recursive; - AdditionalColumns = additionalColumns; - CopySourceType = copySourceType ?? "FileSystemSource"; - } - - /// If true, files under the folder path will be read recursively. Default is true. Type: boolean (or Expression with resultType boolean). - public DataFactoryElement Recursive { get; set; } - /// - /// Specifies the additional columns to be added to source data. Type: array of objects(AdditionalColumns) (or Expression with resultType array of objects). - /// - /// To assign an object to this property use . - /// - /// - /// To assign an already formated json string to this property use . - /// - /// - /// Examples: - /// - /// - /// BinaryData.FromObjectAsJson("foo") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromString("\"foo\"") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromObjectAsJson(new { key = "value" }) - /// Creates a payload of { "key": "value" }. - /// - /// - /// BinaryData.FromString("{\"key\": \"value\"}") - /// Creates a payload of { "key": "value" }. - /// - /// - /// - /// - public BinaryData AdditionalColumns { get; set; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/FilterActivity.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/FilterActivity.Serialization.cs deleted file mode 100644 index ec6710a5..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/FilterActivity.Serialization.cs +++ /dev/null @@ -1,182 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class FilterActivity : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ActivityType); - if (Optional.IsDefined(Description)) - { - writer.WritePropertyName("description"u8); - writer.WriteStringValue(Description); - } - if (Optional.IsDefined(State)) - { - writer.WritePropertyName("state"u8); - writer.WriteStringValue(State.Value.ToString()); - } - if (Optional.IsDefined(OnInactiveMarkAs)) - { - writer.WritePropertyName("onInactiveMarkAs"u8); - writer.WriteStringValue(OnInactiveMarkAs.Value.ToString()); - } - if (Optional.IsCollectionDefined(DependsOn)) - { - writer.WritePropertyName("dependsOn"u8); - writer.WriteStartArray(); - foreach (var item in DependsOn) - { - writer.WriteObjectValue(item); - } - writer.WriteEndArray(); - } - if (Optional.IsCollectionDefined(UserProperties)) - { - writer.WritePropertyName("userProperties"u8); - writer.WriteStartArray(); - foreach (var item in UserProperties) - { - writer.WriteObjectValue(item); - } - writer.WriteEndArray(); - } - writer.WritePropertyName("typeProperties"u8); - writer.WriteStartObject(); - writer.WritePropertyName("items"u8); - writer.WriteObjectValue(Items); - writer.WritePropertyName("condition"u8); - writer.WriteObjectValue(Condition); - writer.WriteEndObject(); - foreach (var item in AdditionalProperties) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.Value.ToString()).RootElement); -#endif - } - writer.WriteEndObject(); - } - - internal static FilterActivity DeserializeFilterActivity(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - string name = default; - string type = default; - Optional description = default; - Optional state = default; - Optional onInactiveMarkAs = default; - Optional> dependsOn = default; - Optional> userProperties = default; - DataFactoryExpression items = default; - DataFactoryExpression condition = default; - IDictionary> additionalProperties = default; - Dictionary> additionalPropertiesDictionary = new Dictionary>(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("name"u8)) - { - name = property.Value.GetString(); - continue; - } - if (property.NameEquals("type"u8)) - { - type = property.Value.GetString(); - continue; - } - if (property.NameEquals("description"u8)) - { - description = property.Value.GetString(); - continue; - } - if (property.NameEquals("state"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - state = new PipelineActivityState(property.Value.GetString()); - continue; - } - if (property.NameEquals("onInactiveMarkAs"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - onInactiveMarkAs = new ActivityOnInactiveMarkAs(property.Value.GetString()); - continue; - } - if (property.NameEquals("dependsOn"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - array.Add(PipelineActivityDependency.DeserializePipelineActivityDependency(item)); - } - dependsOn = array; - continue; - } - if (property.NameEquals("userProperties"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - array.Add(PipelineActivityUserProperty.DeserializePipelineActivityUserProperty(item)); - } - userProperties = array; - continue; - } - if (property.NameEquals("typeProperties"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - foreach (var property0 in property.Value.EnumerateObject()) - { - if (property0.NameEquals("items"u8)) - { - items = DataFactoryExpression.DeserializeDataFactoryExpression(property0.Value); - continue; - } - if (property0.NameEquals("condition"u8)) - { - condition = DataFactoryExpression.DeserializeDataFactoryExpression(property0.Value); - continue; - } - } - continue; - } - additionalPropertiesDictionary.Add(property.Name, JsonSerializer.Deserialize>(property.Value.GetRawText())); - } - additionalProperties = additionalPropertiesDictionary; - return new FilterActivity(name, type, description.Value, Optional.ToNullable(state), Optional.ToNullable(onInactiveMarkAs), Optional.ToList(dependsOn), Optional.ToList(userProperties), additionalProperties, items, condition); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/FilterActivity.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/FilterActivity.cs deleted file mode 100644 index 1c06c3bb..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/FilterActivity.cs +++ /dev/null @@ -1,52 +0,0 @@ -// - -#nullable disable - -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// Filter and return results from input array based on the conditions. - public partial class FilterActivity : ControlActivity - { - /// Initializes a new instance of FilterActivity. - /// Activity name. - /// Input array on which filter should be applied. - /// Condition to be used for filtering the input. - /// , or is null. - public FilterActivity(string name, DataFactoryExpression items, DataFactoryExpression condition) : base(name) - { - Argument.AssertNotNull(name, nameof(name)); - Argument.AssertNotNull(items, nameof(items)); - Argument.AssertNotNull(condition, nameof(condition)); - - Items = items; - Condition = condition; - ActivityType = "Filter"; - } - - /// Initializes a new instance of FilterActivity. - /// Activity name. - /// Type of activity. - /// Activity description. - /// Activity state. This is an optional property and if not provided, the state will be Active by default. - /// 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. - /// Activity depends on condition. - /// Activity user properties. - /// Additional Properties. - /// Input array on which filter should be applied. - /// Condition to be used for filtering the input. - internal FilterActivity(string name, string activityType, string description, PipelineActivityState? state, ActivityOnInactiveMarkAs? onInactiveMarkAs, IList dependsOn, IList userProperties, IDictionary> additionalProperties, DataFactoryExpression items, DataFactoryExpression condition) : base(name, activityType, description, state, onInactiveMarkAs, dependsOn, userProperties, additionalProperties) - { - Items = items; - Condition = condition; - ActivityType = activityType ?? "Filter"; - } - - /// Input array on which filter should be applied. - public DataFactoryExpression Items { get; set; } - /// Condition to be used for filtering the input. - public DataFactoryExpression Condition { get; set; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/ForEachActivity.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/ForEachActivity.Serialization.cs deleted file mode 100644 index 049316db..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/ForEachActivity.Serialization.cs +++ /dev/null @@ -1,222 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class ForEachActivity : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ActivityType); - if (Optional.IsDefined(Description)) - { - writer.WritePropertyName("description"u8); - writer.WriteStringValue(Description); - } - if (Optional.IsDefined(State)) - { - writer.WritePropertyName("state"u8); - writer.WriteStringValue(State.Value.ToString()); - } - if (Optional.IsDefined(OnInactiveMarkAs)) - { - writer.WritePropertyName("onInactiveMarkAs"u8); - writer.WriteStringValue(OnInactiveMarkAs.Value.ToString()); - } - if (Optional.IsCollectionDefined(DependsOn)) - { - writer.WritePropertyName("dependsOn"u8); - writer.WriteStartArray(); - foreach (var item in DependsOn) - { - writer.WriteObjectValue(item); - } - writer.WriteEndArray(); - } - if (Optional.IsCollectionDefined(UserProperties)) - { - writer.WritePropertyName("userProperties"u8); - writer.WriteStartArray(); - foreach (var item in UserProperties) - { - writer.WriteObjectValue(item); - } - writer.WriteEndArray(); - } - writer.WritePropertyName("typeProperties"u8); - writer.WriteStartObject(); - if (Optional.IsDefined(IsSequential)) - { - writer.WritePropertyName("isSequential"u8); - writer.WriteBooleanValue(IsSequential.Value); - } - if (Optional.IsDefined(BatchCount)) - { - writer.WritePropertyName("batchCount"u8); - writer.WriteNumberValue(BatchCount.Value); - } - writer.WritePropertyName("items"u8); - writer.WriteObjectValue(Items); - writer.WritePropertyName("activities"u8); - writer.WriteStartArray(); - foreach (var item in Activities) - { - writer.WriteObjectValue(item); - } - writer.WriteEndArray(); - writer.WriteEndObject(); - foreach (var item in AdditionalProperties) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.Value.ToString()).RootElement); -#endif - } - writer.WriteEndObject(); - } - - internal static ForEachActivity DeserializeForEachActivity(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - string name = default; - string type = default; - Optional description = default; - Optional state = default; - Optional onInactiveMarkAs = default; - Optional> dependsOn = default; - Optional> userProperties = default; - Optional isSequential = default; - Optional batchCount = default; - DataFactoryExpression items = default; - IList activities = default; - IDictionary> additionalProperties = default; - Dictionary> additionalPropertiesDictionary = new Dictionary>(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("name"u8)) - { - name = property.Value.GetString(); - continue; - } - if (property.NameEquals("type"u8)) - { - type = property.Value.GetString(); - continue; - } - if (property.NameEquals("description"u8)) - { - description = property.Value.GetString(); - continue; - } - if (property.NameEquals("state"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - state = new PipelineActivityState(property.Value.GetString()); - continue; - } - if (property.NameEquals("onInactiveMarkAs"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - onInactiveMarkAs = new ActivityOnInactiveMarkAs(property.Value.GetString()); - continue; - } - if (property.NameEquals("dependsOn"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - array.Add(PipelineActivityDependency.DeserializePipelineActivityDependency(item)); - } - dependsOn = array; - continue; - } - if (property.NameEquals("userProperties"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - array.Add(PipelineActivityUserProperty.DeserializePipelineActivityUserProperty(item)); - } - userProperties = array; - continue; - } - if (property.NameEquals("typeProperties"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - foreach (var property0 in property.Value.EnumerateObject()) - { - if (property0.NameEquals("isSequential"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - isSequential = property0.Value.GetBoolean(); - continue; - } - if (property0.NameEquals("batchCount"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - batchCount = property0.Value.GetInt32(); - continue; - } - if (property0.NameEquals("items"u8)) - { - items = DataFactoryExpression.DeserializeDataFactoryExpression(property0.Value); - continue; - } - if (property0.NameEquals("activities"u8)) - { - List array = new List(); - foreach (var item in property0.Value.EnumerateArray()) - { - array.Add(DeserializePipelineActivity(item)); - } - activities = array; - continue; - } - } - continue; - } - additionalPropertiesDictionary.Add(property.Name, JsonSerializer.Deserialize>(property.Value.GetRawText())); - } - additionalProperties = additionalPropertiesDictionary; - return new ForEachActivity(name, type, description.Value, Optional.ToNullable(state), Optional.ToNullable(onInactiveMarkAs), Optional.ToList(dependsOn), Optional.ToList(userProperties), additionalProperties, Optional.ToNullable(isSequential), Optional.ToNullable(batchCount), items, activities); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/ForEachActivity.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/ForEachActivity.cs deleted file mode 100644 index 7d3d081d..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/ForEachActivity.cs +++ /dev/null @@ -1,72 +0,0 @@ -// - -#nullable disable - -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// This activity is used for iterating over a collection and execute given activities. - public partial class ForEachActivity : ControlActivity - { - /// Initializes a new instance of ForEachActivity. - /// Activity name. - /// Collection to iterate. - /// - /// List of activities to execute . - /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. - /// The available derived classes include , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , and . - /// - /// , or is null. - public ForEachActivity(string name, DataFactoryExpression items, IEnumerable activities) : base(name) - { - Argument.AssertNotNull(name, nameof(name)); - Argument.AssertNotNull(items, nameof(items)); - Argument.AssertNotNull(activities, nameof(activities)); - - Items = items; - Activities = activities.ToList(); - ActivityType = "ForEach"; - } - - /// Initializes a new instance of ForEachActivity. - /// Activity name. - /// Type of activity. - /// Activity description. - /// Activity state. This is an optional property and if not provided, the state will be Active by default. - /// 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. - /// Activity depends on condition. - /// Activity user properties. - /// Additional Properties. - /// Should the loop be executed in sequence or in parallel (max 50). - /// Batch count to be used for controlling the number of parallel execution (when isSequential is set to false). - /// Collection to iterate. - /// - /// List of activities to execute . - /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. - /// The available derived classes include , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , and . - /// - internal ForEachActivity(string name, string activityType, string description, PipelineActivityState? state, ActivityOnInactiveMarkAs? onInactiveMarkAs, IList dependsOn, IList userProperties, IDictionary> additionalProperties, bool? isSequential, int? batchCount, DataFactoryExpression items, IList activities) : base(name, activityType, description, state, onInactiveMarkAs, dependsOn, userProperties, additionalProperties) - { - IsSequential = isSequential; - BatchCount = batchCount; - Items = items; - Activities = activities; - ActivityType = activityType ?? "ForEach"; - } - - /// Should the loop be executed in sequence or in parallel (max 50). - public bool? IsSequential { get; set; } - /// Batch count to be used for controlling the number of parallel execution (when isSequential is set to false). - public int? BatchCount { get; set; } - /// Collection to iterate. - public DataFactoryExpression Items { get; set; } - /// - /// List of activities to execute . - /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. - /// The available derived classes include , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , and . - /// - public IList Activities { get; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/FormatReadSettings.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/FormatReadSettings.Serialization.cs deleted file mode 100644 index 3e748b9a..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/FormatReadSettings.Serialization.cs +++ /dev/null @@ -1,48 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class FormatReadSettings : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - writer.WritePropertyName("type"u8); - writer.WriteStringValue(FormatReadSettingsType); - foreach (var item in AdditionalProperties) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.Value.ToString()).RootElement); -#endif - } - writer.WriteEndObject(); - } - - internal static FormatReadSettings DeserializeFormatReadSettings(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - if (element.TryGetProperty("type", out JsonElement discriminator)) - { - switch (discriminator.GetString()) - { - case "BinaryReadSettings": return BinaryReadSettings.DeserializeBinaryReadSettings(element); - case "JsonReadSettings": return JsonReadSettings.DeserializeJsonReadSettings(element); - case "XmlReadSettings": return XmlReadSettings.DeserializeXmlReadSettings(element); - case "DelimitedTextReadSettings": return DelimitedTextReadSettings.DeserializeDelimitedTextReadSettings(element); - } - } - return UnknownFormatReadSettings.DeserializeUnknownFormatReadSettings(element); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/FormatReadSettings.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/FormatReadSettings.cs deleted file mode 100644 index b8b8e202..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/FormatReadSettings.cs +++ /dev/null @@ -1,66 +0,0 @@ -// - -#nullable disable - -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// - /// Format read settings. - /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. - /// The available derived classes include , , and . - /// - public partial class FormatReadSettings - { - /// Initializes a new instance of FormatReadSettings. - public FormatReadSettings() - { - AdditionalProperties = new ChangeTrackingDictionary>(); - } - - /// Initializes a new instance of FormatReadSettings. - /// The read setting type. - /// Additional Properties. - internal FormatReadSettings(string formatReadSettingsType, IDictionary> additionalProperties) - { - FormatReadSettingsType = formatReadSettingsType; - AdditionalProperties = additionalProperties; - } - - /// The read setting type. - internal string FormatReadSettingsType { get; set; } - /// - /// Additional Properties - /// - /// To assign an object to the value of this property use . - /// - /// - /// To assign an already formated json string to this property use . - /// - /// - /// Examples: - /// - /// - /// BinaryData.FromObjectAsJson("foo") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromString("\"foo\"") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromObjectAsJson(new { key = "value" }) - /// Creates a payload of { "key": "value" }. - /// - /// - /// BinaryData.FromString("{\"key\": \"value\"}") - /// Creates a payload of { "key": "value" }. - /// - /// - /// - /// - public IDictionary> AdditionalProperties { get; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/FormatWriteSettings.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/FormatWriteSettings.Serialization.cs deleted file mode 100644 index 904d00eb..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/FormatWriteSettings.Serialization.cs +++ /dev/null @@ -1,49 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class FormatWriteSettings : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - writer.WritePropertyName("type"u8); - writer.WriteStringValue(FormatWriteSettingsType); - foreach (var item in AdditionalProperties) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.Value.ToString()).RootElement); -#endif - } - writer.WriteEndObject(); - } - - internal static FormatWriteSettings DeserializeFormatWriteSettings(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - if (element.TryGetProperty("type", out JsonElement discriminator)) - { - switch (discriminator.GetString()) - { - case "AvroWriteSettings": return AvroWriteSettings.DeserializeAvroWriteSettings(element); - case "JsonWriteSettings": return JsonWriteSettings.DeserializeJsonWriteSettings(element); - case "OrcWriteSettings": return OrcWriteSettings.DeserializeOrcWriteSettings(element); - case "ParquetWriteSettings": return ParquetWriteSettings.DeserializeParquetWriteSettings(element); - case "DelimitedTextWriteSettings": return DelimitedTextWriteSettings.DeserializeDelimitedTextWriteSettings(element); - } - } - return UnknownFormatWriteSettings.DeserializeUnknownFormatWriteSettings(element); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/FormatWriteSettings.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/FormatWriteSettings.cs deleted file mode 100644 index 98fc4e1b..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/FormatWriteSettings.cs +++ /dev/null @@ -1,66 +0,0 @@ -// - -#nullable disable - -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// - /// Format write settings. - /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. - /// The available derived classes include , , , and . - /// - public partial class FormatWriteSettings - { - /// Initializes a new instance of FormatWriteSettings. - public FormatWriteSettings() - { - AdditionalProperties = new ChangeTrackingDictionary>(); - } - - /// Initializes a new instance of FormatWriteSettings. - /// The write setting type. - /// Additional Properties. - internal FormatWriteSettings(string formatWriteSettingsType, IDictionary> additionalProperties) - { - FormatWriteSettingsType = formatWriteSettingsType; - AdditionalProperties = additionalProperties; - } - - /// The write setting type. - internal string FormatWriteSettingsType { get; set; } - /// - /// Additional Properties - /// - /// To assign an object to the value of this property use . - /// - /// - /// To assign an already formated json string to this property use . - /// - /// - /// Examples: - /// - /// - /// BinaryData.FromObjectAsJson("foo") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromString("\"foo\"") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromObjectAsJson(new { key = "value" }) - /// Creates a payload of { "key": "value" }. - /// - /// - /// BinaryData.FromString("{\"key\": \"value\"}") - /// Creates a payload of { "key": "value" }. - /// - /// - /// - /// - public IDictionary> AdditionalProperties { get; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/FtpAuthenticationType.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/FtpAuthenticationType.cs deleted file mode 100644 index 8bb1da62..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/FtpAuthenticationType.cs +++ /dev/null @@ -1,47 +0,0 @@ -// - -#nullable disable - -using System.ComponentModel; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// The authentication type to be used to connect to the FTP server. - public readonly partial struct FtpAuthenticationType : IEquatable - { - private readonly string _value; - - /// Initializes a new instance of . - /// is null. - public FtpAuthenticationType(string value) - { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } - - private const string BasicValue = "Basic"; - private const string AnonymousValue = "Anonymous"; - - /// Basic. - public static FtpAuthenticationType Basic { get; } = new FtpAuthenticationType(BasicValue); - /// Anonymous. - public static FtpAuthenticationType Anonymous { get; } = new FtpAuthenticationType(AnonymousValue); - /// Determines if two values are the same. - public static bool operator ==(FtpAuthenticationType left, FtpAuthenticationType right) => left.Equals(right); - /// Determines if two values are not the same. - public static bool operator !=(FtpAuthenticationType left, FtpAuthenticationType right) => !left.Equals(right); - /// Converts a string to a . - public static implicit operator FtpAuthenticationType(string value) => new FtpAuthenticationType(value); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override bool Equals(object obj) => obj is FtpAuthenticationType other && Equals(other); - /// - public bool Equals(FtpAuthenticationType other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override int GetHashCode() => _value?.GetHashCode() ?? 0; - /// - public override string ToString() => _value; - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/FtpReadSettings.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/FtpReadSettings.Serialization.cs deleted file mode 100644 index 4f005a24..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/FtpReadSettings.Serialization.cs +++ /dev/null @@ -1,217 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class FtpReadSettings : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - if (Optional.IsDefined(Recursive)) - { - writer.WritePropertyName("recursive"u8); - JsonSerializer.Serialize(writer, Recursive); - } - if (Optional.IsDefined(WildcardFolderPath)) - { - writer.WritePropertyName("wildcardFolderPath"u8); - JsonSerializer.Serialize(writer, WildcardFolderPath); - } - if (Optional.IsDefined(WildcardFileName)) - { - writer.WritePropertyName("wildcardFileName"u8); - JsonSerializer.Serialize(writer, WildcardFileName); - } - if (Optional.IsDefined(EnablePartitionDiscovery)) - { - writer.WritePropertyName("enablePartitionDiscovery"u8); - JsonSerializer.Serialize(writer, EnablePartitionDiscovery); - } - if (Optional.IsDefined(PartitionRootPath)) - { - writer.WritePropertyName("partitionRootPath"u8); - JsonSerializer.Serialize(writer, PartitionRootPath); - } - if (Optional.IsDefined(DeleteFilesAfterCompletion)) - { - writer.WritePropertyName("deleteFilesAfterCompletion"u8); - JsonSerializer.Serialize(writer, DeleteFilesAfterCompletion); - } - if (Optional.IsDefined(FileListPath)) - { - writer.WritePropertyName("fileListPath"u8); - JsonSerializer.Serialize(writer, FileListPath); - } - if (Optional.IsDefined(UseBinaryTransfer)) - { - writer.WritePropertyName("useBinaryTransfer"u8); - JsonSerializer.Serialize(writer, UseBinaryTransfer); - } - if (Optional.IsDefined(DisableChunking)) - { - writer.WritePropertyName("disableChunking"u8); - JsonSerializer.Serialize(writer, DisableChunking); - } - writer.WritePropertyName("type"u8); - writer.WriteStringValue(StoreReadSettingsType); - if (Optional.IsDefined(MaxConcurrentConnections)) - { - writer.WritePropertyName("maxConcurrentConnections"u8); - JsonSerializer.Serialize(writer, MaxConcurrentConnections); - } - if (Optional.IsDefined(DisableMetricsCollection)) - { - writer.WritePropertyName("disableMetricsCollection"u8); - JsonSerializer.Serialize(writer, DisableMetricsCollection); - } - foreach (var item in AdditionalProperties) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.Value.ToString()).RootElement); -#endif - } - writer.WriteEndObject(); - } - - internal static FtpReadSettings DeserializeFtpReadSettings(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - Optional> recursive = default; - Optional> wildcardFolderPath = default; - Optional> wildcardFileName = default; - Optional> enablePartitionDiscovery = default; - Optional> partitionRootPath = default; - Optional> deleteFilesAfterCompletion = default; - Optional> fileListPath = default; - Optional> useBinaryTransfer = default; - Optional> disableChunking = default; - string type = default; - Optional> maxConcurrentConnections = default; - Optional> disableMetricsCollection = default; - IDictionary> additionalProperties = default; - Dictionary> additionalPropertiesDictionary = new Dictionary>(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("recursive"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - recursive = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("wildcardFolderPath"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - wildcardFolderPath = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("wildcardFileName"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - wildcardFileName = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("enablePartitionDiscovery"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - enablePartitionDiscovery = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("partitionRootPath"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - partitionRootPath = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("deleteFilesAfterCompletion"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - deleteFilesAfterCompletion = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("fileListPath"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - fileListPath = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("useBinaryTransfer"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - useBinaryTransfer = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("disableChunking"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - disableChunking = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("type"u8)) - { - type = property.Value.GetString(); - continue; - } - if (property.NameEquals("maxConcurrentConnections"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - maxConcurrentConnections = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("disableMetricsCollection"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - disableMetricsCollection = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - additionalPropertiesDictionary.Add(property.Name, JsonSerializer.Deserialize>(property.Value.GetRawText())); - } - additionalProperties = additionalPropertiesDictionary; - return new FtpReadSettings(type, maxConcurrentConnections.Value, disableMetricsCollection.Value, additionalProperties, recursive.Value, wildcardFolderPath.Value, wildcardFileName.Value, enablePartitionDiscovery.Value, partitionRootPath.Value, deleteFilesAfterCompletion.Value, fileListPath.Value, useBinaryTransfer.Value, disableChunking.Value); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/FtpReadSettings.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/FtpReadSettings.cs deleted file mode 100644 index 35f3fd07..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/FtpReadSettings.cs +++ /dev/null @@ -1,65 +0,0 @@ -// - -#nullable disable - -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// Ftp read settings. - public partial class FtpReadSettings : StoreReadSettings - { - /// Initializes a new instance of FtpReadSettings. - public FtpReadSettings() - { - StoreReadSettingsType = "FtpReadSettings"; - } - - /// Initializes a new instance of FtpReadSettings. - /// The read setting type. - /// The maximum concurrent connection count for the source data store. Type: integer (or Expression with resultType integer). - /// If true, disable data store metrics collection. Default is false. Type: boolean (or Expression with resultType boolean). - /// Additional Properties. - /// If true, files under the folder path will be read recursively. Default is true. Type: boolean (or Expression with resultType boolean). - /// Ftp wildcardFolderPath. Type: string (or Expression with resultType string). - /// Ftp wildcardFileName. Type: string (or Expression with resultType string). - /// Indicates whether to enable partition discovery. Type: boolean (or Expression with resultType boolean). - /// Specify the root path where partition discovery starts from. Type: string (or Expression with resultType string). - /// Indicates whether the source files need to be deleted after copy completion. Default is false. Type: boolean (or Expression with resultType boolean). - /// Point to a text file that lists each file (relative path to the path configured in the dataset) that you want to copy. Type: string (or Expression with resultType string). - /// Specify whether to use binary transfer mode for FTP stores. Type: boolean (or Expression with resultType boolean). - /// If true, disable parallel reading within each file. Default is false. Type: boolean (or Expression with resultType boolean). - internal FtpReadSettings(string storeReadSettingsType, DataFactoryElement maxConcurrentConnections, DataFactoryElement disableMetricsCollection, IDictionary> additionalProperties, DataFactoryElement recursive, DataFactoryElement wildcardFolderPath, DataFactoryElement wildcardFileName, DataFactoryElement enablePartitionDiscovery, DataFactoryElement partitionRootPath, DataFactoryElement deleteFilesAfterCompletion, DataFactoryElement fileListPath, DataFactoryElement useBinaryTransfer, DataFactoryElement disableChunking) : base(storeReadSettingsType, maxConcurrentConnections, disableMetricsCollection, additionalProperties) - { - Recursive = recursive; - WildcardFolderPath = wildcardFolderPath; - WildcardFileName = wildcardFileName; - EnablePartitionDiscovery = enablePartitionDiscovery; - PartitionRootPath = partitionRootPath; - DeleteFilesAfterCompletion = deleteFilesAfterCompletion; - FileListPath = fileListPath; - UseBinaryTransfer = useBinaryTransfer; - DisableChunking = disableChunking; - StoreReadSettingsType = storeReadSettingsType ?? "FtpReadSettings"; - } - - /// If true, files under the folder path will be read recursively. Default is true. Type: boolean (or Expression with resultType boolean). - public DataFactoryElement Recursive { get; set; } - /// Ftp wildcardFolderPath. Type: string (or Expression with resultType string). - public DataFactoryElement WildcardFolderPath { get; set; } - /// Ftp wildcardFileName. Type: string (or Expression with resultType string). - public DataFactoryElement WildcardFileName { get; set; } - /// Indicates whether to enable partition discovery. Type: boolean (or Expression with resultType boolean). - public DataFactoryElement EnablePartitionDiscovery { get; set; } - /// Specify the root path where partition discovery starts from. Type: string (or Expression with resultType string). - public DataFactoryElement PartitionRootPath { get; set; } - /// Indicates whether the source files need to be deleted after copy completion. Default is false. Type: boolean (or Expression with resultType boolean). - public DataFactoryElement DeleteFilesAfterCompletion { get; set; } - /// Point to a text file that lists each file (relative path to the path configured in the dataset) that you want to copy. Type: string (or Expression with resultType string). - public DataFactoryElement FileListPath { get; set; } - /// Specify whether to use binary transfer mode for FTP stores. Type: boolean (or Expression with resultType boolean). - public DataFactoryElement UseBinaryTransfer { get; set; } - /// If true, disable parallel reading within each file. Default is false. Type: boolean (or Expression with resultType boolean). - public DataFactoryElement DisableChunking { get; set; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/FtpServerLinkedService.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/FtpServerLinkedService.Serialization.cs deleted file mode 100644 index 085a5e7f..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/FtpServerLinkedService.Serialization.cs +++ /dev/null @@ -1,269 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class FtpServerLinkedService : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - writer.WritePropertyName("type"u8); - writer.WriteStringValue(LinkedServiceType); - if (Optional.IsDefined(ConnectVia)) - { - writer.WritePropertyName("connectVia"u8); - writer.WriteObjectValue(ConnectVia); - } - if (Optional.IsDefined(Description)) - { - writer.WritePropertyName("description"u8); - writer.WriteStringValue(Description); - } - if (Optional.IsCollectionDefined(Parameters)) - { - writer.WritePropertyName("parameters"u8); - writer.WriteStartObject(); - foreach (var item in Parameters) - { - writer.WritePropertyName(item.Key); - writer.WriteObjectValue(item.Value); - } - writer.WriteEndObject(); - } - if (Optional.IsCollectionDefined(Annotations)) - { - writer.WritePropertyName("annotations"u8); - writer.WriteStartArray(); - foreach (var item in Annotations) - { - if (item == null) - { - writer.WriteNullValue(); - continue; - } -#if NET6_0_OR_GREATER - writer.WriteRawValue(item); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.ToString()).RootElement); -#endif - } - writer.WriteEndArray(); - } - writer.WritePropertyName("typeProperties"u8); - writer.WriteStartObject(); - writer.WritePropertyName("host"u8); - JsonSerializer.Serialize(writer, Host); - if (Optional.IsDefined(Port)) - { - writer.WritePropertyName("port"u8); - JsonSerializer.Serialize(writer, Port); - } - if (Optional.IsDefined(AuthenticationType)) - { - writer.WritePropertyName("authenticationType"u8); - writer.WriteStringValue(AuthenticationType.Value.ToString()); - } - if (Optional.IsDefined(UserName)) - { - writer.WritePropertyName("userName"u8); - JsonSerializer.Serialize(writer, UserName); - } - if (Optional.IsDefined(Password)) - { - writer.WritePropertyName("password"u8); - JsonSerializer.Serialize(writer, Password); - } - if (Optional.IsDefined(EncryptedCredential)) - { - writer.WritePropertyName("encryptedCredential"u8); - writer.WriteStringValue(EncryptedCredential); - } - if (Optional.IsDefined(EnableSsl)) - { - writer.WritePropertyName("enableSsl"u8); - JsonSerializer.Serialize(writer, EnableSsl); - } - if (Optional.IsDefined(EnableServerCertificateValidation)) - { - writer.WritePropertyName("enableServerCertificateValidation"u8); - JsonSerializer.Serialize(writer, EnableServerCertificateValidation); - } - writer.WriteEndObject(); - foreach (var item in AdditionalProperties) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.Value.ToString()).RootElement); -#endif - } - writer.WriteEndObject(); - } - - internal static FtpServerLinkedService DeserializeFtpServerLinkedService(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - string type = default; - Optional connectVia = default; - Optional description = default; - Optional> parameters = default; - Optional> annotations = default; - DataFactoryElement host = default; - Optional> port = default; - Optional authenticationType = default; - Optional> userName = default; - Optional password = default; - Optional encryptedCredential = default; - Optional> enableSsl = default; - Optional> enableServerCertificateValidation = default; - IDictionary> additionalProperties = default; - Dictionary> additionalPropertiesDictionary = new Dictionary>(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("type"u8)) - { - type = property.Value.GetString(); - continue; - } - if (property.NameEquals("connectVia"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - connectVia = IntegrationRuntimeReference.DeserializeIntegrationRuntimeReference(property.Value); - continue; - } - if (property.NameEquals("description"u8)) - { - description = property.Value.GetString(); - continue; - } - if (property.NameEquals("parameters"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - Dictionary dictionary = new Dictionary(); - foreach (var property0 in property.Value.EnumerateObject()) - { - dictionary.Add(property0.Name, EntityParameterSpecification.DeserializeEntityParameterSpecification(property0.Value)); - } - parameters = dictionary; - continue; - } - if (property.NameEquals("annotations"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - if (item.ValueKind == JsonValueKind.Null) - { - array.Add(null); - } - else - { - array.Add(BinaryData.FromString(item.GetRawText())); - } - } - annotations = array; - continue; - } - if (property.NameEquals("typeProperties"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - foreach (var property0 in property.Value.EnumerateObject()) - { - if (property0.NameEquals("host"u8)) - { - host = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("port"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - port = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("authenticationType"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - authenticationType = new FtpAuthenticationType(property0.Value.GetString()); - continue; - } - if (property0.NameEquals("userName"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - userName = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("password"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - password = JsonSerializer.Deserialize(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("encryptedCredential"u8)) - { - encryptedCredential = property0.Value.GetString(); - continue; - } - if (property0.NameEquals("enableSsl"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - enableSsl = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("enableServerCertificateValidation"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - enableServerCertificateValidation = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - } - continue; - } - additionalPropertiesDictionary.Add(property.Name, JsonSerializer.Deserialize>(property.Value.GetRawText())); - } - additionalProperties = additionalPropertiesDictionary; - return new FtpServerLinkedService(type, connectVia.Value, description.Value, Optional.ToDictionary(parameters), Optional.ToList(annotations), additionalProperties, host, port.Value, Optional.ToNullable(authenticationType), userName.Value, password, encryptedCredential.Value, enableSsl.Value, enableServerCertificateValidation.Value); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/FtpServerLinkedService.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/FtpServerLinkedService.cs deleted file mode 100644 index f8de7b5e..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/FtpServerLinkedService.cs +++ /dev/null @@ -1,69 +0,0 @@ -// - -#nullable disable - -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// A FTP server Linked Service. - public partial class FtpServerLinkedService : DataFactoryLinkedServiceProperties - { - /// Initializes a new instance of FtpServerLinkedService. - /// Host name of the FTP server. Type: string (or Expression with resultType string). - /// is null. - public FtpServerLinkedService(DataFactoryElement host) - { - Argument.AssertNotNull(host, nameof(host)); - - Host = host; - LinkedServiceType = "FtpServer"; - } - - /// Initializes a new instance of FtpServerLinkedService. - /// Type of linked service. - /// The integration runtime reference. - /// Linked service description. - /// Parameters for linked service. - /// List of tags that can be used for describing the linked service. - /// Additional Properties. - /// Host name of the FTP server. Type: string (or Expression with resultType string). - /// The TCP port number that the FTP server uses to listen for client connections. Default value is 21. Type: integer (or Expression with resultType integer), minimum: 0. - /// The authentication type to be used to connect to the FTP server. - /// Username to logon the FTP server. Type: string (or Expression with resultType string). - /// Password to logon the FTP server. - /// The encrypted credential used for authentication. Credentials are encrypted using the integration runtime credential manager. Type: string. - /// If true, connect to the FTP server over SSL/TLS channel. Default value is true. Type: boolean (or Expression with resultType boolean). - /// If true, validate the FTP server SSL certificate when connect over SSL/TLS channel. Default value is true. Type: boolean (or Expression with resultType boolean). - internal FtpServerLinkedService(string linkedServiceType, IntegrationRuntimeReference connectVia, string description, IDictionary parameters, IList annotations, IDictionary> additionalProperties, DataFactoryElement host, DataFactoryElement port, FtpAuthenticationType? authenticationType, DataFactoryElement userName, DataFactorySecretBaseDefinition password, string encryptedCredential, DataFactoryElement enableSsl, DataFactoryElement enableServerCertificateValidation) : base(linkedServiceType, connectVia, description, parameters, annotations, additionalProperties) - { - Host = host; - Port = port; - AuthenticationType = authenticationType; - UserName = userName; - Password = password; - EncryptedCredential = encryptedCredential; - EnableSsl = enableSsl; - EnableServerCertificateValidation = enableServerCertificateValidation; - LinkedServiceType = linkedServiceType ?? "FtpServer"; - } - - /// Host name of the FTP server. Type: string (or Expression with resultType string). - public DataFactoryElement Host { get; set; } - /// The TCP port number that the FTP server uses to listen for client connections. Default value is 21. Type: integer (or Expression with resultType integer), minimum: 0. - public DataFactoryElement Port { get; set; } - /// The authentication type to be used to connect to the FTP server. - public FtpAuthenticationType? AuthenticationType { get; set; } - /// Username to logon the FTP server. Type: string (or Expression with resultType string). - public DataFactoryElement UserName { get; set; } - /// Password to logon the FTP server. - public DataFactorySecretBaseDefinition Password { get; set; } - /// The encrypted credential used for authentication. Credentials are encrypted using the integration runtime credential manager. Type: string. - public string EncryptedCredential { get; set; } - /// If true, connect to the FTP server over SSL/TLS channel. Default value is true. Type: boolean (or Expression with resultType boolean). - public DataFactoryElement EnableSsl { get; set; } - /// If true, validate the FTP server SSL certificate when connect over SSL/TLS channel. Default value is true. Type: boolean (or Expression with resultType boolean). - public DataFactoryElement EnableServerCertificateValidation { get; set; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/FtpServerLocation.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/FtpServerLocation.Serialization.cs deleted file mode 100644 index 7f2f3ebc..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/FtpServerLocation.Serialization.cs +++ /dev/null @@ -1,82 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class FtpServerLocation : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - writer.WritePropertyName("type"u8); - writer.WriteStringValue(DatasetLocationType); - if (Optional.IsDefined(FolderPath)) - { - writer.WritePropertyName("folderPath"u8); - JsonSerializer.Serialize(writer, FolderPath); - } - if (Optional.IsDefined(FileName)) - { - writer.WritePropertyName("fileName"u8); - JsonSerializer.Serialize(writer, FileName); - } - foreach (var item in AdditionalProperties) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.Value.ToString()).RootElement); -#endif - } - writer.WriteEndObject(); - } - - internal static FtpServerLocation DeserializeFtpServerLocation(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - string type = default; - Optional> folderPath = default; - Optional> fileName = default; - IDictionary> additionalProperties = default; - Dictionary> additionalPropertiesDictionary = new Dictionary>(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("type"u8)) - { - type = property.Value.GetString(); - continue; - } - if (property.NameEquals("folderPath"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - folderPath = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("fileName"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - fileName = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - additionalPropertiesDictionary.Add(property.Name, JsonSerializer.Deserialize>(property.Value.GetRawText())); - } - additionalProperties = additionalPropertiesDictionary; - return new FtpServerLocation(type, folderPath.Value, fileName.Value, additionalProperties); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/FtpServerLocation.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/FtpServerLocation.cs deleted file mode 100644 index e7f23b9e..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/FtpServerLocation.cs +++ /dev/null @@ -1,28 +0,0 @@ -// - -#nullable disable - -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// The location of ftp server dataset. - public partial class FtpServerLocation : DatasetLocation - { - /// Initializes a new instance of FtpServerLocation. - public FtpServerLocation() - { - DatasetLocationType = "FtpServerLocation"; - } - - /// Initializes a new instance of FtpServerLocation. - /// Type of dataset storage location. - /// Specify the folder path of dataset. Type: string (or Expression with resultType string). - /// Specify the file name of dataset. Type: string (or Expression with resultType string). - /// Additional Properties. - internal FtpServerLocation(string datasetLocationType, DataFactoryElement folderPath, DataFactoryElement fileName, IDictionary> additionalProperties) : base(datasetLocationType, folderPath, fileName, additionalProperties) - { - DatasetLocationType = datasetLocationType ?? "FtpServerLocation"; - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/GetDatasetMetadataActivity.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/GetDatasetMetadataActivity.Serialization.cs deleted file mode 100644 index c97939a7..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/GetDatasetMetadataActivity.Serialization.cs +++ /dev/null @@ -1,275 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class GetDatasetMetadataActivity : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - if (Optional.IsDefined(LinkedServiceName)) - { - writer.WritePropertyName("linkedServiceName"u8); - JsonSerializer.Serialize(writer, LinkedServiceName); - } - if (Optional.IsDefined(Policy)) - { - writer.WritePropertyName("policy"u8); - writer.WriteObjectValue(Policy); - } - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ActivityType); - if (Optional.IsDefined(Description)) - { - writer.WritePropertyName("description"u8); - writer.WriteStringValue(Description); - } - if (Optional.IsDefined(State)) - { - writer.WritePropertyName("state"u8); - writer.WriteStringValue(State.Value.ToString()); - } - if (Optional.IsDefined(OnInactiveMarkAs)) - { - writer.WritePropertyName("onInactiveMarkAs"u8); - writer.WriteStringValue(OnInactiveMarkAs.Value.ToString()); - } - if (Optional.IsCollectionDefined(DependsOn)) - { - writer.WritePropertyName("dependsOn"u8); - writer.WriteStartArray(); - foreach (var item in DependsOn) - { - writer.WriteObjectValue(item); - } - writer.WriteEndArray(); - } - if (Optional.IsCollectionDefined(UserProperties)) - { - writer.WritePropertyName("userProperties"u8); - writer.WriteStartArray(); - foreach (var item in UserProperties) - { - writer.WriteObjectValue(item); - } - writer.WriteEndArray(); - } - writer.WritePropertyName("typeProperties"u8); - writer.WriteStartObject(); - writer.WritePropertyName("dataset"u8); - writer.WriteObjectValue(Dataset); - if (Optional.IsCollectionDefined(FieldList)) - { - writer.WritePropertyName("fieldList"u8); - writer.WriteStartArray(); - foreach (var item in FieldList) - { - if (item == null) - { - writer.WriteNullValue(); - continue; - } -#if NET6_0_OR_GREATER - writer.WriteRawValue(item); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.ToString()).RootElement); -#endif - } - writer.WriteEndArray(); - } - if (Optional.IsDefined(StoreSettings)) - { - writer.WritePropertyName("storeSettings"u8); - writer.WriteObjectValue(StoreSettings); - } - if (Optional.IsDefined(FormatSettings)) - { - writer.WritePropertyName("formatSettings"u8); - writer.WriteObjectValue(FormatSettings); - } - writer.WriteEndObject(); - foreach (var item in AdditionalProperties) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.Value.ToString()).RootElement); -#endif - } - writer.WriteEndObject(); - } - - internal static GetDatasetMetadataActivity DeserializeGetDatasetMetadataActivity(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - Optional linkedServiceName = default; - Optional policy = default; - string name = default; - string type = default; - Optional description = default; - Optional state = default; - Optional onInactiveMarkAs = default; - Optional> dependsOn = default; - Optional> userProperties = default; - DatasetReference dataset = default; - Optional> fieldList = default; - Optional storeSettings = default; - Optional formatSettings = default; - IDictionary> additionalProperties = default; - Dictionary> additionalPropertiesDictionary = new Dictionary>(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("linkedServiceName"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - linkedServiceName = JsonSerializer.Deserialize(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("policy"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - policy = PipelineActivityPolicy.DeserializePipelineActivityPolicy(property.Value); - continue; - } - if (property.NameEquals("name"u8)) - { - name = property.Value.GetString(); - continue; - } - if (property.NameEquals("type"u8)) - { - type = property.Value.GetString(); - continue; - } - if (property.NameEquals("description"u8)) - { - description = property.Value.GetString(); - continue; - } - if (property.NameEquals("state"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - state = new PipelineActivityState(property.Value.GetString()); - continue; - } - if (property.NameEquals("onInactiveMarkAs"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - onInactiveMarkAs = new ActivityOnInactiveMarkAs(property.Value.GetString()); - continue; - } - if (property.NameEquals("dependsOn"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - array.Add(PipelineActivityDependency.DeserializePipelineActivityDependency(item)); - } - dependsOn = array; - continue; - } - if (property.NameEquals("userProperties"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - array.Add(PipelineActivityUserProperty.DeserializePipelineActivityUserProperty(item)); - } - userProperties = array; - continue; - } - if (property.NameEquals("typeProperties"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - foreach (var property0 in property.Value.EnumerateObject()) - { - if (property0.NameEquals("dataset"u8)) - { - dataset = DatasetReference.DeserializeDatasetReference(property0.Value); - continue; - } - if (property0.NameEquals("fieldList"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property0.Value.EnumerateArray()) - { - if (item.ValueKind == JsonValueKind.Null) - { - array.Add(null); - } - else - { - array.Add(BinaryData.FromString(item.GetRawText())); - } - } - fieldList = array; - continue; - } - if (property0.NameEquals("storeSettings"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - storeSettings = StoreReadSettings.DeserializeStoreReadSettings(property0.Value); - continue; - } - if (property0.NameEquals("formatSettings"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - formatSettings = FormatReadSettings.DeserializeFormatReadSettings(property0.Value); - continue; - } - } - continue; - } - additionalPropertiesDictionary.Add(property.Name, JsonSerializer.Deserialize>(property.Value.GetRawText())); - } - additionalProperties = additionalPropertiesDictionary; - return new GetDatasetMetadataActivity(name, type, description.Value, Optional.ToNullable(state), Optional.ToNullable(onInactiveMarkAs), Optional.ToList(dependsOn), Optional.ToList(userProperties), additionalProperties, linkedServiceName, policy.Value, dataset, Optional.ToList(fieldList), storeSettings.Value, formatSettings.Value); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/GetDatasetMetadataActivity.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/GetDatasetMetadataActivity.cs deleted file mode 100644 index 8bf5fd2b..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/GetDatasetMetadataActivity.cs +++ /dev/null @@ -1,105 +0,0 @@ -// - -#nullable disable - -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// Activity to get metadata of dataset. - public partial class GetDatasetMetadataActivity : ExecutionActivity - { - /// Initializes a new instance of GetDatasetMetadataActivity. - /// Activity name. - /// GetMetadata activity dataset reference. - /// or is null. - public GetDatasetMetadataActivity(string name, DatasetReference dataset) : base(name) - { - Argument.AssertNotNull(name, nameof(name)); - Argument.AssertNotNull(dataset, nameof(dataset)); - - Dataset = dataset; - FieldList = new ChangeTrackingList(); - ActivityType = "GetMetadata"; - } - - /// Initializes a new instance of GetDatasetMetadataActivity. - /// Activity name. - /// Type of activity. - /// Activity description. - /// Activity state. This is an optional property and if not provided, the state will be Active by default. - /// 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. - /// Activity depends on condition. - /// Activity user properties. - /// Additional Properties. - /// Linked service reference. - /// Activity policy. - /// GetMetadata activity dataset reference. - /// Fields of metadata to get from dataset. - /// - /// GetMetadata activity store settings. - /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. - /// The available derived classes include , , , , , , , , , , , and . - /// - /// - /// GetMetadata activity format settings. - /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. - /// The available derived classes include , , and . - /// - internal GetDatasetMetadataActivity(string name, string activityType, string description, PipelineActivityState? state, ActivityOnInactiveMarkAs? onInactiveMarkAs, IList dependsOn, IList userProperties, IDictionary> additionalProperties, DataFactoryLinkedServiceReference linkedServiceName, PipelineActivityPolicy policy, DatasetReference dataset, IList fieldList, StoreReadSettings storeSettings, FormatReadSettings formatSettings) : base(name, activityType, description, state, onInactiveMarkAs, dependsOn, userProperties, additionalProperties, linkedServiceName, policy) - { - Dataset = dataset; - FieldList = fieldList; - StoreSettings = storeSettings; - FormatSettings = formatSettings; - ActivityType = activityType ?? "GetMetadata"; - } - - /// GetMetadata activity dataset reference. - public DatasetReference Dataset { get; set; } - /// - /// Fields of metadata to get from dataset. - /// - /// To assign an object to the element of this property use . - /// - /// - /// To assign an already formated json string to this property use . - /// - /// - /// Examples: - /// - /// - /// BinaryData.FromObjectAsJson("foo") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromString("\"foo\"") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromObjectAsJson(new { key = "value" }) - /// Creates a payload of { "key": "value" }. - /// - /// - /// BinaryData.FromString("{\"key\": \"value\"}") - /// Creates a payload of { "key": "value" }. - /// - /// - /// - /// - public IList FieldList { get; } - /// - /// GetMetadata activity store settings. - /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. - /// The available derived classes include , , , , , , , , , , , and . - /// - public StoreReadSettings StoreSettings { get; set; } - /// - /// GetMetadata activity format settings. - /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. - /// The available derived classes include , , and . - /// - public FormatReadSettings FormatSettings { get; set; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/GetSsisObjectMetadataContent.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/GetSsisObjectMetadataContent.Serialization.cs deleted file mode 100644 index 4c6dd894..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/GetSsisObjectMetadataContent.Serialization.cs +++ /dev/null @@ -1,23 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class GetSsisObjectMetadataContent : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - if (Optional.IsDefined(MetadataPath)) - { - writer.WritePropertyName("metadataPath"u8); - writer.WriteStringValue(MetadataPath); - } - writer.WriteEndObject(); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/GetSsisObjectMetadataContent.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/GetSsisObjectMetadataContent.cs deleted file mode 100644 index c513d610..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/GetSsisObjectMetadataContent.cs +++ /dev/null @@ -1,18 +0,0 @@ -// - -#nullable disable - -namespace AzureDataFactory.TestingFramework.Models -{ - /// The request payload of get SSIS object metadata. - public partial class GetSsisObjectMetadataContent - { - /// Initializes a new instance of GetSsisObjectMetadataContent. - public GetSsisObjectMetadataContent() - { - } - - /// Metadata path. - public string MetadataPath { get; set; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/GitHubAccessTokenContent.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/GitHubAccessTokenContent.Serialization.cs deleted file mode 100644 index fb4a029d..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/GitHubAccessTokenContent.Serialization.cs +++ /dev/null @@ -1,32 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class GitHubAccessTokenContent : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - writer.WritePropertyName("gitHubAccessCode"u8); - writer.WriteStringValue(GitHubAccessCode); - if (Optional.IsDefined(GitHubClientId)) - { - writer.WritePropertyName("gitHubClientId"u8); - writer.WriteStringValue(GitHubClientId); - } - if (Optional.IsDefined(GitHubClientSecret)) - { - writer.WritePropertyName("gitHubClientSecret"u8); - writer.WriteObjectValue(GitHubClientSecret); - } - writer.WritePropertyName("gitHubAccessTokenBaseUrl"u8); - writer.WriteStringValue(GitHubAccessTokenBaseUri.AbsoluteUri); - writer.WriteEndObject(); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/GitHubAccessTokenContent.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/GitHubAccessTokenContent.cs deleted file mode 100644 index 14acabb0..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/GitHubAccessTokenContent.cs +++ /dev/null @@ -1,34 +0,0 @@ -// - -#nullable disable - -using Azure.Core; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// Get GitHub access token request definition. - public partial class GitHubAccessTokenContent - { - /// Initializes a new instance of GitHubAccessTokenContent. - /// GitHub access code. - /// GitHub access token base URL. - /// or is null. - public GitHubAccessTokenContent(string gitHubAccessCode, Uri gitHubAccessTokenBaseUri) - { - Argument.AssertNotNull(gitHubAccessCode, nameof(gitHubAccessCode)); - Argument.AssertNotNull(gitHubAccessTokenBaseUri, nameof(gitHubAccessTokenBaseUri)); - - GitHubAccessCode = gitHubAccessCode; - GitHubAccessTokenBaseUri = gitHubAccessTokenBaseUri; - } - - /// GitHub access code. - public string GitHubAccessCode { get; } - /// GitHub application client ID. - public string GitHubClientId { get; set; } - /// GitHub bring your own app client secret information. - public FactoryGitHubClientSecret GitHubClientSecret { get; set; } - /// GitHub access token base URL. - public Uri GitHubAccessTokenBaseUri { get; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/GitHubAccessTokenResult.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/GitHubAccessTokenResult.Serialization.cs deleted file mode 100644 index dd340776..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/GitHubAccessTokenResult.Serialization.cs +++ /dev/null @@ -1,30 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class GitHubAccessTokenResult - { - internal static GitHubAccessTokenResult DeserializeGitHubAccessTokenResult(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - Optional gitHubAccessToken = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("gitHubAccessToken"u8)) - { - gitHubAccessToken = property.Value.GetString(); - continue; - } - } - return new GitHubAccessTokenResult(gitHubAccessToken.Value); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/GitHubAccessTokenResult.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/GitHubAccessTokenResult.cs deleted file mode 100644 index 50876921..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/GitHubAccessTokenResult.cs +++ /dev/null @@ -1,25 +0,0 @@ -// - -#nullable disable - -namespace AzureDataFactory.TestingFramework.Models -{ - /// Get GitHub access token response definition. - public partial class GitHubAccessTokenResult - { - /// Initializes a new instance of GitHubAccessTokenResult. - internal GitHubAccessTokenResult() - { - } - - /// Initializes a new instance of GitHubAccessTokenResult. - /// GitHub access token. - internal GitHubAccessTokenResult(string gitHubAccessToken) - { - GitHubAccessToken = gitHubAccessToken; - } - - /// GitHub access token. - public string GitHubAccessToken { get; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/GoogleAdWordsAuthenticationType.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/GoogleAdWordsAuthenticationType.cs deleted file mode 100644 index 65f27d88..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/GoogleAdWordsAuthenticationType.cs +++ /dev/null @@ -1,47 +0,0 @@ -// - -#nullable disable - -using System.ComponentModel; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// The OAuth 2.0 authentication mechanism used for authentication. ServiceAuthentication can only be used on self-hosted IR. - public readonly partial struct GoogleAdWordsAuthenticationType : IEquatable - { - private readonly string _value; - - /// Initializes a new instance of . - /// is null. - public GoogleAdWordsAuthenticationType(string value) - { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } - - private const string ServiceAuthenticationValue = "ServiceAuthentication"; - private const string UserAuthenticationValue = "UserAuthentication"; - - /// ServiceAuthentication. - public static GoogleAdWordsAuthenticationType ServiceAuthentication { get; } = new GoogleAdWordsAuthenticationType(ServiceAuthenticationValue); - /// UserAuthentication. - public static GoogleAdWordsAuthenticationType UserAuthentication { get; } = new GoogleAdWordsAuthenticationType(UserAuthenticationValue); - /// Determines if two values are the same. - public static bool operator ==(GoogleAdWordsAuthenticationType left, GoogleAdWordsAuthenticationType right) => left.Equals(right); - /// Determines if two values are not the same. - public static bool operator !=(GoogleAdWordsAuthenticationType left, GoogleAdWordsAuthenticationType right) => !left.Equals(right); - /// Converts a string to a . - public static implicit operator GoogleAdWordsAuthenticationType(string value) => new GoogleAdWordsAuthenticationType(value); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override bool Equals(object obj) => obj is GoogleAdWordsAuthenticationType other && Equals(other); - /// - public bool Equals(GoogleAdWordsAuthenticationType other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override int GetHashCode() => _value?.GetHashCode() ?? 0; - /// - public override string ToString() => _value; - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/GoogleAdWordsLinkedService.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/GoogleAdWordsLinkedService.Serialization.cs deleted file mode 100644 index c3b6c1df..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/GoogleAdWordsLinkedService.Serialization.cs +++ /dev/null @@ -1,340 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class GoogleAdWordsLinkedService : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - writer.WritePropertyName("type"u8); - writer.WriteStringValue(LinkedServiceType); - if (Optional.IsDefined(ConnectVia)) - { - writer.WritePropertyName("connectVia"u8); - writer.WriteObjectValue(ConnectVia); - } - if (Optional.IsDefined(Description)) - { - writer.WritePropertyName("description"u8); - writer.WriteStringValue(Description); - } - if (Optional.IsCollectionDefined(Parameters)) - { - writer.WritePropertyName("parameters"u8); - writer.WriteStartObject(); - foreach (var item in Parameters) - { - writer.WritePropertyName(item.Key); - writer.WriteObjectValue(item.Value); - } - writer.WriteEndObject(); - } - if (Optional.IsCollectionDefined(Annotations)) - { - writer.WritePropertyName("annotations"u8); - writer.WriteStartArray(); - foreach (var item in Annotations) - { - if (item == null) - { - writer.WriteNullValue(); - continue; - } -#if NET6_0_OR_GREATER - writer.WriteRawValue(item); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.ToString()).RootElement); -#endif - } - writer.WriteEndArray(); - } - writer.WritePropertyName("typeProperties"u8); - writer.WriteStartObject(); - if (Optional.IsDefined(ConnectionProperties)) - { - writer.WritePropertyName("connectionProperties"u8); -#if NET6_0_OR_GREATER - writer.WriteRawValue(ConnectionProperties); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(ConnectionProperties.ToString()).RootElement); -#endif - } - if (Optional.IsDefined(ClientCustomerId)) - { - writer.WritePropertyName("clientCustomerID"u8); - JsonSerializer.Serialize(writer, ClientCustomerId); - } - if (Optional.IsDefined(DeveloperToken)) - { - writer.WritePropertyName("developerToken"u8); - JsonSerializer.Serialize(writer, DeveloperToken); - } - if (Optional.IsDefined(AuthenticationType)) - { - writer.WritePropertyName("authenticationType"u8); - writer.WriteStringValue(AuthenticationType.Value.ToString()); - } - if (Optional.IsDefined(RefreshToken)) - { - writer.WritePropertyName("refreshToken"u8); - JsonSerializer.Serialize(writer, RefreshToken); - } - if (Optional.IsDefined(ClientId)) - { - writer.WritePropertyName("clientId"u8); - JsonSerializer.Serialize(writer, ClientId); - } - if (Optional.IsDefined(ClientSecret)) - { - writer.WritePropertyName("clientSecret"u8); - JsonSerializer.Serialize(writer, ClientSecret); - } - if (Optional.IsDefined(Email)) - { - writer.WritePropertyName("email"u8); - JsonSerializer.Serialize(writer, Email); - } - if (Optional.IsDefined(KeyFilePath)) - { - writer.WritePropertyName("keyFilePath"u8); - JsonSerializer.Serialize(writer, KeyFilePath); - } - if (Optional.IsDefined(TrustedCertPath)) - { - writer.WritePropertyName("trustedCertPath"u8); - JsonSerializer.Serialize(writer, TrustedCertPath); - } - if (Optional.IsDefined(UseSystemTrustStore)) - { - writer.WritePropertyName("useSystemTrustStore"u8); - JsonSerializer.Serialize(writer, UseSystemTrustStore); - } - if (Optional.IsDefined(EncryptedCredential)) - { - writer.WritePropertyName("encryptedCredential"u8); - writer.WriteStringValue(EncryptedCredential); - } - writer.WriteEndObject(); - foreach (var item in AdditionalProperties) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.Value.ToString()).RootElement); -#endif - } - writer.WriteEndObject(); - } - - internal static GoogleAdWordsLinkedService DeserializeGoogleAdWordsLinkedService(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - string type = default; - Optional connectVia = default; - Optional description = default; - Optional> parameters = default; - Optional> annotations = default; - Optional connectionProperties = default; - Optional> clientCustomerId = default; - Optional developerToken = default; - Optional authenticationType = default; - Optional refreshToken = default; - Optional> clientId = default; - Optional clientSecret = default; - Optional> email = default; - Optional> keyFilePath = default; - Optional> trustedCertPath = default; - Optional> useSystemTrustStore = default; - Optional encryptedCredential = default; - IDictionary> additionalProperties = default; - Dictionary> additionalPropertiesDictionary = new Dictionary>(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("type"u8)) - { - type = property.Value.GetString(); - continue; - } - if (property.NameEquals("connectVia"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - connectVia = IntegrationRuntimeReference.DeserializeIntegrationRuntimeReference(property.Value); - continue; - } - if (property.NameEquals("description"u8)) - { - description = property.Value.GetString(); - continue; - } - if (property.NameEquals("parameters"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - Dictionary dictionary = new Dictionary(); - foreach (var property0 in property.Value.EnumerateObject()) - { - dictionary.Add(property0.Name, EntityParameterSpecification.DeserializeEntityParameterSpecification(property0.Value)); - } - parameters = dictionary; - continue; - } - if (property.NameEquals("annotations"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - if (item.ValueKind == JsonValueKind.Null) - { - array.Add(null); - } - else - { - array.Add(BinaryData.FromString(item.GetRawText())); - } - } - annotations = array; - continue; - } - if (property.NameEquals("typeProperties"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - foreach (var property0 in property.Value.EnumerateObject()) - { - if (property0.NameEquals("connectionProperties"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - connectionProperties = BinaryData.FromString(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("clientCustomerID"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - clientCustomerId = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("developerToken"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - developerToken = JsonSerializer.Deserialize(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("authenticationType"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - authenticationType = new GoogleAdWordsAuthenticationType(property0.Value.GetString()); - continue; - } - if (property0.NameEquals("refreshToken"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - refreshToken = JsonSerializer.Deserialize(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("clientId"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - clientId = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("clientSecret"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - clientSecret = JsonSerializer.Deserialize(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("email"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - email = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("keyFilePath"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - keyFilePath = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("trustedCertPath"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - trustedCertPath = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("useSystemTrustStore"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - useSystemTrustStore = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("encryptedCredential"u8)) - { - encryptedCredential = property0.Value.GetString(); - continue; - } - } - continue; - } - additionalPropertiesDictionary.Add(property.Name, JsonSerializer.Deserialize>(property.Value.GetRawText())); - } - additionalProperties = additionalPropertiesDictionary; - return new GoogleAdWordsLinkedService(type, connectVia.Value, description.Value, Optional.ToDictionary(parameters), Optional.ToList(annotations), additionalProperties, connectionProperties.Value, clientCustomerId.Value, developerToken, Optional.ToNullable(authenticationType), refreshToken, clientId.Value, clientSecret, email.Value, keyFilePath.Value, trustedCertPath.Value, useSystemTrustStore.Value, encryptedCredential.Value); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/GoogleAdWordsLinkedService.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/GoogleAdWordsLinkedService.cs deleted file mode 100644 index 336f2a26..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/GoogleAdWordsLinkedService.cs +++ /dev/null @@ -1,108 +0,0 @@ -// - -#nullable disable - -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// Google AdWords service linked service. - public partial class GoogleAdWordsLinkedService : DataFactoryLinkedServiceProperties - { - /// Initializes a new instance of GoogleAdWordsLinkedService. - public GoogleAdWordsLinkedService() - { - LinkedServiceType = "GoogleAdWords"; - } - - /// Initializes a new instance of GoogleAdWordsLinkedService. - /// Type of linked service. - /// The integration runtime reference. - /// Linked service description. - /// Parameters for linked service. - /// List of tags that can be used for describing the linked service. - /// Additional Properties. - /// Properties used to connect to GoogleAds. It is mutually exclusive with any other properties in the linked service. Type: object. - /// The Client customer ID of the AdWords account that you want to fetch report data for. Type: string (or Expression with resultType string). - /// The developer token associated with the manager account that you use to grant access to the AdWords API. - /// The OAuth 2.0 authentication mechanism used for authentication. ServiceAuthentication can only be used on self-hosted IR. - /// The refresh token obtained from Google for authorizing access to AdWords for UserAuthentication. - /// The client id of the google application used to acquire the refresh token. Type: string (or Expression with resultType string). - /// The client secret of the google application used to acquire the refresh token. - /// The service account email ID that is used for ServiceAuthentication and can only be used on self-hosted IR. Type: string (or Expression with resultType string). - /// The full path to the .p12 key file that is used to authenticate the service account email address and can only be used on self-hosted IR. Type: string (or Expression with resultType string). - /// The full path of the .pem file containing trusted CA certificates for verifying the server when connecting over SSL. This property can only be set when using SSL on self-hosted IR. The default value is the cacerts.pem file installed with the IR. Type: string (or Expression with resultType string). - /// Specifies whether to use a CA certificate from the system trust store or from a specified PEM file. The default value is false. Type: boolean (or Expression with resultType boolean). - /// The encrypted credential used for authentication. Credentials are encrypted using the integration runtime credential manager. Type: string. - internal GoogleAdWordsLinkedService(string linkedServiceType, IntegrationRuntimeReference connectVia, string description, IDictionary parameters, IList annotations, IDictionary> additionalProperties, BinaryData connectionProperties, DataFactoryElement clientCustomerId, DataFactorySecretBaseDefinition developerToken, GoogleAdWordsAuthenticationType? authenticationType, DataFactorySecretBaseDefinition refreshToken, DataFactoryElement clientId, DataFactorySecretBaseDefinition clientSecret, DataFactoryElement email, DataFactoryElement keyFilePath, DataFactoryElement trustedCertPath, DataFactoryElement useSystemTrustStore, string encryptedCredential) : base(linkedServiceType, connectVia, description, parameters, annotations, additionalProperties) - { - ConnectionProperties = connectionProperties; - ClientCustomerId = clientCustomerId; - DeveloperToken = developerToken; - AuthenticationType = authenticationType; - RefreshToken = refreshToken; - ClientId = clientId; - ClientSecret = clientSecret; - Email = email; - KeyFilePath = keyFilePath; - TrustedCertPath = trustedCertPath; - UseSystemTrustStore = useSystemTrustStore; - EncryptedCredential = encryptedCredential; - LinkedServiceType = linkedServiceType ?? "GoogleAdWords"; - } - - /// - /// Properties used to connect to GoogleAds. It is mutually exclusive with any other properties in the linked service. Type: object. - /// - /// To assign an object to this property use . - /// - /// - /// To assign an already formated json string to this property use . - /// - /// - /// Examples: - /// - /// - /// BinaryData.FromObjectAsJson("foo") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromString("\"foo\"") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromObjectAsJson(new { key = "value" }) - /// Creates a payload of { "key": "value" }. - /// - /// - /// BinaryData.FromString("{\"key\": \"value\"}") - /// Creates a payload of { "key": "value" }. - /// - /// - /// - /// - public BinaryData ConnectionProperties { get; set; } - /// The Client customer ID of the AdWords account that you want to fetch report data for. Type: string (or Expression with resultType string). - public DataFactoryElement ClientCustomerId { get; set; } - /// The developer token associated with the manager account that you use to grant access to the AdWords API. - public DataFactorySecretBaseDefinition DeveloperToken { get; set; } - /// The OAuth 2.0 authentication mechanism used for authentication. ServiceAuthentication can only be used on self-hosted IR. - public GoogleAdWordsAuthenticationType? AuthenticationType { get; set; } - /// The refresh token obtained from Google for authorizing access to AdWords for UserAuthentication. - public DataFactorySecretBaseDefinition RefreshToken { get; set; } - /// The client id of the google application used to acquire the refresh token. Type: string (or Expression with resultType string). - public DataFactoryElement ClientId { get; set; } - /// The client secret of the google application used to acquire the refresh token. - public DataFactorySecretBaseDefinition ClientSecret { get; set; } - /// The service account email ID that is used for ServiceAuthentication and can only be used on self-hosted IR. Type: string (or Expression with resultType string). - public DataFactoryElement Email { get; set; } - /// The full path to the .p12 key file that is used to authenticate the service account email address and can only be used on self-hosted IR. Type: string (or Expression with resultType string). - public DataFactoryElement KeyFilePath { get; set; } - /// The full path of the .pem file containing trusted CA certificates for verifying the server when connecting over SSL. This property can only be set when using SSL on self-hosted IR. The default value is the cacerts.pem file installed with the IR. Type: string (or Expression with resultType string). - public DataFactoryElement TrustedCertPath { get; set; } - /// Specifies whether to use a CA certificate from the system trust store or from a specified PEM file. The default value is false. Type: boolean (or Expression with resultType boolean). - public DataFactoryElement UseSystemTrustStore { get; set; } - /// The encrypted credential used for authentication. Credentials are encrypted using the integration runtime credential manager. Type: string. - public string EncryptedCredential { get; set; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/GoogleAdWordsObjectDataset.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/GoogleAdWordsObjectDataset.Serialization.cs deleted file mode 100644 index a0177d95..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/GoogleAdWordsObjectDataset.Serialization.cs +++ /dev/null @@ -1,212 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class GoogleAdWordsObjectDataset : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - writer.WritePropertyName("type"u8); - writer.WriteStringValue(DatasetType); - if (Optional.IsDefined(Description)) - { - writer.WritePropertyName("description"u8); - writer.WriteStringValue(Description); - } - if (Optional.IsDefined(Structure)) - { - writer.WritePropertyName("structure"u8); - JsonSerializer.Serialize(writer, Structure); - } - if (Optional.IsDefined(Schema)) - { - writer.WritePropertyName("schema"u8); - JsonSerializer.Serialize(writer, Schema); - } - writer.WritePropertyName("linkedServiceName"u8); - JsonSerializer.Serialize(writer, LinkedServiceName); if (Optional.IsCollectionDefined(Parameters)) - { - writer.WritePropertyName("parameters"u8); - writer.WriteStartObject(); - foreach (var item in Parameters) - { - writer.WritePropertyName(item.Key); - writer.WriteObjectValue(item.Value); - } - writer.WriteEndObject(); - } - if (Optional.IsCollectionDefined(Annotations)) - { - writer.WritePropertyName("annotations"u8); - writer.WriteStartArray(); - foreach (var item in Annotations) - { - if (item == null) - { - writer.WriteNullValue(); - continue; - } -#if NET6_0_OR_GREATER - writer.WriteRawValue(item); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.ToString()).RootElement); -#endif - } - writer.WriteEndArray(); - } - if (Optional.IsDefined(Folder)) - { - writer.WritePropertyName("folder"u8); - writer.WriteObjectValue(Folder); - } - writer.WritePropertyName("typeProperties"u8); - writer.WriteStartObject(); - if (Optional.IsDefined(TableName)) - { - writer.WritePropertyName("tableName"u8); - JsonSerializer.Serialize(writer, TableName); - } - writer.WriteEndObject(); - foreach (var item in AdditionalProperties) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.Value.ToString()).RootElement); -#endif - } - writer.WriteEndObject(); - } - - internal static GoogleAdWordsObjectDataset DeserializeGoogleAdWordsObjectDataset(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - string type = default; - Optional description = default; - Optional>> structure = default; - Optional>> schema = default; - DataFactoryLinkedServiceReference linkedServiceName = default; - Optional> parameters = default; - Optional> annotations = default; - Optional folder = default; - Optional> tableName = default; - IDictionary> additionalProperties = default; - Dictionary> additionalPropertiesDictionary = new Dictionary>(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("type"u8)) - { - type = property.Value.GetString(); - continue; - } - if (property.NameEquals("description"u8)) - { - description = property.Value.GetString(); - continue; - } - if (property.NameEquals("structure"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - structure = JsonSerializer.Deserialize>>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("schema"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - schema = JsonSerializer.Deserialize>>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("linkedServiceName"u8)) - { - linkedServiceName = JsonSerializer.Deserialize(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("parameters"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - Dictionary dictionary = new Dictionary(); - foreach (var property0 in property.Value.EnumerateObject()) - { - dictionary.Add(property0.Name, EntityParameterSpecification.DeserializeEntityParameterSpecification(property0.Value)); - } - parameters = dictionary; - continue; - } - if (property.NameEquals("annotations"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - if (item.ValueKind == JsonValueKind.Null) - { - array.Add(null); - } - else - { - array.Add(BinaryData.FromString(item.GetRawText())); - } - } - annotations = array; - continue; - } - if (property.NameEquals("folder"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - folder = DatasetFolder.DeserializeDatasetFolder(property.Value); - continue; - } - if (property.NameEquals("typeProperties"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - foreach (var property0 in property.Value.EnumerateObject()) - { - if (property0.NameEquals("tableName"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - tableName = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - } - continue; - } - additionalPropertiesDictionary.Add(property.Name, JsonSerializer.Deserialize>(property.Value.GetRawText())); - } - additionalProperties = additionalPropertiesDictionary; - return new GoogleAdWordsObjectDataset(type, description.Value, structure.Value, schema.Value, linkedServiceName, Optional.ToDictionary(parameters), Optional.ToList(annotations), folder.Value, additionalProperties, tableName.Value); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/GoogleAdWordsObjectDataset.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/GoogleAdWordsObjectDataset.cs deleted file mode 100644 index 9c06e7ee..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/GoogleAdWordsObjectDataset.cs +++ /dev/null @@ -1,43 +0,0 @@ -// - -#nullable disable - -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// Google AdWords service dataset. - public partial class GoogleAdWordsObjectDataset : DataFactoryDatasetProperties - { - /// Initializes a new instance of GoogleAdWordsObjectDataset. - /// Linked service reference. - /// is null. - public GoogleAdWordsObjectDataset(DataFactoryLinkedServiceReference linkedServiceName) : base(linkedServiceName) - { - Argument.AssertNotNull(linkedServiceName, nameof(linkedServiceName)); - - DatasetType = "GoogleAdWordsObject"; - } - - /// Initializes a new instance of GoogleAdWordsObjectDataset. - /// Type of dataset. - /// Dataset description. - /// Columns that define the structure of the dataset. Type: array (or Expression with resultType array), itemType: DatasetDataElement. - /// Columns that define the physical type schema of the dataset. Type: array (or Expression with resultType array), itemType: DatasetSchemaDataElement. - /// Linked service reference. - /// Parameters for dataset. - /// List of tags that can be used for describing the Dataset. - /// The folder that this Dataset is in. If not specified, Dataset will appear at the root level. - /// Additional Properties. - /// The table name. Type: string (or Expression with resultType string). - internal GoogleAdWordsObjectDataset(string datasetType, string description, DataFactoryElement> structure, DataFactoryElement> schema, DataFactoryLinkedServiceReference linkedServiceName, IDictionary parameters, IList annotations, DatasetFolder folder, IDictionary> additionalProperties, DataFactoryElement tableName) : base(datasetType, description, structure, schema, linkedServiceName, parameters, annotations, folder, additionalProperties) - { - TableName = tableName; - DatasetType = datasetType ?? "GoogleAdWordsObject"; - } - - /// The table name. Type: string (or Expression with resultType string). - public DataFactoryElement TableName { get; set; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/GoogleAdWordsSource.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/GoogleAdWordsSource.Serialization.cs deleted file mode 100644 index b3b11db0..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/GoogleAdWordsSource.Serialization.cs +++ /dev/null @@ -1,161 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class GoogleAdWordsSource : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - if (Optional.IsDefined(Query)) - { - writer.WritePropertyName("query"u8); - JsonSerializer.Serialize(writer, Query); - } - if (Optional.IsDefined(QueryTimeout)) - { - writer.WritePropertyName("queryTimeout"u8); - JsonSerializer.Serialize(writer, QueryTimeout); - } - if (Optional.IsDefined(AdditionalColumns)) - { - writer.WritePropertyName("additionalColumns"u8); -#if NET6_0_OR_GREATER - writer.WriteRawValue(AdditionalColumns); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(AdditionalColumns.ToString()).RootElement); -#endif - } - writer.WritePropertyName("type"u8); - writer.WriteStringValue(CopySourceType); - if (Optional.IsDefined(SourceRetryCount)) - { - writer.WritePropertyName("sourceRetryCount"u8); - JsonSerializer.Serialize(writer, SourceRetryCount); - } - if (Optional.IsDefined(SourceRetryWait)) - { - writer.WritePropertyName("sourceRetryWait"u8); - JsonSerializer.Serialize(writer, SourceRetryWait); - } - if (Optional.IsDefined(MaxConcurrentConnections)) - { - writer.WritePropertyName("maxConcurrentConnections"u8); - JsonSerializer.Serialize(writer, MaxConcurrentConnections); - } - if (Optional.IsDefined(DisableMetricsCollection)) - { - writer.WritePropertyName("disableMetricsCollection"u8); - JsonSerializer.Serialize(writer, DisableMetricsCollection); - } - foreach (var item in AdditionalProperties) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.Value.ToString()).RootElement); -#endif - } - writer.WriteEndObject(); - } - - internal static GoogleAdWordsSource DeserializeGoogleAdWordsSource(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - Optional> query = default; - Optional> queryTimeout = default; - Optional additionalColumns = default; - string type = default; - Optional> sourceRetryCount = default; - Optional> sourceRetryWait = default; - Optional> maxConcurrentConnections = default; - Optional> disableMetricsCollection = default; - IDictionary> additionalProperties = default; - Dictionary> additionalPropertiesDictionary = new Dictionary>(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("query"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - query = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("queryTimeout"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - queryTimeout = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("additionalColumns"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - additionalColumns = BinaryData.FromString(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("type"u8)) - { - type = property.Value.GetString(); - continue; - } - if (property.NameEquals("sourceRetryCount"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - sourceRetryCount = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("sourceRetryWait"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - sourceRetryWait = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("maxConcurrentConnections"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - maxConcurrentConnections = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("disableMetricsCollection"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - disableMetricsCollection = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - additionalPropertiesDictionary.Add(property.Name, JsonSerializer.Deserialize>(property.Value.GetRawText())); - } - additionalProperties = additionalPropertiesDictionary; - return new GoogleAdWordsSource(type, sourceRetryCount.Value, sourceRetryWait.Value, maxConcurrentConnections.Value, disableMetricsCollection.Value, additionalProperties, queryTimeout.Value, additionalColumns.Value, query.Value); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/GoogleAdWordsSource.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/GoogleAdWordsSource.cs deleted file mode 100644 index d07e0f05..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/GoogleAdWordsSource.cs +++ /dev/null @@ -1,37 +0,0 @@ -// - -#nullable disable - -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// A copy activity Google AdWords service source. - public partial class GoogleAdWordsSource : TabularSource - { - /// Initializes a new instance of GoogleAdWordsSource. - public GoogleAdWordsSource() - { - CopySourceType = "GoogleAdWordsSource"; - } - - /// Initializes a new instance of GoogleAdWordsSource. - /// Copy source type. - /// Source retry count. Type: integer (or Expression with resultType integer). - /// Source retry wait. Type: string (or Expression with resultType string), pattern: ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). - /// The maximum concurrent connection count for the source data store. Type: integer (or Expression with resultType integer). - /// If true, disable data store metrics collection. Default is false. Type: boolean (or Expression with resultType boolean). - /// Additional Properties. - /// 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). - /// A query to retrieve data from source. Type: string (or Expression with resultType string). - internal GoogleAdWordsSource(string copySourceType, DataFactoryElement sourceRetryCount, DataFactoryElement sourceRetryWait, DataFactoryElement maxConcurrentConnections, DataFactoryElement disableMetricsCollection, IDictionary> additionalProperties, DataFactoryElement queryTimeout, BinaryData additionalColumns, DataFactoryElement query) : base(copySourceType, sourceRetryCount, sourceRetryWait, maxConcurrentConnections, disableMetricsCollection, additionalProperties, queryTimeout, additionalColumns) - { - Query = query; - CopySourceType = copySourceType ?? "GoogleAdWordsSource"; - } - - /// A query to retrieve data from source. Type: string (or Expression with resultType string). - public DataFactoryElement Query { get; set; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/GoogleBigQueryAuthenticationType.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/GoogleBigQueryAuthenticationType.cs deleted file mode 100644 index c9a52a74..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/GoogleBigQueryAuthenticationType.cs +++ /dev/null @@ -1,47 +0,0 @@ -// - -#nullable disable - -using System.ComponentModel; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// The OAuth 2.0 authentication mechanism used for authentication. ServiceAuthentication can only be used on self-hosted IR. - public readonly partial struct GoogleBigQueryAuthenticationType : IEquatable - { - private readonly string _value; - - /// Initializes a new instance of . - /// is null. - public GoogleBigQueryAuthenticationType(string value) - { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } - - private const string ServiceAuthenticationValue = "ServiceAuthentication"; - private const string UserAuthenticationValue = "UserAuthentication"; - - /// ServiceAuthentication. - public static GoogleBigQueryAuthenticationType ServiceAuthentication { get; } = new GoogleBigQueryAuthenticationType(ServiceAuthenticationValue); - /// UserAuthentication. - public static GoogleBigQueryAuthenticationType UserAuthentication { get; } = new GoogleBigQueryAuthenticationType(UserAuthenticationValue); - /// Determines if two values are the same. - public static bool operator ==(GoogleBigQueryAuthenticationType left, GoogleBigQueryAuthenticationType right) => left.Equals(right); - /// Determines if two values are not the same. - public static bool operator !=(GoogleBigQueryAuthenticationType left, GoogleBigQueryAuthenticationType right) => !left.Equals(right); - /// Converts a string to a . - public static implicit operator GoogleBigQueryAuthenticationType(string value) => new GoogleBigQueryAuthenticationType(value); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override bool Equals(object obj) => obj is GoogleBigQueryAuthenticationType other && Equals(other); - /// - public bool Equals(GoogleBigQueryAuthenticationType other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override int GetHashCode() => _value?.GetHashCode() ?? 0; - /// - public override string ToString() => _value; - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/GoogleBigQueryLinkedService.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/GoogleBigQueryLinkedService.Serialization.cs deleted file mode 100644 index ff49cdbd..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/GoogleBigQueryLinkedService.Serialization.cs +++ /dev/null @@ -1,322 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class GoogleBigQueryLinkedService : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - writer.WritePropertyName("type"u8); - writer.WriteStringValue(LinkedServiceType); - if (Optional.IsDefined(ConnectVia)) - { - writer.WritePropertyName("connectVia"u8); - writer.WriteObjectValue(ConnectVia); - } - if (Optional.IsDefined(Description)) - { - writer.WritePropertyName("description"u8); - writer.WriteStringValue(Description); - } - if (Optional.IsCollectionDefined(Parameters)) - { - writer.WritePropertyName("parameters"u8); - writer.WriteStartObject(); - foreach (var item in Parameters) - { - writer.WritePropertyName(item.Key); - writer.WriteObjectValue(item.Value); - } - writer.WriteEndObject(); - } - if (Optional.IsCollectionDefined(Annotations)) - { - writer.WritePropertyName("annotations"u8); - writer.WriteStartArray(); - foreach (var item in Annotations) - { - if (item == null) - { - writer.WriteNullValue(); - continue; - } -#if NET6_0_OR_GREATER - writer.WriteRawValue(item); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.ToString()).RootElement); -#endif - } - writer.WriteEndArray(); - } - writer.WritePropertyName("typeProperties"u8); - writer.WriteStartObject(); - writer.WritePropertyName("project"u8); - JsonSerializer.Serialize(writer, Project); - if (Optional.IsDefined(AdditionalProjects)) - { - writer.WritePropertyName("additionalProjects"u8); - JsonSerializer.Serialize(writer, AdditionalProjects); - } - if (Optional.IsDefined(RequestGoogleDriveScope)) - { - writer.WritePropertyName("requestGoogleDriveScope"u8); - JsonSerializer.Serialize(writer, RequestGoogleDriveScope); - } - writer.WritePropertyName("authenticationType"u8); - writer.WriteStringValue(AuthenticationType.ToString()); - if (Optional.IsDefined(RefreshToken)) - { - writer.WritePropertyName("refreshToken"u8); - JsonSerializer.Serialize(writer, RefreshToken); - } - if (Optional.IsDefined(ClientId)) - { - writer.WritePropertyName("clientId"u8); - JsonSerializer.Serialize(writer, ClientId); - } - if (Optional.IsDefined(ClientSecret)) - { - writer.WritePropertyName("clientSecret"u8); - JsonSerializer.Serialize(writer, ClientSecret); - } - if (Optional.IsDefined(Email)) - { - writer.WritePropertyName("email"u8); - JsonSerializer.Serialize(writer, Email); - } - if (Optional.IsDefined(KeyFilePath)) - { - writer.WritePropertyName("keyFilePath"u8); - JsonSerializer.Serialize(writer, KeyFilePath); - } - if (Optional.IsDefined(TrustedCertPath)) - { - writer.WritePropertyName("trustedCertPath"u8); - JsonSerializer.Serialize(writer, TrustedCertPath); - } - if (Optional.IsDefined(UseSystemTrustStore)) - { - writer.WritePropertyName("useSystemTrustStore"u8); - JsonSerializer.Serialize(writer, UseSystemTrustStore); - } - if (Optional.IsDefined(EncryptedCredential)) - { - writer.WritePropertyName("encryptedCredential"u8); - writer.WriteStringValue(EncryptedCredential); - } - writer.WriteEndObject(); - foreach (var item in AdditionalProperties) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.Value.ToString()).RootElement); -#endif - } - writer.WriteEndObject(); - } - - internal static GoogleBigQueryLinkedService DeserializeGoogleBigQueryLinkedService(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - string type = default; - Optional connectVia = default; - Optional description = default; - Optional> parameters = default; - Optional> annotations = default; - DataFactoryElement project = default; - Optional> additionalProjects = default; - Optional> requestGoogleDriveScope = default; - GoogleBigQueryAuthenticationType authenticationType = default; - Optional refreshToken = default; - Optional> clientId = default; - Optional clientSecret = default; - Optional> email = default; - Optional> keyFilePath = default; - Optional> trustedCertPath = default; - Optional> useSystemTrustStore = default; - Optional encryptedCredential = default; - IDictionary> additionalProperties = default; - Dictionary> additionalPropertiesDictionary = new Dictionary>(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("type"u8)) - { - type = property.Value.GetString(); - continue; - } - if (property.NameEquals("connectVia"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - connectVia = IntegrationRuntimeReference.DeserializeIntegrationRuntimeReference(property.Value); - continue; - } - if (property.NameEquals("description"u8)) - { - description = property.Value.GetString(); - continue; - } - if (property.NameEquals("parameters"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - Dictionary dictionary = new Dictionary(); - foreach (var property0 in property.Value.EnumerateObject()) - { - dictionary.Add(property0.Name, EntityParameterSpecification.DeserializeEntityParameterSpecification(property0.Value)); - } - parameters = dictionary; - continue; - } - if (property.NameEquals("annotations"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - if (item.ValueKind == JsonValueKind.Null) - { - array.Add(null); - } - else - { - array.Add(BinaryData.FromString(item.GetRawText())); - } - } - annotations = array; - continue; - } - if (property.NameEquals("typeProperties"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - foreach (var property0 in property.Value.EnumerateObject()) - { - if (property0.NameEquals("project"u8)) - { - project = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("additionalProjects"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - additionalProjects = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("requestGoogleDriveScope"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - requestGoogleDriveScope = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("authenticationType"u8)) - { - authenticationType = new GoogleBigQueryAuthenticationType(property0.Value.GetString()); - continue; - } - if (property0.NameEquals("refreshToken"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - refreshToken = JsonSerializer.Deserialize(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("clientId"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - clientId = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("clientSecret"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - clientSecret = JsonSerializer.Deserialize(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("email"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - email = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("keyFilePath"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - keyFilePath = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("trustedCertPath"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - trustedCertPath = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("useSystemTrustStore"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - useSystemTrustStore = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("encryptedCredential"u8)) - { - encryptedCredential = property0.Value.GetString(); - continue; - } - } - continue; - } - additionalPropertiesDictionary.Add(property.Name, JsonSerializer.Deserialize>(property.Value.GetRawText())); - } - additionalProperties = additionalPropertiesDictionary; - return new GoogleBigQueryLinkedService(type, connectVia.Value, description.Value, Optional.ToDictionary(parameters), Optional.ToList(annotations), additionalProperties, project, additionalProjects.Value, requestGoogleDriveScope.Value, authenticationType, refreshToken, clientId.Value, clientSecret, email.Value, keyFilePath.Value, trustedCertPath.Value, useSystemTrustStore.Value, encryptedCredential.Value); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/GoogleBigQueryLinkedService.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/GoogleBigQueryLinkedService.cs deleted file mode 100644 index d1ca586e..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/GoogleBigQueryLinkedService.cs +++ /dev/null @@ -1,87 +0,0 @@ -// - -#nullable disable - -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// Google BigQuery service linked service. - public partial class GoogleBigQueryLinkedService : DataFactoryLinkedServiceProperties - { - /// Initializes a new instance of GoogleBigQueryLinkedService. - /// The default BigQuery project to query against. Type: string (or Expression with resultType string). - /// The OAuth 2.0 authentication mechanism used for authentication. ServiceAuthentication can only be used on self-hosted IR. - /// is null. - public GoogleBigQueryLinkedService(DataFactoryElement project, GoogleBigQueryAuthenticationType authenticationType) - { - Argument.AssertNotNull(project, nameof(project)); - - Project = project; - AuthenticationType = authenticationType; - LinkedServiceType = "GoogleBigQuery"; - } - - /// Initializes a new instance of GoogleBigQueryLinkedService. - /// Type of linked service. - /// The integration runtime reference. - /// Linked service description. - /// Parameters for linked service. - /// List of tags that can be used for describing the linked service. - /// Additional Properties. - /// The default BigQuery project to query against. Type: string (or Expression with resultType string). - /// A comma-separated list of public BigQuery projects to access. Type: string (or Expression with resultType string). - /// Whether to request access to Google Drive. Allowing Google Drive access enables support for federated tables that combine BigQuery data with data from Google Drive. The default value is false. Type: string (or Expression with resultType string). - /// The OAuth 2.0 authentication mechanism used for authentication. ServiceAuthentication can only be used on self-hosted IR. - /// The refresh token obtained from Google for authorizing access to BigQuery for UserAuthentication. - /// The client id of the google application used to acquire the refresh token. Type: string (or Expression with resultType string). - /// The client secret of the google application used to acquire the refresh token. - /// The service account email ID that is used for ServiceAuthentication and can only be used on self-hosted IR. Type: string (or Expression with resultType string). - /// The full path to the .p12 key file that is used to authenticate the service account email address and can only be used on self-hosted IR. Type: string (or Expression with resultType string). - /// The full path of the .pem file containing trusted CA certificates for verifying the server when connecting over SSL. This property can only be set when using SSL on self-hosted IR. The default value is the cacerts.pem file installed with the IR. Type: string (or Expression with resultType string). - /// Specifies whether to use a CA certificate from the system trust store or from a specified PEM file. The default value is false.Type: boolean (or Expression with resultType boolean). - /// The encrypted credential used for authentication. Credentials are encrypted using the integration runtime credential manager. Type: string. - internal GoogleBigQueryLinkedService(string linkedServiceType, IntegrationRuntimeReference connectVia, string description, IDictionary parameters, IList annotations, IDictionary> additionalProperties, DataFactoryElement project, DataFactoryElement additionalProjects, DataFactoryElement requestGoogleDriveScope, GoogleBigQueryAuthenticationType authenticationType, DataFactorySecretBaseDefinition refreshToken, DataFactoryElement clientId, DataFactorySecretBaseDefinition clientSecret, DataFactoryElement email, DataFactoryElement keyFilePath, DataFactoryElement trustedCertPath, DataFactoryElement useSystemTrustStore, string encryptedCredential) : base(linkedServiceType, connectVia, description, parameters, annotations, additionalProperties) - { - Project = project; - AdditionalProjects = additionalProjects; - RequestGoogleDriveScope = requestGoogleDriveScope; - AuthenticationType = authenticationType; - RefreshToken = refreshToken; - ClientId = clientId; - ClientSecret = clientSecret; - Email = email; - KeyFilePath = keyFilePath; - TrustedCertPath = trustedCertPath; - UseSystemTrustStore = useSystemTrustStore; - EncryptedCredential = encryptedCredential; - LinkedServiceType = linkedServiceType ?? "GoogleBigQuery"; - } - - /// The default BigQuery project to query against. Type: string (or Expression with resultType string). - public DataFactoryElement Project { get; set; } - /// A comma-separated list of public BigQuery projects to access. Type: string (or Expression with resultType string). - public DataFactoryElement AdditionalProjects { get; set; } - /// Whether to request access to Google Drive. Allowing Google Drive access enables support for federated tables that combine BigQuery data with data from Google Drive. The default value is false. Type: string (or Expression with resultType string). - public DataFactoryElement RequestGoogleDriveScope { get; set; } - /// The OAuth 2.0 authentication mechanism used for authentication. ServiceAuthentication can only be used on self-hosted IR. - public GoogleBigQueryAuthenticationType AuthenticationType { get; set; } - /// The refresh token obtained from Google for authorizing access to BigQuery for UserAuthentication. - public DataFactorySecretBaseDefinition RefreshToken { get; set; } - /// The client id of the google application used to acquire the refresh token. Type: string (or Expression with resultType string). - public DataFactoryElement ClientId { get; set; } - /// The client secret of the google application used to acquire the refresh token. - public DataFactorySecretBaseDefinition ClientSecret { get; set; } - /// The service account email ID that is used for ServiceAuthentication and can only be used on self-hosted IR. Type: string (or Expression with resultType string). - public DataFactoryElement Email { get; set; } - /// The full path to the .p12 key file that is used to authenticate the service account email address and can only be used on self-hosted IR. Type: string (or Expression with resultType string). - public DataFactoryElement KeyFilePath { get; set; } - /// The full path of the .pem file containing trusted CA certificates for verifying the server when connecting over SSL. This property can only be set when using SSL on self-hosted IR. The default value is the cacerts.pem file installed with the IR. Type: string (or Expression with resultType string). - public DataFactoryElement TrustedCertPath { get; set; } - /// Specifies whether to use a CA certificate from the system trust store or from a specified PEM file. The default value is false.Type: boolean (or Expression with resultType boolean). - public DataFactoryElement UseSystemTrustStore { get; set; } - /// The encrypted credential used for authentication. Credentials are encrypted using the integration runtime credential manager. Type: string. - public string EncryptedCredential { get; set; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/GoogleBigQueryObjectDataset.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/GoogleBigQueryObjectDataset.Serialization.cs deleted file mode 100644 index 2ca5dd58..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/GoogleBigQueryObjectDataset.Serialization.cs +++ /dev/null @@ -1,246 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class GoogleBigQueryObjectDataset : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - writer.WritePropertyName("type"u8); - writer.WriteStringValue(DatasetType); - if (Optional.IsDefined(Description)) - { - writer.WritePropertyName("description"u8); - writer.WriteStringValue(Description); - } - if (Optional.IsDefined(Structure)) - { - writer.WritePropertyName("structure"u8); - JsonSerializer.Serialize(writer, Structure); - } - if (Optional.IsDefined(Schema)) - { - writer.WritePropertyName("schema"u8); - JsonSerializer.Serialize(writer, Schema); - } - writer.WritePropertyName("linkedServiceName"u8); - JsonSerializer.Serialize(writer, LinkedServiceName); if (Optional.IsCollectionDefined(Parameters)) - { - writer.WritePropertyName("parameters"u8); - writer.WriteStartObject(); - foreach (var item in Parameters) - { - writer.WritePropertyName(item.Key); - writer.WriteObjectValue(item.Value); - } - writer.WriteEndObject(); - } - if (Optional.IsCollectionDefined(Annotations)) - { - writer.WritePropertyName("annotations"u8); - writer.WriteStartArray(); - foreach (var item in Annotations) - { - if (item == null) - { - writer.WriteNullValue(); - continue; - } -#if NET6_0_OR_GREATER - writer.WriteRawValue(item); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.ToString()).RootElement); -#endif - } - writer.WriteEndArray(); - } - if (Optional.IsDefined(Folder)) - { - writer.WritePropertyName("folder"u8); - writer.WriteObjectValue(Folder); - } - writer.WritePropertyName("typeProperties"u8); - writer.WriteStartObject(); - if (Optional.IsDefined(TableName)) - { - writer.WritePropertyName("tableName"u8); -#if NET6_0_OR_GREATER - writer.WriteRawValue(TableName); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(TableName.ToString()).RootElement); -#endif - } - if (Optional.IsDefined(Table)) - { - writer.WritePropertyName("table"u8); - JsonSerializer.Serialize(writer, Table); - } - if (Optional.IsDefined(Dataset)) - { - writer.WritePropertyName("dataset"u8); - JsonSerializer.Serialize(writer, Dataset); - } - writer.WriteEndObject(); - foreach (var item in AdditionalProperties) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.Value.ToString()).RootElement); -#endif - } - writer.WriteEndObject(); - } - - internal static GoogleBigQueryObjectDataset DeserializeGoogleBigQueryObjectDataset(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - string type = default; - Optional description = default; - Optional>> structure = default; - Optional>> schema = default; - DataFactoryLinkedServiceReference linkedServiceName = default; - Optional> parameters = default; - Optional> annotations = default; - Optional folder = default; - Optional tableName = default; - Optional> table = default; - Optional> dataset = default; - IDictionary> additionalProperties = default; - Dictionary> additionalPropertiesDictionary = new Dictionary>(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("type"u8)) - { - type = property.Value.GetString(); - continue; - } - if (property.NameEquals("description"u8)) - { - description = property.Value.GetString(); - continue; - } - if (property.NameEquals("structure"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - structure = JsonSerializer.Deserialize>>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("schema"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - schema = JsonSerializer.Deserialize>>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("linkedServiceName"u8)) - { - linkedServiceName = JsonSerializer.Deserialize(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("parameters"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - Dictionary dictionary = new Dictionary(); - foreach (var property0 in property.Value.EnumerateObject()) - { - dictionary.Add(property0.Name, EntityParameterSpecification.DeserializeEntityParameterSpecification(property0.Value)); - } - parameters = dictionary; - continue; - } - if (property.NameEquals("annotations"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - if (item.ValueKind == JsonValueKind.Null) - { - array.Add(null); - } - else - { - array.Add(BinaryData.FromString(item.GetRawText())); - } - } - annotations = array; - continue; - } - if (property.NameEquals("folder"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - folder = DatasetFolder.DeserializeDatasetFolder(property.Value); - continue; - } - if (property.NameEquals("typeProperties"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - foreach (var property0 in property.Value.EnumerateObject()) - { - if (property0.NameEquals("tableName"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - tableName = BinaryData.FromString(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("table"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - table = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("dataset"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - dataset = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - } - continue; - } - additionalPropertiesDictionary.Add(property.Name, JsonSerializer.Deserialize>(property.Value.GetRawText())); - } - additionalProperties = additionalPropertiesDictionary; - return new GoogleBigQueryObjectDataset(type, description.Value, structure.Value, schema.Value, linkedServiceName, Optional.ToDictionary(parameters), Optional.ToList(annotations), folder.Value, additionalProperties, tableName.Value, table.Value, dataset.Value); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/GoogleBigQueryObjectDataset.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/GoogleBigQueryObjectDataset.cs deleted file mode 100644 index 6750f424..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/GoogleBigQueryObjectDataset.cs +++ /dev/null @@ -1,80 +0,0 @@ -// - -#nullable disable - -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// Google BigQuery service dataset. - public partial class GoogleBigQueryObjectDataset : DataFactoryDatasetProperties - { - /// Initializes a new instance of GoogleBigQueryObjectDataset. - /// Linked service reference. - /// is null. - public GoogleBigQueryObjectDataset(DataFactoryLinkedServiceReference linkedServiceName) : base(linkedServiceName) - { - Argument.AssertNotNull(linkedServiceName, nameof(linkedServiceName)); - - DatasetType = "GoogleBigQueryObject"; - } - - /// Initializes a new instance of GoogleBigQueryObjectDataset. - /// Type of dataset. - /// Dataset description. - /// Columns that define the structure of the dataset. Type: array (or Expression with resultType array), itemType: DatasetDataElement. - /// Columns that define the physical type schema of the dataset. Type: array (or Expression with resultType array), itemType: DatasetSchemaDataElement. - /// Linked service reference. - /// Parameters for dataset. - /// List of tags that can be used for describing the Dataset. - /// The folder that this Dataset is in. If not specified, Dataset will appear at the root level. - /// Additional Properties. - /// This property will be retired. Please consider using database + table properties instead. - /// The table name of the Google BigQuery. Type: string (or Expression with resultType string). - /// The database name of the Google BigQuery. Type: string (or Expression with resultType string). - internal GoogleBigQueryObjectDataset(string datasetType, string description, DataFactoryElement> structure, DataFactoryElement> schema, DataFactoryLinkedServiceReference linkedServiceName, IDictionary parameters, IList annotations, DatasetFolder folder, IDictionary> additionalProperties, BinaryData tableName, DataFactoryElement table, DataFactoryElement dataset) : base(datasetType, description, structure, schema, linkedServiceName, parameters, annotations, folder, additionalProperties) - { - TableName = tableName; - Table = table; - Dataset = dataset; - DatasetType = datasetType ?? "GoogleBigQueryObject"; - } - - /// - /// This property will be retired. Please consider using database + table properties instead. - /// - /// To assign an object to this property use . - /// - /// - /// To assign an already formated json string to this property use . - /// - /// - /// Examples: - /// - /// - /// BinaryData.FromObjectAsJson("foo") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromString("\"foo\"") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromObjectAsJson(new { key = "value" }) - /// Creates a payload of { "key": "value" }. - /// - /// - /// BinaryData.FromString("{\"key\": \"value\"}") - /// Creates a payload of { "key": "value" }. - /// - /// - /// - /// - public BinaryData TableName { get; set; } - /// The table name of the Google BigQuery. Type: string (or Expression with resultType string). - public DataFactoryElement Table { get; set; } - /// The database name of the Google BigQuery. Type: string (or Expression with resultType string). - public DataFactoryElement Dataset { get; set; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/GoogleBigQuerySource.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/GoogleBigQuerySource.Serialization.cs deleted file mode 100644 index 26945bff..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/GoogleBigQuerySource.Serialization.cs +++ /dev/null @@ -1,161 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class GoogleBigQuerySource : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - if (Optional.IsDefined(Query)) - { - writer.WritePropertyName("query"u8); - JsonSerializer.Serialize(writer, Query); - } - if (Optional.IsDefined(QueryTimeout)) - { - writer.WritePropertyName("queryTimeout"u8); - JsonSerializer.Serialize(writer, QueryTimeout); - } - if (Optional.IsDefined(AdditionalColumns)) - { - writer.WritePropertyName("additionalColumns"u8); -#if NET6_0_OR_GREATER - writer.WriteRawValue(AdditionalColumns); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(AdditionalColumns.ToString()).RootElement); -#endif - } - writer.WritePropertyName("type"u8); - writer.WriteStringValue(CopySourceType); - if (Optional.IsDefined(SourceRetryCount)) - { - writer.WritePropertyName("sourceRetryCount"u8); - JsonSerializer.Serialize(writer, SourceRetryCount); - } - if (Optional.IsDefined(SourceRetryWait)) - { - writer.WritePropertyName("sourceRetryWait"u8); - JsonSerializer.Serialize(writer, SourceRetryWait); - } - if (Optional.IsDefined(MaxConcurrentConnections)) - { - writer.WritePropertyName("maxConcurrentConnections"u8); - JsonSerializer.Serialize(writer, MaxConcurrentConnections); - } - if (Optional.IsDefined(DisableMetricsCollection)) - { - writer.WritePropertyName("disableMetricsCollection"u8); - JsonSerializer.Serialize(writer, DisableMetricsCollection); - } - foreach (var item in AdditionalProperties) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.Value.ToString()).RootElement); -#endif - } - writer.WriteEndObject(); - } - - internal static GoogleBigQuerySource DeserializeGoogleBigQuerySource(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - Optional> query = default; - Optional> queryTimeout = default; - Optional additionalColumns = default; - string type = default; - Optional> sourceRetryCount = default; - Optional> sourceRetryWait = default; - Optional> maxConcurrentConnections = default; - Optional> disableMetricsCollection = default; - IDictionary> additionalProperties = default; - Dictionary> additionalPropertiesDictionary = new Dictionary>(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("query"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - query = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("queryTimeout"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - queryTimeout = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("additionalColumns"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - additionalColumns = BinaryData.FromString(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("type"u8)) - { - type = property.Value.GetString(); - continue; - } - if (property.NameEquals("sourceRetryCount"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - sourceRetryCount = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("sourceRetryWait"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - sourceRetryWait = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("maxConcurrentConnections"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - maxConcurrentConnections = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("disableMetricsCollection"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - disableMetricsCollection = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - additionalPropertiesDictionary.Add(property.Name, JsonSerializer.Deserialize>(property.Value.GetRawText())); - } - additionalProperties = additionalPropertiesDictionary; - return new GoogleBigQuerySource(type, sourceRetryCount.Value, sourceRetryWait.Value, maxConcurrentConnections.Value, disableMetricsCollection.Value, additionalProperties, queryTimeout.Value, additionalColumns.Value, query.Value); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/GoogleBigQuerySource.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/GoogleBigQuerySource.cs deleted file mode 100644 index fdb2830a..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/GoogleBigQuerySource.cs +++ /dev/null @@ -1,37 +0,0 @@ -// - -#nullable disable - -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// A copy activity Google BigQuery service source. - public partial class GoogleBigQuerySource : TabularSource - { - /// Initializes a new instance of GoogleBigQuerySource. - public GoogleBigQuerySource() - { - CopySourceType = "GoogleBigQuerySource"; - } - - /// Initializes a new instance of GoogleBigQuerySource. - /// Copy source type. - /// Source retry count. Type: integer (or Expression with resultType integer). - /// Source retry wait. Type: string (or Expression with resultType string), pattern: ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). - /// The maximum concurrent connection count for the source data store. Type: integer (or Expression with resultType integer). - /// If true, disable data store metrics collection. Default is false. Type: boolean (or Expression with resultType boolean). - /// Additional Properties. - /// 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). - /// A query to retrieve data from source. Type: string (or Expression with resultType string). - internal GoogleBigQuerySource(string copySourceType, DataFactoryElement sourceRetryCount, DataFactoryElement sourceRetryWait, DataFactoryElement maxConcurrentConnections, DataFactoryElement disableMetricsCollection, IDictionary> additionalProperties, DataFactoryElement queryTimeout, BinaryData additionalColumns, DataFactoryElement query) : base(copySourceType, sourceRetryCount, sourceRetryWait, maxConcurrentConnections, disableMetricsCollection, additionalProperties, queryTimeout, additionalColumns) - { - Query = query; - CopySourceType = copySourceType ?? "GoogleBigQuerySource"; - } - - /// A query to retrieve data from source. Type: string (or Expression with resultType string). - public DataFactoryElement Query { get; set; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/GoogleCloudStorageLinkedService.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/GoogleCloudStorageLinkedService.Serialization.cs deleted file mode 100644 index c9a96de7..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/GoogleCloudStorageLinkedService.Serialization.cs +++ /dev/null @@ -1,216 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class GoogleCloudStorageLinkedService : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - writer.WritePropertyName("type"u8); - writer.WriteStringValue(LinkedServiceType); - if (Optional.IsDefined(ConnectVia)) - { - writer.WritePropertyName("connectVia"u8); - writer.WriteObjectValue(ConnectVia); - } - if (Optional.IsDefined(Description)) - { - writer.WritePropertyName("description"u8); - writer.WriteStringValue(Description); - } - if (Optional.IsCollectionDefined(Parameters)) - { - writer.WritePropertyName("parameters"u8); - writer.WriteStartObject(); - foreach (var item in Parameters) - { - writer.WritePropertyName(item.Key); - writer.WriteObjectValue(item.Value); - } - writer.WriteEndObject(); - } - if (Optional.IsCollectionDefined(Annotations)) - { - writer.WritePropertyName("annotations"u8); - writer.WriteStartArray(); - foreach (var item in Annotations) - { - if (item == null) - { - writer.WriteNullValue(); - continue; - } -#if NET6_0_OR_GREATER - writer.WriteRawValue(item); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.ToString()).RootElement); -#endif - } - writer.WriteEndArray(); - } - writer.WritePropertyName("typeProperties"u8); - writer.WriteStartObject(); - if (Optional.IsDefined(AccessKeyId)) - { - writer.WritePropertyName("accessKeyId"u8); - JsonSerializer.Serialize(writer, AccessKeyId); - } - if (Optional.IsDefined(SecretAccessKey)) - { - writer.WritePropertyName("secretAccessKey"u8); - JsonSerializer.Serialize(writer, SecretAccessKey); - } - if (Optional.IsDefined(ServiceUri)) - { - writer.WritePropertyName("serviceUrl"u8); - JsonSerializer.Serialize(writer, ServiceUri); - } - if (Optional.IsDefined(EncryptedCredential)) - { - writer.WritePropertyName("encryptedCredential"u8); - writer.WriteStringValue(EncryptedCredential); - } - writer.WriteEndObject(); - foreach (var item in AdditionalProperties) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.Value.ToString()).RootElement); -#endif - } - writer.WriteEndObject(); - } - - internal static GoogleCloudStorageLinkedService DeserializeGoogleCloudStorageLinkedService(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - string type = default; - Optional connectVia = default; - Optional description = default; - Optional> parameters = default; - Optional> annotations = default; - Optional> accessKeyId = default; - Optional secretAccessKey = default; - Optional> serviceUrl = default; - Optional encryptedCredential = default; - IDictionary> additionalProperties = default; - Dictionary> additionalPropertiesDictionary = new Dictionary>(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("type"u8)) - { - type = property.Value.GetString(); - continue; - } - if (property.NameEquals("connectVia"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - connectVia = IntegrationRuntimeReference.DeserializeIntegrationRuntimeReference(property.Value); - continue; - } - if (property.NameEquals("description"u8)) - { - description = property.Value.GetString(); - continue; - } - if (property.NameEquals("parameters"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - Dictionary dictionary = new Dictionary(); - foreach (var property0 in property.Value.EnumerateObject()) - { - dictionary.Add(property0.Name, EntityParameterSpecification.DeserializeEntityParameterSpecification(property0.Value)); - } - parameters = dictionary; - continue; - } - if (property.NameEquals("annotations"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - if (item.ValueKind == JsonValueKind.Null) - { - array.Add(null); - } - else - { - array.Add(BinaryData.FromString(item.GetRawText())); - } - } - annotations = array; - continue; - } - if (property.NameEquals("typeProperties"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - foreach (var property0 in property.Value.EnumerateObject()) - { - if (property0.NameEquals("accessKeyId"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - accessKeyId = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("secretAccessKey"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - secretAccessKey = JsonSerializer.Deserialize(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("serviceUrl"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - serviceUrl = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("encryptedCredential"u8)) - { - encryptedCredential = property0.Value.GetString(); - continue; - } - } - continue; - } - additionalPropertiesDictionary.Add(property.Name, JsonSerializer.Deserialize>(property.Value.GetRawText())); - } - additionalProperties = additionalPropertiesDictionary; - return new GoogleCloudStorageLinkedService(type, connectVia.Value, description.Value, Optional.ToDictionary(parameters), Optional.ToList(annotations), additionalProperties, accessKeyId.Value, secretAccessKey, serviceUrl.Value, encryptedCredential.Value); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/GoogleCloudStorageLinkedService.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/GoogleCloudStorageLinkedService.cs deleted file mode 100644 index bb7637b1..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/GoogleCloudStorageLinkedService.cs +++ /dev/null @@ -1,47 +0,0 @@ -// - -#nullable disable - -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// Linked service for Google Cloud Storage. - public partial class GoogleCloudStorageLinkedService : DataFactoryLinkedServiceProperties - { - /// Initializes a new instance of GoogleCloudStorageLinkedService. - public GoogleCloudStorageLinkedService() - { - LinkedServiceType = "GoogleCloudStorage"; - } - - /// Initializes a new instance of GoogleCloudStorageLinkedService. - /// Type of linked service. - /// The integration runtime reference. - /// Linked service description. - /// Parameters for linked service. - /// List of tags that can be used for describing the linked service. - /// Additional Properties. - /// The access key identifier of the Google Cloud Storage Identity and Access Management (IAM) user. Type: string (or Expression with resultType string). - /// The secret access key of the Google Cloud Storage Identity and Access Management (IAM) user. - /// This value specifies the endpoint to access with the Google Cloud Storage Connector. This is an optional property; change it only if you want to try a different service endpoint or want to switch between https and http. Type: string (or Expression with resultType string). - /// The encrypted credential used for authentication. Credentials are encrypted using the integration runtime credential manager. Type: string. - internal GoogleCloudStorageLinkedService(string linkedServiceType, IntegrationRuntimeReference connectVia, string description, IDictionary parameters, IList annotations, IDictionary> additionalProperties, DataFactoryElement accessKeyId, DataFactorySecretBaseDefinition secretAccessKey, DataFactoryElement serviceUri, string encryptedCredential) : base(linkedServiceType, connectVia, description, parameters, annotations, additionalProperties) - { - AccessKeyId = accessKeyId; - SecretAccessKey = secretAccessKey; - ServiceUri = serviceUri; - EncryptedCredential = encryptedCredential; - LinkedServiceType = linkedServiceType ?? "GoogleCloudStorage"; - } - - /// The access key identifier of the Google Cloud Storage Identity and Access Management (IAM) user. Type: string (or Expression with resultType string). - public DataFactoryElement AccessKeyId { get; set; } - /// The secret access key of the Google Cloud Storage Identity and Access Management (IAM) user. - public DataFactorySecretBaseDefinition SecretAccessKey { get; set; } - /// This value specifies the endpoint to access with the Google Cloud Storage Connector. This is an optional property; change it only if you want to try a different service endpoint or want to switch between https and http. Type: string (or Expression with resultType string). - public DataFactoryElement ServiceUri { get; set; } - /// The encrypted credential used for authentication. Credentials are encrypted using the integration runtime credential manager. Type: string. - public string EncryptedCredential { get; set; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/GoogleCloudStorageLocation.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/GoogleCloudStorageLocation.Serialization.cs deleted file mode 100644 index be4f924e..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/GoogleCloudStorageLocation.Serialization.cs +++ /dev/null @@ -1,112 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class GoogleCloudStorageLocation : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - if (Optional.IsDefined(BucketName)) - { - writer.WritePropertyName("bucketName"u8); - JsonSerializer.Serialize(writer, BucketName); - } - if (Optional.IsDefined(Version)) - { - writer.WritePropertyName("version"u8); - JsonSerializer.Serialize(writer, Version); - } - writer.WritePropertyName("type"u8); - writer.WriteStringValue(DatasetLocationType); - if (Optional.IsDefined(FolderPath)) - { - writer.WritePropertyName("folderPath"u8); - JsonSerializer.Serialize(writer, FolderPath); - } - if (Optional.IsDefined(FileName)) - { - writer.WritePropertyName("fileName"u8); - JsonSerializer.Serialize(writer, FileName); - } - foreach (var item in AdditionalProperties) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.Value.ToString()).RootElement); -#endif - } - writer.WriteEndObject(); - } - - internal static GoogleCloudStorageLocation DeserializeGoogleCloudStorageLocation(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - Optional> bucketName = default; - Optional> version = default; - string type = default; - Optional> folderPath = default; - Optional> fileName = default; - IDictionary> additionalProperties = default; - Dictionary> additionalPropertiesDictionary = new Dictionary>(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("bucketName"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - bucketName = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("version"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - version = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("type"u8)) - { - type = property.Value.GetString(); - continue; - } - if (property.NameEquals("folderPath"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - folderPath = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("fileName"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - fileName = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - additionalPropertiesDictionary.Add(property.Name, JsonSerializer.Deserialize>(property.Value.GetRawText())); - } - additionalProperties = additionalPropertiesDictionary; - return new GoogleCloudStorageLocation(type, folderPath.Value, fileName.Value, additionalProperties, bucketName.Value, version.Value); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/GoogleCloudStorageLocation.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/GoogleCloudStorageLocation.cs deleted file mode 100644 index c93f3de2..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/GoogleCloudStorageLocation.cs +++ /dev/null @@ -1,37 +0,0 @@ -// - -#nullable disable - -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// The location of Google Cloud Storage dataset. - public partial class GoogleCloudStorageLocation : DatasetLocation - { - /// Initializes a new instance of GoogleCloudStorageLocation. - public GoogleCloudStorageLocation() - { - DatasetLocationType = "GoogleCloudStorageLocation"; - } - - /// Initializes a new instance of GoogleCloudStorageLocation. - /// Type of dataset storage location. - /// Specify the folder path of dataset. Type: string (or Expression with resultType string). - /// Specify the file name of dataset. Type: string (or Expression with resultType string). - /// Additional Properties. - /// Specify the bucketName of Google Cloud Storage. Type: string (or Expression with resultType string). - /// Specify the version of Google Cloud Storage. Type: string (or Expression with resultType string). - internal GoogleCloudStorageLocation(string datasetLocationType, DataFactoryElement folderPath, DataFactoryElement fileName, IDictionary> additionalProperties, DataFactoryElement bucketName, DataFactoryElement version) : base(datasetLocationType, folderPath, fileName, additionalProperties) - { - BucketName = bucketName; - Version = version; - DatasetLocationType = datasetLocationType ?? "GoogleCloudStorageLocation"; - } - - /// Specify the bucketName of Google Cloud Storage. Type: string (or Expression with resultType string). - public DataFactoryElement BucketName { get; set; } - /// Specify the version of Google Cloud Storage. Type: string (or Expression with resultType string). - public DataFactoryElement Version { get; set; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/GoogleCloudStorageReadSettings.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/GoogleCloudStorageReadSettings.Serialization.cs deleted file mode 100644 index 08139f17..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/GoogleCloudStorageReadSettings.Serialization.cs +++ /dev/null @@ -1,232 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class GoogleCloudStorageReadSettings : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - if (Optional.IsDefined(Recursive)) - { - writer.WritePropertyName("recursive"u8); - JsonSerializer.Serialize(writer, Recursive); - } - if (Optional.IsDefined(WildcardFolderPath)) - { - writer.WritePropertyName("wildcardFolderPath"u8); - JsonSerializer.Serialize(writer, WildcardFolderPath); - } - if (Optional.IsDefined(WildcardFileName)) - { - writer.WritePropertyName("wildcardFileName"u8); - JsonSerializer.Serialize(writer, WildcardFileName); - } - if (Optional.IsDefined(Prefix)) - { - writer.WritePropertyName("prefix"u8); - JsonSerializer.Serialize(writer, Prefix); - } - if (Optional.IsDefined(FileListPath)) - { - writer.WritePropertyName("fileListPath"u8); - JsonSerializer.Serialize(writer, FileListPath); - } - if (Optional.IsDefined(EnablePartitionDiscovery)) - { - writer.WritePropertyName("enablePartitionDiscovery"u8); - JsonSerializer.Serialize(writer, EnablePartitionDiscovery); - } - if (Optional.IsDefined(PartitionRootPath)) - { - writer.WritePropertyName("partitionRootPath"u8); - JsonSerializer.Serialize(writer, PartitionRootPath); - } - if (Optional.IsDefined(DeleteFilesAfterCompletion)) - { - writer.WritePropertyName("deleteFilesAfterCompletion"u8); - JsonSerializer.Serialize(writer, DeleteFilesAfterCompletion); - } - if (Optional.IsDefined(ModifiedDatetimeStart)) - { - writer.WritePropertyName("modifiedDatetimeStart"u8); - JsonSerializer.Serialize(writer, ModifiedDatetimeStart); - } - if (Optional.IsDefined(ModifiedDatetimeEnd)) - { - writer.WritePropertyName("modifiedDatetimeEnd"u8); - JsonSerializer.Serialize(writer, ModifiedDatetimeEnd); - } - writer.WritePropertyName("type"u8); - writer.WriteStringValue(StoreReadSettingsType); - if (Optional.IsDefined(MaxConcurrentConnections)) - { - writer.WritePropertyName("maxConcurrentConnections"u8); - JsonSerializer.Serialize(writer, MaxConcurrentConnections); - } - if (Optional.IsDefined(DisableMetricsCollection)) - { - writer.WritePropertyName("disableMetricsCollection"u8); - JsonSerializer.Serialize(writer, DisableMetricsCollection); - } - foreach (var item in AdditionalProperties) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.Value.ToString()).RootElement); -#endif - } - writer.WriteEndObject(); - } - - internal static GoogleCloudStorageReadSettings DeserializeGoogleCloudStorageReadSettings(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - Optional> recursive = default; - Optional> wildcardFolderPath = default; - Optional> wildcardFileName = default; - Optional> prefix = default; - Optional> fileListPath = default; - Optional> enablePartitionDiscovery = default; - Optional> partitionRootPath = default; - Optional> deleteFilesAfterCompletion = default; - Optional> modifiedDatetimeStart = default; - Optional> modifiedDatetimeEnd = default; - string type = default; - Optional> maxConcurrentConnections = default; - Optional> disableMetricsCollection = default; - IDictionary> additionalProperties = default; - Dictionary> additionalPropertiesDictionary = new Dictionary>(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("recursive"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - recursive = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("wildcardFolderPath"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - wildcardFolderPath = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("wildcardFileName"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - wildcardFileName = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("prefix"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - prefix = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("fileListPath"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - fileListPath = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("enablePartitionDiscovery"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - enablePartitionDiscovery = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("partitionRootPath"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - partitionRootPath = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("deleteFilesAfterCompletion"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - deleteFilesAfterCompletion = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("modifiedDatetimeStart"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - modifiedDatetimeStart = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("modifiedDatetimeEnd"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - modifiedDatetimeEnd = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("type"u8)) - { - type = property.Value.GetString(); - continue; - } - if (property.NameEquals("maxConcurrentConnections"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - maxConcurrentConnections = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("disableMetricsCollection"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - disableMetricsCollection = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - additionalPropertiesDictionary.Add(property.Name, JsonSerializer.Deserialize>(property.Value.GetRawText())); - } - additionalProperties = additionalPropertiesDictionary; - return new GoogleCloudStorageReadSettings(type, maxConcurrentConnections.Value, disableMetricsCollection.Value, additionalProperties, recursive.Value, wildcardFolderPath.Value, wildcardFileName.Value, prefix.Value, fileListPath.Value, enablePartitionDiscovery.Value, partitionRootPath.Value, deleteFilesAfterCompletion.Value, modifiedDatetimeStart.Value, modifiedDatetimeEnd.Value); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/GoogleCloudStorageReadSettings.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/GoogleCloudStorageReadSettings.cs deleted file mode 100644 index 56eb8d51..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/GoogleCloudStorageReadSettings.cs +++ /dev/null @@ -1,69 +0,0 @@ -// - -#nullable disable - -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// Google Cloud Storage read settings. - public partial class GoogleCloudStorageReadSettings : StoreReadSettings - { - /// Initializes a new instance of GoogleCloudStorageReadSettings. - public GoogleCloudStorageReadSettings() - { - StoreReadSettingsType = "GoogleCloudStorageReadSettings"; - } - - /// Initializes a new instance of GoogleCloudStorageReadSettings. - /// The read setting type. - /// The maximum concurrent connection count for the source data store. Type: integer (or Expression with resultType integer). - /// If true, disable data store metrics collection. Default is false. Type: boolean (or Expression with resultType boolean). - /// Additional Properties. - /// If true, files under the folder path will be read recursively. Default is true. Type: boolean (or Expression with resultType boolean). - /// Google Cloud Storage wildcardFolderPath. Type: string (or Expression with resultType string). - /// Google Cloud Storage wildcardFileName. Type: string (or Expression with resultType string). - /// The prefix filter for the Google Cloud Storage object name. Type: string (or Expression with resultType string). - /// Point to a text file that lists each file (relative path to the path configured in the dataset) that you want to copy. Type: string (or Expression with resultType string). - /// Indicates whether to enable partition discovery. Type: boolean (or Expression with resultType boolean). - /// Specify the root path where partition discovery starts from. Type: string (or Expression with resultType string). - /// Indicates whether the source files need to be deleted after copy completion. Default is false. Type: boolean (or Expression with resultType boolean). - /// The start of file's modified datetime. Type: string (or Expression with resultType string). - /// The end of file's modified datetime. Type: string (or Expression with resultType string). - internal GoogleCloudStorageReadSettings(string storeReadSettingsType, DataFactoryElement maxConcurrentConnections, DataFactoryElement disableMetricsCollection, IDictionary> additionalProperties, DataFactoryElement recursive, DataFactoryElement wildcardFolderPath, DataFactoryElement wildcardFileName, DataFactoryElement prefix, DataFactoryElement fileListPath, DataFactoryElement enablePartitionDiscovery, DataFactoryElement partitionRootPath, DataFactoryElement deleteFilesAfterCompletion, DataFactoryElement modifiedDatetimeStart, DataFactoryElement modifiedDatetimeEnd) : base(storeReadSettingsType, maxConcurrentConnections, disableMetricsCollection, additionalProperties) - { - Recursive = recursive; - WildcardFolderPath = wildcardFolderPath; - WildcardFileName = wildcardFileName; - Prefix = prefix; - FileListPath = fileListPath; - EnablePartitionDiscovery = enablePartitionDiscovery; - PartitionRootPath = partitionRootPath; - DeleteFilesAfterCompletion = deleteFilesAfterCompletion; - ModifiedDatetimeStart = modifiedDatetimeStart; - ModifiedDatetimeEnd = modifiedDatetimeEnd; - StoreReadSettingsType = storeReadSettingsType ?? "GoogleCloudStorageReadSettings"; - } - - /// If true, files under the folder path will be read recursively. Default is true. Type: boolean (or Expression with resultType boolean). - public DataFactoryElement Recursive { get; set; } - /// Google Cloud Storage wildcardFolderPath. Type: string (or Expression with resultType string). - public DataFactoryElement WildcardFolderPath { get; set; } - /// Google Cloud Storage wildcardFileName. Type: string (or Expression with resultType string). - public DataFactoryElement WildcardFileName { get; set; } - /// The prefix filter for the Google Cloud Storage object name. Type: string (or Expression with resultType string). - public DataFactoryElement Prefix { get; set; } - /// Point to a text file that lists each file (relative path to the path configured in the dataset) that you want to copy. Type: string (or Expression with resultType string). - public DataFactoryElement FileListPath { get; set; } - /// Indicates whether to enable partition discovery. Type: boolean (or Expression with resultType boolean). - public DataFactoryElement EnablePartitionDiscovery { get; set; } - /// Specify the root path where partition discovery starts from. Type: string (or Expression with resultType string). - public DataFactoryElement PartitionRootPath { get; set; } - /// Indicates whether the source files need to be deleted after copy completion. Default is false. Type: boolean (or Expression with resultType boolean). - public DataFactoryElement DeleteFilesAfterCompletion { get; set; } - /// The start of file's modified datetime. Type: string (or Expression with resultType string). - public DataFactoryElement ModifiedDatetimeStart { get; set; } - /// The end of file's modified datetime. Type: string (or Expression with resultType string). - public DataFactoryElement ModifiedDatetimeEnd { get; set; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/GoogleSheetsLinkedService.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/GoogleSheetsLinkedService.Serialization.cs deleted file mode 100644 index 68ce02c4..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/GoogleSheetsLinkedService.Serialization.cs +++ /dev/null @@ -1,178 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class GoogleSheetsLinkedService : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - writer.WritePropertyName("type"u8); - writer.WriteStringValue(LinkedServiceType); - if (Optional.IsDefined(ConnectVia)) - { - writer.WritePropertyName("connectVia"u8); - writer.WriteObjectValue(ConnectVia); - } - if (Optional.IsDefined(Description)) - { - writer.WritePropertyName("description"u8); - writer.WriteStringValue(Description); - } - if (Optional.IsCollectionDefined(Parameters)) - { - writer.WritePropertyName("parameters"u8); - writer.WriteStartObject(); - foreach (var item in Parameters) - { - writer.WritePropertyName(item.Key); - writer.WriteObjectValue(item.Value); - } - writer.WriteEndObject(); - } - if (Optional.IsCollectionDefined(Annotations)) - { - writer.WritePropertyName("annotations"u8); - writer.WriteStartArray(); - foreach (var item in Annotations) - { - if (item == null) - { - writer.WriteNullValue(); - continue; - } -#if NET6_0_OR_GREATER - writer.WriteRawValue(item); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.ToString()).RootElement); -#endif - } - writer.WriteEndArray(); - } - writer.WritePropertyName("typeProperties"u8); - writer.WriteStartObject(); - writer.WritePropertyName("apiToken"u8); - JsonSerializer.Serialize(writer, ApiToken); if (Optional.IsDefined(EncryptedCredential)) - { - writer.WritePropertyName("encryptedCredential"u8); - writer.WriteStringValue(EncryptedCredential); - } - writer.WriteEndObject(); - foreach (var item in AdditionalProperties) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.Value.ToString()).RootElement); -#endif - } - writer.WriteEndObject(); - } - - internal static GoogleSheetsLinkedService DeserializeGoogleSheetsLinkedService(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - string type = default; - Optional connectVia = default; - Optional description = default; - Optional> parameters = default; - Optional> annotations = default; - DataFactorySecretBaseDefinition apiToken = default; - Optional encryptedCredential = default; - IDictionary> additionalProperties = default; - Dictionary> additionalPropertiesDictionary = new Dictionary>(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("type"u8)) - { - type = property.Value.GetString(); - continue; - } - if (property.NameEquals("connectVia"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - connectVia = IntegrationRuntimeReference.DeserializeIntegrationRuntimeReference(property.Value); - continue; - } - if (property.NameEquals("description"u8)) - { - description = property.Value.GetString(); - continue; - } - if (property.NameEquals("parameters"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - Dictionary dictionary = new Dictionary(); - foreach (var property0 in property.Value.EnumerateObject()) - { - dictionary.Add(property0.Name, EntityParameterSpecification.DeserializeEntityParameterSpecification(property0.Value)); - } - parameters = dictionary; - continue; - } - if (property.NameEquals("annotations"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - if (item.ValueKind == JsonValueKind.Null) - { - array.Add(null); - } - else - { - array.Add(BinaryData.FromString(item.GetRawText())); - } - } - annotations = array; - continue; - } - if (property.NameEquals("typeProperties"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - foreach (var property0 in property.Value.EnumerateObject()) - { - if (property0.NameEquals("apiToken"u8)) - { - apiToken = JsonSerializer.Deserialize(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("encryptedCredential"u8)) - { - encryptedCredential = property0.Value.GetString(); - continue; - } - } - continue; - } - additionalPropertiesDictionary.Add(property.Name, JsonSerializer.Deserialize>(property.Value.GetRawText())); - } - additionalProperties = additionalPropertiesDictionary; - return new GoogleSheetsLinkedService(type, connectVia.Value, description.Value, Optional.ToDictionary(parameters), Optional.ToList(annotations), additionalProperties, apiToken, encryptedCredential.Value); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/GoogleSheetsLinkedService.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/GoogleSheetsLinkedService.cs deleted file mode 100644 index e8068873..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/GoogleSheetsLinkedService.cs +++ /dev/null @@ -1,45 +0,0 @@ -// - -#nullable disable - -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// Linked service for GoogleSheets. - public partial class GoogleSheetsLinkedService : DataFactoryLinkedServiceProperties - { - /// Initializes a new instance of GoogleSheetsLinkedService. - /// The api token for the GoogleSheets source. - /// is null. - public GoogleSheetsLinkedService(DataFactorySecretBaseDefinition apiToken) - { - Argument.AssertNotNull(apiToken, nameof(apiToken)); - - ApiToken = apiToken; - LinkedServiceType = "GoogleSheets"; - } - - /// Initializes a new instance of GoogleSheetsLinkedService. - /// Type of linked service. - /// The integration runtime reference. - /// Linked service description. - /// Parameters for linked service. - /// List of tags that can be used for describing the linked service. - /// Additional Properties. - /// The api token for the GoogleSheets source. - /// The encrypted credential used for authentication. Credentials are encrypted using the integration runtime credential manager. Type: string. - internal GoogleSheetsLinkedService(string linkedServiceType, IntegrationRuntimeReference connectVia, string description, IDictionary parameters, IList annotations, IDictionary> additionalProperties, DataFactorySecretBaseDefinition apiToken, string encryptedCredential) : base(linkedServiceType, connectVia, description, parameters, annotations, additionalProperties) - { - ApiToken = apiToken; - EncryptedCredential = encryptedCredential; - LinkedServiceType = linkedServiceType ?? "GoogleSheets"; - } - - /// The api token for the GoogleSheets source. - public DataFactorySecretBaseDefinition ApiToken { get; set; } - /// The encrypted credential used for authentication. Credentials are encrypted using the integration runtime credential manager. Type: string. - public string EncryptedCredential { get; set; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/GreenplumLinkedService.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/GreenplumLinkedService.Serialization.cs deleted file mode 100644 index 29b50ae5..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/GreenplumLinkedService.Serialization.cs +++ /dev/null @@ -1,205 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class GreenplumLinkedService : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - writer.WritePropertyName("type"u8); - writer.WriteStringValue(LinkedServiceType); - if (Optional.IsDefined(ConnectVia)) - { - writer.WritePropertyName("connectVia"u8); - writer.WriteObjectValue(ConnectVia); - } - if (Optional.IsDefined(Description)) - { - writer.WritePropertyName("description"u8); - writer.WriteStringValue(Description); - } - if (Optional.IsCollectionDefined(Parameters)) - { - writer.WritePropertyName("parameters"u8); - writer.WriteStartObject(); - foreach (var item in Parameters) - { - writer.WritePropertyName(item.Key); - writer.WriteObjectValue(item.Value); - } - writer.WriteEndObject(); - } - if (Optional.IsCollectionDefined(Annotations)) - { - writer.WritePropertyName("annotations"u8); - writer.WriteStartArray(); - foreach (var item in Annotations) - { - if (item == null) - { - writer.WriteNullValue(); - continue; - } -#if NET6_0_OR_GREATER - writer.WriteRawValue(item); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.ToString()).RootElement); -#endif - } - writer.WriteEndArray(); - } - writer.WritePropertyName("typeProperties"u8); - writer.WriteStartObject(); - if (Optional.IsDefined(ConnectionString)) - { - writer.WritePropertyName("connectionString"u8); -#if NET6_0_OR_GREATER - writer.WriteRawValue(ConnectionString); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(ConnectionString.ToString()).RootElement); -#endif - } - if (Optional.IsDefined(Password)) - { - writer.WritePropertyName("pwd"u8); - JsonSerializer.Serialize(writer, Password); - } - if (Optional.IsDefined(EncryptedCredential)) - { - writer.WritePropertyName("encryptedCredential"u8); - writer.WriteStringValue(EncryptedCredential); - } - writer.WriteEndObject(); - foreach (var item in AdditionalProperties) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.Value.ToString()).RootElement); -#endif - } - writer.WriteEndObject(); - } - - internal static GreenplumLinkedService DeserializeGreenplumLinkedService(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - string type = default; - Optional connectVia = default; - Optional description = default; - Optional> parameters = default; - Optional> annotations = default; - Optional connectionString = default; - Optional password = default; - Optional encryptedCredential = default; - IDictionary> additionalProperties = default; - Dictionary> additionalPropertiesDictionary = new Dictionary>(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("type"u8)) - { - type = property.Value.GetString(); - continue; - } - if (property.NameEquals("connectVia"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - connectVia = IntegrationRuntimeReference.DeserializeIntegrationRuntimeReference(property.Value); - continue; - } - if (property.NameEquals("description"u8)) - { - description = property.Value.GetString(); - continue; - } - if (property.NameEquals("parameters"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - Dictionary dictionary = new Dictionary(); - foreach (var property0 in property.Value.EnumerateObject()) - { - dictionary.Add(property0.Name, EntityParameterSpecification.DeserializeEntityParameterSpecification(property0.Value)); - } - parameters = dictionary; - continue; - } - if (property.NameEquals("annotations"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - if (item.ValueKind == JsonValueKind.Null) - { - array.Add(null); - } - else - { - array.Add(BinaryData.FromString(item.GetRawText())); - } - } - annotations = array; - continue; - } - if (property.NameEquals("typeProperties"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - foreach (var property0 in property.Value.EnumerateObject()) - { - if (property0.NameEquals("connectionString"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - connectionString = BinaryData.FromString(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("pwd"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - password = JsonSerializer.Deserialize(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("encryptedCredential"u8)) - { - encryptedCredential = property0.Value.GetString(); - continue; - } - } - continue; - } - additionalPropertiesDictionary.Add(property.Name, JsonSerializer.Deserialize>(property.Value.GetRawText())); - } - additionalProperties = additionalPropertiesDictionary; - return new GreenplumLinkedService(type, connectVia.Value, description.Value, Optional.ToDictionary(parameters), Optional.ToList(annotations), additionalProperties, connectionString.Value, password, encryptedCredential.Value); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/GreenplumLinkedService.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/GreenplumLinkedService.cs deleted file mode 100644 index 08c446b7..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/GreenplumLinkedService.cs +++ /dev/null @@ -1,72 +0,0 @@ -// - -#nullable disable - -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// Greenplum Database linked service. - public partial class GreenplumLinkedService : DataFactoryLinkedServiceProperties - { - /// Initializes a new instance of GreenplumLinkedService. - public GreenplumLinkedService() - { - LinkedServiceType = "Greenplum"; - } - - /// Initializes a new instance of GreenplumLinkedService. - /// Type of linked service. - /// The integration runtime reference. - /// Linked service description. - /// Parameters for linked service. - /// List of tags that can be used for describing the linked service. - /// Additional Properties. - /// An ODBC connection string. Type: string, SecureString or AzureKeyVaultSecretReference. - /// The Azure key vault secret reference of password in connection string. - /// The encrypted credential used for authentication. Credentials are encrypted using the integration runtime credential manager. Type: string. - internal GreenplumLinkedService(string linkedServiceType, IntegrationRuntimeReference connectVia, string description, IDictionary parameters, IList annotations, IDictionary> additionalProperties, BinaryData connectionString, DataFactoryKeyVaultSecretReference password, string encryptedCredential) : base(linkedServiceType, connectVia, description, parameters, annotations, additionalProperties) - { - ConnectionString = connectionString; - Password = password; - EncryptedCredential = encryptedCredential; - LinkedServiceType = linkedServiceType ?? "Greenplum"; - } - - /// - /// An ODBC connection string. Type: string, SecureString or AzureKeyVaultSecretReference. - /// - /// To assign an object to this property use . - /// - /// - /// To assign an already formated json string to this property use . - /// - /// - /// Examples: - /// - /// - /// BinaryData.FromObjectAsJson("foo") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromString("\"foo\"") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromObjectAsJson(new { key = "value" }) - /// Creates a payload of { "key": "value" }. - /// - /// - /// BinaryData.FromString("{\"key\": \"value\"}") - /// Creates a payload of { "key": "value" }. - /// - /// - /// - /// - public BinaryData ConnectionString { get; set; } - /// The Azure key vault secret reference of password in connection string. - public DataFactoryKeyVaultSecretReference Password { get; set; } - /// The encrypted credential used for authentication. Credentials are encrypted using the integration runtime credential manager. Type: string. - public string EncryptedCredential { get; set; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/GreenplumSource.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/GreenplumSource.Serialization.cs deleted file mode 100644 index 873fdadc..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/GreenplumSource.Serialization.cs +++ /dev/null @@ -1,161 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class GreenplumSource : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - if (Optional.IsDefined(Query)) - { - writer.WritePropertyName("query"u8); - JsonSerializer.Serialize(writer, Query); - } - if (Optional.IsDefined(QueryTimeout)) - { - writer.WritePropertyName("queryTimeout"u8); - JsonSerializer.Serialize(writer, QueryTimeout); - } - if (Optional.IsDefined(AdditionalColumns)) - { - writer.WritePropertyName("additionalColumns"u8); -#if NET6_0_OR_GREATER - writer.WriteRawValue(AdditionalColumns); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(AdditionalColumns.ToString()).RootElement); -#endif - } - writer.WritePropertyName("type"u8); - writer.WriteStringValue(CopySourceType); - if (Optional.IsDefined(SourceRetryCount)) - { - writer.WritePropertyName("sourceRetryCount"u8); - JsonSerializer.Serialize(writer, SourceRetryCount); - } - if (Optional.IsDefined(SourceRetryWait)) - { - writer.WritePropertyName("sourceRetryWait"u8); - JsonSerializer.Serialize(writer, SourceRetryWait); - } - if (Optional.IsDefined(MaxConcurrentConnections)) - { - writer.WritePropertyName("maxConcurrentConnections"u8); - JsonSerializer.Serialize(writer, MaxConcurrentConnections); - } - if (Optional.IsDefined(DisableMetricsCollection)) - { - writer.WritePropertyName("disableMetricsCollection"u8); - JsonSerializer.Serialize(writer, DisableMetricsCollection); - } - foreach (var item in AdditionalProperties) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.Value.ToString()).RootElement); -#endif - } - writer.WriteEndObject(); - } - - internal static GreenplumSource DeserializeGreenplumSource(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - Optional> query = default; - Optional> queryTimeout = default; - Optional additionalColumns = default; - string type = default; - Optional> sourceRetryCount = default; - Optional> sourceRetryWait = default; - Optional> maxConcurrentConnections = default; - Optional> disableMetricsCollection = default; - IDictionary> additionalProperties = default; - Dictionary> additionalPropertiesDictionary = new Dictionary>(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("query"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - query = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("queryTimeout"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - queryTimeout = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("additionalColumns"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - additionalColumns = BinaryData.FromString(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("type"u8)) - { - type = property.Value.GetString(); - continue; - } - if (property.NameEquals("sourceRetryCount"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - sourceRetryCount = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("sourceRetryWait"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - sourceRetryWait = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("maxConcurrentConnections"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - maxConcurrentConnections = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("disableMetricsCollection"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - disableMetricsCollection = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - additionalPropertiesDictionary.Add(property.Name, JsonSerializer.Deserialize>(property.Value.GetRawText())); - } - additionalProperties = additionalPropertiesDictionary; - return new GreenplumSource(type, sourceRetryCount.Value, sourceRetryWait.Value, maxConcurrentConnections.Value, disableMetricsCollection.Value, additionalProperties, queryTimeout.Value, additionalColumns.Value, query.Value); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/GreenplumSource.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/GreenplumSource.cs deleted file mode 100644 index 09911a67..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/GreenplumSource.cs +++ /dev/null @@ -1,37 +0,0 @@ -// - -#nullable disable - -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// A copy activity Greenplum Database source. - public partial class GreenplumSource : TabularSource - { - /// Initializes a new instance of GreenplumSource. - public GreenplumSource() - { - CopySourceType = "GreenplumSource"; - } - - /// Initializes a new instance of GreenplumSource. - /// Copy source type. - /// Source retry count. Type: integer (or Expression with resultType integer). - /// Source retry wait. Type: string (or Expression with resultType string), pattern: ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). - /// The maximum concurrent connection count for the source data store. Type: integer (or Expression with resultType integer). - /// If true, disable data store metrics collection. Default is false. Type: boolean (or Expression with resultType boolean). - /// Additional Properties. - /// 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). - /// A query to retrieve data from source. Type: string (or Expression with resultType string). - internal GreenplumSource(string copySourceType, DataFactoryElement sourceRetryCount, DataFactoryElement sourceRetryWait, DataFactoryElement maxConcurrentConnections, DataFactoryElement disableMetricsCollection, IDictionary> additionalProperties, DataFactoryElement queryTimeout, BinaryData additionalColumns, DataFactoryElement query) : base(copySourceType, sourceRetryCount, sourceRetryWait, maxConcurrentConnections, disableMetricsCollection, additionalProperties, queryTimeout, additionalColumns) - { - Query = query; - CopySourceType = copySourceType ?? "GreenplumSource"; - } - - /// A query to retrieve data from source. Type: string (or Expression with resultType string). - public DataFactoryElement Query { get; set; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/GreenplumTableDataset.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/GreenplumTableDataset.Serialization.cs deleted file mode 100644 index f2ffda6e..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/GreenplumTableDataset.Serialization.cs +++ /dev/null @@ -1,246 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class GreenplumTableDataset : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - writer.WritePropertyName("type"u8); - writer.WriteStringValue(DatasetType); - if (Optional.IsDefined(Description)) - { - writer.WritePropertyName("description"u8); - writer.WriteStringValue(Description); - } - if (Optional.IsDefined(Structure)) - { - writer.WritePropertyName("structure"u8); - JsonSerializer.Serialize(writer, Structure); - } - if (Optional.IsDefined(Schema)) - { - writer.WritePropertyName("schema"u8); - JsonSerializer.Serialize(writer, Schema); - } - writer.WritePropertyName("linkedServiceName"u8); - JsonSerializer.Serialize(writer, LinkedServiceName); if (Optional.IsCollectionDefined(Parameters)) - { - writer.WritePropertyName("parameters"u8); - writer.WriteStartObject(); - foreach (var item in Parameters) - { - writer.WritePropertyName(item.Key); - writer.WriteObjectValue(item.Value); - } - writer.WriteEndObject(); - } - if (Optional.IsCollectionDefined(Annotations)) - { - writer.WritePropertyName("annotations"u8); - writer.WriteStartArray(); - foreach (var item in Annotations) - { - if (item == null) - { - writer.WriteNullValue(); - continue; - } -#if NET6_0_OR_GREATER - writer.WriteRawValue(item); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.ToString()).RootElement); -#endif - } - writer.WriteEndArray(); - } - if (Optional.IsDefined(Folder)) - { - writer.WritePropertyName("folder"u8); - writer.WriteObjectValue(Folder); - } - writer.WritePropertyName("typeProperties"u8); - writer.WriteStartObject(); - if (Optional.IsDefined(TableName)) - { - writer.WritePropertyName("tableName"u8); -#if NET6_0_OR_GREATER - writer.WriteRawValue(TableName); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(TableName.ToString()).RootElement); -#endif - } - if (Optional.IsDefined(Table)) - { - writer.WritePropertyName("table"u8); - JsonSerializer.Serialize(writer, Table); - } - if (Optional.IsDefined(SchemaTypePropertiesSchema)) - { - writer.WritePropertyName("schema"u8); - JsonSerializer.Serialize(writer, SchemaTypePropertiesSchema); - } - writer.WriteEndObject(); - foreach (var item in AdditionalProperties) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.Value.ToString()).RootElement); -#endif - } - writer.WriteEndObject(); - } - - internal static GreenplumTableDataset DeserializeGreenplumTableDataset(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - string type = default; - Optional description = default; - Optional>> structure = default; - Optional>> schema = default; - DataFactoryLinkedServiceReference linkedServiceName = default; - Optional> parameters = default; - Optional> annotations = default; - Optional folder = default; - Optional tableName = default; - Optional> table = default; - Optional> schema0 = default; - IDictionary> additionalProperties = default; - Dictionary> additionalPropertiesDictionary = new Dictionary>(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("type"u8)) - { - type = property.Value.GetString(); - continue; - } - if (property.NameEquals("description"u8)) - { - description = property.Value.GetString(); - continue; - } - if (property.NameEquals("structure"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - structure = JsonSerializer.Deserialize>>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("schema"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - schema = JsonSerializer.Deserialize>>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("linkedServiceName"u8)) - { - linkedServiceName = JsonSerializer.Deserialize(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("parameters"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - Dictionary dictionary = new Dictionary(); - foreach (var property0 in property.Value.EnumerateObject()) - { - dictionary.Add(property0.Name, EntityParameterSpecification.DeserializeEntityParameterSpecification(property0.Value)); - } - parameters = dictionary; - continue; - } - if (property.NameEquals("annotations"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - if (item.ValueKind == JsonValueKind.Null) - { - array.Add(null); - } - else - { - array.Add(BinaryData.FromString(item.GetRawText())); - } - } - annotations = array; - continue; - } - if (property.NameEquals("folder"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - folder = DatasetFolder.DeserializeDatasetFolder(property.Value); - continue; - } - if (property.NameEquals("typeProperties"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - foreach (var property0 in property.Value.EnumerateObject()) - { - if (property0.NameEquals("tableName"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - tableName = BinaryData.FromString(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("table"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - table = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("schema"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - schema0 = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - } - continue; - } - additionalPropertiesDictionary.Add(property.Name, JsonSerializer.Deserialize>(property.Value.GetRawText())); - } - additionalProperties = additionalPropertiesDictionary; - return new GreenplumTableDataset(type, description.Value, structure.Value, schema.Value, linkedServiceName, Optional.ToDictionary(parameters), Optional.ToList(annotations), folder.Value, additionalProperties, tableName.Value, table.Value, schema0.Value); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/GreenplumTableDataset.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/GreenplumTableDataset.cs deleted file mode 100644 index d85ff084..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/GreenplumTableDataset.cs +++ /dev/null @@ -1,80 +0,0 @@ -// - -#nullable disable - -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// Greenplum Database dataset. - public partial class GreenplumTableDataset : DataFactoryDatasetProperties - { - /// Initializes a new instance of GreenplumTableDataset. - /// Linked service reference. - /// is null. - public GreenplumTableDataset(DataFactoryLinkedServiceReference linkedServiceName) : base(linkedServiceName) - { - Argument.AssertNotNull(linkedServiceName, nameof(linkedServiceName)); - - DatasetType = "GreenplumTable"; - } - - /// Initializes a new instance of GreenplumTableDataset. - /// Type of dataset. - /// Dataset description. - /// Columns that define the structure of the dataset. Type: array (or Expression with resultType array), itemType: DatasetDataElement. - /// Columns that define the physical type schema of the dataset. Type: array (or Expression with resultType array), itemType: DatasetSchemaDataElement. - /// Linked service reference. - /// Parameters for dataset. - /// List of tags that can be used for describing the Dataset. - /// The folder that this Dataset is in. If not specified, Dataset will appear at the root level. - /// Additional Properties. - /// This property will be retired. Please consider using schema + table properties instead. - /// The table name of Greenplum. Type: string (or Expression with resultType string). - /// The schema name of Greenplum. Type: string (or Expression with resultType string). - internal GreenplumTableDataset(string datasetType, string description, DataFactoryElement> structure, DataFactoryElement> schema, DataFactoryLinkedServiceReference linkedServiceName, IDictionary parameters, IList annotations, DatasetFolder folder, IDictionary> additionalProperties, BinaryData tableName, DataFactoryElement table, DataFactoryElement schemaTypePropertiesSchema) : base(datasetType, description, structure, schema, linkedServiceName, parameters, annotations, folder, additionalProperties) - { - TableName = tableName; - Table = table; - SchemaTypePropertiesSchema = schemaTypePropertiesSchema; - DatasetType = datasetType ?? "GreenplumTable"; - } - - /// - /// This property will be retired. Please consider using schema + table properties instead. - /// - /// To assign an object to this property use . - /// - /// - /// To assign an already formated json string to this property use . - /// - /// - /// Examples: - /// - /// - /// BinaryData.FromObjectAsJson("foo") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromString("\"foo\"") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromObjectAsJson(new { key = "value" }) - /// Creates a payload of { "key": "value" }. - /// - /// - /// BinaryData.FromString("{\"key\": \"value\"}") - /// Creates a payload of { "key": "value" }. - /// - /// - /// - /// - public BinaryData TableName { get; set; } - /// The table name of Greenplum. Type: string (or Expression with resultType string). - public DataFactoryElement Table { get; set; } - /// The schema name of Greenplum. Type: string (or Expression with resultType string). - public DataFactoryElement SchemaTypePropertiesSchema { get; set; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/HBaseAuthenticationType.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/HBaseAuthenticationType.cs deleted file mode 100644 index 287e5269..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/HBaseAuthenticationType.cs +++ /dev/null @@ -1,47 +0,0 @@ -// - -#nullable disable - -using System.ComponentModel; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// The authentication mechanism to use to connect to the HBase server. - public readonly partial struct HBaseAuthenticationType : IEquatable - { - private readonly string _value; - - /// Initializes a new instance of . - /// is null. - public HBaseAuthenticationType(string value) - { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } - - private const string AnonymousValue = "Anonymous"; - private const string BasicValue = "Basic"; - - /// Anonymous. - public static HBaseAuthenticationType Anonymous { get; } = new HBaseAuthenticationType(AnonymousValue); - /// Basic. - public static HBaseAuthenticationType Basic { get; } = new HBaseAuthenticationType(BasicValue); - /// Determines if two values are the same. - public static bool operator ==(HBaseAuthenticationType left, HBaseAuthenticationType right) => left.Equals(right); - /// Determines if two values are not the same. - public static bool operator !=(HBaseAuthenticationType left, HBaseAuthenticationType right) => !left.Equals(right); - /// Converts a string to a . - public static implicit operator HBaseAuthenticationType(string value) => new HBaseAuthenticationType(value); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override bool Equals(object obj) => obj is HBaseAuthenticationType other && Equals(other); - /// - public bool Equals(HBaseAuthenticationType other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override int GetHashCode() => _value?.GetHashCode() ?? 0; - /// - public override string ToString() => _value; - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/HBaseLinkedService.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/HBaseLinkedService.Serialization.cs deleted file mode 100644 index 593edfb4..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/HBaseLinkedService.Serialization.cs +++ /dev/null @@ -1,307 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class HBaseLinkedService : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - writer.WritePropertyName("type"u8); - writer.WriteStringValue(LinkedServiceType); - if (Optional.IsDefined(ConnectVia)) - { - writer.WritePropertyName("connectVia"u8); - writer.WriteObjectValue(ConnectVia); - } - if (Optional.IsDefined(Description)) - { - writer.WritePropertyName("description"u8); - writer.WriteStringValue(Description); - } - if (Optional.IsCollectionDefined(Parameters)) - { - writer.WritePropertyName("parameters"u8); - writer.WriteStartObject(); - foreach (var item in Parameters) - { - writer.WritePropertyName(item.Key); - writer.WriteObjectValue(item.Value); - } - writer.WriteEndObject(); - } - if (Optional.IsCollectionDefined(Annotations)) - { - writer.WritePropertyName("annotations"u8); - writer.WriteStartArray(); - foreach (var item in Annotations) - { - if (item == null) - { - writer.WriteNullValue(); - continue; - } -#if NET6_0_OR_GREATER - writer.WriteRawValue(item); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.ToString()).RootElement); -#endif - } - writer.WriteEndArray(); - } - writer.WritePropertyName("typeProperties"u8); - writer.WriteStartObject(); - writer.WritePropertyName("host"u8); - JsonSerializer.Serialize(writer, Host); - if (Optional.IsDefined(Port)) - { - writer.WritePropertyName("port"u8); - JsonSerializer.Serialize(writer, Port); - } - if (Optional.IsDefined(HttpPath)) - { - writer.WritePropertyName("httpPath"u8); - JsonSerializer.Serialize(writer, HttpPath); - } - writer.WritePropertyName("authenticationType"u8); - writer.WriteStringValue(AuthenticationType.ToString()); - if (Optional.IsDefined(Username)) - { - writer.WritePropertyName("username"u8); - JsonSerializer.Serialize(writer, Username); - } - if (Optional.IsDefined(Password)) - { - writer.WritePropertyName("password"u8); - JsonSerializer.Serialize(writer, Password); - } - if (Optional.IsDefined(EnableSsl)) - { - writer.WritePropertyName("enableSsl"u8); - JsonSerializer.Serialize(writer, EnableSsl); - } - if (Optional.IsDefined(TrustedCertPath)) - { - writer.WritePropertyName("trustedCertPath"u8); - JsonSerializer.Serialize(writer, TrustedCertPath); - } - if (Optional.IsDefined(AllowHostNameCNMismatch)) - { - writer.WritePropertyName("allowHostNameCNMismatch"u8); - JsonSerializer.Serialize(writer, AllowHostNameCNMismatch); - } - if (Optional.IsDefined(AllowSelfSignedServerCert)) - { - writer.WritePropertyName("allowSelfSignedServerCert"u8); - JsonSerializer.Serialize(writer, AllowSelfSignedServerCert); - } - if (Optional.IsDefined(EncryptedCredential)) - { - writer.WritePropertyName("encryptedCredential"u8); - writer.WriteStringValue(EncryptedCredential); - } - writer.WriteEndObject(); - foreach (var item in AdditionalProperties) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.Value.ToString()).RootElement); -#endif - } - writer.WriteEndObject(); - } - - internal static HBaseLinkedService DeserializeHBaseLinkedService(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - string type = default; - Optional connectVia = default; - Optional description = default; - Optional> parameters = default; - Optional> annotations = default; - DataFactoryElement host = default; - Optional> port = default; - Optional> httpPath = default; - HBaseAuthenticationType authenticationType = default; - Optional> username = default; - Optional password = default; - Optional> enableSsl = default; - Optional> trustedCertPath = default; - Optional> allowHostNameCNMismatch = default; - Optional> allowSelfSignedServerCert = default; - Optional encryptedCredential = default; - IDictionary> additionalProperties = default; - Dictionary> additionalPropertiesDictionary = new Dictionary>(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("type"u8)) - { - type = property.Value.GetString(); - continue; - } - if (property.NameEquals("connectVia"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - connectVia = IntegrationRuntimeReference.DeserializeIntegrationRuntimeReference(property.Value); - continue; - } - if (property.NameEquals("description"u8)) - { - description = property.Value.GetString(); - continue; - } - if (property.NameEquals("parameters"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - Dictionary dictionary = new Dictionary(); - foreach (var property0 in property.Value.EnumerateObject()) - { - dictionary.Add(property0.Name, EntityParameterSpecification.DeserializeEntityParameterSpecification(property0.Value)); - } - parameters = dictionary; - continue; - } - if (property.NameEquals("annotations"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - if (item.ValueKind == JsonValueKind.Null) - { - array.Add(null); - } - else - { - array.Add(BinaryData.FromString(item.GetRawText())); - } - } - annotations = array; - continue; - } - if (property.NameEquals("typeProperties"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - foreach (var property0 in property.Value.EnumerateObject()) - { - if (property0.NameEquals("host"u8)) - { - host = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("port"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - port = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("httpPath"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - httpPath = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("authenticationType"u8)) - { - authenticationType = new HBaseAuthenticationType(property0.Value.GetString()); - continue; - } - if (property0.NameEquals("username"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - username = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("password"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - password = JsonSerializer.Deserialize(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("enableSsl"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - enableSsl = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("trustedCertPath"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - trustedCertPath = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("allowHostNameCNMismatch"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - allowHostNameCNMismatch = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("allowSelfSignedServerCert"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - allowSelfSignedServerCert = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("encryptedCredential"u8)) - { - encryptedCredential = property0.Value.GetString(); - continue; - } - } - continue; - } - additionalPropertiesDictionary.Add(property.Name, JsonSerializer.Deserialize>(property.Value.GetRawText())); - } - additionalProperties = additionalPropertiesDictionary; - return new HBaseLinkedService(type, connectVia.Value, description.Value, Optional.ToDictionary(parameters), Optional.ToList(annotations), additionalProperties, host, port.Value, httpPath.Value, authenticationType, username.Value, password, enableSsl.Value, trustedCertPath.Value, allowHostNameCNMismatch.Value, allowSelfSignedServerCert.Value, encryptedCredential.Value); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/HBaseLinkedService.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/HBaseLinkedService.cs deleted file mode 100644 index 1b2bc1dd..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/HBaseLinkedService.cs +++ /dev/null @@ -1,83 +0,0 @@ -// - -#nullable disable - -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// HBase server linked service. - public partial class HBaseLinkedService : DataFactoryLinkedServiceProperties - { - /// Initializes a new instance of HBaseLinkedService. - /// The IP address or host name of the HBase server. (i.e. 192.168.222.160). - /// The authentication mechanism to use to connect to the HBase server. - /// is null. - public HBaseLinkedService(DataFactoryElement host, HBaseAuthenticationType authenticationType) - { - Argument.AssertNotNull(host, nameof(host)); - - Host = host; - AuthenticationType = authenticationType; - LinkedServiceType = "HBase"; - } - - /// Initializes a new instance of HBaseLinkedService. - /// Type of linked service. - /// The integration runtime reference. - /// Linked service description. - /// Parameters for linked service. - /// List of tags that can be used for describing the linked service. - /// Additional Properties. - /// The IP address or host name of the HBase server. (i.e. 192.168.222.160). - /// The TCP port that the HBase instance uses to listen for client connections. The default value is 9090. - /// The partial URL corresponding to the HBase server. (i.e. /gateway/sandbox/hbase/version). - /// The authentication mechanism to use to connect to the HBase server. - /// The user name used to connect to the HBase instance. - /// The password corresponding to the user name. - /// Specifies whether the connections to the server are encrypted using SSL. The default value is false. - /// The full path of the .pem file containing trusted CA certificates for verifying the server when connecting over SSL. This property can only be set when using SSL on self-hosted IR. The default value is the cacerts.pem file installed with the IR. - /// Specifies whether to require a CA-issued SSL certificate name to match the host name of the server when connecting over SSL. The default value is false. - /// Specifies whether to allow self-signed certificates from the server. The default value is false. - /// The encrypted credential used for authentication. Credentials are encrypted using the integration runtime credential manager. Type: string. - internal HBaseLinkedService(string linkedServiceType, IntegrationRuntimeReference connectVia, string description, IDictionary parameters, IList annotations, IDictionary> additionalProperties, DataFactoryElement host, DataFactoryElement port, DataFactoryElement httpPath, HBaseAuthenticationType authenticationType, DataFactoryElement username, DataFactorySecretBaseDefinition password, DataFactoryElement enableSsl, DataFactoryElement trustedCertPath, DataFactoryElement allowHostNameCNMismatch, DataFactoryElement allowSelfSignedServerCert, string encryptedCredential) : base(linkedServiceType, connectVia, description, parameters, annotations, additionalProperties) - { - Host = host; - Port = port; - HttpPath = httpPath; - AuthenticationType = authenticationType; - Username = username; - Password = password; - EnableSsl = enableSsl; - TrustedCertPath = trustedCertPath; - AllowHostNameCNMismatch = allowHostNameCNMismatch; - AllowSelfSignedServerCert = allowSelfSignedServerCert; - EncryptedCredential = encryptedCredential; - LinkedServiceType = linkedServiceType ?? "HBase"; - } - - /// The IP address or host name of the HBase server. (i.e. 192.168.222.160). - public DataFactoryElement Host { get; set; } - /// The TCP port that the HBase instance uses to listen for client connections. The default value is 9090. - public DataFactoryElement Port { get; set; } - /// The partial URL corresponding to the HBase server. (i.e. /gateway/sandbox/hbase/version). - public DataFactoryElement HttpPath { get; set; } - /// The authentication mechanism to use to connect to the HBase server. - public HBaseAuthenticationType AuthenticationType { get; set; } - /// The user name used to connect to the HBase instance. - public DataFactoryElement Username { get; set; } - /// The password corresponding to the user name. - public DataFactorySecretBaseDefinition Password { get; set; } - /// Specifies whether the connections to the server are encrypted using SSL. The default value is false. - public DataFactoryElement EnableSsl { get; set; } - /// The full path of the .pem file containing trusted CA certificates for verifying the server when connecting over SSL. This property can only be set when using SSL on self-hosted IR. The default value is the cacerts.pem file installed with the IR. - public DataFactoryElement TrustedCertPath { get; set; } - /// Specifies whether to require a CA-issued SSL certificate name to match the host name of the server when connecting over SSL. The default value is false. - public DataFactoryElement AllowHostNameCNMismatch { get; set; } - /// Specifies whether to allow self-signed certificates from the server. The default value is false. - public DataFactoryElement AllowSelfSignedServerCert { get; set; } - /// The encrypted credential used for authentication. Credentials are encrypted using the integration runtime credential manager. Type: string. - public string EncryptedCredential { get; set; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/HBaseObjectDataset.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/HBaseObjectDataset.Serialization.cs deleted file mode 100644 index f4cc75da..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/HBaseObjectDataset.Serialization.cs +++ /dev/null @@ -1,212 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class HBaseObjectDataset : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - writer.WritePropertyName("type"u8); - writer.WriteStringValue(DatasetType); - if (Optional.IsDefined(Description)) - { - writer.WritePropertyName("description"u8); - writer.WriteStringValue(Description); - } - if (Optional.IsDefined(Structure)) - { - writer.WritePropertyName("structure"u8); - JsonSerializer.Serialize(writer, Structure); - } - if (Optional.IsDefined(Schema)) - { - writer.WritePropertyName("schema"u8); - JsonSerializer.Serialize(writer, Schema); - } - writer.WritePropertyName("linkedServiceName"u8); - JsonSerializer.Serialize(writer, LinkedServiceName); if (Optional.IsCollectionDefined(Parameters)) - { - writer.WritePropertyName("parameters"u8); - writer.WriteStartObject(); - foreach (var item in Parameters) - { - writer.WritePropertyName(item.Key); - writer.WriteObjectValue(item.Value); - } - writer.WriteEndObject(); - } - if (Optional.IsCollectionDefined(Annotations)) - { - writer.WritePropertyName("annotations"u8); - writer.WriteStartArray(); - foreach (var item in Annotations) - { - if (item == null) - { - writer.WriteNullValue(); - continue; - } -#if NET6_0_OR_GREATER - writer.WriteRawValue(item); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.ToString()).RootElement); -#endif - } - writer.WriteEndArray(); - } - if (Optional.IsDefined(Folder)) - { - writer.WritePropertyName("folder"u8); - writer.WriteObjectValue(Folder); - } - writer.WritePropertyName("typeProperties"u8); - writer.WriteStartObject(); - if (Optional.IsDefined(TableName)) - { - writer.WritePropertyName("tableName"u8); - JsonSerializer.Serialize(writer, TableName); - } - writer.WriteEndObject(); - foreach (var item in AdditionalProperties) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.Value.ToString()).RootElement); -#endif - } - writer.WriteEndObject(); - } - - internal static HBaseObjectDataset DeserializeHBaseObjectDataset(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - string type = default; - Optional description = default; - Optional>> structure = default; - Optional>> schema = default; - DataFactoryLinkedServiceReference linkedServiceName = default; - Optional> parameters = default; - Optional> annotations = default; - Optional folder = default; - Optional> tableName = default; - IDictionary> additionalProperties = default; - Dictionary> additionalPropertiesDictionary = new Dictionary>(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("type"u8)) - { - type = property.Value.GetString(); - continue; - } - if (property.NameEquals("description"u8)) - { - description = property.Value.GetString(); - continue; - } - if (property.NameEquals("structure"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - structure = JsonSerializer.Deserialize>>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("schema"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - schema = JsonSerializer.Deserialize>>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("linkedServiceName"u8)) - { - linkedServiceName = JsonSerializer.Deserialize(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("parameters"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - Dictionary dictionary = new Dictionary(); - foreach (var property0 in property.Value.EnumerateObject()) - { - dictionary.Add(property0.Name, EntityParameterSpecification.DeserializeEntityParameterSpecification(property0.Value)); - } - parameters = dictionary; - continue; - } - if (property.NameEquals("annotations"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - if (item.ValueKind == JsonValueKind.Null) - { - array.Add(null); - } - else - { - array.Add(BinaryData.FromString(item.GetRawText())); - } - } - annotations = array; - continue; - } - if (property.NameEquals("folder"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - folder = DatasetFolder.DeserializeDatasetFolder(property.Value); - continue; - } - if (property.NameEquals("typeProperties"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - foreach (var property0 in property.Value.EnumerateObject()) - { - if (property0.NameEquals("tableName"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - tableName = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - } - continue; - } - additionalPropertiesDictionary.Add(property.Name, JsonSerializer.Deserialize>(property.Value.GetRawText())); - } - additionalProperties = additionalPropertiesDictionary; - return new HBaseObjectDataset(type, description.Value, structure.Value, schema.Value, linkedServiceName, Optional.ToDictionary(parameters), Optional.ToList(annotations), folder.Value, additionalProperties, tableName.Value); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/HBaseObjectDataset.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/HBaseObjectDataset.cs deleted file mode 100644 index c47e665b..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/HBaseObjectDataset.cs +++ /dev/null @@ -1,43 +0,0 @@ -// - -#nullable disable - -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// HBase server dataset. - public partial class HBaseObjectDataset : DataFactoryDatasetProperties - { - /// Initializes a new instance of HBaseObjectDataset. - /// Linked service reference. - /// is null. - public HBaseObjectDataset(DataFactoryLinkedServiceReference linkedServiceName) : base(linkedServiceName) - { - Argument.AssertNotNull(linkedServiceName, nameof(linkedServiceName)); - - DatasetType = "HBaseObject"; - } - - /// Initializes a new instance of HBaseObjectDataset. - /// Type of dataset. - /// Dataset description. - /// Columns that define the structure of the dataset. Type: array (or Expression with resultType array), itemType: DatasetDataElement. - /// Columns that define the physical type schema of the dataset. Type: array (or Expression with resultType array), itemType: DatasetSchemaDataElement. - /// Linked service reference. - /// Parameters for dataset. - /// List of tags that can be used for describing the Dataset. - /// The folder that this Dataset is in. If not specified, Dataset will appear at the root level. - /// Additional Properties. - /// The table name. Type: string (or Expression with resultType string). - internal HBaseObjectDataset(string datasetType, string description, DataFactoryElement> structure, DataFactoryElement> schema, DataFactoryLinkedServiceReference linkedServiceName, IDictionary parameters, IList annotations, DatasetFolder folder, IDictionary> additionalProperties, DataFactoryElement tableName) : base(datasetType, description, structure, schema, linkedServiceName, parameters, annotations, folder, additionalProperties) - { - TableName = tableName; - DatasetType = datasetType ?? "HBaseObject"; - } - - /// The table name. Type: string (or Expression with resultType string). - public DataFactoryElement TableName { get; set; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/HBaseSource.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/HBaseSource.Serialization.cs deleted file mode 100644 index d9282652..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/HBaseSource.Serialization.cs +++ /dev/null @@ -1,161 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class HBaseSource : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - if (Optional.IsDefined(Query)) - { - writer.WritePropertyName("query"u8); - JsonSerializer.Serialize(writer, Query); - } - if (Optional.IsDefined(QueryTimeout)) - { - writer.WritePropertyName("queryTimeout"u8); - JsonSerializer.Serialize(writer, QueryTimeout); - } - if (Optional.IsDefined(AdditionalColumns)) - { - writer.WritePropertyName("additionalColumns"u8); -#if NET6_0_OR_GREATER - writer.WriteRawValue(AdditionalColumns); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(AdditionalColumns.ToString()).RootElement); -#endif - } - writer.WritePropertyName("type"u8); - writer.WriteStringValue(CopySourceType); - if (Optional.IsDefined(SourceRetryCount)) - { - writer.WritePropertyName("sourceRetryCount"u8); - JsonSerializer.Serialize(writer, SourceRetryCount); - } - if (Optional.IsDefined(SourceRetryWait)) - { - writer.WritePropertyName("sourceRetryWait"u8); - JsonSerializer.Serialize(writer, SourceRetryWait); - } - if (Optional.IsDefined(MaxConcurrentConnections)) - { - writer.WritePropertyName("maxConcurrentConnections"u8); - JsonSerializer.Serialize(writer, MaxConcurrentConnections); - } - if (Optional.IsDefined(DisableMetricsCollection)) - { - writer.WritePropertyName("disableMetricsCollection"u8); - JsonSerializer.Serialize(writer, DisableMetricsCollection); - } - foreach (var item in AdditionalProperties) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.Value.ToString()).RootElement); -#endif - } - writer.WriteEndObject(); - } - - internal static HBaseSource DeserializeHBaseSource(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - Optional> query = default; - Optional> queryTimeout = default; - Optional additionalColumns = default; - string type = default; - Optional> sourceRetryCount = default; - Optional> sourceRetryWait = default; - Optional> maxConcurrentConnections = default; - Optional> disableMetricsCollection = default; - IDictionary> additionalProperties = default; - Dictionary> additionalPropertiesDictionary = new Dictionary>(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("query"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - query = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("queryTimeout"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - queryTimeout = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("additionalColumns"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - additionalColumns = BinaryData.FromString(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("type"u8)) - { - type = property.Value.GetString(); - continue; - } - if (property.NameEquals("sourceRetryCount"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - sourceRetryCount = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("sourceRetryWait"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - sourceRetryWait = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("maxConcurrentConnections"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - maxConcurrentConnections = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("disableMetricsCollection"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - disableMetricsCollection = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - additionalPropertiesDictionary.Add(property.Name, JsonSerializer.Deserialize>(property.Value.GetRawText())); - } - additionalProperties = additionalPropertiesDictionary; - return new HBaseSource(type, sourceRetryCount.Value, sourceRetryWait.Value, maxConcurrentConnections.Value, disableMetricsCollection.Value, additionalProperties, queryTimeout.Value, additionalColumns.Value, query.Value); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/HBaseSource.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/HBaseSource.cs deleted file mode 100644 index 88a37370..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/HBaseSource.cs +++ /dev/null @@ -1,37 +0,0 @@ -// - -#nullable disable - -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// A copy activity HBase server source. - public partial class HBaseSource : TabularSource - { - /// Initializes a new instance of HBaseSource. - public HBaseSource() - { - CopySourceType = "HBaseSource"; - } - - /// Initializes a new instance of HBaseSource. - /// Copy source type. - /// Source retry count. Type: integer (or Expression with resultType integer). - /// Source retry wait. Type: string (or Expression with resultType string), pattern: ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). - /// The maximum concurrent connection count for the source data store. Type: integer (or Expression with resultType integer). - /// If true, disable data store metrics collection. Default is false. Type: boolean (or Expression with resultType boolean). - /// Additional Properties. - /// 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). - /// A query to retrieve data from source. Type: string (or Expression with resultType string). - internal HBaseSource(string copySourceType, DataFactoryElement sourceRetryCount, DataFactoryElement sourceRetryWait, DataFactoryElement maxConcurrentConnections, DataFactoryElement disableMetricsCollection, IDictionary> additionalProperties, DataFactoryElement queryTimeout, BinaryData additionalColumns, DataFactoryElement query) : base(copySourceType, sourceRetryCount, sourceRetryWait, maxConcurrentConnections, disableMetricsCollection, additionalProperties, queryTimeout, additionalColumns) - { - Query = query; - CopySourceType = copySourceType ?? "HBaseSource"; - } - - /// A query to retrieve data from source. Type: string (or Expression with resultType string). - public DataFactoryElement Query { get; set; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/HDInsightActivityDebugInfoOptionSetting.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/HDInsightActivityDebugInfoOptionSetting.cs deleted file mode 100644 index 14edda37..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/HDInsightActivityDebugInfoOptionSetting.cs +++ /dev/null @@ -1,50 +0,0 @@ -// - -#nullable disable - -using System.ComponentModel; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// The HDInsightActivityDebugInfoOption settings to use. - public readonly partial struct HDInsightActivityDebugInfoOptionSetting : IEquatable - { - private readonly string _value; - - /// Initializes a new instance of . - /// is null. - public HDInsightActivityDebugInfoOptionSetting(string value) - { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } - - private const string NoneValue = "None"; - private const string AlwaysValue = "Always"; - private const string FailureValue = "Failure"; - - /// None. - public static HDInsightActivityDebugInfoOptionSetting None { get; } = new HDInsightActivityDebugInfoOptionSetting(NoneValue); - /// Always. - public static HDInsightActivityDebugInfoOptionSetting Always { get; } = new HDInsightActivityDebugInfoOptionSetting(AlwaysValue); - /// Failure. - public static HDInsightActivityDebugInfoOptionSetting Failure { get; } = new HDInsightActivityDebugInfoOptionSetting(FailureValue); - /// Determines if two values are the same. - public static bool operator ==(HDInsightActivityDebugInfoOptionSetting left, HDInsightActivityDebugInfoOptionSetting right) => left.Equals(right); - /// Determines if two values are not the same. - public static bool operator !=(HDInsightActivityDebugInfoOptionSetting left, HDInsightActivityDebugInfoOptionSetting right) => !left.Equals(right); - /// Converts a string to a . - public static implicit operator HDInsightActivityDebugInfoOptionSetting(string value) => new HDInsightActivityDebugInfoOptionSetting(value); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override bool Equals(object obj) => obj is HDInsightActivityDebugInfoOptionSetting other && Equals(other); - /// - public bool Equals(HDInsightActivityDebugInfoOptionSetting other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override int GetHashCode() => _value?.GetHashCode() ?? 0; - /// - public override string ToString() => _value; - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/HDInsightHiveActivity.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/HDInsightHiveActivity.Serialization.cs deleted file mode 100644 index cd5b69db..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/HDInsightHiveActivity.Serialization.cs +++ /dev/null @@ -1,406 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class HDInsightHiveActivity : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - if (Optional.IsDefined(LinkedServiceName)) - { - writer.WritePropertyName("linkedServiceName"u8); - JsonSerializer.Serialize(writer, LinkedServiceName); - } - if (Optional.IsDefined(Policy)) - { - writer.WritePropertyName("policy"u8); - writer.WriteObjectValue(Policy); - } - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ActivityType); - if (Optional.IsDefined(Description)) - { - writer.WritePropertyName("description"u8); - writer.WriteStringValue(Description); - } - if (Optional.IsDefined(State)) - { - writer.WritePropertyName("state"u8); - writer.WriteStringValue(State.Value.ToString()); - } - if (Optional.IsDefined(OnInactiveMarkAs)) - { - writer.WritePropertyName("onInactiveMarkAs"u8); - writer.WriteStringValue(OnInactiveMarkAs.Value.ToString()); - } - if (Optional.IsCollectionDefined(DependsOn)) - { - writer.WritePropertyName("dependsOn"u8); - writer.WriteStartArray(); - foreach (var item in DependsOn) - { - writer.WriteObjectValue(item); - } - writer.WriteEndArray(); - } - if (Optional.IsCollectionDefined(UserProperties)) - { - writer.WritePropertyName("userProperties"u8); - writer.WriteStartArray(); - foreach (var item in UserProperties) - { - writer.WriteObjectValue(item); - } - writer.WriteEndArray(); - } - writer.WritePropertyName("typeProperties"u8); - writer.WriteStartObject(); - if (Optional.IsCollectionDefined(StorageLinkedServices)) - { - writer.WritePropertyName("storageLinkedServices"u8); - writer.WriteStartArray(); - foreach (var item in StorageLinkedServices) - { - JsonSerializer.Serialize(writer, item); - } - writer.WriteEndArray(); - } - if (Optional.IsCollectionDefined(Arguments)) - { - writer.WritePropertyName("arguments"u8); - writer.WriteStartArray(); - foreach (var item in Arguments) - { - if (item == null) - { - writer.WriteNullValue(); - continue; - } -#if NET6_0_OR_GREATER - writer.WriteRawValue(item); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.ToString()).RootElement); -#endif - } - writer.WriteEndArray(); - } - if (Optional.IsDefined(GetDebugInfo)) - { - writer.WritePropertyName("getDebugInfo"u8); - writer.WriteStringValue(GetDebugInfo.Value.ToString()); - } - if (Optional.IsDefined(ScriptPath)) - { - writer.WritePropertyName("scriptPath"u8); - JsonSerializer.Serialize(writer, ScriptPath); - } - if (Optional.IsDefined(ScriptLinkedService)) - { - writer.WritePropertyName("scriptLinkedService"u8); - JsonSerializer.Serialize(writer, ScriptLinkedService); - } - if (Optional.IsCollectionDefined(Defines)) - { - writer.WritePropertyName("defines"u8); - writer.WriteStartObject(); - foreach (var item in Defines) - { - writer.WritePropertyName(item.Key); - if (item.Value == null) - { - writer.WriteNullValue(); - continue; - } -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.Value.ToString()).RootElement); -#endif - } - writer.WriteEndObject(); - } - if (Optional.IsCollectionDefined(Variables)) - { - writer.WritePropertyName("variables"u8); - writer.WriteStartObject(); - foreach (var item in Variables) - { - writer.WritePropertyName(item.Key); - if (item.Value == null) - { - writer.WriteNullValue(); - continue; - } -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.Value.ToString()).RootElement); -#endif - } - writer.WriteEndObject(); - } - if (Optional.IsDefined(QueryTimeout)) - { - writer.WritePropertyName("queryTimeout"u8); - writer.WriteNumberValue(QueryTimeout.Value); - } - writer.WriteEndObject(); - foreach (var item in AdditionalProperties) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.Value.ToString()).RootElement); -#endif - } - writer.WriteEndObject(); - } - - internal static HDInsightHiveActivity DeserializeHDInsightHiveActivity(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - Optional linkedServiceName = default; - Optional policy = default; - string name = default; - string type = default; - Optional description = default; - Optional state = default; - Optional onInactiveMarkAs = default; - Optional> dependsOn = default; - Optional> userProperties = default; - Optional> storageLinkedServices = default; - Optional> arguments = default; - Optional getDebugInfo = default; - Optional> scriptPath = default; - Optional scriptLinkedService = default; - Optional>> defines = default; - Optional>> variables = default; - Optional queryTimeout = default; - IDictionary> additionalProperties = default; - Dictionary> additionalPropertiesDictionary = new Dictionary>(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("linkedServiceName"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - linkedServiceName = JsonSerializer.Deserialize(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("policy"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - policy = PipelineActivityPolicy.DeserializePipelineActivityPolicy(property.Value); - continue; - } - if (property.NameEquals("name"u8)) - { - name = property.Value.GetString(); - continue; - } - if (property.NameEquals("type"u8)) - { - type = property.Value.GetString(); - continue; - } - if (property.NameEquals("description"u8)) - { - description = property.Value.GetString(); - continue; - } - if (property.NameEquals("state"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - state = new PipelineActivityState(property.Value.GetString()); - continue; - } - if (property.NameEquals("onInactiveMarkAs"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - onInactiveMarkAs = new ActivityOnInactiveMarkAs(property.Value.GetString()); - continue; - } - if (property.NameEquals("dependsOn"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - array.Add(PipelineActivityDependency.DeserializePipelineActivityDependency(item)); - } - dependsOn = array; - continue; - } - if (property.NameEquals("userProperties"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - array.Add(PipelineActivityUserProperty.DeserializePipelineActivityUserProperty(item)); - } - userProperties = array; - continue; - } - if (property.NameEquals("typeProperties"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - foreach (var property0 in property.Value.EnumerateObject()) - { - if (property0.NameEquals("storageLinkedServices"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property0.Value.EnumerateArray()) - { - array.Add(JsonSerializer.Deserialize(item.GetRawText())); - } - storageLinkedServices = array; - continue; - } - if (property0.NameEquals("arguments"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property0.Value.EnumerateArray()) - { - if (item.ValueKind == JsonValueKind.Null) - { - array.Add(null); - } - else - { - array.Add(BinaryData.FromString(item.GetRawText())); - } - } - arguments = array; - continue; - } - if (property0.NameEquals("getDebugInfo"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - getDebugInfo = new HDInsightActivityDebugInfoOptionSetting(property0.Value.GetString()); - continue; - } - if (property0.NameEquals("scriptPath"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - scriptPath = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("scriptLinkedService"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - scriptLinkedService = JsonSerializer.Deserialize(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("defines"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - Dictionary> dictionary = new Dictionary>(); - foreach (var property1 in property0.Value.EnumerateObject()) - { - if (property1.Value.ValueKind == JsonValueKind.Null) - { - dictionary.Add(property1.Name, null); - } - else - { - dictionary.Add(property1.Name, JsonSerializer.Deserialize>(property1.Value.GetRawText())); - } - } - defines = dictionary; - continue; - } - if (property0.NameEquals("variables"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - Dictionary> dictionary = new Dictionary>(); - foreach (var property1 in property0.Value.EnumerateObject()) - { - if (property1.Value.ValueKind == JsonValueKind.Null) - { - dictionary.Add(property1.Name, null); - } - else - { - dictionary.Add(property1.Name, JsonSerializer.Deserialize>(property1.Value.GetRawText())); - } - } - variables = dictionary; - continue; - } - if (property0.NameEquals("queryTimeout"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - queryTimeout = property0.Value.GetInt32(); - continue; - } - } - continue; - } - additionalPropertiesDictionary.Add(property.Name, JsonSerializer.Deserialize>(property.Value.GetRawText())); - } - additionalProperties = additionalPropertiesDictionary; - return new HDInsightHiveActivity(name, type, description.Value, Optional.ToNullable(state), Optional.ToNullable(onInactiveMarkAs), Optional.ToList(dependsOn), Optional.ToList(userProperties), additionalProperties, linkedServiceName, policy.Value, Optional.ToList(storageLinkedServices), Optional.ToList(arguments), Optional.ToNullable(getDebugInfo), scriptPath.Value, scriptLinkedService, Optional.ToDictionary(defines), Optional.ToDictionary(variables), Optional.ToNullable(queryTimeout)); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/HDInsightHiveActivity.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/HDInsightHiveActivity.cs deleted file mode 100644 index 004f9b04..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/HDInsightHiveActivity.cs +++ /dev/null @@ -1,163 +0,0 @@ -// - -#nullable disable - -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// HDInsight Hive activity type. - public partial class HDInsightHiveActivity : ExecutionActivity - { - /// Initializes a new instance of HDInsightHiveActivity. - /// Activity name. - /// is null. - public HDInsightHiveActivity(string name) : base(name) - { - Argument.AssertNotNull(name, nameof(name)); - - StorageLinkedServices = new ChangeTrackingList(); - Arguments = new ChangeTrackingList(); - Defines = new ChangeTrackingDictionary>(); - Variables = new ChangeTrackingDictionary>(); - ActivityType = "HDInsightHive"; - } - - /// Initializes a new instance of HDInsightHiveActivity. - /// Activity name. - /// Type of activity. - /// Activity description. - /// Activity state. This is an optional property and if not provided, the state will be Active by default. - /// 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. - /// Activity depends on condition. - /// Activity user properties. - /// Additional Properties. - /// Linked service reference. - /// Activity policy. - /// Storage linked service references. - /// User specified arguments to HDInsightActivity. - /// Debug info option. - /// Script path. Type: string (or Expression with resultType string). - /// Script linked service reference. - /// Allows user to specify defines for Hive job request. - /// User specified arguments under hivevar namespace. - /// Query timeout value (in minutes). Effective when the HDInsight cluster is with ESP (Enterprise Security Package). - internal HDInsightHiveActivity(string name, string activityType, string description, PipelineActivityState? state, ActivityOnInactiveMarkAs? onInactiveMarkAs, IList dependsOn, IList userProperties, IDictionary> additionalProperties, DataFactoryLinkedServiceReference linkedServiceName, PipelineActivityPolicy policy, IList storageLinkedServices, IList arguments, HDInsightActivityDebugInfoOptionSetting? getDebugInfo, DataFactoryElement scriptPath, DataFactoryLinkedServiceReference scriptLinkedService, IDictionary> defines, IDictionary> variables, int? queryTimeout) : base(name, activityType, description, state, onInactiveMarkAs, dependsOn, userProperties, additionalProperties, linkedServiceName, policy) - { - StorageLinkedServices = storageLinkedServices; - Arguments = arguments; - GetDebugInfo = getDebugInfo; - ScriptPath = scriptPath; - ScriptLinkedService = scriptLinkedService; - Defines = defines; - Variables = variables; - QueryTimeout = queryTimeout; - ActivityType = activityType ?? "HDInsightHive"; - } - - /// Storage linked service references. - public IList StorageLinkedServices { get; } - /// - /// User specified arguments to HDInsightActivity. - /// - /// To assign an object to the element of this property use . - /// - /// - /// To assign an already formated json string to this property use . - /// - /// - /// Examples: - /// - /// - /// BinaryData.FromObjectAsJson("foo") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromString("\"foo\"") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromObjectAsJson(new { key = "value" }) - /// Creates a payload of { "key": "value" }. - /// - /// - /// BinaryData.FromString("{\"key\": \"value\"}") - /// Creates a payload of { "key": "value" }. - /// - /// - /// - /// - public IList Arguments { get; } - /// Debug info option. - public HDInsightActivityDebugInfoOptionSetting? GetDebugInfo { get; set; } - /// Script path. Type: string (or Expression with resultType string). - public DataFactoryElement ScriptPath { get; set; } - /// Script linked service reference. - public DataFactoryLinkedServiceReference ScriptLinkedService { get; set; } - /// - /// Allows user to specify defines for Hive job request. - /// - /// To assign an object to the value of this property use . - /// - /// - /// To assign an already formated json string to this property use . - /// - /// - /// Examples: - /// - /// - /// BinaryData.FromObjectAsJson("foo") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromString("\"foo\"") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromObjectAsJson(new { key = "value" }) - /// Creates a payload of { "key": "value" }. - /// - /// - /// BinaryData.FromString("{\"key\": \"value\"}") - /// Creates a payload of { "key": "value" }. - /// - /// - /// - /// - public IDictionary> Defines { get; } - /// - /// User specified arguments under hivevar namespace. - /// - /// To assign an object to the value of this property use . - /// - /// - /// To assign an already formated json string to this property use . - /// - /// - /// Examples: - /// - /// - /// BinaryData.FromObjectAsJson("foo") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromString("\"foo\"") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromObjectAsJson(new { key = "value" }) - /// Creates a payload of { "key": "value" }. - /// - /// - /// BinaryData.FromString("{\"key\": \"value\"}") - /// Creates a payload of { "key": "value" }. - /// - /// - /// - /// - public IDictionary> Variables { get; } - /// Query timeout value (in minutes). Effective when the HDInsight cluster is with ESP (Enterprise Security Package). - public int? QueryTimeout { get; set; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/HDInsightLinkedService.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/HDInsightLinkedService.Serialization.cs deleted file mode 100644 index 90a159b4..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/HDInsightLinkedService.Serialization.cs +++ /dev/null @@ -1,269 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class HDInsightLinkedService : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - writer.WritePropertyName("type"u8); - writer.WriteStringValue(LinkedServiceType); - if (Optional.IsDefined(ConnectVia)) - { - writer.WritePropertyName("connectVia"u8); - writer.WriteObjectValue(ConnectVia); - } - if (Optional.IsDefined(Description)) - { - writer.WritePropertyName("description"u8); - writer.WriteStringValue(Description); - } - if (Optional.IsCollectionDefined(Parameters)) - { - writer.WritePropertyName("parameters"u8); - writer.WriteStartObject(); - foreach (var item in Parameters) - { - writer.WritePropertyName(item.Key); - writer.WriteObjectValue(item.Value); - } - writer.WriteEndObject(); - } - if (Optional.IsCollectionDefined(Annotations)) - { - writer.WritePropertyName("annotations"u8); - writer.WriteStartArray(); - foreach (var item in Annotations) - { - if (item == null) - { - writer.WriteNullValue(); - continue; - } -#if NET6_0_OR_GREATER - writer.WriteRawValue(item); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.ToString()).RootElement); -#endif - } - writer.WriteEndArray(); - } - writer.WritePropertyName("typeProperties"u8); - writer.WriteStartObject(); - writer.WritePropertyName("clusterUri"u8); - JsonSerializer.Serialize(writer, ClusterUri); - if (Optional.IsDefined(UserName)) - { - writer.WritePropertyName("userName"u8); - JsonSerializer.Serialize(writer, UserName); - } - if (Optional.IsDefined(Password)) - { - writer.WritePropertyName("password"u8); - JsonSerializer.Serialize(writer, Password); - } - if (Optional.IsDefined(LinkedServiceName)) - { - writer.WritePropertyName("linkedServiceName"u8); - JsonSerializer.Serialize(writer, LinkedServiceName); - } - if (Optional.IsDefined(HcatalogLinkedServiceName)) - { - writer.WritePropertyName("hcatalogLinkedServiceName"u8); - JsonSerializer.Serialize(writer, HcatalogLinkedServiceName); - } - if (Optional.IsDefined(EncryptedCredential)) - { - writer.WritePropertyName("encryptedCredential"u8); - writer.WriteStringValue(EncryptedCredential); - } - if (Optional.IsDefined(IsEspEnabled)) - { - writer.WritePropertyName("isEspEnabled"u8); - JsonSerializer.Serialize(writer, IsEspEnabled); - } - if (Optional.IsDefined(FileSystem)) - { - writer.WritePropertyName("fileSystem"u8); - JsonSerializer.Serialize(writer, FileSystem); - } - writer.WriteEndObject(); - foreach (var item in AdditionalProperties) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.Value.ToString()).RootElement); -#endif - } - writer.WriteEndObject(); - } - - internal static HDInsightLinkedService DeserializeHDInsightLinkedService(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - string type = default; - Optional connectVia = default; - Optional description = default; - Optional> parameters = default; - Optional> annotations = default; - DataFactoryElement clusterUri = default; - Optional> userName = default; - Optional password = default; - Optional linkedServiceName = default; - Optional hcatalogLinkedServiceName = default; - Optional encryptedCredential = default; - Optional> isEspEnabled = default; - Optional> fileSystem = default; - IDictionary> additionalProperties = default; - Dictionary> additionalPropertiesDictionary = new Dictionary>(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("type"u8)) - { - type = property.Value.GetString(); - continue; - } - if (property.NameEquals("connectVia"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - connectVia = IntegrationRuntimeReference.DeserializeIntegrationRuntimeReference(property.Value); - continue; - } - if (property.NameEquals("description"u8)) - { - description = property.Value.GetString(); - continue; - } - if (property.NameEquals("parameters"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - Dictionary dictionary = new Dictionary(); - foreach (var property0 in property.Value.EnumerateObject()) - { - dictionary.Add(property0.Name, EntityParameterSpecification.DeserializeEntityParameterSpecification(property0.Value)); - } - parameters = dictionary; - continue; - } - if (property.NameEquals("annotations"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - if (item.ValueKind == JsonValueKind.Null) - { - array.Add(null); - } - else - { - array.Add(BinaryData.FromString(item.GetRawText())); - } - } - annotations = array; - continue; - } - if (property.NameEquals("typeProperties"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - foreach (var property0 in property.Value.EnumerateObject()) - { - if (property0.NameEquals("clusterUri"u8)) - { - clusterUri = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("userName"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - userName = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("password"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - password = JsonSerializer.Deserialize(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("linkedServiceName"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - linkedServiceName = JsonSerializer.Deserialize(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("hcatalogLinkedServiceName"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - hcatalogLinkedServiceName = JsonSerializer.Deserialize(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("encryptedCredential"u8)) - { - encryptedCredential = property0.Value.GetString(); - continue; - } - if (property0.NameEquals("isEspEnabled"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - isEspEnabled = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("fileSystem"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - fileSystem = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - } - continue; - } - additionalPropertiesDictionary.Add(property.Name, JsonSerializer.Deserialize>(property.Value.GetRawText())); - } - additionalProperties = additionalPropertiesDictionary; - return new HDInsightLinkedService(type, connectVia.Value, description.Value, Optional.ToDictionary(parameters), Optional.ToList(annotations), additionalProperties, clusterUri, userName.Value, password, linkedServiceName, hcatalogLinkedServiceName, encryptedCredential.Value, isEspEnabled.Value, fileSystem.Value); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/HDInsightLinkedService.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/HDInsightLinkedService.cs deleted file mode 100644 index 25c6fa24..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/HDInsightLinkedService.cs +++ /dev/null @@ -1,69 +0,0 @@ -// - -#nullable disable - -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// HDInsight linked service. - public partial class HDInsightLinkedService : DataFactoryLinkedServiceProperties - { - /// Initializes a new instance of HDInsightLinkedService. - /// HDInsight cluster URI. Type: string (or Expression with resultType string). - /// is null. - public HDInsightLinkedService(DataFactoryElement clusterUri) - { - Argument.AssertNotNull(clusterUri, nameof(clusterUri)); - - ClusterUri = clusterUri; - LinkedServiceType = "HDInsight"; - } - - /// Initializes a new instance of HDInsightLinkedService. - /// Type of linked service. - /// The integration runtime reference. - /// Linked service description. - /// Parameters for linked service. - /// List of tags that can be used for describing the linked service. - /// Additional Properties. - /// HDInsight cluster URI. Type: string (or Expression with resultType string). - /// HDInsight cluster user name. Type: string (or Expression with resultType string). - /// HDInsight cluster password. - /// The Azure Storage linked service reference. - /// A reference to the Azure SQL linked service that points to the HCatalog database. - /// The encrypted credential used for authentication. Credentials are encrypted using the integration runtime credential manager. Type: string. - /// Specify if the HDInsight is created with ESP (Enterprise Security Package). Type: Boolean. - /// Specify the FileSystem if the main storage for the HDInsight is ADLS Gen2. Type: string (or Expression with resultType string). - internal HDInsightLinkedService(string linkedServiceType, IntegrationRuntimeReference connectVia, string description, IDictionary parameters, IList annotations, IDictionary> additionalProperties, DataFactoryElement clusterUri, DataFactoryElement userName, DataFactorySecretBaseDefinition password, DataFactoryLinkedServiceReference linkedServiceName, DataFactoryLinkedServiceReference hcatalogLinkedServiceName, string encryptedCredential, DataFactoryElement isEspEnabled, DataFactoryElement fileSystem) : base(linkedServiceType, connectVia, description, parameters, annotations, additionalProperties) - { - ClusterUri = clusterUri; - UserName = userName; - Password = password; - LinkedServiceName = linkedServiceName; - HcatalogLinkedServiceName = hcatalogLinkedServiceName; - EncryptedCredential = encryptedCredential; - IsEspEnabled = isEspEnabled; - FileSystem = fileSystem; - LinkedServiceType = linkedServiceType ?? "HDInsight"; - } - - /// HDInsight cluster URI. Type: string (or Expression with resultType string). - public DataFactoryElement ClusterUri { get; set; } - /// HDInsight cluster user name. Type: string (or Expression with resultType string). - public DataFactoryElement UserName { get; set; } - /// HDInsight cluster password. - public DataFactorySecretBaseDefinition Password { get; set; } - /// The Azure Storage linked service reference. - public DataFactoryLinkedServiceReference LinkedServiceName { get; set; } - /// A reference to the Azure SQL linked service that points to the HCatalog database. - public DataFactoryLinkedServiceReference HcatalogLinkedServiceName { get; set; } - /// The encrypted credential used for authentication. Credentials are encrypted using the integration runtime credential manager. Type: string. - public string EncryptedCredential { get; set; } - /// Specify if the HDInsight is created with ESP (Enterprise Security Package). Type: Boolean. - public DataFactoryElement IsEspEnabled { get; set; } - /// Specify the FileSystem if the main storage for the HDInsight is ADLS Gen2. Type: string (or Expression with resultType string). - public DataFactoryElement FileSystem { get; set; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/HDInsightMapReduceActivity.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/HDInsightMapReduceActivity.Serialization.cs deleted file mode 100644 index ff21aeab..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/HDInsightMapReduceActivity.Serialization.cs +++ /dev/null @@ -1,391 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class HDInsightMapReduceActivity : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - if (Optional.IsDefined(LinkedServiceName)) - { - writer.WritePropertyName("linkedServiceName"u8); - JsonSerializer.Serialize(writer, LinkedServiceName); - } - if (Optional.IsDefined(Policy)) - { - writer.WritePropertyName("policy"u8); - writer.WriteObjectValue(Policy); - } - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ActivityType); - if (Optional.IsDefined(Description)) - { - writer.WritePropertyName("description"u8); - writer.WriteStringValue(Description); - } - if (Optional.IsDefined(State)) - { - writer.WritePropertyName("state"u8); - writer.WriteStringValue(State.Value.ToString()); - } - if (Optional.IsDefined(OnInactiveMarkAs)) - { - writer.WritePropertyName("onInactiveMarkAs"u8); - writer.WriteStringValue(OnInactiveMarkAs.Value.ToString()); - } - if (Optional.IsCollectionDefined(DependsOn)) - { - writer.WritePropertyName("dependsOn"u8); - writer.WriteStartArray(); - foreach (var item in DependsOn) - { - writer.WriteObjectValue(item); - } - writer.WriteEndArray(); - } - if (Optional.IsCollectionDefined(UserProperties)) - { - writer.WritePropertyName("userProperties"u8); - writer.WriteStartArray(); - foreach (var item in UserProperties) - { - writer.WriteObjectValue(item); - } - writer.WriteEndArray(); - } - writer.WritePropertyName("typeProperties"u8); - writer.WriteStartObject(); - if (Optional.IsCollectionDefined(StorageLinkedServices)) - { - writer.WritePropertyName("storageLinkedServices"u8); - writer.WriteStartArray(); - foreach (var item in StorageLinkedServices) - { - JsonSerializer.Serialize(writer, item); - } - writer.WriteEndArray(); - } - if (Optional.IsCollectionDefined(Arguments)) - { - writer.WritePropertyName("arguments"u8); - writer.WriteStartArray(); - foreach (var item in Arguments) - { - if (item == null) - { - writer.WriteNullValue(); - continue; - } -#if NET6_0_OR_GREATER - writer.WriteRawValue(item); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.ToString()).RootElement); -#endif - } - writer.WriteEndArray(); - } - if (Optional.IsDefined(GetDebugInfo)) - { - writer.WritePropertyName("getDebugInfo"u8); - writer.WriteStringValue(GetDebugInfo.Value.ToString()); - } - writer.WritePropertyName("className"u8); - JsonSerializer.Serialize(writer, ClassName); - writer.WritePropertyName("jarFilePath"u8); - JsonSerializer.Serialize(writer, JarFilePath); - if (Optional.IsDefined(JarLinkedService)) - { - writer.WritePropertyName("jarLinkedService"u8); - JsonSerializer.Serialize(writer, JarLinkedService); - } - if (Optional.IsCollectionDefined(JarLibs)) - { - writer.WritePropertyName("jarLibs"u8); - writer.WriteStartArray(); - foreach (var item in JarLibs) - { - if (item == null) - { - writer.WriteNullValue(); - continue; - } -#if NET6_0_OR_GREATER - writer.WriteRawValue(item); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.ToString()).RootElement); -#endif - } - writer.WriteEndArray(); - } - if (Optional.IsCollectionDefined(Defines)) - { - writer.WritePropertyName("defines"u8); - writer.WriteStartObject(); - foreach (var item in Defines) - { - writer.WritePropertyName(item.Key); - if (item.Value == null) - { - writer.WriteNullValue(); - continue; - } -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.Value.ToString()).RootElement); -#endif - } - writer.WriteEndObject(); - } - writer.WriteEndObject(); - foreach (var item in AdditionalProperties) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.Value.ToString()).RootElement); -#endif - } - writer.WriteEndObject(); - } - - internal static HDInsightMapReduceActivity DeserializeHDInsightMapReduceActivity(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - Optional linkedServiceName = default; - Optional policy = default; - string name = default; - string type = default; - Optional description = default; - Optional state = default; - Optional onInactiveMarkAs = default; - Optional> dependsOn = default; - Optional> userProperties = default; - Optional> storageLinkedServices = default; - Optional> arguments = default; - Optional getDebugInfo = default; - DataFactoryElement className = default; - DataFactoryElement jarFilePath = default; - Optional jarLinkedService = default; - Optional> jarLibs = default; - Optional>> defines = default; - IDictionary> additionalProperties = default; - Dictionary> additionalPropertiesDictionary = new Dictionary>(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("linkedServiceName"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - linkedServiceName = JsonSerializer.Deserialize(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("policy"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - policy = PipelineActivityPolicy.DeserializePipelineActivityPolicy(property.Value); - continue; - } - if (property.NameEquals("name"u8)) - { - name = property.Value.GetString(); - continue; - } - if (property.NameEquals("type"u8)) - { - type = property.Value.GetString(); - continue; - } - if (property.NameEquals("description"u8)) - { - description = property.Value.GetString(); - continue; - } - if (property.NameEquals("state"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - state = new PipelineActivityState(property.Value.GetString()); - continue; - } - if (property.NameEquals("onInactiveMarkAs"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - onInactiveMarkAs = new ActivityOnInactiveMarkAs(property.Value.GetString()); - continue; - } - if (property.NameEquals("dependsOn"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - array.Add(PipelineActivityDependency.DeserializePipelineActivityDependency(item)); - } - dependsOn = array; - continue; - } - if (property.NameEquals("userProperties"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - array.Add(PipelineActivityUserProperty.DeserializePipelineActivityUserProperty(item)); - } - userProperties = array; - continue; - } - if (property.NameEquals("typeProperties"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - foreach (var property0 in property.Value.EnumerateObject()) - { - if (property0.NameEquals("storageLinkedServices"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property0.Value.EnumerateArray()) - { - array.Add(JsonSerializer.Deserialize(item.GetRawText())); - } - storageLinkedServices = array; - continue; - } - if (property0.NameEquals("arguments"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property0.Value.EnumerateArray()) - { - if (item.ValueKind == JsonValueKind.Null) - { - array.Add(null); - } - else - { - array.Add(BinaryData.FromString(item.GetRawText())); - } - } - arguments = array; - continue; - } - if (property0.NameEquals("getDebugInfo"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - getDebugInfo = new HDInsightActivityDebugInfoOptionSetting(property0.Value.GetString()); - continue; - } - if (property0.NameEquals("className"u8)) - { - className = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("jarFilePath"u8)) - { - jarFilePath = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("jarLinkedService"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - jarLinkedService = JsonSerializer.Deserialize(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("jarLibs"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property0.Value.EnumerateArray()) - { - if (item.ValueKind == JsonValueKind.Null) - { - array.Add(null); - } - else - { - array.Add(BinaryData.FromString(item.GetRawText())); - } - } - jarLibs = array; - continue; - } - if (property0.NameEquals("defines"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - Dictionary> dictionary = new Dictionary>(); - foreach (var property1 in property0.Value.EnumerateObject()) - { - if (property1.Value.ValueKind == JsonValueKind.Null) - { - dictionary.Add(property1.Name, null); - } - else - { - dictionary.Add(property1.Name, JsonSerializer.Deserialize>(property1.Value.GetRawText())); - } - } - defines = dictionary; - continue; - } - } - continue; - } - additionalPropertiesDictionary.Add(property.Name, JsonSerializer.Deserialize>(property.Value.GetRawText())); - } - additionalProperties = additionalPropertiesDictionary; - return new HDInsightMapReduceActivity(name, type, description.Value, Optional.ToNullable(state), Optional.ToNullable(onInactiveMarkAs), Optional.ToList(dependsOn), Optional.ToList(userProperties), additionalProperties, linkedServiceName, policy.Value, Optional.ToList(storageLinkedServices), Optional.ToList(arguments), Optional.ToNullable(getDebugInfo), className, jarFilePath, jarLinkedService, Optional.ToList(jarLibs), Optional.ToDictionary(defines)); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/HDInsightMapReduceActivity.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/HDInsightMapReduceActivity.cs deleted file mode 100644 index 997788c6..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/HDInsightMapReduceActivity.cs +++ /dev/null @@ -1,169 +0,0 @@ -// - -#nullable disable - -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// HDInsight MapReduce activity type. - public partial class HDInsightMapReduceActivity : ExecutionActivity - { - /// Initializes a new instance of HDInsightMapReduceActivity. - /// Activity name. - /// Class name. Type: string (or Expression with resultType string). - /// Jar path. Type: string (or Expression with resultType string). - /// , or is null. - public HDInsightMapReduceActivity(string name, DataFactoryElement className, DataFactoryElement jarFilePath) : base(name) - { - Argument.AssertNotNull(name, nameof(name)); - Argument.AssertNotNull(className, nameof(className)); - Argument.AssertNotNull(jarFilePath, nameof(jarFilePath)); - - StorageLinkedServices = new ChangeTrackingList(); - Arguments = new ChangeTrackingList(); - ClassName = className; - JarFilePath = jarFilePath; - JarLibs = new ChangeTrackingList(); - Defines = new ChangeTrackingDictionary>(); - ActivityType = "HDInsightMapReduce"; - } - - /// Initializes a new instance of HDInsightMapReduceActivity. - /// Activity name. - /// Type of activity. - /// Activity description. - /// Activity state. This is an optional property and if not provided, the state will be Active by default. - /// 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. - /// Activity depends on condition. - /// Activity user properties. - /// Additional Properties. - /// Linked service reference. - /// Activity policy. - /// Storage linked service references. - /// User specified arguments to HDInsightActivity. - /// Debug info option. - /// Class name. Type: string (or Expression with resultType string). - /// Jar path. Type: string (or Expression with resultType string). - /// Jar linked service reference. - /// Jar libs. - /// Allows user to specify defines for the MapReduce job request. - internal HDInsightMapReduceActivity(string name, string activityType, string description, PipelineActivityState? state, ActivityOnInactiveMarkAs? onInactiveMarkAs, IList dependsOn, IList userProperties, IDictionary> additionalProperties, DataFactoryLinkedServiceReference linkedServiceName, PipelineActivityPolicy policy, IList storageLinkedServices, IList arguments, HDInsightActivityDebugInfoOptionSetting? getDebugInfo, DataFactoryElement className, DataFactoryElement jarFilePath, DataFactoryLinkedServiceReference jarLinkedService, IList jarLibs, IDictionary> defines) : base(name, activityType, description, state, onInactiveMarkAs, dependsOn, userProperties, additionalProperties, linkedServiceName, policy) - { - StorageLinkedServices = storageLinkedServices; - Arguments = arguments; - GetDebugInfo = getDebugInfo; - ClassName = className; - JarFilePath = jarFilePath; - JarLinkedService = jarLinkedService; - JarLibs = jarLibs; - Defines = defines; - ActivityType = activityType ?? "HDInsightMapReduce"; - } - - /// Storage linked service references. - public IList StorageLinkedServices { get; } - /// - /// User specified arguments to HDInsightActivity. - /// - /// To assign an object to the element of this property use . - /// - /// - /// To assign an already formated json string to this property use . - /// - /// - /// Examples: - /// - /// - /// BinaryData.FromObjectAsJson("foo") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromString("\"foo\"") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromObjectAsJson(new { key = "value" }) - /// Creates a payload of { "key": "value" }. - /// - /// - /// BinaryData.FromString("{\"key\": \"value\"}") - /// Creates a payload of { "key": "value" }. - /// - /// - /// - /// - public IList Arguments { get; } - /// Debug info option. - public HDInsightActivityDebugInfoOptionSetting? GetDebugInfo { get; set; } - /// Class name. Type: string (or Expression with resultType string). - public DataFactoryElement ClassName { get; set; } - /// Jar path. Type: string (or Expression with resultType string). - public DataFactoryElement JarFilePath { get; set; } - /// Jar linked service reference. - public DataFactoryLinkedServiceReference JarLinkedService { get; set; } - /// - /// Jar libs. - /// - /// To assign an object to the element of this property use . - /// - /// - /// To assign an already formated json string to this property use . - /// - /// - /// Examples: - /// - /// - /// BinaryData.FromObjectAsJson("foo") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromString("\"foo\"") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromObjectAsJson(new { key = "value" }) - /// Creates a payload of { "key": "value" }. - /// - /// - /// BinaryData.FromString("{\"key\": \"value\"}") - /// Creates a payload of { "key": "value" }. - /// - /// - /// - /// - public IList JarLibs { get; } - /// - /// Allows user to specify defines for the MapReduce job request. - /// - /// To assign an object to the value of this property use . - /// - /// - /// To assign an already formated json string to this property use . - /// - /// - /// Examples: - /// - /// - /// BinaryData.FromObjectAsJson("foo") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromString("\"foo\"") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromObjectAsJson(new { key = "value" }) - /// Creates a payload of { "key": "value" }. - /// - /// - /// BinaryData.FromString("{\"key\": \"value\"}") - /// Creates a payload of { "key": "value" }. - /// - /// - /// - /// - public IDictionary> Defines { get; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/HDInsightOnDemandLinkedService.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/HDInsightOnDemandLinkedService.Serialization.cs deleted file mode 100644 index 4ac9c789..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/HDInsightOnDemandLinkedService.Serialization.cs +++ /dev/null @@ -1,680 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class HDInsightOnDemandLinkedService : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - writer.WritePropertyName("type"u8); - writer.WriteStringValue(LinkedServiceType); - if (Optional.IsDefined(ConnectVia)) - { - writer.WritePropertyName("connectVia"u8); - writer.WriteObjectValue(ConnectVia); - } - if (Optional.IsDefined(Description)) - { - writer.WritePropertyName("description"u8); - writer.WriteStringValue(Description); - } - if (Optional.IsCollectionDefined(Parameters)) - { - writer.WritePropertyName("parameters"u8); - writer.WriteStartObject(); - foreach (var item in Parameters) - { - writer.WritePropertyName(item.Key); - writer.WriteObjectValue(item.Value); - } - writer.WriteEndObject(); - } - if (Optional.IsCollectionDefined(Annotations)) - { - writer.WritePropertyName("annotations"u8); - writer.WriteStartArray(); - foreach (var item in Annotations) - { - if (item == null) - { - writer.WriteNullValue(); - continue; - } -#if NET6_0_OR_GREATER - writer.WriteRawValue(item); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.ToString()).RootElement); -#endif - } - writer.WriteEndArray(); - } - writer.WritePropertyName("typeProperties"u8); - writer.WriteStartObject(); - writer.WritePropertyName("clusterSize"u8); - JsonSerializer.Serialize(writer, ClusterSize); - writer.WritePropertyName("timeToLive"u8); - JsonSerializer.Serialize(writer, TimeToLiveExpression); - writer.WritePropertyName("version"u8); - JsonSerializer.Serialize(writer, Version); - writer.WritePropertyName("linkedServiceName"u8); - JsonSerializer.Serialize(writer, LinkedServiceName); writer.WritePropertyName("hostSubscriptionId"u8); - JsonSerializer.Serialize(writer, HostSubscriptionId); - if (Optional.IsDefined(ServicePrincipalId)) - { - writer.WritePropertyName("servicePrincipalId"u8); - JsonSerializer.Serialize(writer, ServicePrincipalId); - } - if (Optional.IsDefined(ServicePrincipalKey)) - { - writer.WritePropertyName("servicePrincipalKey"u8); - JsonSerializer.Serialize(writer, ServicePrincipalKey); - } - writer.WritePropertyName("tenant"u8); - JsonSerializer.Serialize(writer, Tenant); - writer.WritePropertyName("clusterResourceGroup"u8); - JsonSerializer.Serialize(writer, ClusterResourceGroup); - if (Optional.IsDefined(ClusterNamePrefix)) - { - writer.WritePropertyName("clusterNamePrefix"u8); - JsonSerializer.Serialize(writer, ClusterNamePrefix); - } - if (Optional.IsDefined(ClusterUserName)) - { - writer.WritePropertyName("clusterUserName"u8); - JsonSerializer.Serialize(writer, ClusterUserName); - } - if (Optional.IsDefined(ClusterPassword)) - { - writer.WritePropertyName("clusterPassword"u8); - JsonSerializer.Serialize(writer, ClusterPassword); - } - if (Optional.IsDefined(ClusterSshUserName)) - { - writer.WritePropertyName("clusterSshUserName"u8); - JsonSerializer.Serialize(writer, ClusterSshUserName); - } - if (Optional.IsDefined(ClusterSshPassword)) - { - writer.WritePropertyName("clusterSshPassword"u8); - JsonSerializer.Serialize(writer, ClusterSshPassword); - } - if (Optional.IsCollectionDefined(AdditionalLinkedServiceNames)) - { - writer.WritePropertyName("additionalLinkedServiceNames"u8); - writer.WriteStartArray(); - foreach (var item in AdditionalLinkedServiceNames) - { - JsonSerializer.Serialize(writer, item); - } - writer.WriteEndArray(); - } - if (Optional.IsDefined(HcatalogLinkedServiceName)) - { - writer.WritePropertyName("hcatalogLinkedServiceName"u8); - JsonSerializer.Serialize(writer, HcatalogLinkedServiceName); - } - if (Optional.IsDefined(ClusterType)) - { - writer.WritePropertyName("clusterType"u8); - JsonSerializer.Serialize(writer, ClusterType); - } - if (Optional.IsDefined(SparkVersion)) - { - writer.WritePropertyName("sparkVersion"u8); - JsonSerializer.Serialize(writer, SparkVersion); - } - if (Optional.IsDefined(CoreConfiguration)) - { - writer.WritePropertyName("coreConfiguration"u8); -#if NET6_0_OR_GREATER - writer.WriteRawValue(CoreConfiguration); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(CoreConfiguration.ToString()).RootElement); -#endif - } - if (Optional.IsDefined(HBaseConfiguration)) - { - writer.WritePropertyName("hBaseConfiguration"u8); -#if NET6_0_OR_GREATER - writer.WriteRawValue(HBaseConfiguration); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(HBaseConfiguration.ToString()).RootElement); -#endif - } - if (Optional.IsDefined(HdfsConfiguration)) - { - writer.WritePropertyName("hdfsConfiguration"u8); -#if NET6_0_OR_GREATER - writer.WriteRawValue(HdfsConfiguration); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(HdfsConfiguration.ToString()).RootElement); -#endif - } - if (Optional.IsDefined(HiveConfiguration)) - { - writer.WritePropertyName("hiveConfiguration"u8); -#if NET6_0_OR_GREATER - writer.WriteRawValue(HiveConfiguration); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(HiveConfiguration.ToString()).RootElement); -#endif - } - if (Optional.IsDefined(MapReduceConfiguration)) - { - writer.WritePropertyName("mapReduceConfiguration"u8); -#if NET6_0_OR_GREATER - writer.WriteRawValue(MapReduceConfiguration); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(MapReduceConfiguration.ToString()).RootElement); -#endif - } - if (Optional.IsDefined(OozieConfiguration)) - { - writer.WritePropertyName("oozieConfiguration"u8); -#if NET6_0_OR_GREATER - writer.WriteRawValue(OozieConfiguration); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(OozieConfiguration.ToString()).RootElement); -#endif - } - if (Optional.IsDefined(StormConfiguration)) - { - writer.WritePropertyName("stormConfiguration"u8); -#if NET6_0_OR_GREATER - writer.WriteRawValue(StormConfiguration); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(StormConfiguration.ToString()).RootElement); -#endif - } - if (Optional.IsDefined(YarnConfiguration)) - { - writer.WritePropertyName("yarnConfiguration"u8); -#if NET6_0_OR_GREATER - writer.WriteRawValue(YarnConfiguration); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(YarnConfiguration.ToString()).RootElement); -#endif - } - if (Optional.IsDefined(EncryptedCredential)) - { - writer.WritePropertyName("encryptedCredential"u8); - writer.WriteStringValue(EncryptedCredential); - } - if (Optional.IsDefined(HeadNodeSize)) - { - writer.WritePropertyName("headNodeSize"u8); -#if NET6_0_OR_GREATER - writer.WriteRawValue(HeadNodeSize); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(HeadNodeSize.ToString()).RootElement); -#endif - } - if (Optional.IsDefined(DataNodeSize)) - { - writer.WritePropertyName("dataNodeSize"u8); -#if NET6_0_OR_GREATER - writer.WriteRawValue(DataNodeSize); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(DataNodeSize.ToString()).RootElement); -#endif - } - if (Optional.IsDefined(ZookeeperNodeSize)) - { - writer.WritePropertyName("zookeeperNodeSize"u8); -#if NET6_0_OR_GREATER - writer.WriteRawValue(ZookeeperNodeSize); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(ZookeeperNodeSize.ToString()).RootElement); -#endif - } - if (Optional.IsCollectionDefined(ScriptActions)) - { - writer.WritePropertyName("scriptActions"u8); - writer.WriteStartArray(); - foreach (var item in ScriptActions) - { - writer.WriteObjectValue(item); - } - writer.WriteEndArray(); - } - if (Optional.IsDefined(VirtualNetworkId)) - { - writer.WritePropertyName("virtualNetworkId"u8); - JsonSerializer.Serialize(writer, VirtualNetworkId); - } - if (Optional.IsDefined(SubnetName)) - { - writer.WritePropertyName("subnetName"u8); - JsonSerializer.Serialize(writer, SubnetName); - } - if (Optional.IsDefined(Credential)) - { - writer.WritePropertyName("credential"u8); - writer.WriteObjectValue(Credential); - } - writer.WriteEndObject(); - foreach (var item in AdditionalProperties) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.Value.ToString()).RootElement); -#endif - } - writer.WriteEndObject(); - } - - internal static HDInsightOnDemandLinkedService DeserializeHDInsightOnDemandLinkedService(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - string type = default; - Optional connectVia = default; - Optional description = default; - Optional> parameters = default; - Optional> annotations = default; - DataFactoryElement clusterSize = default; - DataFactoryElement timeToLive = default; - DataFactoryElement version = default; - DataFactoryLinkedServiceReference linkedServiceName = default; - DataFactoryElement hostSubscriptionId = default; - Optional> servicePrincipalId = default; - Optional servicePrincipalKey = default; - DataFactoryElement tenant = default; - DataFactoryElement clusterResourceGroup = default; - Optional> clusterNamePrefix = default; - Optional> clusterUserName = default; - Optional clusterPassword = default; - Optional> clusterSshUserName = default; - Optional clusterSshPassword = default; - Optional> additionalLinkedServiceNames = default; - Optional hcatalogLinkedServiceName = default; - Optional> clusterType = default; - Optional> sparkVersion = default; - Optional coreConfiguration = default; - Optional hBaseConfiguration = default; - Optional hdfsConfiguration = default; - Optional hiveConfiguration = default; - Optional mapReduceConfiguration = default; - Optional oozieConfiguration = default; - Optional stormConfiguration = default; - Optional yarnConfiguration = default; - Optional encryptedCredential = default; - Optional headNodeSize = default; - Optional dataNodeSize = default; - Optional zookeeperNodeSize = default; - Optional> scriptActions = default; - Optional> virtualNetworkId = default; - Optional> subnetName = default; - Optional credential = default; - IDictionary> additionalProperties = default; - Dictionary> additionalPropertiesDictionary = new Dictionary>(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("type"u8)) - { - type = property.Value.GetString(); - continue; - } - if (property.NameEquals("connectVia"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - connectVia = IntegrationRuntimeReference.DeserializeIntegrationRuntimeReference(property.Value); - continue; - } - if (property.NameEquals("description"u8)) - { - description = property.Value.GetString(); - continue; - } - if (property.NameEquals("parameters"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - Dictionary dictionary = new Dictionary(); - foreach (var property0 in property.Value.EnumerateObject()) - { - dictionary.Add(property0.Name, EntityParameterSpecification.DeserializeEntityParameterSpecification(property0.Value)); - } - parameters = dictionary; - continue; - } - if (property.NameEquals("annotations"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - if (item.ValueKind == JsonValueKind.Null) - { - array.Add(null); - } - else - { - array.Add(BinaryData.FromString(item.GetRawText())); - } - } - annotations = array; - continue; - } - if (property.NameEquals("typeProperties"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - foreach (var property0 in property.Value.EnumerateObject()) - { - if (property0.NameEquals("clusterSize"u8)) - { - clusterSize = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("timeToLive"u8)) - { - timeToLive = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("version"u8)) - { - version = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("linkedServiceName"u8)) - { - linkedServiceName = JsonSerializer.Deserialize(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("hostSubscriptionId"u8)) - { - hostSubscriptionId = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("servicePrincipalId"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - servicePrincipalId = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("servicePrincipalKey"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - servicePrincipalKey = JsonSerializer.Deserialize(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("tenant"u8)) - { - tenant = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("clusterResourceGroup"u8)) - { - clusterResourceGroup = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("clusterNamePrefix"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - clusterNamePrefix = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("clusterUserName"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - clusterUserName = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("clusterPassword"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - clusterPassword = JsonSerializer.Deserialize(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("clusterSshUserName"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - clusterSshUserName = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("clusterSshPassword"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - clusterSshPassword = JsonSerializer.Deserialize(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("additionalLinkedServiceNames"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property0.Value.EnumerateArray()) - { - array.Add(JsonSerializer.Deserialize(item.GetRawText())); - } - additionalLinkedServiceNames = array; - continue; - } - if (property0.NameEquals("hcatalogLinkedServiceName"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - hcatalogLinkedServiceName = JsonSerializer.Deserialize(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("clusterType"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - clusterType = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("sparkVersion"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - sparkVersion = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("coreConfiguration"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - coreConfiguration = BinaryData.FromString(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("hBaseConfiguration"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - hBaseConfiguration = BinaryData.FromString(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("hdfsConfiguration"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - hdfsConfiguration = BinaryData.FromString(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("hiveConfiguration"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - hiveConfiguration = BinaryData.FromString(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("mapReduceConfiguration"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - mapReduceConfiguration = BinaryData.FromString(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("oozieConfiguration"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - oozieConfiguration = BinaryData.FromString(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("stormConfiguration"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - stormConfiguration = BinaryData.FromString(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("yarnConfiguration"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - yarnConfiguration = BinaryData.FromString(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("encryptedCredential"u8)) - { - encryptedCredential = property0.Value.GetString(); - continue; - } - if (property0.NameEquals("headNodeSize"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - headNodeSize = BinaryData.FromString(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("dataNodeSize"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - dataNodeSize = BinaryData.FromString(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("zookeeperNodeSize"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - zookeeperNodeSize = BinaryData.FromString(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("scriptActions"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property0.Value.EnumerateArray()) - { - array.Add(DataFactoryScriptAction.DeserializeDataFactoryScriptAction(item)); - } - scriptActions = array; - continue; - } - if (property0.NameEquals("virtualNetworkId"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - virtualNetworkId = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("subnetName"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - subnetName = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("credential"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - credential = DataFactoryCredentialReference.DeserializeDataFactoryCredentialReference(property0.Value); - continue; - } - } - continue; - } - additionalPropertiesDictionary.Add(property.Name, JsonSerializer.Deserialize>(property.Value.GetRawText())); - } - additionalProperties = additionalPropertiesDictionary; - return new HDInsightOnDemandLinkedService(type, connectVia.Value, description.Value, Optional.ToDictionary(parameters), Optional.ToList(annotations), additionalProperties, clusterSize, timeToLive, version, linkedServiceName, hostSubscriptionId, servicePrincipalId.Value, servicePrincipalKey, tenant, clusterResourceGroup, clusterNamePrefix.Value, clusterUserName.Value, clusterPassword, clusterSshUserName.Value, clusterSshPassword, Optional.ToList(additionalLinkedServiceNames), hcatalogLinkedServiceName, clusterType.Value, sparkVersion.Value, coreConfiguration.Value, hBaseConfiguration.Value, hdfsConfiguration.Value, hiveConfiguration.Value, mapReduceConfiguration.Value, oozieConfiguration.Value, stormConfiguration.Value, yarnConfiguration.Value, encryptedCredential.Value, headNodeSize.Value, dataNodeSize.Value, zookeeperNodeSize.Value, Optional.ToList(scriptActions), virtualNetworkId.Value, subnetName.Value, credential.Value); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/HDInsightOnDemandLinkedService.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/HDInsightOnDemandLinkedService.cs deleted file mode 100644 index 35ba5464..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/HDInsightOnDemandLinkedService.cs +++ /dev/null @@ -1,512 +0,0 @@ -// - -#nullable disable - -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// HDInsight ondemand linked service. - public partial class HDInsightOnDemandLinkedService : DataFactoryLinkedServiceProperties - { - /// Initializes a new instance of HDInsightOnDemandLinkedService. - /// Number of worker/data nodes in the cluster. Suggestion value: 4. Type: string (or Expression with resultType string). - /// The allowed idle time for the on-demand HDInsight cluster. Specifies how long the on-demand HDInsight cluster stays alive after completion of an activity run if there are no other active jobs in the cluster. The minimum value is 5 mins. Type: string (or Expression with resultType string). - /// Version of the HDInsight cluster.  Type: string (or Expression with resultType string). - /// Azure Storage linked service to be used by the on-demand cluster for storing and processing data. - /// The customer’s subscription to host the cluster. Type: string (or Expression with resultType string). - /// The Tenant id/name to which the service principal belongs. Type: string (or Expression with resultType string). - /// The resource group where the cluster belongs. Type: string (or Expression with resultType string). - /// , , , , , or is null. - public HDInsightOnDemandLinkedService(DataFactoryElement clusterSize, DataFactoryElement timeToLiveExpression, DataFactoryElement version, DataFactoryLinkedServiceReference linkedServiceName, DataFactoryElement hostSubscriptionId, DataFactoryElement tenant, DataFactoryElement clusterResourceGroup) - { - Argument.AssertNotNull(clusterSize, nameof(clusterSize)); - Argument.AssertNotNull(timeToLiveExpression, nameof(timeToLiveExpression)); - Argument.AssertNotNull(version, nameof(version)); - Argument.AssertNotNull(linkedServiceName, nameof(linkedServiceName)); - Argument.AssertNotNull(hostSubscriptionId, nameof(hostSubscriptionId)); - Argument.AssertNotNull(tenant, nameof(tenant)); - Argument.AssertNotNull(clusterResourceGroup, nameof(clusterResourceGroup)); - - ClusterSize = clusterSize; - TimeToLiveExpression = timeToLiveExpression; - Version = version; - LinkedServiceName = linkedServiceName; - HostSubscriptionId = hostSubscriptionId; - Tenant = tenant; - ClusterResourceGroup = clusterResourceGroup; - AdditionalLinkedServiceNames = new ChangeTrackingList(); - ScriptActions = new ChangeTrackingList(); - LinkedServiceType = "HDInsightOnDemand"; - } - - /// Initializes a new instance of HDInsightOnDemandLinkedService. - /// Type of linked service. - /// The integration runtime reference. - /// Linked service description. - /// Parameters for linked service. - /// List of tags that can be used for describing the linked service. - /// Additional Properties. - /// Number of worker/data nodes in the cluster. Suggestion value: 4. Type: string (or Expression with resultType string). - /// The allowed idle time for the on-demand HDInsight cluster. Specifies how long the on-demand HDInsight cluster stays alive after completion of an activity run if there are no other active jobs in the cluster. The minimum value is 5 mins. Type: string (or Expression with resultType string). - /// Version of the HDInsight cluster.  Type: string (or Expression with resultType string). - /// Azure Storage linked service to be used by the on-demand cluster for storing and processing data. - /// The customer’s subscription to host the cluster. Type: string (or Expression with resultType string). - /// The service principal id for the hostSubscriptionId. Type: string (or Expression with resultType string). - /// The key for the service principal id. - /// The Tenant id/name to which the service principal belongs. Type: string (or Expression with resultType string). - /// The resource group where the cluster belongs. Type: string (or Expression with resultType string). - /// The prefix of cluster name, postfix will be distinct with timestamp. Type: string (or Expression with resultType string). - /// The username to access the cluster. Type: string (or Expression with resultType string). - /// The password to access the cluster. - /// The username to SSH remotely connect to cluster’s node (for Linux). Type: string (or Expression with resultType string). - /// The password to SSH remotely connect cluster’s node (for Linux). - /// Specifies additional storage accounts for the HDInsight linked service so that the Data Factory service can register them on your behalf. - /// The name of Azure SQL linked service that point to the HCatalog database. The on-demand HDInsight cluster is created by using the Azure SQL database as the metastore. - /// The cluster type. Type: string (or Expression with resultType string). - /// The version of spark if the cluster type is 'spark'. Type: string (or Expression with resultType string). - /// Specifies the core configuration parameters (as in core-site.xml) for the HDInsight cluster to be created. - /// Specifies the HBase configuration parameters (hbase-site.xml) for the HDInsight cluster. - /// Specifies the HDFS configuration parameters (hdfs-site.xml) for the HDInsight cluster. - /// Specifies the hive configuration parameters (hive-site.xml) for the HDInsight cluster. - /// Specifies the MapReduce configuration parameters (mapred-site.xml) for the HDInsight cluster. - /// Specifies the Oozie configuration parameters (oozie-site.xml) for the HDInsight cluster. - /// Specifies the Storm configuration parameters (storm-site.xml) for the HDInsight cluster. - /// Specifies the Yarn configuration parameters (yarn-site.xml) for the HDInsight cluster. - /// The encrypted credential used for authentication. Credentials are encrypted using the integration runtime credential manager. Type: string. - /// Specifies the size of the head node for the HDInsight cluster. - /// Specifies the size of the data node for the HDInsight cluster. - /// Specifies the size of the Zoo Keeper node for the HDInsight cluster. - /// Custom script actions to run on HDI ondemand cluster once it's up. Please refer to https://docs.microsoft.com/en-us/azure/hdinsight/hdinsight-hadoop-customize-cluster-linux?toc=%2Fen-us%2Fazure%2Fhdinsight%2Fr-server%2FTOC.json&bc=%2Fen-us%2Fazure%2Fbread%2Ftoc.json#understanding-script-actions. - /// The ARM resource ID for the vNet to which the cluster should be joined after creation. Type: string (or Expression with resultType string). - /// The ARM resource ID for the subnet in the vNet. If virtualNetworkId was specified, then this property is required. Type: string (or Expression with resultType string). - /// The credential reference containing authentication information. - internal HDInsightOnDemandLinkedService(string linkedServiceType, IntegrationRuntimeReference connectVia, string description, IDictionary parameters, IList annotations, IDictionary> additionalProperties, DataFactoryElement clusterSize, DataFactoryElement timeToLiveExpression, DataFactoryElement version, DataFactoryLinkedServiceReference linkedServiceName, DataFactoryElement hostSubscriptionId, DataFactoryElement servicePrincipalId, DataFactorySecretBaseDefinition servicePrincipalKey, DataFactoryElement tenant, DataFactoryElement clusterResourceGroup, DataFactoryElement clusterNamePrefix, DataFactoryElement clusterUserName, DataFactorySecretBaseDefinition clusterPassword, DataFactoryElement clusterSshUserName, DataFactorySecretBaseDefinition clusterSshPassword, IList additionalLinkedServiceNames, DataFactoryLinkedServiceReference hcatalogLinkedServiceName, DataFactoryElement clusterType, DataFactoryElement sparkVersion, BinaryData coreConfiguration, BinaryData hBaseConfiguration, BinaryData hdfsConfiguration, BinaryData hiveConfiguration, BinaryData mapReduceConfiguration, BinaryData oozieConfiguration, BinaryData stormConfiguration, BinaryData yarnConfiguration, string encryptedCredential, BinaryData headNodeSize, BinaryData dataNodeSize, BinaryData zookeeperNodeSize, IList scriptActions, DataFactoryElement virtualNetworkId, DataFactoryElement subnetName, DataFactoryCredentialReference credential) : base(linkedServiceType, connectVia, description, parameters, annotations, additionalProperties) - { - ClusterSize = clusterSize; - TimeToLiveExpression = timeToLiveExpression; - Version = version; - LinkedServiceName = linkedServiceName; - HostSubscriptionId = hostSubscriptionId; - ServicePrincipalId = servicePrincipalId; - ServicePrincipalKey = servicePrincipalKey; - Tenant = tenant; - ClusterResourceGroup = clusterResourceGroup; - ClusterNamePrefix = clusterNamePrefix; - ClusterUserName = clusterUserName; - ClusterPassword = clusterPassword; - ClusterSshUserName = clusterSshUserName; - ClusterSshPassword = clusterSshPassword; - AdditionalLinkedServiceNames = additionalLinkedServiceNames; - HcatalogLinkedServiceName = hcatalogLinkedServiceName; - ClusterType = clusterType; - SparkVersion = sparkVersion; - CoreConfiguration = coreConfiguration; - HBaseConfiguration = hBaseConfiguration; - HdfsConfiguration = hdfsConfiguration; - HiveConfiguration = hiveConfiguration; - MapReduceConfiguration = mapReduceConfiguration; - OozieConfiguration = oozieConfiguration; - StormConfiguration = stormConfiguration; - YarnConfiguration = yarnConfiguration; - EncryptedCredential = encryptedCredential; - HeadNodeSize = headNodeSize; - DataNodeSize = dataNodeSize; - ZookeeperNodeSize = zookeeperNodeSize; - ScriptActions = scriptActions; - VirtualNetworkId = virtualNetworkId; - SubnetName = subnetName; - Credential = credential; - LinkedServiceType = linkedServiceType ?? "HDInsightOnDemand"; - } - - /// Number of worker/data nodes in the cluster. Suggestion value: 4. Type: string (or Expression with resultType string). - public DataFactoryElement ClusterSize { get; set; } - /// The allowed idle time for the on-demand HDInsight cluster. Specifies how long the on-demand HDInsight cluster stays alive after completion of an activity run if there are no other active jobs in the cluster. The minimum value is 5 mins. Type: string (or Expression with resultType string). - public DataFactoryElement TimeToLiveExpression { get; set; } - /// Version of the HDInsight cluster.  Type: string (or Expression with resultType string). - public DataFactoryElement Version { get; set; } - /// Azure Storage linked service to be used by the on-demand cluster for storing and processing data. - public DataFactoryLinkedServiceReference LinkedServiceName { get; set; } - /// The customer’s subscription to host the cluster. Type: string (or Expression with resultType string). - public DataFactoryElement HostSubscriptionId { get; set; } - /// The service principal id for the hostSubscriptionId. Type: string (or Expression with resultType string). - public DataFactoryElement ServicePrincipalId { get; set; } - /// The key for the service principal id. - public DataFactorySecretBaseDefinition ServicePrincipalKey { get; set; } - /// The Tenant id/name to which the service principal belongs. Type: string (or Expression with resultType string). - public DataFactoryElement Tenant { get; set; } - /// The resource group where the cluster belongs. Type: string (or Expression with resultType string). - public DataFactoryElement ClusterResourceGroup { get; set; } - /// The prefix of cluster name, postfix will be distinct with timestamp. Type: string (or Expression with resultType string). - public DataFactoryElement ClusterNamePrefix { get; set; } - /// The username to access the cluster. Type: string (or Expression with resultType string). - public DataFactoryElement ClusterUserName { get; set; } - /// The password to access the cluster. - public DataFactorySecretBaseDefinition ClusterPassword { get; set; } - /// The username to SSH remotely connect to cluster’s node (for Linux). Type: string (or Expression with resultType string). - public DataFactoryElement ClusterSshUserName { get; set; } - /// The password to SSH remotely connect cluster’s node (for Linux). - public DataFactorySecretBaseDefinition ClusterSshPassword { get; set; } - /// Specifies additional storage accounts for the HDInsight linked service so that the Data Factory service can register them on your behalf. - public IList AdditionalLinkedServiceNames { get; } - /// The name of Azure SQL linked service that point to the HCatalog database. The on-demand HDInsight cluster is created by using the Azure SQL database as the metastore. - public DataFactoryLinkedServiceReference HcatalogLinkedServiceName { get; set; } - /// The cluster type. Type: string (or Expression with resultType string). - public DataFactoryElement ClusterType { get; set; } - /// The version of spark if the cluster type is 'spark'. Type: string (or Expression with resultType string). - public DataFactoryElement SparkVersion { get; set; } - /// - /// Specifies the core configuration parameters (as in core-site.xml) for the HDInsight cluster to be created. - /// - /// To assign an object to this property use . - /// - /// - /// To assign an already formated json string to this property use . - /// - /// - /// Examples: - /// - /// - /// BinaryData.FromObjectAsJson("foo") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromString("\"foo\"") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromObjectAsJson(new { key = "value" }) - /// Creates a payload of { "key": "value" }. - /// - /// - /// BinaryData.FromString("{\"key\": \"value\"}") - /// Creates a payload of { "key": "value" }. - /// - /// - /// - /// - public BinaryData CoreConfiguration { get; set; } - /// - /// Specifies the HBase configuration parameters (hbase-site.xml) for the HDInsight cluster. - /// - /// To assign an object to this property use . - /// - /// - /// To assign an already formated json string to this property use . - /// - /// - /// Examples: - /// - /// - /// BinaryData.FromObjectAsJson("foo") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromString("\"foo\"") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromObjectAsJson(new { key = "value" }) - /// Creates a payload of { "key": "value" }. - /// - /// - /// BinaryData.FromString("{\"key\": \"value\"}") - /// Creates a payload of { "key": "value" }. - /// - /// - /// - /// - public BinaryData HBaseConfiguration { get; set; } - /// - /// Specifies the HDFS configuration parameters (hdfs-site.xml) for the HDInsight cluster. - /// - /// To assign an object to this property use . - /// - /// - /// To assign an already formated json string to this property use . - /// - /// - /// Examples: - /// - /// - /// BinaryData.FromObjectAsJson("foo") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromString("\"foo\"") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromObjectAsJson(new { key = "value" }) - /// Creates a payload of { "key": "value" }. - /// - /// - /// BinaryData.FromString("{\"key\": \"value\"}") - /// Creates a payload of { "key": "value" }. - /// - /// - /// - /// - public BinaryData HdfsConfiguration { get; set; } - /// - /// Specifies the hive configuration parameters (hive-site.xml) for the HDInsight cluster. - /// - /// To assign an object to this property use . - /// - /// - /// To assign an already formated json string to this property use . - /// - /// - /// Examples: - /// - /// - /// BinaryData.FromObjectAsJson("foo") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromString("\"foo\"") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromObjectAsJson(new { key = "value" }) - /// Creates a payload of { "key": "value" }. - /// - /// - /// BinaryData.FromString("{\"key\": \"value\"}") - /// Creates a payload of { "key": "value" }. - /// - /// - /// - /// - public BinaryData HiveConfiguration { get; set; } - /// - /// Specifies the MapReduce configuration parameters (mapred-site.xml) for the HDInsight cluster. - /// - /// To assign an object to this property use . - /// - /// - /// To assign an already formated json string to this property use . - /// - /// - /// Examples: - /// - /// - /// BinaryData.FromObjectAsJson("foo") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromString("\"foo\"") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromObjectAsJson(new { key = "value" }) - /// Creates a payload of { "key": "value" }. - /// - /// - /// BinaryData.FromString("{\"key\": \"value\"}") - /// Creates a payload of { "key": "value" }. - /// - /// - /// - /// - public BinaryData MapReduceConfiguration { get; set; } - /// - /// Specifies the Oozie configuration parameters (oozie-site.xml) for the HDInsight cluster. - /// - /// To assign an object to this property use . - /// - /// - /// To assign an already formated json string to this property use . - /// - /// - /// Examples: - /// - /// - /// BinaryData.FromObjectAsJson("foo") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromString("\"foo\"") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromObjectAsJson(new { key = "value" }) - /// Creates a payload of { "key": "value" }. - /// - /// - /// BinaryData.FromString("{\"key\": \"value\"}") - /// Creates a payload of { "key": "value" }. - /// - /// - /// - /// - public BinaryData OozieConfiguration { get; set; } - /// - /// Specifies the Storm configuration parameters (storm-site.xml) for the HDInsight cluster. - /// - /// To assign an object to this property use . - /// - /// - /// To assign an already formated json string to this property use . - /// - /// - /// Examples: - /// - /// - /// BinaryData.FromObjectAsJson("foo") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromString("\"foo\"") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromObjectAsJson(new { key = "value" }) - /// Creates a payload of { "key": "value" }. - /// - /// - /// BinaryData.FromString("{\"key\": \"value\"}") - /// Creates a payload of { "key": "value" }. - /// - /// - /// - /// - public BinaryData StormConfiguration { get; set; } - /// - /// Specifies the Yarn configuration parameters (yarn-site.xml) for the HDInsight cluster. - /// - /// To assign an object to this property use . - /// - /// - /// To assign an already formated json string to this property use . - /// - /// - /// Examples: - /// - /// - /// BinaryData.FromObjectAsJson("foo") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromString("\"foo\"") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromObjectAsJson(new { key = "value" }) - /// Creates a payload of { "key": "value" }. - /// - /// - /// BinaryData.FromString("{\"key\": \"value\"}") - /// Creates a payload of { "key": "value" }. - /// - /// - /// - /// - public BinaryData YarnConfiguration { get; set; } - /// The encrypted credential used for authentication. Credentials are encrypted using the integration runtime credential manager. Type: string. - public string EncryptedCredential { get; set; } - /// - /// Specifies the size of the head node for the HDInsight cluster. - /// - /// To assign an object to this property use . - /// - /// - /// To assign an already formated json string to this property use . - /// - /// - /// Examples: - /// - /// - /// BinaryData.FromObjectAsJson("foo") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromString("\"foo\"") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromObjectAsJson(new { key = "value" }) - /// Creates a payload of { "key": "value" }. - /// - /// - /// BinaryData.FromString("{\"key\": \"value\"}") - /// Creates a payload of { "key": "value" }. - /// - /// - /// - /// - public BinaryData HeadNodeSize { get; set; } - /// - /// Specifies the size of the data node for the HDInsight cluster. - /// - /// To assign an object to this property use . - /// - /// - /// To assign an already formated json string to this property use . - /// - /// - /// Examples: - /// - /// - /// BinaryData.FromObjectAsJson("foo") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromString("\"foo\"") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromObjectAsJson(new { key = "value" }) - /// Creates a payload of { "key": "value" }. - /// - /// - /// BinaryData.FromString("{\"key\": \"value\"}") - /// Creates a payload of { "key": "value" }. - /// - /// - /// - /// - public BinaryData DataNodeSize { get; set; } - /// - /// Specifies the size of the Zoo Keeper node for the HDInsight cluster. - /// - /// To assign an object to this property use . - /// - /// - /// To assign an already formated json string to this property use . - /// - /// - /// Examples: - /// - /// - /// BinaryData.FromObjectAsJson("foo") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromString("\"foo\"") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromObjectAsJson(new { key = "value" }) - /// Creates a payload of { "key": "value" }. - /// - /// - /// BinaryData.FromString("{\"key\": \"value\"}") - /// Creates a payload of { "key": "value" }. - /// - /// - /// - /// - public BinaryData ZookeeperNodeSize { get; set; } - /// Custom script actions to run on HDI ondemand cluster once it's up. Please refer to https://docs.microsoft.com/en-us/azure/hdinsight/hdinsight-hadoop-customize-cluster-linux?toc=%2Fen-us%2Fazure%2Fhdinsight%2Fr-server%2FTOC.json&bc=%2Fen-us%2Fazure%2Fbread%2Ftoc.json#understanding-script-actions. - public IList ScriptActions { get; } - /// The ARM resource ID for the vNet to which the cluster should be joined after creation. Type: string (or Expression with resultType string). - public DataFactoryElement VirtualNetworkId { get; set; } - /// The ARM resource ID for the subnet in the vNet. If virtualNetworkId was specified, then this property is required. Type: string (or Expression with resultType string). - public DataFactoryElement SubnetName { get; set; } - /// The credential reference containing authentication information. - public DataFactoryCredentialReference Credential { get; set; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/HDInsightPigActivity.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/HDInsightPigActivity.Serialization.cs deleted file mode 100644 index 8a6a4ba8..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/HDInsightPigActivity.Serialization.cs +++ /dev/null @@ -1,327 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class HDInsightPigActivity : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - if (Optional.IsDefined(LinkedServiceName)) - { - writer.WritePropertyName("linkedServiceName"u8); - JsonSerializer.Serialize(writer, LinkedServiceName); - } - if (Optional.IsDefined(Policy)) - { - writer.WritePropertyName("policy"u8); - writer.WriteObjectValue(Policy); - } - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ActivityType); - if (Optional.IsDefined(Description)) - { - writer.WritePropertyName("description"u8); - writer.WriteStringValue(Description); - } - if (Optional.IsDefined(State)) - { - writer.WritePropertyName("state"u8); - writer.WriteStringValue(State.Value.ToString()); - } - if (Optional.IsDefined(OnInactiveMarkAs)) - { - writer.WritePropertyName("onInactiveMarkAs"u8); - writer.WriteStringValue(OnInactiveMarkAs.Value.ToString()); - } - if (Optional.IsCollectionDefined(DependsOn)) - { - writer.WritePropertyName("dependsOn"u8); - writer.WriteStartArray(); - foreach (var item in DependsOn) - { - writer.WriteObjectValue(item); - } - writer.WriteEndArray(); - } - if (Optional.IsCollectionDefined(UserProperties)) - { - writer.WritePropertyName("userProperties"u8); - writer.WriteStartArray(); - foreach (var item in UserProperties) - { - writer.WriteObjectValue(item); - } - writer.WriteEndArray(); - } - writer.WritePropertyName("typeProperties"u8); - writer.WriteStartObject(); - if (Optional.IsCollectionDefined(StorageLinkedServices)) - { - writer.WritePropertyName("storageLinkedServices"u8); - writer.WriteStartArray(); - foreach (var item in StorageLinkedServices) - { - JsonSerializer.Serialize(writer, item); - } - writer.WriteEndArray(); - } - if (Optional.IsDefined(Arguments)) - { - writer.WritePropertyName("arguments"u8); -#if NET6_0_OR_GREATER - writer.WriteRawValue(Arguments); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(Arguments.ToString()).RootElement); -#endif - } - if (Optional.IsDefined(GetDebugInfo)) - { - writer.WritePropertyName("getDebugInfo"u8); - writer.WriteStringValue(GetDebugInfo.Value.ToString()); - } - if (Optional.IsDefined(ScriptPath)) - { - writer.WritePropertyName("scriptPath"u8); - JsonSerializer.Serialize(writer, ScriptPath); - } - if (Optional.IsDefined(ScriptLinkedService)) - { - writer.WritePropertyName("scriptLinkedService"u8); - JsonSerializer.Serialize(writer, ScriptLinkedService); - } - if (Optional.IsCollectionDefined(Defines)) - { - writer.WritePropertyName("defines"u8); - writer.WriteStartObject(); - foreach (var item in Defines) - { - writer.WritePropertyName(item.Key); - if (item.Value == null) - { - writer.WriteNullValue(); - continue; - } -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.Value.ToString()).RootElement); -#endif - } - writer.WriteEndObject(); - } - writer.WriteEndObject(); - foreach (var item in AdditionalProperties) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.Value.ToString()).RootElement); -#endif - } - writer.WriteEndObject(); - } - - internal static HDInsightPigActivity DeserializeHDInsightPigActivity(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - Optional linkedServiceName = default; - Optional policy = default; - string name = default; - string type = default; - Optional description = default; - Optional state = default; - Optional onInactiveMarkAs = default; - Optional> dependsOn = default; - Optional> userProperties = default; - Optional> storageLinkedServices = default; - Optional arguments = default; - Optional getDebugInfo = default; - Optional> scriptPath = default; - Optional scriptLinkedService = default; - Optional>> defines = default; - IDictionary> additionalProperties = default; - Dictionary> additionalPropertiesDictionary = new Dictionary>(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("linkedServiceName"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - linkedServiceName = JsonSerializer.Deserialize(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("policy"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - policy = PipelineActivityPolicy.DeserializePipelineActivityPolicy(property.Value); - continue; - } - if (property.NameEquals("name"u8)) - { - name = property.Value.GetString(); - continue; - } - if (property.NameEquals("type"u8)) - { - type = property.Value.GetString(); - continue; - } - if (property.NameEquals("description"u8)) - { - description = property.Value.GetString(); - continue; - } - if (property.NameEquals("state"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - state = new PipelineActivityState(property.Value.GetString()); - continue; - } - if (property.NameEquals("onInactiveMarkAs"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - onInactiveMarkAs = new ActivityOnInactiveMarkAs(property.Value.GetString()); - continue; - } - if (property.NameEquals("dependsOn"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - array.Add(PipelineActivityDependency.DeserializePipelineActivityDependency(item)); - } - dependsOn = array; - continue; - } - if (property.NameEquals("userProperties"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - array.Add(PipelineActivityUserProperty.DeserializePipelineActivityUserProperty(item)); - } - userProperties = array; - continue; - } - if (property.NameEquals("typeProperties"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - foreach (var property0 in property.Value.EnumerateObject()) - { - if (property0.NameEquals("storageLinkedServices"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property0.Value.EnumerateArray()) - { - array.Add(JsonSerializer.Deserialize(item.GetRawText())); - } - storageLinkedServices = array; - continue; - } - if (property0.NameEquals("arguments"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - arguments = BinaryData.FromString(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("getDebugInfo"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - getDebugInfo = new HDInsightActivityDebugInfoOptionSetting(property0.Value.GetString()); - continue; - } - if (property0.NameEquals("scriptPath"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - scriptPath = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("scriptLinkedService"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - scriptLinkedService = JsonSerializer.Deserialize(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("defines"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - Dictionary> dictionary = new Dictionary>(); - foreach (var property1 in property0.Value.EnumerateObject()) - { - if (property1.Value.ValueKind == JsonValueKind.Null) - { - dictionary.Add(property1.Name, null); - } - else - { - dictionary.Add(property1.Name, JsonSerializer.Deserialize>(property1.Value.GetRawText())); - } - } - defines = dictionary; - continue; - } - } - continue; - } - additionalPropertiesDictionary.Add(property.Name, JsonSerializer.Deserialize>(property.Value.GetRawText())); - } - additionalProperties = additionalPropertiesDictionary; - return new HDInsightPigActivity(name, type, description.Value, Optional.ToNullable(state), Optional.ToNullable(onInactiveMarkAs), Optional.ToList(dependsOn), Optional.ToList(userProperties), additionalProperties, linkedServiceName, policy.Value, Optional.ToList(storageLinkedServices), arguments.Value, Optional.ToNullable(getDebugInfo), scriptPath.Value, scriptLinkedService, Optional.ToDictionary(defines)); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/HDInsightPigActivity.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/HDInsightPigActivity.cs deleted file mode 100644 index 846a1fa4..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/HDInsightPigActivity.cs +++ /dev/null @@ -1,124 +0,0 @@ -// - -#nullable disable - -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// HDInsight Pig activity type. - public partial class HDInsightPigActivity : ExecutionActivity - { - /// Initializes a new instance of HDInsightPigActivity. - /// Activity name. - /// is null. - public HDInsightPigActivity(string name) : base(name) - { - Argument.AssertNotNull(name, nameof(name)); - - StorageLinkedServices = new ChangeTrackingList(); - Defines = new ChangeTrackingDictionary>(); - ActivityType = "HDInsightPig"; - } - - /// Initializes a new instance of HDInsightPigActivity. - /// Activity name. - /// Type of activity. - /// Activity description. - /// Activity state. This is an optional property and if not provided, the state will be Active by default. - /// 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. - /// Activity depends on condition. - /// Activity user properties. - /// Additional Properties. - /// Linked service reference. - /// Activity policy. - /// Storage linked service references. - /// User specified arguments to HDInsightActivity. Type: array (or Expression with resultType array). - /// Debug info option. - /// Script path. Type: string (or Expression with resultType string). - /// Script linked service reference. - /// Allows user to specify defines for Pig job request. - internal HDInsightPigActivity(string name, string activityType, string description, PipelineActivityState? state, ActivityOnInactiveMarkAs? onInactiveMarkAs, IList dependsOn, IList userProperties, IDictionary> additionalProperties, DataFactoryLinkedServiceReference linkedServiceName, PipelineActivityPolicy policy, IList storageLinkedServices, BinaryData arguments, HDInsightActivityDebugInfoOptionSetting? getDebugInfo, DataFactoryElement scriptPath, DataFactoryLinkedServiceReference scriptLinkedService, IDictionary> defines) : base(name, activityType, description, state, onInactiveMarkAs, dependsOn, userProperties, additionalProperties, linkedServiceName, policy) - { - StorageLinkedServices = storageLinkedServices; - Arguments = arguments; - GetDebugInfo = getDebugInfo; - ScriptPath = scriptPath; - ScriptLinkedService = scriptLinkedService; - Defines = defines; - ActivityType = activityType ?? "HDInsightPig"; - } - - /// Storage linked service references. - public IList StorageLinkedServices { get; } - /// - /// User specified arguments to HDInsightActivity. Type: array (or Expression with resultType array). - /// - /// To assign an object to this property use . - /// - /// - /// To assign an already formated json string to this property use . - /// - /// - /// Examples: - /// - /// - /// BinaryData.FromObjectAsJson("foo") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromString("\"foo\"") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromObjectAsJson(new { key = "value" }) - /// Creates a payload of { "key": "value" }. - /// - /// - /// BinaryData.FromString("{\"key\": \"value\"}") - /// Creates a payload of { "key": "value" }. - /// - /// - /// - /// - public BinaryData Arguments { get; set; } - /// Debug info option. - public HDInsightActivityDebugInfoOptionSetting? GetDebugInfo { get; set; } - /// Script path. Type: string (or Expression with resultType string). - public DataFactoryElement ScriptPath { get; set; } - /// Script linked service reference. - public DataFactoryLinkedServiceReference ScriptLinkedService { get; set; } - /// - /// Allows user to specify defines for Pig job request. - /// - /// To assign an object to the value of this property use . - /// - /// - /// To assign an already formated json string to this property use . - /// - /// - /// Examples: - /// - /// - /// BinaryData.FromObjectAsJson("foo") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromString("\"foo\"") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromObjectAsJson(new { key = "value" }) - /// Creates a payload of { "key": "value" }. - /// - /// - /// BinaryData.FromString("{\"key\": \"value\"}") - /// Creates a payload of { "key": "value" }. - /// - /// - /// - /// - public IDictionary> Defines { get; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/HDInsightSparkActivity.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/HDInsightSparkActivity.Serialization.cs deleted file mode 100644 index 64340f04..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/HDInsightSparkActivity.Serialization.cs +++ /dev/null @@ -1,351 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class HDInsightSparkActivity : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - if (Optional.IsDefined(LinkedServiceName)) - { - writer.WritePropertyName("linkedServiceName"u8); - JsonSerializer.Serialize(writer, LinkedServiceName); - } - if (Optional.IsDefined(Policy)) - { - writer.WritePropertyName("policy"u8); - writer.WriteObjectValue(Policy); - } - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ActivityType); - if (Optional.IsDefined(Description)) - { - writer.WritePropertyName("description"u8); - writer.WriteStringValue(Description); - } - if (Optional.IsDefined(State)) - { - writer.WritePropertyName("state"u8); - writer.WriteStringValue(State.Value.ToString()); - } - if (Optional.IsDefined(OnInactiveMarkAs)) - { - writer.WritePropertyName("onInactiveMarkAs"u8); - writer.WriteStringValue(OnInactiveMarkAs.Value.ToString()); - } - if (Optional.IsCollectionDefined(DependsOn)) - { - writer.WritePropertyName("dependsOn"u8); - writer.WriteStartArray(); - foreach (var item in DependsOn) - { - writer.WriteObjectValue(item); - } - writer.WriteEndArray(); - } - if (Optional.IsCollectionDefined(UserProperties)) - { - writer.WritePropertyName("userProperties"u8); - writer.WriteStartArray(); - foreach (var item in UserProperties) - { - writer.WriteObjectValue(item); - } - writer.WriteEndArray(); - } - writer.WritePropertyName("typeProperties"u8); - writer.WriteStartObject(); - writer.WritePropertyName("rootPath"u8); - JsonSerializer.Serialize(writer, RootPath); - writer.WritePropertyName("entryFilePath"u8); - JsonSerializer.Serialize(writer, EntryFilePath); - if (Optional.IsCollectionDefined(Arguments)) - { - writer.WritePropertyName("arguments"u8); - writer.WriteStartArray(); - foreach (var item in Arguments) - { - if (item == null) - { - writer.WriteNullValue(); - continue; - } -#if NET6_0_OR_GREATER - writer.WriteRawValue(item); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.ToString()).RootElement); -#endif - } - writer.WriteEndArray(); - } - if (Optional.IsDefined(GetDebugInfo)) - { - writer.WritePropertyName("getDebugInfo"u8); - writer.WriteStringValue(GetDebugInfo.Value.ToString()); - } - if (Optional.IsDefined(SparkJobLinkedService)) - { - writer.WritePropertyName("sparkJobLinkedService"u8); - JsonSerializer.Serialize(writer, SparkJobLinkedService); - } - if (Optional.IsDefined(ClassName)) - { - writer.WritePropertyName("className"u8); - writer.WriteStringValue(ClassName); - } - if (Optional.IsDefined(ProxyUser)) - { - writer.WritePropertyName("proxyUser"u8); - JsonSerializer.Serialize(writer, ProxyUser); - } - if (Optional.IsCollectionDefined(SparkConfig)) - { - writer.WritePropertyName("sparkConfig"u8); - writer.WriteStartObject(); - foreach (var item in SparkConfig) - { - writer.WritePropertyName(item.Key); - if (item.Value == null) - { - writer.WriteNullValue(); - continue; - } -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.Value.ToString()).RootElement); -#endif - } - writer.WriteEndObject(); - } - writer.WriteEndObject(); - foreach (var item in AdditionalProperties) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.Value.ToString()).RootElement); -#endif - } - writer.WriteEndObject(); - } - - internal static HDInsightSparkActivity DeserializeHDInsightSparkActivity(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - Optional linkedServiceName = default; - Optional policy = default; - string name = default; - string type = default; - Optional description = default; - Optional state = default; - Optional onInactiveMarkAs = default; - Optional> dependsOn = default; - Optional> userProperties = default; - DataFactoryElement rootPath = default; - DataFactoryElement entryFilePath = default; - Optional> arguments = default; - Optional getDebugInfo = default; - Optional sparkJobLinkedService = default; - Optional className = default; - Optional> proxyUser = default; - Optional>> sparkConfig = default; - IDictionary> additionalProperties = default; - Dictionary> additionalPropertiesDictionary = new Dictionary>(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("linkedServiceName"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - linkedServiceName = JsonSerializer.Deserialize(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("policy"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - policy = PipelineActivityPolicy.DeserializePipelineActivityPolicy(property.Value); - continue; - } - if (property.NameEquals("name"u8)) - { - name = property.Value.GetString(); - continue; - } - if (property.NameEquals("type"u8)) - { - type = property.Value.GetString(); - continue; - } - if (property.NameEquals("description"u8)) - { - description = property.Value.GetString(); - continue; - } - if (property.NameEquals("state"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - state = new PipelineActivityState(property.Value.GetString()); - continue; - } - if (property.NameEquals("onInactiveMarkAs"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - onInactiveMarkAs = new ActivityOnInactiveMarkAs(property.Value.GetString()); - continue; - } - if (property.NameEquals("dependsOn"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - array.Add(PipelineActivityDependency.DeserializePipelineActivityDependency(item)); - } - dependsOn = array; - continue; - } - if (property.NameEquals("userProperties"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - array.Add(PipelineActivityUserProperty.DeserializePipelineActivityUserProperty(item)); - } - userProperties = array; - continue; - } - if (property.NameEquals("typeProperties"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - foreach (var property0 in property.Value.EnumerateObject()) - { - if (property0.NameEquals("rootPath"u8)) - { - rootPath = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("entryFilePath"u8)) - { - entryFilePath = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("arguments"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property0.Value.EnumerateArray()) - { - if (item.ValueKind == JsonValueKind.Null) - { - array.Add(null); - } - else - { - array.Add(BinaryData.FromString(item.GetRawText())); - } - } - arguments = array; - continue; - } - if (property0.NameEquals("getDebugInfo"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - getDebugInfo = new HDInsightActivityDebugInfoOptionSetting(property0.Value.GetString()); - continue; - } - if (property0.NameEquals("sparkJobLinkedService"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - sparkJobLinkedService = JsonSerializer.Deserialize(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("className"u8)) - { - className = property0.Value.GetString(); - continue; - } - if (property0.NameEquals("proxyUser"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - proxyUser = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("sparkConfig"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - Dictionary> dictionary = new Dictionary>(); - foreach (var property1 in property0.Value.EnumerateObject()) - { - if (property1.Value.ValueKind == JsonValueKind.Null) - { - dictionary.Add(property1.Name, null); - } - else - { - dictionary.Add(property1.Name, JsonSerializer.Deserialize>(property1.Value.GetRawText())); - } - } - sparkConfig = dictionary; - continue; - } - } - continue; - } - additionalPropertiesDictionary.Add(property.Name, JsonSerializer.Deserialize>(property.Value.GetRawText())); - } - additionalProperties = additionalPropertiesDictionary; - return new HDInsightSparkActivity(name, type, description.Value, Optional.ToNullable(state), Optional.ToNullable(onInactiveMarkAs), Optional.ToList(dependsOn), Optional.ToList(userProperties), additionalProperties, linkedServiceName, policy.Value, rootPath, entryFilePath, Optional.ToList(arguments), Optional.ToNullable(getDebugInfo), sparkJobLinkedService, className.Value, proxyUser.Value, Optional.ToDictionary(sparkConfig)); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/HDInsightSparkActivity.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/HDInsightSparkActivity.cs deleted file mode 100644 index f1023967..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/HDInsightSparkActivity.cs +++ /dev/null @@ -1,138 +0,0 @@ -// - -#nullable disable - -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// HDInsight Spark activity. - public partial class HDInsightSparkActivity : ExecutionActivity - { - /// Initializes a new instance of HDInsightSparkActivity. - /// Activity name. - /// The root path in 'sparkJobLinkedService' for all the job’s files. Type: string (or Expression with resultType string). - /// The relative path to the root folder of the code/package to be executed. Type: string (or Expression with resultType string). - /// , or is null. - public HDInsightSparkActivity(string name, DataFactoryElement rootPath, DataFactoryElement entryFilePath) : base(name) - { - Argument.AssertNotNull(name, nameof(name)); - Argument.AssertNotNull(rootPath, nameof(rootPath)); - Argument.AssertNotNull(entryFilePath, nameof(entryFilePath)); - - RootPath = rootPath; - EntryFilePath = entryFilePath; - Arguments = new ChangeTrackingList(); - SparkConfig = new ChangeTrackingDictionary>(); - ActivityType = "HDInsightSpark"; - } - - /// Initializes a new instance of HDInsightSparkActivity. - /// Activity name. - /// Type of activity. - /// Activity description. - /// Activity state. This is an optional property and if not provided, the state will be Active by default. - /// 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. - /// Activity depends on condition. - /// Activity user properties. - /// Additional Properties. - /// Linked service reference. - /// Activity policy. - /// The root path in 'sparkJobLinkedService' for all the job’s files. Type: string (or Expression with resultType string). - /// The relative path to the root folder of the code/package to be executed. Type: string (or Expression with resultType string). - /// The user-specified arguments to HDInsightSparkActivity. - /// Debug info option. - /// The storage linked service for uploading the entry file and dependencies, and for receiving logs. - /// The application's Java/Spark main class. - /// The user to impersonate that will execute the job. Type: string (or Expression with resultType string). - /// Spark configuration property. - internal HDInsightSparkActivity(string name, string activityType, string description, PipelineActivityState? state, ActivityOnInactiveMarkAs? onInactiveMarkAs, IList dependsOn, IList userProperties, IDictionary> additionalProperties, DataFactoryLinkedServiceReference linkedServiceName, PipelineActivityPolicy policy, DataFactoryElement rootPath, DataFactoryElement entryFilePath, IList arguments, HDInsightActivityDebugInfoOptionSetting? getDebugInfo, DataFactoryLinkedServiceReference sparkJobLinkedService, string className, DataFactoryElement proxyUser, IDictionary> sparkConfig) : base(name, activityType, description, state, onInactiveMarkAs, dependsOn, userProperties, additionalProperties, linkedServiceName, policy) - { - RootPath = rootPath; - EntryFilePath = entryFilePath; - Arguments = arguments; - GetDebugInfo = getDebugInfo; - SparkJobLinkedService = sparkJobLinkedService; - ClassName = className; - ProxyUser = proxyUser; - SparkConfig = sparkConfig; - ActivityType = activityType ?? "HDInsightSpark"; - } - - /// The root path in 'sparkJobLinkedService' for all the job’s files. Type: string (or Expression with resultType string). - public DataFactoryElement RootPath { get; set; } - /// The relative path to the root folder of the code/package to be executed. Type: string (or Expression with resultType string). - public DataFactoryElement EntryFilePath { get; set; } - /// - /// The user-specified arguments to HDInsightSparkActivity. - /// - /// To assign an object to the element of this property use . - /// - /// - /// To assign an already formated json string to this property use . - /// - /// - /// Examples: - /// - /// - /// BinaryData.FromObjectAsJson("foo") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromString("\"foo\"") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromObjectAsJson(new { key = "value" }) - /// Creates a payload of { "key": "value" }. - /// - /// - /// BinaryData.FromString("{\"key\": \"value\"}") - /// Creates a payload of { "key": "value" }. - /// - /// - /// - /// - public IList Arguments { get; } - /// Debug info option. - public HDInsightActivityDebugInfoOptionSetting? GetDebugInfo { get; set; } - /// The storage linked service for uploading the entry file and dependencies, and for receiving logs. - public DataFactoryLinkedServiceReference SparkJobLinkedService { get; set; } - /// The application's Java/Spark main class. - public string ClassName { get; set; } - /// The user to impersonate that will execute the job. Type: string (or Expression with resultType string). - public DataFactoryElement ProxyUser { get; set; } - /// - /// Spark configuration property. - /// - /// To assign an object to the value of this property use . - /// - /// - /// To assign an already formated json string to this property use . - /// - /// - /// Examples: - /// - /// - /// BinaryData.FromObjectAsJson("foo") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromString("\"foo\"") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromObjectAsJson(new { key = "value" }) - /// Creates a payload of { "key": "value" }. - /// - /// - /// BinaryData.FromString("{\"key\": \"value\"}") - /// Creates a payload of { "key": "value" }. - /// - /// - /// - /// - public IDictionary> SparkConfig { get; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/HDInsightStreamingActivity.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/HDInsightStreamingActivity.Serialization.cs deleted file mode 100644 index 5fe2b845..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/HDInsightStreamingActivity.Serialization.cs +++ /dev/null @@ -1,456 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class HDInsightStreamingActivity : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - if (Optional.IsDefined(LinkedServiceName)) - { - writer.WritePropertyName("linkedServiceName"u8); - JsonSerializer.Serialize(writer, LinkedServiceName); - } - if (Optional.IsDefined(Policy)) - { - writer.WritePropertyName("policy"u8); - writer.WriteObjectValue(Policy); - } - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ActivityType); - if (Optional.IsDefined(Description)) - { - writer.WritePropertyName("description"u8); - writer.WriteStringValue(Description); - } - if (Optional.IsDefined(State)) - { - writer.WritePropertyName("state"u8); - writer.WriteStringValue(State.Value.ToString()); - } - if (Optional.IsDefined(OnInactiveMarkAs)) - { - writer.WritePropertyName("onInactiveMarkAs"u8); - writer.WriteStringValue(OnInactiveMarkAs.Value.ToString()); - } - if (Optional.IsCollectionDefined(DependsOn)) - { - writer.WritePropertyName("dependsOn"u8); - writer.WriteStartArray(); - foreach (var item in DependsOn) - { - writer.WriteObjectValue(item); - } - writer.WriteEndArray(); - } - if (Optional.IsCollectionDefined(UserProperties)) - { - writer.WritePropertyName("userProperties"u8); - writer.WriteStartArray(); - foreach (var item in UserProperties) - { - writer.WriteObjectValue(item); - } - writer.WriteEndArray(); - } - writer.WritePropertyName("typeProperties"u8); - writer.WriteStartObject(); - if (Optional.IsCollectionDefined(StorageLinkedServices)) - { - writer.WritePropertyName("storageLinkedServices"u8); - writer.WriteStartArray(); - foreach (var item in StorageLinkedServices) - { - JsonSerializer.Serialize(writer, item); - } - writer.WriteEndArray(); - } - if (Optional.IsCollectionDefined(Arguments)) - { - writer.WritePropertyName("arguments"u8); - writer.WriteStartArray(); - foreach (var item in Arguments) - { - if (item == null) - { - writer.WriteNullValue(); - continue; - } -#if NET6_0_OR_GREATER - writer.WriteRawValue(item); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.ToString()).RootElement); -#endif - } - writer.WriteEndArray(); - } - if (Optional.IsDefined(GetDebugInfo)) - { - writer.WritePropertyName("getDebugInfo"u8); - writer.WriteStringValue(GetDebugInfo.Value.ToString()); - } - writer.WritePropertyName("mapper"u8); - JsonSerializer.Serialize(writer, Mapper); - writer.WritePropertyName("reducer"u8); - JsonSerializer.Serialize(writer, Reducer); - writer.WritePropertyName("input"u8); - JsonSerializer.Serialize(writer, Input); - writer.WritePropertyName("output"u8); - JsonSerializer.Serialize(writer, Output); - writer.WritePropertyName("filePaths"u8); - writer.WriteStartArray(); - foreach (var item in FilePaths) - { - if (item == null) - { - writer.WriteNullValue(); - continue; - } -#if NET6_0_OR_GREATER - writer.WriteRawValue(item); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.ToString()).RootElement); -#endif - } - writer.WriteEndArray(); - if (Optional.IsDefined(FileLinkedService)) - { - writer.WritePropertyName("fileLinkedService"u8); - JsonSerializer.Serialize(writer, FileLinkedService); - } - if (Optional.IsDefined(Combiner)) - { - writer.WritePropertyName("combiner"u8); - JsonSerializer.Serialize(writer, Combiner); - } - if (Optional.IsCollectionDefined(CommandEnvironment)) - { - writer.WritePropertyName("commandEnvironment"u8); - writer.WriteStartArray(); - foreach (var item in CommandEnvironment) - { - if (item == null) - { - writer.WriteNullValue(); - continue; - } -#if NET6_0_OR_GREATER - writer.WriteRawValue(item); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.ToString()).RootElement); -#endif - } - writer.WriteEndArray(); - } - if (Optional.IsCollectionDefined(Defines)) - { - writer.WritePropertyName("defines"u8); - writer.WriteStartObject(); - foreach (var item in Defines) - { - writer.WritePropertyName(item.Key); - if (item.Value == null) - { - writer.WriteNullValue(); - continue; - } -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.Value.ToString()).RootElement); -#endif - } - writer.WriteEndObject(); - } - writer.WriteEndObject(); - foreach (var item in AdditionalProperties) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.Value.ToString()).RootElement); -#endif - } - writer.WriteEndObject(); - } - - internal static HDInsightStreamingActivity DeserializeHDInsightStreamingActivity(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - Optional linkedServiceName = default; - Optional policy = default; - string name = default; - string type = default; - Optional description = default; - Optional state = default; - Optional onInactiveMarkAs = default; - Optional> dependsOn = default; - Optional> userProperties = default; - Optional> storageLinkedServices = default; - Optional> arguments = default; - Optional getDebugInfo = default; - DataFactoryElement mapper = default; - DataFactoryElement reducer = default; - DataFactoryElement input = default; - DataFactoryElement output = default; - IList filePaths = default; - Optional fileLinkedService = default; - Optional> combiner = default; - Optional> commandEnvironment = default; - Optional>> defines = default; - IDictionary> additionalProperties = default; - Dictionary> additionalPropertiesDictionary = new Dictionary>(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("linkedServiceName"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - linkedServiceName = JsonSerializer.Deserialize(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("policy"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - policy = PipelineActivityPolicy.DeserializePipelineActivityPolicy(property.Value); - continue; - } - if (property.NameEquals("name"u8)) - { - name = property.Value.GetString(); - continue; - } - if (property.NameEquals("type"u8)) - { - type = property.Value.GetString(); - continue; - } - if (property.NameEquals("description"u8)) - { - description = property.Value.GetString(); - continue; - } - if (property.NameEquals("state"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - state = new PipelineActivityState(property.Value.GetString()); - continue; - } - if (property.NameEquals("onInactiveMarkAs"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - onInactiveMarkAs = new ActivityOnInactiveMarkAs(property.Value.GetString()); - continue; - } - if (property.NameEquals("dependsOn"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - array.Add(PipelineActivityDependency.DeserializePipelineActivityDependency(item)); - } - dependsOn = array; - continue; - } - if (property.NameEquals("userProperties"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - array.Add(PipelineActivityUserProperty.DeserializePipelineActivityUserProperty(item)); - } - userProperties = array; - continue; - } - if (property.NameEquals("typeProperties"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - foreach (var property0 in property.Value.EnumerateObject()) - { - if (property0.NameEquals("storageLinkedServices"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property0.Value.EnumerateArray()) - { - array.Add(JsonSerializer.Deserialize(item.GetRawText())); - } - storageLinkedServices = array; - continue; - } - if (property0.NameEquals("arguments"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property0.Value.EnumerateArray()) - { - if (item.ValueKind == JsonValueKind.Null) - { - array.Add(null); - } - else - { - array.Add(BinaryData.FromString(item.GetRawText())); - } - } - arguments = array; - continue; - } - if (property0.NameEquals("getDebugInfo"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - getDebugInfo = new HDInsightActivityDebugInfoOptionSetting(property0.Value.GetString()); - continue; - } - if (property0.NameEquals("mapper"u8)) - { - mapper = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("reducer"u8)) - { - reducer = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("input"u8)) - { - input = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("output"u8)) - { - output = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("filePaths"u8)) - { - List array = new List(); - foreach (var item in property0.Value.EnumerateArray()) - { - if (item.ValueKind == JsonValueKind.Null) - { - array.Add(null); - } - else - { - array.Add(BinaryData.FromString(item.GetRawText())); - } - } - filePaths = array; - continue; - } - if (property0.NameEquals("fileLinkedService"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - fileLinkedService = JsonSerializer.Deserialize(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("combiner"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - combiner = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("commandEnvironment"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property0.Value.EnumerateArray()) - { - if (item.ValueKind == JsonValueKind.Null) - { - array.Add(null); - } - else - { - array.Add(BinaryData.FromString(item.GetRawText())); - } - } - commandEnvironment = array; - continue; - } - if (property0.NameEquals("defines"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - Dictionary> dictionary = new Dictionary>(); - foreach (var property1 in property0.Value.EnumerateObject()) - { - if (property1.Value.ValueKind == JsonValueKind.Null) - { - dictionary.Add(property1.Name, null); - } - else - { - dictionary.Add(property1.Name, JsonSerializer.Deserialize>(property1.Value.GetRawText())); - } - } - defines = dictionary; - continue; - } - } - continue; - } - additionalPropertiesDictionary.Add(property.Name, JsonSerializer.Deserialize>(property.Value.GetRawText())); - } - additionalProperties = additionalPropertiesDictionary; - return new HDInsightStreamingActivity(name, type, description.Value, Optional.ToNullable(state), Optional.ToNullable(onInactiveMarkAs), Optional.ToList(dependsOn), Optional.ToList(userProperties), additionalProperties, linkedServiceName, policy.Value, Optional.ToList(storageLinkedServices), Optional.ToList(arguments), Optional.ToNullable(getDebugInfo), mapper, reducer, input, output, filePaths, fileLinkedService, combiner.Value, Optional.ToList(commandEnvironment), Optional.ToDictionary(defines)); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/HDInsightStreamingActivity.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/HDInsightStreamingActivity.cs deleted file mode 100644 index 630491e4..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/HDInsightStreamingActivity.cs +++ /dev/null @@ -1,223 +0,0 @@ -// - -#nullable disable - -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// HDInsight streaming activity type. - public partial class HDInsightStreamingActivity : ExecutionActivity - { - /// Initializes a new instance of HDInsightStreamingActivity. - /// Activity name. - /// Mapper executable name. Type: string (or Expression with resultType string). - /// Reducer executable name. Type: string (or Expression with resultType string). - /// Input blob path. Type: string (or Expression with resultType string). - /// Output blob path. Type: string (or Expression with resultType string). - /// Paths to streaming job files. Can be directories. - /// , , , , or is null. - public HDInsightStreamingActivity(string name, DataFactoryElement mapper, DataFactoryElement reducer, DataFactoryElement input, DataFactoryElement output, IEnumerable filePaths) : base(name) - { - Argument.AssertNotNull(name, nameof(name)); - Argument.AssertNotNull(mapper, nameof(mapper)); - Argument.AssertNotNull(reducer, nameof(reducer)); - Argument.AssertNotNull(input, nameof(input)); - Argument.AssertNotNull(output, nameof(output)); - Argument.AssertNotNull(filePaths, nameof(filePaths)); - - StorageLinkedServices = new ChangeTrackingList(); - Arguments = new ChangeTrackingList(); - Mapper = mapper; - Reducer = reducer; - Input = input; - Output = output; - FilePaths = filePaths.ToList(); - CommandEnvironment = new ChangeTrackingList(); - Defines = new ChangeTrackingDictionary>(); - ActivityType = "HDInsightStreaming"; - } - - /// Initializes a new instance of HDInsightStreamingActivity. - /// Activity name. - /// Type of activity. - /// Activity description. - /// Activity state. This is an optional property and if not provided, the state will be Active by default. - /// 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. - /// Activity depends on condition. - /// Activity user properties. - /// Additional Properties. - /// Linked service reference. - /// Activity policy. - /// Storage linked service references. - /// User specified arguments to HDInsightActivity. - /// Debug info option. - /// Mapper executable name. Type: string (or Expression with resultType string). - /// Reducer executable name. Type: string (or Expression with resultType string). - /// Input blob path. Type: string (or Expression with resultType string). - /// Output blob path. Type: string (or Expression with resultType string). - /// Paths to streaming job files. Can be directories. - /// Linked service reference where the files are located. - /// Combiner executable name. Type: string (or Expression with resultType string). - /// Command line environment values. - /// Allows user to specify defines for streaming job request. - internal HDInsightStreamingActivity(string name, string activityType, string description, PipelineActivityState? state, ActivityOnInactiveMarkAs? onInactiveMarkAs, IList dependsOn, IList userProperties, IDictionary> additionalProperties, DataFactoryLinkedServiceReference linkedServiceName, PipelineActivityPolicy policy, IList storageLinkedServices, IList arguments, HDInsightActivityDebugInfoOptionSetting? getDebugInfo, DataFactoryElement mapper, DataFactoryElement reducer, DataFactoryElement input, DataFactoryElement output, IList filePaths, DataFactoryLinkedServiceReference fileLinkedService, DataFactoryElement combiner, IList commandEnvironment, IDictionary> defines) : base(name, activityType, description, state, onInactiveMarkAs, dependsOn, userProperties, additionalProperties, linkedServiceName, policy) - { - StorageLinkedServices = storageLinkedServices; - Arguments = arguments; - GetDebugInfo = getDebugInfo; - Mapper = mapper; - Reducer = reducer; - Input = input; - Output = output; - FilePaths = filePaths; - FileLinkedService = fileLinkedService; - Combiner = combiner; - CommandEnvironment = commandEnvironment; - Defines = defines; - ActivityType = activityType ?? "HDInsightStreaming"; - } - - /// Storage linked service references. - public IList StorageLinkedServices { get; } - /// - /// User specified arguments to HDInsightActivity. - /// - /// To assign an object to the element of this property use . - /// - /// - /// To assign an already formated json string to this property use . - /// - /// - /// Examples: - /// - /// - /// BinaryData.FromObjectAsJson("foo") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromString("\"foo\"") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromObjectAsJson(new { key = "value" }) - /// Creates a payload of { "key": "value" }. - /// - /// - /// BinaryData.FromString("{\"key\": \"value\"}") - /// Creates a payload of { "key": "value" }. - /// - /// - /// - /// - public IList Arguments { get; } - /// Debug info option. - public HDInsightActivityDebugInfoOptionSetting? GetDebugInfo { get; set; } - /// Mapper executable name. Type: string (or Expression with resultType string). - public DataFactoryElement Mapper { get; set; } - /// Reducer executable name. Type: string (or Expression with resultType string). - public DataFactoryElement Reducer { get; set; } - /// Input blob path. Type: string (or Expression with resultType string). - public DataFactoryElement Input { get; set; } - /// Output blob path. Type: string (or Expression with resultType string). - public DataFactoryElement Output { get; set; } - /// - /// Paths to streaming job files. Can be directories. - /// - /// To assign an object to the element of this property use . - /// - /// - /// To assign an already formated json string to this property use . - /// - /// - /// Examples: - /// - /// - /// BinaryData.FromObjectAsJson("foo") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromString("\"foo\"") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromObjectAsJson(new { key = "value" }) - /// Creates a payload of { "key": "value" }. - /// - /// - /// BinaryData.FromString("{\"key\": \"value\"}") - /// Creates a payload of { "key": "value" }. - /// - /// - /// - /// - public IList FilePaths { get; } - /// Linked service reference where the files are located. - public DataFactoryLinkedServiceReference FileLinkedService { get; set; } - /// Combiner executable name. Type: string (or Expression with resultType string). - public DataFactoryElement Combiner { get; set; } - /// - /// Command line environment values. - /// - /// To assign an object to the element of this property use . - /// - /// - /// To assign an already formated json string to this property use . - /// - /// - /// Examples: - /// - /// - /// BinaryData.FromObjectAsJson("foo") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromString("\"foo\"") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromObjectAsJson(new { key = "value" }) - /// Creates a payload of { "key": "value" }. - /// - /// - /// BinaryData.FromString("{\"key\": \"value\"}") - /// Creates a payload of { "key": "value" }. - /// - /// - /// - /// - public IList CommandEnvironment { get; } - /// - /// Allows user to specify defines for streaming job request. - /// - /// To assign an object to the value of this property use . - /// - /// - /// To assign an already formated json string to this property use . - /// - /// - /// Examples: - /// - /// - /// BinaryData.FromObjectAsJson("foo") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromString("\"foo\"") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromObjectAsJson(new { key = "value" }) - /// Creates a payload of { "key": "value" }. - /// - /// - /// BinaryData.FromString("{\"key\": \"value\"}") - /// Creates a payload of { "key": "value" }. - /// - /// - /// - /// - public IDictionary> Defines { get; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/HdfsLinkedService.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/HdfsLinkedService.Serialization.cs deleted file mode 100644 index 370bc5c0..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/HdfsLinkedService.Serialization.cs +++ /dev/null @@ -1,224 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class HdfsLinkedService : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - writer.WritePropertyName("type"u8); - writer.WriteStringValue(LinkedServiceType); - if (Optional.IsDefined(ConnectVia)) - { - writer.WritePropertyName("connectVia"u8); - writer.WriteObjectValue(ConnectVia); - } - if (Optional.IsDefined(Description)) - { - writer.WritePropertyName("description"u8); - writer.WriteStringValue(Description); - } - if (Optional.IsCollectionDefined(Parameters)) - { - writer.WritePropertyName("parameters"u8); - writer.WriteStartObject(); - foreach (var item in Parameters) - { - writer.WritePropertyName(item.Key); - writer.WriteObjectValue(item.Value); - } - writer.WriteEndObject(); - } - if (Optional.IsCollectionDefined(Annotations)) - { - writer.WritePropertyName("annotations"u8); - writer.WriteStartArray(); - foreach (var item in Annotations) - { - if (item == null) - { - writer.WriteNullValue(); - continue; - } -#if NET6_0_OR_GREATER - writer.WriteRawValue(item); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.ToString()).RootElement); -#endif - } - writer.WriteEndArray(); - } - writer.WritePropertyName("typeProperties"u8); - writer.WriteStartObject(); - writer.WritePropertyName("url"u8); - JsonSerializer.Serialize(writer, Uri); - if (Optional.IsDefined(AuthenticationType)) - { - writer.WritePropertyName("authenticationType"u8); - JsonSerializer.Serialize(writer, AuthenticationType); - } - if (Optional.IsDefined(EncryptedCredential)) - { - writer.WritePropertyName("encryptedCredential"u8); - writer.WriteStringValue(EncryptedCredential); - } - if (Optional.IsDefined(UserName)) - { - writer.WritePropertyName("userName"u8); - JsonSerializer.Serialize(writer, UserName); - } - if (Optional.IsDefined(Password)) - { - writer.WritePropertyName("password"u8); - JsonSerializer.Serialize(writer, Password); - } - writer.WriteEndObject(); - foreach (var item in AdditionalProperties) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.Value.ToString()).RootElement); -#endif - } - writer.WriteEndObject(); - } - - internal static HdfsLinkedService DeserializeHdfsLinkedService(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - string type = default; - Optional connectVia = default; - Optional description = default; - Optional> parameters = default; - Optional> annotations = default; - DataFactoryElement url = default; - Optional> authenticationType = default; - Optional encryptedCredential = default; - Optional> userName = default; - Optional password = default; - IDictionary> additionalProperties = default; - Dictionary> additionalPropertiesDictionary = new Dictionary>(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("type"u8)) - { - type = property.Value.GetString(); - continue; - } - if (property.NameEquals("connectVia"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - connectVia = IntegrationRuntimeReference.DeserializeIntegrationRuntimeReference(property.Value); - continue; - } - if (property.NameEquals("description"u8)) - { - description = property.Value.GetString(); - continue; - } - if (property.NameEquals("parameters"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - Dictionary dictionary = new Dictionary(); - foreach (var property0 in property.Value.EnumerateObject()) - { - dictionary.Add(property0.Name, EntityParameterSpecification.DeserializeEntityParameterSpecification(property0.Value)); - } - parameters = dictionary; - continue; - } - if (property.NameEquals("annotations"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - if (item.ValueKind == JsonValueKind.Null) - { - array.Add(null); - } - else - { - array.Add(BinaryData.FromString(item.GetRawText())); - } - } - annotations = array; - continue; - } - if (property.NameEquals("typeProperties"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - foreach (var property0 in property.Value.EnumerateObject()) - { - if (property0.NameEquals("url"u8)) - { - url = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("authenticationType"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - authenticationType = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("encryptedCredential"u8)) - { - encryptedCredential = property0.Value.GetString(); - continue; - } - if (property0.NameEquals("userName"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - userName = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("password"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - password = JsonSerializer.Deserialize(property0.Value.GetRawText()); - continue; - } - } - continue; - } - additionalPropertiesDictionary.Add(property.Name, JsonSerializer.Deserialize>(property.Value.GetRawText())); - } - additionalProperties = additionalPropertiesDictionary; - return new HdfsLinkedService(type, connectVia.Value, description.Value, Optional.ToDictionary(parameters), Optional.ToList(annotations), additionalProperties, url, authenticationType.Value, encryptedCredential.Value, userName.Value, password); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/HdfsLinkedService.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/HdfsLinkedService.cs deleted file mode 100644 index 493ec0d7..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/HdfsLinkedService.cs +++ /dev/null @@ -1,57 +0,0 @@ -// - -#nullable disable - -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// Hadoop Distributed File System (HDFS) linked service. - public partial class HdfsLinkedService : DataFactoryLinkedServiceProperties - { - /// Initializes a new instance of HdfsLinkedService. - /// The URL of the HDFS service endpoint, e.g. http://myhostname:50070/webhdfs/v1 . Type: string (or Expression with resultType string). - /// is null. - public HdfsLinkedService(DataFactoryElement uri) - { - Argument.AssertNotNull(uri, nameof(uri)); - - Uri = uri; - LinkedServiceType = "Hdfs"; - } - - /// Initializes a new instance of HdfsLinkedService. - /// Type of linked service. - /// The integration runtime reference. - /// Linked service description. - /// Parameters for linked service. - /// List of tags that can be used for describing the linked service. - /// Additional Properties. - /// The URL of the HDFS service endpoint, e.g. http://myhostname:50070/webhdfs/v1 . Type: string (or Expression with resultType string). - /// Type of authentication used to connect to the HDFS. Possible values are: Anonymous and Windows. Type: string (or Expression with resultType string). - /// The encrypted credential used for authentication. Credentials are encrypted using the integration runtime credential manager. Type: string. - /// User name for Windows authentication. Type: string (or Expression with resultType string). - /// Password for Windows authentication. - internal HdfsLinkedService(string linkedServiceType, IntegrationRuntimeReference connectVia, string description, IDictionary parameters, IList annotations, IDictionary> additionalProperties, DataFactoryElement uri, DataFactoryElement authenticationType, string encryptedCredential, DataFactoryElement userName, DataFactorySecretBaseDefinition password) : base(linkedServiceType, connectVia, description, parameters, annotations, additionalProperties) - { - Uri = uri; - AuthenticationType = authenticationType; - EncryptedCredential = encryptedCredential; - UserName = userName; - Password = password; - LinkedServiceType = linkedServiceType ?? "Hdfs"; - } - - /// The URL of the HDFS service endpoint, e.g. http://myhostname:50070/webhdfs/v1 . Type: string (or Expression with resultType string). - public DataFactoryElement Uri { get; set; } - /// Type of authentication used to connect to the HDFS. Possible values are: Anonymous and Windows. Type: string (or Expression with resultType string). - public DataFactoryElement AuthenticationType { get; set; } - /// The encrypted credential used for authentication. Credentials are encrypted using the integration runtime credential manager. Type: string. - public string EncryptedCredential { get; set; } - /// User name for Windows authentication. Type: string (or Expression with resultType string). - public DataFactoryElement UserName { get; set; } - /// Password for Windows authentication. - public DataFactorySecretBaseDefinition Password { get; set; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/HdfsLocation.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/HdfsLocation.Serialization.cs deleted file mode 100644 index a6d00da3..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/HdfsLocation.Serialization.cs +++ /dev/null @@ -1,82 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class HdfsLocation : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - writer.WritePropertyName("type"u8); - writer.WriteStringValue(DatasetLocationType); - if (Optional.IsDefined(FolderPath)) - { - writer.WritePropertyName("folderPath"u8); - JsonSerializer.Serialize(writer, FolderPath); - } - if (Optional.IsDefined(FileName)) - { - writer.WritePropertyName("fileName"u8); - JsonSerializer.Serialize(writer, FileName); - } - foreach (var item in AdditionalProperties) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.Value.ToString()).RootElement); -#endif - } - writer.WriteEndObject(); - } - - internal static HdfsLocation DeserializeHdfsLocation(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - string type = default; - Optional> folderPath = default; - Optional> fileName = default; - IDictionary> additionalProperties = default; - Dictionary> additionalPropertiesDictionary = new Dictionary>(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("type"u8)) - { - type = property.Value.GetString(); - continue; - } - if (property.NameEquals("folderPath"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - folderPath = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("fileName"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - fileName = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - additionalPropertiesDictionary.Add(property.Name, JsonSerializer.Deserialize>(property.Value.GetRawText())); - } - additionalProperties = additionalPropertiesDictionary; - return new HdfsLocation(type, folderPath.Value, fileName.Value, additionalProperties); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/HdfsLocation.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/HdfsLocation.cs deleted file mode 100644 index 171bac7b..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/HdfsLocation.cs +++ /dev/null @@ -1,28 +0,0 @@ -// - -#nullable disable - -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// The location of HDFS. - public partial class HdfsLocation : DatasetLocation - { - /// Initializes a new instance of HdfsLocation. - public HdfsLocation() - { - DatasetLocationType = "HdfsLocation"; - } - - /// Initializes a new instance of HdfsLocation. - /// Type of dataset storage location. - /// Specify the folder path of dataset. Type: string (or Expression with resultType string). - /// Specify the file name of dataset. Type: string (or Expression with resultType string). - /// Additional Properties. - internal HdfsLocation(string datasetLocationType, DataFactoryElement folderPath, DataFactoryElement fileName, IDictionary> additionalProperties) : base(datasetLocationType, folderPath, fileName, additionalProperties) - { - DatasetLocationType = datasetLocationType ?? "HdfsLocation"; - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/HdfsReadSettings.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/HdfsReadSettings.Serialization.cs deleted file mode 100644 index 1327d43b..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/HdfsReadSettings.Serialization.cs +++ /dev/null @@ -1,232 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class HdfsReadSettings : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - if (Optional.IsDefined(Recursive)) - { - writer.WritePropertyName("recursive"u8); - JsonSerializer.Serialize(writer, Recursive); - } - if (Optional.IsDefined(WildcardFolderPath)) - { - writer.WritePropertyName("wildcardFolderPath"u8); - JsonSerializer.Serialize(writer, WildcardFolderPath); - } - if (Optional.IsDefined(WildcardFileName)) - { - writer.WritePropertyName("wildcardFileName"u8); - JsonSerializer.Serialize(writer, WildcardFileName); - } - if (Optional.IsDefined(FileListPath)) - { - writer.WritePropertyName("fileListPath"u8); - JsonSerializer.Serialize(writer, FileListPath); - } - if (Optional.IsDefined(EnablePartitionDiscovery)) - { - writer.WritePropertyName("enablePartitionDiscovery"u8); - JsonSerializer.Serialize(writer, EnablePartitionDiscovery); - } - if (Optional.IsDefined(PartitionRootPath)) - { - writer.WritePropertyName("partitionRootPath"u8); - JsonSerializer.Serialize(writer, PartitionRootPath); - } - if (Optional.IsDefined(ModifiedDatetimeStart)) - { - writer.WritePropertyName("modifiedDatetimeStart"u8); - JsonSerializer.Serialize(writer, ModifiedDatetimeStart); - } - if (Optional.IsDefined(ModifiedDatetimeEnd)) - { - writer.WritePropertyName("modifiedDatetimeEnd"u8); - JsonSerializer.Serialize(writer, ModifiedDatetimeEnd); - } - if (Optional.IsDefined(DistcpSettings)) - { - writer.WritePropertyName("distcpSettings"u8); - writer.WriteObjectValue(DistcpSettings); - } - if (Optional.IsDefined(DeleteFilesAfterCompletion)) - { - writer.WritePropertyName("deleteFilesAfterCompletion"u8); - JsonSerializer.Serialize(writer, DeleteFilesAfterCompletion); - } - writer.WritePropertyName("type"u8); - writer.WriteStringValue(StoreReadSettingsType); - if (Optional.IsDefined(MaxConcurrentConnections)) - { - writer.WritePropertyName("maxConcurrentConnections"u8); - JsonSerializer.Serialize(writer, MaxConcurrentConnections); - } - if (Optional.IsDefined(DisableMetricsCollection)) - { - writer.WritePropertyName("disableMetricsCollection"u8); - JsonSerializer.Serialize(writer, DisableMetricsCollection); - } - foreach (var item in AdditionalProperties) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.Value.ToString()).RootElement); -#endif - } - writer.WriteEndObject(); - } - - internal static HdfsReadSettings DeserializeHdfsReadSettings(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - Optional> recursive = default; - Optional> wildcardFolderPath = default; - Optional> wildcardFileName = default; - Optional> fileListPath = default; - Optional> enablePartitionDiscovery = default; - Optional> partitionRootPath = default; - Optional> modifiedDatetimeStart = default; - Optional> modifiedDatetimeEnd = default; - Optional distcpSettings = default; - Optional> deleteFilesAfterCompletion = default; - string type = default; - Optional> maxConcurrentConnections = default; - Optional> disableMetricsCollection = default; - IDictionary> additionalProperties = default; - Dictionary> additionalPropertiesDictionary = new Dictionary>(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("recursive"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - recursive = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("wildcardFolderPath"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - wildcardFolderPath = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("wildcardFileName"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - wildcardFileName = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("fileListPath"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - fileListPath = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("enablePartitionDiscovery"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - enablePartitionDiscovery = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("partitionRootPath"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - partitionRootPath = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("modifiedDatetimeStart"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - modifiedDatetimeStart = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("modifiedDatetimeEnd"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - modifiedDatetimeEnd = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("distcpSettings"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - distcpSettings = DistcpSettings.DeserializeDistcpSettings(property.Value); - continue; - } - if (property.NameEquals("deleteFilesAfterCompletion"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - deleteFilesAfterCompletion = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("type"u8)) - { - type = property.Value.GetString(); - continue; - } - if (property.NameEquals("maxConcurrentConnections"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - maxConcurrentConnections = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("disableMetricsCollection"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - disableMetricsCollection = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - additionalPropertiesDictionary.Add(property.Name, JsonSerializer.Deserialize>(property.Value.GetRawText())); - } - additionalProperties = additionalPropertiesDictionary; - return new HdfsReadSettings(type, maxConcurrentConnections.Value, disableMetricsCollection.Value, additionalProperties, recursive.Value, wildcardFolderPath.Value, wildcardFileName.Value, fileListPath.Value, enablePartitionDiscovery.Value, partitionRootPath.Value, modifiedDatetimeStart.Value, modifiedDatetimeEnd.Value, distcpSettings.Value, deleteFilesAfterCompletion.Value); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/HdfsReadSettings.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/HdfsReadSettings.cs deleted file mode 100644 index e9560420..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/HdfsReadSettings.cs +++ /dev/null @@ -1,69 +0,0 @@ -// - -#nullable disable - -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// HDFS read settings. - public partial class HdfsReadSettings : StoreReadSettings - { - /// Initializes a new instance of HdfsReadSettings. - public HdfsReadSettings() - { - StoreReadSettingsType = "HdfsReadSettings"; - } - - /// Initializes a new instance of HdfsReadSettings. - /// The read setting type. - /// The maximum concurrent connection count for the source data store. Type: integer (or Expression with resultType integer). - /// If true, disable data store metrics collection. Default is false. Type: boolean (or Expression with resultType boolean). - /// Additional Properties. - /// If true, files under the folder path will be read recursively. Default is true. Type: boolean (or Expression with resultType boolean). - /// HDFS wildcardFolderPath. Type: string (or Expression with resultType string). - /// HDFS wildcardFileName. Type: string (or Expression with resultType string). - /// Point to a text file that lists each file (relative path to the path configured in the dataset) that you want to copy. Type: string (or Expression with resultType string). - /// Indicates whether to enable partition discovery. Type: boolean (or Expression with resultType boolean). - /// Specify the root path where partition discovery starts from. Type: string (or Expression with resultType string). - /// The start of file's modified datetime. Type: string (or Expression with resultType string). - /// The end of file's modified datetime. Type: string (or Expression with resultType string). - /// Specifies Distcp-related settings. - /// Indicates whether the source files need to be deleted after copy completion. Default is false. Type: boolean (or Expression with resultType boolean). - internal HdfsReadSettings(string storeReadSettingsType, DataFactoryElement maxConcurrentConnections, DataFactoryElement disableMetricsCollection, IDictionary> additionalProperties, DataFactoryElement recursive, DataFactoryElement wildcardFolderPath, DataFactoryElement wildcardFileName, DataFactoryElement fileListPath, DataFactoryElement enablePartitionDiscovery, DataFactoryElement partitionRootPath, DataFactoryElement modifiedDatetimeStart, DataFactoryElement modifiedDatetimeEnd, DistcpSettings distcpSettings, DataFactoryElement deleteFilesAfterCompletion) : base(storeReadSettingsType, maxConcurrentConnections, disableMetricsCollection, additionalProperties) - { - Recursive = recursive; - WildcardFolderPath = wildcardFolderPath; - WildcardFileName = wildcardFileName; - FileListPath = fileListPath; - EnablePartitionDiscovery = enablePartitionDiscovery; - PartitionRootPath = partitionRootPath; - ModifiedDatetimeStart = modifiedDatetimeStart; - ModifiedDatetimeEnd = modifiedDatetimeEnd; - DistcpSettings = distcpSettings; - DeleteFilesAfterCompletion = deleteFilesAfterCompletion; - StoreReadSettingsType = storeReadSettingsType ?? "HdfsReadSettings"; - } - - /// If true, files under the folder path will be read recursively. Default is true. Type: boolean (or Expression with resultType boolean). - public DataFactoryElement Recursive { get; set; } - /// HDFS wildcardFolderPath. Type: string (or Expression with resultType string). - public DataFactoryElement WildcardFolderPath { get; set; } - /// HDFS wildcardFileName. Type: string (or Expression with resultType string). - public DataFactoryElement WildcardFileName { get; set; } - /// Point to a text file that lists each file (relative path to the path configured in the dataset) that you want to copy. Type: string (or Expression with resultType string). - public DataFactoryElement FileListPath { get; set; } - /// Indicates whether to enable partition discovery. Type: boolean (or Expression with resultType boolean). - public DataFactoryElement EnablePartitionDiscovery { get; set; } - /// Specify the root path where partition discovery starts from. Type: string (or Expression with resultType string). - public DataFactoryElement PartitionRootPath { get; set; } - /// The start of file's modified datetime. Type: string (or Expression with resultType string). - public DataFactoryElement ModifiedDatetimeStart { get; set; } - /// The end of file's modified datetime. Type: string (or Expression with resultType string). - public DataFactoryElement ModifiedDatetimeEnd { get; set; } - /// Specifies Distcp-related settings. - public DistcpSettings DistcpSettings { get; set; } - /// Indicates whether the source files need to be deleted after copy completion. Default is false. Type: boolean (or Expression with resultType boolean). - public DataFactoryElement DeleteFilesAfterCompletion { get; set; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/HdfsSource.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/HdfsSource.Serialization.cs deleted file mode 100644 index f6410eb3..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/HdfsSource.Serialization.cs +++ /dev/null @@ -1,142 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class HdfsSource : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - if (Optional.IsDefined(Recursive)) - { - writer.WritePropertyName("recursive"u8); - JsonSerializer.Serialize(writer, Recursive); - } - if (Optional.IsDefined(DistcpSettings)) - { - writer.WritePropertyName("distcpSettings"u8); - writer.WriteObjectValue(DistcpSettings); - } - writer.WritePropertyName("type"u8); - writer.WriteStringValue(CopySourceType); - if (Optional.IsDefined(SourceRetryCount)) - { - writer.WritePropertyName("sourceRetryCount"u8); - JsonSerializer.Serialize(writer, SourceRetryCount); - } - if (Optional.IsDefined(SourceRetryWait)) - { - writer.WritePropertyName("sourceRetryWait"u8); - JsonSerializer.Serialize(writer, SourceRetryWait); - } - if (Optional.IsDefined(MaxConcurrentConnections)) - { - writer.WritePropertyName("maxConcurrentConnections"u8); - JsonSerializer.Serialize(writer, MaxConcurrentConnections); - } - if (Optional.IsDefined(DisableMetricsCollection)) - { - writer.WritePropertyName("disableMetricsCollection"u8); - JsonSerializer.Serialize(writer, DisableMetricsCollection); - } - foreach (var item in AdditionalProperties) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.Value.ToString()).RootElement); -#endif - } - writer.WriteEndObject(); - } - - internal static HdfsSource DeserializeHdfsSource(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - Optional> recursive = default; - Optional distcpSettings = default; - string type = default; - Optional> sourceRetryCount = default; - Optional> sourceRetryWait = default; - Optional> maxConcurrentConnections = default; - Optional> disableMetricsCollection = default; - IDictionary> additionalProperties = default; - Dictionary> additionalPropertiesDictionary = new Dictionary>(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("recursive"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - recursive = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("distcpSettings"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - distcpSettings = DistcpSettings.DeserializeDistcpSettings(property.Value); - continue; - } - if (property.NameEquals("type"u8)) - { - type = property.Value.GetString(); - continue; - } - if (property.NameEquals("sourceRetryCount"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - sourceRetryCount = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("sourceRetryWait"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - sourceRetryWait = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("maxConcurrentConnections"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - maxConcurrentConnections = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("disableMetricsCollection"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - disableMetricsCollection = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - additionalPropertiesDictionary.Add(property.Name, JsonSerializer.Deserialize>(property.Value.GetRawText())); - } - additionalProperties = additionalPropertiesDictionary; - return new HdfsSource(type, sourceRetryCount.Value, sourceRetryWait.Value, maxConcurrentConnections.Value, disableMetricsCollection.Value, additionalProperties, recursive.Value, distcpSettings.Value); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/HdfsSource.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/HdfsSource.cs deleted file mode 100644 index 7bf7da82..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/HdfsSource.cs +++ /dev/null @@ -1,39 +0,0 @@ -// - -#nullable disable - -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// A copy activity HDFS source. - public partial class HdfsSource : CopyActivitySource - { - /// Initializes a new instance of HdfsSource. - public HdfsSource() - { - CopySourceType = "HdfsSource"; - } - - /// Initializes a new instance of HdfsSource. - /// Copy source type. - /// Source retry count. Type: integer (or Expression with resultType integer). - /// Source retry wait. Type: string (or Expression with resultType string), pattern: ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). - /// The maximum concurrent connection count for the source data store. Type: integer (or Expression with resultType integer). - /// If true, disable data store metrics collection. Default is false. Type: boolean (or Expression with resultType boolean). - /// Additional Properties. - /// If true, files under the folder path will be read recursively. Default is true. Type: boolean (or Expression with resultType boolean). - /// Specifies Distcp-related settings. - internal HdfsSource(string copySourceType, DataFactoryElement sourceRetryCount, DataFactoryElement sourceRetryWait, DataFactoryElement maxConcurrentConnections, DataFactoryElement disableMetricsCollection, IDictionary> additionalProperties, DataFactoryElement recursive, DistcpSettings distcpSettings) : base(copySourceType, sourceRetryCount, sourceRetryWait, maxConcurrentConnections, disableMetricsCollection, additionalProperties) - { - Recursive = recursive; - DistcpSettings = distcpSettings; - CopySourceType = copySourceType ?? "HdfsSource"; - } - - /// If true, files under the folder path will be read recursively. Default is true. Type: boolean (or Expression with resultType boolean). - public DataFactoryElement Recursive { get; set; } - /// Specifies Distcp-related settings. - public DistcpSettings DistcpSettings { get; set; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/HiveAuthenticationType.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/HiveAuthenticationType.cs deleted file mode 100644 index 1380f91d..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/HiveAuthenticationType.cs +++ /dev/null @@ -1,53 +0,0 @@ -// - -#nullable disable - -using System.ComponentModel; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// The authentication method used to access the Hive server. - public readonly partial struct HiveAuthenticationType : IEquatable - { - private readonly string _value; - - /// Initializes a new instance of . - /// is null. - public HiveAuthenticationType(string value) - { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } - - private const string AnonymousValue = "Anonymous"; - private const string UsernameValue = "Username"; - private const string UsernameAndPasswordValue = "UsernameAndPassword"; - private const string WindowsAzureHDInsightServiceValue = "WindowsAzureHDInsightService"; - - /// Anonymous. - public static HiveAuthenticationType Anonymous { get; } = new HiveAuthenticationType(AnonymousValue); - /// Username. - public static HiveAuthenticationType Username { get; } = new HiveAuthenticationType(UsernameValue); - /// UsernameAndPassword. - public static HiveAuthenticationType UsernameAndPassword { get; } = new HiveAuthenticationType(UsernameAndPasswordValue); - /// WindowsAzureHDInsightService. - public static HiveAuthenticationType WindowsAzureHDInsightService { get; } = new HiveAuthenticationType(WindowsAzureHDInsightServiceValue); - /// Determines if two values are the same. - public static bool operator ==(HiveAuthenticationType left, HiveAuthenticationType right) => left.Equals(right); - /// Determines if two values are not the same. - public static bool operator !=(HiveAuthenticationType left, HiveAuthenticationType right) => !left.Equals(right); - /// Converts a string to a . - public static implicit operator HiveAuthenticationType(string value) => new HiveAuthenticationType(value); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override bool Equals(object obj) => obj is HiveAuthenticationType other && Equals(other); - /// - public bool Equals(HiveAuthenticationType other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override int GetHashCode() => _value?.GetHashCode() ?? 0; - /// - public override string ToString() => _value; - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/HiveLinkedService.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/HiveLinkedService.Serialization.cs deleted file mode 100644 index d1f390e1..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/HiveLinkedService.Serialization.cs +++ /dev/null @@ -1,397 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class HiveLinkedService : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - writer.WritePropertyName("type"u8); - writer.WriteStringValue(LinkedServiceType); - if (Optional.IsDefined(ConnectVia)) - { - writer.WritePropertyName("connectVia"u8); - writer.WriteObjectValue(ConnectVia); - } - if (Optional.IsDefined(Description)) - { - writer.WritePropertyName("description"u8); - writer.WriteStringValue(Description); - } - if (Optional.IsCollectionDefined(Parameters)) - { - writer.WritePropertyName("parameters"u8); - writer.WriteStartObject(); - foreach (var item in Parameters) - { - writer.WritePropertyName(item.Key); - writer.WriteObjectValue(item.Value); - } - writer.WriteEndObject(); - } - if (Optional.IsCollectionDefined(Annotations)) - { - writer.WritePropertyName("annotations"u8); - writer.WriteStartArray(); - foreach (var item in Annotations) - { - if (item == null) - { - writer.WriteNullValue(); - continue; - } -#if NET6_0_OR_GREATER - writer.WriteRawValue(item); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.ToString()).RootElement); -#endif - } - writer.WriteEndArray(); - } - writer.WritePropertyName("typeProperties"u8); - writer.WriteStartObject(); - writer.WritePropertyName("host"u8); - JsonSerializer.Serialize(writer, Host); - if (Optional.IsDefined(Port)) - { - writer.WritePropertyName("port"u8); - JsonSerializer.Serialize(writer, Port); - } - if (Optional.IsDefined(ServerType)) - { - writer.WritePropertyName("serverType"u8); - writer.WriteStringValue(ServerType.Value.ToString()); - } - if (Optional.IsDefined(ThriftTransportProtocol)) - { - writer.WritePropertyName("thriftTransportProtocol"u8); - writer.WriteStringValue(ThriftTransportProtocol.Value.ToString()); - } - writer.WritePropertyName("authenticationType"u8); - writer.WriteStringValue(AuthenticationType.ToString()); - if (Optional.IsDefined(ServiceDiscoveryMode)) - { - writer.WritePropertyName("serviceDiscoveryMode"u8); - JsonSerializer.Serialize(writer, ServiceDiscoveryMode); - } - if (Optional.IsDefined(ZooKeeperNameSpace)) - { - writer.WritePropertyName("zooKeeperNameSpace"u8); - JsonSerializer.Serialize(writer, ZooKeeperNameSpace); - } - if (Optional.IsDefined(UseNativeQuery)) - { - writer.WritePropertyName("useNativeQuery"u8); - JsonSerializer.Serialize(writer, UseNativeQuery); - } - if (Optional.IsDefined(Username)) - { - writer.WritePropertyName("username"u8); - JsonSerializer.Serialize(writer, Username); - } - if (Optional.IsDefined(Password)) - { - writer.WritePropertyName("password"u8); - JsonSerializer.Serialize(writer, Password); - } - if (Optional.IsDefined(HttpPath)) - { - writer.WritePropertyName("httpPath"u8); - JsonSerializer.Serialize(writer, HttpPath); - } - if (Optional.IsDefined(EnableSsl)) - { - writer.WritePropertyName("enableSsl"u8); - JsonSerializer.Serialize(writer, EnableSsl); - } - if (Optional.IsDefined(TrustedCertPath)) - { - writer.WritePropertyName("trustedCertPath"u8); - JsonSerializer.Serialize(writer, TrustedCertPath); - } - if (Optional.IsDefined(UseSystemTrustStore)) - { - writer.WritePropertyName("useSystemTrustStore"u8); - JsonSerializer.Serialize(writer, UseSystemTrustStore); - } - if (Optional.IsDefined(AllowHostNameCNMismatch)) - { - writer.WritePropertyName("allowHostNameCNMismatch"u8); - JsonSerializer.Serialize(writer, AllowHostNameCNMismatch); - } - if (Optional.IsDefined(AllowSelfSignedServerCert)) - { - writer.WritePropertyName("allowSelfSignedServerCert"u8); - JsonSerializer.Serialize(writer, AllowSelfSignedServerCert); - } - if (Optional.IsDefined(EncryptedCredential)) - { - writer.WritePropertyName("encryptedCredential"u8); - writer.WriteStringValue(EncryptedCredential); - } - writer.WriteEndObject(); - foreach (var item in AdditionalProperties) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.Value.ToString()).RootElement); -#endif - } - writer.WriteEndObject(); - } - - internal static HiveLinkedService DeserializeHiveLinkedService(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - string type = default; - Optional connectVia = default; - Optional description = default; - Optional> parameters = default; - Optional> annotations = default; - DataFactoryElement host = default; - Optional> port = default; - Optional serverType = default; - Optional thriftTransportProtocol = default; - HiveAuthenticationType authenticationType = default; - Optional> serviceDiscoveryMode = default; - Optional> zooKeeperNameSpace = default; - Optional> useNativeQuery = default; - Optional> username = default; - Optional password = default; - Optional> httpPath = default; - Optional> enableSsl = default; - Optional> trustedCertPath = default; - Optional> useSystemTrustStore = default; - Optional> allowHostNameCNMismatch = default; - Optional> allowSelfSignedServerCert = default; - Optional encryptedCredential = default; - IDictionary> additionalProperties = default; - Dictionary> additionalPropertiesDictionary = new Dictionary>(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("type"u8)) - { - type = property.Value.GetString(); - continue; - } - if (property.NameEquals("connectVia"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - connectVia = IntegrationRuntimeReference.DeserializeIntegrationRuntimeReference(property.Value); - continue; - } - if (property.NameEquals("description"u8)) - { - description = property.Value.GetString(); - continue; - } - if (property.NameEquals("parameters"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - Dictionary dictionary = new Dictionary(); - foreach (var property0 in property.Value.EnumerateObject()) - { - dictionary.Add(property0.Name, EntityParameterSpecification.DeserializeEntityParameterSpecification(property0.Value)); - } - parameters = dictionary; - continue; - } - if (property.NameEquals("annotations"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - if (item.ValueKind == JsonValueKind.Null) - { - array.Add(null); - } - else - { - array.Add(BinaryData.FromString(item.GetRawText())); - } - } - annotations = array; - continue; - } - if (property.NameEquals("typeProperties"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - foreach (var property0 in property.Value.EnumerateObject()) - { - if (property0.NameEquals("host"u8)) - { - host = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("port"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - port = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("serverType"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - serverType = new HiveServerType(property0.Value.GetString()); - continue; - } - if (property0.NameEquals("thriftTransportProtocol"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - thriftTransportProtocol = new HiveThriftTransportProtocol(property0.Value.GetString()); - continue; - } - if (property0.NameEquals("authenticationType"u8)) - { - authenticationType = new HiveAuthenticationType(property0.Value.GetString()); - continue; - } - if (property0.NameEquals("serviceDiscoveryMode"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - serviceDiscoveryMode = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("zooKeeperNameSpace"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - zooKeeperNameSpace = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("useNativeQuery"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - useNativeQuery = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("username"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - username = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("password"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - password = JsonSerializer.Deserialize(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("httpPath"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - httpPath = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("enableSsl"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - enableSsl = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("trustedCertPath"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - trustedCertPath = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("useSystemTrustStore"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - useSystemTrustStore = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("allowHostNameCNMismatch"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - allowHostNameCNMismatch = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("allowSelfSignedServerCert"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - allowSelfSignedServerCert = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("encryptedCredential"u8)) - { - encryptedCredential = property0.Value.GetString(); - continue; - } - } - continue; - } - additionalPropertiesDictionary.Add(property.Name, JsonSerializer.Deserialize>(property.Value.GetRawText())); - } - additionalProperties = additionalPropertiesDictionary; - return new HiveLinkedService(type, connectVia.Value, description.Value, Optional.ToDictionary(parameters), Optional.ToList(annotations), additionalProperties, host, port.Value, Optional.ToNullable(serverType), Optional.ToNullable(thriftTransportProtocol), authenticationType, serviceDiscoveryMode.Value, zooKeeperNameSpace.Value, useNativeQuery.Value, username.Value, password, httpPath.Value, enableSsl.Value, trustedCertPath.Value, useSystemTrustStore.Value, allowHostNameCNMismatch.Value, allowSelfSignedServerCert.Value, encryptedCredential.Value); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/HiveLinkedService.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/HiveLinkedService.cs deleted file mode 100644 index 7b356d42..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/HiveLinkedService.cs +++ /dev/null @@ -1,107 +0,0 @@ -// - -#nullable disable - -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// Hive Server linked service. - public partial class HiveLinkedService : DataFactoryLinkedServiceProperties - { - /// Initializes a new instance of HiveLinkedService. - /// IP address or host name of the Hive server, separated by ';' for multiple hosts (only when serviceDiscoveryMode is enable). - /// The authentication method used to access the Hive server. - /// is null. - public HiveLinkedService(DataFactoryElement host, HiveAuthenticationType authenticationType) - { - Argument.AssertNotNull(host, nameof(host)); - - Host = host; - AuthenticationType = authenticationType; - LinkedServiceType = "Hive"; - } - - /// Initializes a new instance of HiveLinkedService. - /// Type of linked service. - /// The integration runtime reference. - /// Linked service description. - /// Parameters for linked service. - /// List of tags that can be used for describing the linked service. - /// Additional Properties. - /// IP address or host name of the Hive server, separated by ';' for multiple hosts (only when serviceDiscoveryMode is enable). - /// The TCP port that the Hive server uses to listen for client connections. - /// The type of Hive server. - /// The transport protocol to use in the Thrift layer. - /// The authentication method used to access the Hive server. - /// true to indicate using the ZooKeeper service, false not. - /// The namespace on ZooKeeper under which Hive Server 2 nodes are added. - /// Specifies whether the driver uses native HiveQL queries,or converts them into an equivalent form in HiveQL. - /// The user name that you use to access Hive Server. - /// The password corresponding to the user name that you provided in the Username field. - /// The partial URL corresponding to the Hive server. - /// Specifies whether the connections to the server are encrypted using SSL. The default value is false. - /// The full path of the .pem file containing trusted CA certificates for verifying the server when connecting over SSL. This property can only be set when using SSL on self-hosted IR. The default value is the cacerts.pem file installed with the IR. - /// Specifies whether to use a CA certificate from the system trust store or from a specified PEM file. The default value is false. - /// Specifies whether to require a CA-issued SSL certificate name to match the host name of the server when connecting over SSL. The default value is false. - /// Specifies whether to allow self-signed certificates from the server. The default value is false. - /// The encrypted credential used for authentication. Credentials are encrypted using the integration runtime credential manager. Type: string. - internal HiveLinkedService(string linkedServiceType, IntegrationRuntimeReference connectVia, string description, IDictionary parameters, IList annotations, IDictionary> additionalProperties, DataFactoryElement host, DataFactoryElement port, HiveServerType? serverType, HiveThriftTransportProtocol? thriftTransportProtocol, HiveAuthenticationType authenticationType, DataFactoryElement serviceDiscoveryMode, DataFactoryElement zooKeeperNameSpace, DataFactoryElement useNativeQuery, DataFactoryElement username, DataFactorySecretBaseDefinition password, DataFactoryElement httpPath, DataFactoryElement enableSsl, DataFactoryElement trustedCertPath, DataFactoryElement useSystemTrustStore, DataFactoryElement allowHostNameCNMismatch, DataFactoryElement allowSelfSignedServerCert, string encryptedCredential) : base(linkedServiceType, connectVia, description, parameters, annotations, additionalProperties) - { - Host = host; - Port = port; - ServerType = serverType; - ThriftTransportProtocol = thriftTransportProtocol; - AuthenticationType = authenticationType; - ServiceDiscoveryMode = serviceDiscoveryMode; - ZooKeeperNameSpace = zooKeeperNameSpace; - UseNativeQuery = useNativeQuery; - Username = username; - Password = password; - HttpPath = httpPath; - EnableSsl = enableSsl; - TrustedCertPath = trustedCertPath; - UseSystemTrustStore = useSystemTrustStore; - AllowHostNameCNMismatch = allowHostNameCNMismatch; - AllowSelfSignedServerCert = allowSelfSignedServerCert; - EncryptedCredential = encryptedCredential; - LinkedServiceType = linkedServiceType ?? "Hive"; - } - - /// IP address or host name of the Hive server, separated by ';' for multiple hosts (only when serviceDiscoveryMode is enable). - public DataFactoryElement Host { get; set; } - /// The TCP port that the Hive server uses to listen for client connections. - public DataFactoryElement Port { get; set; } - /// The type of Hive server. - public HiveServerType? ServerType { get; set; } - /// The transport protocol to use in the Thrift layer. - public HiveThriftTransportProtocol? ThriftTransportProtocol { get; set; } - /// The authentication method used to access the Hive server. - public HiveAuthenticationType AuthenticationType { get; set; } - /// true to indicate using the ZooKeeper service, false not. - public DataFactoryElement ServiceDiscoveryMode { get; set; } - /// The namespace on ZooKeeper under which Hive Server 2 nodes are added. - public DataFactoryElement ZooKeeperNameSpace { get; set; } - /// Specifies whether the driver uses native HiveQL queries,or converts them into an equivalent form in HiveQL. - public DataFactoryElement UseNativeQuery { get; set; } - /// The user name that you use to access Hive Server. - public DataFactoryElement Username { get; set; } - /// The password corresponding to the user name that you provided in the Username field. - public DataFactorySecretBaseDefinition Password { get; set; } - /// The partial URL corresponding to the Hive server. - public DataFactoryElement HttpPath { get; set; } - /// Specifies whether the connections to the server are encrypted using SSL. The default value is false. - public DataFactoryElement EnableSsl { get; set; } - /// The full path of the .pem file containing trusted CA certificates for verifying the server when connecting over SSL. This property can only be set when using SSL on self-hosted IR. The default value is the cacerts.pem file installed with the IR. - public DataFactoryElement TrustedCertPath { get; set; } - /// Specifies whether to use a CA certificate from the system trust store or from a specified PEM file. The default value is false. - public DataFactoryElement UseSystemTrustStore { get; set; } - /// Specifies whether to require a CA-issued SSL certificate name to match the host name of the server when connecting over SSL. The default value is false. - public DataFactoryElement AllowHostNameCNMismatch { get; set; } - /// Specifies whether to allow self-signed certificates from the server. The default value is false. - public DataFactoryElement AllowSelfSignedServerCert { get; set; } - /// The encrypted credential used for authentication. Credentials are encrypted using the integration runtime credential manager. Type: string. - public string EncryptedCredential { get; set; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/HiveObjectDataset.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/HiveObjectDataset.Serialization.cs deleted file mode 100644 index 879b881a..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/HiveObjectDataset.Serialization.cs +++ /dev/null @@ -1,246 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class HiveObjectDataset : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - writer.WritePropertyName("type"u8); - writer.WriteStringValue(DatasetType); - if (Optional.IsDefined(Description)) - { - writer.WritePropertyName("description"u8); - writer.WriteStringValue(Description); - } - if (Optional.IsDefined(Structure)) - { - writer.WritePropertyName("structure"u8); - JsonSerializer.Serialize(writer, Structure); - } - if (Optional.IsDefined(Schema)) - { - writer.WritePropertyName("schema"u8); - JsonSerializer.Serialize(writer, Schema); - } - writer.WritePropertyName("linkedServiceName"u8); - JsonSerializer.Serialize(writer, LinkedServiceName); if (Optional.IsCollectionDefined(Parameters)) - { - writer.WritePropertyName("parameters"u8); - writer.WriteStartObject(); - foreach (var item in Parameters) - { - writer.WritePropertyName(item.Key); - writer.WriteObjectValue(item.Value); - } - writer.WriteEndObject(); - } - if (Optional.IsCollectionDefined(Annotations)) - { - writer.WritePropertyName("annotations"u8); - writer.WriteStartArray(); - foreach (var item in Annotations) - { - if (item == null) - { - writer.WriteNullValue(); - continue; - } -#if NET6_0_OR_GREATER - writer.WriteRawValue(item); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.ToString()).RootElement); -#endif - } - writer.WriteEndArray(); - } - if (Optional.IsDefined(Folder)) - { - writer.WritePropertyName("folder"u8); - writer.WriteObjectValue(Folder); - } - writer.WritePropertyName("typeProperties"u8); - writer.WriteStartObject(); - if (Optional.IsDefined(TableName)) - { - writer.WritePropertyName("tableName"u8); -#if NET6_0_OR_GREATER - writer.WriteRawValue(TableName); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(TableName.ToString()).RootElement); -#endif - } - if (Optional.IsDefined(Table)) - { - writer.WritePropertyName("table"u8); - JsonSerializer.Serialize(writer, Table); - } - if (Optional.IsDefined(SchemaTypePropertiesSchema)) - { - writer.WritePropertyName("schema"u8); - JsonSerializer.Serialize(writer, SchemaTypePropertiesSchema); - } - writer.WriteEndObject(); - foreach (var item in AdditionalProperties) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.Value.ToString()).RootElement); -#endif - } - writer.WriteEndObject(); - } - - internal static HiveObjectDataset DeserializeHiveObjectDataset(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - string type = default; - Optional description = default; - Optional>> structure = default; - Optional>> schema = default; - DataFactoryLinkedServiceReference linkedServiceName = default; - Optional> parameters = default; - Optional> annotations = default; - Optional folder = default; - Optional tableName = default; - Optional> table = default; - Optional> schema0 = default; - IDictionary> additionalProperties = default; - Dictionary> additionalPropertiesDictionary = new Dictionary>(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("type"u8)) - { - type = property.Value.GetString(); - continue; - } - if (property.NameEquals("description"u8)) - { - description = property.Value.GetString(); - continue; - } - if (property.NameEquals("structure"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - structure = JsonSerializer.Deserialize>>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("schema"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - schema = JsonSerializer.Deserialize>>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("linkedServiceName"u8)) - { - linkedServiceName = JsonSerializer.Deserialize(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("parameters"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - Dictionary dictionary = new Dictionary(); - foreach (var property0 in property.Value.EnumerateObject()) - { - dictionary.Add(property0.Name, EntityParameterSpecification.DeserializeEntityParameterSpecification(property0.Value)); - } - parameters = dictionary; - continue; - } - if (property.NameEquals("annotations"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - if (item.ValueKind == JsonValueKind.Null) - { - array.Add(null); - } - else - { - array.Add(BinaryData.FromString(item.GetRawText())); - } - } - annotations = array; - continue; - } - if (property.NameEquals("folder"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - folder = DatasetFolder.DeserializeDatasetFolder(property.Value); - continue; - } - if (property.NameEquals("typeProperties"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - foreach (var property0 in property.Value.EnumerateObject()) - { - if (property0.NameEquals("tableName"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - tableName = BinaryData.FromString(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("table"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - table = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("schema"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - schema0 = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - } - continue; - } - additionalPropertiesDictionary.Add(property.Name, JsonSerializer.Deserialize>(property.Value.GetRawText())); - } - additionalProperties = additionalPropertiesDictionary; - return new HiveObjectDataset(type, description.Value, structure.Value, schema.Value, linkedServiceName, Optional.ToDictionary(parameters), Optional.ToList(annotations), folder.Value, additionalProperties, tableName.Value, table.Value, schema0.Value); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/HiveObjectDataset.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/HiveObjectDataset.cs deleted file mode 100644 index 9a5f0bcf..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/HiveObjectDataset.cs +++ /dev/null @@ -1,80 +0,0 @@ -// - -#nullable disable - -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// Hive Server dataset. - public partial class HiveObjectDataset : DataFactoryDatasetProperties - { - /// Initializes a new instance of HiveObjectDataset. - /// Linked service reference. - /// is null. - public HiveObjectDataset(DataFactoryLinkedServiceReference linkedServiceName) : base(linkedServiceName) - { - Argument.AssertNotNull(linkedServiceName, nameof(linkedServiceName)); - - DatasetType = "HiveObject"; - } - - /// Initializes a new instance of HiveObjectDataset. - /// Type of dataset. - /// Dataset description. - /// Columns that define the structure of the dataset. Type: array (or Expression with resultType array), itemType: DatasetDataElement. - /// Columns that define the physical type schema of the dataset. Type: array (or Expression with resultType array), itemType: DatasetSchemaDataElement. - /// Linked service reference. - /// Parameters for dataset. - /// List of tags that can be used for describing the Dataset. - /// The folder that this Dataset is in. If not specified, Dataset will appear at the root level. - /// Additional Properties. - /// This property will be retired. Please consider using schema + table properties instead. - /// The table name of the Hive. Type: string (or Expression with resultType string). - /// The schema name of the Hive. Type: string (or Expression with resultType string). - internal HiveObjectDataset(string datasetType, string description, DataFactoryElement> structure, DataFactoryElement> schema, DataFactoryLinkedServiceReference linkedServiceName, IDictionary parameters, IList annotations, DatasetFolder folder, IDictionary> additionalProperties, BinaryData tableName, DataFactoryElement table, DataFactoryElement schemaTypePropertiesSchema) : base(datasetType, description, structure, schema, linkedServiceName, parameters, annotations, folder, additionalProperties) - { - TableName = tableName; - Table = table; - SchemaTypePropertiesSchema = schemaTypePropertiesSchema; - DatasetType = datasetType ?? "HiveObject"; - } - - /// - /// This property will be retired. Please consider using schema + table properties instead. - /// - /// To assign an object to this property use . - /// - /// - /// To assign an already formated json string to this property use . - /// - /// - /// Examples: - /// - /// - /// BinaryData.FromObjectAsJson("foo") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromString("\"foo\"") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromObjectAsJson(new { key = "value" }) - /// Creates a payload of { "key": "value" }. - /// - /// - /// BinaryData.FromString("{\"key\": \"value\"}") - /// Creates a payload of { "key": "value" }. - /// - /// - /// - /// - public BinaryData TableName { get; set; } - /// The table name of the Hive. Type: string (or Expression with resultType string). - public DataFactoryElement Table { get; set; } - /// The schema name of the Hive. Type: string (or Expression with resultType string). - public DataFactoryElement SchemaTypePropertiesSchema { get; set; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/HiveServerType.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/HiveServerType.cs deleted file mode 100644 index f01b1ae6..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/HiveServerType.cs +++ /dev/null @@ -1,50 +0,0 @@ -// - -#nullable disable - -using System.ComponentModel; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// The type of Hive server. - public readonly partial struct HiveServerType : IEquatable - { - private readonly string _value; - - /// Initializes a new instance of . - /// is null. - public HiveServerType(string value) - { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } - - private const string HiveServer1Value = "HiveServer1"; - private const string HiveServer2Value = "HiveServer2"; - private const string HiveThriftServerValue = "HiveThriftServer"; - - /// HiveServer1. - public static HiveServerType HiveServer1 { get; } = new HiveServerType(HiveServer1Value); - /// HiveServer2. - public static HiveServerType HiveServer2 { get; } = new HiveServerType(HiveServer2Value); - /// HiveThriftServer. - public static HiveServerType HiveThriftServer { get; } = new HiveServerType(HiveThriftServerValue); - /// Determines if two values are the same. - public static bool operator ==(HiveServerType left, HiveServerType right) => left.Equals(right); - /// Determines if two values are not the same. - public static bool operator !=(HiveServerType left, HiveServerType right) => !left.Equals(right); - /// Converts a string to a . - public static implicit operator HiveServerType(string value) => new HiveServerType(value); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override bool Equals(object obj) => obj is HiveServerType other && Equals(other); - /// - public bool Equals(HiveServerType other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override int GetHashCode() => _value?.GetHashCode() ?? 0; - /// - public override string ToString() => _value; - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/HiveSource.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/HiveSource.Serialization.cs deleted file mode 100644 index e26d5b0c..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/HiveSource.Serialization.cs +++ /dev/null @@ -1,161 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class HiveSource : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - if (Optional.IsDefined(Query)) - { - writer.WritePropertyName("query"u8); - JsonSerializer.Serialize(writer, Query); - } - if (Optional.IsDefined(QueryTimeout)) - { - writer.WritePropertyName("queryTimeout"u8); - JsonSerializer.Serialize(writer, QueryTimeout); - } - if (Optional.IsDefined(AdditionalColumns)) - { - writer.WritePropertyName("additionalColumns"u8); -#if NET6_0_OR_GREATER - writer.WriteRawValue(AdditionalColumns); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(AdditionalColumns.ToString()).RootElement); -#endif - } - writer.WritePropertyName("type"u8); - writer.WriteStringValue(CopySourceType); - if (Optional.IsDefined(SourceRetryCount)) - { - writer.WritePropertyName("sourceRetryCount"u8); - JsonSerializer.Serialize(writer, SourceRetryCount); - } - if (Optional.IsDefined(SourceRetryWait)) - { - writer.WritePropertyName("sourceRetryWait"u8); - JsonSerializer.Serialize(writer, SourceRetryWait); - } - if (Optional.IsDefined(MaxConcurrentConnections)) - { - writer.WritePropertyName("maxConcurrentConnections"u8); - JsonSerializer.Serialize(writer, MaxConcurrentConnections); - } - if (Optional.IsDefined(DisableMetricsCollection)) - { - writer.WritePropertyName("disableMetricsCollection"u8); - JsonSerializer.Serialize(writer, DisableMetricsCollection); - } - foreach (var item in AdditionalProperties) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.Value.ToString()).RootElement); -#endif - } - writer.WriteEndObject(); - } - - internal static HiveSource DeserializeHiveSource(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - Optional> query = default; - Optional> queryTimeout = default; - Optional additionalColumns = default; - string type = default; - Optional> sourceRetryCount = default; - Optional> sourceRetryWait = default; - Optional> maxConcurrentConnections = default; - Optional> disableMetricsCollection = default; - IDictionary> additionalProperties = default; - Dictionary> additionalPropertiesDictionary = new Dictionary>(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("query"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - query = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("queryTimeout"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - queryTimeout = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("additionalColumns"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - additionalColumns = BinaryData.FromString(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("type"u8)) - { - type = property.Value.GetString(); - continue; - } - if (property.NameEquals("sourceRetryCount"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - sourceRetryCount = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("sourceRetryWait"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - sourceRetryWait = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("maxConcurrentConnections"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - maxConcurrentConnections = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("disableMetricsCollection"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - disableMetricsCollection = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - additionalPropertiesDictionary.Add(property.Name, JsonSerializer.Deserialize>(property.Value.GetRawText())); - } - additionalProperties = additionalPropertiesDictionary; - return new HiveSource(type, sourceRetryCount.Value, sourceRetryWait.Value, maxConcurrentConnections.Value, disableMetricsCollection.Value, additionalProperties, queryTimeout.Value, additionalColumns.Value, query.Value); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/HiveSource.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/HiveSource.cs deleted file mode 100644 index 22d48d88..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/HiveSource.cs +++ /dev/null @@ -1,37 +0,0 @@ -// - -#nullable disable - -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// A copy activity Hive Server source. - public partial class HiveSource : TabularSource - { - /// Initializes a new instance of HiveSource. - public HiveSource() - { - CopySourceType = "HiveSource"; - } - - /// Initializes a new instance of HiveSource. - /// Copy source type. - /// Source retry count. Type: integer (or Expression with resultType integer). - /// Source retry wait. Type: string (or Expression with resultType string), pattern: ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). - /// The maximum concurrent connection count for the source data store. Type: integer (or Expression with resultType integer). - /// If true, disable data store metrics collection. Default is false. Type: boolean (or Expression with resultType boolean). - /// Additional Properties. - /// 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). - /// A query to retrieve data from source. Type: string (or Expression with resultType string). - internal HiveSource(string copySourceType, DataFactoryElement sourceRetryCount, DataFactoryElement sourceRetryWait, DataFactoryElement maxConcurrentConnections, DataFactoryElement disableMetricsCollection, IDictionary> additionalProperties, DataFactoryElement queryTimeout, BinaryData additionalColumns, DataFactoryElement query) : base(copySourceType, sourceRetryCount, sourceRetryWait, maxConcurrentConnections, disableMetricsCollection, additionalProperties, queryTimeout, additionalColumns) - { - Query = query; - CopySourceType = copySourceType ?? "HiveSource"; - } - - /// A query to retrieve data from source. Type: string (or Expression with resultType string). - public DataFactoryElement Query { get; set; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/HiveThriftTransportProtocol.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/HiveThriftTransportProtocol.cs deleted file mode 100644 index 764ca3bd..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/HiveThriftTransportProtocol.cs +++ /dev/null @@ -1,50 +0,0 @@ -// - -#nullable disable - -using System.ComponentModel; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// The transport protocol to use in the Thrift layer. - public readonly partial struct HiveThriftTransportProtocol : IEquatable - { - private readonly string _value; - - /// Initializes a new instance of . - /// is null. - public HiveThriftTransportProtocol(string value) - { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } - - private const string BinaryValue = "Binary"; - private const string SaslValue = "SASL"; - private const string HttpValue = "HTTP "; - - /// Binary. - public static HiveThriftTransportProtocol Binary { get; } = new HiveThriftTransportProtocol(BinaryValue); - /// SASL. - public static HiveThriftTransportProtocol Sasl { get; } = new HiveThriftTransportProtocol(SaslValue); - /// HTTP. - public static HiveThriftTransportProtocol Http { get; } = new HiveThriftTransportProtocol(HttpValue); - /// Determines if two values are the same. - public static bool operator ==(HiveThriftTransportProtocol left, HiveThriftTransportProtocol right) => left.Equals(right); - /// Determines if two values are not the same. - public static bool operator !=(HiveThriftTransportProtocol left, HiveThriftTransportProtocol right) => !left.Equals(right); - /// Converts a string to a . - public static implicit operator HiveThriftTransportProtocol(string value) => new HiveThriftTransportProtocol(value); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override bool Equals(object obj) => obj is HiveThriftTransportProtocol other && Equals(other); - /// - public bool Equals(HiveThriftTransportProtocol other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override int GetHashCode() => _value?.GetHashCode() ?? 0; - /// - public override string ToString() => _value; - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/HttpAuthenticationType.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/HttpAuthenticationType.cs deleted file mode 100644 index fc2d69f6..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/HttpAuthenticationType.cs +++ /dev/null @@ -1,56 +0,0 @@ -// - -#nullable disable - -using System.ComponentModel; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// The authentication type to be used to connect to the HTTP server. - public readonly partial struct HttpAuthenticationType : IEquatable - { - private readonly string _value; - - /// Initializes a new instance of . - /// is null. - public HttpAuthenticationType(string value) - { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } - - private const string BasicValue = "Basic"; - private const string AnonymousValue = "Anonymous"; - private const string DigestValue = "Digest"; - private const string WindowsValue = "Windows"; - private const string ClientCertificateValue = "ClientCertificate"; - - /// Basic. - public static HttpAuthenticationType Basic { get; } = new HttpAuthenticationType(BasicValue); - /// Anonymous. - public static HttpAuthenticationType Anonymous { get; } = new HttpAuthenticationType(AnonymousValue); - /// Digest. - public static HttpAuthenticationType Digest { get; } = new HttpAuthenticationType(DigestValue); - /// Windows. - public static HttpAuthenticationType Windows { get; } = new HttpAuthenticationType(WindowsValue); - /// ClientCertificate. - public static HttpAuthenticationType ClientCertificate { get; } = new HttpAuthenticationType(ClientCertificateValue); - /// Determines if two values are the same. - public static bool operator ==(HttpAuthenticationType left, HttpAuthenticationType right) => left.Equals(right); - /// Determines if two values are not the same. - public static bool operator !=(HttpAuthenticationType left, HttpAuthenticationType right) => !left.Equals(right); - /// Converts a string to a . - public static implicit operator HttpAuthenticationType(string value) => new HttpAuthenticationType(value); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override bool Equals(object obj) => obj is HttpAuthenticationType other && Equals(other); - /// - public bool Equals(HttpAuthenticationType other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override int GetHashCode() => _value?.GetHashCode() ?? 0; - /// - public override string ToString() => _value; - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/HttpLinkedService.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/HttpLinkedService.Serialization.cs deleted file mode 100644 index 4779e8ba..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/HttpLinkedService.Serialization.cs +++ /dev/null @@ -1,284 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class HttpLinkedService : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - writer.WritePropertyName("type"u8); - writer.WriteStringValue(LinkedServiceType); - if (Optional.IsDefined(ConnectVia)) - { - writer.WritePropertyName("connectVia"u8); - writer.WriteObjectValue(ConnectVia); - } - if (Optional.IsDefined(Description)) - { - writer.WritePropertyName("description"u8); - writer.WriteStringValue(Description); - } - if (Optional.IsCollectionDefined(Parameters)) - { - writer.WritePropertyName("parameters"u8); - writer.WriteStartObject(); - foreach (var item in Parameters) - { - writer.WritePropertyName(item.Key); - writer.WriteObjectValue(item.Value); - } - writer.WriteEndObject(); - } - if (Optional.IsCollectionDefined(Annotations)) - { - writer.WritePropertyName("annotations"u8); - writer.WriteStartArray(); - foreach (var item in Annotations) - { - if (item == null) - { - writer.WriteNullValue(); - continue; - } -#if NET6_0_OR_GREATER - writer.WriteRawValue(item); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.ToString()).RootElement); -#endif - } - writer.WriteEndArray(); - } - writer.WritePropertyName("typeProperties"u8); - writer.WriteStartObject(); - writer.WritePropertyName("url"u8); - JsonSerializer.Serialize(writer, Uri); - if (Optional.IsDefined(AuthenticationType)) - { - writer.WritePropertyName("authenticationType"u8); - writer.WriteStringValue(AuthenticationType.Value.ToString()); - } - if (Optional.IsDefined(UserName)) - { - writer.WritePropertyName("userName"u8); - JsonSerializer.Serialize(writer, UserName); - } - if (Optional.IsDefined(Password)) - { - writer.WritePropertyName("password"u8); - JsonSerializer.Serialize(writer, Password); - } - if (Optional.IsDefined(AuthHeaders)) - { - writer.WritePropertyName("authHeaders"u8); - JsonSerializer.Serialize(writer, AuthHeaders); - } - if (Optional.IsDefined(EmbeddedCertData)) - { - writer.WritePropertyName("embeddedCertData"u8); - JsonSerializer.Serialize(writer, EmbeddedCertData); - } - if (Optional.IsDefined(CertThumbprint)) - { - writer.WritePropertyName("certThumbprint"u8); - JsonSerializer.Serialize(writer, CertThumbprint); - } - if (Optional.IsDefined(EncryptedCredential)) - { - writer.WritePropertyName("encryptedCredential"u8); - writer.WriteStringValue(EncryptedCredential); - } - if (Optional.IsDefined(EnableServerCertificateValidation)) - { - writer.WritePropertyName("enableServerCertificateValidation"u8); - JsonSerializer.Serialize(writer, EnableServerCertificateValidation); - } - writer.WriteEndObject(); - foreach (var item in AdditionalProperties) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.Value.ToString()).RootElement); -#endif - } - writer.WriteEndObject(); - } - - internal static HttpLinkedService DeserializeHttpLinkedService(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - string type = default; - Optional connectVia = default; - Optional description = default; - Optional> parameters = default; - Optional> annotations = default; - DataFactoryElement url = default; - Optional authenticationType = default; - Optional> userName = default; - Optional password = default; - Optional> authHeaders = default; - Optional> embeddedCertData = default; - Optional> certThumbprint = default; - Optional encryptedCredential = default; - Optional> enableServerCertificateValidation = default; - IDictionary> additionalProperties = default; - Dictionary> additionalPropertiesDictionary = new Dictionary>(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("type"u8)) - { - type = property.Value.GetString(); - continue; - } - if (property.NameEquals("connectVia"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - connectVia = IntegrationRuntimeReference.DeserializeIntegrationRuntimeReference(property.Value); - continue; - } - if (property.NameEquals("description"u8)) - { - description = property.Value.GetString(); - continue; - } - if (property.NameEquals("parameters"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - Dictionary dictionary = new Dictionary(); - foreach (var property0 in property.Value.EnumerateObject()) - { - dictionary.Add(property0.Name, EntityParameterSpecification.DeserializeEntityParameterSpecification(property0.Value)); - } - parameters = dictionary; - continue; - } - if (property.NameEquals("annotations"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - if (item.ValueKind == JsonValueKind.Null) - { - array.Add(null); - } - else - { - array.Add(BinaryData.FromString(item.GetRawText())); - } - } - annotations = array; - continue; - } - if (property.NameEquals("typeProperties"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - foreach (var property0 in property.Value.EnumerateObject()) - { - if (property0.NameEquals("url"u8)) - { - url = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("authenticationType"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - authenticationType = new HttpAuthenticationType(property0.Value.GetString()); - continue; - } - if (property0.NameEquals("userName"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - userName = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("password"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - password = JsonSerializer.Deserialize(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("authHeaders"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - authHeaders = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("embeddedCertData"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - embeddedCertData = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("certThumbprint"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - certThumbprint = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("encryptedCredential"u8)) - { - encryptedCredential = property0.Value.GetString(); - continue; - } - if (property0.NameEquals("enableServerCertificateValidation"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - enableServerCertificateValidation = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - } - continue; - } - additionalPropertiesDictionary.Add(property.Name, JsonSerializer.Deserialize>(property.Value.GetRawText())); - } - additionalProperties = additionalPropertiesDictionary; - return new HttpLinkedService(type, connectVia.Value, description.Value, Optional.ToDictionary(parameters), Optional.ToList(annotations), additionalProperties, url, Optional.ToNullable(authenticationType), userName.Value, password, authHeaders.Value, embeddedCertData.Value, certThumbprint.Value, encryptedCredential.Value, enableServerCertificateValidation.Value); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/HttpLinkedService.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/HttpLinkedService.cs deleted file mode 100644 index 717a22e9..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/HttpLinkedService.cs +++ /dev/null @@ -1,73 +0,0 @@ -// - -#nullable disable - -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// Linked service for an HTTP source. - public partial class HttpLinkedService : DataFactoryLinkedServiceProperties - { - /// Initializes a new instance of HttpLinkedService. - /// The base URL of the HTTP endpoint, e.g. https://www.microsoft.com. Type: string (or Expression with resultType string). - /// is null. - public HttpLinkedService(DataFactoryElement uri) - { - Argument.AssertNotNull(uri, nameof(uri)); - - Uri = uri; - LinkedServiceType = "HttpServer"; - } - - /// Initializes a new instance of HttpLinkedService. - /// Type of linked service. - /// The integration runtime reference. - /// Linked service description. - /// Parameters for linked service. - /// List of tags that can be used for describing the linked service. - /// Additional Properties. - /// The base URL of the HTTP endpoint, e.g. https://www.microsoft.com. Type: string (or Expression with resultType string). - /// The authentication type to be used to connect to the HTTP server. - /// User name for Basic, Digest, or Windows authentication. Type: string (or Expression with resultType string). - /// Password for Basic, Digest, Windows, or ClientCertificate with EmbeddedCertData authentication. - /// The additional HTTP headers in the request to RESTful API used for authorization. Type: object (or Expression with resultType object). - /// Base64 encoded certificate data for ClientCertificate authentication. For on-premises copy with ClientCertificate authentication, either CertThumbprint or EmbeddedCertData/Password should be specified. Type: string (or Expression with resultType string). - /// Thumbprint of certificate for ClientCertificate authentication. Only valid for on-premises copy. For on-premises copy with ClientCertificate authentication, either CertThumbprint or EmbeddedCertData/Password should be specified. Type: string (or Expression with resultType string). - /// The encrypted credential used for authentication. Credentials are encrypted using the integration runtime credential manager. Type: string. - /// If true, validate the HTTPS server SSL certificate. Default value is true. Type: boolean (or Expression with resultType boolean). - internal HttpLinkedService(string linkedServiceType, IntegrationRuntimeReference connectVia, string description, IDictionary parameters, IList annotations, IDictionary> additionalProperties, DataFactoryElement uri, HttpAuthenticationType? authenticationType, DataFactoryElement userName, DataFactorySecretBaseDefinition password, DataFactoryElement authHeaders, DataFactoryElement embeddedCertData, DataFactoryElement certThumbprint, string encryptedCredential, DataFactoryElement enableServerCertificateValidation) : base(linkedServiceType, connectVia, description, parameters, annotations, additionalProperties) - { - Uri = uri; - AuthenticationType = authenticationType; - UserName = userName; - Password = password; - AuthHeaders = authHeaders; - EmbeddedCertData = embeddedCertData; - CertThumbprint = certThumbprint; - EncryptedCredential = encryptedCredential; - EnableServerCertificateValidation = enableServerCertificateValidation; - LinkedServiceType = linkedServiceType ?? "HttpServer"; - } - - /// The base URL of the HTTP endpoint, e.g. https://www.microsoft.com. Type: string (or Expression with resultType string). - public DataFactoryElement Uri { get; set; } - /// The authentication type to be used to connect to the HTTP server. - public HttpAuthenticationType? AuthenticationType { get; set; } - /// User name for Basic, Digest, or Windows authentication. Type: string (or Expression with resultType string). - public DataFactoryElement UserName { get; set; } - /// Password for Basic, Digest, Windows, or ClientCertificate with EmbeddedCertData authentication. - public DataFactorySecretBaseDefinition Password { get; set; } - /// The additional HTTP headers in the request to RESTful API used for authorization. Type: object (or Expression with resultType object). - public DataFactoryElement AuthHeaders { get; set; } - /// Base64 encoded certificate data for ClientCertificate authentication. For on-premises copy with ClientCertificate authentication, either CertThumbprint or EmbeddedCertData/Password should be specified. Type: string (or Expression with resultType string). - public DataFactoryElement EmbeddedCertData { get; set; } - /// Thumbprint of certificate for ClientCertificate authentication. Only valid for on-premises copy. For on-premises copy with ClientCertificate authentication, either CertThumbprint or EmbeddedCertData/Password should be specified. Type: string (or Expression with resultType string). - public DataFactoryElement CertThumbprint { get; set; } - /// The encrypted credential used for authentication. Credentials are encrypted using the integration runtime credential manager. Type: string. - public string EncryptedCredential { get; set; } - /// If true, validate the HTTPS server SSL certificate. Default value is true. Type: boolean (or Expression with resultType boolean). - public DataFactoryElement EnableServerCertificateValidation { get; set; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/HttpReadSettings.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/HttpReadSettings.Serialization.cs deleted file mode 100644 index 2ddc4273..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/HttpReadSettings.Serialization.cs +++ /dev/null @@ -1,161 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class HttpReadSettings : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - if (Optional.IsDefined(RequestMethod)) - { - writer.WritePropertyName("requestMethod"u8); - JsonSerializer.Serialize(writer, RequestMethod); - } - if (Optional.IsDefined(RequestBody)) - { - writer.WritePropertyName("requestBody"u8); - JsonSerializer.Serialize(writer, RequestBody); - } - if (Optional.IsDefined(AdditionalHeaders)) - { - writer.WritePropertyName("additionalHeaders"u8); - JsonSerializer.Serialize(writer, AdditionalHeaders); - } - if (Optional.IsDefined(RequestTimeout)) - { - writer.WritePropertyName("requestTimeout"u8); - JsonSerializer.Serialize(writer, RequestTimeout); - } - if (Optional.IsDefined(AdditionalColumns)) - { - writer.WritePropertyName("additionalColumns"u8); -#if NET6_0_OR_GREATER - writer.WriteRawValue(AdditionalColumns); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(AdditionalColumns.ToString()).RootElement); -#endif - } - writer.WritePropertyName("type"u8); - writer.WriteStringValue(StoreReadSettingsType); - if (Optional.IsDefined(MaxConcurrentConnections)) - { - writer.WritePropertyName("maxConcurrentConnections"u8); - JsonSerializer.Serialize(writer, MaxConcurrentConnections); - } - if (Optional.IsDefined(DisableMetricsCollection)) - { - writer.WritePropertyName("disableMetricsCollection"u8); - JsonSerializer.Serialize(writer, DisableMetricsCollection); - } - foreach (var item in AdditionalProperties) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.Value.ToString()).RootElement); -#endif - } - writer.WriteEndObject(); - } - - internal static HttpReadSettings DeserializeHttpReadSettings(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - Optional> requestMethod = default; - Optional> requestBody = default; - Optional> additionalHeaders = default; - Optional> requestTimeout = default; - Optional additionalColumns = default; - string type = default; - Optional> maxConcurrentConnections = default; - Optional> disableMetricsCollection = default; - IDictionary> additionalProperties = default; - Dictionary> additionalPropertiesDictionary = new Dictionary>(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("requestMethod"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - requestMethod = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("requestBody"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - requestBody = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("additionalHeaders"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - additionalHeaders = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("requestTimeout"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - requestTimeout = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("additionalColumns"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - additionalColumns = BinaryData.FromString(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("type"u8)) - { - type = property.Value.GetString(); - continue; - } - if (property.NameEquals("maxConcurrentConnections"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - maxConcurrentConnections = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("disableMetricsCollection"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - disableMetricsCollection = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - additionalPropertiesDictionary.Add(property.Name, JsonSerializer.Deserialize>(property.Value.GetRawText())); - } - additionalProperties = additionalPropertiesDictionary; - return new HttpReadSettings(type, maxConcurrentConnections.Value, disableMetricsCollection.Value, additionalProperties, requestMethod.Value, requestBody.Value, additionalHeaders.Value, requestTimeout.Value, additionalColumns.Value); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/HttpReadSettings.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/HttpReadSettings.cs deleted file mode 100644 index 52db45eb..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/HttpReadSettings.cs +++ /dev/null @@ -1,78 +0,0 @@ -// - -#nullable disable - -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// Http read settings. - public partial class HttpReadSettings : StoreReadSettings - { - /// Initializes a new instance of HttpReadSettings. - public HttpReadSettings() - { - StoreReadSettingsType = "HttpReadSettings"; - } - - /// Initializes a new instance of HttpReadSettings. - /// The read setting type. - /// The maximum concurrent connection count for the source data store. Type: integer (or Expression with resultType integer). - /// If true, disable data store metrics collection. Default is false. Type: boolean (or Expression with resultType boolean). - /// Additional Properties. - /// The HTTP method used to call the RESTful API. The default is GET. Type: string (or Expression with resultType string). - /// The HTTP request body to the RESTful API if requestMethod is POST. Type: string (or Expression with resultType string). - /// The additional HTTP headers in the request to the RESTful API. Type: string (or Expression with resultType string). - /// Specifies the timeout for a HTTP client to get HTTP response from HTTP server. Type: string (or Expression with resultType string). - /// Specifies the additional columns to be added to source data. Type: array of objects(AdditionalColumns) (or Expression with resultType array of objects). - internal HttpReadSettings(string storeReadSettingsType, DataFactoryElement maxConcurrentConnections, DataFactoryElement disableMetricsCollection, IDictionary> additionalProperties, DataFactoryElement requestMethod, DataFactoryElement requestBody, DataFactoryElement additionalHeaders, DataFactoryElement requestTimeout, BinaryData additionalColumns) : base(storeReadSettingsType, maxConcurrentConnections, disableMetricsCollection, additionalProperties) - { - RequestMethod = requestMethod; - RequestBody = requestBody; - AdditionalHeaders = additionalHeaders; - RequestTimeout = requestTimeout; - AdditionalColumns = additionalColumns; - StoreReadSettingsType = storeReadSettingsType ?? "HttpReadSettings"; - } - - /// The HTTP method used to call the RESTful API. The default is GET. Type: string (or Expression with resultType string). - public DataFactoryElement RequestMethod { get; set; } - /// The HTTP request body to the RESTful API if requestMethod is POST. Type: string (or Expression with resultType string). - public DataFactoryElement RequestBody { get; set; } - /// The additional HTTP headers in the request to the RESTful API. Type: string (or Expression with resultType string). - public DataFactoryElement AdditionalHeaders { get; set; } - /// Specifies the timeout for a HTTP client to get HTTP response from HTTP server. Type: string (or Expression with resultType string). - public DataFactoryElement RequestTimeout { get; set; } - /// - /// Specifies the additional columns to be added to source data. Type: array of objects(AdditionalColumns) (or Expression with resultType array of objects). - /// - /// To assign an object to this property use . - /// - /// - /// To assign an already formated json string to this property use . - /// - /// - /// Examples: - /// - /// - /// BinaryData.FromObjectAsJson("foo") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromString("\"foo\"") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromObjectAsJson(new { key = "value" }) - /// Creates a payload of { "key": "value" }. - /// - /// - /// BinaryData.FromString("{\"key\": \"value\"}") - /// Creates a payload of { "key": "value" }. - /// - /// - /// - /// - public BinaryData AdditionalColumns { get; set; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/HttpServerLocation.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/HttpServerLocation.Serialization.cs deleted file mode 100644 index 3c5d3b73..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/HttpServerLocation.Serialization.cs +++ /dev/null @@ -1,97 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class HttpServerLocation : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - if (Optional.IsDefined(RelativeUri)) - { - writer.WritePropertyName("relativeUrl"u8); - JsonSerializer.Serialize(writer, RelativeUri); - } - writer.WritePropertyName("type"u8); - writer.WriteStringValue(DatasetLocationType); - if (Optional.IsDefined(FolderPath)) - { - writer.WritePropertyName("folderPath"u8); - JsonSerializer.Serialize(writer, FolderPath); - } - if (Optional.IsDefined(FileName)) - { - writer.WritePropertyName("fileName"u8); - JsonSerializer.Serialize(writer, FileName); - } - foreach (var item in AdditionalProperties) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.Value.ToString()).RootElement); -#endif - } - writer.WriteEndObject(); - } - - internal static HttpServerLocation DeserializeHttpServerLocation(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - Optional> relativeUrl = default; - string type = default; - Optional> folderPath = default; - Optional> fileName = default; - IDictionary> additionalProperties = default; - Dictionary> additionalPropertiesDictionary = new Dictionary>(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("relativeUrl"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - relativeUrl = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("type"u8)) - { - type = property.Value.GetString(); - continue; - } - if (property.NameEquals("folderPath"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - folderPath = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("fileName"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - fileName = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - additionalPropertiesDictionary.Add(property.Name, JsonSerializer.Deserialize>(property.Value.GetRawText())); - } - additionalProperties = additionalPropertiesDictionary; - return new HttpServerLocation(type, folderPath.Value, fileName.Value, additionalProperties, relativeUrl.Value); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/HttpServerLocation.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/HttpServerLocation.cs deleted file mode 100644 index e3c328e7..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/HttpServerLocation.cs +++ /dev/null @@ -1,33 +0,0 @@ -// - -#nullable disable - -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// The location of http server. - public partial class HttpServerLocation : DatasetLocation - { - /// Initializes a new instance of HttpServerLocation. - public HttpServerLocation() - { - DatasetLocationType = "HttpServerLocation"; - } - - /// Initializes a new instance of HttpServerLocation. - /// Type of dataset storage location. - /// Specify the folder path of dataset. Type: string (or Expression with resultType string). - /// Specify the file name of dataset. Type: string (or Expression with resultType string). - /// Additional Properties. - /// Specify the relativeUrl of http server. Type: string (or Expression with resultType string). - internal HttpServerLocation(string datasetLocationType, DataFactoryElement folderPath, DataFactoryElement fileName, IDictionary> additionalProperties, DataFactoryElement relativeUri) : base(datasetLocationType, folderPath, fileName, additionalProperties) - { - RelativeUri = relativeUri; - DatasetLocationType = datasetLocationType ?? "HttpServerLocation"; - } - - /// Specify the relativeUrl of http server. Type: string (or Expression with resultType string). - public DataFactoryElement RelativeUri { get; set; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/HubspotLinkedService.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/HubspotLinkedService.Serialization.cs deleted file mode 100644 index f6f1684e..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/HubspotLinkedService.Serialization.cs +++ /dev/null @@ -1,269 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class HubspotLinkedService : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - writer.WritePropertyName("type"u8); - writer.WriteStringValue(LinkedServiceType); - if (Optional.IsDefined(ConnectVia)) - { - writer.WritePropertyName("connectVia"u8); - writer.WriteObjectValue(ConnectVia); - } - if (Optional.IsDefined(Description)) - { - writer.WritePropertyName("description"u8); - writer.WriteStringValue(Description); - } - if (Optional.IsCollectionDefined(Parameters)) - { - writer.WritePropertyName("parameters"u8); - writer.WriteStartObject(); - foreach (var item in Parameters) - { - writer.WritePropertyName(item.Key); - writer.WriteObjectValue(item.Value); - } - writer.WriteEndObject(); - } - if (Optional.IsCollectionDefined(Annotations)) - { - writer.WritePropertyName("annotations"u8); - writer.WriteStartArray(); - foreach (var item in Annotations) - { - if (item == null) - { - writer.WriteNullValue(); - continue; - } -#if NET6_0_OR_GREATER - writer.WriteRawValue(item); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.ToString()).RootElement); -#endif - } - writer.WriteEndArray(); - } - writer.WritePropertyName("typeProperties"u8); - writer.WriteStartObject(); - writer.WritePropertyName("clientId"u8); - JsonSerializer.Serialize(writer, ClientId); - if (Optional.IsDefined(ClientSecret)) - { - writer.WritePropertyName("clientSecret"u8); - JsonSerializer.Serialize(writer, ClientSecret); - } - if (Optional.IsDefined(AccessToken)) - { - writer.WritePropertyName("accessToken"u8); - JsonSerializer.Serialize(writer, AccessToken); - } - if (Optional.IsDefined(RefreshToken)) - { - writer.WritePropertyName("refreshToken"u8); - JsonSerializer.Serialize(writer, RefreshToken); - } - if (Optional.IsDefined(UseEncryptedEndpoints)) - { - writer.WritePropertyName("useEncryptedEndpoints"u8); - JsonSerializer.Serialize(writer, UseEncryptedEndpoints); - } - if (Optional.IsDefined(UseHostVerification)) - { - writer.WritePropertyName("useHostVerification"u8); - JsonSerializer.Serialize(writer, UseHostVerification); - } - if (Optional.IsDefined(UsePeerVerification)) - { - writer.WritePropertyName("usePeerVerification"u8); - JsonSerializer.Serialize(writer, UsePeerVerification); - } - if (Optional.IsDefined(EncryptedCredential)) - { - writer.WritePropertyName("encryptedCredential"u8); - writer.WriteStringValue(EncryptedCredential); - } - writer.WriteEndObject(); - foreach (var item in AdditionalProperties) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.Value.ToString()).RootElement); -#endif - } - writer.WriteEndObject(); - } - - internal static HubspotLinkedService DeserializeHubspotLinkedService(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - string type = default; - Optional connectVia = default; - Optional description = default; - Optional> parameters = default; - Optional> annotations = default; - DataFactoryElement clientId = default; - Optional clientSecret = default; - Optional accessToken = default; - Optional refreshToken = default; - Optional> useEncryptedEndpoints = default; - Optional> useHostVerification = default; - Optional> usePeerVerification = default; - Optional encryptedCredential = default; - IDictionary> additionalProperties = default; - Dictionary> additionalPropertiesDictionary = new Dictionary>(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("type"u8)) - { - type = property.Value.GetString(); - continue; - } - if (property.NameEquals("connectVia"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - connectVia = IntegrationRuntimeReference.DeserializeIntegrationRuntimeReference(property.Value); - continue; - } - if (property.NameEquals("description"u8)) - { - description = property.Value.GetString(); - continue; - } - if (property.NameEquals("parameters"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - Dictionary dictionary = new Dictionary(); - foreach (var property0 in property.Value.EnumerateObject()) - { - dictionary.Add(property0.Name, EntityParameterSpecification.DeserializeEntityParameterSpecification(property0.Value)); - } - parameters = dictionary; - continue; - } - if (property.NameEquals("annotations"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - if (item.ValueKind == JsonValueKind.Null) - { - array.Add(null); - } - else - { - array.Add(BinaryData.FromString(item.GetRawText())); - } - } - annotations = array; - continue; - } - if (property.NameEquals("typeProperties"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - foreach (var property0 in property.Value.EnumerateObject()) - { - if (property0.NameEquals("clientId"u8)) - { - clientId = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("clientSecret"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - clientSecret = JsonSerializer.Deserialize(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("accessToken"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - accessToken = JsonSerializer.Deserialize(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("refreshToken"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - refreshToken = JsonSerializer.Deserialize(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("useEncryptedEndpoints"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - useEncryptedEndpoints = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("useHostVerification"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - useHostVerification = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("usePeerVerification"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - usePeerVerification = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("encryptedCredential"u8)) - { - encryptedCredential = property0.Value.GetString(); - continue; - } - } - continue; - } - additionalPropertiesDictionary.Add(property.Name, JsonSerializer.Deserialize>(property.Value.GetRawText())); - } - additionalProperties = additionalPropertiesDictionary; - return new HubspotLinkedService(type, connectVia.Value, description.Value, Optional.ToDictionary(parameters), Optional.ToList(annotations), additionalProperties, clientId, clientSecret, accessToken, refreshToken, useEncryptedEndpoints.Value, useHostVerification.Value, usePeerVerification.Value, encryptedCredential.Value); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/HubspotLinkedService.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/HubspotLinkedService.cs deleted file mode 100644 index 1dbe068c..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/HubspotLinkedService.cs +++ /dev/null @@ -1,69 +0,0 @@ -// - -#nullable disable - -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// Hubspot Service linked service. - public partial class HubspotLinkedService : DataFactoryLinkedServiceProperties - { - /// Initializes a new instance of HubspotLinkedService. - /// The client ID associated with your Hubspot application. - /// is null. - public HubspotLinkedService(DataFactoryElement clientId) - { - Argument.AssertNotNull(clientId, nameof(clientId)); - - ClientId = clientId; - LinkedServiceType = "Hubspot"; - } - - /// Initializes a new instance of HubspotLinkedService. - /// Type of linked service. - /// The integration runtime reference. - /// Linked service description. - /// Parameters for linked service. - /// List of tags that can be used for describing the linked service. - /// Additional Properties. - /// The client ID associated with your Hubspot application. - /// The client secret associated with your Hubspot application. - /// The access token obtained when initially authenticating your OAuth integration. - /// The refresh token obtained when initially authenticating your OAuth integration. - /// Specifies whether the data source endpoints are encrypted using HTTPS. The default value is true. - /// 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. - /// Specifies whether to verify the identity of the server when connecting over SSL. The default value is true. - /// The encrypted credential used for authentication. Credentials are encrypted using the integration runtime credential manager. Type: string. - internal HubspotLinkedService(string linkedServiceType, IntegrationRuntimeReference connectVia, string description, IDictionary parameters, IList annotations, IDictionary> additionalProperties, DataFactoryElement clientId, DataFactorySecretBaseDefinition clientSecret, DataFactorySecretBaseDefinition accessToken, DataFactorySecretBaseDefinition refreshToken, DataFactoryElement useEncryptedEndpoints, DataFactoryElement useHostVerification, DataFactoryElement usePeerVerification, string encryptedCredential) : base(linkedServiceType, connectVia, description, parameters, annotations, additionalProperties) - { - ClientId = clientId; - ClientSecret = clientSecret; - AccessToken = accessToken; - RefreshToken = refreshToken; - UseEncryptedEndpoints = useEncryptedEndpoints; - UseHostVerification = useHostVerification; - UsePeerVerification = usePeerVerification; - EncryptedCredential = encryptedCredential; - LinkedServiceType = linkedServiceType ?? "Hubspot"; - } - - /// The client ID associated with your Hubspot application. - public DataFactoryElement ClientId { get; set; } - /// The client secret associated with your Hubspot application. - public DataFactorySecretBaseDefinition ClientSecret { get; set; } - /// The access token obtained when initially authenticating your OAuth integration. - public DataFactorySecretBaseDefinition AccessToken { get; set; } - /// The refresh token obtained when initially authenticating your OAuth integration. - public DataFactorySecretBaseDefinition RefreshToken { get; set; } - /// Specifies whether the data source endpoints are encrypted using HTTPS. The default value is true. - public DataFactoryElement UseEncryptedEndpoints { get; set; } - /// 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. - public DataFactoryElement UseHostVerification { get; set; } - /// Specifies whether to verify the identity of the server when connecting over SSL. The default value is true. - public DataFactoryElement UsePeerVerification { get; set; } - /// The encrypted credential used for authentication. Credentials are encrypted using the integration runtime credential manager. Type: string. - public string EncryptedCredential { get; set; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/HubspotObjectDataset.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/HubspotObjectDataset.Serialization.cs deleted file mode 100644 index 51f274c4..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/HubspotObjectDataset.Serialization.cs +++ /dev/null @@ -1,212 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class HubspotObjectDataset : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - writer.WritePropertyName("type"u8); - writer.WriteStringValue(DatasetType); - if (Optional.IsDefined(Description)) - { - writer.WritePropertyName("description"u8); - writer.WriteStringValue(Description); - } - if (Optional.IsDefined(Structure)) - { - writer.WritePropertyName("structure"u8); - JsonSerializer.Serialize(writer, Structure); - } - if (Optional.IsDefined(Schema)) - { - writer.WritePropertyName("schema"u8); - JsonSerializer.Serialize(writer, Schema); - } - writer.WritePropertyName("linkedServiceName"u8); - JsonSerializer.Serialize(writer, LinkedServiceName); if (Optional.IsCollectionDefined(Parameters)) - { - writer.WritePropertyName("parameters"u8); - writer.WriteStartObject(); - foreach (var item in Parameters) - { - writer.WritePropertyName(item.Key); - writer.WriteObjectValue(item.Value); - } - writer.WriteEndObject(); - } - if (Optional.IsCollectionDefined(Annotations)) - { - writer.WritePropertyName("annotations"u8); - writer.WriteStartArray(); - foreach (var item in Annotations) - { - if (item == null) - { - writer.WriteNullValue(); - continue; - } -#if NET6_0_OR_GREATER - writer.WriteRawValue(item); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.ToString()).RootElement); -#endif - } - writer.WriteEndArray(); - } - if (Optional.IsDefined(Folder)) - { - writer.WritePropertyName("folder"u8); - writer.WriteObjectValue(Folder); - } - writer.WritePropertyName("typeProperties"u8); - writer.WriteStartObject(); - if (Optional.IsDefined(TableName)) - { - writer.WritePropertyName("tableName"u8); - JsonSerializer.Serialize(writer, TableName); - } - writer.WriteEndObject(); - foreach (var item in AdditionalProperties) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.Value.ToString()).RootElement); -#endif - } - writer.WriteEndObject(); - } - - internal static HubspotObjectDataset DeserializeHubspotObjectDataset(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - string type = default; - Optional description = default; - Optional>> structure = default; - Optional>> schema = default; - DataFactoryLinkedServiceReference linkedServiceName = default; - Optional> parameters = default; - Optional> annotations = default; - Optional folder = default; - Optional> tableName = default; - IDictionary> additionalProperties = default; - Dictionary> additionalPropertiesDictionary = new Dictionary>(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("type"u8)) - { - type = property.Value.GetString(); - continue; - } - if (property.NameEquals("description"u8)) - { - description = property.Value.GetString(); - continue; - } - if (property.NameEquals("structure"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - structure = JsonSerializer.Deserialize>>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("schema"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - schema = JsonSerializer.Deserialize>>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("linkedServiceName"u8)) - { - linkedServiceName = JsonSerializer.Deserialize(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("parameters"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - Dictionary dictionary = new Dictionary(); - foreach (var property0 in property.Value.EnumerateObject()) - { - dictionary.Add(property0.Name, EntityParameterSpecification.DeserializeEntityParameterSpecification(property0.Value)); - } - parameters = dictionary; - continue; - } - if (property.NameEquals("annotations"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - if (item.ValueKind == JsonValueKind.Null) - { - array.Add(null); - } - else - { - array.Add(BinaryData.FromString(item.GetRawText())); - } - } - annotations = array; - continue; - } - if (property.NameEquals("folder"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - folder = DatasetFolder.DeserializeDatasetFolder(property.Value); - continue; - } - if (property.NameEquals("typeProperties"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - foreach (var property0 in property.Value.EnumerateObject()) - { - if (property0.NameEquals("tableName"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - tableName = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - } - continue; - } - additionalPropertiesDictionary.Add(property.Name, JsonSerializer.Deserialize>(property.Value.GetRawText())); - } - additionalProperties = additionalPropertiesDictionary; - return new HubspotObjectDataset(type, description.Value, structure.Value, schema.Value, linkedServiceName, Optional.ToDictionary(parameters), Optional.ToList(annotations), folder.Value, additionalProperties, tableName.Value); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/HubspotObjectDataset.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/HubspotObjectDataset.cs deleted file mode 100644 index e6131e8c..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/HubspotObjectDataset.cs +++ /dev/null @@ -1,43 +0,0 @@ -// - -#nullable disable - -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// Hubspot Service dataset. - public partial class HubspotObjectDataset : DataFactoryDatasetProperties - { - /// Initializes a new instance of HubspotObjectDataset. - /// Linked service reference. - /// is null. - public HubspotObjectDataset(DataFactoryLinkedServiceReference linkedServiceName) : base(linkedServiceName) - { - Argument.AssertNotNull(linkedServiceName, nameof(linkedServiceName)); - - DatasetType = "HubspotObject"; - } - - /// Initializes a new instance of HubspotObjectDataset. - /// Type of dataset. - /// Dataset description. - /// Columns that define the structure of the dataset. Type: array (or Expression with resultType array), itemType: DatasetDataElement. - /// Columns that define the physical type schema of the dataset. Type: array (or Expression with resultType array), itemType: DatasetSchemaDataElement. - /// Linked service reference. - /// Parameters for dataset. - /// List of tags that can be used for describing the Dataset. - /// The folder that this Dataset is in. If not specified, Dataset will appear at the root level. - /// Additional Properties. - /// The table name. Type: string (or Expression with resultType string). - internal HubspotObjectDataset(string datasetType, string description, DataFactoryElement> structure, DataFactoryElement> schema, DataFactoryLinkedServiceReference linkedServiceName, IDictionary parameters, IList annotations, DatasetFolder folder, IDictionary> additionalProperties, DataFactoryElement tableName) : base(datasetType, description, structure, schema, linkedServiceName, parameters, annotations, folder, additionalProperties) - { - TableName = tableName; - DatasetType = datasetType ?? "HubspotObject"; - } - - /// The table name. Type: string (or Expression with resultType string). - public DataFactoryElement TableName { get; set; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/HubspotSource.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/HubspotSource.Serialization.cs deleted file mode 100644 index bd87ffdd..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/HubspotSource.Serialization.cs +++ /dev/null @@ -1,161 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class HubspotSource : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - if (Optional.IsDefined(Query)) - { - writer.WritePropertyName("query"u8); - JsonSerializer.Serialize(writer, Query); - } - if (Optional.IsDefined(QueryTimeout)) - { - writer.WritePropertyName("queryTimeout"u8); - JsonSerializer.Serialize(writer, QueryTimeout); - } - if (Optional.IsDefined(AdditionalColumns)) - { - writer.WritePropertyName("additionalColumns"u8); -#if NET6_0_OR_GREATER - writer.WriteRawValue(AdditionalColumns); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(AdditionalColumns.ToString()).RootElement); -#endif - } - writer.WritePropertyName("type"u8); - writer.WriteStringValue(CopySourceType); - if (Optional.IsDefined(SourceRetryCount)) - { - writer.WritePropertyName("sourceRetryCount"u8); - JsonSerializer.Serialize(writer, SourceRetryCount); - } - if (Optional.IsDefined(SourceRetryWait)) - { - writer.WritePropertyName("sourceRetryWait"u8); - JsonSerializer.Serialize(writer, SourceRetryWait); - } - if (Optional.IsDefined(MaxConcurrentConnections)) - { - writer.WritePropertyName("maxConcurrentConnections"u8); - JsonSerializer.Serialize(writer, MaxConcurrentConnections); - } - if (Optional.IsDefined(DisableMetricsCollection)) - { - writer.WritePropertyName("disableMetricsCollection"u8); - JsonSerializer.Serialize(writer, DisableMetricsCollection); - } - foreach (var item in AdditionalProperties) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.Value.ToString()).RootElement); -#endif - } - writer.WriteEndObject(); - } - - internal static HubspotSource DeserializeHubspotSource(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - Optional> query = default; - Optional> queryTimeout = default; - Optional additionalColumns = default; - string type = default; - Optional> sourceRetryCount = default; - Optional> sourceRetryWait = default; - Optional> maxConcurrentConnections = default; - Optional> disableMetricsCollection = default; - IDictionary> additionalProperties = default; - Dictionary> additionalPropertiesDictionary = new Dictionary>(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("query"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - query = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("queryTimeout"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - queryTimeout = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("additionalColumns"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - additionalColumns = BinaryData.FromString(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("type"u8)) - { - type = property.Value.GetString(); - continue; - } - if (property.NameEquals("sourceRetryCount"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - sourceRetryCount = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("sourceRetryWait"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - sourceRetryWait = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("maxConcurrentConnections"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - maxConcurrentConnections = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("disableMetricsCollection"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - disableMetricsCollection = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - additionalPropertiesDictionary.Add(property.Name, JsonSerializer.Deserialize>(property.Value.GetRawText())); - } - additionalProperties = additionalPropertiesDictionary; - return new HubspotSource(type, sourceRetryCount.Value, sourceRetryWait.Value, maxConcurrentConnections.Value, disableMetricsCollection.Value, additionalProperties, queryTimeout.Value, additionalColumns.Value, query.Value); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/HubspotSource.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/HubspotSource.cs deleted file mode 100644 index c8a44d44..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/HubspotSource.cs +++ /dev/null @@ -1,37 +0,0 @@ -// - -#nullable disable - -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// A copy activity Hubspot Service source. - public partial class HubspotSource : TabularSource - { - /// Initializes a new instance of HubspotSource. - public HubspotSource() - { - CopySourceType = "HubspotSource"; - } - - /// Initializes a new instance of HubspotSource. - /// Copy source type. - /// Source retry count. Type: integer (or Expression with resultType integer). - /// Source retry wait. Type: string (or Expression with resultType string), pattern: ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). - /// The maximum concurrent connection count for the source data store. Type: integer (or Expression with resultType integer). - /// If true, disable data store metrics collection. Default is false. Type: boolean (or Expression with resultType boolean). - /// Additional Properties. - /// 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). - /// A query to retrieve data from source. Type: string (or Expression with resultType string). - internal HubspotSource(string copySourceType, DataFactoryElement sourceRetryCount, DataFactoryElement sourceRetryWait, DataFactoryElement maxConcurrentConnections, DataFactoryElement disableMetricsCollection, IDictionary> additionalProperties, DataFactoryElement queryTimeout, BinaryData additionalColumns, DataFactoryElement query) : base(copySourceType, sourceRetryCount, sourceRetryWait, maxConcurrentConnections, disableMetricsCollection, additionalProperties, queryTimeout, additionalColumns) - { - Query = query; - CopySourceType = copySourceType ?? "HubspotSource"; - } - - /// A query to retrieve data from source. Type: string (or Expression with resultType string). - public DataFactoryElement Query { get; set; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/IfConditionActivity.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/IfConditionActivity.Serialization.cs deleted file mode 100644 index 85bd79a3..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/IfConditionActivity.Serialization.cs +++ /dev/null @@ -1,224 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class IfConditionActivity : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ActivityType); - if (Optional.IsDefined(Description)) - { - writer.WritePropertyName("description"u8); - writer.WriteStringValue(Description); - } - if (Optional.IsDefined(State)) - { - writer.WritePropertyName("state"u8); - writer.WriteStringValue(State.Value.ToString()); - } - if (Optional.IsDefined(OnInactiveMarkAs)) - { - writer.WritePropertyName("onInactiveMarkAs"u8); - writer.WriteStringValue(OnInactiveMarkAs.Value.ToString()); - } - if (Optional.IsCollectionDefined(DependsOn)) - { - writer.WritePropertyName("dependsOn"u8); - writer.WriteStartArray(); - foreach (var item in DependsOn) - { - writer.WriteObjectValue(item); - } - writer.WriteEndArray(); - } - if (Optional.IsCollectionDefined(UserProperties)) - { - writer.WritePropertyName("userProperties"u8); - writer.WriteStartArray(); - foreach (var item in UserProperties) - { - writer.WriteObjectValue(item); - } - writer.WriteEndArray(); - } - writer.WritePropertyName("typeProperties"u8); - writer.WriteStartObject(); - writer.WritePropertyName("expression"u8); - writer.WriteObjectValue(Expression); - if (Optional.IsCollectionDefined(IfTrueActivities)) - { - writer.WritePropertyName("ifTrueActivities"u8); - writer.WriteStartArray(); - foreach (var item in IfTrueActivities) - { - writer.WriteObjectValue(item); - } - writer.WriteEndArray(); - } - if (Optional.IsCollectionDefined(IfFalseActivities)) - { - writer.WritePropertyName("ifFalseActivities"u8); - writer.WriteStartArray(); - foreach (var item in IfFalseActivities) - { - writer.WriteObjectValue(item); - } - writer.WriteEndArray(); - } - writer.WriteEndObject(); - foreach (var item in AdditionalProperties) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.Value.ToString()).RootElement); -#endif - } - writer.WriteEndObject(); - } - - internal static IfConditionActivity DeserializeIfConditionActivity(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - string name = default; - string type = default; - Optional description = default; - Optional state = default; - Optional onInactiveMarkAs = default; - Optional> dependsOn = default; - Optional> userProperties = default; - DataFactoryExpression expression = default; - Optional> ifTrueActivities = default; - Optional> ifFalseActivities = default; - IDictionary> additionalProperties = default; - Dictionary> additionalPropertiesDictionary = new Dictionary>(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("name"u8)) - { - name = property.Value.GetString(); - continue; - } - if (property.NameEquals("type"u8)) - { - type = property.Value.GetString(); - continue; - } - if (property.NameEquals("description"u8)) - { - description = property.Value.GetString(); - continue; - } - if (property.NameEquals("state"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - state = new PipelineActivityState(property.Value.GetString()); - continue; - } - if (property.NameEquals("onInactiveMarkAs"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - onInactiveMarkAs = new ActivityOnInactiveMarkAs(property.Value.GetString()); - continue; - } - if (property.NameEquals("dependsOn"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - array.Add(PipelineActivityDependency.DeserializePipelineActivityDependency(item)); - } - dependsOn = array; - continue; - } - if (property.NameEquals("userProperties"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - array.Add(PipelineActivityUserProperty.DeserializePipelineActivityUserProperty(item)); - } - userProperties = array; - continue; - } - if (property.NameEquals("typeProperties"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - foreach (var property0 in property.Value.EnumerateObject()) - { - if (property0.NameEquals("expression"u8)) - { - expression = DataFactoryExpression.DeserializeDataFactoryExpression(property0.Value); - continue; - } - if (property0.NameEquals("ifTrueActivities"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property0.Value.EnumerateArray()) - { - array.Add(DeserializePipelineActivity(item)); - } - ifTrueActivities = array; - continue; - } - if (property0.NameEquals("ifFalseActivities"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property0.Value.EnumerateArray()) - { - array.Add(DeserializePipelineActivity(item)); - } - ifFalseActivities = array; - continue; - } - } - continue; - } - additionalPropertiesDictionary.Add(property.Name, JsonSerializer.Deserialize>(property.Value.GetRawText())); - } - additionalProperties = additionalPropertiesDictionary; - return new IfConditionActivity(name, type, description.Value, Optional.ToNullable(state), Optional.ToNullable(onInactiveMarkAs), Optional.ToList(dependsOn), Optional.ToList(userProperties), additionalProperties, expression, Optional.ToList(ifTrueActivities), Optional.ToList(ifFalseActivities)); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/IfConditionActivity.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/IfConditionActivity.cs deleted file mode 100644 index b63d5749..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/IfConditionActivity.cs +++ /dev/null @@ -1,71 +0,0 @@ -// - -#nullable disable - -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// This activity evaluates a boolean expression and executes either the activities under the ifTrueActivities property or the ifFalseActivities property depending on the result of the expression. - public partial class IfConditionActivity : ControlActivity - { - /// Initializes a new instance of IfConditionActivity. - /// Activity name. - /// An expression that would evaluate to Boolean. This is used to determine the block of activities (ifTrueActivities or ifFalseActivities) that will be executed. - /// or is null. - public IfConditionActivity(string name, DataFactoryExpression expression) : base(name) - { - Argument.AssertNotNull(name, nameof(name)); - Argument.AssertNotNull(expression, nameof(expression)); - - Expression = expression; - IfTrueActivities = new ChangeTrackingList(); - IfFalseActivities = new ChangeTrackingList(); - ActivityType = "IfCondition"; - } - - /// Initializes a new instance of IfConditionActivity. - /// Activity name. - /// Type of activity. - /// Activity description. - /// Activity state. This is an optional property and if not provided, the state will be Active by default. - /// 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. - /// Activity depends on condition. - /// Activity user properties. - /// Additional Properties. - /// An expression that would evaluate to Boolean. This is used to determine the block of activities (ifTrueActivities or ifFalseActivities) that will be executed. - /// - /// List of activities to execute if expression is evaluated to true. This is an optional property and if not provided, the activity will exit without any action. - /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. - /// The available derived classes include , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , and . - /// - /// - /// List of activities to execute if expression is evaluated to false. This is an optional property and if not provided, the activity will exit without any action. - /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. - /// The available derived classes include , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , and . - /// - internal IfConditionActivity(string name, string activityType, string description, PipelineActivityState? state, ActivityOnInactiveMarkAs? onInactiveMarkAs, IList dependsOn, IList userProperties, IDictionary> additionalProperties, DataFactoryExpression expression, IList ifTrueActivities, IList ifFalseActivities) : base(name, activityType, description, state, onInactiveMarkAs, dependsOn, userProperties, additionalProperties) - { - Expression = expression; - IfTrueActivities = ifTrueActivities; - IfFalseActivities = ifFalseActivities; - ActivityType = activityType ?? "IfCondition"; - } - - /// An expression that would evaluate to Boolean. This is used to determine the block of activities (ifTrueActivities or ifFalseActivities) that will be executed. - public DataFactoryExpression Expression { get; set; } - /// - /// List of activities to execute if expression is evaluated to true. This is an optional property and if not provided, the activity will exit without any action. - /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. - /// The available derived classes include , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , and . - /// - public IList IfTrueActivities { get; } - /// - /// List of activities to execute if expression is evaluated to false. This is an optional property and if not provided, the activity will exit without any action. - /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. - /// The available derived classes include , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , and . - /// - public IList IfFalseActivities { get; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/ImpalaAuthenticationType.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/ImpalaAuthenticationType.cs deleted file mode 100644 index 6eddf6f9..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/ImpalaAuthenticationType.cs +++ /dev/null @@ -1,50 +0,0 @@ -// - -#nullable disable - -using System.ComponentModel; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// The authentication type to use. - public readonly partial struct ImpalaAuthenticationType : IEquatable - { - private readonly string _value; - - /// Initializes a new instance of . - /// is null. - public ImpalaAuthenticationType(string value) - { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } - - private const string AnonymousValue = "Anonymous"; - private const string SaslUsernameValue = "SASLUsername"; - private const string UsernameAndPasswordValue = "UsernameAndPassword"; - - /// Anonymous. - public static ImpalaAuthenticationType Anonymous { get; } = new ImpalaAuthenticationType(AnonymousValue); - /// SASLUsername. - public static ImpalaAuthenticationType SaslUsername { get; } = new ImpalaAuthenticationType(SaslUsernameValue); - /// UsernameAndPassword. - public static ImpalaAuthenticationType UsernameAndPassword { get; } = new ImpalaAuthenticationType(UsernameAndPasswordValue); - /// Determines if two values are the same. - public static bool operator ==(ImpalaAuthenticationType left, ImpalaAuthenticationType right) => left.Equals(right); - /// Determines if two values are not the same. - public static bool operator !=(ImpalaAuthenticationType left, ImpalaAuthenticationType right) => !left.Equals(right); - /// Converts a string to a . - public static implicit operator ImpalaAuthenticationType(string value) => new ImpalaAuthenticationType(value); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override bool Equals(object obj) => obj is ImpalaAuthenticationType other && Equals(other); - /// - public bool Equals(ImpalaAuthenticationType other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override int GetHashCode() => _value?.GetHashCode() ?? 0; - /// - public override string ToString() => _value; - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/ImpalaLinkedService.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/ImpalaLinkedService.Serialization.cs deleted file mode 100644 index 1c11addf..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/ImpalaLinkedService.Serialization.cs +++ /dev/null @@ -1,307 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class ImpalaLinkedService : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - writer.WritePropertyName("type"u8); - writer.WriteStringValue(LinkedServiceType); - if (Optional.IsDefined(ConnectVia)) - { - writer.WritePropertyName("connectVia"u8); - writer.WriteObjectValue(ConnectVia); - } - if (Optional.IsDefined(Description)) - { - writer.WritePropertyName("description"u8); - writer.WriteStringValue(Description); - } - if (Optional.IsCollectionDefined(Parameters)) - { - writer.WritePropertyName("parameters"u8); - writer.WriteStartObject(); - foreach (var item in Parameters) - { - writer.WritePropertyName(item.Key); - writer.WriteObjectValue(item.Value); - } - writer.WriteEndObject(); - } - if (Optional.IsCollectionDefined(Annotations)) - { - writer.WritePropertyName("annotations"u8); - writer.WriteStartArray(); - foreach (var item in Annotations) - { - if (item == null) - { - writer.WriteNullValue(); - continue; - } -#if NET6_0_OR_GREATER - writer.WriteRawValue(item); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.ToString()).RootElement); -#endif - } - writer.WriteEndArray(); - } - writer.WritePropertyName("typeProperties"u8); - writer.WriteStartObject(); - writer.WritePropertyName("host"u8); - JsonSerializer.Serialize(writer, Host); - if (Optional.IsDefined(Port)) - { - writer.WritePropertyName("port"u8); - JsonSerializer.Serialize(writer, Port); - } - writer.WritePropertyName("authenticationType"u8); - writer.WriteStringValue(AuthenticationType.ToString()); - if (Optional.IsDefined(Username)) - { - writer.WritePropertyName("username"u8); - JsonSerializer.Serialize(writer, Username); - } - if (Optional.IsDefined(Password)) - { - writer.WritePropertyName("password"u8); - JsonSerializer.Serialize(writer, Password); - } - if (Optional.IsDefined(EnableSsl)) - { - writer.WritePropertyName("enableSsl"u8); - JsonSerializer.Serialize(writer, EnableSsl); - } - if (Optional.IsDefined(TrustedCertPath)) - { - writer.WritePropertyName("trustedCertPath"u8); - JsonSerializer.Serialize(writer, TrustedCertPath); - } - if (Optional.IsDefined(UseSystemTrustStore)) - { - writer.WritePropertyName("useSystemTrustStore"u8); - JsonSerializer.Serialize(writer, UseSystemTrustStore); - } - if (Optional.IsDefined(AllowHostNameCNMismatch)) - { - writer.WritePropertyName("allowHostNameCNMismatch"u8); - JsonSerializer.Serialize(writer, AllowHostNameCNMismatch); - } - if (Optional.IsDefined(AllowSelfSignedServerCert)) - { - writer.WritePropertyName("allowSelfSignedServerCert"u8); - JsonSerializer.Serialize(writer, AllowSelfSignedServerCert); - } - if (Optional.IsDefined(EncryptedCredential)) - { - writer.WritePropertyName("encryptedCredential"u8); - writer.WriteStringValue(EncryptedCredential); - } - writer.WriteEndObject(); - foreach (var item in AdditionalProperties) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.Value.ToString()).RootElement); -#endif - } - writer.WriteEndObject(); - } - - internal static ImpalaLinkedService DeserializeImpalaLinkedService(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - string type = default; - Optional connectVia = default; - Optional description = default; - Optional> parameters = default; - Optional> annotations = default; - DataFactoryElement host = default; - Optional> port = default; - ImpalaAuthenticationType authenticationType = default; - Optional> username = default; - Optional password = default; - Optional> enableSsl = default; - Optional> trustedCertPath = default; - Optional> useSystemTrustStore = default; - Optional> allowHostNameCNMismatch = default; - Optional> allowSelfSignedServerCert = default; - Optional encryptedCredential = default; - IDictionary> additionalProperties = default; - Dictionary> additionalPropertiesDictionary = new Dictionary>(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("type"u8)) - { - type = property.Value.GetString(); - continue; - } - if (property.NameEquals("connectVia"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - connectVia = IntegrationRuntimeReference.DeserializeIntegrationRuntimeReference(property.Value); - continue; - } - if (property.NameEquals("description"u8)) - { - description = property.Value.GetString(); - continue; - } - if (property.NameEquals("parameters"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - Dictionary dictionary = new Dictionary(); - foreach (var property0 in property.Value.EnumerateObject()) - { - dictionary.Add(property0.Name, EntityParameterSpecification.DeserializeEntityParameterSpecification(property0.Value)); - } - parameters = dictionary; - continue; - } - if (property.NameEquals("annotations"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - if (item.ValueKind == JsonValueKind.Null) - { - array.Add(null); - } - else - { - array.Add(BinaryData.FromString(item.GetRawText())); - } - } - annotations = array; - continue; - } - if (property.NameEquals("typeProperties"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - foreach (var property0 in property.Value.EnumerateObject()) - { - if (property0.NameEquals("host"u8)) - { - host = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("port"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - port = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("authenticationType"u8)) - { - authenticationType = new ImpalaAuthenticationType(property0.Value.GetString()); - continue; - } - if (property0.NameEquals("username"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - username = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("password"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - password = JsonSerializer.Deserialize(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("enableSsl"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - enableSsl = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("trustedCertPath"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - trustedCertPath = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("useSystemTrustStore"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - useSystemTrustStore = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("allowHostNameCNMismatch"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - allowHostNameCNMismatch = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("allowSelfSignedServerCert"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - allowSelfSignedServerCert = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("encryptedCredential"u8)) - { - encryptedCredential = property0.Value.GetString(); - continue; - } - } - continue; - } - additionalPropertiesDictionary.Add(property.Name, JsonSerializer.Deserialize>(property.Value.GetRawText())); - } - additionalProperties = additionalPropertiesDictionary; - return new ImpalaLinkedService(type, connectVia.Value, description.Value, Optional.ToDictionary(parameters), Optional.ToList(annotations), additionalProperties, host, port.Value, authenticationType, username.Value, password, enableSsl.Value, trustedCertPath.Value, useSystemTrustStore.Value, allowHostNameCNMismatch.Value, allowSelfSignedServerCert.Value, encryptedCredential.Value); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/ImpalaLinkedService.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/ImpalaLinkedService.cs deleted file mode 100644 index 0ac65ceb..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/ImpalaLinkedService.cs +++ /dev/null @@ -1,83 +0,0 @@ -// - -#nullable disable - -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// Impala server linked service. - public partial class ImpalaLinkedService : DataFactoryLinkedServiceProperties - { - /// Initializes a new instance of ImpalaLinkedService. - /// The IP address or host name of the Impala server. (i.e. 192.168.222.160). - /// The authentication type to use. - /// is null. - public ImpalaLinkedService(DataFactoryElement host, ImpalaAuthenticationType authenticationType) - { - Argument.AssertNotNull(host, nameof(host)); - - Host = host; - AuthenticationType = authenticationType; - LinkedServiceType = "Impala"; - } - - /// Initializes a new instance of ImpalaLinkedService. - /// Type of linked service. - /// The integration runtime reference. - /// Linked service description. - /// Parameters for linked service. - /// List of tags that can be used for describing the linked service. - /// Additional Properties. - /// The IP address or host name of the Impala server. (i.e. 192.168.222.160). - /// The TCP port that the Impala server uses to listen for client connections. The default value is 21050. - /// The authentication type to use. - /// The user name used to access the Impala server. The default value is anonymous when using SASLUsername. - /// The password corresponding to the user name when using UsernameAndPassword. - /// Specifies whether the connections to the server are encrypted using SSL. The default value is false. - /// The full path of the .pem file containing trusted CA certificates for verifying the server when connecting over SSL. This property can only be set when using SSL on self-hosted IR. The default value is the cacerts.pem file installed with the IR. - /// Specifies whether to use a CA certificate from the system trust store or from a specified PEM file. The default value is false. - /// Specifies whether to require a CA-issued SSL certificate name to match the host name of the server when connecting over SSL. The default value is false. - /// Specifies whether to allow self-signed certificates from the server. The default value is false. - /// The encrypted credential used for authentication. Credentials are encrypted using the integration runtime credential manager. Type: string. - internal ImpalaLinkedService(string linkedServiceType, IntegrationRuntimeReference connectVia, string description, IDictionary parameters, IList annotations, IDictionary> additionalProperties, DataFactoryElement host, DataFactoryElement port, ImpalaAuthenticationType authenticationType, DataFactoryElement username, DataFactorySecretBaseDefinition password, DataFactoryElement enableSsl, DataFactoryElement trustedCertPath, DataFactoryElement useSystemTrustStore, DataFactoryElement allowHostNameCNMismatch, DataFactoryElement allowSelfSignedServerCert, string encryptedCredential) : base(linkedServiceType, connectVia, description, parameters, annotations, additionalProperties) - { - Host = host; - Port = port; - AuthenticationType = authenticationType; - Username = username; - Password = password; - EnableSsl = enableSsl; - TrustedCertPath = trustedCertPath; - UseSystemTrustStore = useSystemTrustStore; - AllowHostNameCNMismatch = allowHostNameCNMismatch; - AllowSelfSignedServerCert = allowSelfSignedServerCert; - EncryptedCredential = encryptedCredential; - LinkedServiceType = linkedServiceType ?? "Impala"; - } - - /// The IP address or host name of the Impala server. (i.e. 192.168.222.160). - public DataFactoryElement Host { get; set; } - /// The TCP port that the Impala server uses to listen for client connections. The default value is 21050. - public DataFactoryElement Port { get; set; } - /// The authentication type to use. - public ImpalaAuthenticationType AuthenticationType { get; set; } - /// The user name used to access the Impala server. The default value is anonymous when using SASLUsername. - public DataFactoryElement Username { get; set; } - /// The password corresponding to the user name when using UsernameAndPassword. - public DataFactorySecretBaseDefinition Password { get; set; } - /// Specifies whether the connections to the server are encrypted using SSL. The default value is false. - public DataFactoryElement EnableSsl { get; set; } - /// The full path of the .pem file containing trusted CA certificates for verifying the server when connecting over SSL. This property can only be set when using SSL on self-hosted IR. The default value is the cacerts.pem file installed with the IR. - public DataFactoryElement TrustedCertPath { get; set; } - /// Specifies whether to use a CA certificate from the system trust store or from a specified PEM file. The default value is false. - public DataFactoryElement UseSystemTrustStore { get; set; } - /// Specifies whether to require a CA-issued SSL certificate name to match the host name of the server when connecting over SSL. The default value is false. - public DataFactoryElement AllowHostNameCNMismatch { get; set; } - /// Specifies whether to allow self-signed certificates from the server. The default value is false. - public DataFactoryElement AllowSelfSignedServerCert { get; set; } - /// The encrypted credential used for authentication. Credentials are encrypted using the integration runtime credential manager. Type: string. - public string EncryptedCredential { get; set; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/ImpalaObjectDataset.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/ImpalaObjectDataset.Serialization.cs deleted file mode 100644 index 229cbaaa..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/ImpalaObjectDataset.Serialization.cs +++ /dev/null @@ -1,246 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class ImpalaObjectDataset : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - writer.WritePropertyName("type"u8); - writer.WriteStringValue(DatasetType); - if (Optional.IsDefined(Description)) - { - writer.WritePropertyName("description"u8); - writer.WriteStringValue(Description); - } - if (Optional.IsDefined(Structure)) - { - writer.WritePropertyName("structure"u8); - JsonSerializer.Serialize(writer, Structure); - } - if (Optional.IsDefined(Schema)) - { - writer.WritePropertyName("schema"u8); - JsonSerializer.Serialize(writer, Schema); - } - writer.WritePropertyName("linkedServiceName"u8); - JsonSerializer.Serialize(writer, LinkedServiceName); if (Optional.IsCollectionDefined(Parameters)) - { - writer.WritePropertyName("parameters"u8); - writer.WriteStartObject(); - foreach (var item in Parameters) - { - writer.WritePropertyName(item.Key); - writer.WriteObjectValue(item.Value); - } - writer.WriteEndObject(); - } - if (Optional.IsCollectionDefined(Annotations)) - { - writer.WritePropertyName("annotations"u8); - writer.WriteStartArray(); - foreach (var item in Annotations) - { - if (item == null) - { - writer.WriteNullValue(); - continue; - } -#if NET6_0_OR_GREATER - writer.WriteRawValue(item); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.ToString()).RootElement); -#endif - } - writer.WriteEndArray(); - } - if (Optional.IsDefined(Folder)) - { - writer.WritePropertyName("folder"u8); - writer.WriteObjectValue(Folder); - } - writer.WritePropertyName("typeProperties"u8); - writer.WriteStartObject(); - if (Optional.IsDefined(TableName)) - { - writer.WritePropertyName("tableName"u8); -#if NET6_0_OR_GREATER - writer.WriteRawValue(TableName); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(TableName.ToString()).RootElement); -#endif - } - if (Optional.IsDefined(Table)) - { - writer.WritePropertyName("table"u8); - JsonSerializer.Serialize(writer, Table); - } - if (Optional.IsDefined(SchemaTypePropertiesSchema)) - { - writer.WritePropertyName("schema"u8); - JsonSerializer.Serialize(writer, SchemaTypePropertiesSchema); - } - writer.WriteEndObject(); - foreach (var item in AdditionalProperties) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.Value.ToString()).RootElement); -#endif - } - writer.WriteEndObject(); - } - - internal static ImpalaObjectDataset DeserializeImpalaObjectDataset(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - string type = default; - Optional description = default; - Optional>> structure = default; - Optional>> schema = default; - DataFactoryLinkedServiceReference linkedServiceName = default; - Optional> parameters = default; - Optional> annotations = default; - Optional folder = default; - Optional tableName = default; - Optional> table = default; - Optional> schema0 = default; - IDictionary> additionalProperties = default; - Dictionary> additionalPropertiesDictionary = new Dictionary>(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("type"u8)) - { - type = property.Value.GetString(); - continue; - } - if (property.NameEquals("description"u8)) - { - description = property.Value.GetString(); - continue; - } - if (property.NameEquals("structure"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - structure = JsonSerializer.Deserialize>>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("schema"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - schema = JsonSerializer.Deserialize>>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("linkedServiceName"u8)) - { - linkedServiceName = JsonSerializer.Deserialize(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("parameters"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - Dictionary dictionary = new Dictionary(); - foreach (var property0 in property.Value.EnumerateObject()) - { - dictionary.Add(property0.Name, EntityParameterSpecification.DeserializeEntityParameterSpecification(property0.Value)); - } - parameters = dictionary; - continue; - } - if (property.NameEquals("annotations"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - if (item.ValueKind == JsonValueKind.Null) - { - array.Add(null); - } - else - { - array.Add(BinaryData.FromString(item.GetRawText())); - } - } - annotations = array; - continue; - } - if (property.NameEquals("folder"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - folder = DatasetFolder.DeserializeDatasetFolder(property.Value); - continue; - } - if (property.NameEquals("typeProperties"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - foreach (var property0 in property.Value.EnumerateObject()) - { - if (property0.NameEquals("tableName"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - tableName = BinaryData.FromString(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("table"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - table = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("schema"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - schema0 = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - } - continue; - } - additionalPropertiesDictionary.Add(property.Name, JsonSerializer.Deserialize>(property.Value.GetRawText())); - } - additionalProperties = additionalPropertiesDictionary; - return new ImpalaObjectDataset(type, description.Value, structure.Value, schema.Value, linkedServiceName, Optional.ToDictionary(parameters), Optional.ToList(annotations), folder.Value, additionalProperties, tableName.Value, table.Value, schema0.Value); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/ImpalaObjectDataset.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/ImpalaObjectDataset.cs deleted file mode 100644 index 5e987190..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/ImpalaObjectDataset.cs +++ /dev/null @@ -1,80 +0,0 @@ -// - -#nullable disable - -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// Impala server dataset. - public partial class ImpalaObjectDataset : DataFactoryDatasetProperties - { - /// Initializes a new instance of ImpalaObjectDataset. - /// Linked service reference. - /// is null. - public ImpalaObjectDataset(DataFactoryLinkedServiceReference linkedServiceName) : base(linkedServiceName) - { - Argument.AssertNotNull(linkedServiceName, nameof(linkedServiceName)); - - DatasetType = "ImpalaObject"; - } - - /// Initializes a new instance of ImpalaObjectDataset. - /// Type of dataset. - /// Dataset description. - /// Columns that define the structure of the dataset. Type: array (or Expression with resultType array), itemType: DatasetDataElement. - /// Columns that define the physical type schema of the dataset. Type: array (or Expression with resultType array), itemType: DatasetSchemaDataElement. - /// Linked service reference. - /// Parameters for dataset. - /// List of tags that can be used for describing the Dataset. - /// The folder that this Dataset is in. If not specified, Dataset will appear at the root level. - /// Additional Properties. - /// This property will be retired. Please consider using schema + table properties instead. - /// The table name of the Impala. Type: string (or Expression with resultType string). - /// The schema name of the Impala. Type: string (or Expression with resultType string). - internal ImpalaObjectDataset(string datasetType, string description, DataFactoryElement> structure, DataFactoryElement> schema, DataFactoryLinkedServiceReference linkedServiceName, IDictionary parameters, IList annotations, DatasetFolder folder, IDictionary> additionalProperties, BinaryData tableName, DataFactoryElement table, DataFactoryElement schemaTypePropertiesSchema) : base(datasetType, description, structure, schema, linkedServiceName, parameters, annotations, folder, additionalProperties) - { - TableName = tableName; - Table = table; - SchemaTypePropertiesSchema = schemaTypePropertiesSchema; - DatasetType = datasetType ?? "ImpalaObject"; - } - - /// - /// This property will be retired. Please consider using schema + table properties instead. - /// - /// To assign an object to this property use . - /// - /// - /// To assign an already formated json string to this property use . - /// - /// - /// Examples: - /// - /// - /// BinaryData.FromObjectAsJson("foo") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromString("\"foo\"") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromObjectAsJson(new { key = "value" }) - /// Creates a payload of { "key": "value" }. - /// - /// - /// BinaryData.FromString("{\"key\": \"value\"}") - /// Creates a payload of { "key": "value" }. - /// - /// - /// - /// - public BinaryData TableName { get; set; } - /// The table name of the Impala. Type: string (or Expression with resultType string). - public DataFactoryElement Table { get; set; } - /// The schema name of the Impala. Type: string (or Expression with resultType string). - public DataFactoryElement SchemaTypePropertiesSchema { get; set; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/ImpalaSource.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/ImpalaSource.Serialization.cs deleted file mode 100644 index 7121e1f8..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/ImpalaSource.Serialization.cs +++ /dev/null @@ -1,161 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class ImpalaSource : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - if (Optional.IsDefined(Query)) - { - writer.WritePropertyName("query"u8); - JsonSerializer.Serialize(writer, Query); - } - if (Optional.IsDefined(QueryTimeout)) - { - writer.WritePropertyName("queryTimeout"u8); - JsonSerializer.Serialize(writer, QueryTimeout); - } - if (Optional.IsDefined(AdditionalColumns)) - { - writer.WritePropertyName("additionalColumns"u8); -#if NET6_0_OR_GREATER - writer.WriteRawValue(AdditionalColumns); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(AdditionalColumns.ToString()).RootElement); -#endif - } - writer.WritePropertyName("type"u8); - writer.WriteStringValue(CopySourceType); - if (Optional.IsDefined(SourceRetryCount)) - { - writer.WritePropertyName("sourceRetryCount"u8); - JsonSerializer.Serialize(writer, SourceRetryCount); - } - if (Optional.IsDefined(SourceRetryWait)) - { - writer.WritePropertyName("sourceRetryWait"u8); - JsonSerializer.Serialize(writer, SourceRetryWait); - } - if (Optional.IsDefined(MaxConcurrentConnections)) - { - writer.WritePropertyName("maxConcurrentConnections"u8); - JsonSerializer.Serialize(writer, MaxConcurrentConnections); - } - if (Optional.IsDefined(DisableMetricsCollection)) - { - writer.WritePropertyName("disableMetricsCollection"u8); - JsonSerializer.Serialize(writer, DisableMetricsCollection); - } - foreach (var item in AdditionalProperties) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.Value.ToString()).RootElement); -#endif - } - writer.WriteEndObject(); - } - - internal static ImpalaSource DeserializeImpalaSource(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - Optional> query = default; - Optional> queryTimeout = default; - Optional additionalColumns = default; - string type = default; - Optional> sourceRetryCount = default; - Optional> sourceRetryWait = default; - Optional> maxConcurrentConnections = default; - Optional> disableMetricsCollection = default; - IDictionary> additionalProperties = default; - Dictionary> additionalPropertiesDictionary = new Dictionary>(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("query"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - query = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("queryTimeout"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - queryTimeout = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("additionalColumns"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - additionalColumns = BinaryData.FromString(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("type"u8)) - { - type = property.Value.GetString(); - continue; - } - if (property.NameEquals("sourceRetryCount"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - sourceRetryCount = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("sourceRetryWait"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - sourceRetryWait = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("maxConcurrentConnections"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - maxConcurrentConnections = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("disableMetricsCollection"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - disableMetricsCollection = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - additionalPropertiesDictionary.Add(property.Name, JsonSerializer.Deserialize>(property.Value.GetRawText())); - } - additionalProperties = additionalPropertiesDictionary; - return new ImpalaSource(type, sourceRetryCount.Value, sourceRetryWait.Value, maxConcurrentConnections.Value, disableMetricsCollection.Value, additionalProperties, queryTimeout.Value, additionalColumns.Value, query.Value); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/ImpalaSource.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/ImpalaSource.cs deleted file mode 100644 index a9d185ba..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/ImpalaSource.cs +++ /dev/null @@ -1,37 +0,0 @@ -// - -#nullable disable - -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// A copy activity Impala server source. - public partial class ImpalaSource : TabularSource - { - /// Initializes a new instance of ImpalaSource. - public ImpalaSource() - { - CopySourceType = "ImpalaSource"; - } - - /// Initializes a new instance of ImpalaSource. - /// Copy source type. - /// Source retry count. Type: integer (or Expression with resultType integer). - /// Source retry wait. Type: string (or Expression with resultType string), pattern: ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). - /// The maximum concurrent connection count for the source data store. Type: integer (or Expression with resultType integer). - /// If true, disable data store metrics collection. Default is false. Type: boolean (or Expression with resultType boolean). - /// Additional Properties. - /// 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). - /// A query to retrieve data from source. Type: string (or Expression with resultType string). - internal ImpalaSource(string copySourceType, DataFactoryElement sourceRetryCount, DataFactoryElement sourceRetryWait, DataFactoryElement maxConcurrentConnections, DataFactoryElement disableMetricsCollection, IDictionary> additionalProperties, DataFactoryElement queryTimeout, BinaryData additionalColumns, DataFactoryElement query) : base(copySourceType, sourceRetryCount, sourceRetryWait, maxConcurrentConnections, disableMetricsCollection, additionalProperties, queryTimeout, additionalColumns) - { - Query = query; - CopySourceType = copySourceType ?? "ImpalaSource"; - } - - /// A query to retrieve data from source. Type: string (or Expression with resultType string). - public DataFactoryElement Query { get; set; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/ImportSettings.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/ImportSettings.Serialization.cs deleted file mode 100644 index 1610e3ba..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/ImportSettings.Serialization.cs +++ /dev/null @@ -1,46 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class ImportSettings : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ImportSettingsType); - foreach (var item in AdditionalProperties) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.Value.ToString()).RootElement); -#endif - } - writer.WriteEndObject(); - } - - internal static ImportSettings DeserializeImportSettings(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - if (element.TryGetProperty("type", out JsonElement discriminator)) - { - switch (discriminator.GetString()) - { - case "SnowflakeImportCopyCommand": return SnowflakeImportCopyCommand.DeserializeSnowflakeImportCopyCommand(element); - case "AzureDatabricksDeltaLakeImportCommand": return AzureDatabricksDeltaLakeImportCommand.DeserializeAzureDatabricksDeltaLakeImportCommand(element); - } - } - return UnknownImportSettings.DeserializeUnknownImportSettings(element); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/ImportSettings.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/ImportSettings.cs deleted file mode 100644 index 3eb9aa3d..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/ImportSettings.cs +++ /dev/null @@ -1,66 +0,0 @@ -// - -#nullable disable - -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// - /// Import command settings. - /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. - /// The available derived classes include and . - /// - public partial class ImportSettings - { - /// Initializes a new instance of ImportSettings. - public ImportSettings() - { - AdditionalProperties = new ChangeTrackingDictionary>(); - } - - /// Initializes a new instance of ImportSettings. - /// The import setting type. - /// Additional Properties. - internal ImportSettings(string importSettingsType, IDictionary> additionalProperties) - { - ImportSettingsType = importSettingsType; - AdditionalProperties = additionalProperties; - } - - /// The import setting type. - internal string ImportSettingsType { get; set; } - /// - /// Additional Properties - /// - /// To assign an object to the value of this property use . - /// - /// - /// To assign an already formated json string to this property use . - /// - /// - /// Examples: - /// - /// - /// BinaryData.FromObjectAsJson("foo") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromString("\"foo\"") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromObjectAsJson(new { key = "value" }) - /// Creates a payload of { "key": "value" }. - /// - /// - /// BinaryData.FromString("{\"key\": \"value\"}") - /// Creates a payload of { "key": "value" }. - /// - /// - /// - /// - public IDictionary> AdditionalProperties { get; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/InformixLinkedService.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/InformixLinkedService.Serialization.cs deleted file mode 100644 index 90e92939..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/InformixLinkedService.Serialization.cs +++ /dev/null @@ -1,239 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class InformixLinkedService : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - writer.WritePropertyName("type"u8); - writer.WriteStringValue(LinkedServiceType); - if (Optional.IsDefined(ConnectVia)) - { - writer.WritePropertyName("connectVia"u8); - writer.WriteObjectValue(ConnectVia); - } - if (Optional.IsDefined(Description)) - { - writer.WritePropertyName("description"u8); - writer.WriteStringValue(Description); - } - if (Optional.IsCollectionDefined(Parameters)) - { - writer.WritePropertyName("parameters"u8); - writer.WriteStartObject(); - foreach (var item in Parameters) - { - writer.WritePropertyName(item.Key); - writer.WriteObjectValue(item.Value); - } - writer.WriteEndObject(); - } - if (Optional.IsCollectionDefined(Annotations)) - { - writer.WritePropertyName("annotations"u8); - writer.WriteStartArray(); - foreach (var item in Annotations) - { - if (item == null) - { - writer.WriteNullValue(); - continue; - } -#if NET6_0_OR_GREATER - writer.WriteRawValue(item); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.ToString()).RootElement); -#endif - } - writer.WriteEndArray(); - } - writer.WritePropertyName("typeProperties"u8); - writer.WriteStartObject(); - writer.WritePropertyName("connectionString"u8); - JsonSerializer.Serialize(writer, ConnectionString); - if (Optional.IsDefined(AuthenticationType)) - { - writer.WritePropertyName("authenticationType"u8); - JsonSerializer.Serialize(writer, AuthenticationType); - } - if (Optional.IsDefined(Credential)) - { - writer.WritePropertyName("credential"u8); - JsonSerializer.Serialize(writer, Credential); - } - if (Optional.IsDefined(UserName)) - { - writer.WritePropertyName("userName"u8); - JsonSerializer.Serialize(writer, UserName); - } - if (Optional.IsDefined(Password)) - { - writer.WritePropertyName("password"u8); - JsonSerializer.Serialize(writer, Password); - } - if (Optional.IsDefined(EncryptedCredential)) - { - writer.WritePropertyName("encryptedCredential"u8); - writer.WriteStringValue(EncryptedCredential); - } - writer.WriteEndObject(); - foreach (var item in AdditionalProperties) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.Value.ToString()).RootElement); -#endif - } - writer.WriteEndObject(); - } - - internal static InformixLinkedService DeserializeInformixLinkedService(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - string type = default; - Optional connectVia = default; - Optional description = default; - Optional> parameters = default; - Optional> annotations = default; - DataFactoryElement connectionString = default; - Optional> authenticationType = default; - Optional credential = default; - Optional> userName = default; - Optional password = default; - Optional encryptedCredential = default; - IDictionary> additionalProperties = default; - Dictionary> additionalPropertiesDictionary = new Dictionary>(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("type"u8)) - { - type = property.Value.GetString(); - continue; - } - if (property.NameEquals("connectVia"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - connectVia = IntegrationRuntimeReference.DeserializeIntegrationRuntimeReference(property.Value); - continue; - } - if (property.NameEquals("description"u8)) - { - description = property.Value.GetString(); - continue; - } - if (property.NameEquals("parameters"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - Dictionary dictionary = new Dictionary(); - foreach (var property0 in property.Value.EnumerateObject()) - { - dictionary.Add(property0.Name, EntityParameterSpecification.DeserializeEntityParameterSpecification(property0.Value)); - } - parameters = dictionary; - continue; - } - if (property.NameEquals("annotations"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - if (item.ValueKind == JsonValueKind.Null) - { - array.Add(null); - } - else - { - array.Add(BinaryData.FromString(item.GetRawText())); - } - } - annotations = array; - continue; - } - if (property.NameEquals("typeProperties"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - foreach (var property0 in property.Value.EnumerateObject()) - { - if (property0.NameEquals("connectionString"u8)) - { - connectionString = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("authenticationType"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - authenticationType = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("credential"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - credential = JsonSerializer.Deserialize(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("userName"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - userName = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("password"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - password = JsonSerializer.Deserialize(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("encryptedCredential"u8)) - { - encryptedCredential = property0.Value.GetString(); - continue; - } - } - continue; - } - additionalPropertiesDictionary.Add(property.Name, JsonSerializer.Deserialize>(property.Value.GetRawText())); - } - additionalProperties = additionalPropertiesDictionary; - return new InformixLinkedService(type, connectVia.Value, description.Value, Optional.ToDictionary(parameters), Optional.ToList(annotations), additionalProperties, connectionString, authenticationType.Value, credential, userName.Value, password, encryptedCredential.Value); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/InformixLinkedService.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/InformixLinkedService.cs deleted file mode 100644 index 7f5a3e72..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/InformixLinkedService.cs +++ /dev/null @@ -1,61 +0,0 @@ -// - -#nullable disable - -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// Informix linked service. - public partial class InformixLinkedService : DataFactoryLinkedServiceProperties - { - /// Initializes a new instance of InformixLinkedService. - /// The non-access credential portion of the connection string as well as an optional encrypted credential. Type: string, or SecureString, or AzureKeyVaultSecretReference, or Expression with resultType string. - /// is null. - public InformixLinkedService(DataFactoryElement connectionString) - { - Argument.AssertNotNull(connectionString, nameof(connectionString)); - - ConnectionString = connectionString; - LinkedServiceType = "Informix"; - } - - /// Initializes a new instance of InformixLinkedService. - /// Type of linked service. - /// The integration runtime reference. - /// Linked service description. - /// Parameters for linked service. - /// List of tags that can be used for describing the linked service. - /// Additional Properties. - /// The non-access credential portion of the connection string as well as an optional encrypted credential. Type: string, or SecureString, or AzureKeyVaultSecretReference, or Expression with resultType string. - /// Type of authentication used to connect to the Informix as ODBC data store. Possible values are: Anonymous and Basic. Type: string (or Expression with resultType string). - /// The access credential portion of the connection string specified in driver-specific property-value format. - /// User name for Basic authentication. Type: string (or Expression with resultType string). - /// Password for Basic authentication. - /// The encrypted credential used for authentication. Credentials are encrypted using the integration runtime credential manager. Type: string. - internal InformixLinkedService(string linkedServiceType, IntegrationRuntimeReference connectVia, string description, IDictionary parameters, IList annotations, IDictionary> additionalProperties, DataFactoryElement connectionString, DataFactoryElement authenticationType, DataFactorySecretBaseDefinition credential, DataFactoryElement userName, DataFactorySecretBaseDefinition password, string encryptedCredential) : base(linkedServiceType, connectVia, description, parameters, annotations, additionalProperties) - { - ConnectionString = connectionString; - AuthenticationType = authenticationType; - Credential = credential; - UserName = userName; - Password = password; - EncryptedCredential = encryptedCredential; - LinkedServiceType = linkedServiceType ?? "Informix"; - } - - /// The non-access credential portion of the connection string as well as an optional encrypted credential. Type: string, or SecureString, or AzureKeyVaultSecretReference, or Expression with resultType string. - public DataFactoryElement ConnectionString { get; set; } - /// Type of authentication used to connect to the Informix as ODBC data store. Possible values are: Anonymous and Basic. Type: string (or Expression with resultType string). - public DataFactoryElement AuthenticationType { get; set; } - /// The access credential portion of the connection string specified in driver-specific property-value format. - public DataFactorySecretBaseDefinition Credential { get; set; } - /// User name for Basic authentication. Type: string (or Expression with resultType string). - public DataFactoryElement UserName { get; set; } - /// Password for Basic authentication. - public DataFactorySecretBaseDefinition Password { get; set; } - /// The encrypted credential used for authentication. Credentials are encrypted using the integration runtime credential manager. Type: string. - public string EncryptedCredential { get; set; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/InformixSink.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/InformixSink.Serialization.cs deleted file mode 100644 index 4b7ee21d..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/InformixSink.Serialization.cs +++ /dev/null @@ -1,157 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class InformixSink : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - if (Optional.IsDefined(PreCopyScript)) - { - writer.WritePropertyName("preCopyScript"u8); - JsonSerializer.Serialize(writer, PreCopyScript); - } - writer.WritePropertyName("type"u8); - writer.WriteStringValue(CopySinkType); - if (Optional.IsDefined(WriteBatchSize)) - { - writer.WritePropertyName("writeBatchSize"u8); - JsonSerializer.Serialize(writer, WriteBatchSize); - } - if (Optional.IsDefined(WriteBatchTimeout)) - { - writer.WritePropertyName("writeBatchTimeout"u8); - JsonSerializer.Serialize(writer, WriteBatchTimeout); - } - if (Optional.IsDefined(SinkRetryCount)) - { - writer.WritePropertyName("sinkRetryCount"u8); - JsonSerializer.Serialize(writer, SinkRetryCount); - } - if (Optional.IsDefined(SinkRetryWait)) - { - writer.WritePropertyName("sinkRetryWait"u8); - JsonSerializer.Serialize(writer, SinkRetryWait); - } - if (Optional.IsDefined(MaxConcurrentConnections)) - { - writer.WritePropertyName("maxConcurrentConnections"u8); - JsonSerializer.Serialize(writer, MaxConcurrentConnections); - } - if (Optional.IsDefined(DisableMetricsCollection)) - { - writer.WritePropertyName("disableMetricsCollection"u8); - JsonSerializer.Serialize(writer, DisableMetricsCollection); - } - foreach (var item in AdditionalProperties) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.Value.ToString()).RootElement); -#endif - } - writer.WriteEndObject(); - } - - internal static InformixSink DeserializeInformixSink(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - Optional> preCopyScript = default; - string type = default; - Optional> writeBatchSize = default; - Optional> writeBatchTimeout = default; - Optional> sinkRetryCount = default; - Optional> sinkRetryWait = default; - Optional> maxConcurrentConnections = default; - Optional> disableMetricsCollection = default; - IDictionary> additionalProperties = default; - Dictionary> additionalPropertiesDictionary = new Dictionary>(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("preCopyScript"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - preCopyScript = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("type"u8)) - { - type = property.Value.GetString(); - continue; - } - if (property.NameEquals("writeBatchSize"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - writeBatchSize = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("writeBatchTimeout"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - writeBatchTimeout = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("sinkRetryCount"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - sinkRetryCount = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("sinkRetryWait"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - sinkRetryWait = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("maxConcurrentConnections"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - maxConcurrentConnections = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("disableMetricsCollection"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - disableMetricsCollection = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - additionalPropertiesDictionary.Add(property.Name, JsonSerializer.Deserialize>(property.Value.GetRawText())); - } - additionalProperties = additionalPropertiesDictionary; - return new InformixSink(type, writeBatchSize.Value, writeBatchTimeout.Value, sinkRetryCount.Value, sinkRetryWait.Value, maxConcurrentConnections.Value, disableMetricsCollection.Value, additionalProperties, preCopyScript.Value); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/InformixSink.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/InformixSink.cs deleted file mode 100644 index 76e74a80..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/InformixSink.cs +++ /dev/null @@ -1,37 +0,0 @@ -// - -#nullable disable - -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// A copy activity Informix sink. - public partial class InformixSink : CopySink - { - /// Initializes a new instance of InformixSink. - public InformixSink() - { - CopySinkType = "InformixSink"; - } - - /// Initializes a new instance of InformixSink. - /// Copy sink type. - /// Write batch size. Type: integer (or Expression with resultType integer), minimum: 0. - /// Write batch timeout. Type: string (or Expression with resultType string), pattern: ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). - /// Sink retry count. Type: integer (or Expression with resultType integer). - /// Sink retry wait. Type: string (or Expression with resultType string), pattern: ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). - /// The maximum concurrent connection count for the sink data store. Type: integer (or Expression with resultType integer). - /// If true, disable data store metrics collection. Default is false. Type: boolean (or Expression with resultType boolean). - /// Additional Properties. - /// A query to execute before starting the copy. Type: string (or Expression with resultType string). - internal InformixSink(string copySinkType, DataFactoryElement writeBatchSize, DataFactoryElement writeBatchTimeout, DataFactoryElement sinkRetryCount, DataFactoryElement sinkRetryWait, DataFactoryElement maxConcurrentConnections, DataFactoryElement disableMetricsCollection, IDictionary> additionalProperties, DataFactoryElement preCopyScript) : base(copySinkType, writeBatchSize, writeBatchTimeout, sinkRetryCount, sinkRetryWait, maxConcurrentConnections, disableMetricsCollection, additionalProperties) - { - PreCopyScript = preCopyScript; - CopySinkType = copySinkType ?? "InformixSink"; - } - - /// A query to execute before starting the copy. Type: string (or Expression with resultType string). - public DataFactoryElement PreCopyScript { get; set; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/InformixSource.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/InformixSource.Serialization.cs deleted file mode 100644 index 8f31c95c..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/InformixSource.Serialization.cs +++ /dev/null @@ -1,161 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class InformixSource : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - if (Optional.IsDefined(Query)) - { - writer.WritePropertyName("query"u8); - JsonSerializer.Serialize(writer, Query); - } - if (Optional.IsDefined(QueryTimeout)) - { - writer.WritePropertyName("queryTimeout"u8); - JsonSerializer.Serialize(writer, QueryTimeout); - } - if (Optional.IsDefined(AdditionalColumns)) - { - writer.WritePropertyName("additionalColumns"u8); -#if NET6_0_OR_GREATER - writer.WriteRawValue(AdditionalColumns); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(AdditionalColumns.ToString()).RootElement); -#endif - } - writer.WritePropertyName("type"u8); - writer.WriteStringValue(CopySourceType); - if (Optional.IsDefined(SourceRetryCount)) - { - writer.WritePropertyName("sourceRetryCount"u8); - JsonSerializer.Serialize(writer, SourceRetryCount); - } - if (Optional.IsDefined(SourceRetryWait)) - { - writer.WritePropertyName("sourceRetryWait"u8); - JsonSerializer.Serialize(writer, SourceRetryWait); - } - if (Optional.IsDefined(MaxConcurrentConnections)) - { - writer.WritePropertyName("maxConcurrentConnections"u8); - JsonSerializer.Serialize(writer, MaxConcurrentConnections); - } - if (Optional.IsDefined(DisableMetricsCollection)) - { - writer.WritePropertyName("disableMetricsCollection"u8); - JsonSerializer.Serialize(writer, DisableMetricsCollection); - } - foreach (var item in AdditionalProperties) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.Value.ToString()).RootElement); -#endif - } - writer.WriteEndObject(); - } - - internal static InformixSource DeserializeInformixSource(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - Optional> query = default; - Optional> queryTimeout = default; - Optional additionalColumns = default; - string type = default; - Optional> sourceRetryCount = default; - Optional> sourceRetryWait = default; - Optional> maxConcurrentConnections = default; - Optional> disableMetricsCollection = default; - IDictionary> additionalProperties = default; - Dictionary> additionalPropertiesDictionary = new Dictionary>(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("query"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - query = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("queryTimeout"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - queryTimeout = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("additionalColumns"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - additionalColumns = BinaryData.FromString(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("type"u8)) - { - type = property.Value.GetString(); - continue; - } - if (property.NameEquals("sourceRetryCount"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - sourceRetryCount = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("sourceRetryWait"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - sourceRetryWait = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("maxConcurrentConnections"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - maxConcurrentConnections = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("disableMetricsCollection"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - disableMetricsCollection = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - additionalPropertiesDictionary.Add(property.Name, JsonSerializer.Deserialize>(property.Value.GetRawText())); - } - additionalProperties = additionalPropertiesDictionary; - return new InformixSource(type, sourceRetryCount.Value, sourceRetryWait.Value, maxConcurrentConnections.Value, disableMetricsCollection.Value, additionalProperties, queryTimeout.Value, additionalColumns.Value, query.Value); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/InformixSource.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/InformixSource.cs deleted file mode 100644 index fdb698aa..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/InformixSource.cs +++ /dev/null @@ -1,37 +0,0 @@ -// - -#nullable disable - -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// A copy activity source for Informix. - public partial class InformixSource : TabularSource - { - /// Initializes a new instance of InformixSource. - public InformixSource() - { - CopySourceType = "InformixSource"; - } - - /// Initializes a new instance of InformixSource. - /// Copy source type. - /// Source retry count. Type: integer (or Expression with resultType integer). - /// Source retry wait. Type: string (or Expression with resultType string), pattern: ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). - /// The maximum concurrent connection count for the source data store. Type: integer (or Expression with resultType integer). - /// If true, disable data store metrics collection. Default is false. Type: boolean (or Expression with resultType boolean). - /// Additional Properties. - /// 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). - /// Database query. Type: string (or Expression with resultType string). - internal InformixSource(string copySourceType, DataFactoryElement sourceRetryCount, DataFactoryElement sourceRetryWait, DataFactoryElement maxConcurrentConnections, DataFactoryElement disableMetricsCollection, IDictionary> additionalProperties, DataFactoryElement queryTimeout, BinaryData additionalColumns, DataFactoryElement query) : base(copySourceType, sourceRetryCount, sourceRetryWait, maxConcurrentConnections, disableMetricsCollection, additionalProperties, queryTimeout, additionalColumns) - { - Query = query; - CopySourceType = copySourceType ?? "InformixSource"; - } - - /// Database query. Type: string (or Expression with resultType string). - public DataFactoryElement Query { get; set; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/InformixTableDataset.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/InformixTableDataset.Serialization.cs deleted file mode 100644 index b95cab3d..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/InformixTableDataset.Serialization.cs +++ /dev/null @@ -1,212 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class InformixTableDataset : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - writer.WritePropertyName("type"u8); - writer.WriteStringValue(DatasetType); - if (Optional.IsDefined(Description)) - { - writer.WritePropertyName("description"u8); - writer.WriteStringValue(Description); - } - if (Optional.IsDefined(Structure)) - { - writer.WritePropertyName("structure"u8); - JsonSerializer.Serialize(writer, Structure); - } - if (Optional.IsDefined(Schema)) - { - writer.WritePropertyName("schema"u8); - JsonSerializer.Serialize(writer, Schema); - } - writer.WritePropertyName("linkedServiceName"u8); - JsonSerializer.Serialize(writer, LinkedServiceName); if (Optional.IsCollectionDefined(Parameters)) - { - writer.WritePropertyName("parameters"u8); - writer.WriteStartObject(); - foreach (var item in Parameters) - { - writer.WritePropertyName(item.Key); - writer.WriteObjectValue(item.Value); - } - writer.WriteEndObject(); - } - if (Optional.IsCollectionDefined(Annotations)) - { - writer.WritePropertyName("annotations"u8); - writer.WriteStartArray(); - foreach (var item in Annotations) - { - if (item == null) - { - writer.WriteNullValue(); - continue; - } -#if NET6_0_OR_GREATER - writer.WriteRawValue(item); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.ToString()).RootElement); -#endif - } - writer.WriteEndArray(); - } - if (Optional.IsDefined(Folder)) - { - writer.WritePropertyName("folder"u8); - writer.WriteObjectValue(Folder); - } - writer.WritePropertyName("typeProperties"u8); - writer.WriteStartObject(); - if (Optional.IsDefined(TableName)) - { - writer.WritePropertyName("tableName"u8); - JsonSerializer.Serialize(writer, TableName); - } - writer.WriteEndObject(); - foreach (var item in AdditionalProperties) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.Value.ToString()).RootElement); -#endif - } - writer.WriteEndObject(); - } - - internal static InformixTableDataset DeserializeInformixTableDataset(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - string type = default; - Optional description = default; - Optional>> structure = default; - Optional>> schema = default; - DataFactoryLinkedServiceReference linkedServiceName = default; - Optional> parameters = default; - Optional> annotations = default; - Optional folder = default; - Optional> tableName = default; - IDictionary> additionalProperties = default; - Dictionary> additionalPropertiesDictionary = new Dictionary>(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("type"u8)) - { - type = property.Value.GetString(); - continue; - } - if (property.NameEquals("description"u8)) - { - description = property.Value.GetString(); - continue; - } - if (property.NameEquals("structure"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - structure = JsonSerializer.Deserialize>>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("schema"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - schema = JsonSerializer.Deserialize>>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("linkedServiceName"u8)) - { - linkedServiceName = JsonSerializer.Deserialize(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("parameters"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - Dictionary dictionary = new Dictionary(); - foreach (var property0 in property.Value.EnumerateObject()) - { - dictionary.Add(property0.Name, EntityParameterSpecification.DeserializeEntityParameterSpecification(property0.Value)); - } - parameters = dictionary; - continue; - } - if (property.NameEquals("annotations"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - if (item.ValueKind == JsonValueKind.Null) - { - array.Add(null); - } - else - { - array.Add(BinaryData.FromString(item.GetRawText())); - } - } - annotations = array; - continue; - } - if (property.NameEquals("folder"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - folder = DatasetFolder.DeserializeDatasetFolder(property.Value); - continue; - } - if (property.NameEquals("typeProperties"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - foreach (var property0 in property.Value.EnumerateObject()) - { - if (property0.NameEquals("tableName"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - tableName = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - } - continue; - } - additionalPropertiesDictionary.Add(property.Name, JsonSerializer.Deserialize>(property.Value.GetRawText())); - } - additionalProperties = additionalPropertiesDictionary; - return new InformixTableDataset(type, description.Value, structure.Value, schema.Value, linkedServiceName, Optional.ToDictionary(parameters), Optional.ToList(annotations), folder.Value, additionalProperties, tableName.Value); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/InformixTableDataset.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/InformixTableDataset.cs deleted file mode 100644 index e6708475..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/InformixTableDataset.cs +++ /dev/null @@ -1,43 +0,0 @@ -// - -#nullable disable - -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// The Informix table dataset. - public partial class InformixTableDataset : DataFactoryDatasetProperties - { - /// Initializes a new instance of InformixTableDataset. - /// Linked service reference. - /// is null. - public InformixTableDataset(DataFactoryLinkedServiceReference linkedServiceName) : base(linkedServiceName) - { - Argument.AssertNotNull(linkedServiceName, nameof(linkedServiceName)); - - DatasetType = "InformixTable"; - } - - /// Initializes a new instance of InformixTableDataset. - /// Type of dataset. - /// Dataset description. - /// Columns that define the structure of the dataset. Type: array (or Expression with resultType array), itemType: DatasetDataElement. - /// Columns that define the physical type schema of the dataset. Type: array (or Expression with resultType array), itemType: DatasetSchemaDataElement. - /// Linked service reference. - /// Parameters for dataset. - /// List of tags that can be used for describing the Dataset. - /// The folder that this Dataset is in. If not specified, Dataset will appear at the root level. - /// Additional Properties. - /// The Informix table name. Type: string (or Expression with resultType string). - internal InformixTableDataset(string datasetType, string description, DataFactoryElement> structure, DataFactoryElement> schema, DataFactoryLinkedServiceReference linkedServiceName, IDictionary parameters, IList annotations, DatasetFolder folder, IDictionary> additionalProperties, DataFactoryElement tableName) : base(datasetType, description, structure, schema, linkedServiceName, parameters, annotations, folder, additionalProperties) - { - TableName = tableName; - DatasetType = datasetType ?? "InformixTable"; - } - - /// The Informix table name. Type: string (or Expression with resultType string). - public DataFactoryElement TableName { get; set; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/IntegrationRuntimeAuthKeyName.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/IntegrationRuntimeAuthKeyName.cs deleted file mode 100644 index 442914a5..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/IntegrationRuntimeAuthKeyName.cs +++ /dev/null @@ -1,47 +0,0 @@ -// - -#nullable disable - -using System.ComponentModel; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// The name of the authentication key to regenerate. - public readonly partial struct IntegrationRuntimeAuthKeyName : IEquatable - { - private readonly string _value; - - /// Initializes a new instance of . - /// is null. - public IntegrationRuntimeAuthKeyName(string value) - { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } - - private const string AuthKey1Value = "authKey1"; - private const string AuthKey2Value = "authKey2"; - - /// authKey1. - public static IntegrationRuntimeAuthKeyName AuthKey1 { get; } = new IntegrationRuntimeAuthKeyName(AuthKey1Value); - /// authKey2. - public static IntegrationRuntimeAuthKeyName AuthKey2 { get; } = new IntegrationRuntimeAuthKeyName(AuthKey2Value); - /// Determines if two values are the same. - public static bool operator ==(IntegrationRuntimeAuthKeyName left, IntegrationRuntimeAuthKeyName right) => left.Equals(right); - /// Determines if two values are not the same. - public static bool operator !=(IntegrationRuntimeAuthKeyName left, IntegrationRuntimeAuthKeyName right) => !left.Equals(right); - /// Converts a string to a . - public static implicit operator IntegrationRuntimeAuthKeyName(string value) => new IntegrationRuntimeAuthKeyName(value); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override bool Equals(object obj) => obj is IntegrationRuntimeAuthKeyName other && Equals(other); - /// - public bool Equals(IntegrationRuntimeAuthKeyName other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override int GetHashCode() => _value?.GetHashCode() ?? 0; - /// - public override string ToString() => _value; - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/IntegrationRuntimeAuthKeys.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/IntegrationRuntimeAuthKeys.Serialization.cs deleted file mode 100644 index 7c43d3ef..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/IntegrationRuntimeAuthKeys.Serialization.cs +++ /dev/null @@ -1,36 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class IntegrationRuntimeAuthKeys - { - internal static IntegrationRuntimeAuthKeys DeserializeIntegrationRuntimeAuthKeys(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - Optional authKey1 = default; - Optional authKey2 = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("authKey1"u8)) - { - authKey1 = property.Value.GetString(); - continue; - } - if (property.NameEquals("authKey2"u8)) - { - authKey2 = property.Value.GetString(); - continue; - } - } - return new IntegrationRuntimeAuthKeys(authKey1.Value, authKey2.Value); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/IntegrationRuntimeAuthKeys.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/IntegrationRuntimeAuthKeys.cs deleted file mode 100644 index cca4455f..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/IntegrationRuntimeAuthKeys.cs +++ /dev/null @@ -1,29 +0,0 @@ -// - -#nullable disable - -namespace AzureDataFactory.TestingFramework.Models -{ - /// The integration runtime authentication keys. - public partial class IntegrationRuntimeAuthKeys - { - /// Initializes a new instance of IntegrationRuntimeAuthKeys. - internal IntegrationRuntimeAuthKeys() - { - } - - /// Initializes a new instance of IntegrationRuntimeAuthKeys. - /// The primary integration runtime authentication key. - /// The secondary integration runtime authentication key. - internal IntegrationRuntimeAuthKeys(string authKey1, string authKey2) - { - AuthKey1 = authKey1; - AuthKey2 = authKey2; - } - - /// The primary integration runtime authentication key. - public string AuthKey1 { get; } - /// The secondary integration runtime authentication key. - public string AuthKey2 { get; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/IntegrationRuntimeAutoUpdateState.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/IntegrationRuntimeAutoUpdateState.cs deleted file mode 100644 index c9360ef6..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/IntegrationRuntimeAutoUpdateState.cs +++ /dev/null @@ -1,47 +0,0 @@ -// - -#nullable disable - -using System.ComponentModel; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// The state of integration runtime auto update. - public readonly partial struct IntegrationRuntimeAutoUpdateState : IEquatable - { - private readonly string _value; - - /// Initializes a new instance of . - /// is null. - public IntegrationRuntimeAutoUpdateState(string value) - { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } - - private const string OnValue = "On"; - private const string OffValue = "Off"; - - /// On. - public static IntegrationRuntimeAutoUpdateState On { get; } = new IntegrationRuntimeAutoUpdateState(OnValue); - /// Off. - public static IntegrationRuntimeAutoUpdateState Off { get; } = new IntegrationRuntimeAutoUpdateState(OffValue); - /// Determines if two values are the same. - public static bool operator ==(IntegrationRuntimeAutoUpdateState left, IntegrationRuntimeAutoUpdateState right) => left.Equals(right); - /// Determines if two values are not the same. - public static bool operator !=(IntegrationRuntimeAutoUpdateState left, IntegrationRuntimeAutoUpdateState right) => !left.Equals(right); - /// Converts a string to a . - public static implicit operator IntegrationRuntimeAutoUpdateState(string value) => new IntegrationRuntimeAutoUpdateState(value); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override bool Equals(object obj) => obj is IntegrationRuntimeAutoUpdateState other && Equals(other); - /// - public bool Equals(IntegrationRuntimeAutoUpdateState other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override int GetHashCode() => _value?.GetHashCode() ?? 0; - /// - public override string ToString() => _value; - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/IntegrationRuntimeComputeProperties.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/IntegrationRuntimeComputeProperties.Serialization.cs deleted file mode 100644 index 1a03f7c8..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/IntegrationRuntimeComputeProperties.Serialization.cs +++ /dev/null @@ -1,160 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class IntegrationRuntimeComputeProperties : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - if (Optional.IsDefined(Location)) - { - writer.WritePropertyName("location"u8); - writer.WriteStringValue(Location.Value); - } - if (Optional.IsDefined(NodeSize)) - { - writer.WritePropertyName("nodeSize"u8); - writer.WriteStringValue(NodeSize); - } - if (Optional.IsDefined(NumberOfNodes)) - { - writer.WritePropertyName("numberOfNodes"u8); - writer.WriteNumberValue(NumberOfNodes.Value); - } - if (Optional.IsDefined(MaxParallelExecutionsPerNode)) - { - writer.WritePropertyName("maxParallelExecutionsPerNode"u8); - writer.WriteNumberValue(MaxParallelExecutionsPerNode.Value); - } - if (Optional.IsDefined(DataFlowProperties)) - { - writer.WritePropertyName("dataFlowProperties"u8); - writer.WriteObjectValue(DataFlowProperties); - } - if (Optional.IsDefined(VnetProperties)) - { - writer.WritePropertyName("vNetProperties"u8); - writer.WriteObjectValue(VnetProperties); - } - if (Optional.IsDefined(CopyComputeScaleProperties)) - { - writer.WritePropertyName("copyComputeScaleProperties"u8); - writer.WriteObjectValue(CopyComputeScaleProperties); - } - if (Optional.IsDefined(PipelineExternalComputeScaleProperties)) - { - writer.WritePropertyName("pipelineExternalComputeScaleProperties"u8); - writer.WriteObjectValue(PipelineExternalComputeScaleProperties); - } - foreach (var item in AdditionalProperties) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.Value.ToString()).RootElement); -#endif - } - writer.WriteEndObject(); - } - - internal static IntegrationRuntimeComputeProperties DeserializeIntegrationRuntimeComputeProperties(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - Optional location = default; - Optional nodeSize = default; - Optional numberOfNodes = default; - Optional maxParallelExecutionsPerNode = default; - Optional dataFlowProperties = default; - Optional vnetProperties = default; - Optional copyComputeScaleProperties = default; - Optional pipelineExternalComputeScaleProperties = default; - IDictionary> additionalProperties = default; - Dictionary> additionalPropertiesDictionary = new Dictionary>(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("location"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - location = new AzureLocation(property.Value.GetString()); - continue; - } - if (property.NameEquals("nodeSize"u8)) - { - nodeSize = property.Value.GetString(); - continue; - } - if (property.NameEquals("numberOfNodes"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - numberOfNodes = property.Value.GetInt32(); - continue; - } - if (property.NameEquals("maxParallelExecutionsPerNode"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - maxParallelExecutionsPerNode = property.Value.GetInt32(); - continue; - } - if (property.NameEquals("dataFlowProperties"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - dataFlowProperties = IntegrationRuntimeDataFlowProperties.DeserializeIntegrationRuntimeDataFlowProperties(property.Value); - continue; - } - if (property.NameEquals("vNetProperties"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - vnetProperties = IntegrationRuntimeVnetProperties.DeserializeIntegrationRuntimeVnetProperties(property.Value); - continue; - } - if (property.NameEquals("copyComputeScaleProperties"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - copyComputeScaleProperties = CopyComputeScaleProperties.DeserializeCopyComputeScaleProperties(property.Value); - continue; - } - if (property.NameEquals("pipelineExternalComputeScaleProperties"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - pipelineExternalComputeScaleProperties = PipelineExternalComputeScaleProperties.DeserializePipelineExternalComputeScaleProperties(property.Value); - continue; - } - additionalPropertiesDictionary.Add(property.Name, JsonSerializer.Deserialize>(property.Value.GetRawText())); - } - additionalProperties = additionalPropertiesDictionary; - return new IntegrationRuntimeComputeProperties(Optional.ToNullable(location), nodeSize.Value, Optional.ToNullable(numberOfNodes), Optional.ToNullable(maxParallelExecutionsPerNode), dataFlowProperties.Value, vnetProperties.Value, copyComputeScaleProperties.Value, pipelineExternalComputeScaleProperties.Value, additionalProperties); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/IntegrationRuntimeComputeProperties.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/IntegrationRuntimeComputeProperties.cs deleted file mode 100644 index c319c364..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/IntegrationRuntimeComputeProperties.cs +++ /dev/null @@ -1,90 +0,0 @@ -// - -#nullable disable - -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// The compute resource properties for managed integration runtime. - public partial class IntegrationRuntimeComputeProperties - { - /// Initializes a new instance of IntegrationRuntimeComputeProperties. - public IntegrationRuntimeComputeProperties() - { - AdditionalProperties = new ChangeTrackingDictionary>(); - } - - /// Initializes a new instance of IntegrationRuntimeComputeProperties. - /// The location for managed integration runtime. The supported regions could be found on https://docs.microsoft.com/en-us/azure/data-factory/data-factory-data-movement-activities. - /// The node size requirement to managed integration runtime. - /// The required number of nodes for managed integration runtime. - /// Maximum parallel executions count per node for managed integration runtime. - /// Data flow properties for managed integration runtime. - /// VNet properties for managed integration runtime. - /// CopyComputeScale properties for managed integration runtime. - /// PipelineExternalComputeScale properties for managed integration runtime. - /// Additional Properties. - internal IntegrationRuntimeComputeProperties(AzureLocation? location, string nodeSize, int? numberOfNodes, int? maxParallelExecutionsPerNode, IntegrationRuntimeDataFlowProperties dataFlowProperties, IntegrationRuntimeVnetProperties vnetProperties, CopyComputeScaleProperties copyComputeScaleProperties, PipelineExternalComputeScaleProperties pipelineExternalComputeScaleProperties, IDictionary> additionalProperties) - { - Location = location; - NodeSize = nodeSize; - NumberOfNodes = numberOfNodes; - MaxParallelExecutionsPerNode = maxParallelExecutionsPerNode; - DataFlowProperties = dataFlowProperties; - VnetProperties = vnetProperties; - CopyComputeScaleProperties = copyComputeScaleProperties; - PipelineExternalComputeScaleProperties = pipelineExternalComputeScaleProperties; - AdditionalProperties = additionalProperties; - } - - /// The location for managed integration runtime. The supported regions could be found on https://docs.microsoft.com/en-us/azure/data-factory/data-factory-data-movement-activities. - public AzureLocation? Location { get; set; } - /// The node size requirement to managed integration runtime. - public string NodeSize { get; set; } - /// The required number of nodes for managed integration runtime. - public int? NumberOfNodes { get; set; } - /// Maximum parallel executions count per node for managed integration runtime. - public int? MaxParallelExecutionsPerNode { get; set; } - /// Data flow properties for managed integration runtime. - public IntegrationRuntimeDataFlowProperties DataFlowProperties { get; set; } - /// VNet properties for managed integration runtime. - public IntegrationRuntimeVnetProperties VnetProperties { get; set; } - /// CopyComputeScale properties for managed integration runtime. - public CopyComputeScaleProperties CopyComputeScaleProperties { get; set; } - /// PipelineExternalComputeScale properties for managed integration runtime. - public PipelineExternalComputeScaleProperties PipelineExternalComputeScaleProperties { get; set; } - /// - /// Additional Properties - /// - /// To assign an object to the value of this property use . - /// - /// - /// To assign an already formated json string to this property use . - /// - /// - /// Examples: - /// - /// - /// BinaryData.FromObjectAsJson("foo") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromString("\"foo\"") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromObjectAsJson(new { key = "value" }) - /// Creates a payload of { "key": "value" }. - /// - /// - /// BinaryData.FromString("{\"key\": \"value\"}") - /// Creates a payload of { "key": "value" }. - /// - /// - /// - /// - public IDictionary> AdditionalProperties { get; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/IntegrationRuntimeConnectionInfo.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/IntegrationRuntimeConnectionInfo.Serialization.cs deleted file mode 100644 index 83cb83f8..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/IntegrationRuntimeConnectionInfo.Serialization.cs +++ /dev/null @@ -1,73 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class IntegrationRuntimeConnectionInfo - { - internal static IntegrationRuntimeConnectionInfo DeserializeIntegrationRuntimeConnectionInfo(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - Optional serviceToken = default; - Optional identityCertThumbprint = default; - Optional hostServiceUri = default; - Optional version = default; - Optional publicKey = default; - Optional isIdentityCertExprired = default; - IReadOnlyDictionary> additionalProperties = default; - Dictionary> additionalPropertiesDictionary = new Dictionary>(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("serviceToken"u8)) - { - serviceToken = property.Value.GetString(); - continue; - } - if (property.NameEquals("identityCertThumbprint"u8)) - { - identityCertThumbprint = property.Value.GetString(); - continue; - } - if (property.NameEquals("hostServiceUri"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - hostServiceUri = new Uri(property.Value.GetString()); - continue; - } - if (property.NameEquals("version"u8)) - { - version = property.Value.GetString(); - continue; - } - if (property.NameEquals("publicKey"u8)) - { - publicKey = property.Value.GetString(); - continue; - } - if (property.NameEquals("isIdentityCertExprired"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - isIdentityCertExprired = property.Value.GetBoolean(); - continue; - } - additionalPropertiesDictionary.Add(property.Name, JsonSerializer.Deserialize>(property.Value.GetRawText())); - } - additionalProperties = additionalPropertiesDictionary; - return new IntegrationRuntimeConnectionInfo(serviceToken.Value, identityCertThumbprint.Value, hostServiceUri.Value, version.Value, publicKey.Value, Optional.ToNullable(isIdentityCertExprired), additionalProperties); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/IntegrationRuntimeConnectionInfo.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/IntegrationRuntimeConnectionInfo.cs deleted file mode 100644 index 831d6dc0..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/IntegrationRuntimeConnectionInfo.cs +++ /dev/null @@ -1,82 +0,0 @@ -// - -#nullable disable - -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// Connection information for encrypting the on-premises data source credentials. - public partial class IntegrationRuntimeConnectionInfo - { - /// Initializes a new instance of IntegrationRuntimeConnectionInfo. - internal IntegrationRuntimeConnectionInfo() - { - AdditionalProperties = new ChangeTrackingDictionary>(); - } - - /// Initializes a new instance of IntegrationRuntimeConnectionInfo. - /// The token generated in service. Callers use this token to authenticate to integration runtime. - /// The integration runtime SSL certificate thumbprint. Click-Once application uses it to do server validation. - /// The on-premises integration runtime host URL. - /// The integration runtime version. - /// The public key for encrypting a credential when transferring the credential to the integration runtime. - /// Whether the identity certificate is expired. - /// Additional Properties. - internal IntegrationRuntimeConnectionInfo(string serviceToken, string identityCertThumbprint, Uri hostServiceUri, string version, string publicKey, bool? isIdentityCertExprired, IReadOnlyDictionary> additionalProperties) - { - ServiceToken = serviceToken; - IdentityCertThumbprint = identityCertThumbprint; - HostServiceUri = hostServiceUri; - Version = version; - PublicKey = publicKey; - IsIdentityCertExprired = isIdentityCertExprired; - AdditionalProperties = additionalProperties; - } - - /// The token generated in service. Callers use this token to authenticate to integration runtime. - public string ServiceToken { get; } - /// The integration runtime SSL certificate thumbprint. Click-Once application uses it to do server validation. - public string IdentityCertThumbprint { get; } - /// The on-premises integration runtime host URL. - public Uri HostServiceUri { get; } - /// The integration runtime version. - public string Version { get; } - /// The public key for encrypting a credential when transferring the credential to the integration runtime. - public string PublicKey { get; } - /// Whether the identity certificate is expired. - public bool? IsIdentityCertExprired { get; } - /// - /// Additional Properties - /// - /// To assign an object to the value of this property use . - /// - /// - /// To assign an already formated json string to this property use . - /// - /// - /// Examples: - /// - /// - /// BinaryData.FromObjectAsJson("foo") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromString("\"foo\"") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromObjectAsJson(new { key = "value" }) - /// Creates a payload of { "key": "value" }. - /// - /// - /// BinaryData.FromString("{\"key\": \"value\"}") - /// Creates a payload of { "key": "value" }. - /// - /// - /// - /// - public IReadOnlyDictionary> AdditionalProperties { get; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/IntegrationRuntimeCustomSetupScriptProperties.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/IntegrationRuntimeCustomSetupScriptProperties.Serialization.cs deleted file mode 100644 index 8ec94456..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/IntegrationRuntimeCustomSetupScriptProperties.Serialization.cs +++ /dev/null @@ -1,61 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class IntegrationRuntimeCustomSetupScriptProperties : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - if (Optional.IsDefined(BlobContainerUri)) - { - writer.WritePropertyName("blobContainerUri"u8); - writer.WriteStringValue(BlobContainerUri.AbsoluteUri); - } - if (Optional.IsDefined(SasToken)) - { - writer.WritePropertyName("sasToken"u8); - JsonSerializer.Serialize(writer, SasToken); - } - writer.WriteEndObject(); - } - - internal static IntegrationRuntimeCustomSetupScriptProperties DeserializeIntegrationRuntimeCustomSetupScriptProperties(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - Optional blobContainerUri = default; - Optional sasToken = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("blobContainerUri"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - blobContainerUri = new Uri(property.Value.GetString()); - continue; - } - if (property.NameEquals("sasToken"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - sasToken = JsonSerializer.Deserialize(property.Value.GetRawText()); - continue; - } - } - return new IntegrationRuntimeCustomSetupScriptProperties(blobContainerUri.Value, sasToken); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/IntegrationRuntimeCustomSetupScriptProperties.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/IntegrationRuntimeCustomSetupScriptProperties.cs deleted file mode 100644 index 8509447d..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/IntegrationRuntimeCustomSetupScriptProperties.cs +++ /dev/null @@ -1,31 +0,0 @@ -// - -#nullable disable - -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// Custom setup script properties for a managed dedicated integration runtime. - public partial class IntegrationRuntimeCustomSetupScriptProperties - { - /// Initializes a new instance of IntegrationRuntimeCustomSetupScriptProperties. - public IntegrationRuntimeCustomSetupScriptProperties() - { - } - - /// Initializes a new instance of IntegrationRuntimeCustomSetupScriptProperties. - /// The URI of the Azure blob container that contains the custom setup script. - /// The SAS token of the Azure blob container. - internal IntegrationRuntimeCustomSetupScriptProperties(Uri blobContainerUri, DataFactorySecretString sasToken) - { - BlobContainerUri = blobContainerUri; - SasToken = sasToken; - } - - /// The URI of the Azure blob container that contains the custom setup script. - public Uri BlobContainerUri { get; set; } - /// The SAS token of the Azure blob container. - public DataFactorySecretString SasToken { get; set; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/IntegrationRuntimeCustomerVirtualNetwork.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/IntegrationRuntimeCustomerVirtualNetwork.Serialization.cs deleted file mode 100644 index 4214e63f..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/IntegrationRuntimeCustomerVirtualNetwork.Serialization.cs +++ /dev/null @@ -1,45 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; - -namespace AzureDataFactory.TestingFramework.Models -{ - internal partial class IntegrationRuntimeCustomerVirtualNetwork : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - if (Optional.IsDefined(SubnetId)) - { - writer.WritePropertyName("subnetId"u8); - writer.WriteStringValue(SubnetId); - } - writer.WriteEndObject(); - } - - internal static IntegrationRuntimeCustomerVirtualNetwork DeserializeIntegrationRuntimeCustomerVirtualNetwork(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - Optional subnetId = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("subnetId"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - subnetId = new ResourceIdentifier(property.Value.GetString()); - continue; - } - } - return new IntegrationRuntimeCustomerVirtualNetwork(subnetId.Value); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/IntegrationRuntimeCustomerVirtualNetwork.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/IntegrationRuntimeCustomerVirtualNetwork.cs deleted file mode 100644 index 5f326bb6..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/IntegrationRuntimeCustomerVirtualNetwork.cs +++ /dev/null @@ -1,27 +0,0 @@ -// - -#nullable disable - -using Azure.Core; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// The definition and properties of virtual network to which Azure-SSIS integration runtime will join. - internal partial class IntegrationRuntimeCustomerVirtualNetwork - { - /// Initializes a new instance of IntegrationRuntimeCustomerVirtualNetwork. - public IntegrationRuntimeCustomerVirtualNetwork() - { - } - - /// Initializes a new instance of IntegrationRuntimeCustomerVirtualNetwork. - /// The ID of subnet to which Azure-SSIS integration runtime will join. - internal IntegrationRuntimeCustomerVirtualNetwork(ResourceIdentifier subnetId) - { - SubnetId = subnetId; - } - - /// The ID of subnet to which Azure-SSIS integration runtime will join. - public ResourceIdentifier SubnetId { get; set; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/IntegrationRuntimeDataFlowCustomItem.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/IntegrationRuntimeDataFlowCustomItem.Serialization.cs deleted file mode 100644 index e93857ad..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/IntegrationRuntimeDataFlowCustomItem.Serialization.cs +++ /dev/null @@ -1,52 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class IntegrationRuntimeDataFlowCustomItem : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - if (Optional.IsDefined(Name)) - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (Optional.IsDefined(Value)) - { - writer.WritePropertyName("value"u8); - writer.WriteStringValue(Value); - } - writer.WriteEndObject(); - } - - internal static IntegrationRuntimeDataFlowCustomItem DeserializeIntegrationRuntimeDataFlowCustomItem(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - Optional name = default; - Optional value = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("name"u8)) - { - name = property.Value.GetString(); - continue; - } - if (property.NameEquals("value"u8)) - { - value = property.Value.GetString(); - continue; - } - } - return new IntegrationRuntimeDataFlowCustomItem(name.Value, value.Value); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/IntegrationRuntimeDataFlowCustomItem.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/IntegrationRuntimeDataFlowCustomItem.cs deleted file mode 100644 index 6faf2240..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/IntegrationRuntimeDataFlowCustomItem.cs +++ /dev/null @@ -1,29 +0,0 @@ -// - -#nullable disable - -namespace AzureDataFactory.TestingFramework.Models -{ - /// The IntegrationRuntimeDataFlowCustomItem. - public partial class IntegrationRuntimeDataFlowCustomItem - { - /// Initializes a new instance of IntegrationRuntimeDataFlowCustomItem. - public IntegrationRuntimeDataFlowCustomItem() - { - } - - /// Initializes a new instance of IntegrationRuntimeDataFlowCustomItem. - /// Name of custom property. - /// Value of custom property. - internal IntegrationRuntimeDataFlowCustomItem(string name, string value) - { - Name = name; - Value = value; - } - - /// Name of custom property. - public string Name { get; set; } - /// Value of custom property. - public string Value { get; set; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/IntegrationRuntimeDataFlowProperties.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/IntegrationRuntimeDataFlowProperties.Serialization.cs deleted file mode 100644 index a282041a..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/IntegrationRuntimeDataFlowProperties.Serialization.cs +++ /dev/null @@ -1,129 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class IntegrationRuntimeDataFlowProperties : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - if (Optional.IsDefined(ComputeType)) - { - writer.WritePropertyName("computeType"u8); - writer.WriteStringValue(ComputeType.Value.ToString()); - } - if (Optional.IsDefined(CoreCount)) - { - writer.WritePropertyName("coreCount"u8); - writer.WriteNumberValue(CoreCount.Value); - } - if (Optional.IsDefined(TimeToLiveInMinutes)) - { - writer.WritePropertyName("timeToLive"u8); - writer.WriteNumberValue(TimeToLiveInMinutes.Value); - } - if (Optional.IsDefined(ShouldCleanupAfterTtl)) - { - writer.WritePropertyName("cleanup"u8); - writer.WriteBooleanValue(ShouldCleanupAfterTtl.Value); - } - if (Optional.IsCollectionDefined(CustomProperties)) - { - writer.WritePropertyName("customProperties"u8); - writer.WriteStartArray(); - foreach (var item in CustomProperties) - { - writer.WriteObjectValue(item); - } - writer.WriteEndArray(); - } - foreach (var item in AdditionalProperties) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.Value.ToString()).RootElement); -#endif - } - writer.WriteEndObject(); - } - - internal static IntegrationRuntimeDataFlowProperties DeserializeIntegrationRuntimeDataFlowProperties(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - Optional computeType = default; - Optional coreCount = default; - Optional timeToLive = default; - Optional cleanup = default; - Optional> customProperties = default; - IDictionary> additionalProperties = default; - Dictionary> additionalPropertiesDictionary = new Dictionary>(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("computeType"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - computeType = new DataFlowComputeType(property.Value.GetString()); - continue; - } - if (property.NameEquals("coreCount"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - coreCount = property.Value.GetInt32(); - continue; - } - if (property.NameEquals("timeToLive"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - timeToLive = property.Value.GetInt32(); - continue; - } - if (property.NameEquals("cleanup"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - cleanup = property.Value.GetBoolean(); - continue; - } - if (property.NameEquals("customProperties"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - array.Add(IntegrationRuntimeDataFlowCustomItem.DeserializeIntegrationRuntimeDataFlowCustomItem(item)); - } - customProperties = array; - continue; - } - additionalPropertiesDictionary.Add(property.Name, JsonSerializer.Deserialize>(property.Value.GetRawText())); - } - additionalProperties = additionalPropertiesDictionary; - return new IntegrationRuntimeDataFlowProperties(Optional.ToNullable(computeType), Optional.ToNullable(coreCount), Optional.ToNullable(timeToLive), Optional.ToNullable(cleanup), Optional.ToList(customProperties), additionalProperties); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/IntegrationRuntimeDataFlowProperties.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/IntegrationRuntimeDataFlowProperties.cs deleted file mode 100644 index cefa83b4..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/IntegrationRuntimeDataFlowProperties.cs +++ /dev/null @@ -1,79 +0,0 @@ -// - -#nullable disable - -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// Data flow properties for managed integration runtime. - public partial class IntegrationRuntimeDataFlowProperties - { - /// Initializes a new instance of IntegrationRuntimeDataFlowProperties. - public IntegrationRuntimeDataFlowProperties() - { - CustomProperties = new ChangeTrackingList(); - AdditionalProperties = new ChangeTrackingDictionary>(); - } - - /// Initializes a new instance of IntegrationRuntimeDataFlowProperties. - /// Compute type of the cluster which will execute data flow job. - /// Core count of the cluster which will execute data flow job. Supported values are: 8, 16, 32, 48, 80, 144 and 272. - /// Time to live (in minutes) setting of the cluster which will execute data flow job. - /// Cluster will not be recycled and it will be used in next data flow activity run until TTL (time to live) is reached if this is set as false. Default is true. - /// Custom properties are used to tune the data flow runtime performance. - /// Additional Properties. - internal IntegrationRuntimeDataFlowProperties(DataFlowComputeType? computeType, int? coreCount, int? timeToLiveInMinutes, bool? shouldCleanupAfterTtl, IList customProperties, IDictionary> additionalProperties) - { - ComputeType = computeType; - CoreCount = coreCount; - TimeToLiveInMinutes = timeToLiveInMinutes; - ShouldCleanupAfterTtl = shouldCleanupAfterTtl; - CustomProperties = customProperties; - AdditionalProperties = additionalProperties; - } - - /// Compute type of the cluster which will execute data flow job. - public DataFlowComputeType? ComputeType { get; set; } - /// Core count of the cluster which will execute data flow job. Supported values are: 8, 16, 32, 48, 80, 144 and 272. - public int? CoreCount { get; set; } - /// Time to live (in minutes) setting of the cluster which will execute data flow job. - public int? TimeToLiveInMinutes { get; set; } - /// Cluster will not be recycled and it will be used in next data flow activity run until TTL (time to live) is reached if this is set as false. Default is true. - public bool? ShouldCleanupAfterTtl { get; set; } - /// Custom properties are used to tune the data flow runtime performance. - public IList CustomProperties { get; } - /// - /// Additional Properties - /// - /// To assign an object to the value of this property use . - /// - /// - /// To assign an already formated json string to this property use . - /// - /// - /// Examples: - /// - /// - /// BinaryData.FromObjectAsJson("foo") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromString("\"foo\"") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromObjectAsJson(new { key = "value" }) - /// Creates a payload of { "key": "value" }. - /// - /// - /// BinaryData.FromString("{\"key\": \"value\"}") - /// Creates a payload of { "key": "value" }. - /// - /// - /// - /// - public IDictionary> AdditionalProperties { get; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/IntegrationRuntimeDataProxyProperties.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/IntegrationRuntimeDataProxyProperties.Serialization.cs deleted file mode 100644 index 679d4cb8..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/IntegrationRuntimeDataProxyProperties.Serialization.cs +++ /dev/null @@ -1,71 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class IntegrationRuntimeDataProxyProperties : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - if (Optional.IsDefined(ConnectVia)) - { - writer.WritePropertyName("connectVia"u8); - writer.WriteObjectValue(ConnectVia); - } - if (Optional.IsDefined(StagingLinkedService)) - { - writer.WritePropertyName("stagingLinkedService"u8); - writer.WriteObjectValue(StagingLinkedService); - } - if (Optional.IsDefined(Path)) - { - writer.WritePropertyName("path"u8); - writer.WriteStringValue(Path); - } - writer.WriteEndObject(); - } - - internal static IntegrationRuntimeDataProxyProperties DeserializeIntegrationRuntimeDataProxyProperties(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - Optional connectVia = default; - Optional stagingLinkedService = default; - Optional path = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("connectVia"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - connectVia = EntityReference.DeserializeEntityReference(property.Value); - continue; - } - if (property.NameEquals("stagingLinkedService"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - stagingLinkedService = EntityReference.DeserializeEntityReference(property.Value); - continue; - } - if (property.NameEquals("path"u8)) - { - path = property.Value.GetString(); - continue; - } - } - return new IntegrationRuntimeDataProxyProperties(connectVia.Value, stagingLinkedService.Value, path.Value); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/IntegrationRuntimeDataProxyProperties.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/IntegrationRuntimeDataProxyProperties.cs deleted file mode 100644 index 0c979dcc..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/IntegrationRuntimeDataProxyProperties.cs +++ /dev/null @@ -1,33 +0,0 @@ -// - -#nullable disable - -namespace AzureDataFactory.TestingFramework.Models -{ - /// Data proxy properties for a managed dedicated integration runtime. - public partial class IntegrationRuntimeDataProxyProperties - { - /// Initializes a new instance of IntegrationRuntimeDataProxyProperties. - public IntegrationRuntimeDataProxyProperties() - { - } - - /// Initializes a new instance of IntegrationRuntimeDataProxyProperties. - /// The self-hosted integration runtime reference. - /// The staging linked service reference. - /// The path to contain the staged data in the Blob storage. - internal IntegrationRuntimeDataProxyProperties(EntityReference connectVia, EntityReference stagingLinkedService, string path) - { - ConnectVia = connectVia; - StagingLinkedService = stagingLinkedService; - Path = path; - } - - /// The self-hosted integration runtime reference. - public EntityReference ConnectVia { get; set; } - /// The staging linked service reference. - public EntityReference StagingLinkedService { get; set; } - /// The path to contain the staged data in the Blob storage. - public string Path { get; set; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/IntegrationRuntimeEdition.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/IntegrationRuntimeEdition.cs deleted file mode 100644 index 3706b332..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/IntegrationRuntimeEdition.cs +++ /dev/null @@ -1,47 +0,0 @@ -// - -#nullable disable - -using System.ComponentModel; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// The edition for the SSIS Integration Runtime. - public readonly partial struct IntegrationRuntimeEdition : IEquatable - { - private readonly string _value; - - /// Initializes a new instance of . - /// is null. - public IntegrationRuntimeEdition(string value) - { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } - - private const string StandardValue = "Standard"; - private const string EnterpriseValue = "Enterprise"; - - /// Standard. - public static IntegrationRuntimeEdition Standard { get; } = new IntegrationRuntimeEdition(StandardValue); - /// Enterprise. - public static IntegrationRuntimeEdition Enterprise { get; } = new IntegrationRuntimeEdition(EnterpriseValue); - /// Determines if two values are the same. - public static bool operator ==(IntegrationRuntimeEdition left, IntegrationRuntimeEdition right) => left.Equals(right); - /// Determines if two values are not the same. - public static bool operator !=(IntegrationRuntimeEdition left, IntegrationRuntimeEdition right) => !left.Equals(right); - /// Converts a string to a . - public static implicit operator IntegrationRuntimeEdition(string value) => new IntegrationRuntimeEdition(value); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override bool Equals(object obj) => obj is IntegrationRuntimeEdition other && Equals(other); - /// - public bool Equals(IntegrationRuntimeEdition other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override int GetHashCode() => _value?.GetHashCode() ?? 0; - /// - public override string ToString() => _value; - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/IntegrationRuntimeEntityReferenceType.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/IntegrationRuntimeEntityReferenceType.cs deleted file mode 100644 index a2464852..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/IntegrationRuntimeEntityReferenceType.cs +++ /dev/null @@ -1,47 +0,0 @@ -// - -#nullable disable - -using System.ComponentModel; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// The type of this referenced entity. - public readonly partial struct IntegrationRuntimeEntityReferenceType : IEquatable - { - private readonly string _value; - - /// Initializes a new instance of . - /// is null. - public IntegrationRuntimeEntityReferenceType(string value) - { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } - - private const string IntegrationRuntimeReferenceValue = "IntegrationRuntimeReference"; - private const string LinkedServiceReferenceValue = "LinkedServiceReference"; - - /// IntegrationRuntimeReference. - public static IntegrationRuntimeEntityReferenceType IntegrationRuntimeReference { get; } = new IntegrationRuntimeEntityReferenceType(IntegrationRuntimeReferenceValue); - /// LinkedServiceReference. - public static IntegrationRuntimeEntityReferenceType LinkedServiceReference { get; } = new IntegrationRuntimeEntityReferenceType(LinkedServiceReferenceValue); - /// Determines if two values are the same. - public static bool operator ==(IntegrationRuntimeEntityReferenceType left, IntegrationRuntimeEntityReferenceType right) => left.Equals(right); - /// Determines if two values are not the same. - public static bool operator !=(IntegrationRuntimeEntityReferenceType left, IntegrationRuntimeEntityReferenceType right) => !left.Equals(right); - /// Converts a string to a . - public static implicit operator IntegrationRuntimeEntityReferenceType(string value) => new IntegrationRuntimeEntityReferenceType(value); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override bool Equals(object obj) => obj is IntegrationRuntimeEntityReferenceType other && Equals(other); - /// - public bool Equals(IntegrationRuntimeEntityReferenceType other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override int GetHashCode() => _value?.GetHashCode() ?? 0; - /// - public override string ToString() => _value; - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/IntegrationRuntimeInternalChannelEncryptionMode.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/IntegrationRuntimeInternalChannelEncryptionMode.cs deleted file mode 100644 index ffe62d81..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/IntegrationRuntimeInternalChannelEncryptionMode.cs +++ /dev/null @@ -1,50 +0,0 @@ -// - -#nullable disable - -using System.ComponentModel; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// It is used to set the encryption mode for node-node communication channel (when more than 2 self-hosted integration runtime nodes exist). - public readonly partial struct IntegrationRuntimeInternalChannelEncryptionMode : IEquatable - { - private readonly string _value; - - /// Initializes a new instance of . - /// is null. - public IntegrationRuntimeInternalChannelEncryptionMode(string value) - { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } - - private const string NotSetValue = "NotSet"; - private const string SslEncryptedValue = "SslEncrypted"; - private const string NotEncryptedValue = "NotEncrypted"; - - /// NotSet. - public static IntegrationRuntimeInternalChannelEncryptionMode NotSet { get; } = new IntegrationRuntimeInternalChannelEncryptionMode(NotSetValue); - /// SslEncrypted. - public static IntegrationRuntimeInternalChannelEncryptionMode SslEncrypted { get; } = new IntegrationRuntimeInternalChannelEncryptionMode(SslEncryptedValue); - /// NotEncrypted. - public static IntegrationRuntimeInternalChannelEncryptionMode NotEncrypted { get; } = new IntegrationRuntimeInternalChannelEncryptionMode(NotEncryptedValue); - /// Determines if two values are the same. - public static bool operator ==(IntegrationRuntimeInternalChannelEncryptionMode left, IntegrationRuntimeInternalChannelEncryptionMode right) => left.Equals(right); - /// Determines if two values are not the same. - public static bool operator !=(IntegrationRuntimeInternalChannelEncryptionMode left, IntegrationRuntimeInternalChannelEncryptionMode right) => !left.Equals(right); - /// Converts a string to a . - public static implicit operator IntegrationRuntimeInternalChannelEncryptionMode(string value) => new IntegrationRuntimeInternalChannelEncryptionMode(value); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override bool Equals(object obj) => obj is IntegrationRuntimeInternalChannelEncryptionMode other && Equals(other); - /// - public bool Equals(IntegrationRuntimeInternalChannelEncryptionMode other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override int GetHashCode() => _value?.GetHashCode() ?? 0; - /// - public override string ToString() => _value; - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/IntegrationRuntimeLicenseType.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/IntegrationRuntimeLicenseType.cs deleted file mode 100644 index 3e6f5598..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/IntegrationRuntimeLicenseType.cs +++ /dev/null @@ -1,47 +0,0 @@ -// - -#nullable disable - -using System.ComponentModel; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// License type for bringing your own license scenario. - public readonly partial struct IntegrationRuntimeLicenseType : IEquatable - { - private readonly string _value; - - /// Initializes a new instance of . - /// is null. - public IntegrationRuntimeLicenseType(string value) - { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } - - private const string BasePriceValue = "BasePrice"; - private const string LicenseIncludedValue = "LicenseIncluded"; - - /// BasePrice. - public static IntegrationRuntimeLicenseType BasePrice { get; } = new IntegrationRuntimeLicenseType(BasePriceValue); - /// LicenseIncluded. - public static IntegrationRuntimeLicenseType LicenseIncluded { get; } = new IntegrationRuntimeLicenseType(LicenseIncludedValue); - /// Determines if two values are the same. - public static bool operator ==(IntegrationRuntimeLicenseType left, IntegrationRuntimeLicenseType right) => left.Equals(right); - /// Determines if two values are not the same. - public static bool operator !=(IntegrationRuntimeLicenseType left, IntegrationRuntimeLicenseType right) => !left.Equals(right); - /// Converts a string to a . - public static implicit operator IntegrationRuntimeLicenseType(string value) => new IntegrationRuntimeLicenseType(value); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override bool Equals(object obj) => obj is IntegrationRuntimeLicenseType other && Equals(other); - /// - public bool Equals(IntegrationRuntimeLicenseType other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override int GetHashCode() => _value?.GetHashCode() ?? 0; - /// - public override string ToString() => _value; - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/IntegrationRuntimeMonitoringData.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/IntegrationRuntimeMonitoringData.Serialization.cs deleted file mode 100644 index 98d1b06a..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/IntegrationRuntimeMonitoringData.Serialization.cs +++ /dev/null @@ -1,45 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class IntegrationRuntimeMonitoringData - { - internal static IntegrationRuntimeMonitoringData DeserializeIntegrationRuntimeMonitoringData(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - Optional name = default; - Optional> nodes = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("name"u8)) - { - name = property.Value.GetString(); - continue; - } - if (property.NameEquals("nodes"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - array.Add(IntegrationRuntimeNodeMonitoringData.DeserializeIntegrationRuntimeNodeMonitoringData(item)); - } - nodes = array; - continue; - } - } - return new IntegrationRuntimeMonitoringData(name.Value, Optional.ToList(nodes)); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/IntegrationRuntimeMonitoringData.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/IntegrationRuntimeMonitoringData.cs deleted file mode 100644 index 3d1c955c..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/IntegrationRuntimeMonitoringData.cs +++ /dev/null @@ -1,32 +0,0 @@ -// - -#nullable disable - -using Azure.Core; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// Get monitoring data response. - public partial class IntegrationRuntimeMonitoringData - { - /// Initializes a new instance of IntegrationRuntimeMonitoringData. - internal IntegrationRuntimeMonitoringData() - { - Nodes = new ChangeTrackingList(); - } - - /// Initializes a new instance of IntegrationRuntimeMonitoringData. - /// Integration runtime name. - /// Integration runtime node monitoring data. - internal IntegrationRuntimeMonitoringData(string name, IReadOnlyList nodes) - { - Name = name; - Nodes = nodes; - } - - /// Integration runtime name. - public string Name { get; } - /// Integration runtime node monitoring data. - public IReadOnlyList Nodes { get; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/IntegrationRuntimeNodeIPAddress.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/IntegrationRuntimeNodeIPAddress.Serialization.cs deleted file mode 100644 index 515718d2..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/IntegrationRuntimeNodeIPAddress.Serialization.cs +++ /dev/null @@ -1,35 +0,0 @@ -// - -#nullable disable - -using System.Net; -using System.Text.Json; -using Azure.Core; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class IntegrationRuntimeNodeIPAddress - { - internal static IntegrationRuntimeNodeIPAddress DeserializeIntegrationRuntimeNodeIPAddress(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - Optional ipAddress = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("ipAddress"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - ipAddress = IPAddress.Parse(property.Value.GetString()); - continue; - } - } - return new IntegrationRuntimeNodeIPAddress(ipAddress.Value); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/IntegrationRuntimeNodeIPAddress.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/IntegrationRuntimeNodeIPAddress.cs deleted file mode 100644 index e6657273..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/IntegrationRuntimeNodeIPAddress.cs +++ /dev/null @@ -1,27 +0,0 @@ -// - -#nullable disable - -using System.Net; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// The IP address of self-hosted integration runtime node. - public partial class IntegrationRuntimeNodeIPAddress - { - /// Initializes a new instance of IntegrationRuntimeNodeIPAddress. - internal IntegrationRuntimeNodeIPAddress() - { - } - - /// Initializes a new instance of IntegrationRuntimeNodeIPAddress. - /// The IP address of self-hosted integration runtime node. - internal IntegrationRuntimeNodeIPAddress(IPAddress ipAddress) - { - IPAddress = ipAddress; - } - - /// The IP address of self-hosted integration runtime node. - public IPAddress IPAddress { get; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/IntegrationRuntimeNodeMonitoringData.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/IntegrationRuntimeNodeMonitoringData.Serialization.cs deleted file mode 100644 index be75dd57..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/IntegrationRuntimeNodeMonitoringData.Serialization.cs +++ /dev/null @@ -1,105 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class IntegrationRuntimeNodeMonitoringData - { - internal static IntegrationRuntimeNodeMonitoringData DeserializeIntegrationRuntimeNodeMonitoringData(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - Optional nodeName = default; - Optional availableMemoryInMB = default; - Optional cpuUtilization = default; - Optional concurrentJobsLimit = default; - Optional concurrentJobsRunning = default; - Optional maxConcurrentJobs = default; - Optional sentBytes = default; - Optional receivedBytes = default; - IReadOnlyDictionary> additionalProperties = default; - Dictionary> additionalPropertiesDictionary = new Dictionary>(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("nodeName"u8)) - { - nodeName = property.Value.GetString(); - continue; - } - if (property.NameEquals("availableMemoryInMB"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - availableMemoryInMB = property.Value.GetInt32(); - continue; - } - if (property.NameEquals("cpuUtilization"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - cpuUtilization = property.Value.GetInt32(); - continue; - } - if (property.NameEquals("concurrentJobsLimit"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - concurrentJobsLimit = property.Value.GetInt32(); - continue; - } - if (property.NameEquals("concurrentJobsRunning"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - concurrentJobsRunning = property.Value.GetInt32(); - continue; - } - if (property.NameEquals("maxConcurrentJobs"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - maxConcurrentJobs = property.Value.GetInt32(); - continue; - } - if (property.NameEquals("sentBytes"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - sentBytes = property.Value.GetSingle(); - continue; - } - if (property.NameEquals("receivedBytes"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - receivedBytes = property.Value.GetSingle(); - continue; - } - additionalPropertiesDictionary.Add(property.Name, JsonSerializer.Deserialize>(property.Value.GetRawText())); - } - additionalProperties = additionalPropertiesDictionary; - return new IntegrationRuntimeNodeMonitoringData(nodeName.Value, Optional.ToNullable(availableMemoryInMB), Optional.ToNullable(cpuUtilization), Optional.ToNullable(concurrentJobsLimit), Optional.ToNullable(concurrentJobsRunning), Optional.ToNullable(maxConcurrentJobs), Optional.ToNullable(sentBytes), Optional.ToNullable(receivedBytes), additionalProperties); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/IntegrationRuntimeNodeMonitoringData.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/IntegrationRuntimeNodeMonitoringData.cs deleted file mode 100644 index 52ee6c05..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/IntegrationRuntimeNodeMonitoringData.cs +++ /dev/null @@ -1,90 +0,0 @@ -// - -#nullable disable - -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// Monitoring data for integration runtime node. - public partial class IntegrationRuntimeNodeMonitoringData - { - /// Initializes a new instance of IntegrationRuntimeNodeMonitoringData. - internal IntegrationRuntimeNodeMonitoringData() - { - AdditionalProperties = new ChangeTrackingDictionary>(); - } - - /// Initializes a new instance of IntegrationRuntimeNodeMonitoringData. - /// Name of the integration runtime node. - /// Available memory (MB) on the integration runtime node. - /// CPU percentage on the integration runtime node. - /// Maximum concurrent jobs on the integration runtime node. - /// The number of jobs currently running on the integration runtime node. - /// The maximum concurrent jobs in this integration runtime. - /// Sent bytes on the integration runtime node. - /// Received bytes on the integration runtime node. - /// Additional Properties. - internal IntegrationRuntimeNodeMonitoringData(string nodeName, int? availableMemoryInMB, int? cpuUtilization, int? concurrentJobsLimit, int? concurrentJobsRunning, int? maxConcurrentJobs, float? sentBytes, float? receivedBytes, IReadOnlyDictionary> additionalProperties) - { - NodeName = nodeName; - AvailableMemoryInMB = availableMemoryInMB; - CpuUtilization = cpuUtilization; - ConcurrentJobsLimit = concurrentJobsLimit; - ConcurrentJobsRunning = concurrentJobsRunning; - MaxConcurrentJobs = maxConcurrentJobs; - SentBytes = sentBytes; - ReceivedBytes = receivedBytes; - AdditionalProperties = additionalProperties; - } - - /// Name of the integration runtime node. - public string NodeName { get; } - /// Available memory (MB) on the integration runtime node. - public int? AvailableMemoryInMB { get; } - /// CPU percentage on the integration runtime node. - public int? CpuUtilization { get; } - /// Maximum concurrent jobs on the integration runtime node. - public int? ConcurrentJobsLimit { get; } - /// The number of jobs currently running on the integration runtime node. - public int? ConcurrentJobsRunning { get; } - /// The maximum concurrent jobs in this integration runtime. - public int? MaxConcurrentJobs { get; } - /// Sent bytes on the integration runtime node. - public float? SentBytes { get; } - /// Received bytes on the integration runtime node. - public float? ReceivedBytes { get; } - /// - /// Additional Properties - /// - /// To assign an object to the value of this property use . - /// - /// - /// To assign an already formated json string to this property use . - /// - /// - /// Examples: - /// - /// - /// BinaryData.FromObjectAsJson("foo") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromString("\"foo\"") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromObjectAsJson(new { key = "value" }) - /// Creates a payload of { "key": "value" }. - /// - /// - /// BinaryData.FromString("{\"key\": \"value\"}") - /// Creates a payload of { "key": "value" }. - /// - /// - /// - /// - public IReadOnlyDictionary> AdditionalProperties { get; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/IntegrationRuntimeOutboundNetworkDependenciesCategoryEndpoint.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/IntegrationRuntimeOutboundNetworkDependenciesCategoryEndpoint.Serialization.cs deleted file mode 100644 index 536c521f..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/IntegrationRuntimeOutboundNetworkDependenciesCategoryEndpoint.Serialization.cs +++ /dev/null @@ -1,45 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class IntegrationRuntimeOutboundNetworkDependenciesCategoryEndpoint - { - internal static IntegrationRuntimeOutboundNetworkDependenciesCategoryEndpoint DeserializeIntegrationRuntimeOutboundNetworkDependenciesCategoryEndpoint(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - Optional category = default; - Optional> endpoints = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("category"u8)) - { - category = property.Value.GetString(); - continue; - } - if (property.NameEquals("endpoints"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - array.Add(IntegrationRuntimeOutboundNetworkDependenciesEndpoint.DeserializeIntegrationRuntimeOutboundNetworkDependenciesEndpoint(item)); - } - endpoints = array; - continue; - } - } - return new IntegrationRuntimeOutboundNetworkDependenciesCategoryEndpoint(category.Value, Optional.ToList(endpoints)); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/IntegrationRuntimeOutboundNetworkDependenciesCategoryEndpoint.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/IntegrationRuntimeOutboundNetworkDependenciesCategoryEndpoint.cs deleted file mode 100644 index b1349bd6..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/IntegrationRuntimeOutboundNetworkDependenciesCategoryEndpoint.cs +++ /dev/null @@ -1,32 +0,0 @@ -// - -#nullable disable - -using Azure.Core; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// Azure-SSIS integration runtime outbound network dependency endpoints for one category. - public partial class IntegrationRuntimeOutboundNetworkDependenciesCategoryEndpoint - { - /// Initializes a new instance of IntegrationRuntimeOutboundNetworkDependenciesCategoryEndpoint. - internal IntegrationRuntimeOutboundNetworkDependenciesCategoryEndpoint() - { - Endpoints = new ChangeTrackingList(); - } - - /// Initializes a new instance of IntegrationRuntimeOutboundNetworkDependenciesCategoryEndpoint. - /// The category of outbound network dependency. - /// The endpoints for outbound network dependency. - internal IntegrationRuntimeOutboundNetworkDependenciesCategoryEndpoint(string category, IReadOnlyList endpoints) - { - Category = category; - Endpoints = endpoints; - } - - /// The category of outbound network dependency. - public string Category { get; } - /// The endpoints for outbound network dependency. - public IReadOnlyList Endpoints { get; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/IntegrationRuntimeOutboundNetworkDependenciesEndpoint.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/IntegrationRuntimeOutboundNetworkDependenciesEndpoint.Serialization.cs deleted file mode 100644 index 9c782d91..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/IntegrationRuntimeOutboundNetworkDependenciesEndpoint.Serialization.cs +++ /dev/null @@ -1,45 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class IntegrationRuntimeOutboundNetworkDependenciesEndpoint - { - internal static IntegrationRuntimeOutboundNetworkDependenciesEndpoint DeserializeIntegrationRuntimeOutboundNetworkDependenciesEndpoint(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - Optional domainName = default; - Optional> endpointDetails = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("domainName"u8)) - { - domainName = property.Value.GetString(); - continue; - } - if (property.NameEquals("endpointDetails"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - array.Add(IntegrationRuntimeOutboundNetworkDependenciesEndpointDetails.DeserializeIntegrationRuntimeOutboundNetworkDependenciesEndpointDetails(item)); - } - endpointDetails = array; - continue; - } - } - return new IntegrationRuntimeOutboundNetworkDependenciesEndpoint(domainName.Value, Optional.ToList(endpointDetails)); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/IntegrationRuntimeOutboundNetworkDependenciesEndpoint.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/IntegrationRuntimeOutboundNetworkDependenciesEndpoint.cs deleted file mode 100644 index 22c1784d..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/IntegrationRuntimeOutboundNetworkDependenciesEndpoint.cs +++ /dev/null @@ -1,32 +0,0 @@ -// - -#nullable disable - -using Azure.Core; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// The endpoint for Azure-SSIS integration runtime outbound network dependency. - public partial class IntegrationRuntimeOutboundNetworkDependenciesEndpoint - { - /// Initializes a new instance of IntegrationRuntimeOutboundNetworkDependenciesEndpoint. - internal IntegrationRuntimeOutboundNetworkDependenciesEndpoint() - { - EndpointDetails = new ChangeTrackingList(); - } - - /// Initializes a new instance of IntegrationRuntimeOutboundNetworkDependenciesEndpoint. - /// The domain name of endpoint. - /// The details of endpoint. - internal IntegrationRuntimeOutboundNetworkDependenciesEndpoint(string domainName, IReadOnlyList endpointDetails) - { - DomainName = domainName; - EndpointDetails = endpointDetails; - } - - /// The domain name of endpoint. - public string DomainName { get; } - /// The details of endpoint. - public IReadOnlyList EndpointDetails { get; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/IntegrationRuntimeOutboundNetworkDependenciesEndpointDetails.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/IntegrationRuntimeOutboundNetworkDependenciesEndpointDetails.Serialization.cs deleted file mode 100644 index 71402ee5..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/IntegrationRuntimeOutboundNetworkDependenciesEndpointDetails.Serialization.cs +++ /dev/null @@ -1,34 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class IntegrationRuntimeOutboundNetworkDependenciesEndpointDetails - { - internal static IntegrationRuntimeOutboundNetworkDependenciesEndpointDetails DeserializeIntegrationRuntimeOutboundNetworkDependenciesEndpointDetails(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - Optional port = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("port"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - port = property.Value.GetInt32(); - continue; - } - } - return new IntegrationRuntimeOutboundNetworkDependenciesEndpointDetails(Optional.ToNullable(port)); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/IntegrationRuntimeOutboundNetworkDependenciesEndpointDetails.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/IntegrationRuntimeOutboundNetworkDependenciesEndpointDetails.cs deleted file mode 100644 index c29d48ac..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/IntegrationRuntimeOutboundNetworkDependenciesEndpointDetails.cs +++ /dev/null @@ -1,25 +0,0 @@ -// - -#nullable disable - -namespace AzureDataFactory.TestingFramework.Models -{ - /// The details of Azure-SSIS integration runtime outbound network dependency endpoint. - public partial class IntegrationRuntimeOutboundNetworkDependenciesEndpointDetails - { - /// Initializes a new instance of IntegrationRuntimeOutboundNetworkDependenciesEndpointDetails. - internal IntegrationRuntimeOutboundNetworkDependenciesEndpointDetails() - { - } - - /// Initializes a new instance of IntegrationRuntimeOutboundNetworkDependenciesEndpointDetails. - /// The port of endpoint. - internal IntegrationRuntimeOutboundNetworkDependenciesEndpointDetails(int? port) - { - Port = port; - } - - /// The port of endpoint. - public int? Port { get; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/IntegrationRuntimeOutboundNetworkDependenciesResult.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/IntegrationRuntimeOutboundNetworkDependenciesResult.Serialization.cs deleted file mode 100644 index 187e5c26..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/IntegrationRuntimeOutboundNetworkDependenciesResult.Serialization.cs +++ /dev/null @@ -1,39 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; - -namespace AzureDataFactory.TestingFramework.Models -{ - internal partial class IntegrationRuntimeOutboundNetworkDependenciesResult - { - internal static IntegrationRuntimeOutboundNetworkDependenciesResult DeserializeIntegrationRuntimeOutboundNetworkDependenciesResult(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - Optional> value = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("value"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - array.Add(IntegrationRuntimeOutboundNetworkDependenciesCategoryEndpoint.DeserializeIntegrationRuntimeOutboundNetworkDependenciesCategoryEndpoint(item)); - } - value = array; - continue; - } - } - return new IntegrationRuntimeOutboundNetworkDependenciesResult(Optional.ToList(value)); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/IntegrationRuntimeOutboundNetworkDependenciesResult.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/IntegrationRuntimeOutboundNetworkDependenciesResult.cs deleted file mode 100644 index c55fe47a..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/IntegrationRuntimeOutboundNetworkDependenciesResult.cs +++ /dev/null @@ -1,28 +0,0 @@ -// - -#nullable disable - -using Azure.Core; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// Azure-SSIS integration runtime outbound network dependency endpoints. - internal partial class IntegrationRuntimeOutboundNetworkDependenciesResult - { - /// Initializes a new instance of IntegrationRuntimeOutboundNetworkDependenciesResult. - internal IntegrationRuntimeOutboundNetworkDependenciesResult() - { - Value = new ChangeTrackingList(); - } - - /// Initializes a new instance of IntegrationRuntimeOutboundNetworkDependenciesResult. - /// The list of outbound network dependency endpoints. - internal IntegrationRuntimeOutboundNetworkDependenciesResult(IReadOnlyList value) - { - Value = value; - } - - /// The list of outbound network dependency endpoints. - public IReadOnlyList Value { get; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/IntegrationRuntimeReference.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/IntegrationRuntimeReference.Serialization.cs deleted file mode 100644 index 354b8e4b..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/IntegrationRuntimeReference.Serialization.cs +++ /dev/null @@ -1,89 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class IntegrationRuntimeReference : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ReferenceType.ToString()); - writer.WritePropertyName("referenceName"u8); - writer.WriteStringValue(ReferenceName); - if (Optional.IsCollectionDefined(Parameters)) - { - writer.WritePropertyName("parameters"u8); - writer.WriteStartObject(); - foreach (var item in Parameters) - { - writer.WritePropertyName(item.Key); - if (item.Value == null) - { - writer.WriteNullValue(); - continue; - } -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.Value.ToString()).RootElement); -#endif - } - writer.WriteEndObject(); - } - writer.WriteEndObject(); - } - - internal static IntegrationRuntimeReference DeserializeIntegrationRuntimeReference(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - IntegrationRuntimeReferenceType type = default; - string referenceName = default; - Optional>> parameters = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("type"u8)) - { - type = new IntegrationRuntimeReferenceType(property.Value.GetString()); - continue; - } - if (property.NameEquals("referenceName"u8)) - { - referenceName = property.Value.GetString(); - continue; - } - if (property.NameEquals("parameters"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - Dictionary> dictionary = new Dictionary>(); - foreach (var property0 in property.Value.EnumerateObject()) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - dictionary.Add(property0.Name, null); - } - else - { - dictionary.Add(property0.Name, JsonSerializer.Deserialize>(property0.Value.GetRawText())); - } - } - parameters = dictionary; - continue; - } - } - return new IntegrationRuntimeReference(type, referenceName, Optional.ToDictionary(parameters)); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/IntegrationRuntimeReference.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/IntegrationRuntimeReference.cs deleted file mode 100644 index 69365c88..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/IntegrationRuntimeReference.cs +++ /dev/null @@ -1,73 +0,0 @@ -// - -#nullable disable - -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// Integration runtime reference type. - public partial class IntegrationRuntimeReference - { - /// Initializes a new instance of IntegrationRuntimeReference. - /// Type of integration runtime. - /// Reference integration runtime name. - /// is null. - public IntegrationRuntimeReference(IntegrationRuntimeReferenceType referenceType, string referenceName) - { - Argument.AssertNotNull(referenceName, nameof(referenceName)); - - ReferenceType = referenceType; - ReferenceName = referenceName; - Parameters = new ChangeTrackingDictionary>(); - } - - /// Initializes a new instance of IntegrationRuntimeReference. - /// Type of integration runtime. - /// Reference integration runtime name. - /// Arguments for integration runtime. - internal IntegrationRuntimeReference(IntegrationRuntimeReferenceType referenceType, string referenceName, IDictionary> parameters) - { - ReferenceType = referenceType; - ReferenceName = referenceName; - Parameters = parameters; - } - - /// Type of integration runtime. - public IntegrationRuntimeReferenceType ReferenceType { get; set; } - /// Reference integration runtime name. - public string ReferenceName { get; set; } - /// - /// Arguments for integration runtime. - /// - /// To assign an object to the value of this property use . - /// - /// - /// To assign an already formated json string to this property use . - /// - /// - /// Examples: - /// - /// - /// BinaryData.FromObjectAsJson("foo") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromString("\"foo\"") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromObjectAsJson(new { key = "value" }) - /// Creates a payload of { "key": "value" }. - /// - /// - /// BinaryData.FromString("{\"key\": \"value\"}") - /// Creates a payload of { "key": "value" }. - /// - /// - /// - /// - public IDictionary> Parameters { get; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/IntegrationRuntimeReferenceType.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/IntegrationRuntimeReferenceType.cs deleted file mode 100644 index e6f592bc..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/IntegrationRuntimeReferenceType.cs +++ /dev/null @@ -1,44 +0,0 @@ -// - -#nullable disable - -using System.ComponentModel; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// Type of integration runtime. - public readonly partial struct IntegrationRuntimeReferenceType : IEquatable - { - private readonly string _value; - - /// Initializes a new instance of . - /// is null. - public IntegrationRuntimeReferenceType(string value) - { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } - - private const string IntegrationRuntimeReferenceValue = "IntegrationRuntimeReference"; - - /// IntegrationRuntimeReference. - public static IntegrationRuntimeReferenceType IntegrationRuntimeReference { get; } = new IntegrationRuntimeReferenceType(IntegrationRuntimeReferenceValue); - /// Determines if two values are the same. - public static bool operator ==(IntegrationRuntimeReferenceType left, IntegrationRuntimeReferenceType right) => left.Equals(right); - /// Determines if two values are not the same. - public static bool operator !=(IntegrationRuntimeReferenceType left, IntegrationRuntimeReferenceType right) => !left.Equals(right); - /// Converts a string to a . - public static implicit operator IntegrationRuntimeReferenceType(string value) => new IntegrationRuntimeReferenceType(value); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override bool Equals(object obj) => obj is IntegrationRuntimeReferenceType other && Equals(other); - /// - public bool Equals(IntegrationRuntimeReferenceType other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override int GetHashCode() => _value?.GetHashCode() ?? 0; - /// - public override string ToString() => _value; - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/IntegrationRuntimeRegenerateKeyContent.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/IntegrationRuntimeRegenerateKeyContent.Serialization.cs deleted file mode 100644 index 64322138..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/IntegrationRuntimeRegenerateKeyContent.Serialization.cs +++ /dev/null @@ -1,23 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class IntegrationRuntimeRegenerateKeyContent : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - if (Optional.IsDefined(KeyName)) - { - writer.WritePropertyName("keyName"u8); - writer.WriteStringValue(KeyName.Value.ToString()); - } - writer.WriteEndObject(); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/IntegrationRuntimeRegenerateKeyContent.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/IntegrationRuntimeRegenerateKeyContent.cs deleted file mode 100644 index 07d031b4..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/IntegrationRuntimeRegenerateKeyContent.cs +++ /dev/null @@ -1,18 +0,0 @@ -// - -#nullable disable - -namespace AzureDataFactory.TestingFramework.Models -{ - /// Parameters to regenerate the authentication key. - public partial class IntegrationRuntimeRegenerateKeyContent - { - /// Initializes a new instance of IntegrationRuntimeRegenerateKeyContent. - public IntegrationRuntimeRegenerateKeyContent() - { - } - - /// The name of the authentication key to regenerate. - public IntegrationRuntimeAuthKeyName? KeyName { get; set; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/IntegrationRuntimeSsisCatalogInfo.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/IntegrationRuntimeSsisCatalogInfo.Serialization.cs deleted file mode 100644 index ee73eb16..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/IntegrationRuntimeSsisCatalogInfo.Serialization.cs +++ /dev/null @@ -1,107 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class IntegrationRuntimeSsisCatalogInfo : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - if (Optional.IsDefined(CatalogServerEndpoint)) - { - writer.WritePropertyName("catalogServerEndpoint"u8); - writer.WriteStringValue(CatalogServerEndpoint); - } - if (Optional.IsDefined(CatalogAdminUserName)) - { - writer.WritePropertyName("catalogAdminUserName"u8); - writer.WriteStringValue(CatalogAdminUserName); - } - if (Optional.IsDefined(CatalogAdminPassword)) - { - writer.WritePropertyName("catalogAdminPassword"u8); - JsonSerializer.Serialize(writer, CatalogAdminPassword); - } - if (Optional.IsDefined(CatalogPricingTier)) - { - writer.WritePropertyName("catalogPricingTier"u8); - writer.WriteStringValue(CatalogPricingTier.Value.ToString()); - } - if (Optional.IsDefined(DualStandbyPairName)) - { - writer.WritePropertyName("dualStandbyPairName"u8); - writer.WriteStringValue(DualStandbyPairName); - } - foreach (var item in AdditionalProperties) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.Value.ToString()).RootElement); -#endif - } - writer.WriteEndObject(); - } - - internal static IntegrationRuntimeSsisCatalogInfo DeserializeIntegrationRuntimeSsisCatalogInfo(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - Optional catalogServerEndpoint = default; - Optional catalogAdminUserName = default; - Optional catalogAdminPassword = default; - Optional catalogPricingTier = default; - Optional dualStandbyPairName = default; - IDictionary> additionalProperties = default; - Dictionary> additionalPropertiesDictionary = new Dictionary>(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("catalogServerEndpoint"u8)) - { - catalogServerEndpoint = property.Value.GetString(); - continue; - } - if (property.NameEquals("catalogAdminUserName"u8)) - { - catalogAdminUserName = property.Value.GetString(); - continue; - } - if (property.NameEquals("catalogAdminPassword"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - catalogAdminPassword = JsonSerializer.Deserialize(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("catalogPricingTier"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - catalogPricingTier = new IntegrationRuntimeSsisCatalogPricingTier(property.Value.GetString()); - continue; - } - if (property.NameEquals("dualStandbyPairName"u8)) - { - dualStandbyPairName = property.Value.GetString(); - continue; - } - additionalPropertiesDictionary.Add(property.Name, JsonSerializer.Deserialize>(property.Value.GetRawText())); - } - additionalProperties = additionalPropertiesDictionary; - return new IntegrationRuntimeSsisCatalogInfo(catalogServerEndpoint.Value, catalogAdminUserName.Value, catalogAdminPassword, Optional.ToNullable(catalogPricingTier), dualStandbyPairName.Value, additionalProperties); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/IntegrationRuntimeSsisCatalogInfo.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/IntegrationRuntimeSsisCatalogInfo.cs deleted file mode 100644 index 57106d92..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/IntegrationRuntimeSsisCatalogInfo.cs +++ /dev/null @@ -1,78 +0,0 @@ -// - -#nullable disable - -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// Catalog information for managed dedicated integration runtime. - public partial class IntegrationRuntimeSsisCatalogInfo - { - /// Initializes a new instance of IntegrationRuntimeSsisCatalogInfo. - public IntegrationRuntimeSsisCatalogInfo() - { - AdditionalProperties = new ChangeTrackingDictionary>(); - } - - /// Initializes a new instance of IntegrationRuntimeSsisCatalogInfo. - /// The catalog database server URL. - /// The administrator user name of catalog database. - /// The password of the administrator user account of the catalog database. - /// The pricing tier for the catalog database. The valid values could be found in https://azure.microsoft.com/en-us/pricing/details/sql-database/. - /// The dual standby pair name of Azure-SSIS Integration Runtimes to support SSISDB failover. - /// Additional Properties. - internal IntegrationRuntimeSsisCatalogInfo(string catalogServerEndpoint, string catalogAdminUserName, DataFactorySecretString catalogAdminPassword, IntegrationRuntimeSsisCatalogPricingTier? catalogPricingTier, string dualStandbyPairName, IDictionary> additionalProperties) - { - CatalogServerEndpoint = catalogServerEndpoint; - CatalogAdminUserName = catalogAdminUserName; - CatalogAdminPassword = catalogAdminPassword; - CatalogPricingTier = catalogPricingTier; - DualStandbyPairName = dualStandbyPairName; - AdditionalProperties = additionalProperties; - } - - /// The catalog database server URL. - public string CatalogServerEndpoint { get; set; } - /// The administrator user name of catalog database. - public string CatalogAdminUserName { get; set; } - /// The password of the administrator user account of the catalog database. - public DataFactorySecretString CatalogAdminPassword { get; set; } - /// The pricing tier for the catalog database. The valid values could be found in https://azure.microsoft.com/en-us/pricing/details/sql-database/. - public IntegrationRuntimeSsisCatalogPricingTier? CatalogPricingTier { get; set; } - /// The dual standby pair name of Azure-SSIS Integration Runtimes to support SSISDB failover. - public string DualStandbyPairName { get; set; } - /// - /// Additional Properties - /// - /// To assign an object to the value of this property use . - /// - /// - /// To assign an already formated json string to this property use . - /// - /// - /// Examples: - /// - /// - /// BinaryData.FromObjectAsJson("foo") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromString("\"foo\"") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromObjectAsJson(new { key = "value" }) - /// Creates a payload of { "key": "value" }. - /// - /// - /// BinaryData.FromString("{\"key\": \"value\"}") - /// Creates a payload of { "key": "value" }. - /// - /// - /// - /// - public IDictionary> AdditionalProperties { get; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/IntegrationRuntimeSsisCatalogPricingTier.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/IntegrationRuntimeSsisCatalogPricingTier.cs deleted file mode 100644 index 07fd42b6..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/IntegrationRuntimeSsisCatalogPricingTier.cs +++ /dev/null @@ -1,53 +0,0 @@ -// - -#nullable disable - -using System.ComponentModel; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// The pricing tier for the catalog database. The valid values could be found in https://azure.microsoft.com/en-us/pricing/details/sql-database/. - public readonly partial struct IntegrationRuntimeSsisCatalogPricingTier : IEquatable - { - private readonly string _value; - - /// Initializes a new instance of . - /// is null. - public IntegrationRuntimeSsisCatalogPricingTier(string value) - { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } - - private const string BasicValue = "Basic"; - private const string StandardValue = "Standard"; - private const string PremiumValue = "Premium"; - private const string PremiumRSValue = "PremiumRS"; - - /// Basic. - public static IntegrationRuntimeSsisCatalogPricingTier Basic { get; } = new IntegrationRuntimeSsisCatalogPricingTier(BasicValue); - /// Standard. - public static IntegrationRuntimeSsisCatalogPricingTier Standard { get; } = new IntegrationRuntimeSsisCatalogPricingTier(StandardValue); - /// Premium. - public static IntegrationRuntimeSsisCatalogPricingTier Premium { get; } = new IntegrationRuntimeSsisCatalogPricingTier(PremiumValue); - /// PremiumRS. - public static IntegrationRuntimeSsisCatalogPricingTier PremiumRS { get; } = new IntegrationRuntimeSsisCatalogPricingTier(PremiumRSValue); - /// Determines if two values are the same. - public static bool operator ==(IntegrationRuntimeSsisCatalogPricingTier left, IntegrationRuntimeSsisCatalogPricingTier right) => left.Equals(right); - /// Determines if two values are not the same. - public static bool operator !=(IntegrationRuntimeSsisCatalogPricingTier left, IntegrationRuntimeSsisCatalogPricingTier right) => !left.Equals(right); - /// Converts a string to a . - public static implicit operator IntegrationRuntimeSsisCatalogPricingTier(string value) => new IntegrationRuntimeSsisCatalogPricingTier(value); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override bool Equals(object obj) => obj is IntegrationRuntimeSsisCatalogPricingTier other && Equals(other); - /// - public bool Equals(IntegrationRuntimeSsisCatalogPricingTier other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override int GetHashCode() => _value?.GetHashCode() ?? 0; - /// - public override string ToString() => _value; - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/IntegrationRuntimeSsisProperties.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/IntegrationRuntimeSsisProperties.Serialization.cs deleted file mode 100644 index ed279ea1..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/IntegrationRuntimeSsisProperties.Serialization.cs +++ /dev/null @@ -1,184 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class IntegrationRuntimeSsisProperties : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - if (Optional.IsDefined(CatalogInfo)) - { - writer.WritePropertyName("catalogInfo"u8); - writer.WriteObjectValue(CatalogInfo); - } - if (Optional.IsDefined(LicenseType)) - { - writer.WritePropertyName("licenseType"u8); - writer.WriteStringValue(LicenseType.Value.ToString()); - } - if (Optional.IsDefined(CustomSetupScriptProperties)) - { - writer.WritePropertyName("customSetupScriptProperties"u8); - writer.WriteObjectValue(CustomSetupScriptProperties); - } - if (Optional.IsDefined(DataProxyProperties)) - { - writer.WritePropertyName("dataProxyProperties"u8); - writer.WriteObjectValue(DataProxyProperties); - } - if (Optional.IsDefined(Edition)) - { - writer.WritePropertyName("edition"u8); - writer.WriteStringValue(Edition.Value.ToString()); - } - if (Optional.IsCollectionDefined(ExpressCustomSetupProperties)) - { - writer.WritePropertyName("expressCustomSetupProperties"u8); - writer.WriteStartArray(); - foreach (var item in ExpressCustomSetupProperties) - { - writer.WriteObjectValue(item); - } - writer.WriteEndArray(); - } - if (Optional.IsCollectionDefined(PackageStores)) - { - writer.WritePropertyName("packageStores"u8); - writer.WriteStartArray(); - foreach (var item in PackageStores) - { - writer.WriteObjectValue(item); - } - writer.WriteEndArray(); - } - if (Optional.IsDefined(Credential)) - { - writer.WritePropertyName("credential"u8); - writer.WriteObjectValue(Credential); - } - foreach (var item in AdditionalProperties) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.Value.ToString()).RootElement); -#endif - } - writer.WriteEndObject(); - } - - internal static IntegrationRuntimeSsisProperties DeserializeIntegrationRuntimeSsisProperties(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - Optional catalogInfo = default; - Optional licenseType = default; - Optional customSetupScriptProperties = default; - Optional dataProxyProperties = default; - Optional edition = default; - Optional> expressCustomSetupProperties = default; - Optional> packageStores = default; - Optional credential = default; - IDictionary> additionalProperties = default; - Dictionary> additionalPropertiesDictionary = new Dictionary>(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("catalogInfo"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - catalogInfo = IntegrationRuntimeSsisCatalogInfo.DeserializeIntegrationRuntimeSsisCatalogInfo(property.Value); - continue; - } - if (property.NameEquals("licenseType"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - licenseType = new IntegrationRuntimeLicenseType(property.Value.GetString()); - continue; - } - if (property.NameEquals("customSetupScriptProperties"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - customSetupScriptProperties = IntegrationRuntimeCustomSetupScriptProperties.DeserializeIntegrationRuntimeCustomSetupScriptProperties(property.Value); - continue; - } - if (property.NameEquals("dataProxyProperties"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - dataProxyProperties = IntegrationRuntimeDataProxyProperties.DeserializeIntegrationRuntimeDataProxyProperties(property.Value); - continue; - } - if (property.NameEquals("edition"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - edition = new IntegrationRuntimeEdition(property.Value.GetString()); - continue; - } - if (property.NameEquals("expressCustomSetupProperties"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - array.Add(CustomSetupBase.DeserializeCustomSetupBase(item)); - } - expressCustomSetupProperties = array; - continue; - } - if (property.NameEquals("packageStores"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - array.Add(DataFactoryPackageStore.DeserializeDataFactoryPackageStore(item)); - } - packageStores = array; - continue; - } - if (property.NameEquals("credential"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - credential = DataFactoryCredentialReference.DeserializeDataFactoryCredentialReference(property.Value); - continue; - } - additionalPropertiesDictionary.Add(property.Name, JsonSerializer.Deserialize>(property.Value.GetRawText())); - } - additionalProperties = additionalPropertiesDictionary; - return new IntegrationRuntimeSsisProperties(catalogInfo.Value, Optional.ToNullable(licenseType), customSetupScriptProperties.Value, dataProxyProperties.Value, Optional.ToNullable(edition), Optional.ToList(expressCustomSetupProperties), Optional.ToList(packageStores), credential.Value, additionalProperties); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/IntegrationRuntimeSsisProperties.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/IntegrationRuntimeSsisProperties.cs deleted file mode 100644 index fbd9c2a4..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/IntegrationRuntimeSsisProperties.cs +++ /dev/null @@ -1,100 +0,0 @@ -// - -#nullable disable - -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// SSIS properties for managed integration runtime. - public partial class IntegrationRuntimeSsisProperties - { - /// Initializes a new instance of IntegrationRuntimeSsisProperties. - public IntegrationRuntimeSsisProperties() - { - ExpressCustomSetupProperties = new ChangeTrackingList(); - PackageStores = new ChangeTrackingList(); - AdditionalProperties = new ChangeTrackingDictionary>(); - } - - /// Initializes a new instance of IntegrationRuntimeSsisProperties. - /// Catalog information for managed dedicated integration runtime. - /// License type for bringing your own license scenario. - /// Custom setup script properties for a managed dedicated integration runtime. - /// Data proxy properties for a managed dedicated integration runtime. - /// The edition for the SSIS Integration Runtime. - /// - /// Custom setup without script properties for a SSIS integration runtime. - /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. - /// The available derived classes include , , and . - /// - /// Package stores for the SSIS Integration Runtime. - /// The credential reference containing authentication information. - /// Additional Properties. - internal IntegrationRuntimeSsisProperties(IntegrationRuntimeSsisCatalogInfo catalogInfo, IntegrationRuntimeLicenseType? licenseType, IntegrationRuntimeCustomSetupScriptProperties customSetupScriptProperties, IntegrationRuntimeDataProxyProperties dataProxyProperties, IntegrationRuntimeEdition? edition, IList expressCustomSetupProperties, IList packageStores, DataFactoryCredentialReference credential, IDictionary> additionalProperties) - { - CatalogInfo = catalogInfo; - LicenseType = licenseType; - CustomSetupScriptProperties = customSetupScriptProperties; - DataProxyProperties = dataProxyProperties; - Edition = edition; - ExpressCustomSetupProperties = expressCustomSetupProperties; - PackageStores = packageStores; - Credential = credential; - AdditionalProperties = additionalProperties; - } - - /// Catalog information for managed dedicated integration runtime. - public IntegrationRuntimeSsisCatalogInfo CatalogInfo { get; set; } - /// License type for bringing your own license scenario. - public IntegrationRuntimeLicenseType? LicenseType { get; set; } - /// Custom setup script properties for a managed dedicated integration runtime. - public IntegrationRuntimeCustomSetupScriptProperties CustomSetupScriptProperties { get; set; } - /// Data proxy properties for a managed dedicated integration runtime. - public IntegrationRuntimeDataProxyProperties DataProxyProperties { get; set; } - /// The edition for the SSIS Integration Runtime. - public IntegrationRuntimeEdition? Edition { get; set; } - /// - /// Custom setup without script properties for a SSIS integration runtime. - /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. - /// The available derived classes include , , and . - /// - public IList ExpressCustomSetupProperties { get; } - /// Package stores for the SSIS Integration Runtime. - public IList PackageStores { get; } - /// The credential reference containing authentication information. - public DataFactoryCredentialReference Credential { get; set; } - /// - /// Additional Properties - /// - /// To assign an object to the value of this property use . - /// - /// - /// To assign an already formated json string to this property use . - /// - /// - /// Examples: - /// - /// - /// BinaryData.FromObjectAsJson("foo") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromString("\"foo\"") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromObjectAsJson(new { key = "value" }) - /// Creates a payload of { "key": "value" }. - /// - /// - /// BinaryData.FromString("{\"key\": \"value\"}") - /// Creates a payload of { "key": "value" }. - /// - /// - /// - /// - public IDictionary> AdditionalProperties { get; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/IntegrationRuntimeState.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/IntegrationRuntimeState.cs deleted file mode 100644 index c8e7c777..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/IntegrationRuntimeState.cs +++ /dev/null @@ -1,71 +0,0 @@ -// - -#nullable disable - -using System.ComponentModel; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// The state of integration runtime. - public readonly partial struct IntegrationRuntimeState : IEquatable - { - private readonly string _value; - - /// Initializes a new instance of . - /// is null. - public IntegrationRuntimeState(string value) - { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } - - private const string InitialValue = "Initial"; - private const string StoppedValue = "Stopped"; - private const string StartedValue = "Started"; - private const string StartingValue = "Starting"; - private const string StoppingValue = "Stopping"; - private const string NeedRegistrationValue = "NeedRegistration"; - private const string OnlineValue = "Online"; - private const string LimitedValue = "Limited"; - private const string OfflineValue = "Offline"; - private const string AccessDeniedValue = "AccessDenied"; - - /// Initial. - public static IntegrationRuntimeState Initial { get; } = new IntegrationRuntimeState(InitialValue); - /// Stopped. - public static IntegrationRuntimeState Stopped { get; } = new IntegrationRuntimeState(StoppedValue); - /// Started. - public static IntegrationRuntimeState Started { get; } = new IntegrationRuntimeState(StartedValue); - /// Starting. - public static IntegrationRuntimeState Starting { get; } = new IntegrationRuntimeState(StartingValue); - /// Stopping. - public static IntegrationRuntimeState Stopping { get; } = new IntegrationRuntimeState(StoppingValue); - /// NeedRegistration. - public static IntegrationRuntimeState NeedRegistration { get; } = new IntegrationRuntimeState(NeedRegistrationValue); - /// Online. - public static IntegrationRuntimeState Online { get; } = new IntegrationRuntimeState(OnlineValue); - /// Limited. - public static IntegrationRuntimeState Limited { get; } = new IntegrationRuntimeState(LimitedValue); - /// Offline. - public static IntegrationRuntimeState Offline { get; } = new IntegrationRuntimeState(OfflineValue); - /// AccessDenied. - public static IntegrationRuntimeState AccessDenied { get; } = new IntegrationRuntimeState(AccessDeniedValue); - /// Determines if two values are the same. - public static bool operator ==(IntegrationRuntimeState left, IntegrationRuntimeState right) => left.Equals(right); - /// Determines if two values are not the same. - public static bool operator !=(IntegrationRuntimeState left, IntegrationRuntimeState right) => !left.Equals(right); - /// Converts a string to a . - public static implicit operator IntegrationRuntimeState(string value) => new IntegrationRuntimeState(value); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override bool Equals(object obj) => obj is IntegrationRuntimeState other && Equals(other); - /// - public bool Equals(IntegrationRuntimeState other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override int GetHashCode() => _value?.GetHashCode() ?? 0; - /// - public override string ToString() => _value; - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/IntegrationRuntimeStatus.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/IntegrationRuntimeStatus.Serialization.cs deleted file mode 100644 index 68af6a53..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/IntegrationRuntimeStatus.Serialization.cs +++ /dev/null @@ -1,28 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class IntegrationRuntimeStatus - { - internal static IntegrationRuntimeStatus DeserializeIntegrationRuntimeStatus(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - if (element.TryGetProperty("type", out JsonElement discriminator)) - { - switch (discriminator.GetString()) - { - case "Managed": return ManagedIntegrationRuntimeStatus.DeserializeManagedIntegrationRuntimeStatus(element); - case "SelfHosted": return SelfHostedIntegrationRuntimeStatus.DeserializeSelfHostedIntegrationRuntimeStatus(element); - } - } - return UnknownIntegrationRuntimeStatus.DeserializeUnknownIntegrationRuntimeStatus(element); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/IntegrationRuntimeStatus.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/IntegrationRuntimeStatus.cs deleted file mode 100644 index 5de32aab..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/IntegrationRuntimeStatus.cs +++ /dev/null @@ -1,74 +0,0 @@ -// - -#nullable disable - -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// - /// Integration runtime status. - /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. - /// The available derived classes include and . - /// - public partial class IntegrationRuntimeStatus - { - /// Initializes a new instance of IntegrationRuntimeStatus. - internal IntegrationRuntimeStatus() - { - AdditionalProperties = new ChangeTrackingDictionary>(); - } - - /// Initializes a new instance of IntegrationRuntimeStatus. - /// Type of integration runtime. - /// The data factory name which the integration runtime belong to. - /// The state of integration runtime. - /// Additional Properties. - internal IntegrationRuntimeStatus(IntegrationRuntimeType runtimeType, string dataFactoryName, IntegrationRuntimeState? state, IReadOnlyDictionary> additionalProperties) - { - RuntimeType = runtimeType; - DataFactoryName = dataFactoryName; - State = state; - AdditionalProperties = additionalProperties; - } - - /// Type of integration runtime. - internal IntegrationRuntimeType RuntimeType { get; set; } - /// The data factory name which the integration runtime belong to. - public string DataFactoryName { get; } - /// The state of integration runtime. - public IntegrationRuntimeState? State { get; } - /// - /// Additional Properties - /// - /// To assign an object to the value of this property use . - /// - /// - /// To assign an already formated json string to this property use . - /// - /// - /// Examples: - /// - /// - /// BinaryData.FromObjectAsJson("foo") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromString("\"foo\"") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromObjectAsJson(new { key = "value" }) - /// Creates a payload of { "key": "value" }. - /// - /// - /// BinaryData.FromString("{\"key\": \"value\"}") - /// Creates a payload of { "key": "value" }. - /// - /// - /// - /// - public IReadOnlyDictionary> AdditionalProperties { get; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/IntegrationRuntimeType.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/IntegrationRuntimeType.cs deleted file mode 100644 index 421d428f..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/IntegrationRuntimeType.cs +++ /dev/null @@ -1,47 +0,0 @@ -// - -#nullable disable - -using System.ComponentModel; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// The type of integration runtime. - internal readonly partial struct IntegrationRuntimeType : IEquatable - { - private readonly string _value; - - /// Initializes a new instance of . - /// is null. - public IntegrationRuntimeType(string value) - { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } - - private const string ManagedValue = "Managed"; - private const string SelfHostedValue = "SelfHosted"; - - /// Managed. - public static IntegrationRuntimeType Managed { get; } = new IntegrationRuntimeType(ManagedValue); - /// SelfHosted. - public static IntegrationRuntimeType SelfHosted { get; } = new IntegrationRuntimeType(SelfHostedValue); - /// Determines if two values are the same. - public static bool operator ==(IntegrationRuntimeType left, IntegrationRuntimeType right) => left.Equals(right); - /// Determines if two values are not the same. - public static bool operator !=(IntegrationRuntimeType left, IntegrationRuntimeType right) => !left.Equals(right); - /// Converts a string to a . - public static implicit operator IntegrationRuntimeType(string value) => new IntegrationRuntimeType(value); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override bool Equals(object obj) => obj is IntegrationRuntimeType other && Equals(other); - /// - public bool Equals(IntegrationRuntimeType other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override int GetHashCode() => _value?.GetHashCode() ?? 0; - /// - public override string ToString() => _value; - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/IntegrationRuntimeUpdateResult.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/IntegrationRuntimeUpdateResult.cs deleted file mode 100644 index 0fae9337..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/IntegrationRuntimeUpdateResult.cs +++ /dev/null @@ -1,50 +0,0 @@ -// - -#nullable disable - -using System.ComponentModel; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// The result of the last integration runtime node update. - public readonly partial struct IntegrationRuntimeUpdateResult : IEquatable - { - private readonly string _value; - - /// Initializes a new instance of . - /// is null. - public IntegrationRuntimeUpdateResult(string value) - { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } - - private const string NoneValue = "None"; - private const string SucceedValue = "Succeed"; - private const string FailValue = "Fail"; - - /// None. - public static IntegrationRuntimeUpdateResult None { get; } = new IntegrationRuntimeUpdateResult(NoneValue); - /// Succeed. - public static IntegrationRuntimeUpdateResult Succeed { get; } = new IntegrationRuntimeUpdateResult(SucceedValue); - /// Fail. - public static IntegrationRuntimeUpdateResult Fail { get; } = new IntegrationRuntimeUpdateResult(FailValue); - /// Determines if two values are the same. - public static bool operator ==(IntegrationRuntimeUpdateResult left, IntegrationRuntimeUpdateResult right) => left.Equals(right); - /// Determines if two values are not the same. - public static bool operator !=(IntegrationRuntimeUpdateResult left, IntegrationRuntimeUpdateResult right) => !left.Equals(right); - /// Converts a string to a . - public static implicit operator IntegrationRuntimeUpdateResult(string value) => new IntegrationRuntimeUpdateResult(value); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override bool Equals(object obj) => obj is IntegrationRuntimeUpdateResult other && Equals(other); - /// - public bool Equals(IntegrationRuntimeUpdateResult other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override int GetHashCode() => _value?.GetHashCode() ?? 0; - /// - public override string ToString() => _value; - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/IntegrationRuntimeVnetProperties.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/IntegrationRuntimeVnetProperties.Serialization.cs deleted file mode 100644 index f27fd805..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/IntegrationRuntimeVnetProperties.Serialization.cs +++ /dev/null @@ -1,110 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class IntegrationRuntimeVnetProperties : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - if (Optional.IsDefined(VnetId)) - { - writer.WritePropertyName("vNetId"u8); - writer.WriteStringValue(VnetId.Value); - } - if (Optional.IsDefined(Subnet)) - { - writer.WritePropertyName("subnet"u8); - writer.WriteStringValue(Subnet); - } - if (Optional.IsCollectionDefined(PublicIPs)) - { - writer.WritePropertyName("publicIPs"u8); - writer.WriteStartArray(); - foreach (var item in PublicIPs) - { - writer.WriteStringValue(item); - } - writer.WriteEndArray(); - } - if (Optional.IsDefined(SubnetId)) - { - writer.WritePropertyName("subnetId"u8); - writer.WriteStringValue(SubnetId); - } - foreach (var item in AdditionalProperties) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.Value.ToString()).RootElement); -#endif - } - writer.WriteEndObject(); - } - - internal static IntegrationRuntimeVnetProperties DeserializeIntegrationRuntimeVnetProperties(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - Optional vnetId = default; - Optional subnet = default; - Optional> publicIPs = default; - Optional subnetId = default; - IDictionary> additionalProperties = default; - Dictionary> additionalPropertiesDictionary = new Dictionary>(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("vNetId"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - vnetId = property.Value.GetGuid(); - continue; - } - if (property.NameEquals("subnet"u8)) - { - subnet = property.Value.GetString(); - continue; - } - if (property.NameEquals("publicIPs"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - array.Add(item.GetString()); - } - publicIPs = array; - continue; - } - if (property.NameEquals("subnetId"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - subnetId = new ResourceIdentifier(property.Value.GetString()); - continue; - } - additionalPropertiesDictionary.Add(property.Name, JsonSerializer.Deserialize>(property.Value.GetRawText())); - } - additionalProperties = additionalPropertiesDictionary; - return new IntegrationRuntimeVnetProperties(Optional.ToNullable(vnetId), subnet.Value, Optional.ToList(publicIPs), subnetId.Value, additionalProperties); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/IntegrationRuntimeVnetProperties.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/IntegrationRuntimeVnetProperties.cs deleted file mode 100644 index f2ca8942..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/IntegrationRuntimeVnetProperties.cs +++ /dev/null @@ -1,75 +0,0 @@ -// - -#nullable disable - -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// VNet properties for managed integration runtime. - public partial class IntegrationRuntimeVnetProperties - { - /// Initializes a new instance of IntegrationRuntimeVnetProperties. - public IntegrationRuntimeVnetProperties() - { - PublicIPs = new ChangeTrackingList(); - AdditionalProperties = new ChangeTrackingDictionary>(); - } - - /// Initializes a new instance of IntegrationRuntimeVnetProperties. - /// The ID of the VNet that this integration runtime will join. - /// The name of the subnet this integration runtime will join. - /// Resource IDs of the public IP addresses that this integration runtime will use. - /// The ID of subnet, to which this Azure-SSIS integration runtime will be joined. - /// Additional Properties. - internal IntegrationRuntimeVnetProperties(Guid? vnetId, string subnet, IList publicIPs, ResourceIdentifier subnetId, IDictionary> additionalProperties) - { - VnetId = vnetId; - Subnet = subnet; - PublicIPs = publicIPs; - SubnetId = subnetId; - AdditionalProperties = additionalProperties; - } - - /// The ID of the VNet that this integration runtime will join. - public Guid? VnetId { get; set; } - /// The name of the subnet this integration runtime will join. - public string Subnet { get; set; } - /// Resource IDs of the public IP addresses that this integration runtime will use. - public IList PublicIPs { get; } - /// The ID of subnet, to which this Azure-SSIS integration runtime will be joined. - public ResourceIdentifier SubnetId { get; set; } - /// - /// Additional Properties - /// - /// To assign an object to the value of this property use . - /// - /// - /// To assign an already formated json string to this property use . - /// - /// - /// Examples: - /// - /// - /// BinaryData.FromObjectAsJson("foo") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromString("\"foo\"") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromObjectAsJson(new { key = "value" }) - /// Creates a payload of { "key": "value" }. - /// - /// - /// BinaryData.FromString("{\"key\": \"value\"}") - /// Creates a payload of { "key": "value" }. - /// - /// - /// - /// - public IDictionary> AdditionalProperties { get; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/JiraLinkedService.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/JiraLinkedService.Serialization.cs deleted file mode 100644 index 40bb9493..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/JiraLinkedService.Serialization.cs +++ /dev/null @@ -1,262 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class JiraLinkedService : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - writer.WritePropertyName("type"u8); - writer.WriteStringValue(LinkedServiceType); - if (Optional.IsDefined(ConnectVia)) - { - writer.WritePropertyName("connectVia"u8); - writer.WriteObjectValue(ConnectVia); - } - if (Optional.IsDefined(Description)) - { - writer.WritePropertyName("description"u8); - writer.WriteStringValue(Description); - } - if (Optional.IsCollectionDefined(Parameters)) - { - writer.WritePropertyName("parameters"u8); - writer.WriteStartObject(); - foreach (var item in Parameters) - { - writer.WritePropertyName(item.Key); - writer.WriteObjectValue(item.Value); - } - writer.WriteEndObject(); - } - if (Optional.IsCollectionDefined(Annotations)) - { - writer.WritePropertyName("annotations"u8); - writer.WriteStartArray(); - foreach (var item in Annotations) - { - if (item == null) - { - writer.WriteNullValue(); - continue; - } -#if NET6_0_OR_GREATER - writer.WriteRawValue(item); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.ToString()).RootElement); -#endif - } - writer.WriteEndArray(); - } - writer.WritePropertyName("typeProperties"u8); - writer.WriteStartObject(); - writer.WritePropertyName("host"u8); - JsonSerializer.Serialize(writer, Host); - if (Optional.IsDefined(Port)) - { - writer.WritePropertyName("port"u8); - JsonSerializer.Serialize(writer, Port); - } - writer.WritePropertyName("username"u8); - JsonSerializer.Serialize(writer, Username); - if (Optional.IsDefined(Password)) - { - writer.WritePropertyName("password"u8); - JsonSerializer.Serialize(writer, Password); - } - if (Optional.IsDefined(UseEncryptedEndpoints)) - { - writer.WritePropertyName("useEncryptedEndpoints"u8); - JsonSerializer.Serialize(writer, UseEncryptedEndpoints); - } - if (Optional.IsDefined(UseHostVerification)) - { - writer.WritePropertyName("useHostVerification"u8); - JsonSerializer.Serialize(writer, UseHostVerification); - } - if (Optional.IsDefined(UsePeerVerification)) - { - writer.WritePropertyName("usePeerVerification"u8); - JsonSerializer.Serialize(writer, UsePeerVerification); - } - if (Optional.IsDefined(EncryptedCredential)) - { - writer.WritePropertyName("encryptedCredential"u8); - writer.WriteStringValue(EncryptedCredential); - } - writer.WriteEndObject(); - foreach (var item in AdditionalProperties) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.Value.ToString()).RootElement); -#endif - } - writer.WriteEndObject(); - } - - internal static JiraLinkedService DeserializeJiraLinkedService(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - string type = default; - Optional connectVia = default; - Optional description = default; - Optional> parameters = default; - Optional> annotations = default; - DataFactoryElement host = default; - Optional> port = default; - DataFactoryElement username = default; - Optional password = default; - Optional> useEncryptedEndpoints = default; - Optional> useHostVerification = default; - Optional> usePeerVerification = default; - Optional encryptedCredential = default; - IDictionary> additionalProperties = default; - Dictionary> additionalPropertiesDictionary = new Dictionary>(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("type"u8)) - { - type = property.Value.GetString(); - continue; - } - if (property.NameEquals("connectVia"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - connectVia = IntegrationRuntimeReference.DeserializeIntegrationRuntimeReference(property.Value); - continue; - } - if (property.NameEquals("description"u8)) - { - description = property.Value.GetString(); - continue; - } - if (property.NameEquals("parameters"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - Dictionary dictionary = new Dictionary(); - foreach (var property0 in property.Value.EnumerateObject()) - { - dictionary.Add(property0.Name, EntityParameterSpecification.DeserializeEntityParameterSpecification(property0.Value)); - } - parameters = dictionary; - continue; - } - if (property.NameEquals("annotations"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - if (item.ValueKind == JsonValueKind.Null) - { - array.Add(null); - } - else - { - array.Add(BinaryData.FromString(item.GetRawText())); - } - } - annotations = array; - continue; - } - if (property.NameEquals("typeProperties"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - foreach (var property0 in property.Value.EnumerateObject()) - { - if (property0.NameEquals("host"u8)) - { - host = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("port"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - port = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("username"u8)) - { - username = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("password"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - password = JsonSerializer.Deserialize(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("useEncryptedEndpoints"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - useEncryptedEndpoints = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("useHostVerification"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - useHostVerification = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("usePeerVerification"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - usePeerVerification = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("encryptedCredential"u8)) - { - encryptedCredential = property0.Value.GetString(); - continue; - } - } - continue; - } - additionalPropertiesDictionary.Add(property.Name, JsonSerializer.Deserialize>(property.Value.GetRawText())); - } - additionalProperties = additionalPropertiesDictionary; - return new JiraLinkedService(type, connectVia.Value, description.Value, Optional.ToDictionary(parameters), Optional.ToList(annotations), additionalProperties, host, port.Value, username, password, useEncryptedEndpoints.Value, useHostVerification.Value, usePeerVerification.Value, encryptedCredential.Value); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/JiraLinkedService.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/JiraLinkedService.cs deleted file mode 100644 index 9f4a4236..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/JiraLinkedService.cs +++ /dev/null @@ -1,72 +0,0 @@ -// - -#nullable disable - -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// Jira Service linked service. - public partial class JiraLinkedService : DataFactoryLinkedServiceProperties - { - /// Initializes a new instance of JiraLinkedService. - /// The IP address or host name of the Jira service. (e.g. jira.example.com). - /// The user name that you use to access Jira Service. - /// or is null. - public JiraLinkedService(DataFactoryElement host, DataFactoryElement username) - { - Argument.AssertNotNull(host, nameof(host)); - Argument.AssertNotNull(username, nameof(username)); - - Host = host; - Username = username; - LinkedServiceType = "Jira"; - } - - /// Initializes a new instance of JiraLinkedService. - /// Type of linked service. - /// The integration runtime reference. - /// Linked service description. - /// Parameters for linked service. - /// List of tags that can be used for describing the linked service. - /// Additional Properties. - /// The IP address or host name of the Jira service. (e.g. jira.example.com). - /// The TCP port that the Jira server uses to listen for client connections. The default value is 443 if connecting through HTTPS, or 8080 if connecting through HTTP. - /// The user name that you use to access Jira Service. - /// The password corresponding to the user name that you provided in the username field. - /// Specifies whether the data source endpoints are encrypted using HTTPS. The default value is true. - /// 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. - /// Specifies whether to verify the identity of the server when connecting over SSL. The default value is true. - /// The encrypted credential used for authentication. Credentials are encrypted using the integration runtime credential manager. Type: string. - internal JiraLinkedService(string linkedServiceType, IntegrationRuntimeReference connectVia, string description, IDictionary parameters, IList annotations, IDictionary> additionalProperties, DataFactoryElement host, DataFactoryElement port, DataFactoryElement username, DataFactorySecretBaseDefinition password, DataFactoryElement useEncryptedEndpoints, DataFactoryElement useHostVerification, DataFactoryElement usePeerVerification, string encryptedCredential) : base(linkedServiceType, connectVia, description, parameters, annotations, additionalProperties) - { - Host = host; - Port = port; - Username = username; - Password = password; - UseEncryptedEndpoints = useEncryptedEndpoints; - UseHostVerification = useHostVerification; - UsePeerVerification = usePeerVerification; - EncryptedCredential = encryptedCredential; - LinkedServiceType = linkedServiceType ?? "Jira"; - } - - /// The IP address or host name of the Jira service. (e.g. jira.example.com). - public DataFactoryElement Host { get; set; } - /// The TCP port that the Jira server uses to listen for client connections. The default value is 443 if connecting through HTTPS, or 8080 if connecting through HTTP. - public DataFactoryElement Port { get; set; } - /// The user name that you use to access Jira Service. - public DataFactoryElement Username { get; set; } - /// The password corresponding to the user name that you provided in the username field. - public DataFactorySecretBaseDefinition Password { get; set; } - /// Specifies whether the data source endpoints are encrypted using HTTPS. The default value is true. - public DataFactoryElement UseEncryptedEndpoints { get; set; } - /// 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. - public DataFactoryElement UseHostVerification { get; set; } - /// Specifies whether to verify the identity of the server when connecting over SSL. The default value is true. - public DataFactoryElement UsePeerVerification { get; set; } - /// The encrypted credential used for authentication. Credentials are encrypted using the integration runtime credential manager. Type: string. - public string EncryptedCredential { get; set; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/JiraObjectDataset.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/JiraObjectDataset.Serialization.cs deleted file mode 100644 index b37978d5..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/JiraObjectDataset.Serialization.cs +++ /dev/null @@ -1,212 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class JiraObjectDataset : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - writer.WritePropertyName("type"u8); - writer.WriteStringValue(DatasetType); - if (Optional.IsDefined(Description)) - { - writer.WritePropertyName("description"u8); - writer.WriteStringValue(Description); - } - if (Optional.IsDefined(Structure)) - { - writer.WritePropertyName("structure"u8); - JsonSerializer.Serialize(writer, Structure); - } - if (Optional.IsDefined(Schema)) - { - writer.WritePropertyName("schema"u8); - JsonSerializer.Serialize(writer, Schema); - } - writer.WritePropertyName("linkedServiceName"u8); - JsonSerializer.Serialize(writer, LinkedServiceName); if (Optional.IsCollectionDefined(Parameters)) - { - writer.WritePropertyName("parameters"u8); - writer.WriteStartObject(); - foreach (var item in Parameters) - { - writer.WritePropertyName(item.Key); - writer.WriteObjectValue(item.Value); - } - writer.WriteEndObject(); - } - if (Optional.IsCollectionDefined(Annotations)) - { - writer.WritePropertyName("annotations"u8); - writer.WriteStartArray(); - foreach (var item in Annotations) - { - if (item == null) - { - writer.WriteNullValue(); - continue; - } -#if NET6_0_OR_GREATER - writer.WriteRawValue(item); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.ToString()).RootElement); -#endif - } - writer.WriteEndArray(); - } - if (Optional.IsDefined(Folder)) - { - writer.WritePropertyName("folder"u8); - writer.WriteObjectValue(Folder); - } - writer.WritePropertyName("typeProperties"u8); - writer.WriteStartObject(); - if (Optional.IsDefined(TableName)) - { - writer.WritePropertyName("tableName"u8); - JsonSerializer.Serialize(writer, TableName); - } - writer.WriteEndObject(); - foreach (var item in AdditionalProperties) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.Value.ToString()).RootElement); -#endif - } - writer.WriteEndObject(); - } - - internal static JiraObjectDataset DeserializeJiraObjectDataset(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - string type = default; - Optional description = default; - Optional>> structure = default; - Optional>> schema = default; - DataFactoryLinkedServiceReference linkedServiceName = default; - Optional> parameters = default; - Optional> annotations = default; - Optional folder = default; - Optional> tableName = default; - IDictionary> additionalProperties = default; - Dictionary> additionalPropertiesDictionary = new Dictionary>(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("type"u8)) - { - type = property.Value.GetString(); - continue; - } - if (property.NameEquals("description"u8)) - { - description = property.Value.GetString(); - continue; - } - if (property.NameEquals("structure"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - structure = JsonSerializer.Deserialize>>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("schema"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - schema = JsonSerializer.Deserialize>>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("linkedServiceName"u8)) - { - linkedServiceName = JsonSerializer.Deserialize(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("parameters"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - Dictionary dictionary = new Dictionary(); - foreach (var property0 in property.Value.EnumerateObject()) - { - dictionary.Add(property0.Name, EntityParameterSpecification.DeserializeEntityParameterSpecification(property0.Value)); - } - parameters = dictionary; - continue; - } - if (property.NameEquals("annotations"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - if (item.ValueKind == JsonValueKind.Null) - { - array.Add(null); - } - else - { - array.Add(BinaryData.FromString(item.GetRawText())); - } - } - annotations = array; - continue; - } - if (property.NameEquals("folder"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - folder = DatasetFolder.DeserializeDatasetFolder(property.Value); - continue; - } - if (property.NameEquals("typeProperties"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - foreach (var property0 in property.Value.EnumerateObject()) - { - if (property0.NameEquals("tableName"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - tableName = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - } - continue; - } - additionalPropertiesDictionary.Add(property.Name, JsonSerializer.Deserialize>(property.Value.GetRawText())); - } - additionalProperties = additionalPropertiesDictionary; - return new JiraObjectDataset(type, description.Value, structure.Value, schema.Value, linkedServiceName, Optional.ToDictionary(parameters), Optional.ToList(annotations), folder.Value, additionalProperties, tableName.Value); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/JiraObjectDataset.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/JiraObjectDataset.cs deleted file mode 100644 index 8d323418..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/JiraObjectDataset.cs +++ /dev/null @@ -1,43 +0,0 @@ -// - -#nullable disable - -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// Jira Service dataset. - public partial class JiraObjectDataset : DataFactoryDatasetProperties - { - /// Initializes a new instance of JiraObjectDataset. - /// Linked service reference. - /// is null. - public JiraObjectDataset(DataFactoryLinkedServiceReference linkedServiceName) : base(linkedServiceName) - { - Argument.AssertNotNull(linkedServiceName, nameof(linkedServiceName)); - - DatasetType = "JiraObject"; - } - - /// Initializes a new instance of JiraObjectDataset. - /// Type of dataset. - /// Dataset description. - /// Columns that define the structure of the dataset. Type: array (or Expression with resultType array), itemType: DatasetDataElement. - /// Columns that define the physical type schema of the dataset. Type: array (or Expression with resultType array), itemType: DatasetSchemaDataElement. - /// Linked service reference. - /// Parameters for dataset. - /// List of tags that can be used for describing the Dataset. - /// The folder that this Dataset is in. If not specified, Dataset will appear at the root level. - /// Additional Properties. - /// The table name. Type: string (or Expression with resultType string). - internal JiraObjectDataset(string datasetType, string description, DataFactoryElement> structure, DataFactoryElement> schema, DataFactoryLinkedServiceReference linkedServiceName, IDictionary parameters, IList annotations, DatasetFolder folder, IDictionary> additionalProperties, DataFactoryElement tableName) : base(datasetType, description, structure, schema, linkedServiceName, parameters, annotations, folder, additionalProperties) - { - TableName = tableName; - DatasetType = datasetType ?? "JiraObject"; - } - - /// The table name. Type: string (or Expression with resultType string). - public DataFactoryElement TableName { get; set; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/JiraSource.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/JiraSource.Serialization.cs deleted file mode 100644 index 5b6524e1..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/JiraSource.Serialization.cs +++ /dev/null @@ -1,161 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class JiraSource : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - if (Optional.IsDefined(Query)) - { - writer.WritePropertyName("query"u8); - JsonSerializer.Serialize(writer, Query); - } - if (Optional.IsDefined(QueryTimeout)) - { - writer.WritePropertyName("queryTimeout"u8); - JsonSerializer.Serialize(writer, QueryTimeout); - } - if (Optional.IsDefined(AdditionalColumns)) - { - writer.WritePropertyName("additionalColumns"u8); -#if NET6_0_OR_GREATER - writer.WriteRawValue(AdditionalColumns); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(AdditionalColumns.ToString()).RootElement); -#endif - } - writer.WritePropertyName("type"u8); - writer.WriteStringValue(CopySourceType); - if (Optional.IsDefined(SourceRetryCount)) - { - writer.WritePropertyName("sourceRetryCount"u8); - JsonSerializer.Serialize(writer, SourceRetryCount); - } - if (Optional.IsDefined(SourceRetryWait)) - { - writer.WritePropertyName("sourceRetryWait"u8); - JsonSerializer.Serialize(writer, SourceRetryWait); - } - if (Optional.IsDefined(MaxConcurrentConnections)) - { - writer.WritePropertyName("maxConcurrentConnections"u8); - JsonSerializer.Serialize(writer, MaxConcurrentConnections); - } - if (Optional.IsDefined(DisableMetricsCollection)) - { - writer.WritePropertyName("disableMetricsCollection"u8); - JsonSerializer.Serialize(writer, DisableMetricsCollection); - } - foreach (var item in AdditionalProperties) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.Value.ToString()).RootElement); -#endif - } - writer.WriteEndObject(); - } - - internal static JiraSource DeserializeJiraSource(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - Optional> query = default; - Optional> queryTimeout = default; - Optional additionalColumns = default; - string type = default; - Optional> sourceRetryCount = default; - Optional> sourceRetryWait = default; - Optional> maxConcurrentConnections = default; - Optional> disableMetricsCollection = default; - IDictionary> additionalProperties = default; - Dictionary> additionalPropertiesDictionary = new Dictionary>(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("query"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - query = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("queryTimeout"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - queryTimeout = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("additionalColumns"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - additionalColumns = BinaryData.FromString(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("type"u8)) - { - type = property.Value.GetString(); - continue; - } - if (property.NameEquals("sourceRetryCount"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - sourceRetryCount = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("sourceRetryWait"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - sourceRetryWait = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("maxConcurrentConnections"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - maxConcurrentConnections = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("disableMetricsCollection"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - disableMetricsCollection = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - additionalPropertiesDictionary.Add(property.Name, JsonSerializer.Deserialize>(property.Value.GetRawText())); - } - additionalProperties = additionalPropertiesDictionary; - return new JiraSource(type, sourceRetryCount.Value, sourceRetryWait.Value, maxConcurrentConnections.Value, disableMetricsCollection.Value, additionalProperties, queryTimeout.Value, additionalColumns.Value, query.Value); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/JiraSource.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/JiraSource.cs deleted file mode 100644 index ec4ff674..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/JiraSource.cs +++ /dev/null @@ -1,37 +0,0 @@ -// - -#nullable disable - -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// A copy activity Jira Service source. - public partial class JiraSource : TabularSource - { - /// Initializes a new instance of JiraSource. - public JiraSource() - { - CopySourceType = "JiraSource"; - } - - /// Initializes a new instance of JiraSource. - /// Copy source type. - /// Source retry count. Type: integer (or Expression with resultType integer). - /// Source retry wait. Type: string (or Expression with resultType string), pattern: ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). - /// The maximum concurrent connection count for the source data store. Type: integer (or Expression with resultType integer). - /// If true, disable data store metrics collection. Default is false. Type: boolean (or Expression with resultType boolean). - /// Additional Properties. - /// 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). - /// A query to retrieve data from source. Type: string (or Expression with resultType string). - internal JiraSource(string copySourceType, DataFactoryElement sourceRetryCount, DataFactoryElement sourceRetryWait, DataFactoryElement maxConcurrentConnections, DataFactoryElement disableMetricsCollection, IDictionary> additionalProperties, DataFactoryElement queryTimeout, BinaryData additionalColumns, DataFactoryElement query) : base(copySourceType, sourceRetryCount, sourceRetryWait, maxConcurrentConnections, disableMetricsCollection, additionalProperties, queryTimeout, additionalColumns) - { - Query = query; - CopySourceType = copySourceType ?? "JiraSource"; - } - - /// A query to retrieve data from source. Type: string (or Expression with resultType string). - public DataFactoryElement Query { get; set; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/JsonDataset.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/JsonDataset.Serialization.cs deleted file mode 100644 index 4b2f761d..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/JsonDataset.Serialization.cs +++ /dev/null @@ -1,242 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class JsonDataset : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - writer.WritePropertyName("type"u8); - writer.WriteStringValue(DatasetType); - if (Optional.IsDefined(Description)) - { - writer.WritePropertyName("description"u8); - writer.WriteStringValue(Description); - } - if (Optional.IsDefined(Structure)) - { - writer.WritePropertyName("structure"u8); - JsonSerializer.Serialize(writer, Structure); - } - if (Optional.IsDefined(Schema)) - { - writer.WritePropertyName("schema"u8); - JsonSerializer.Serialize(writer, Schema); - } - writer.WritePropertyName("linkedServiceName"u8); - JsonSerializer.Serialize(writer, LinkedServiceName); if (Optional.IsCollectionDefined(Parameters)) - { - writer.WritePropertyName("parameters"u8); - writer.WriteStartObject(); - foreach (var item in Parameters) - { - writer.WritePropertyName(item.Key); - writer.WriteObjectValue(item.Value); - } - writer.WriteEndObject(); - } - if (Optional.IsCollectionDefined(Annotations)) - { - writer.WritePropertyName("annotations"u8); - writer.WriteStartArray(); - foreach (var item in Annotations) - { - if (item == null) - { - writer.WriteNullValue(); - continue; - } -#if NET6_0_OR_GREATER - writer.WriteRawValue(item); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.ToString()).RootElement); -#endif - } - writer.WriteEndArray(); - } - if (Optional.IsDefined(Folder)) - { - writer.WritePropertyName("folder"u8); - writer.WriteObjectValue(Folder); - } - writer.WritePropertyName("typeProperties"u8); - writer.WriteStartObject(); - if (Optional.IsDefined(DataLocation)) - { - writer.WritePropertyName("location"u8); - writer.WriteObjectValue(DataLocation); - } - if (Optional.IsDefined(EncodingName)) - { - writer.WritePropertyName("encodingName"u8); - JsonSerializer.Serialize(writer, EncodingName); - } - if (Optional.IsDefined(Compression)) - { - writer.WritePropertyName("compression"u8); - writer.WriteObjectValue(Compression); - } - writer.WriteEndObject(); - foreach (var item in AdditionalProperties) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.Value.ToString()).RootElement); -#endif - } - writer.WriteEndObject(); - } - - internal static JsonDataset DeserializeJsonDataset(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - string type = default; - Optional description = default; - Optional>> structure = default; - Optional>> schema = default; - DataFactoryLinkedServiceReference linkedServiceName = default; - Optional> parameters = default; - Optional> annotations = default; - Optional folder = default; - Optional location = default; - Optional> encodingName = default; - Optional compression = default; - IDictionary> additionalProperties = default; - Dictionary> additionalPropertiesDictionary = new Dictionary>(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("type"u8)) - { - type = property.Value.GetString(); - continue; - } - if (property.NameEquals("description"u8)) - { - description = property.Value.GetString(); - continue; - } - if (property.NameEquals("structure"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - structure = JsonSerializer.Deserialize>>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("schema"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - schema = JsonSerializer.Deserialize>>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("linkedServiceName"u8)) - { - linkedServiceName = JsonSerializer.Deserialize(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("parameters"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - Dictionary dictionary = new Dictionary(); - foreach (var property0 in property.Value.EnumerateObject()) - { - dictionary.Add(property0.Name, EntityParameterSpecification.DeserializeEntityParameterSpecification(property0.Value)); - } - parameters = dictionary; - continue; - } - if (property.NameEquals("annotations"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - if (item.ValueKind == JsonValueKind.Null) - { - array.Add(null); - } - else - { - array.Add(BinaryData.FromString(item.GetRawText())); - } - } - annotations = array; - continue; - } - if (property.NameEquals("folder"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - folder = DatasetFolder.DeserializeDatasetFolder(property.Value); - continue; - } - if (property.NameEquals("typeProperties"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - foreach (var property0 in property.Value.EnumerateObject()) - { - if (property0.NameEquals("location"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - location = DatasetLocation.DeserializeDatasetLocation(property0.Value); - continue; - } - if (property0.NameEquals("encodingName"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - encodingName = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("compression"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - compression = DatasetCompression.DeserializeDatasetCompression(property0.Value); - continue; - } - } - continue; - } - additionalPropertiesDictionary.Add(property.Name, JsonSerializer.Deserialize>(property.Value.GetRawText())); - } - additionalProperties = additionalPropertiesDictionary; - return new JsonDataset(type, description.Value, structure.Value, schema.Value, linkedServiceName, Optional.ToDictionary(parameters), Optional.ToList(annotations), folder.Value, additionalProperties, location.Value, encodingName.Value, compression.Value); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/JsonDataset.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/JsonDataset.cs deleted file mode 100644 index c71efd5d..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/JsonDataset.cs +++ /dev/null @@ -1,59 +0,0 @@ -// - -#nullable disable - -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// Json dataset. - public partial class JsonDataset : DataFactoryDatasetProperties - { - /// Initializes a new instance of JsonDataset. - /// Linked service reference. - /// is null. - public JsonDataset(DataFactoryLinkedServiceReference linkedServiceName) : base(linkedServiceName) - { - Argument.AssertNotNull(linkedServiceName, nameof(linkedServiceName)); - - DatasetType = "Json"; - } - - /// Initializes a new instance of JsonDataset. - /// Type of dataset. - /// Dataset description. - /// Columns that define the structure of the dataset. Type: array (or Expression with resultType array), itemType: DatasetDataElement. - /// Columns that define the physical type schema of the dataset. Type: array (or Expression with resultType array), itemType: DatasetSchemaDataElement. - /// Linked service reference. - /// Parameters for dataset. - /// List of tags that can be used for describing the Dataset. - /// The folder that this Dataset is in. If not specified, Dataset will appear at the root level. - /// Additional Properties. - /// - /// The location of the json data storage. - /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. - /// The available derived classes include , , , , , , , , , , , and . - /// - /// The code page name of the preferred encoding. If not specified, the default value is UTF-8, unless BOM denotes another Unicode encoding. Refer to the name column of the table in the following link to set supported values: https://msdn.microsoft.com/library/system.text.encoding.aspx. Type: string (or Expression with resultType string). - /// The data compression method used for the json dataset. - internal JsonDataset(string datasetType, string description, DataFactoryElement> structure, DataFactoryElement> schema, DataFactoryLinkedServiceReference linkedServiceName, IDictionary parameters, IList annotations, DatasetFolder folder, IDictionary> additionalProperties, DatasetLocation dataLocation, DataFactoryElement encodingName, DatasetCompression compression) : base(datasetType, description, structure, schema, linkedServiceName, parameters, annotations, folder, additionalProperties) - { - DataLocation = dataLocation; - EncodingName = encodingName; - Compression = compression; - DatasetType = datasetType ?? "Json"; - } - - /// - /// The location of the json data storage. - /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. - /// The available derived classes include , , , , , , , , , , , and . - /// - public DatasetLocation DataLocation { get; set; } - /// The code page name of the preferred encoding. If not specified, the default value is UTF-8, unless BOM denotes another Unicode encoding. Refer to the name column of the table in the following link to set supported values: https://msdn.microsoft.com/library/system.text.encoding.aspx. Type: string (or Expression with resultType string). - public DataFactoryElement EncodingName { get; set; } - /// The data compression method used for the json dataset. - public DatasetCompression Compression { get; set; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/JsonReadSettings.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/JsonReadSettings.Serialization.cs deleted file mode 100644 index 022fb980..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/JsonReadSettings.Serialization.cs +++ /dev/null @@ -1,67 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class JsonReadSettings : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - if (Optional.IsDefined(CompressionProperties)) - { - writer.WritePropertyName("compressionProperties"u8); - writer.WriteObjectValue(CompressionProperties); - } - writer.WritePropertyName("type"u8); - writer.WriteStringValue(FormatReadSettingsType); - foreach (var item in AdditionalProperties) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.Value.ToString()).RootElement); -#endif - } - writer.WriteEndObject(); - } - - internal static JsonReadSettings DeserializeJsonReadSettings(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - Optional compressionProperties = default; - string type = default; - IDictionary> additionalProperties = default; - Dictionary> additionalPropertiesDictionary = new Dictionary>(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("compressionProperties"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - compressionProperties = CompressionReadSettings.DeserializeCompressionReadSettings(property.Value); - continue; - } - if (property.NameEquals("type"u8)) - { - type = property.Value.GetString(); - continue; - } - additionalPropertiesDictionary.Add(property.Name, JsonSerializer.Deserialize>(property.Value.GetRawText())); - } - additionalProperties = additionalPropertiesDictionary; - return new JsonReadSettings(type, additionalProperties, compressionProperties.Value); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/JsonReadSettings.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/JsonReadSettings.cs deleted file mode 100644 index 17aee88e..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/JsonReadSettings.cs +++ /dev/null @@ -1,39 +0,0 @@ -// - -#nullable disable - -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// Json read settings. - public partial class JsonReadSettings : FormatReadSettings - { - /// Initializes a new instance of JsonReadSettings. - public JsonReadSettings() - { - FormatReadSettingsType = "JsonReadSettings"; - } - - /// Initializes a new instance of JsonReadSettings. - /// The read setting type. - /// Additional Properties. - /// - /// Compression settings. - /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. - /// The available derived classes include , and . - /// - internal JsonReadSettings(string formatReadSettingsType, IDictionary> additionalProperties, CompressionReadSettings compressionProperties) : base(formatReadSettingsType, additionalProperties) - { - CompressionProperties = compressionProperties; - FormatReadSettingsType = formatReadSettingsType ?? "JsonReadSettings"; - } - - /// - /// Compression settings. - /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. - /// The available derived classes include , and . - /// - public CompressionReadSettings CompressionProperties { get; set; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/JsonSink.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/JsonSink.Serialization.cs deleted file mode 100644 index e6550ee7..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/JsonSink.Serialization.cs +++ /dev/null @@ -1,172 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class JsonSink : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - if (Optional.IsDefined(StoreSettings)) - { - writer.WritePropertyName("storeSettings"u8); - writer.WriteObjectValue(StoreSettings); - } - if (Optional.IsDefined(FormatSettings)) - { - writer.WritePropertyName("formatSettings"u8); - writer.WriteObjectValue(FormatSettings); - } - writer.WritePropertyName("type"u8); - writer.WriteStringValue(CopySinkType); - if (Optional.IsDefined(WriteBatchSize)) - { - writer.WritePropertyName("writeBatchSize"u8); - JsonSerializer.Serialize(writer, WriteBatchSize); - } - if (Optional.IsDefined(WriteBatchTimeout)) - { - writer.WritePropertyName("writeBatchTimeout"u8); - JsonSerializer.Serialize(writer, WriteBatchTimeout); - } - if (Optional.IsDefined(SinkRetryCount)) - { - writer.WritePropertyName("sinkRetryCount"u8); - JsonSerializer.Serialize(writer, SinkRetryCount); - } - if (Optional.IsDefined(SinkRetryWait)) - { - writer.WritePropertyName("sinkRetryWait"u8); - JsonSerializer.Serialize(writer, SinkRetryWait); - } - if (Optional.IsDefined(MaxConcurrentConnections)) - { - writer.WritePropertyName("maxConcurrentConnections"u8); - JsonSerializer.Serialize(writer, MaxConcurrentConnections); - } - if (Optional.IsDefined(DisableMetricsCollection)) - { - writer.WritePropertyName("disableMetricsCollection"u8); - JsonSerializer.Serialize(writer, DisableMetricsCollection); - } - foreach (var item in AdditionalProperties) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.Value.ToString()).RootElement); -#endif - } - writer.WriteEndObject(); - } - - internal static JsonSink DeserializeJsonSink(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - Optional storeSettings = default; - Optional formatSettings = default; - string type = default; - Optional> writeBatchSize = default; - Optional> writeBatchTimeout = default; - Optional> sinkRetryCount = default; - Optional> sinkRetryWait = default; - Optional> maxConcurrentConnections = default; - Optional> disableMetricsCollection = default; - IDictionary> additionalProperties = default; - Dictionary> additionalPropertiesDictionary = new Dictionary>(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("storeSettings"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - storeSettings = StoreWriteSettings.DeserializeStoreWriteSettings(property.Value); - continue; - } - if (property.NameEquals("formatSettings"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - formatSettings = JsonWriteSettings.DeserializeJsonWriteSettings(property.Value); - continue; - } - if (property.NameEquals("type"u8)) - { - type = property.Value.GetString(); - continue; - } - if (property.NameEquals("writeBatchSize"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - writeBatchSize = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("writeBatchTimeout"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - writeBatchTimeout = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("sinkRetryCount"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - sinkRetryCount = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("sinkRetryWait"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - sinkRetryWait = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("maxConcurrentConnections"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - maxConcurrentConnections = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("disableMetricsCollection"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - disableMetricsCollection = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - additionalPropertiesDictionary.Add(property.Name, JsonSerializer.Deserialize>(property.Value.GetRawText())); - } - additionalProperties = additionalPropertiesDictionary; - return new JsonSink(type, writeBatchSize.Value, writeBatchTimeout.Value, sinkRetryCount.Value, sinkRetryWait.Value, maxConcurrentConnections.Value, disableMetricsCollection.Value, additionalProperties, storeSettings.Value, formatSettings.Value); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/JsonSink.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/JsonSink.cs deleted file mode 100644 index d4b8eb81..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/JsonSink.cs +++ /dev/null @@ -1,49 +0,0 @@ -// - -#nullable disable - -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// A copy activity Json sink. - public partial class JsonSink : CopySink - { - /// Initializes a new instance of JsonSink. - public JsonSink() - { - CopySinkType = "JsonSink"; - } - - /// Initializes a new instance of JsonSink. - /// Copy sink type. - /// Write batch size. Type: integer (or Expression with resultType integer), minimum: 0. - /// Write batch timeout. Type: string (or Expression with resultType string), pattern: ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). - /// Sink retry count. Type: integer (or Expression with resultType integer). - /// Sink retry wait. Type: string (or Expression with resultType string), pattern: ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). - /// The maximum concurrent connection count for the sink data store. Type: integer (or Expression with resultType integer). - /// If true, disable data store metrics collection. Default is false. Type: boolean (or Expression with resultType boolean). - /// Additional Properties. - /// - /// Json store settings. - /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. - /// The available derived classes include , , , , and . - /// - /// Json format settings. - internal JsonSink(string copySinkType, DataFactoryElement writeBatchSize, DataFactoryElement writeBatchTimeout, DataFactoryElement sinkRetryCount, DataFactoryElement sinkRetryWait, DataFactoryElement maxConcurrentConnections, DataFactoryElement disableMetricsCollection, IDictionary> additionalProperties, StoreWriteSettings storeSettings, JsonWriteSettings formatSettings) : base(copySinkType, writeBatchSize, writeBatchTimeout, sinkRetryCount, sinkRetryWait, maxConcurrentConnections, disableMetricsCollection, additionalProperties) - { - StoreSettings = storeSettings; - FormatSettings = formatSettings; - CopySinkType = copySinkType ?? "JsonSink"; - } - - /// - /// Json store settings. - /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. - /// The available derived classes include , , , , and . - /// - public StoreWriteSettings StoreSettings { get; set; } - /// Json format settings. - public JsonWriteSettings FormatSettings { get; set; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/JsonSource.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/JsonSource.Serialization.cs deleted file mode 100644 index 848acc05..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/JsonSource.Serialization.cs +++ /dev/null @@ -1,161 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class JsonSource : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - if (Optional.IsDefined(StoreSettings)) - { - writer.WritePropertyName("storeSettings"u8); - writer.WriteObjectValue(StoreSettings); - } - if (Optional.IsDefined(FormatSettings)) - { - writer.WritePropertyName("formatSettings"u8); - writer.WriteObjectValue(FormatSettings); - } - if (Optional.IsDefined(AdditionalColumns)) - { - writer.WritePropertyName("additionalColumns"u8); -#if NET6_0_OR_GREATER - writer.WriteRawValue(AdditionalColumns); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(AdditionalColumns.ToString()).RootElement); -#endif - } - writer.WritePropertyName("type"u8); - writer.WriteStringValue(CopySourceType); - if (Optional.IsDefined(SourceRetryCount)) - { - writer.WritePropertyName("sourceRetryCount"u8); - JsonSerializer.Serialize(writer, SourceRetryCount); - } - if (Optional.IsDefined(SourceRetryWait)) - { - writer.WritePropertyName("sourceRetryWait"u8); - JsonSerializer.Serialize(writer, SourceRetryWait); - } - if (Optional.IsDefined(MaxConcurrentConnections)) - { - writer.WritePropertyName("maxConcurrentConnections"u8); - JsonSerializer.Serialize(writer, MaxConcurrentConnections); - } - if (Optional.IsDefined(DisableMetricsCollection)) - { - writer.WritePropertyName("disableMetricsCollection"u8); - JsonSerializer.Serialize(writer, DisableMetricsCollection); - } - foreach (var item in AdditionalProperties) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.Value.ToString()).RootElement); -#endif - } - writer.WriteEndObject(); - } - - internal static JsonSource DeserializeJsonSource(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - Optional storeSettings = default; - Optional formatSettings = default; - Optional additionalColumns = default; - string type = default; - Optional> sourceRetryCount = default; - Optional> sourceRetryWait = default; - Optional> maxConcurrentConnections = default; - Optional> disableMetricsCollection = default; - IDictionary> additionalProperties = default; - Dictionary> additionalPropertiesDictionary = new Dictionary>(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("storeSettings"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - storeSettings = StoreReadSettings.DeserializeStoreReadSettings(property.Value); - continue; - } - if (property.NameEquals("formatSettings"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - formatSettings = JsonReadSettings.DeserializeJsonReadSettings(property.Value); - continue; - } - if (property.NameEquals("additionalColumns"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - additionalColumns = BinaryData.FromString(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("type"u8)) - { - type = property.Value.GetString(); - continue; - } - if (property.NameEquals("sourceRetryCount"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - sourceRetryCount = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("sourceRetryWait"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - sourceRetryWait = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("maxConcurrentConnections"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - maxConcurrentConnections = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("disableMetricsCollection"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - disableMetricsCollection = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - additionalPropertiesDictionary.Add(property.Name, JsonSerializer.Deserialize>(property.Value.GetRawText())); - } - additionalProperties = additionalPropertiesDictionary; - return new JsonSource(type, sourceRetryCount.Value, sourceRetryWait.Value, maxConcurrentConnections.Value, disableMetricsCollection.Value, additionalProperties, storeSettings.Value, formatSettings.Value, additionalColumns.Value); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/JsonSource.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/JsonSource.cs deleted file mode 100644 index a29ad394..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/JsonSource.cs +++ /dev/null @@ -1,80 +0,0 @@ -// - -#nullable disable - -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// A copy activity Json source. - public partial class JsonSource : CopyActivitySource - { - /// Initializes a new instance of JsonSource. - public JsonSource() - { - CopySourceType = "JsonSource"; - } - - /// Initializes a new instance of JsonSource. - /// Copy source type. - /// Source retry count. Type: integer (or Expression with resultType integer). - /// Source retry wait. Type: string (or Expression with resultType string), pattern: ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). - /// The maximum concurrent connection count for the source data store. Type: integer (or Expression with resultType integer). - /// If true, disable data store metrics collection. Default is false. Type: boolean (or Expression with resultType boolean). - /// Additional Properties. - /// - /// Json store settings. - /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. - /// The available derived classes include , , , , , , , , , , , and . - /// - /// Json format settings. - /// Specifies the additional columns to be added to source data. Type: array of objects(AdditionalColumns) (or Expression with resultType array of objects). - internal JsonSource(string copySourceType, DataFactoryElement sourceRetryCount, DataFactoryElement sourceRetryWait, DataFactoryElement maxConcurrentConnections, DataFactoryElement disableMetricsCollection, IDictionary> additionalProperties, StoreReadSettings storeSettings, JsonReadSettings formatSettings, BinaryData additionalColumns) : base(copySourceType, sourceRetryCount, sourceRetryWait, maxConcurrentConnections, disableMetricsCollection, additionalProperties) - { - StoreSettings = storeSettings; - FormatSettings = formatSettings; - AdditionalColumns = additionalColumns; - CopySourceType = copySourceType ?? "JsonSource"; - } - - /// - /// Json store settings. - /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. - /// The available derived classes include , , , , , , , , , , , and . - /// - public StoreReadSettings StoreSettings { get; set; } - /// Json format settings. - public JsonReadSettings FormatSettings { get; set; } - /// - /// Specifies the additional columns to be added to source data. Type: array of objects(AdditionalColumns) (or Expression with resultType array of objects). - /// - /// To assign an object to this property use . - /// - /// - /// To assign an already formated json string to this property use . - /// - /// - /// Examples: - /// - /// - /// BinaryData.FromObjectAsJson("foo") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromString("\"foo\"") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromObjectAsJson(new { key = "value" }) - /// Creates a payload of { "key": "value" }. - /// - /// - /// BinaryData.FromString("{\"key\": \"value\"}") - /// Creates a payload of { "key": "value" }. - /// - /// - /// - /// - public BinaryData AdditionalColumns { get; set; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/JsonWriteSettings.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/JsonWriteSettings.Serialization.cs deleted file mode 100644 index 86e868b5..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/JsonWriteSettings.Serialization.cs +++ /dev/null @@ -1,71 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class JsonWriteSettings : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - if (Optional.IsDefined(FilePattern)) - { - writer.WritePropertyName("filePattern"u8); -#if NET6_0_OR_GREATER - writer.WriteRawValue(FilePattern); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(FilePattern.ToString()).RootElement); -#endif - } - writer.WritePropertyName("type"u8); - writer.WriteStringValue(FormatWriteSettingsType); - foreach (var item in AdditionalProperties) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.Value.ToString()).RootElement); -#endif - } - writer.WriteEndObject(); - } - - internal static JsonWriteSettings DeserializeJsonWriteSettings(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - Optional filePattern = default; - string type = default; - IDictionary> additionalProperties = default; - Dictionary> additionalPropertiesDictionary = new Dictionary>(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("filePattern"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - filePattern = BinaryData.FromString(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("type"u8)) - { - type = property.Value.GetString(); - continue; - } - additionalPropertiesDictionary.Add(property.Name, JsonSerializer.Deserialize>(property.Value.GetRawText())); - } - additionalProperties = additionalPropertiesDictionary; - return new JsonWriteSettings(type, additionalProperties, filePattern.Value); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/JsonWriteSettings.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/JsonWriteSettings.cs deleted file mode 100644 index 28c052ef..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/JsonWriteSettings.cs +++ /dev/null @@ -1,60 +0,0 @@ -// - -#nullable disable - -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// Json write settings. - public partial class JsonWriteSettings : FormatWriteSettings - { - /// Initializes a new instance of JsonWriteSettings. - public JsonWriteSettings() - { - FormatWriteSettingsType = "JsonWriteSettings"; - } - - /// Initializes a new instance of JsonWriteSettings. - /// The write setting type. - /// Additional Properties. - /// File pattern of JSON. This setting controls the way a collection of JSON objects will be treated. The default value is 'setOfObjects'. It is case-sensitive. - internal JsonWriteSettings(string formatWriteSettingsType, IDictionary> additionalProperties, BinaryData filePattern) : base(formatWriteSettingsType, additionalProperties) - { - FilePattern = filePattern; - FormatWriteSettingsType = formatWriteSettingsType ?? "JsonWriteSettings"; - } - - /// - /// File pattern of JSON. This setting controls the way a collection of JSON objects will be treated. The default value is 'setOfObjects'. It is case-sensitive. - /// - /// To assign an object to this property use . - /// - /// - /// To assign an already formated json string to this property use . - /// - /// - /// Examples: - /// - /// - /// BinaryData.FromObjectAsJson("foo") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromString("\"foo\"") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromObjectAsJson(new { key = "value" }) - /// Creates a payload of { "key": "value" }. - /// - /// - /// BinaryData.FromString("{\"key\": \"value\"}") - /// Creates a payload of { "key": "value" }. - /// - /// - /// - /// - public BinaryData FilePattern { get; set; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/LinkedIntegrationRuntime.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/LinkedIntegrationRuntime.Serialization.cs deleted file mode 100644 index dafec473..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/LinkedIntegrationRuntime.Serialization.cs +++ /dev/null @@ -1,62 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class LinkedIntegrationRuntime - { - internal static LinkedIntegrationRuntime DeserializeLinkedIntegrationRuntime(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - Optional name = default; - Optional subscriptionId = default; - Optional dataFactoryName = default; - Optional dataFactoryLocation = default; - Optional createTime = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("name"u8)) - { - name = property.Value.GetString(); - continue; - } - if (property.NameEquals("subscriptionId"u8)) - { - subscriptionId = property.Value.GetString(); - continue; - } - if (property.NameEquals("dataFactoryName"u8)) - { - dataFactoryName = property.Value.GetString(); - continue; - } - if (property.NameEquals("dataFactoryLocation"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - dataFactoryLocation = new AzureLocation(property.Value.GetString()); - continue; - } - if (property.NameEquals("createTime"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - createTime = property.Value.GetDateTimeOffset("O"); - continue; - } - } - return new LinkedIntegrationRuntime(name.Value, subscriptionId.Value, dataFactoryName.Value, Optional.ToNullable(dataFactoryLocation), Optional.ToNullable(createTime)); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/LinkedIntegrationRuntime.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/LinkedIntegrationRuntime.cs deleted file mode 100644 index 970ccb90..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/LinkedIntegrationRuntime.cs +++ /dev/null @@ -1,43 +0,0 @@ -// - -#nullable disable - -using Azure.Core; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// The linked integration runtime information. - public partial class LinkedIntegrationRuntime - { - /// Initializes a new instance of LinkedIntegrationRuntime. - internal LinkedIntegrationRuntime() - { - } - - /// Initializes a new instance of LinkedIntegrationRuntime. - /// The name of the linked integration runtime. - /// The subscription ID for which the linked integration runtime belong to. - /// The name of the data factory for which the linked integration runtime belong to. - /// The location of the data factory for which the linked integration runtime belong to. - /// The creating time of the linked integration runtime. - internal LinkedIntegrationRuntime(string name, string subscriptionId, string dataFactoryName, AzureLocation? dataFactoryLocation, DateTimeOffset? createdOn) - { - Name = name; - SubscriptionId = subscriptionId; - DataFactoryName = dataFactoryName; - DataFactoryLocation = dataFactoryLocation; - CreatedOn = createdOn; - } - - /// The name of the linked integration runtime. - public string Name { get; } - /// The subscription ID for which the linked integration runtime belong to. - public string SubscriptionId { get; } - /// The name of the data factory for which the linked integration runtime belong to. - public string DataFactoryName { get; } - /// The location of the data factory for which the linked integration runtime belong to. - public AzureLocation? DataFactoryLocation { get; } - /// The creating time of the linked integration runtime. - public DateTimeOffset? CreatedOn { get; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/LinkedIntegrationRuntimeContent.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/LinkedIntegrationRuntimeContent.Serialization.cs deleted file mode 100644 index 8b1f46e8..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/LinkedIntegrationRuntimeContent.Serialization.cs +++ /dev/null @@ -1,20 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class LinkedIntegrationRuntimeContent : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - writer.WritePropertyName("factoryName"u8); - writer.WriteStringValue(LinkedFactoryName); - writer.WriteEndObject(); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/LinkedIntegrationRuntimeContent.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/LinkedIntegrationRuntimeContent.cs deleted file mode 100644 index af08b7a1..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/LinkedIntegrationRuntimeContent.cs +++ /dev/null @@ -1,25 +0,0 @@ -// - -#nullable disable - -using Azure.Core; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// Data factory name for linked integration runtime request. - public partial class LinkedIntegrationRuntimeContent - { - /// Initializes a new instance of LinkedIntegrationRuntimeContent. - /// The data factory name for linked integration runtime. - /// is null. - public LinkedIntegrationRuntimeContent(string linkedFactoryName) - { - Argument.AssertNotNull(linkedFactoryName, nameof(linkedFactoryName)); - - LinkedFactoryName = linkedFactoryName; - } - - /// The data factory name for linked integration runtime. - public string LinkedFactoryName { get; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/LinkedIntegrationRuntimeKeyAuthorization.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/LinkedIntegrationRuntimeKeyAuthorization.Serialization.cs deleted file mode 100644 index d16d1723..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/LinkedIntegrationRuntimeKeyAuthorization.Serialization.cs +++ /dev/null @@ -1,46 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class LinkedIntegrationRuntimeKeyAuthorization : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - writer.WritePropertyName("key"u8); - JsonSerializer.Serialize(writer, Key); writer.WritePropertyName("authorizationType"u8); - writer.WriteStringValue(AuthorizationType); - writer.WriteEndObject(); - } - - internal static LinkedIntegrationRuntimeKeyAuthorization DeserializeLinkedIntegrationRuntimeKeyAuthorization(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - DataFactorySecretString key = default; - string authorizationType = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("key"u8)) - { - key = JsonSerializer.Deserialize(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("authorizationType"u8)) - { - authorizationType = property.Value.GetString(); - continue; - } - } - return new LinkedIntegrationRuntimeKeyAuthorization(authorizationType, key); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/LinkedIntegrationRuntimeKeyAuthorization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/LinkedIntegrationRuntimeKeyAuthorization.cs deleted file mode 100644 index 4aa0f512..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/LinkedIntegrationRuntimeKeyAuthorization.cs +++ /dev/null @@ -1,36 +0,0 @@ -// - -#nullable disable - -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// The key authorization type integration runtime. - public partial class LinkedIntegrationRuntimeKeyAuthorization : LinkedIntegrationRuntimeType - { - /// Initializes a new instance of LinkedIntegrationRuntimeKeyAuthorization. - /// The key used for authorization. - /// is null. - public LinkedIntegrationRuntimeKeyAuthorization(DataFactorySecretString key) - { - Argument.AssertNotNull(key, nameof(key)); - - Key = key; - AuthorizationType = "Key"; - } - - /// Initializes a new instance of LinkedIntegrationRuntimeKeyAuthorization. - /// The authorization type for integration runtime sharing. - /// The key used for authorization. - internal LinkedIntegrationRuntimeKeyAuthorization(string authorizationType, DataFactorySecretString key) : base(authorizationType) - { - Key = key; - AuthorizationType = authorizationType ?? "Key"; - } - - /// The key used for authorization. - public DataFactorySecretString Key { get; set; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/LinkedIntegrationRuntimeRbacAuthorization.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/LinkedIntegrationRuntimeRbacAuthorization.Serialization.cs deleted file mode 100644 index 914b5aab..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/LinkedIntegrationRuntimeRbacAuthorization.Serialization.cs +++ /dev/null @@ -1,61 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class LinkedIntegrationRuntimeRbacAuthorization : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - writer.WritePropertyName("resourceId"u8); - writer.WriteStringValue(ResourceId); - if (Optional.IsDefined(Credential)) - { - writer.WritePropertyName("credential"u8); - writer.WriteObjectValue(Credential); - } - writer.WritePropertyName("authorizationType"u8); - writer.WriteStringValue(AuthorizationType); - writer.WriteEndObject(); - } - - internal static LinkedIntegrationRuntimeRbacAuthorization DeserializeLinkedIntegrationRuntimeRbacAuthorization(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - ResourceIdentifier resourceId = default; - Optional credential = default; - string authorizationType = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("resourceId"u8)) - { - resourceId = new ResourceIdentifier(property.Value.GetString()); - continue; - } - if (property.NameEquals("credential"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - credential = DataFactoryCredentialReference.DeserializeDataFactoryCredentialReference(property.Value); - continue; - } - if (property.NameEquals("authorizationType"u8)) - { - authorizationType = property.Value.GetString(); - continue; - } - } - return new LinkedIntegrationRuntimeRbacAuthorization(authorizationType, resourceId, credential.Value); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/LinkedIntegrationRuntimeRbacAuthorization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/LinkedIntegrationRuntimeRbacAuthorization.cs deleted file mode 100644 index 85023e3a..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/LinkedIntegrationRuntimeRbacAuthorization.cs +++ /dev/null @@ -1,39 +0,0 @@ -// - -#nullable disable - -using Azure.Core; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// The role based access control (RBAC) authorization type integration runtime. - public partial class LinkedIntegrationRuntimeRbacAuthorization : LinkedIntegrationRuntimeType - { - /// Initializes a new instance of LinkedIntegrationRuntimeRbacAuthorization. - /// The resource identifier of the integration runtime to be shared. - /// is null. - public LinkedIntegrationRuntimeRbacAuthorization(ResourceIdentifier resourceId) - { - Argument.AssertNotNull(resourceId, nameof(resourceId)); - - ResourceId = resourceId; - AuthorizationType = "RBAC"; - } - - /// Initializes a new instance of LinkedIntegrationRuntimeRbacAuthorization. - /// The authorization type for integration runtime sharing. - /// The resource identifier of the integration runtime to be shared. - /// The credential reference containing authentication information. - internal LinkedIntegrationRuntimeRbacAuthorization(string authorizationType, ResourceIdentifier resourceId, DataFactoryCredentialReference credential) : base(authorizationType) - { - ResourceId = resourceId; - Credential = credential; - AuthorizationType = authorizationType ?? "RBAC"; - } - - /// The resource identifier of the integration runtime to be shared. - public ResourceIdentifier ResourceId { get; set; } - /// The credential reference containing authentication information. - public DataFactoryCredentialReference Credential { get; set; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/LinkedIntegrationRuntimeType.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/LinkedIntegrationRuntimeType.Serialization.cs deleted file mode 100644 index 643263b9..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/LinkedIntegrationRuntimeType.Serialization.cs +++ /dev/null @@ -1,37 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class LinkedIntegrationRuntimeType : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - writer.WritePropertyName("authorizationType"u8); - writer.WriteStringValue(AuthorizationType); - writer.WriteEndObject(); - } - - internal static LinkedIntegrationRuntimeType DeserializeLinkedIntegrationRuntimeType(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - if (element.TryGetProperty("authorizationType", out JsonElement discriminator)) - { - switch (discriminator.GetString()) - { - case "Key": return LinkedIntegrationRuntimeKeyAuthorization.DeserializeLinkedIntegrationRuntimeKeyAuthorization(element); - case "RBAC": return LinkedIntegrationRuntimeRbacAuthorization.DeserializeLinkedIntegrationRuntimeRbacAuthorization(element); - } - } - return UnknownLinkedIntegrationRuntimeType.DeserializeUnknownLinkedIntegrationRuntimeType(element); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/LinkedIntegrationRuntimeType.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/LinkedIntegrationRuntimeType.cs deleted file mode 100644 index 801e56d3..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/LinkedIntegrationRuntimeType.cs +++ /dev/null @@ -1,29 +0,0 @@ -// - -#nullable disable - -namespace AzureDataFactory.TestingFramework.Models -{ - /// - /// The base definition of a linked integration runtime. - /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. - /// The available derived classes include and . - /// - public abstract partial class LinkedIntegrationRuntimeType - { - /// Initializes a new instance of LinkedIntegrationRuntimeType. - protected LinkedIntegrationRuntimeType() - { - } - - /// Initializes a new instance of LinkedIntegrationRuntimeType. - /// The authorization type for integration runtime sharing. - internal LinkedIntegrationRuntimeType(string authorizationType) - { - AuthorizationType = authorizationType; - } - - /// The authorization type for integration runtime sharing. - internal string AuthorizationType { get; set; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/LogLocationSettings.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/LogLocationSettings.Serialization.cs deleted file mode 100644 index 9f23ab57..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/LogLocationSettings.Serialization.cs +++ /dev/null @@ -1,53 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class LogLocationSettings : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - writer.WritePropertyName("linkedServiceName"u8); - JsonSerializer.Serialize(writer, LinkedServiceName); if (Optional.IsDefined(Path)) - { - writer.WritePropertyName("path"u8); - JsonSerializer.Serialize(writer, Path); - } - writer.WriteEndObject(); - } - - internal static LogLocationSettings DeserializeLogLocationSettings(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - DataFactoryLinkedServiceReference linkedServiceName = default; - Optional> path = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("linkedServiceName"u8)) - { - linkedServiceName = JsonSerializer.Deserialize(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("path"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - path = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - } - return new LogLocationSettings(linkedServiceName, path.Value); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/LogLocationSettings.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/LogLocationSettings.cs deleted file mode 100644 index 5d9d7561..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/LogLocationSettings.cs +++ /dev/null @@ -1,37 +0,0 @@ -// - -#nullable disable - -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// Log location settings. - public partial class LogLocationSettings - { - /// Initializes a new instance of LogLocationSettings. - /// Log storage linked service reference. - /// is null. - public LogLocationSettings(DataFactoryLinkedServiceReference linkedServiceName) - { - Argument.AssertNotNull(linkedServiceName, nameof(linkedServiceName)); - - LinkedServiceName = linkedServiceName; - } - - /// Initializes a new instance of LogLocationSettings. - /// Log storage linked service reference. - /// The path to storage for storing detailed logs of activity execution. Type: string (or Expression with resultType string). - internal LogLocationSettings(DataFactoryLinkedServiceReference linkedServiceName, DataFactoryElement path) - { - LinkedServiceName = linkedServiceName; - Path = path; - } - - /// Log storage linked service reference. - public DataFactoryLinkedServiceReference LinkedServiceName { get; set; } - /// The path to storage for storing detailed logs of activity execution. Type: string (or Expression with resultType string). - public DataFactoryElement Path { get; set; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/LogStorageSettings.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/LogStorageSettings.Serialization.cs deleted file mode 100644 index 4ac5b9fa..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/LogStorageSettings.Serialization.cs +++ /dev/null @@ -1,96 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class LogStorageSettings : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - writer.WritePropertyName("linkedServiceName"u8); - JsonSerializer.Serialize(writer, LinkedServiceName); if (Optional.IsDefined(Path)) - { - writer.WritePropertyName("path"u8); - JsonSerializer.Serialize(writer, Path); - } - if (Optional.IsDefined(LogLevel)) - { - writer.WritePropertyName("logLevel"u8); - JsonSerializer.Serialize(writer, LogLevel); - } - if (Optional.IsDefined(EnableReliableLogging)) - { - writer.WritePropertyName("enableReliableLogging"u8); - JsonSerializer.Serialize(writer, EnableReliableLogging); - } - foreach (var item in AdditionalProperties) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.Value.ToString()).RootElement); -#endif - } - writer.WriteEndObject(); - } - - internal static LogStorageSettings DeserializeLogStorageSettings(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - DataFactoryLinkedServiceReference linkedServiceName = default; - Optional> path = default; - Optional> logLevel = default; - Optional> enableReliableLogging = default; - IDictionary> additionalProperties = default; - Dictionary> additionalPropertiesDictionary = new Dictionary>(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("linkedServiceName"u8)) - { - linkedServiceName = JsonSerializer.Deserialize(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("path"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - path = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("logLevel"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - logLevel = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("enableReliableLogging"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - enableReliableLogging = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - additionalPropertiesDictionary.Add(property.Name, JsonSerializer.Deserialize>(property.Value.GetRawText())); - } - additionalProperties = additionalPropertiesDictionary; - return new LogStorageSettings(linkedServiceName, path.Value, logLevel.Value, enableReliableLogging.Value, additionalProperties); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/LogStorageSettings.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/LogStorageSettings.cs deleted file mode 100644 index d8bb231d..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/LogStorageSettings.cs +++ /dev/null @@ -1,79 +0,0 @@ -// - -#nullable disable - -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// (Deprecated. Please use LogSettings) Log storage settings. - public partial class LogStorageSettings - { - /// Initializes a new instance of LogStorageSettings. - /// Log storage linked service reference. - /// is null. - public LogStorageSettings(DataFactoryLinkedServiceReference linkedServiceName) - { - Argument.AssertNotNull(linkedServiceName, nameof(linkedServiceName)); - - LinkedServiceName = linkedServiceName; - AdditionalProperties = new ChangeTrackingDictionary>(); - } - - /// Initializes a new instance of LogStorageSettings. - /// Log storage linked service reference. - /// The path to storage for storing detailed logs of activity execution. Type: string (or Expression with resultType string). - /// Gets or sets the log level, support: Info, Warning. Type: string (or Expression with resultType string). - /// Specifies whether to enable reliable logging. Type: boolean (or Expression with resultType boolean). - /// Additional Properties. - internal LogStorageSettings(DataFactoryLinkedServiceReference linkedServiceName, DataFactoryElement path, DataFactoryElement logLevel, DataFactoryElement enableReliableLogging, IDictionary> additionalProperties) - { - LinkedServiceName = linkedServiceName; - Path = path; - LogLevel = logLevel; - EnableReliableLogging = enableReliableLogging; - AdditionalProperties = additionalProperties; - } - - /// Log storage linked service reference. - public DataFactoryLinkedServiceReference LinkedServiceName { get; set; } - /// The path to storage for storing detailed logs of activity execution. Type: string (or Expression with resultType string). - public DataFactoryElement Path { get; set; } - /// Gets or sets the log level, support: Info, Warning. Type: string (or Expression with resultType string). - public DataFactoryElement LogLevel { get; set; } - /// Specifies whether to enable reliable logging. Type: boolean (or Expression with resultType boolean). - public DataFactoryElement EnableReliableLogging { get; set; } - /// - /// Additional Properties - /// - /// To assign an object to the value of this property use . - /// - /// - /// To assign an already formated json string to this property use . - /// - /// - /// Examples: - /// - /// - /// BinaryData.FromObjectAsJson("foo") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromString("\"foo\"") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromObjectAsJson(new { key = "value" }) - /// Creates a payload of { "key": "value" }. - /// - /// - /// BinaryData.FromString("{\"key\": \"value\"}") - /// Creates a payload of { "key": "value" }. - /// - /// - /// - /// - public IDictionary> AdditionalProperties { get; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/LookupActivity.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/LookupActivity.Serialization.cs deleted file mode 100644 index c0f103fe..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/LookupActivity.Serialization.cs +++ /dev/null @@ -1,227 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class LookupActivity : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - if (Optional.IsDefined(LinkedServiceName)) - { - writer.WritePropertyName("linkedServiceName"u8); - JsonSerializer.Serialize(writer, LinkedServiceName); - } - if (Optional.IsDefined(Policy)) - { - writer.WritePropertyName("policy"u8); - writer.WriteObjectValue(Policy); - } - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ActivityType); - if (Optional.IsDefined(Description)) - { - writer.WritePropertyName("description"u8); - writer.WriteStringValue(Description); - } - if (Optional.IsDefined(State)) - { - writer.WritePropertyName("state"u8); - writer.WriteStringValue(State.Value.ToString()); - } - if (Optional.IsDefined(OnInactiveMarkAs)) - { - writer.WritePropertyName("onInactiveMarkAs"u8); - writer.WriteStringValue(OnInactiveMarkAs.Value.ToString()); - } - if (Optional.IsCollectionDefined(DependsOn)) - { - writer.WritePropertyName("dependsOn"u8); - writer.WriteStartArray(); - foreach (var item in DependsOn) - { - writer.WriteObjectValue(item); - } - writer.WriteEndArray(); - } - if (Optional.IsCollectionDefined(UserProperties)) - { - writer.WritePropertyName("userProperties"u8); - writer.WriteStartArray(); - foreach (var item in UserProperties) - { - writer.WriteObjectValue(item); - } - writer.WriteEndArray(); - } - writer.WritePropertyName("typeProperties"u8); - writer.WriteStartObject(); - writer.WritePropertyName("source"u8); - writer.WriteObjectValue(Source); - writer.WritePropertyName("dataset"u8); - writer.WriteObjectValue(Dataset); - if (Optional.IsDefined(FirstRowOnly)) - { - writer.WritePropertyName("firstRowOnly"u8); - JsonSerializer.Serialize(writer, FirstRowOnly); - } - writer.WriteEndObject(); - foreach (var item in AdditionalProperties) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.Value.ToString()).RootElement); -#endif - } - writer.WriteEndObject(); - } - - internal static LookupActivity DeserializeLookupActivity(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - Optional linkedServiceName = default; - Optional policy = default; - string name = default; - string type = default; - Optional description = default; - Optional state = default; - Optional onInactiveMarkAs = default; - Optional> dependsOn = default; - Optional> userProperties = default; - CopyActivitySource source = default; - DatasetReference dataset = default; - Optional> firstRowOnly = default; - IDictionary> additionalProperties = default; - Dictionary> additionalPropertiesDictionary = new Dictionary>(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("linkedServiceName"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - linkedServiceName = JsonSerializer.Deserialize(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("policy"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - policy = PipelineActivityPolicy.DeserializePipelineActivityPolicy(property.Value); - continue; - } - if (property.NameEquals("name"u8)) - { - name = property.Value.GetString(); - continue; - } - if (property.NameEquals("type"u8)) - { - type = property.Value.GetString(); - continue; - } - if (property.NameEquals("description"u8)) - { - description = property.Value.GetString(); - continue; - } - if (property.NameEquals("state"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - state = new PipelineActivityState(property.Value.GetString()); - continue; - } - if (property.NameEquals("onInactiveMarkAs"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - onInactiveMarkAs = new ActivityOnInactiveMarkAs(property.Value.GetString()); - continue; - } - if (property.NameEquals("dependsOn"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - array.Add(PipelineActivityDependency.DeserializePipelineActivityDependency(item)); - } - dependsOn = array; - continue; - } - if (property.NameEquals("userProperties"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - array.Add(PipelineActivityUserProperty.DeserializePipelineActivityUserProperty(item)); - } - userProperties = array; - continue; - } - if (property.NameEquals("typeProperties"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - foreach (var property0 in property.Value.EnumerateObject()) - { - if (property0.NameEquals("source"u8)) - { - source = CopyActivitySource.DeserializeCopyActivitySource(property0.Value); - continue; - } - if (property0.NameEquals("dataset"u8)) - { - dataset = DatasetReference.DeserializeDatasetReference(property0.Value); - continue; - } - if (property0.NameEquals("firstRowOnly"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - firstRowOnly = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - } - continue; - } - additionalPropertiesDictionary.Add(property.Name, JsonSerializer.Deserialize>(property.Value.GetRawText())); - } - additionalProperties = additionalPropertiesDictionary; - return new LookupActivity(name, type, description.Value, Optional.ToNullable(state), Optional.ToNullable(onInactiveMarkAs), Optional.ToList(dependsOn), Optional.ToList(userProperties), additionalProperties, linkedServiceName, policy.Value, source, dataset, firstRowOnly.Value); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/LookupActivity.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/LookupActivity.cs deleted file mode 100644 index 242a2d92..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/LookupActivity.cs +++ /dev/null @@ -1,70 +0,0 @@ -// - -#nullable disable - -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// Lookup activity. - public partial class LookupActivity : ExecutionActivity - { - /// Initializes a new instance of LookupActivity. - /// Activity name. - /// - /// Dataset-specific source properties, same as copy activity source. - /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. - /// The available derived classes include , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , and . - /// - /// Lookup activity dataset reference. - /// , or is null. - public LookupActivity(string name, CopyActivitySource source, DatasetReference dataset) : base(name) - { - Argument.AssertNotNull(name, nameof(name)); - Argument.AssertNotNull(source, nameof(source)); - Argument.AssertNotNull(dataset, nameof(dataset)); - - Source = source; - Dataset = dataset; - ActivityType = "Lookup"; - } - - /// Initializes a new instance of LookupActivity. - /// Activity name. - /// Type of activity. - /// Activity description. - /// Activity state. This is an optional property and if not provided, the state will be Active by default. - /// 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. - /// Activity depends on condition. - /// Activity user properties. - /// Additional Properties. - /// Linked service reference. - /// Activity policy. - /// - /// Dataset-specific source properties, same as copy activity source. - /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. - /// The available derived classes include , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , and . - /// - /// Lookup activity dataset reference. - /// Whether to return first row or all rows. Default value is true. Type: boolean (or Expression with resultType boolean). - internal LookupActivity(string name, string activityType, string description, PipelineActivityState? state, ActivityOnInactiveMarkAs? onInactiveMarkAs, IList dependsOn, IList userProperties, IDictionary> additionalProperties, DataFactoryLinkedServiceReference linkedServiceName, PipelineActivityPolicy policy, CopyActivitySource source, DatasetReference dataset, DataFactoryElement firstRowOnly) : base(name, activityType, description, state, onInactiveMarkAs, dependsOn, userProperties, additionalProperties, linkedServiceName, policy) - { - Source = source; - Dataset = dataset; - FirstRowOnly = firstRowOnly; - ActivityType = activityType ?? "Lookup"; - } - - /// - /// Dataset-specific source properties, same as copy activity source. - /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. - /// The available derived classes include , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , and . - /// - public CopyActivitySource Source { get; set; } - /// Lookup activity dataset reference. - public DatasetReference Dataset { get; set; } - /// Whether to return first row or all rows. Default value is true. Type: boolean (or Expression with resultType boolean). - public DataFactoryElement FirstRowOnly { get; set; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/MagentoLinkedService.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/MagentoLinkedService.Serialization.cs deleted file mode 100644 index db18dbc4..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/MagentoLinkedService.Serialization.cs +++ /dev/null @@ -1,239 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class MagentoLinkedService : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - writer.WritePropertyName("type"u8); - writer.WriteStringValue(LinkedServiceType); - if (Optional.IsDefined(ConnectVia)) - { - writer.WritePropertyName("connectVia"u8); - writer.WriteObjectValue(ConnectVia); - } - if (Optional.IsDefined(Description)) - { - writer.WritePropertyName("description"u8); - writer.WriteStringValue(Description); - } - if (Optional.IsCollectionDefined(Parameters)) - { - writer.WritePropertyName("parameters"u8); - writer.WriteStartObject(); - foreach (var item in Parameters) - { - writer.WritePropertyName(item.Key); - writer.WriteObjectValue(item.Value); - } - writer.WriteEndObject(); - } - if (Optional.IsCollectionDefined(Annotations)) - { - writer.WritePropertyName("annotations"u8); - writer.WriteStartArray(); - foreach (var item in Annotations) - { - if (item == null) - { - writer.WriteNullValue(); - continue; - } -#if NET6_0_OR_GREATER - writer.WriteRawValue(item); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.ToString()).RootElement); -#endif - } - writer.WriteEndArray(); - } - writer.WritePropertyName("typeProperties"u8); - writer.WriteStartObject(); - writer.WritePropertyName("host"u8); - JsonSerializer.Serialize(writer, Host); - if (Optional.IsDefined(AccessToken)) - { - writer.WritePropertyName("accessToken"u8); - JsonSerializer.Serialize(writer, AccessToken); - } - if (Optional.IsDefined(UseEncryptedEndpoints)) - { - writer.WritePropertyName("useEncryptedEndpoints"u8); - JsonSerializer.Serialize(writer, UseEncryptedEndpoints); - } - if (Optional.IsDefined(UseHostVerification)) - { - writer.WritePropertyName("useHostVerification"u8); - JsonSerializer.Serialize(writer, UseHostVerification); - } - if (Optional.IsDefined(UsePeerVerification)) - { - writer.WritePropertyName("usePeerVerification"u8); - JsonSerializer.Serialize(writer, UsePeerVerification); - } - if (Optional.IsDefined(EncryptedCredential)) - { - writer.WritePropertyName("encryptedCredential"u8); - writer.WriteStringValue(EncryptedCredential); - } - writer.WriteEndObject(); - foreach (var item in AdditionalProperties) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.Value.ToString()).RootElement); -#endif - } - writer.WriteEndObject(); - } - - internal static MagentoLinkedService DeserializeMagentoLinkedService(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - string type = default; - Optional connectVia = default; - Optional description = default; - Optional> parameters = default; - Optional> annotations = default; - DataFactoryElement host = default; - Optional accessToken = default; - Optional> useEncryptedEndpoints = default; - Optional> useHostVerification = default; - Optional> usePeerVerification = default; - Optional encryptedCredential = default; - IDictionary> additionalProperties = default; - Dictionary> additionalPropertiesDictionary = new Dictionary>(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("type"u8)) - { - type = property.Value.GetString(); - continue; - } - if (property.NameEquals("connectVia"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - connectVia = IntegrationRuntimeReference.DeserializeIntegrationRuntimeReference(property.Value); - continue; - } - if (property.NameEquals("description"u8)) - { - description = property.Value.GetString(); - continue; - } - if (property.NameEquals("parameters"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - Dictionary dictionary = new Dictionary(); - foreach (var property0 in property.Value.EnumerateObject()) - { - dictionary.Add(property0.Name, EntityParameterSpecification.DeserializeEntityParameterSpecification(property0.Value)); - } - parameters = dictionary; - continue; - } - if (property.NameEquals("annotations"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - if (item.ValueKind == JsonValueKind.Null) - { - array.Add(null); - } - else - { - array.Add(BinaryData.FromString(item.GetRawText())); - } - } - annotations = array; - continue; - } - if (property.NameEquals("typeProperties"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - foreach (var property0 in property.Value.EnumerateObject()) - { - if (property0.NameEquals("host"u8)) - { - host = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("accessToken"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - accessToken = JsonSerializer.Deserialize(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("useEncryptedEndpoints"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - useEncryptedEndpoints = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("useHostVerification"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - useHostVerification = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("usePeerVerification"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - usePeerVerification = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("encryptedCredential"u8)) - { - encryptedCredential = property0.Value.GetString(); - continue; - } - } - continue; - } - additionalPropertiesDictionary.Add(property.Name, JsonSerializer.Deserialize>(property.Value.GetRawText())); - } - additionalProperties = additionalPropertiesDictionary; - return new MagentoLinkedService(type, connectVia.Value, description.Value, Optional.ToDictionary(parameters), Optional.ToList(annotations), additionalProperties, host, accessToken, useEncryptedEndpoints.Value, useHostVerification.Value, usePeerVerification.Value, encryptedCredential.Value); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/MagentoLinkedService.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/MagentoLinkedService.cs deleted file mode 100644 index 26d4d501..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/MagentoLinkedService.cs +++ /dev/null @@ -1,61 +0,0 @@ -// - -#nullable disable - -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// Magento server linked service. - public partial class MagentoLinkedService : DataFactoryLinkedServiceProperties - { - /// Initializes a new instance of MagentoLinkedService. - /// The URL of the Magento instance. (i.e. 192.168.222.110/magento3). - /// is null. - public MagentoLinkedService(DataFactoryElement host) - { - Argument.AssertNotNull(host, nameof(host)); - - Host = host; - LinkedServiceType = "Magento"; - } - - /// Initializes a new instance of MagentoLinkedService. - /// Type of linked service. - /// The integration runtime reference. - /// Linked service description. - /// Parameters for linked service. - /// List of tags that can be used for describing the linked service. - /// Additional Properties. - /// The URL of the Magento instance. (i.e. 192.168.222.110/magento3). - /// The access token from Magento. - /// Specifies whether the data source endpoints are encrypted using HTTPS. The default value is true. - /// 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. - /// Specifies whether to verify the identity of the server when connecting over SSL. The default value is true. - /// The encrypted credential used for authentication. Credentials are encrypted using the integration runtime credential manager. Type: string. - internal MagentoLinkedService(string linkedServiceType, IntegrationRuntimeReference connectVia, string description, IDictionary parameters, IList annotations, IDictionary> additionalProperties, DataFactoryElement host, DataFactorySecretBaseDefinition accessToken, DataFactoryElement useEncryptedEndpoints, DataFactoryElement useHostVerification, DataFactoryElement usePeerVerification, string encryptedCredential) : base(linkedServiceType, connectVia, description, parameters, annotations, additionalProperties) - { - Host = host; - AccessToken = accessToken; - UseEncryptedEndpoints = useEncryptedEndpoints; - UseHostVerification = useHostVerification; - UsePeerVerification = usePeerVerification; - EncryptedCredential = encryptedCredential; - LinkedServiceType = linkedServiceType ?? "Magento"; - } - - /// The URL of the Magento instance. (i.e. 192.168.222.110/magento3). - public DataFactoryElement Host { get; set; } - /// The access token from Magento. - public DataFactorySecretBaseDefinition AccessToken { get; set; } - /// Specifies whether the data source endpoints are encrypted using HTTPS. The default value is true. - public DataFactoryElement UseEncryptedEndpoints { get; set; } - /// 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. - public DataFactoryElement UseHostVerification { get; set; } - /// Specifies whether to verify the identity of the server when connecting over SSL. The default value is true. - public DataFactoryElement UsePeerVerification { get; set; } - /// The encrypted credential used for authentication. Credentials are encrypted using the integration runtime credential manager. Type: string. - public string EncryptedCredential { get; set; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/MagentoObjectDataset.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/MagentoObjectDataset.Serialization.cs deleted file mode 100644 index 992a41e4..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/MagentoObjectDataset.Serialization.cs +++ /dev/null @@ -1,212 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class MagentoObjectDataset : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - writer.WritePropertyName("type"u8); - writer.WriteStringValue(DatasetType); - if (Optional.IsDefined(Description)) - { - writer.WritePropertyName("description"u8); - writer.WriteStringValue(Description); - } - if (Optional.IsDefined(Structure)) - { - writer.WritePropertyName("structure"u8); - JsonSerializer.Serialize(writer, Structure); - } - if (Optional.IsDefined(Schema)) - { - writer.WritePropertyName("schema"u8); - JsonSerializer.Serialize(writer, Schema); - } - writer.WritePropertyName("linkedServiceName"u8); - JsonSerializer.Serialize(writer, LinkedServiceName); if (Optional.IsCollectionDefined(Parameters)) - { - writer.WritePropertyName("parameters"u8); - writer.WriteStartObject(); - foreach (var item in Parameters) - { - writer.WritePropertyName(item.Key); - writer.WriteObjectValue(item.Value); - } - writer.WriteEndObject(); - } - if (Optional.IsCollectionDefined(Annotations)) - { - writer.WritePropertyName("annotations"u8); - writer.WriteStartArray(); - foreach (var item in Annotations) - { - if (item == null) - { - writer.WriteNullValue(); - continue; - } -#if NET6_0_OR_GREATER - writer.WriteRawValue(item); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.ToString()).RootElement); -#endif - } - writer.WriteEndArray(); - } - if (Optional.IsDefined(Folder)) - { - writer.WritePropertyName("folder"u8); - writer.WriteObjectValue(Folder); - } - writer.WritePropertyName("typeProperties"u8); - writer.WriteStartObject(); - if (Optional.IsDefined(TableName)) - { - writer.WritePropertyName("tableName"u8); - JsonSerializer.Serialize(writer, TableName); - } - writer.WriteEndObject(); - foreach (var item in AdditionalProperties) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.Value.ToString()).RootElement); -#endif - } - writer.WriteEndObject(); - } - - internal static MagentoObjectDataset DeserializeMagentoObjectDataset(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - string type = default; - Optional description = default; - Optional>> structure = default; - Optional>> schema = default; - DataFactoryLinkedServiceReference linkedServiceName = default; - Optional> parameters = default; - Optional> annotations = default; - Optional folder = default; - Optional> tableName = default; - IDictionary> additionalProperties = default; - Dictionary> additionalPropertiesDictionary = new Dictionary>(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("type"u8)) - { - type = property.Value.GetString(); - continue; - } - if (property.NameEquals("description"u8)) - { - description = property.Value.GetString(); - continue; - } - if (property.NameEquals("structure"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - structure = JsonSerializer.Deserialize>>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("schema"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - schema = JsonSerializer.Deserialize>>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("linkedServiceName"u8)) - { - linkedServiceName = JsonSerializer.Deserialize(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("parameters"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - Dictionary dictionary = new Dictionary(); - foreach (var property0 in property.Value.EnumerateObject()) - { - dictionary.Add(property0.Name, EntityParameterSpecification.DeserializeEntityParameterSpecification(property0.Value)); - } - parameters = dictionary; - continue; - } - if (property.NameEquals("annotations"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - if (item.ValueKind == JsonValueKind.Null) - { - array.Add(null); - } - else - { - array.Add(BinaryData.FromString(item.GetRawText())); - } - } - annotations = array; - continue; - } - if (property.NameEquals("folder"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - folder = DatasetFolder.DeserializeDatasetFolder(property.Value); - continue; - } - if (property.NameEquals("typeProperties"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - foreach (var property0 in property.Value.EnumerateObject()) - { - if (property0.NameEquals("tableName"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - tableName = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - } - continue; - } - additionalPropertiesDictionary.Add(property.Name, JsonSerializer.Deserialize>(property.Value.GetRawText())); - } - additionalProperties = additionalPropertiesDictionary; - return new MagentoObjectDataset(type, description.Value, structure.Value, schema.Value, linkedServiceName, Optional.ToDictionary(parameters), Optional.ToList(annotations), folder.Value, additionalProperties, tableName.Value); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/MagentoObjectDataset.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/MagentoObjectDataset.cs deleted file mode 100644 index cf5506bf..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/MagentoObjectDataset.cs +++ /dev/null @@ -1,43 +0,0 @@ -// - -#nullable disable - -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// Magento server dataset. - public partial class MagentoObjectDataset : DataFactoryDatasetProperties - { - /// Initializes a new instance of MagentoObjectDataset. - /// Linked service reference. - /// is null. - public MagentoObjectDataset(DataFactoryLinkedServiceReference linkedServiceName) : base(linkedServiceName) - { - Argument.AssertNotNull(linkedServiceName, nameof(linkedServiceName)); - - DatasetType = "MagentoObject"; - } - - /// Initializes a new instance of MagentoObjectDataset. - /// Type of dataset. - /// Dataset description. - /// Columns that define the structure of the dataset. Type: array (or Expression with resultType array), itemType: DatasetDataElement. - /// Columns that define the physical type schema of the dataset. Type: array (or Expression with resultType array), itemType: DatasetSchemaDataElement. - /// Linked service reference. - /// Parameters for dataset. - /// List of tags that can be used for describing the Dataset. - /// The folder that this Dataset is in. If not specified, Dataset will appear at the root level. - /// Additional Properties. - /// The table name. Type: string (or Expression with resultType string). - internal MagentoObjectDataset(string datasetType, string description, DataFactoryElement> structure, DataFactoryElement> schema, DataFactoryLinkedServiceReference linkedServiceName, IDictionary parameters, IList annotations, DatasetFolder folder, IDictionary> additionalProperties, DataFactoryElement tableName) : base(datasetType, description, structure, schema, linkedServiceName, parameters, annotations, folder, additionalProperties) - { - TableName = tableName; - DatasetType = datasetType ?? "MagentoObject"; - } - - /// The table name. Type: string (or Expression with resultType string). - public DataFactoryElement TableName { get; set; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/MagentoSource.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/MagentoSource.Serialization.cs deleted file mode 100644 index 8a2b00d5..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/MagentoSource.Serialization.cs +++ /dev/null @@ -1,161 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class MagentoSource : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - if (Optional.IsDefined(Query)) - { - writer.WritePropertyName("query"u8); - JsonSerializer.Serialize(writer, Query); - } - if (Optional.IsDefined(QueryTimeout)) - { - writer.WritePropertyName("queryTimeout"u8); - JsonSerializer.Serialize(writer, QueryTimeout); - } - if (Optional.IsDefined(AdditionalColumns)) - { - writer.WritePropertyName("additionalColumns"u8); -#if NET6_0_OR_GREATER - writer.WriteRawValue(AdditionalColumns); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(AdditionalColumns.ToString()).RootElement); -#endif - } - writer.WritePropertyName("type"u8); - writer.WriteStringValue(CopySourceType); - if (Optional.IsDefined(SourceRetryCount)) - { - writer.WritePropertyName("sourceRetryCount"u8); - JsonSerializer.Serialize(writer, SourceRetryCount); - } - if (Optional.IsDefined(SourceRetryWait)) - { - writer.WritePropertyName("sourceRetryWait"u8); - JsonSerializer.Serialize(writer, SourceRetryWait); - } - if (Optional.IsDefined(MaxConcurrentConnections)) - { - writer.WritePropertyName("maxConcurrentConnections"u8); - JsonSerializer.Serialize(writer, MaxConcurrentConnections); - } - if (Optional.IsDefined(DisableMetricsCollection)) - { - writer.WritePropertyName("disableMetricsCollection"u8); - JsonSerializer.Serialize(writer, DisableMetricsCollection); - } - foreach (var item in AdditionalProperties) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.Value.ToString()).RootElement); -#endif - } - writer.WriteEndObject(); - } - - internal static MagentoSource DeserializeMagentoSource(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - Optional> query = default; - Optional> queryTimeout = default; - Optional additionalColumns = default; - string type = default; - Optional> sourceRetryCount = default; - Optional> sourceRetryWait = default; - Optional> maxConcurrentConnections = default; - Optional> disableMetricsCollection = default; - IDictionary> additionalProperties = default; - Dictionary> additionalPropertiesDictionary = new Dictionary>(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("query"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - query = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("queryTimeout"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - queryTimeout = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("additionalColumns"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - additionalColumns = BinaryData.FromString(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("type"u8)) - { - type = property.Value.GetString(); - continue; - } - if (property.NameEquals("sourceRetryCount"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - sourceRetryCount = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("sourceRetryWait"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - sourceRetryWait = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("maxConcurrentConnections"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - maxConcurrentConnections = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("disableMetricsCollection"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - disableMetricsCollection = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - additionalPropertiesDictionary.Add(property.Name, JsonSerializer.Deserialize>(property.Value.GetRawText())); - } - additionalProperties = additionalPropertiesDictionary; - return new MagentoSource(type, sourceRetryCount.Value, sourceRetryWait.Value, maxConcurrentConnections.Value, disableMetricsCollection.Value, additionalProperties, queryTimeout.Value, additionalColumns.Value, query.Value); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/MagentoSource.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/MagentoSource.cs deleted file mode 100644 index d13cc8b1..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/MagentoSource.cs +++ /dev/null @@ -1,37 +0,0 @@ -// - -#nullable disable - -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// A copy activity Magento server source. - public partial class MagentoSource : TabularSource - { - /// Initializes a new instance of MagentoSource. - public MagentoSource() - { - CopySourceType = "MagentoSource"; - } - - /// Initializes a new instance of MagentoSource. - /// Copy source type. - /// Source retry count. Type: integer (or Expression with resultType integer). - /// Source retry wait. Type: string (or Expression with resultType string), pattern: ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). - /// The maximum concurrent connection count for the source data store. Type: integer (or Expression with resultType integer). - /// If true, disable data store metrics collection. Default is false. Type: boolean (or Expression with resultType boolean). - /// Additional Properties. - /// 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). - /// A query to retrieve data from source. Type: string (or Expression with resultType string). - internal MagentoSource(string copySourceType, DataFactoryElement sourceRetryCount, DataFactoryElement sourceRetryWait, DataFactoryElement maxConcurrentConnections, DataFactoryElement disableMetricsCollection, IDictionary> additionalProperties, DataFactoryElement queryTimeout, BinaryData additionalColumns, DataFactoryElement query) : base(copySourceType, sourceRetryCount, sourceRetryWait, maxConcurrentConnections, disableMetricsCollection, additionalProperties, queryTimeout, additionalColumns) - { - Query = query; - CopySourceType = copySourceType ?? "MagentoSource"; - } - - /// A query to retrieve data from source. Type: string (or Expression with resultType string). - public DataFactoryElement Query { get; set; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/ManagedIntegrationRuntime.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/ManagedIntegrationRuntime.Serialization.cs deleted file mode 100644 index 5beb321c..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/ManagedIntegrationRuntime.Serialization.cs +++ /dev/null @@ -1,148 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class ManagedIntegrationRuntime : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - if (Optional.IsDefined(ManagedVirtualNetwork)) - { - writer.WritePropertyName("managedVirtualNetwork"u8); - writer.WriteObjectValue(ManagedVirtualNetwork); - } - writer.WritePropertyName("type"u8); - writer.WriteStringValue(IntegrationRuntimeType.ToString()); - if (Optional.IsDefined(Description)) - { - writer.WritePropertyName("description"u8); - writer.WriteStringValue(Description); - } - writer.WritePropertyName("typeProperties"u8); - writer.WriteStartObject(); - if (Optional.IsDefined(ComputeProperties)) - { - writer.WritePropertyName("computeProperties"u8); - writer.WriteObjectValue(ComputeProperties); - } - if (Optional.IsDefined(SsisProperties)) - { - writer.WritePropertyName("ssisProperties"u8); - writer.WriteObjectValue(SsisProperties); - } - if (Optional.IsDefined(CustomerVirtualNetwork)) - { - writer.WritePropertyName("customerVirtualNetwork"u8); - writer.WriteObjectValue(CustomerVirtualNetwork); - } - writer.WriteEndObject(); - foreach (var item in AdditionalProperties) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.Value.ToString()).RootElement); -#endif - } - writer.WriteEndObject(); - } - - internal static ManagedIntegrationRuntime DeserializeManagedIntegrationRuntime(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - Optional state = default; - Optional managedVirtualNetwork = default; - IntegrationRuntimeType type = default; - Optional description = default; - Optional computeProperties = default; - Optional ssisProperties = default; - Optional customerVirtualNetwork = default; - IDictionary> additionalProperties = default; - Dictionary> additionalPropertiesDictionary = new Dictionary>(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("state"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - state = new IntegrationRuntimeState(property.Value.GetString()); - continue; - } - if (property.NameEquals("managedVirtualNetwork"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - managedVirtualNetwork = ManagedVirtualNetworkReference.DeserializeManagedVirtualNetworkReference(property.Value); - continue; - } - if (property.NameEquals("type"u8)) - { - type = new IntegrationRuntimeType(property.Value.GetString()); - continue; - } - if (property.NameEquals("description"u8)) - { - description = property.Value.GetString(); - continue; - } - if (property.NameEquals("typeProperties"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - foreach (var property0 in property.Value.EnumerateObject()) - { - if (property0.NameEquals("computeProperties"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - computeProperties = IntegrationRuntimeComputeProperties.DeserializeIntegrationRuntimeComputeProperties(property0.Value); - continue; - } - if (property0.NameEquals("ssisProperties"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - ssisProperties = IntegrationRuntimeSsisProperties.DeserializeIntegrationRuntimeSsisProperties(property0.Value); - continue; - } - if (property0.NameEquals("customerVirtualNetwork"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - customerVirtualNetwork = IntegrationRuntimeCustomerVirtualNetwork.DeserializeIntegrationRuntimeCustomerVirtualNetwork(property0.Value); - continue; - } - } - continue; - } - additionalPropertiesDictionary.Add(property.Name, JsonSerializer.Deserialize>(property.Value.GetRawText())); - } - additionalProperties = additionalPropertiesDictionary; - return new ManagedIntegrationRuntime(type, description.Value, additionalProperties, Optional.ToNullable(state), managedVirtualNetwork.Value, computeProperties.Value, ssisProperties.Value, customerVirtualNetwork.Value); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/ManagedIntegrationRuntime.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/ManagedIntegrationRuntime.cs deleted file mode 100644 index 47e16b57..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/ManagedIntegrationRuntime.cs +++ /dev/null @@ -1,60 +0,0 @@ -// - -#nullable disable - -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// Managed integration runtime, including managed elastic and managed dedicated integration runtimes. - public partial class ManagedIntegrationRuntime : DataFactoryIntegrationRuntimeProperties - { - /// Initializes a new instance of ManagedIntegrationRuntime. - public ManagedIntegrationRuntime() - { - IntegrationRuntimeType = IntegrationRuntimeType.Managed; - } - - /// Initializes a new instance of ManagedIntegrationRuntime. - /// Type of integration runtime. - /// Integration runtime description. - /// Additional Properties. - /// Integration runtime state, only valid for managed dedicated integration runtime. - /// Managed Virtual Network reference. - /// The compute resource for managed integration runtime. - /// SSIS properties for managed integration runtime. - /// The name of virtual network to which Azure-SSIS integration runtime will join. - internal ManagedIntegrationRuntime(IntegrationRuntimeType integrationRuntimeType, string description, IDictionary> additionalProperties, IntegrationRuntimeState? state, ManagedVirtualNetworkReference managedVirtualNetwork, IntegrationRuntimeComputeProperties computeProperties, IntegrationRuntimeSsisProperties ssisProperties, IntegrationRuntimeCustomerVirtualNetwork customerVirtualNetwork) : base(integrationRuntimeType, description, additionalProperties) - { - State = state; - ManagedVirtualNetwork = managedVirtualNetwork; - ComputeProperties = computeProperties; - SsisProperties = ssisProperties; - CustomerVirtualNetwork = customerVirtualNetwork; - IntegrationRuntimeType = integrationRuntimeType; - } - - /// Integration runtime state, only valid for managed dedicated integration runtime. - public IntegrationRuntimeState? State { get; } - /// Managed Virtual Network reference. - public ManagedVirtualNetworkReference ManagedVirtualNetwork { get; set; } - /// The compute resource for managed integration runtime. - public IntegrationRuntimeComputeProperties ComputeProperties { get; set; } - /// SSIS properties for managed integration runtime. - public IntegrationRuntimeSsisProperties SsisProperties { get; set; } - /// The name of virtual network to which Azure-SSIS integration runtime will join. - internal IntegrationRuntimeCustomerVirtualNetwork CustomerVirtualNetwork { get; set; } - /// The ID of subnet to which Azure-SSIS integration runtime will join. - public ResourceIdentifier CustomerVirtualNetworkSubnetId - { - get => CustomerVirtualNetwork is null ? default : CustomerVirtualNetwork.SubnetId; - set - { - if (CustomerVirtualNetwork is null) - CustomerVirtualNetwork = new IntegrationRuntimeCustomerVirtualNetwork(); - CustomerVirtualNetwork.SubnetId = value; - } - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/ManagedIntegrationRuntimeError.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/ManagedIntegrationRuntimeError.Serialization.cs deleted file mode 100644 index a8c143e3..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/ManagedIntegrationRuntimeError.Serialization.cs +++ /dev/null @@ -1,66 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class ManagedIntegrationRuntimeError - { - internal static ManagedIntegrationRuntimeError DeserializeManagedIntegrationRuntimeError(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - Optional time = default; - Optional code = default; - Optional> parameters = default; - Optional message = default; - IReadOnlyDictionary> additionalProperties = default; - Dictionary> additionalPropertiesDictionary = new Dictionary>(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("time"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - time = property.Value.GetDateTimeOffset("O"); - continue; - } - if (property.NameEquals("code"u8)) - { - code = property.Value.GetString(); - continue; - } - if (property.NameEquals("parameters"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - array.Add(item.GetString()); - } - parameters = array; - continue; - } - if (property.NameEquals("message"u8)) - { - message = property.Value.GetString(); - continue; - } - additionalPropertiesDictionary.Add(property.Name, JsonSerializer.Deserialize>(property.Value.GetRawText())); - } - additionalProperties = additionalPropertiesDictionary; - return new ManagedIntegrationRuntimeError(Optional.ToNullable(time), code.Value, Optional.ToList(parameters), message.Value, additionalProperties); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/ManagedIntegrationRuntimeError.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/ManagedIntegrationRuntimeError.cs deleted file mode 100644 index d51c0863..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/ManagedIntegrationRuntimeError.cs +++ /dev/null @@ -1,75 +0,0 @@ -// - -#nullable disable - -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// Error definition for managed integration runtime. - public partial class ManagedIntegrationRuntimeError - { - /// Initializes a new instance of ManagedIntegrationRuntimeError. - internal ManagedIntegrationRuntimeError() - { - Parameters = new ChangeTrackingList(); - AdditionalProperties = new ChangeTrackingDictionary>(); - } - - /// Initializes a new instance of ManagedIntegrationRuntimeError. - /// The time when the error occurred. - /// Error code. - /// Managed integration runtime error parameters. - /// Error message. - /// Additional Properties. - internal ManagedIntegrationRuntimeError(DateTimeOffset? time, string code, IReadOnlyList parameters, string message, IReadOnlyDictionary> additionalProperties) - { - Time = time; - Code = code; - Parameters = parameters; - Message = message; - AdditionalProperties = additionalProperties; - } - - /// The time when the error occurred. - public DateTimeOffset? Time { get; } - /// Error code. - public string Code { get; } - /// Managed integration runtime error parameters. - public IReadOnlyList Parameters { get; } - /// Error message. - public string Message { get; } - /// - /// Additional Properties - /// - /// To assign an object to the value of this property use . - /// - /// - /// To assign an already formated json string to this property use . - /// - /// - /// Examples: - /// - /// - /// BinaryData.FromObjectAsJson("foo") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromString("\"foo\"") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromObjectAsJson(new { key = "value" }) - /// Creates a payload of { "key": "value" }. - /// - /// - /// BinaryData.FromString("{\"key\": \"value\"}") - /// Creates a payload of { "key": "value" }. - /// - /// - /// - /// - public IReadOnlyDictionary> AdditionalProperties { get; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/ManagedIntegrationRuntimeNode.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/ManagedIntegrationRuntimeNode.Serialization.cs deleted file mode 100644 index 5dd6d8c6..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/ManagedIntegrationRuntimeNode.Serialization.cs +++ /dev/null @@ -1,60 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class ManagedIntegrationRuntimeNode - { - internal static ManagedIntegrationRuntimeNode DeserializeManagedIntegrationRuntimeNode(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - Optional nodeId = default; - Optional status = default; - Optional> errors = default; - IReadOnlyDictionary> additionalProperties = default; - Dictionary> additionalPropertiesDictionary = new Dictionary>(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("nodeId"u8)) - { - nodeId = property.Value.GetString(); - continue; - } - if (property.NameEquals("status"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - status = new ManagedIntegrationRuntimeNodeStatus(property.Value.GetString()); - continue; - } - if (property.NameEquals("errors"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - array.Add(ManagedIntegrationRuntimeError.DeserializeManagedIntegrationRuntimeError(item)); - } - errors = array; - continue; - } - additionalPropertiesDictionary.Add(property.Name, JsonSerializer.Deserialize>(property.Value.GetRawText())); - } - additionalProperties = additionalPropertiesDictionary; - return new ManagedIntegrationRuntimeNode(nodeId.Value, Optional.ToNullable(status), Optional.ToList(errors), additionalProperties); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/ManagedIntegrationRuntimeNode.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/ManagedIntegrationRuntimeNode.cs deleted file mode 100644 index b9633e41..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/ManagedIntegrationRuntimeNode.cs +++ /dev/null @@ -1,71 +0,0 @@ -// - -#nullable disable - -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// Properties of integration runtime node. - public partial class ManagedIntegrationRuntimeNode - { - /// Initializes a new instance of ManagedIntegrationRuntimeNode. - internal ManagedIntegrationRuntimeNode() - { - Errors = new ChangeTrackingList(); - AdditionalProperties = new ChangeTrackingDictionary>(); - } - - /// Initializes a new instance of ManagedIntegrationRuntimeNode. - /// The managed integration runtime node id. - /// The managed integration runtime node status. - /// The errors that occurred on this integration runtime node. - /// Additional Properties. - internal ManagedIntegrationRuntimeNode(string nodeId, ManagedIntegrationRuntimeNodeStatus? status, IReadOnlyList errors, IReadOnlyDictionary> additionalProperties) - { - NodeId = nodeId; - Status = status; - Errors = errors; - AdditionalProperties = additionalProperties; - } - - /// The managed integration runtime node id. - public string NodeId { get; } - /// The managed integration runtime node status. - public ManagedIntegrationRuntimeNodeStatus? Status { get; } - /// The errors that occurred on this integration runtime node. - public IReadOnlyList Errors { get; } - /// - /// Additional Properties - /// - /// To assign an object to the value of this property use . - /// - /// - /// To assign an already formated json string to this property use . - /// - /// - /// Examples: - /// - /// - /// BinaryData.FromObjectAsJson("foo") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromString("\"foo\"") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromObjectAsJson(new { key = "value" }) - /// Creates a payload of { "key": "value" }. - /// - /// - /// BinaryData.FromString("{\"key\": \"value\"}") - /// Creates a payload of { "key": "value" }. - /// - /// - /// - /// - public IReadOnlyDictionary> AdditionalProperties { get; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/ManagedIntegrationRuntimeNodeStatus.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/ManagedIntegrationRuntimeNodeStatus.cs deleted file mode 100644 index 8aeb5728..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/ManagedIntegrationRuntimeNodeStatus.cs +++ /dev/null @@ -1,53 +0,0 @@ -// - -#nullable disable - -using System.ComponentModel; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// The managed integration runtime node status. - public readonly partial struct ManagedIntegrationRuntimeNodeStatus : IEquatable - { - private readonly string _value; - - /// Initializes a new instance of . - /// is null. - public ManagedIntegrationRuntimeNodeStatus(string value) - { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } - - private const string StartingValue = "Starting"; - private const string AvailableValue = "Available"; - private const string RecyclingValue = "Recycling"; - private const string UnavailableValue = "Unavailable"; - - /// Starting. - public static ManagedIntegrationRuntimeNodeStatus Starting { get; } = new ManagedIntegrationRuntimeNodeStatus(StartingValue); - /// Available. - public static ManagedIntegrationRuntimeNodeStatus Available { get; } = new ManagedIntegrationRuntimeNodeStatus(AvailableValue); - /// Recycling. - public static ManagedIntegrationRuntimeNodeStatus Recycling { get; } = new ManagedIntegrationRuntimeNodeStatus(RecyclingValue); - /// Unavailable. - public static ManagedIntegrationRuntimeNodeStatus Unavailable { get; } = new ManagedIntegrationRuntimeNodeStatus(UnavailableValue); - /// Determines if two values are the same. - public static bool operator ==(ManagedIntegrationRuntimeNodeStatus left, ManagedIntegrationRuntimeNodeStatus right) => left.Equals(right); - /// Determines if two values are not the same. - public static bool operator !=(ManagedIntegrationRuntimeNodeStatus left, ManagedIntegrationRuntimeNodeStatus right) => !left.Equals(right); - /// Converts a string to a . - public static implicit operator ManagedIntegrationRuntimeNodeStatus(string value) => new ManagedIntegrationRuntimeNodeStatus(value); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override bool Equals(object obj) => obj is ManagedIntegrationRuntimeNodeStatus other && Equals(other); - /// - public bool Equals(ManagedIntegrationRuntimeNodeStatus other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override int GetHashCode() => _value?.GetHashCode() ?? 0; - /// - public override string ToString() => _value; - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/ManagedIntegrationRuntimeOperationResult.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/ManagedIntegrationRuntimeOperationResult.Serialization.cs deleted file mode 100644 index acdaf23d..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/ManagedIntegrationRuntimeOperationResult.Serialization.cs +++ /dev/null @@ -1,78 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class ManagedIntegrationRuntimeOperationResult - { - internal static ManagedIntegrationRuntimeOperationResult DeserializeManagedIntegrationRuntimeOperationResult(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - Optional type = default; - Optional startTime = default; - Optional result = default; - Optional errorCode = default; - Optional> parameters = default; - Optional activityId = default; - IReadOnlyDictionary> additionalProperties = default; - Dictionary> additionalPropertiesDictionary = new Dictionary>(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("type"u8)) - { - type = property.Value.GetString(); - continue; - } - if (property.NameEquals("startTime"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - startTime = property.Value.GetDateTimeOffset("O"); - continue; - } - if (property.NameEquals("result"u8)) - { - result = property.Value.GetString(); - continue; - } - if (property.NameEquals("errorCode"u8)) - { - errorCode = property.Value.GetString(); - continue; - } - if (property.NameEquals("parameters"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - array.Add(item.GetString()); - } - parameters = array; - continue; - } - if (property.NameEquals("activityId"u8)) - { - activityId = property.Value.GetString(); - continue; - } - additionalPropertiesDictionary.Add(property.Name, JsonSerializer.Deserialize>(property.Value.GetRawText())); - } - additionalProperties = additionalPropertiesDictionary; - return new ManagedIntegrationRuntimeOperationResult(type.Value, Optional.ToNullable(startTime), result.Value, errorCode.Value, Optional.ToList(parameters), activityId.Value, additionalProperties); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/ManagedIntegrationRuntimeOperationResult.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/ManagedIntegrationRuntimeOperationResult.cs deleted file mode 100644 index 9aeb0678..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/ManagedIntegrationRuntimeOperationResult.cs +++ /dev/null @@ -1,83 +0,0 @@ -// - -#nullable disable - -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// Properties of managed integration runtime operation result. - public partial class ManagedIntegrationRuntimeOperationResult - { - /// Initializes a new instance of ManagedIntegrationRuntimeOperationResult. - internal ManagedIntegrationRuntimeOperationResult() - { - Parameters = new ChangeTrackingList(); - AdditionalProperties = new ChangeTrackingDictionary>(); - } - - /// Initializes a new instance of ManagedIntegrationRuntimeOperationResult. - /// The operation type. Could be start or stop. - /// The start time of the operation. - /// The operation result. - /// The error code. - /// Managed integration runtime error parameters. - /// The activity id for the operation request. - /// Additional Properties. - internal ManagedIntegrationRuntimeOperationResult(string managedIntegrationRuntimeOperationResultType, DateTimeOffset? startOn, string result, string errorCode, IReadOnlyList parameters, string activityId, IReadOnlyDictionary> additionalProperties) - { - ManagedIntegrationRuntimeOperationResultType = managedIntegrationRuntimeOperationResultType; - StartOn = startOn; - Result = result; - ErrorCode = errorCode; - Parameters = parameters; - ActivityId = activityId; - AdditionalProperties = additionalProperties; - } - - /// The operation type. Could be start or stop. - public string ManagedIntegrationRuntimeOperationResultType { get; } - /// The start time of the operation. - public DateTimeOffset? StartOn { get; } - /// The operation result. - public string Result { get; } - /// The error code. - public string ErrorCode { get; } - /// Managed integration runtime error parameters. - public IReadOnlyList Parameters { get; } - /// The activity id for the operation request. - public string ActivityId { get; } - /// - /// Additional Properties - /// - /// To assign an object to the value of this property use . - /// - /// - /// To assign an already formated json string to this property use . - /// - /// - /// Examples: - /// - /// - /// BinaryData.FromObjectAsJson("foo") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromString("\"foo\"") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromObjectAsJson(new { key = "value" }) - /// Creates a payload of { "key": "value" }. - /// - /// - /// BinaryData.FromString("{\"key\": \"value\"}") - /// Creates a payload of { "key": "value" }. - /// - /// - /// - /// - public IReadOnlyDictionary> AdditionalProperties { get; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/ManagedIntegrationRuntimeStatus.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/ManagedIntegrationRuntimeStatus.Serialization.cs deleted file mode 100644 index 853d7328..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/ManagedIntegrationRuntimeStatus.Serialization.cs +++ /dev/null @@ -1,113 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class ManagedIntegrationRuntimeStatus - { - internal static ManagedIntegrationRuntimeStatus DeserializeManagedIntegrationRuntimeStatus(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - IntegrationRuntimeType type = default; - Optional dataFactoryName = default; - Optional state = default; - Optional createTime = default; - Optional> nodes = default; - Optional> otherErrors = default; - Optional lastOperation = default; - IReadOnlyDictionary> additionalProperties = default; - Dictionary> additionalPropertiesDictionary = new Dictionary>(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("type"u8)) - { - type = new IntegrationRuntimeType(property.Value.GetString()); - continue; - } - if (property.NameEquals("dataFactoryName"u8)) - { - dataFactoryName = property.Value.GetString(); - continue; - } - if (property.NameEquals("state"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - state = new IntegrationRuntimeState(property.Value.GetString()); - continue; - } - if (property.NameEquals("typeProperties"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - foreach (var property0 in property.Value.EnumerateObject()) - { - if (property0.NameEquals("createTime"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - createTime = property0.Value.GetDateTimeOffset("O"); - continue; - } - if (property0.NameEquals("nodes"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property0.Value.EnumerateArray()) - { - array.Add(ManagedIntegrationRuntimeNode.DeserializeManagedIntegrationRuntimeNode(item)); - } - nodes = array; - continue; - } - if (property0.NameEquals("otherErrors"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property0.Value.EnumerateArray()) - { - array.Add(ManagedIntegrationRuntimeError.DeserializeManagedIntegrationRuntimeError(item)); - } - otherErrors = array; - continue; - } - if (property0.NameEquals("lastOperation"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - lastOperation = ManagedIntegrationRuntimeOperationResult.DeserializeManagedIntegrationRuntimeOperationResult(property0.Value); - continue; - } - } - continue; - } - additionalPropertiesDictionary.Add(property.Name, JsonSerializer.Deserialize>(property.Value.GetRawText())); - } - additionalProperties = additionalPropertiesDictionary; - return new ManagedIntegrationRuntimeStatus(type, dataFactoryName.Value, Optional.ToNullable(state), additionalProperties, Optional.ToNullable(createTime), Optional.ToList(nodes), Optional.ToList(otherErrors), lastOperation.Value); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/ManagedIntegrationRuntimeStatus.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/ManagedIntegrationRuntimeStatus.cs deleted file mode 100644 index a7059571..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/ManagedIntegrationRuntimeStatus.cs +++ /dev/null @@ -1,48 +0,0 @@ -// - -#nullable disable - -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// Managed integration runtime status. - public partial class ManagedIntegrationRuntimeStatus : IntegrationRuntimeStatus - { - /// Initializes a new instance of ManagedIntegrationRuntimeStatus. - internal ManagedIntegrationRuntimeStatus() - { - Nodes = new ChangeTrackingList(); - OtherErrors = new ChangeTrackingList(); - RuntimeType = IntegrationRuntimeType.Managed; - } - - /// Initializes a new instance of ManagedIntegrationRuntimeStatus. - /// Type of integration runtime. - /// The data factory name which the integration runtime belong to. - /// The state of integration runtime. - /// Additional Properties. - /// The time at which the integration runtime was created, in ISO8601 format. - /// The list of nodes for managed integration runtime. - /// The errors that occurred on this integration runtime. - /// The last operation result that occurred on this integration runtime. - internal ManagedIntegrationRuntimeStatus(IntegrationRuntimeType runtimeType, string dataFactoryName, IntegrationRuntimeState? state, IReadOnlyDictionary> additionalProperties, DateTimeOffset? createdOn, IReadOnlyList nodes, IReadOnlyList otherErrors, ManagedIntegrationRuntimeOperationResult lastOperation) : base(runtimeType, dataFactoryName, state, additionalProperties) - { - CreatedOn = createdOn; - Nodes = nodes; - OtherErrors = otherErrors; - LastOperation = lastOperation; - RuntimeType = runtimeType; - } - - /// The time at which the integration runtime was created, in ISO8601 format. - public DateTimeOffset? CreatedOn { get; } - /// The list of nodes for managed integration runtime. - public IReadOnlyList Nodes { get; } - /// The errors that occurred on this integration runtime. - public IReadOnlyList OtherErrors { get; } - /// The last operation result that occurred on this integration runtime. - public ManagedIntegrationRuntimeOperationResult LastOperation { get; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/ManagedVirtualNetworkReference.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/ManagedVirtualNetworkReference.Serialization.cs deleted file mode 100644 index 357239a6..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/ManagedVirtualNetworkReference.Serialization.cs +++ /dev/null @@ -1,46 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class ManagedVirtualNetworkReference : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ReferenceType.ToString()); - writer.WritePropertyName("referenceName"u8); - writer.WriteStringValue(ReferenceName); - writer.WriteEndObject(); - } - - internal static ManagedVirtualNetworkReference DeserializeManagedVirtualNetworkReference(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - ManagedVirtualNetworkReferenceType type = default; - string referenceName = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("type"u8)) - { - type = new ManagedVirtualNetworkReferenceType(property.Value.GetString()); - continue; - } - if (property.NameEquals("referenceName"u8)) - { - referenceName = property.Value.GetString(); - continue; - } - } - return new ManagedVirtualNetworkReference(type, referenceName); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/ManagedVirtualNetworkReference.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/ManagedVirtualNetworkReference.cs deleted file mode 100644 index 6fa1c75d..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/ManagedVirtualNetworkReference.cs +++ /dev/null @@ -1,29 +0,0 @@ -// - -#nullable disable - -using Azure.Core; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// Managed Virtual Network reference type. - public partial class ManagedVirtualNetworkReference - { - /// Initializes a new instance of ManagedVirtualNetworkReference. - /// Managed Virtual Network reference type. - /// Reference ManagedVirtualNetwork name. - /// is null. - public ManagedVirtualNetworkReference(ManagedVirtualNetworkReferenceType referenceType, string referenceName) - { - Argument.AssertNotNull(referenceName, nameof(referenceName)); - - ReferenceType = referenceType; - ReferenceName = referenceName; - } - - /// Managed Virtual Network reference type. - public ManagedVirtualNetworkReferenceType ReferenceType { get; set; } - /// Reference ManagedVirtualNetwork name. - public string ReferenceName { get; set; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/ManagedVirtualNetworkReferenceType.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/ManagedVirtualNetworkReferenceType.cs deleted file mode 100644 index 16894a17..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/ManagedVirtualNetworkReferenceType.cs +++ /dev/null @@ -1,44 +0,0 @@ -// - -#nullable disable - -using System.ComponentModel; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// Managed Virtual Network reference type. - public readonly partial struct ManagedVirtualNetworkReferenceType : IEquatable - { - private readonly string _value; - - /// Initializes a new instance of . - /// is null. - public ManagedVirtualNetworkReferenceType(string value) - { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } - - private const string ManagedVirtualNetworkReferenceValue = "ManagedVirtualNetworkReference"; - - /// ManagedVirtualNetworkReference. - public static ManagedVirtualNetworkReferenceType ManagedVirtualNetworkReference { get; } = new ManagedVirtualNetworkReferenceType(ManagedVirtualNetworkReferenceValue); - /// Determines if two values are the same. - public static bool operator ==(ManagedVirtualNetworkReferenceType left, ManagedVirtualNetworkReferenceType right) => left.Equals(right); - /// Determines if two values are not the same. - public static bool operator !=(ManagedVirtualNetworkReferenceType left, ManagedVirtualNetworkReferenceType right) => !left.Equals(right); - /// Converts a string to a . - public static implicit operator ManagedVirtualNetworkReferenceType(string value) => new ManagedVirtualNetworkReferenceType(value); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override bool Equals(object obj) => obj is ManagedVirtualNetworkReferenceType other && Equals(other); - /// - public bool Equals(ManagedVirtualNetworkReferenceType other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override int GetHashCode() => _value?.GetHashCode() ?? 0; - /// - public override string ToString() => _value; - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/MapperAttributeMapping.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/MapperAttributeMapping.Serialization.cs deleted file mode 100644 index e3991f76..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/MapperAttributeMapping.Serialization.cs +++ /dev/null @@ -1,118 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class MapperAttributeMapping : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - if (Optional.IsDefined(Name)) - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (Optional.IsDefined(MappingType)) - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(MappingType.Value.ToString()); - } - if (Optional.IsDefined(FunctionName)) - { - writer.WritePropertyName("functionName"u8); - writer.WriteStringValue(FunctionName); - } - if (Optional.IsDefined(Expression)) - { - writer.WritePropertyName("expression"u8); - writer.WriteStringValue(Expression); - } - if (Optional.IsDefined(AttributeReference)) - { - writer.WritePropertyName("attributeReference"u8); - writer.WriteObjectValue(AttributeReference); - } - if (Optional.IsCollectionDefined(AttributeReferences)) - { - writer.WritePropertyName("attributeReferences"u8); - writer.WriteStartArray(); - foreach (var item in AttributeReferences) - { - writer.WriteObjectValue(item); - } - writer.WriteEndArray(); - } - writer.WriteEndObject(); - } - - internal static MapperAttributeMapping DeserializeMapperAttributeMapping(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - Optional name = default; - Optional type = default; - Optional functionName = default; - Optional expression = default; - Optional attributeReference = default; - Optional> attributeReferences = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("name"u8)) - { - name = property.Value.GetString(); - continue; - } - if (property.NameEquals("type"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - type = new MappingType(property.Value.GetString()); - continue; - } - if (property.NameEquals("functionName"u8)) - { - functionName = property.Value.GetString(); - continue; - } - if (property.NameEquals("expression"u8)) - { - expression = property.Value.GetString(); - continue; - } - if (property.NameEquals("attributeReference"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - attributeReference = MapperAttributeReference.DeserializeMapperAttributeReference(property.Value); - continue; - } - if (property.NameEquals("attributeReferences"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - array.Add(MapperAttributeReference.DeserializeMapperAttributeReference(item)); - } - attributeReferences = array; - continue; - } - } - return new MapperAttributeMapping(name.Value, Optional.ToNullable(type), functionName.Value, expression.Value, attributeReference.Value, Optional.ToList(attributeReferences)); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/MapperAttributeMapping.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/MapperAttributeMapping.cs deleted file mode 100644 index 5eae8fbf..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/MapperAttributeMapping.cs +++ /dev/null @@ -1,48 +0,0 @@ -// - -#nullable disable - -using Azure.Core; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// Source and target column mapping details. - public partial class MapperAttributeMapping - { - /// Initializes a new instance of MapperAttributeMapping. - public MapperAttributeMapping() - { - AttributeReferences = new ChangeTrackingList(); - } - - /// Initializes a new instance of MapperAttributeMapping. - /// Name of the target column. - /// Type of the CDC attribute mapping. Note: 'Advanced' mapping type is also saved as 'Derived'. - /// Name of the function used for 'Aggregate' and 'Derived' (except 'Advanced') type mapping. - /// Expression used for 'Aggregate' and 'Derived' type mapping. - /// Reference of the source column used in the mapping. It is used for 'Direct' mapping type only. - /// List of references for source columns. It is used for 'Derived' and 'Aggregate' type mappings only. - internal MapperAttributeMapping(string name, MappingType? mappingType, string functionName, string expression, MapperAttributeReference attributeReference, IList attributeReferences) - { - Name = name; - MappingType = mappingType; - FunctionName = functionName; - Expression = expression; - AttributeReference = attributeReference; - AttributeReferences = attributeReferences; - } - - /// Name of the target column. - public string Name { get; set; } - /// Type of the CDC attribute mapping. Note: 'Advanced' mapping type is also saved as 'Derived'. - public MappingType? MappingType { get; set; } - /// Name of the function used for 'Aggregate' and 'Derived' (except 'Advanced') type mapping. - public string FunctionName { get; set; } - /// Expression used for 'Aggregate' and 'Derived' type mapping. - public string Expression { get; set; } - /// Reference of the source column used in the mapping. It is used for 'Direct' mapping type only. - public MapperAttributeReference AttributeReference { get; set; } - /// List of references for source columns. It is used for 'Derived' and 'Aggregate' type mappings only. - public IList AttributeReferences { get; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/MapperAttributeMappings.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/MapperAttributeMappings.Serialization.cs deleted file mode 100644 index 05265bb3..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/MapperAttributeMappings.Serialization.cs +++ /dev/null @@ -1,55 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; - -namespace AzureDataFactory.TestingFramework.Models -{ - internal partial class MapperAttributeMappings : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - if (Optional.IsCollectionDefined(AttributeMappings)) - { - writer.WritePropertyName("attributeMappings"u8); - writer.WriteStartArray(); - foreach (var item in AttributeMappings) - { - writer.WriteObjectValue(item); - } - writer.WriteEndArray(); - } - writer.WriteEndObject(); - } - - internal static MapperAttributeMappings DeserializeMapperAttributeMappings(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - Optional> attributeMappings = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("attributeMappings"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - array.Add(MapperAttributeMapping.DeserializeMapperAttributeMapping(item)); - } - attributeMappings = array; - continue; - } - } - return new MapperAttributeMappings(Optional.ToList(attributeMappings)); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/MapperAttributeMappings.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/MapperAttributeMappings.cs deleted file mode 100644 index 1c59ae15..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/MapperAttributeMappings.cs +++ /dev/null @@ -1,28 +0,0 @@ -// - -#nullable disable - -using Azure.Core; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// Attribute mapping details. - internal partial class MapperAttributeMappings - { - /// Initializes a new instance of MapperAttributeMappings. - public MapperAttributeMappings() - { - AttributeMappings = new ChangeTrackingList(); - } - - /// Initializes a new instance of MapperAttributeMappings. - /// List of attribute mappings. - internal MapperAttributeMappings(IList attributeMappings) - { - AttributeMappings = attributeMappings; - } - - /// List of attribute mappings. - public IList AttributeMappings { get; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/MapperAttributeReference.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/MapperAttributeReference.Serialization.cs deleted file mode 100644 index 11c68ed5..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/MapperAttributeReference.Serialization.cs +++ /dev/null @@ -1,67 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class MapperAttributeReference : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - if (Optional.IsDefined(Name)) - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (Optional.IsDefined(Entity)) - { - writer.WritePropertyName("entity"u8); - writer.WriteStringValue(Entity); - } - if (Optional.IsDefined(EntityConnectionReference)) - { - writer.WritePropertyName("entityConnectionReference"u8); - writer.WriteObjectValue(EntityConnectionReference); - } - writer.WriteEndObject(); - } - - internal static MapperAttributeReference DeserializeMapperAttributeReference(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - Optional name = default; - Optional entity = default; - Optional entityConnectionReference = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("name"u8)) - { - name = property.Value.GetString(); - continue; - } - if (property.NameEquals("entity"u8)) - { - entity = property.Value.GetString(); - continue; - } - if (property.NameEquals("entityConnectionReference"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - entityConnectionReference = MapperConnectionReference.DeserializeMapperConnectionReference(property.Value); - continue; - } - } - return new MapperAttributeReference(name.Value, entity.Value, entityConnectionReference.Value); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/MapperAttributeReference.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/MapperAttributeReference.cs deleted file mode 100644 index dd8c79f4..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/MapperAttributeReference.cs +++ /dev/null @@ -1,33 +0,0 @@ -// - -#nullable disable - -namespace AzureDataFactory.TestingFramework.Models -{ - /// Attribute reference details for the referred column. - public partial class MapperAttributeReference - { - /// Initializes a new instance of MapperAttributeReference. - public MapperAttributeReference() - { - } - - /// Initializes a new instance of MapperAttributeReference. - /// Name of the column. - /// Name of the table. - /// The connection reference for the connection. - internal MapperAttributeReference(string name, string entity, MapperConnectionReference entityConnectionReference) - { - Name = name; - Entity = entity; - EntityConnectionReference = entityConnectionReference; - } - - /// Name of the column. - public string Name { get; set; } - /// Name of the table. - public string Entity { get; set; } - /// The connection reference for the connection. - public MapperConnectionReference EntityConnectionReference { get; set; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/MapperConnection.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/MapperConnection.Serialization.cs deleted file mode 100644 index 5d4ff980..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/MapperConnection.Serialization.cs +++ /dev/null @@ -1,105 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class MapperConnection : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - if (Optional.IsDefined(LinkedService)) - { - writer.WritePropertyName("linkedService"u8); - JsonSerializer.Serialize(writer, LinkedService); - } - if (Optional.IsDefined(LinkedServiceType)) - { - writer.WritePropertyName("linkedServiceType"u8); - writer.WriteStringValue(LinkedServiceType); - } - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ConnectionType.ToString()); - if (Optional.IsDefined(IsInlineDataset)) - { - writer.WritePropertyName("isInlineDataset"u8); - writer.WriteBooleanValue(IsInlineDataset.Value); - } - if (Optional.IsCollectionDefined(CommonDslConnectorProperties)) - { - writer.WritePropertyName("commonDslConnectorProperties"u8); - writer.WriteStartArray(); - foreach (var item in CommonDslConnectorProperties) - { - writer.WriteObjectValue(item); - } - writer.WriteEndArray(); - } - writer.WriteEndObject(); - } - - internal static MapperConnection DeserializeMapperConnection(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - Optional linkedService = default; - Optional linkedServiceType = default; - MapperConnectionType type = default; - Optional isInlineDataset = default; - Optional> commonDslConnectorProperties = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("linkedService"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - linkedService = JsonSerializer.Deserialize(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("linkedServiceType"u8)) - { - linkedServiceType = property.Value.GetString(); - continue; - } - if (property.NameEquals("type"u8)) - { - type = new MapperConnectionType(property.Value.GetString()); - continue; - } - if (property.NameEquals("isInlineDataset"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - isInlineDataset = property.Value.GetBoolean(); - continue; - } - if (property.NameEquals("commonDslConnectorProperties"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - array.Add(MapperDslConnectorProperties.DeserializeMapperDslConnectorProperties(item)); - } - commonDslConnectorProperties = array; - continue; - } - } - return new MapperConnection(linkedService, linkedServiceType.Value, type, Optional.ToNullable(isInlineDataset), Optional.ToList(commonDslConnectorProperties)); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/MapperConnection.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/MapperConnection.cs deleted file mode 100644 index 1770546c..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/MapperConnection.cs +++ /dev/null @@ -1,47 +0,0 @@ -// - -#nullable disable - -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// Source connection details. - public partial class MapperConnection - { - /// Initializes a new instance of MapperConnection. - /// Type of connection via linked service or dataset. - public MapperConnection(MapperConnectionType connectionType) - { - ConnectionType = connectionType; - CommonDslConnectorProperties = new ChangeTrackingList(); - } - - /// Initializes a new instance of MapperConnection. - /// Linked service reference. - /// Type of the linked service e.g.: AzureBlobFS. - /// Type of connection via linked service or dataset. - /// A boolean indicating whether linked service is of type inline dataset. Currently only inline datasets are supported. - /// List of name/value pairs for connection properties. - internal MapperConnection(DataFactoryLinkedServiceReference linkedService, string linkedServiceType, MapperConnectionType connectionType, bool? isInlineDataset, IList commonDslConnectorProperties) - { - LinkedService = linkedService; - LinkedServiceType = linkedServiceType; - ConnectionType = connectionType; - IsInlineDataset = isInlineDataset; - CommonDslConnectorProperties = commonDslConnectorProperties; - } - - /// Linked service reference. - public DataFactoryLinkedServiceReference LinkedService { get; set; } - /// Type of the linked service e.g.: AzureBlobFS. - public string LinkedServiceType { get; set; } - /// Type of connection via linked service or dataset. - public MapperConnectionType ConnectionType { get; set; } - /// A boolean indicating whether linked service is of type inline dataset. Currently only inline datasets are supported. - public bool? IsInlineDataset { get; set; } - /// List of name/value pairs for connection properties. - public IList CommonDslConnectorProperties { get; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/MapperConnectionReference.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/MapperConnectionReference.Serialization.cs deleted file mode 100644 index ab91e5fd..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/MapperConnectionReference.Serialization.cs +++ /dev/null @@ -1,56 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class MapperConnectionReference : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - if (Optional.IsDefined(ConnectionName)) - { - writer.WritePropertyName("connectionName"u8); - writer.WriteStringValue(ConnectionName); - } - if (Optional.IsDefined(ConnectionType)) - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ConnectionType.Value.ToString()); - } - writer.WriteEndObject(); - } - - internal static MapperConnectionReference DeserializeMapperConnectionReference(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - Optional connectionName = default; - Optional type = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("connectionName"u8)) - { - connectionName = property.Value.GetString(); - continue; - } - if (property.NameEquals("type"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - type = new MapperConnectionType(property.Value.GetString()); - continue; - } - } - return new MapperConnectionReference(connectionName.Value, Optional.ToNullable(type)); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/MapperConnectionReference.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/MapperConnectionReference.cs deleted file mode 100644 index 8f811518..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/MapperConnectionReference.cs +++ /dev/null @@ -1,29 +0,0 @@ -// - -#nullable disable - -namespace AzureDataFactory.TestingFramework.Models -{ - /// Source or target connection reference details. - public partial class MapperConnectionReference - { - /// Initializes a new instance of MapperConnectionReference. - public MapperConnectionReference() - { - } - - /// Initializes a new instance of MapperConnectionReference. - /// Name of the connection. - /// Type of connection via linked service or dataset. - internal MapperConnectionReference(string connectionName, MapperConnectionType? connectionType) - { - ConnectionName = connectionName; - ConnectionType = connectionType; - } - - /// Name of the connection. - public string ConnectionName { get; set; } - /// Type of connection via linked service or dataset. - public MapperConnectionType? ConnectionType { get; set; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/MapperConnectionType.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/MapperConnectionType.cs deleted file mode 100644 index 8ebb3f23..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/MapperConnectionType.cs +++ /dev/null @@ -1,44 +0,0 @@ -// - -#nullable disable - -using System.ComponentModel; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// Type of connection via linked service or dataset. - public readonly partial struct MapperConnectionType : IEquatable - { - private readonly string _value; - - /// Initializes a new instance of . - /// is null. - public MapperConnectionType(string value) - { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } - - private const string LinkedservicetypeValue = "linkedservicetype"; - - /// linkedservicetype. - public static MapperConnectionType Linkedservicetype { get; } = new MapperConnectionType(LinkedservicetypeValue); - /// Determines if two values are the same. - public static bool operator ==(MapperConnectionType left, MapperConnectionType right) => left.Equals(right); - /// Determines if two values are not the same. - public static bool operator !=(MapperConnectionType left, MapperConnectionType right) => !left.Equals(right); - /// Converts a string to a . - public static implicit operator MapperConnectionType(string value) => new MapperConnectionType(value); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override bool Equals(object obj) => obj is MapperConnectionType other && Equals(other); - /// - public bool Equals(MapperConnectionType other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override int GetHashCode() => _value?.GetHashCode() ?? 0; - /// - public override string ToString() => _value; - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/MapperDslConnectorProperties.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/MapperDslConnectorProperties.Serialization.cs deleted file mode 100644 index 0c580c2a..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/MapperDslConnectorProperties.Serialization.cs +++ /dev/null @@ -1,60 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class MapperDslConnectorProperties : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - if (Optional.IsDefined(Name)) - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (Optional.IsDefined(Value)) - { - writer.WritePropertyName("value"u8); -#if NET6_0_OR_GREATER - writer.WriteRawValue(Value); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(Value.ToString()).RootElement); -#endif - } - writer.WriteEndObject(); - } - - internal static MapperDslConnectorProperties DeserializeMapperDslConnectorProperties(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - Optional name = default; - Optional value = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("name"u8)) - { - name = property.Value.GetString(); - continue; - } - if (property.NameEquals("value"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - value = BinaryData.FromString(property.Value.GetRawText()); - continue; - } - } - return new MapperDslConnectorProperties(name.Value, value.Value); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/MapperDslConnectorProperties.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/MapperDslConnectorProperties.cs deleted file mode 100644 index d3e3a76f..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/MapperDslConnectorProperties.cs +++ /dev/null @@ -1,58 +0,0 @@ -// - -#nullable disable - -namespace AzureDataFactory.TestingFramework.Models -{ - /// Connector properties of a CDC table in terms of name / value pairs. - public partial class MapperDslConnectorProperties - { - /// Initializes a new instance of MapperDslConnectorProperties. - public MapperDslConnectorProperties() - { - } - - /// Initializes a new instance of MapperDslConnectorProperties. - /// Name of the property. - /// Value of the property. - internal MapperDslConnectorProperties(string name, BinaryData value) - { - Name = name; - Value = value; - } - - /// Name of the property. - public string Name { get; set; } - /// - /// Value of the property. - /// - /// To assign an object to this property use . - /// - /// - /// To assign an already formated json string to this property use . - /// - /// - /// Examples: - /// - /// - /// BinaryData.FromObjectAsJson("foo") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromString("\"foo\"") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromObjectAsJson(new { key = "value" }) - /// Creates a payload of { "key": "value" }. - /// - /// - /// BinaryData.FromString("{\"key\": \"value\"}") - /// Creates a payload of { "key": "value" }. - /// - /// - /// - /// - public BinaryData Value { get; set; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/MapperPolicy.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/MapperPolicy.Serialization.cs deleted file mode 100644 index 1680730d..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/MapperPolicy.Serialization.cs +++ /dev/null @@ -1,56 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class MapperPolicy : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - if (Optional.IsDefined(Mode)) - { - writer.WritePropertyName("mode"u8); - writer.WriteStringValue(Mode); - } - if (Optional.IsDefined(Recurrence)) - { - writer.WritePropertyName("recurrence"u8); - writer.WriteObjectValue(Recurrence); - } - writer.WriteEndObject(); - } - - internal static MapperPolicy DeserializeMapperPolicy(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - Optional mode = default; - Optional recurrence = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("mode"u8)) - { - mode = property.Value.GetString(); - continue; - } - if (property.NameEquals("recurrence"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - recurrence = MapperPolicyRecurrence.DeserializeMapperPolicyRecurrence(property.Value); - continue; - } - } - return new MapperPolicy(mode.Value, recurrence.Value); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/MapperPolicy.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/MapperPolicy.cs deleted file mode 100644 index ad278acd..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/MapperPolicy.cs +++ /dev/null @@ -1,29 +0,0 @@ -// - -#nullable disable - -namespace AzureDataFactory.TestingFramework.Models -{ - /// CDC Policy. - public partial class MapperPolicy - { - /// Initializes a new instance of MapperPolicy. - public MapperPolicy() - { - } - - /// Initializes a new instance of MapperPolicy. - /// Mode of running the CDC: batch vs continuous. - /// Defines the frequency and interval for running the CDC for batch mode. - internal MapperPolicy(string mode, MapperPolicyRecurrence recurrence) - { - Mode = mode; - Recurrence = recurrence; - } - - /// Mode of running the CDC: batch vs continuous. - public string Mode { get; set; } - /// Defines the frequency and interval for running the CDC for batch mode. - public MapperPolicyRecurrence Recurrence { get; set; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/MapperPolicyRecurrence.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/MapperPolicyRecurrence.Serialization.cs deleted file mode 100644 index 8dbcc2e4..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/MapperPolicyRecurrence.Serialization.cs +++ /dev/null @@ -1,60 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class MapperPolicyRecurrence : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - if (Optional.IsDefined(Frequency)) - { - writer.WritePropertyName("frequency"u8); - writer.WriteStringValue(Frequency.Value.ToString()); - } - if (Optional.IsDefined(Interval)) - { - writer.WritePropertyName("interval"u8); - writer.WriteNumberValue(Interval.Value); - } - writer.WriteEndObject(); - } - - internal static MapperPolicyRecurrence DeserializeMapperPolicyRecurrence(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - Optional frequency = default; - Optional interval = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("frequency"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - frequency = new MapperPolicyRecurrenceFrequencyType(property.Value.GetString()); - continue; - } - if (property.NameEquals("interval"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - interval = property.Value.GetInt32(); - continue; - } - } - return new MapperPolicyRecurrence(Optional.ToNullable(frequency), Optional.ToNullable(interval)); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/MapperPolicyRecurrence.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/MapperPolicyRecurrence.cs deleted file mode 100644 index 6f26a8c7..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/MapperPolicyRecurrence.cs +++ /dev/null @@ -1,29 +0,0 @@ -// - -#nullable disable - -namespace AzureDataFactory.TestingFramework.Models -{ - /// CDC policy recurrence details. - public partial class MapperPolicyRecurrence - { - /// Initializes a new instance of MapperPolicyRecurrence. - public MapperPolicyRecurrence() - { - } - - /// Initializes a new instance of MapperPolicyRecurrence. - /// Frequency of period in terms of 'Hour', 'Minute' or 'Second'. - /// Actual interval value as per chosen frequency. - internal MapperPolicyRecurrence(MapperPolicyRecurrenceFrequencyType? frequency, int? interval) - { - Frequency = frequency; - Interval = interval; - } - - /// Frequency of period in terms of 'Hour', 'Minute' or 'Second'. - public MapperPolicyRecurrenceFrequencyType? Frequency { get; set; } - /// Actual interval value as per chosen frequency. - public int? Interval { get; set; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/MapperPolicyRecurrenceFrequencyType.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/MapperPolicyRecurrenceFrequencyType.cs deleted file mode 100644 index 2c489026..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/MapperPolicyRecurrenceFrequencyType.cs +++ /dev/null @@ -1,50 +0,0 @@ -// - -#nullable disable - -using System.ComponentModel; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// Frequency of period in terms of 'Hour', 'Minute' or 'Second'. - public readonly partial struct MapperPolicyRecurrenceFrequencyType : IEquatable - { - private readonly string _value; - - /// Initializes a new instance of . - /// is null. - public MapperPolicyRecurrenceFrequencyType(string value) - { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } - - private const string HourValue = "Hour"; - private const string MinuteValue = "Minute"; - private const string SecondValue = "Second"; - - /// Hour. - public static MapperPolicyRecurrenceFrequencyType Hour { get; } = new MapperPolicyRecurrenceFrequencyType(HourValue); - /// Minute. - public static MapperPolicyRecurrenceFrequencyType Minute { get; } = new MapperPolicyRecurrenceFrequencyType(MinuteValue); - /// Second. - public static MapperPolicyRecurrenceFrequencyType Second { get; } = new MapperPolicyRecurrenceFrequencyType(SecondValue); - /// Determines if two values are the same. - public static bool operator ==(MapperPolicyRecurrenceFrequencyType left, MapperPolicyRecurrenceFrequencyType right) => left.Equals(right); - /// Determines if two values are not the same. - public static bool operator !=(MapperPolicyRecurrenceFrequencyType left, MapperPolicyRecurrenceFrequencyType right) => !left.Equals(right); - /// Converts a string to a . - public static implicit operator MapperPolicyRecurrenceFrequencyType(string value) => new MapperPolicyRecurrenceFrequencyType(value); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override bool Equals(object obj) => obj is MapperPolicyRecurrenceFrequencyType other && Equals(other); - /// - public bool Equals(MapperPolicyRecurrenceFrequencyType other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override int GetHashCode() => _value?.GetHashCode() ?? 0; - /// - public override string ToString() => _value; - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/MapperSourceConnectionsInfo.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/MapperSourceConnectionsInfo.Serialization.cs deleted file mode 100644 index c1bb0bb1..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/MapperSourceConnectionsInfo.Serialization.cs +++ /dev/null @@ -1,70 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class MapperSourceConnectionsInfo : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - if (Optional.IsCollectionDefined(SourceEntities)) - { - writer.WritePropertyName("sourceEntities"u8); - writer.WriteStartArray(); - foreach (var item in SourceEntities) - { - writer.WriteObjectValue(item); - } - writer.WriteEndArray(); - } - if (Optional.IsDefined(Connection)) - { - writer.WritePropertyName("connection"u8); - writer.WriteObjectValue(Connection); - } - writer.WriteEndObject(); - } - - internal static MapperSourceConnectionsInfo DeserializeMapperSourceConnectionsInfo(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - Optional> sourceEntities = default; - Optional connection = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("sourceEntities"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - array.Add(MapperTable.DeserializeMapperTable(item)); - } - sourceEntities = array; - continue; - } - if (property.NameEquals("connection"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - connection = MapperConnection.DeserializeMapperConnection(property.Value); - continue; - } - } - return new MapperSourceConnectionsInfo(Optional.ToList(sourceEntities), connection.Value); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/MapperSourceConnectionsInfo.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/MapperSourceConnectionsInfo.cs deleted file mode 100644 index e9d5459d..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/MapperSourceConnectionsInfo.cs +++ /dev/null @@ -1,32 +0,0 @@ -// - -#nullable disable - -using Azure.Core; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// A object which contains list of tables and connection details for a source connection. - public partial class MapperSourceConnectionsInfo - { - /// Initializes a new instance of MapperSourceConnectionsInfo. - public MapperSourceConnectionsInfo() - { - SourceEntities = new ChangeTrackingList(); - } - - /// Initializes a new instance of MapperSourceConnectionsInfo. - /// List of source tables for a source connection. - /// Source connection details. - internal MapperSourceConnectionsInfo(IList sourceEntities, MapperConnection connection) - { - SourceEntities = sourceEntities; - Connection = connection; - } - - /// List of source tables for a source connection. - public IList SourceEntities { get; } - /// Source connection details. - public MapperConnection Connection { get; set; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/MapperTable.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/MapperTable.Serialization.cs deleted file mode 100644 index 98c134c1..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/MapperTable.Serialization.cs +++ /dev/null @@ -1,106 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class MapperTable : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - if (Optional.IsDefined(Name)) - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - writer.WritePropertyName("properties"u8); - writer.WriteStartObject(); - if (Optional.IsCollectionDefined(Schema)) - { - writer.WritePropertyName("schema"u8); - writer.WriteStartArray(); - foreach (var item in Schema) - { - writer.WriteObjectValue(item); - } - writer.WriteEndArray(); - } - if (Optional.IsCollectionDefined(DslConnectorProperties)) - { - writer.WritePropertyName("dslConnectorProperties"u8); - writer.WriteStartArray(); - foreach (var item in DslConnectorProperties) - { - writer.WriteObjectValue(item); - } - writer.WriteEndArray(); - } - writer.WriteEndObject(); - writer.WriteEndObject(); - } - - internal static MapperTable DeserializeMapperTable(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - Optional name = default; - Optional> schema = default; - Optional> dslConnectorProperties = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("name"u8)) - { - name = property.Value.GetString(); - continue; - } - if (property.NameEquals("properties"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - foreach (var property0 in property.Value.EnumerateObject()) - { - if (property0.NameEquals("schema"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property0.Value.EnumerateArray()) - { - array.Add(MapperTableSchema.DeserializeMapperTableSchema(item)); - } - schema = array; - continue; - } - if (property0.NameEquals("dslConnectorProperties"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property0.Value.EnumerateArray()) - { - array.Add(MapperDslConnectorProperties.DeserializeMapperDslConnectorProperties(item)); - } - dslConnectorProperties = array; - continue; - } - } - continue; - } - } - return new MapperTable(name.Value, Optional.ToList(schema), Optional.ToList(dslConnectorProperties)); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/MapperTable.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/MapperTable.cs deleted file mode 100644 index 37adc934..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/MapperTable.cs +++ /dev/null @@ -1,37 +0,0 @@ -// - -#nullable disable - -using Azure.Core; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// CDC table details. - public partial class MapperTable - { - /// Initializes a new instance of MapperTable. - public MapperTable() - { - Schema = new ChangeTrackingList(); - DslConnectorProperties = new ChangeTrackingList(); - } - - /// Initializes a new instance of MapperTable. - /// Name of the table. - /// List of columns for the source table. - /// List of name/value pairs for connection properties. - internal MapperTable(string name, IList schema, IList dslConnectorProperties) - { - Name = name; - Schema = schema; - DslConnectorProperties = dslConnectorProperties; - } - - /// Name of the table. - public string Name { get; set; } - /// List of columns for the source table. - public IList Schema { get; } - /// List of name/value pairs for connection properties. - public IList DslConnectorProperties { get; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/MapperTableSchema.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/MapperTableSchema.Serialization.cs deleted file mode 100644 index a62f9837..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/MapperTableSchema.Serialization.cs +++ /dev/null @@ -1,52 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class MapperTableSchema : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - if (Optional.IsDefined(Name)) - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (Optional.IsDefined(DataType)) - { - writer.WritePropertyName("dataType"u8); - writer.WriteStringValue(DataType); - } - writer.WriteEndObject(); - } - - internal static MapperTableSchema DeserializeMapperTableSchema(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - Optional name = default; - Optional dataType = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("name"u8)) - { - name = property.Value.GetString(); - continue; - } - if (property.NameEquals("dataType"u8)) - { - dataType = property.Value.GetString(); - continue; - } - } - return new MapperTableSchema(name.Value, dataType.Value); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/MapperTableSchema.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/MapperTableSchema.cs deleted file mode 100644 index fd19f94b..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/MapperTableSchema.cs +++ /dev/null @@ -1,29 +0,0 @@ -// - -#nullable disable - -namespace AzureDataFactory.TestingFramework.Models -{ - /// Schema of a CDC table in terms of column names and their corresponding data types. - public partial class MapperTableSchema - { - /// Initializes a new instance of MapperTableSchema. - public MapperTableSchema() - { - } - - /// Initializes a new instance of MapperTableSchema. - /// Name of the column. - /// Data type of the column. - internal MapperTableSchema(string name, string dataType) - { - Name = name; - DataType = dataType; - } - - /// Name of the column. - public string Name { get; set; } - /// Data type of the column. - public string DataType { get; set; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/MapperTargetConnectionsInfo.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/MapperTargetConnectionsInfo.Serialization.cs deleted file mode 100644 index 902ef91b..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/MapperTargetConnectionsInfo.Serialization.cs +++ /dev/null @@ -1,136 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class MapperTargetConnectionsInfo : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - if (Optional.IsCollectionDefined(TargetEntities)) - { - writer.WritePropertyName("targetEntities"u8); - writer.WriteStartArray(); - foreach (var item in TargetEntities) - { - writer.WriteObjectValue(item); - } - writer.WriteEndArray(); - } - if (Optional.IsDefined(Connection)) - { - writer.WritePropertyName("connection"u8); - writer.WriteObjectValue(Connection); - } - if (Optional.IsCollectionDefined(DataMapperMappings)) - { - writer.WritePropertyName("dataMapperMappings"u8); - writer.WriteStartArray(); - foreach (var item in DataMapperMappings) - { - writer.WriteObjectValue(item); - } - writer.WriteEndArray(); - } - if (Optional.IsCollectionDefined(Relationships)) - { - writer.WritePropertyName("relationships"u8); - writer.WriteStartArray(); - foreach (var item in Relationships) - { - if (item == null) - { - writer.WriteNullValue(); - continue; - } -#if NET6_0_OR_GREATER - writer.WriteRawValue(item); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.ToString()).RootElement); -#endif - } - writer.WriteEndArray(); - } - writer.WriteEndObject(); - } - - internal static MapperTargetConnectionsInfo DeserializeMapperTargetConnectionsInfo(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - Optional> targetEntities = default; - Optional connection = default; - Optional> dataMapperMappings = default; - Optional> relationships = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("targetEntities"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - array.Add(MapperTable.DeserializeMapperTable(item)); - } - targetEntities = array; - continue; - } - if (property.NameEquals("connection"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - connection = MapperConnection.DeserializeMapperConnection(property.Value); - continue; - } - if (property.NameEquals("dataMapperMappings"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - array.Add(DataMapperMapping.DeserializeDataMapperMapping(item)); - } - dataMapperMappings = array; - continue; - } - if (property.NameEquals("relationships"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - if (item.ValueKind == JsonValueKind.Null) - { - array.Add(null); - } - else - { - array.Add(BinaryData.FromString(item.GetRawText())); - } - } - relationships = array; - continue; - } - } - return new MapperTargetConnectionsInfo(Optional.ToList(targetEntities), connection.Value, Optional.ToList(dataMapperMappings), Optional.ToList(relationships)); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/MapperTargetConnectionsInfo.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/MapperTargetConnectionsInfo.cs deleted file mode 100644 index 01d0e888..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/MapperTargetConnectionsInfo.cs +++ /dev/null @@ -1,71 +0,0 @@ -// - -#nullable disable - -using Azure.Core; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// A object which contains list of tables and connection details for a target connection. - public partial class MapperTargetConnectionsInfo - { - /// Initializes a new instance of MapperTargetConnectionsInfo. - public MapperTargetConnectionsInfo() - { - TargetEntities = new ChangeTrackingList(); - DataMapperMappings = new ChangeTrackingList(); - Relationships = new ChangeTrackingList(); - } - - /// Initializes a new instance of MapperTargetConnectionsInfo. - /// List of source tables for a target connection. - /// Source connection details. - /// List of table mappings. - /// List of relationship info among the tables. - internal MapperTargetConnectionsInfo(IList targetEntities, MapperConnection connection, IList dataMapperMappings, IList relationships) - { - TargetEntities = targetEntities; - Connection = connection; - DataMapperMappings = dataMapperMappings; - Relationships = relationships; - } - - /// List of source tables for a target connection. - public IList TargetEntities { get; } - /// Source connection details. - public MapperConnection Connection { get; set; } - /// List of table mappings. - public IList DataMapperMappings { get; } - /// - /// List of relationship info among the tables. - /// - /// To assign an object to the element of this property use . - /// - /// - /// To assign an already formated json string to this property use . - /// - /// - /// Examples: - /// - /// - /// BinaryData.FromObjectAsJson("foo") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromString("\"foo\"") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromObjectAsJson(new { key = "value" }) - /// Creates a payload of { "key": "value" }. - /// - /// - /// BinaryData.FromString("{\"key\": \"value\"}") - /// Creates a payload of { "key": "value" }. - /// - /// - /// - /// - public IList Relationships { get; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/MappingType.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/MappingType.cs deleted file mode 100644 index dec4646f..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/MappingType.cs +++ /dev/null @@ -1,50 +0,0 @@ -// - -#nullable disable - -using System.ComponentModel; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// Type of the CDC attribute mapping. Note: 'Advanced' mapping type is also saved as 'Derived'. - public readonly partial struct MappingType : IEquatable - { - private readonly string _value; - - /// Initializes a new instance of . - /// is null. - public MappingType(string value) - { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } - - private const string DirectValue = "Direct"; - private const string DerivedValue = "Derived"; - private const string AggregateValue = "Aggregate"; - - /// Direct. - public static MappingType Direct { get; } = new MappingType(DirectValue); - /// Derived. - public static MappingType Derived { get; } = new MappingType(DerivedValue); - /// Aggregate. - public static MappingType Aggregate { get; } = new MappingType(AggregateValue); - /// Determines if two values are the same. - public static bool operator ==(MappingType left, MappingType right) => left.Equals(right); - /// Determines if two values are not the same. - public static bool operator !=(MappingType left, MappingType right) => !left.Equals(right); - /// Converts a string to a . - public static implicit operator MappingType(string value) => new MappingType(value); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override bool Equals(object obj) => obj is MappingType other && Equals(other); - /// - public bool Equals(MappingType other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override int GetHashCode() => _value?.GetHashCode() ?? 0; - /// - public override string ToString() => _value; - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/MariaDBLinkedService.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/MariaDBLinkedService.Serialization.cs deleted file mode 100644 index 2287989d..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/MariaDBLinkedService.Serialization.cs +++ /dev/null @@ -1,201 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class MariaDBLinkedService : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - writer.WritePropertyName("type"u8); - writer.WriteStringValue(LinkedServiceType); - if (Optional.IsDefined(ConnectVia)) - { - writer.WritePropertyName("connectVia"u8); - writer.WriteObjectValue(ConnectVia); - } - if (Optional.IsDefined(Description)) - { - writer.WritePropertyName("description"u8); - writer.WriteStringValue(Description); - } - if (Optional.IsCollectionDefined(Parameters)) - { - writer.WritePropertyName("parameters"u8); - writer.WriteStartObject(); - foreach (var item in Parameters) - { - writer.WritePropertyName(item.Key); - writer.WriteObjectValue(item.Value); - } - writer.WriteEndObject(); - } - if (Optional.IsCollectionDefined(Annotations)) - { - writer.WritePropertyName("annotations"u8); - writer.WriteStartArray(); - foreach (var item in Annotations) - { - if (item == null) - { - writer.WriteNullValue(); - continue; - } -#if NET6_0_OR_GREATER - writer.WriteRawValue(item); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.ToString()).RootElement); -#endif - } - writer.WriteEndArray(); - } - writer.WritePropertyName("typeProperties"u8); - writer.WriteStartObject(); - if (Optional.IsDefined(ConnectionString)) - { - writer.WritePropertyName("connectionString"u8); - JsonSerializer.Serialize(writer, ConnectionString); - } - if (Optional.IsDefined(Password)) - { - writer.WritePropertyName("pwd"u8); - JsonSerializer.Serialize(writer, Password); - } - if (Optional.IsDefined(EncryptedCredential)) - { - writer.WritePropertyName("encryptedCredential"u8); - writer.WriteStringValue(EncryptedCredential); - } - writer.WriteEndObject(); - foreach (var item in AdditionalProperties) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.Value.ToString()).RootElement); -#endif - } - writer.WriteEndObject(); - } - - internal static MariaDBLinkedService DeserializeMariaDBLinkedService(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - string type = default; - Optional connectVia = default; - Optional description = default; - Optional> parameters = default; - Optional> annotations = default; - Optional> connectionString = default; - Optional password = default; - Optional encryptedCredential = default; - IDictionary> additionalProperties = default; - Dictionary> additionalPropertiesDictionary = new Dictionary>(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("type"u8)) - { - type = property.Value.GetString(); - continue; - } - if (property.NameEquals("connectVia"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - connectVia = IntegrationRuntimeReference.DeserializeIntegrationRuntimeReference(property.Value); - continue; - } - if (property.NameEquals("description"u8)) - { - description = property.Value.GetString(); - continue; - } - if (property.NameEquals("parameters"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - Dictionary dictionary = new Dictionary(); - foreach (var property0 in property.Value.EnumerateObject()) - { - dictionary.Add(property0.Name, EntityParameterSpecification.DeserializeEntityParameterSpecification(property0.Value)); - } - parameters = dictionary; - continue; - } - if (property.NameEquals("annotations"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - if (item.ValueKind == JsonValueKind.Null) - { - array.Add(null); - } - else - { - array.Add(BinaryData.FromString(item.GetRawText())); - } - } - annotations = array; - continue; - } - if (property.NameEquals("typeProperties"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - foreach (var property0 in property.Value.EnumerateObject()) - { - if (property0.NameEquals("connectionString"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - connectionString = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("pwd"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - password = JsonSerializer.Deserialize(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("encryptedCredential"u8)) - { - encryptedCredential = property0.Value.GetString(); - continue; - } - } - continue; - } - additionalPropertiesDictionary.Add(property.Name, JsonSerializer.Deserialize>(property.Value.GetRawText())); - } - additionalProperties = additionalPropertiesDictionary; - return new MariaDBLinkedService(type, connectVia.Value, description.Value, Optional.ToDictionary(parameters), Optional.ToList(annotations), additionalProperties, connectionString.Value, password, encryptedCredential.Value); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/MariaDBLinkedService.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/MariaDBLinkedService.cs deleted file mode 100644 index 4fc621b9..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/MariaDBLinkedService.cs +++ /dev/null @@ -1,43 +0,0 @@ -// - -#nullable disable - -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// MariaDB server linked service. - public partial class MariaDBLinkedService : DataFactoryLinkedServiceProperties - { - /// Initializes a new instance of MariaDBLinkedService. - public MariaDBLinkedService() - { - LinkedServiceType = "MariaDB"; - } - - /// Initializes a new instance of MariaDBLinkedService. - /// Type of linked service. - /// The integration runtime reference. - /// Linked service description. - /// Parameters for linked service. - /// List of tags that can be used for describing the linked service. - /// Additional Properties. - /// An ODBC connection string. Type: string, SecureString or AzureKeyVaultSecretReference. - /// The Azure key vault secret reference of password in connection string. - /// The encrypted credential used for authentication. Credentials are encrypted using the integration runtime credential manager. Type: string. - internal MariaDBLinkedService(string linkedServiceType, IntegrationRuntimeReference connectVia, string description, IDictionary parameters, IList annotations, IDictionary> additionalProperties, DataFactoryElement connectionString, DataFactoryKeyVaultSecretReference password, string encryptedCredential) : base(linkedServiceType, connectVia, description, parameters, annotations, additionalProperties) - { - ConnectionString = connectionString; - Password = password; - EncryptedCredential = encryptedCredential; - LinkedServiceType = linkedServiceType ?? "MariaDB"; - } - - /// An ODBC connection string. Type: string, SecureString or AzureKeyVaultSecretReference. - public DataFactoryElement ConnectionString { get; set; } - /// The Azure key vault secret reference of password in connection string. - public DataFactoryKeyVaultSecretReference Password { get; set; } - /// The encrypted credential used for authentication. Credentials are encrypted using the integration runtime credential manager. Type: string. - public string EncryptedCredential { get; set; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/MariaDBSource.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/MariaDBSource.Serialization.cs deleted file mode 100644 index b4f4ee29..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/MariaDBSource.Serialization.cs +++ /dev/null @@ -1,161 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class MariaDBSource : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - if (Optional.IsDefined(Query)) - { - writer.WritePropertyName("query"u8); - JsonSerializer.Serialize(writer, Query); - } - if (Optional.IsDefined(QueryTimeout)) - { - writer.WritePropertyName("queryTimeout"u8); - JsonSerializer.Serialize(writer, QueryTimeout); - } - if (Optional.IsDefined(AdditionalColumns)) - { - writer.WritePropertyName("additionalColumns"u8); -#if NET6_0_OR_GREATER - writer.WriteRawValue(AdditionalColumns); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(AdditionalColumns.ToString()).RootElement); -#endif - } - writer.WritePropertyName("type"u8); - writer.WriteStringValue(CopySourceType); - if (Optional.IsDefined(SourceRetryCount)) - { - writer.WritePropertyName("sourceRetryCount"u8); - JsonSerializer.Serialize(writer, SourceRetryCount); - } - if (Optional.IsDefined(SourceRetryWait)) - { - writer.WritePropertyName("sourceRetryWait"u8); - JsonSerializer.Serialize(writer, SourceRetryWait); - } - if (Optional.IsDefined(MaxConcurrentConnections)) - { - writer.WritePropertyName("maxConcurrentConnections"u8); - JsonSerializer.Serialize(writer, MaxConcurrentConnections); - } - if (Optional.IsDefined(DisableMetricsCollection)) - { - writer.WritePropertyName("disableMetricsCollection"u8); - JsonSerializer.Serialize(writer, DisableMetricsCollection); - } - foreach (var item in AdditionalProperties) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.Value.ToString()).RootElement); -#endif - } - writer.WriteEndObject(); - } - - internal static MariaDBSource DeserializeMariaDBSource(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - Optional> query = default; - Optional> queryTimeout = default; - Optional additionalColumns = default; - string type = default; - Optional> sourceRetryCount = default; - Optional> sourceRetryWait = default; - Optional> maxConcurrentConnections = default; - Optional> disableMetricsCollection = default; - IDictionary> additionalProperties = default; - Dictionary> additionalPropertiesDictionary = new Dictionary>(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("query"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - query = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("queryTimeout"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - queryTimeout = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("additionalColumns"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - additionalColumns = BinaryData.FromString(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("type"u8)) - { - type = property.Value.GetString(); - continue; - } - if (property.NameEquals("sourceRetryCount"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - sourceRetryCount = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("sourceRetryWait"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - sourceRetryWait = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("maxConcurrentConnections"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - maxConcurrentConnections = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("disableMetricsCollection"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - disableMetricsCollection = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - additionalPropertiesDictionary.Add(property.Name, JsonSerializer.Deserialize>(property.Value.GetRawText())); - } - additionalProperties = additionalPropertiesDictionary; - return new MariaDBSource(type, sourceRetryCount.Value, sourceRetryWait.Value, maxConcurrentConnections.Value, disableMetricsCollection.Value, additionalProperties, queryTimeout.Value, additionalColumns.Value, query.Value); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/MariaDBSource.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/MariaDBSource.cs deleted file mode 100644 index 4101117e..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/MariaDBSource.cs +++ /dev/null @@ -1,37 +0,0 @@ -// - -#nullable disable - -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// A copy activity MariaDB server source. - public partial class MariaDBSource : TabularSource - { - /// Initializes a new instance of MariaDBSource. - public MariaDBSource() - { - CopySourceType = "MariaDBSource"; - } - - /// Initializes a new instance of MariaDBSource. - /// Copy source type. - /// Source retry count. Type: integer (or Expression with resultType integer). - /// Source retry wait. Type: string (or Expression with resultType string), pattern: ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). - /// The maximum concurrent connection count for the source data store. Type: integer (or Expression with resultType integer). - /// If true, disable data store metrics collection. Default is false. Type: boolean (or Expression with resultType boolean). - /// Additional Properties. - /// 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). - /// A query to retrieve data from source. Type: string (or Expression with resultType string). - internal MariaDBSource(string copySourceType, DataFactoryElement sourceRetryCount, DataFactoryElement sourceRetryWait, DataFactoryElement maxConcurrentConnections, DataFactoryElement disableMetricsCollection, IDictionary> additionalProperties, DataFactoryElement queryTimeout, BinaryData additionalColumns, DataFactoryElement query) : base(copySourceType, sourceRetryCount, sourceRetryWait, maxConcurrentConnections, disableMetricsCollection, additionalProperties, queryTimeout, additionalColumns) - { - Query = query; - CopySourceType = copySourceType ?? "MariaDBSource"; - } - - /// A query to retrieve data from source. Type: string (or Expression with resultType string). - public DataFactoryElement Query { get; set; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/MariaDBTableDataset.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/MariaDBTableDataset.Serialization.cs deleted file mode 100644 index f5ecbfc4..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/MariaDBTableDataset.Serialization.cs +++ /dev/null @@ -1,212 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class MariaDBTableDataset : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - writer.WritePropertyName("type"u8); - writer.WriteStringValue(DatasetType); - if (Optional.IsDefined(Description)) - { - writer.WritePropertyName("description"u8); - writer.WriteStringValue(Description); - } - if (Optional.IsDefined(Structure)) - { - writer.WritePropertyName("structure"u8); - JsonSerializer.Serialize(writer, Structure); - } - if (Optional.IsDefined(Schema)) - { - writer.WritePropertyName("schema"u8); - JsonSerializer.Serialize(writer, Schema); - } - writer.WritePropertyName("linkedServiceName"u8); - JsonSerializer.Serialize(writer, LinkedServiceName); if (Optional.IsCollectionDefined(Parameters)) - { - writer.WritePropertyName("parameters"u8); - writer.WriteStartObject(); - foreach (var item in Parameters) - { - writer.WritePropertyName(item.Key); - writer.WriteObjectValue(item.Value); - } - writer.WriteEndObject(); - } - if (Optional.IsCollectionDefined(Annotations)) - { - writer.WritePropertyName("annotations"u8); - writer.WriteStartArray(); - foreach (var item in Annotations) - { - if (item == null) - { - writer.WriteNullValue(); - continue; - } -#if NET6_0_OR_GREATER - writer.WriteRawValue(item); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.ToString()).RootElement); -#endif - } - writer.WriteEndArray(); - } - if (Optional.IsDefined(Folder)) - { - writer.WritePropertyName("folder"u8); - writer.WriteObjectValue(Folder); - } - writer.WritePropertyName("typeProperties"u8); - writer.WriteStartObject(); - if (Optional.IsDefined(TableName)) - { - writer.WritePropertyName("tableName"u8); - JsonSerializer.Serialize(writer, TableName); - } - writer.WriteEndObject(); - foreach (var item in AdditionalProperties) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.Value.ToString()).RootElement); -#endif - } - writer.WriteEndObject(); - } - - internal static MariaDBTableDataset DeserializeMariaDBTableDataset(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - string type = default; - Optional description = default; - Optional>> structure = default; - Optional>> schema = default; - DataFactoryLinkedServiceReference linkedServiceName = default; - Optional> parameters = default; - Optional> annotations = default; - Optional folder = default; - Optional> tableName = default; - IDictionary> additionalProperties = default; - Dictionary> additionalPropertiesDictionary = new Dictionary>(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("type"u8)) - { - type = property.Value.GetString(); - continue; - } - if (property.NameEquals("description"u8)) - { - description = property.Value.GetString(); - continue; - } - if (property.NameEquals("structure"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - structure = JsonSerializer.Deserialize>>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("schema"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - schema = JsonSerializer.Deserialize>>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("linkedServiceName"u8)) - { - linkedServiceName = JsonSerializer.Deserialize(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("parameters"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - Dictionary dictionary = new Dictionary(); - foreach (var property0 in property.Value.EnumerateObject()) - { - dictionary.Add(property0.Name, EntityParameterSpecification.DeserializeEntityParameterSpecification(property0.Value)); - } - parameters = dictionary; - continue; - } - if (property.NameEquals("annotations"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - if (item.ValueKind == JsonValueKind.Null) - { - array.Add(null); - } - else - { - array.Add(BinaryData.FromString(item.GetRawText())); - } - } - annotations = array; - continue; - } - if (property.NameEquals("folder"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - folder = DatasetFolder.DeserializeDatasetFolder(property.Value); - continue; - } - if (property.NameEquals("typeProperties"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - foreach (var property0 in property.Value.EnumerateObject()) - { - if (property0.NameEquals("tableName"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - tableName = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - } - continue; - } - additionalPropertiesDictionary.Add(property.Name, JsonSerializer.Deserialize>(property.Value.GetRawText())); - } - additionalProperties = additionalPropertiesDictionary; - return new MariaDBTableDataset(type, description.Value, structure.Value, schema.Value, linkedServiceName, Optional.ToDictionary(parameters), Optional.ToList(annotations), folder.Value, additionalProperties, tableName.Value); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/MariaDBTableDataset.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/MariaDBTableDataset.cs deleted file mode 100644 index 56efa9ae..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/MariaDBTableDataset.cs +++ /dev/null @@ -1,43 +0,0 @@ -// - -#nullable disable - -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// MariaDB server dataset. - public partial class MariaDBTableDataset : DataFactoryDatasetProperties - { - /// Initializes a new instance of MariaDBTableDataset. - /// Linked service reference. - /// is null. - public MariaDBTableDataset(DataFactoryLinkedServiceReference linkedServiceName) : base(linkedServiceName) - { - Argument.AssertNotNull(linkedServiceName, nameof(linkedServiceName)); - - DatasetType = "MariaDBTable"; - } - - /// Initializes a new instance of MariaDBTableDataset. - /// Type of dataset. - /// Dataset description. - /// Columns that define the structure of the dataset. Type: array (or Expression with resultType array), itemType: DatasetDataElement. - /// Columns that define the physical type schema of the dataset. Type: array (or Expression with resultType array), itemType: DatasetSchemaDataElement. - /// Linked service reference. - /// Parameters for dataset. - /// List of tags that can be used for describing the Dataset. - /// The folder that this Dataset is in. If not specified, Dataset will appear at the root level. - /// Additional Properties. - /// The table name. Type: string (or Expression with resultType string). - internal MariaDBTableDataset(string datasetType, string description, DataFactoryElement> structure, DataFactoryElement> schema, DataFactoryLinkedServiceReference linkedServiceName, IDictionary parameters, IList annotations, DatasetFolder folder, IDictionary> additionalProperties, DataFactoryElement tableName) : base(datasetType, description, structure, schema, linkedServiceName, parameters, annotations, folder, additionalProperties) - { - TableName = tableName; - DatasetType = datasetType ?? "MariaDBTable"; - } - - /// The table name. Type: string (or Expression with resultType string). - public DataFactoryElement TableName { get; set; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/MarketoLinkedService.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/MarketoLinkedService.Serialization.cs deleted file mode 100644 index 7615b0e2..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/MarketoLinkedService.Serialization.cs +++ /dev/null @@ -1,247 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class MarketoLinkedService : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - writer.WritePropertyName("type"u8); - writer.WriteStringValue(LinkedServiceType); - if (Optional.IsDefined(ConnectVia)) - { - writer.WritePropertyName("connectVia"u8); - writer.WriteObjectValue(ConnectVia); - } - if (Optional.IsDefined(Description)) - { - writer.WritePropertyName("description"u8); - writer.WriteStringValue(Description); - } - if (Optional.IsCollectionDefined(Parameters)) - { - writer.WritePropertyName("parameters"u8); - writer.WriteStartObject(); - foreach (var item in Parameters) - { - writer.WritePropertyName(item.Key); - writer.WriteObjectValue(item.Value); - } - writer.WriteEndObject(); - } - if (Optional.IsCollectionDefined(Annotations)) - { - writer.WritePropertyName("annotations"u8); - writer.WriteStartArray(); - foreach (var item in Annotations) - { - if (item == null) - { - writer.WriteNullValue(); - continue; - } -#if NET6_0_OR_GREATER - writer.WriteRawValue(item); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.ToString()).RootElement); -#endif - } - writer.WriteEndArray(); - } - writer.WritePropertyName("typeProperties"u8); - writer.WriteStartObject(); - writer.WritePropertyName("endpoint"u8); - JsonSerializer.Serialize(writer, Endpoint); - writer.WritePropertyName("clientId"u8); - JsonSerializer.Serialize(writer, ClientId); - if (Optional.IsDefined(ClientSecret)) - { - writer.WritePropertyName("clientSecret"u8); - JsonSerializer.Serialize(writer, ClientSecret); - } - if (Optional.IsDefined(UseEncryptedEndpoints)) - { - writer.WritePropertyName("useEncryptedEndpoints"u8); - JsonSerializer.Serialize(writer, UseEncryptedEndpoints); - } - if (Optional.IsDefined(UseHostVerification)) - { - writer.WritePropertyName("useHostVerification"u8); - JsonSerializer.Serialize(writer, UseHostVerification); - } - if (Optional.IsDefined(UsePeerVerification)) - { - writer.WritePropertyName("usePeerVerification"u8); - JsonSerializer.Serialize(writer, UsePeerVerification); - } - if (Optional.IsDefined(EncryptedCredential)) - { - writer.WritePropertyName("encryptedCredential"u8); - writer.WriteStringValue(EncryptedCredential); - } - writer.WriteEndObject(); - foreach (var item in AdditionalProperties) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.Value.ToString()).RootElement); -#endif - } - writer.WriteEndObject(); - } - - internal static MarketoLinkedService DeserializeMarketoLinkedService(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - string type = default; - Optional connectVia = default; - Optional description = default; - Optional> parameters = default; - Optional> annotations = default; - DataFactoryElement endpoint = default; - DataFactoryElement clientId = default; - Optional clientSecret = default; - Optional> useEncryptedEndpoints = default; - Optional> useHostVerification = default; - Optional> usePeerVerification = default; - Optional encryptedCredential = default; - IDictionary> additionalProperties = default; - Dictionary> additionalPropertiesDictionary = new Dictionary>(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("type"u8)) - { - type = property.Value.GetString(); - continue; - } - if (property.NameEquals("connectVia"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - connectVia = IntegrationRuntimeReference.DeserializeIntegrationRuntimeReference(property.Value); - continue; - } - if (property.NameEquals("description"u8)) - { - description = property.Value.GetString(); - continue; - } - if (property.NameEquals("parameters"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - Dictionary dictionary = new Dictionary(); - foreach (var property0 in property.Value.EnumerateObject()) - { - dictionary.Add(property0.Name, EntityParameterSpecification.DeserializeEntityParameterSpecification(property0.Value)); - } - parameters = dictionary; - continue; - } - if (property.NameEquals("annotations"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - if (item.ValueKind == JsonValueKind.Null) - { - array.Add(null); - } - else - { - array.Add(BinaryData.FromString(item.GetRawText())); - } - } - annotations = array; - continue; - } - if (property.NameEquals("typeProperties"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - foreach (var property0 in property.Value.EnumerateObject()) - { - if (property0.NameEquals("endpoint"u8)) - { - endpoint = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("clientId"u8)) - { - clientId = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("clientSecret"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - clientSecret = JsonSerializer.Deserialize(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("useEncryptedEndpoints"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - useEncryptedEndpoints = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("useHostVerification"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - useHostVerification = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("usePeerVerification"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - usePeerVerification = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("encryptedCredential"u8)) - { - encryptedCredential = property0.Value.GetString(); - continue; - } - } - continue; - } - additionalPropertiesDictionary.Add(property.Name, JsonSerializer.Deserialize>(property.Value.GetRawText())); - } - additionalProperties = additionalPropertiesDictionary; - return new MarketoLinkedService(type, connectVia.Value, description.Value, Optional.ToDictionary(parameters), Optional.ToList(annotations), additionalProperties, endpoint, clientId, clientSecret, useEncryptedEndpoints.Value, useHostVerification.Value, usePeerVerification.Value, encryptedCredential.Value); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/MarketoLinkedService.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/MarketoLinkedService.cs deleted file mode 100644 index 0a3457f4..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/MarketoLinkedService.cs +++ /dev/null @@ -1,68 +0,0 @@ -// - -#nullable disable - -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// Marketo server linked service. - public partial class MarketoLinkedService : DataFactoryLinkedServiceProperties - { - /// Initializes a new instance of MarketoLinkedService. - /// The endpoint of the Marketo server. (i.e. 123-ABC-321.mktorest.com). - /// The client Id of your Marketo service. - /// or is null. - public MarketoLinkedService(DataFactoryElement endpoint, DataFactoryElement clientId) - { - Argument.AssertNotNull(endpoint, nameof(endpoint)); - Argument.AssertNotNull(clientId, nameof(clientId)); - - Endpoint = endpoint; - ClientId = clientId; - LinkedServiceType = "Marketo"; - } - - /// Initializes a new instance of MarketoLinkedService. - /// Type of linked service. - /// The integration runtime reference. - /// Linked service description. - /// Parameters for linked service. - /// List of tags that can be used for describing the linked service. - /// Additional Properties. - /// The endpoint of the Marketo server. (i.e. 123-ABC-321.mktorest.com). - /// The client Id of your Marketo service. - /// The client secret of your Marketo service. - /// Specifies whether the data source endpoints are encrypted using HTTPS. The default value is true. - /// 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. - /// Specifies whether to verify the identity of the server when connecting over SSL. The default value is true. - /// The encrypted credential used for authentication. Credentials are encrypted using the integration runtime credential manager. Type: string. - internal MarketoLinkedService(string linkedServiceType, IntegrationRuntimeReference connectVia, string description, IDictionary parameters, IList annotations, IDictionary> additionalProperties, DataFactoryElement endpoint, DataFactoryElement clientId, DataFactorySecretBaseDefinition clientSecret, DataFactoryElement useEncryptedEndpoints, DataFactoryElement useHostVerification, DataFactoryElement usePeerVerification, string encryptedCredential) : base(linkedServiceType, connectVia, description, parameters, annotations, additionalProperties) - { - Endpoint = endpoint; - ClientId = clientId; - ClientSecret = clientSecret; - UseEncryptedEndpoints = useEncryptedEndpoints; - UseHostVerification = useHostVerification; - UsePeerVerification = usePeerVerification; - EncryptedCredential = encryptedCredential; - LinkedServiceType = linkedServiceType ?? "Marketo"; - } - - /// The endpoint of the Marketo server. (i.e. 123-ABC-321.mktorest.com). - public DataFactoryElement Endpoint { get; set; } - /// The client Id of your Marketo service. - public DataFactoryElement ClientId { get; set; } - /// The client secret of your Marketo service. - public DataFactorySecretBaseDefinition ClientSecret { get; set; } - /// Specifies whether the data source endpoints are encrypted using HTTPS. The default value is true. - public DataFactoryElement UseEncryptedEndpoints { get; set; } - /// 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. - public DataFactoryElement UseHostVerification { get; set; } - /// Specifies whether to verify the identity of the server when connecting over SSL. The default value is true. - public DataFactoryElement UsePeerVerification { get; set; } - /// The encrypted credential used for authentication. Credentials are encrypted using the integration runtime credential manager. Type: string. - public string EncryptedCredential { get; set; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/MarketoObjectDataset.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/MarketoObjectDataset.Serialization.cs deleted file mode 100644 index c0f26fe6..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/MarketoObjectDataset.Serialization.cs +++ /dev/null @@ -1,212 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class MarketoObjectDataset : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - writer.WritePropertyName("type"u8); - writer.WriteStringValue(DatasetType); - if (Optional.IsDefined(Description)) - { - writer.WritePropertyName("description"u8); - writer.WriteStringValue(Description); - } - if (Optional.IsDefined(Structure)) - { - writer.WritePropertyName("structure"u8); - JsonSerializer.Serialize(writer, Structure); - } - if (Optional.IsDefined(Schema)) - { - writer.WritePropertyName("schema"u8); - JsonSerializer.Serialize(writer, Schema); - } - writer.WritePropertyName("linkedServiceName"u8); - JsonSerializer.Serialize(writer, LinkedServiceName); if (Optional.IsCollectionDefined(Parameters)) - { - writer.WritePropertyName("parameters"u8); - writer.WriteStartObject(); - foreach (var item in Parameters) - { - writer.WritePropertyName(item.Key); - writer.WriteObjectValue(item.Value); - } - writer.WriteEndObject(); - } - if (Optional.IsCollectionDefined(Annotations)) - { - writer.WritePropertyName("annotations"u8); - writer.WriteStartArray(); - foreach (var item in Annotations) - { - if (item == null) - { - writer.WriteNullValue(); - continue; - } -#if NET6_0_OR_GREATER - writer.WriteRawValue(item); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.ToString()).RootElement); -#endif - } - writer.WriteEndArray(); - } - if (Optional.IsDefined(Folder)) - { - writer.WritePropertyName("folder"u8); - writer.WriteObjectValue(Folder); - } - writer.WritePropertyName("typeProperties"u8); - writer.WriteStartObject(); - if (Optional.IsDefined(TableName)) - { - writer.WritePropertyName("tableName"u8); - JsonSerializer.Serialize(writer, TableName); - } - writer.WriteEndObject(); - foreach (var item in AdditionalProperties) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.Value.ToString()).RootElement); -#endif - } - writer.WriteEndObject(); - } - - internal static MarketoObjectDataset DeserializeMarketoObjectDataset(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - string type = default; - Optional description = default; - Optional>> structure = default; - Optional>> schema = default; - DataFactoryLinkedServiceReference linkedServiceName = default; - Optional> parameters = default; - Optional> annotations = default; - Optional folder = default; - Optional> tableName = default; - IDictionary> additionalProperties = default; - Dictionary> additionalPropertiesDictionary = new Dictionary>(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("type"u8)) - { - type = property.Value.GetString(); - continue; - } - if (property.NameEquals("description"u8)) - { - description = property.Value.GetString(); - continue; - } - if (property.NameEquals("structure"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - structure = JsonSerializer.Deserialize>>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("schema"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - schema = JsonSerializer.Deserialize>>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("linkedServiceName"u8)) - { - linkedServiceName = JsonSerializer.Deserialize(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("parameters"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - Dictionary dictionary = new Dictionary(); - foreach (var property0 in property.Value.EnumerateObject()) - { - dictionary.Add(property0.Name, EntityParameterSpecification.DeserializeEntityParameterSpecification(property0.Value)); - } - parameters = dictionary; - continue; - } - if (property.NameEquals("annotations"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - if (item.ValueKind == JsonValueKind.Null) - { - array.Add(null); - } - else - { - array.Add(BinaryData.FromString(item.GetRawText())); - } - } - annotations = array; - continue; - } - if (property.NameEquals("folder"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - folder = DatasetFolder.DeserializeDatasetFolder(property.Value); - continue; - } - if (property.NameEquals("typeProperties"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - foreach (var property0 in property.Value.EnumerateObject()) - { - if (property0.NameEquals("tableName"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - tableName = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - } - continue; - } - additionalPropertiesDictionary.Add(property.Name, JsonSerializer.Deserialize>(property.Value.GetRawText())); - } - additionalProperties = additionalPropertiesDictionary; - return new MarketoObjectDataset(type, description.Value, structure.Value, schema.Value, linkedServiceName, Optional.ToDictionary(parameters), Optional.ToList(annotations), folder.Value, additionalProperties, tableName.Value); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/MarketoObjectDataset.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/MarketoObjectDataset.cs deleted file mode 100644 index 14bea71a..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/MarketoObjectDataset.cs +++ /dev/null @@ -1,43 +0,0 @@ -// - -#nullable disable - -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// Marketo server dataset. - public partial class MarketoObjectDataset : DataFactoryDatasetProperties - { - /// Initializes a new instance of MarketoObjectDataset. - /// Linked service reference. - /// is null. - public MarketoObjectDataset(DataFactoryLinkedServiceReference linkedServiceName) : base(linkedServiceName) - { - Argument.AssertNotNull(linkedServiceName, nameof(linkedServiceName)); - - DatasetType = "MarketoObject"; - } - - /// Initializes a new instance of MarketoObjectDataset. - /// Type of dataset. - /// Dataset description. - /// Columns that define the structure of the dataset. Type: array (or Expression with resultType array), itemType: DatasetDataElement. - /// Columns that define the physical type schema of the dataset. Type: array (or Expression with resultType array), itemType: DatasetSchemaDataElement. - /// Linked service reference. - /// Parameters for dataset. - /// List of tags that can be used for describing the Dataset. - /// The folder that this Dataset is in. If not specified, Dataset will appear at the root level. - /// Additional Properties. - /// The table name. Type: string (or Expression with resultType string). - internal MarketoObjectDataset(string datasetType, string description, DataFactoryElement> structure, DataFactoryElement> schema, DataFactoryLinkedServiceReference linkedServiceName, IDictionary parameters, IList annotations, DatasetFolder folder, IDictionary> additionalProperties, DataFactoryElement tableName) : base(datasetType, description, structure, schema, linkedServiceName, parameters, annotations, folder, additionalProperties) - { - TableName = tableName; - DatasetType = datasetType ?? "MarketoObject"; - } - - /// The table name. Type: string (or Expression with resultType string). - public DataFactoryElement TableName { get; set; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/MarketoSource.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/MarketoSource.Serialization.cs deleted file mode 100644 index 80aed4ca..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/MarketoSource.Serialization.cs +++ /dev/null @@ -1,161 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class MarketoSource : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - if (Optional.IsDefined(Query)) - { - writer.WritePropertyName("query"u8); - JsonSerializer.Serialize(writer, Query); - } - if (Optional.IsDefined(QueryTimeout)) - { - writer.WritePropertyName("queryTimeout"u8); - JsonSerializer.Serialize(writer, QueryTimeout); - } - if (Optional.IsDefined(AdditionalColumns)) - { - writer.WritePropertyName("additionalColumns"u8); -#if NET6_0_OR_GREATER - writer.WriteRawValue(AdditionalColumns); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(AdditionalColumns.ToString()).RootElement); -#endif - } - writer.WritePropertyName("type"u8); - writer.WriteStringValue(CopySourceType); - if (Optional.IsDefined(SourceRetryCount)) - { - writer.WritePropertyName("sourceRetryCount"u8); - JsonSerializer.Serialize(writer, SourceRetryCount); - } - if (Optional.IsDefined(SourceRetryWait)) - { - writer.WritePropertyName("sourceRetryWait"u8); - JsonSerializer.Serialize(writer, SourceRetryWait); - } - if (Optional.IsDefined(MaxConcurrentConnections)) - { - writer.WritePropertyName("maxConcurrentConnections"u8); - JsonSerializer.Serialize(writer, MaxConcurrentConnections); - } - if (Optional.IsDefined(DisableMetricsCollection)) - { - writer.WritePropertyName("disableMetricsCollection"u8); - JsonSerializer.Serialize(writer, DisableMetricsCollection); - } - foreach (var item in AdditionalProperties) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.Value.ToString()).RootElement); -#endif - } - writer.WriteEndObject(); - } - - internal static MarketoSource DeserializeMarketoSource(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - Optional> query = default; - Optional> queryTimeout = default; - Optional additionalColumns = default; - string type = default; - Optional> sourceRetryCount = default; - Optional> sourceRetryWait = default; - Optional> maxConcurrentConnections = default; - Optional> disableMetricsCollection = default; - IDictionary> additionalProperties = default; - Dictionary> additionalPropertiesDictionary = new Dictionary>(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("query"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - query = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("queryTimeout"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - queryTimeout = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("additionalColumns"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - additionalColumns = BinaryData.FromString(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("type"u8)) - { - type = property.Value.GetString(); - continue; - } - if (property.NameEquals("sourceRetryCount"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - sourceRetryCount = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("sourceRetryWait"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - sourceRetryWait = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("maxConcurrentConnections"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - maxConcurrentConnections = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("disableMetricsCollection"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - disableMetricsCollection = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - additionalPropertiesDictionary.Add(property.Name, JsonSerializer.Deserialize>(property.Value.GetRawText())); - } - additionalProperties = additionalPropertiesDictionary; - return new MarketoSource(type, sourceRetryCount.Value, sourceRetryWait.Value, maxConcurrentConnections.Value, disableMetricsCollection.Value, additionalProperties, queryTimeout.Value, additionalColumns.Value, query.Value); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/MarketoSource.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/MarketoSource.cs deleted file mode 100644 index da5de9e4..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/MarketoSource.cs +++ /dev/null @@ -1,37 +0,0 @@ -// - -#nullable disable - -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// A copy activity Marketo server source. - public partial class MarketoSource : TabularSource - { - /// Initializes a new instance of MarketoSource. - public MarketoSource() - { - CopySourceType = "MarketoSource"; - } - - /// Initializes a new instance of MarketoSource. - /// Copy source type. - /// Source retry count. Type: integer (or Expression with resultType integer). - /// Source retry wait. Type: string (or Expression with resultType string), pattern: ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). - /// The maximum concurrent connection count for the source data store. Type: integer (or Expression with resultType integer). - /// If true, disable data store metrics collection. Default is false. Type: boolean (or Expression with resultType boolean). - /// Additional Properties. - /// 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). - /// A query to retrieve data from source. Type: string (or Expression with resultType string). - internal MarketoSource(string copySourceType, DataFactoryElement sourceRetryCount, DataFactoryElement sourceRetryWait, DataFactoryElement maxConcurrentConnections, DataFactoryElement disableMetricsCollection, IDictionary> additionalProperties, DataFactoryElement queryTimeout, BinaryData additionalColumns, DataFactoryElement query) : base(copySourceType, sourceRetryCount, sourceRetryWait, maxConcurrentConnections, disableMetricsCollection, additionalProperties, queryTimeout, additionalColumns) - { - Query = query; - CopySourceType = copySourceType ?? "MarketoSource"; - } - - /// A query to retrieve data from source. Type: string (or Expression with resultType string). - public DataFactoryElement Query { get; set; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/MicrosoftAccessLinkedService.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/MicrosoftAccessLinkedService.Serialization.cs deleted file mode 100644 index a6bbb173..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/MicrosoftAccessLinkedService.Serialization.cs +++ /dev/null @@ -1,239 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class MicrosoftAccessLinkedService : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - writer.WritePropertyName("type"u8); - writer.WriteStringValue(LinkedServiceType); - if (Optional.IsDefined(ConnectVia)) - { - writer.WritePropertyName("connectVia"u8); - writer.WriteObjectValue(ConnectVia); - } - if (Optional.IsDefined(Description)) - { - writer.WritePropertyName("description"u8); - writer.WriteStringValue(Description); - } - if (Optional.IsCollectionDefined(Parameters)) - { - writer.WritePropertyName("parameters"u8); - writer.WriteStartObject(); - foreach (var item in Parameters) - { - writer.WritePropertyName(item.Key); - writer.WriteObjectValue(item.Value); - } - writer.WriteEndObject(); - } - if (Optional.IsCollectionDefined(Annotations)) - { - writer.WritePropertyName("annotations"u8); - writer.WriteStartArray(); - foreach (var item in Annotations) - { - if (item == null) - { - writer.WriteNullValue(); - continue; - } -#if NET6_0_OR_GREATER - writer.WriteRawValue(item); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.ToString()).RootElement); -#endif - } - writer.WriteEndArray(); - } - writer.WritePropertyName("typeProperties"u8); - writer.WriteStartObject(); - writer.WritePropertyName("connectionString"u8); - JsonSerializer.Serialize(writer, ConnectionString); - if (Optional.IsDefined(AuthenticationType)) - { - writer.WritePropertyName("authenticationType"u8); - JsonSerializer.Serialize(writer, AuthenticationType); - } - if (Optional.IsDefined(Credential)) - { - writer.WritePropertyName("credential"u8); - JsonSerializer.Serialize(writer, Credential); - } - if (Optional.IsDefined(UserName)) - { - writer.WritePropertyName("userName"u8); - JsonSerializer.Serialize(writer, UserName); - } - if (Optional.IsDefined(Password)) - { - writer.WritePropertyName("password"u8); - JsonSerializer.Serialize(writer, Password); - } - if (Optional.IsDefined(EncryptedCredential)) - { - writer.WritePropertyName("encryptedCredential"u8); - writer.WriteStringValue(EncryptedCredential); - } - writer.WriteEndObject(); - foreach (var item in AdditionalProperties) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.Value.ToString()).RootElement); -#endif - } - writer.WriteEndObject(); - } - - internal static MicrosoftAccessLinkedService DeserializeMicrosoftAccessLinkedService(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - string type = default; - Optional connectVia = default; - Optional description = default; - Optional> parameters = default; - Optional> annotations = default; - DataFactoryElement connectionString = default; - Optional> authenticationType = default; - Optional credential = default; - Optional> userName = default; - Optional password = default; - Optional encryptedCredential = default; - IDictionary> additionalProperties = default; - Dictionary> additionalPropertiesDictionary = new Dictionary>(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("type"u8)) - { - type = property.Value.GetString(); - continue; - } - if (property.NameEquals("connectVia"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - connectVia = IntegrationRuntimeReference.DeserializeIntegrationRuntimeReference(property.Value); - continue; - } - if (property.NameEquals("description"u8)) - { - description = property.Value.GetString(); - continue; - } - if (property.NameEquals("parameters"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - Dictionary dictionary = new Dictionary(); - foreach (var property0 in property.Value.EnumerateObject()) - { - dictionary.Add(property0.Name, EntityParameterSpecification.DeserializeEntityParameterSpecification(property0.Value)); - } - parameters = dictionary; - continue; - } - if (property.NameEquals("annotations"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - if (item.ValueKind == JsonValueKind.Null) - { - array.Add(null); - } - else - { - array.Add(BinaryData.FromString(item.GetRawText())); - } - } - annotations = array; - continue; - } - if (property.NameEquals("typeProperties"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - foreach (var property0 in property.Value.EnumerateObject()) - { - if (property0.NameEquals("connectionString"u8)) - { - connectionString = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("authenticationType"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - authenticationType = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("credential"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - credential = JsonSerializer.Deserialize(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("userName"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - userName = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("password"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - password = JsonSerializer.Deserialize(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("encryptedCredential"u8)) - { - encryptedCredential = property0.Value.GetString(); - continue; - } - } - continue; - } - additionalPropertiesDictionary.Add(property.Name, JsonSerializer.Deserialize>(property.Value.GetRawText())); - } - additionalProperties = additionalPropertiesDictionary; - return new MicrosoftAccessLinkedService(type, connectVia.Value, description.Value, Optional.ToDictionary(parameters), Optional.ToList(annotations), additionalProperties, connectionString, authenticationType.Value, credential, userName.Value, password, encryptedCredential.Value); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/MicrosoftAccessLinkedService.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/MicrosoftAccessLinkedService.cs deleted file mode 100644 index d23afd94..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/MicrosoftAccessLinkedService.cs +++ /dev/null @@ -1,61 +0,0 @@ -// - -#nullable disable - -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// Microsoft Access linked service. - public partial class MicrosoftAccessLinkedService : DataFactoryLinkedServiceProperties - { - /// Initializes a new instance of MicrosoftAccessLinkedService. - /// The non-access credential portion of the connection string as well as an optional encrypted credential. Type: string, or SecureString, or AzureKeyVaultSecretReference, or Expression with resultType string. - /// is null. - public MicrosoftAccessLinkedService(DataFactoryElement connectionString) - { - Argument.AssertNotNull(connectionString, nameof(connectionString)); - - ConnectionString = connectionString; - LinkedServiceType = "MicrosoftAccess"; - } - - /// Initializes a new instance of MicrosoftAccessLinkedService. - /// Type of linked service. - /// The integration runtime reference. - /// Linked service description. - /// Parameters for linked service. - /// List of tags that can be used for describing the linked service. - /// Additional Properties. - /// The non-access credential portion of the connection string as well as an optional encrypted credential. Type: string, or SecureString, or AzureKeyVaultSecretReference, or Expression with resultType string. - /// Type of authentication used to connect to the Microsoft Access as ODBC data store. Possible values are: Anonymous and Basic. Type: string (or Expression with resultType string). - /// The access credential portion of the connection string specified in driver-specific property-value format. - /// User name for Basic authentication. Type: string (or Expression with resultType string). - /// Password for Basic authentication. - /// The encrypted credential used for authentication. Credentials are encrypted using the integration runtime credential manager. Type: string. - internal MicrosoftAccessLinkedService(string linkedServiceType, IntegrationRuntimeReference connectVia, string description, IDictionary parameters, IList annotations, IDictionary> additionalProperties, DataFactoryElement connectionString, DataFactoryElement authenticationType, DataFactorySecretBaseDefinition credential, DataFactoryElement userName, DataFactorySecretBaseDefinition password, string encryptedCredential) : base(linkedServiceType, connectVia, description, parameters, annotations, additionalProperties) - { - ConnectionString = connectionString; - AuthenticationType = authenticationType; - Credential = credential; - UserName = userName; - Password = password; - EncryptedCredential = encryptedCredential; - LinkedServiceType = linkedServiceType ?? "MicrosoftAccess"; - } - - /// The non-access credential portion of the connection string as well as an optional encrypted credential. Type: string, or SecureString, or AzureKeyVaultSecretReference, or Expression with resultType string. - public DataFactoryElement ConnectionString { get; set; } - /// Type of authentication used to connect to the Microsoft Access as ODBC data store. Possible values are: Anonymous and Basic. Type: string (or Expression with resultType string). - public DataFactoryElement AuthenticationType { get; set; } - /// The access credential portion of the connection string specified in driver-specific property-value format. - public DataFactorySecretBaseDefinition Credential { get; set; } - /// User name for Basic authentication. Type: string (or Expression with resultType string). - public DataFactoryElement UserName { get; set; } - /// Password for Basic authentication. - public DataFactorySecretBaseDefinition Password { get; set; } - /// The encrypted credential used for authentication. Credentials are encrypted using the integration runtime credential manager. Type: string. - public string EncryptedCredential { get; set; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/MicrosoftAccessSink.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/MicrosoftAccessSink.Serialization.cs deleted file mode 100644 index 6d51b579..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/MicrosoftAccessSink.Serialization.cs +++ /dev/null @@ -1,157 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class MicrosoftAccessSink : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - if (Optional.IsDefined(PreCopyScript)) - { - writer.WritePropertyName("preCopyScript"u8); - JsonSerializer.Serialize(writer, PreCopyScript); - } - writer.WritePropertyName("type"u8); - writer.WriteStringValue(CopySinkType); - if (Optional.IsDefined(WriteBatchSize)) - { - writer.WritePropertyName("writeBatchSize"u8); - JsonSerializer.Serialize(writer, WriteBatchSize); - } - if (Optional.IsDefined(WriteBatchTimeout)) - { - writer.WritePropertyName("writeBatchTimeout"u8); - JsonSerializer.Serialize(writer, WriteBatchTimeout); - } - if (Optional.IsDefined(SinkRetryCount)) - { - writer.WritePropertyName("sinkRetryCount"u8); - JsonSerializer.Serialize(writer, SinkRetryCount); - } - if (Optional.IsDefined(SinkRetryWait)) - { - writer.WritePropertyName("sinkRetryWait"u8); - JsonSerializer.Serialize(writer, SinkRetryWait); - } - if (Optional.IsDefined(MaxConcurrentConnections)) - { - writer.WritePropertyName("maxConcurrentConnections"u8); - JsonSerializer.Serialize(writer, MaxConcurrentConnections); - } - if (Optional.IsDefined(DisableMetricsCollection)) - { - writer.WritePropertyName("disableMetricsCollection"u8); - JsonSerializer.Serialize(writer, DisableMetricsCollection); - } - foreach (var item in AdditionalProperties) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.Value.ToString()).RootElement); -#endif - } - writer.WriteEndObject(); - } - - internal static MicrosoftAccessSink DeserializeMicrosoftAccessSink(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - Optional> preCopyScript = default; - string type = default; - Optional> writeBatchSize = default; - Optional> writeBatchTimeout = default; - Optional> sinkRetryCount = default; - Optional> sinkRetryWait = default; - Optional> maxConcurrentConnections = default; - Optional> disableMetricsCollection = default; - IDictionary> additionalProperties = default; - Dictionary> additionalPropertiesDictionary = new Dictionary>(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("preCopyScript"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - preCopyScript = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("type"u8)) - { - type = property.Value.GetString(); - continue; - } - if (property.NameEquals("writeBatchSize"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - writeBatchSize = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("writeBatchTimeout"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - writeBatchTimeout = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("sinkRetryCount"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - sinkRetryCount = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("sinkRetryWait"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - sinkRetryWait = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("maxConcurrentConnections"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - maxConcurrentConnections = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("disableMetricsCollection"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - disableMetricsCollection = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - additionalPropertiesDictionary.Add(property.Name, JsonSerializer.Deserialize>(property.Value.GetRawText())); - } - additionalProperties = additionalPropertiesDictionary; - return new MicrosoftAccessSink(type, writeBatchSize.Value, writeBatchTimeout.Value, sinkRetryCount.Value, sinkRetryWait.Value, maxConcurrentConnections.Value, disableMetricsCollection.Value, additionalProperties, preCopyScript.Value); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/MicrosoftAccessSink.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/MicrosoftAccessSink.cs deleted file mode 100644 index c1d21c1d..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/MicrosoftAccessSink.cs +++ /dev/null @@ -1,37 +0,0 @@ -// - -#nullable disable - -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// A copy activity Microsoft Access sink. - public partial class MicrosoftAccessSink : CopySink - { - /// Initializes a new instance of MicrosoftAccessSink. - public MicrosoftAccessSink() - { - CopySinkType = "MicrosoftAccessSink"; - } - - /// Initializes a new instance of MicrosoftAccessSink. - /// Copy sink type. - /// Write batch size. Type: integer (or Expression with resultType integer), minimum: 0. - /// Write batch timeout. Type: string (or Expression with resultType string), pattern: ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). - /// Sink retry count. Type: integer (or Expression with resultType integer). - /// Sink retry wait. Type: string (or Expression with resultType string), pattern: ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). - /// The maximum concurrent connection count for the sink data store. Type: integer (or Expression with resultType integer). - /// If true, disable data store metrics collection. Default is false. Type: boolean (or Expression with resultType boolean). - /// Additional Properties. - /// A query to execute before starting the copy. Type: string (or Expression with resultType string). - internal MicrosoftAccessSink(string copySinkType, DataFactoryElement writeBatchSize, DataFactoryElement writeBatchTimeout, DataFactoryElement sinkRetryCount, DataFactoryElement sinkRetryWait, DataFactoryElement maxConcurrentConnections, DataFactoryElement disableMetricsCollection, IDictionary> additionalProperties, DataFactoryElement preCopyScript) : base(copySinkType, writeBatchSize, writeBatchTimeout, sinkRetryCount, sinkRetryWait, maxConcurrentConnections, disableMetricsCollection, additionalProperties) - { - PreCopyScript = preCopyScript; - CopySinkType = copySinkType ?? "MicrosoftAccessSink"; - } - - /// A query to execute before starting the copy. Type: string (or Expression with resultType string). - public DataFactoryElement PreCopyScript { get; set; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/MicrosoftAccessSource.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/MicrosoftAccessSource.Serialization.cs deleted file mode 100644 index f3f43600..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/MicrosoftAccessSource.Serialization.cs +++ /dev/null @@ -1,146 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class MicrosoftAccessSource : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - if (Optional.IsDefined(Query)) - { - writer.WritePropertyName("query"u8); - JsonSerializer.Serialize(writer, Query); - } - if (Optional.IsDefined(AdditionalColumns)) - { - writer.WritePropertyName("additionalColumns"u8); -#if NET6_0_OR_GREATER - writer.WriteRawValue(AdditionalColumns); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(AdditionalColumns.ToString()).RootElement); -#endif - } - writer.WritePropertyName("type"u8); - writer.WriteStringValue(CopySourceType); - if (Optional.IsDefined(SourceRetryCount)) - { - writer.WritePropertyName("sourceRetryCount"u8); - JsonSerializer.Serialize(writer, SourceRetryCount); - } - if (Optional.IsDefined(SourceRetryWait)) - { - writer.WritePropertyName("sourceRetryWait"u8); - JsonSerializer.Serialize(writer, SourceRetryWait); - } - if (Optional.IsDefined(MaxConcurrentConnections)) - { - writer.WritePropertyName("maxConcurrentConnections"u8); - JsonSerializer.Serialize(writer, MaxConcurrentConnections); - } - if (Optional.IsDefined(DisableMetricsCollection)) - { - writer.WritePropertyName("disableMetricsCollection"u8); - JsonSerializer.Serialize(writer, DisableMetricsCollection); - } - foreach (var item in AdditionalProperties) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.Value.ToString()).RootElement); -#endif - } - writer.WriteEndObject(); - } - - internal static MicrosoftAccessSource DeserializeMicrosoftAccessSource(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - Optional> query = default; - Optional additionalColumns = default; - string type = default; - Optional> sourceRetryCount = default; - Optional> sourceRetryWait = default; - Optional> maxConcurrentConnections = default; - Optional> disableMetricsCollection = default; - IDictionary> additionalProperties = default; - Dictionary> additionalPropertiesDictionary = new Dictionary>(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("query"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - query = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("additionalColumns"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - additionalColumns = BinaryData.FromString(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("type"u8)) - { - type = property.Value.GetString(); - continue; - } - if (property.NameEquals("sourceRetryCount"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - sourceRetryCount = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("sourceRetryWait"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - sourceRetryWait = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("maxConcurrentConnections"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - maxConcurrentConnections = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("disableMetricsCollection"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - disableMetricsCollection = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - additionalPropertiesDictionary.Add(property.Name, JsonSerializer.Deserialize>(property.Value.GetRawText())); - } - additionalProperties = additionalPropertiesDictionary; - return new MicrosoftAccessSource(type, sourceRetryCount.Value, sourceRetryWait.Value, maxConcurrentConnections.Value, disableMetricsCollection.Value, additionalProperties, query.Value, additionalColumns.Value); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/MicrosoftAccessSource.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/MicrosoftAccessSource.cs deleted file mode 100644 index e06bb2b2..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/MicrosoftAccessSource.cs +++ /dev/null @@ -1,68 +0,0 @@ -// - -#nullable disable - -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// A copy activity source for Microsoft Access. - public partial class MicrosoftAccessSource : CopyActivitySource - { - /// Initializes a new instance of MicrosoftAccessSource. - public MicrosoftAccessSource() - { - CopySourceType = "MicrosoftAccessSource"; - } - - /// Initializes a new instance of MicrosoftAccessSource. - /// Copy source type. - /// Source retry count. Type: integer (or Expression with resultType integer). - /// Source retry wait. Type: string (or Expression with resultType string), pattern: ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). - /// The maximum concurrent connection count for the source data store. Type: integer (or Expression with resultType integer). - /// If true, disable data store metrics collection. Default is false. Type: boolean (or Expression with resultType boolean). - /// Additional Properties. - /// Database query. Type: string (or Expression with resultType string). - /// Specifies the additional columns to be added to source data. Type: array of objects(AdditionalColumns) (or Expression with resultType array of objects). - internal MicrosoftAccessSource(string copySourceType, DataFactoryElement sourceRetryCount, DataFactoryElement sourceRetryWait, DataFactoryElement maxConcurrentConnections, DataFactoryElement disableMetricsCollection, IDictionary> additionalProperties, DataFactoryElement query, BinaryData additionalColumns) : base(copySourceType, sourceRetryCount, sourceRetryWait, maxConcurrentConnections, disableMetricsCollection, additionalProperties) - { - Query = query; - AdditionalColumns = additionalColumns; - CopySourceType = copySourceType ?? "MicrosoftAccessSource"; - } - - /// Database query. Type: string (or Expression with resultType string). - public DataFactoryElement Query { get; set; } - /// - /// Specifies the additional columns to be added to source data. Type: array of objects(AdditionalColumns) (or Expression with resultType array of objects). - /// - /// To assign an object to this property use . - /// - /// - /// To assign an already formated json string to this property use . - /// - /// - /// Examples: - /// - /// - /// BinaryData.FromObjectAsJson("foo") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromString("\"foo\"") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromObjectAsJson(new { key = "value" }) - /// Creates a payload of { "key": "value" }. - /// - /// - /// BinaryData.FromString("{\"key\": \"value\"}") - /// Creates a payload of { "key": "value" }. - /// - /// - /// - /// - public BinaryData AdditionalColumns { get; set; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/MicrosoftAccessTableDataset.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/MicrosoftAccessTableDataset.Serialization.cs deleted file mode 100644 index b84670b3..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/MicrosoftAccessTableDataset.Serialization.cs +++ /dev/null @@ -1,212 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class MicrosoftAccessTableDataset : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - writer.WritePropertyName("type"u8); - writer.WriteStringValue(DatasetType); - if (Optional.IsDefined(Description)) - { - writer.WritePropertyName("description"u8); - writer.WriteStringValue(Description); - } - if (Optional.IsDefined(Structure)) - { - writer.WritePropertyName("structure"u8); - JsonSerializer.Serialize(writer, Structure); - } - if (Optional.IsDefined(Schema)) - { - writer.WritePropertyName("schema"u8); - JsonSerializer.Serialize(writer, Schema); - } - writer.WritePropertyName("linkedServiceName"u8); - JsonSerializer.Serialize(writer, LinkedServiceName); if (Optional.IsCollectionDefined(Parameters)) - { - writer.WritePropertyName("parameters"u8); - writer.WriteStartObject(); - foreach (var item in Parameters) - { - writer.WritePropertyName(item.Key); - writer.WriteObjectValue(item.Value); - } - writer.WriteEndObject(); - } - if (Optional.IsCollectionDefined(Annotations)) - { - writer.WritePropertyName("annotations"u8); - writer.WriteStartArray(); - foreach (var item in Annotations) - { - if (item == null) - { - writer.WriteNullValue(); - continue; - } -#if NET6_0_OR_GREATER - writer.WriteRawValue(item); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.ToString()).RootElement); -#endif - } - writer.WriteEndArray(); - } - if (Optional.IsDefined(Folder)) - { - writer.WritePropertyName("folder"u8); - writer.WriteObjectValue(Folder); - } - writer.WritePropertyName("typeProperties"u8); - writer.WriteStartObject(); - if (Optional.IsDefined(TableName)) - { - writer.WritePropertyName("tableName"u8); - JsonSerializer.Serialize(writer, TableName); - } - writer.WriteEndObject(); - foreach (var item in AdditionalProperties) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.Value.ToString()).RootElement); -#endif - } - writer.WriteEndObject(); - } - - internal static MicrosoftAccessTableDataset DeserializeMicrosoftAccessTableDataset(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - string type = default; - Optional description = default; - Optional>> structure = default; - Optional>> schema = default; - DataFactoryLinkedServiceReference linkedServiceName = default; - Optional> parameters = default; - Optional> annotations = default; - Optional folder = default; - Optional> tableName = default; - IDictionary> additionalProperties = default; - Dictionary> additionalPropertiesDictionary = new Dictionary>(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("type"u8)) - { - type = property.Value.GetString(); - continue; - } - if (property.NameEquals("description"u8)) - { - description = property.Value.GetString(); - continue; - } - if (property.NameEquals("structure"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - structure = JsonSerializer.Deserialize>>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("schema"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - schema = JsonSerializer.Deserialize>>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("linkedServiceName"u8)) - { - linkedServiceName = JsonSerializer.Deserialize(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("parameters"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - Dictionary dictionary = new Dictionary(); - foreach (var property0 in property.Value.EnumerateObject()) - { - dictionary.Add(property0.Name, EntityParameterSpecification.DeserializeEntityParameterSpecification(property0.Value)); - } - parameters = dictionary; - continue; - } - if (property.NameEquals("annotations"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - if (item.ValueKind == JsonValueKind.Null) - { - array.Add(null); - } - else - { - array.Add(BinaryData.FromString(item.GetRawText())); - } - } - annotations = array; - continue; - } - if (property.NameEquals("folder"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - folder = DatasetFolder.DeserializeDatasetFolder(property.Value); - continue; - } - if (property.NameEquals("typeProperties"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - foreach (var property0 in property.Value.EnumerateObject()) - { - if (property0.NameEquals("tableName"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - tableName = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - } - continue; - } - additionalPropertiesDictionary.Add(property.Name, JsonSerializer.Deserialize>(property.Value.GetRawText())); - } - additionalProperties = additionalPropertiesDictionary; - return new MicrosoftAccessTableDataset(type, description.Value, structure.Value, schema.Value, linkedServiceName, Optional.ToDictionary(parameters), Optional.ToList(annotations), folder.Value, additionalProperties, tableName.Value); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/MicrosoftAccessTableDataset.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/MicrosoftAccessTableDataset.cs deleted file mode 100644 index 922aa4d7..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/MicrosoftAccessTableDataset.cs +++ /dev/null @@ -1,43 +0,0 @@ -// - -#nullable disable - -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// The Microsoft Access table dataset. - public partial class MicrosoftAccessTableDataset : DataFactoryDatasetProperties - { - /// Initializes a new instance of MicrosoftAccessTableDataset. - /// Linked service reference. - /// is null. - public MicrosoftAccessTableDataset(DataFactoryLinkedServiceReference linkedServiceName) : base(linkedServiceName) - { - Argument.AssertNotNull(linkedServiceName, nameof(linkedServiceName)); - - DatasetType = "MicrosoftAccessTable"; - } - - /// Initializes a new instance of MicrosoftAccessTableDataset. - /// Type of dataset. - /// Dataset description. - /// Columns that define the structure of the dataset. Type: array (or Expression with resultType array), itemType: DatasetDataElement. - /// Columns that define the physical type schema of the dataset. Type: array (or Expression with resultType array), itemType: DatasetSchemaDataElement. - /// Linked service reference. - /// Parameters for dataset. - /// List of tags that can be used for describing the Dataset. - /// The folder that this Dataset is in. If not specified, Dataset will appear at the root level. - /// Additional Properties. - /// The Microsoft Access table name. Type: string (or Expression with resultType string). - internal MicrosoftAccessTableDataset(string datasetType, string description, DataFactoryElement> structure, DataFactoryElement> schema, DataFactoryLinkedServiceReference linkedServiceName, IDictionary parameters, IList annotations, DatasetFolder folder, IDictionary> additionalProperties, DataFactoryElement tableName) : base(datasetType, description, structure, schema, linkedServiceName, parameters, annotations, folder, additionalProperties) - { - TableName = tableName; - DatasetType = datasetType ?? "MicrosoftAccessTable"; - } - - /// The Microsoft Access table name. Type: string (or Expression with resultType string). - public DataFactoryElement TableName { get; set; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/MongoDBAtlasCollectionDataset.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/MongoDBAtlasCollectionDataset.Serialization.cs deleted file mode 100644 index 845060db..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/MongoDBAtlasCollectionDataset.Serialization.cs +++ /dev/null @@ -1,205 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class MongoDBAtlasCollectionDataset : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - writer.WritePropertyName("type"u8); - writer.WriteStringValue(DatasetType); - if (Optional.IsDefined(Description)) - { - writer.WritePropertyName("description"u8); - writer.WriteStringValue(Description); - } - if (Optional.IsDefined(Structure)) - { - writer.WritePropertyName("structure"u8); - JsonSerializer.Serialize(writer, Structure); - } - if (Optional.IsDefined(Schema)) - { - writer.WritePropertyName("schema"u8); - JsonSerializer.Serialize(writer, Schema); - } - writer.WritePropertyName("linkedServiceName"u8); - JsonSerializer.Serialize(writer, LinkedServiceName); if (Optional.IsCollectionDefined(Parameters)) - { - writer.WritePropertyName("parameters"u8); - writer.WriteStartObject(); - foreach (var item in Parameters) - { - writer.WritePropertyName(item.Key); - writer.WriteObjectValue(item.Value); - } - writer.WriteEndObject(); - } - if (Optional.IsCollectionDefined(Annotations)) - { - writer.WritePropertyName("annotations"u8); - writer.WriteStartArray(); - foreach (var item in Annotations) - { - if (item == null) - { - writer.WriteNullValue(); - continue; - } -#if NET6_0_OR_GREATER - writer.WriteRawValue(item); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.ToString()).RootElement); -#endif - } - writer.WriteEndArray(); - } - if (Optional.IsDefined(Folder)) - { - writer.WritePropertyName("folder"u8); - writer.WriteObjectValue(Folder); - } - writer.WritePropertyName("typeProperties"u8); - writer.WriteStartObject(); - writer.WritePropertyName("collection"u8); - JsonSerializer.Serialize(writer, Collection); - writer.WriteEndObject(); - foreach (var item in AdditionalProperties) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.Value.ToString()).RootElement); -#endif - } - writer.WriteEndObject(); - } - - internal static MongoDBAtlasCollectionDataset DeserializeMongoDBAtlasCollectionDataset(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - string type = default; - Optional description = default; - Optional>> structure = default; - Optional>> schema = default; - DataFactoryLinkedServiceReference linkedServiceName = default; - Optional> parameters = default; - Optional> annotations = default; - Optional folder = default; - DataFactoryElement collection = default; - IDictionary> additionalProperties = default; - Dictionary> additionalPropertiesDictionary = new Dictionary>(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("type"u8)) - { - type = property.Value.GetString(); - continue; - } - if (property.NameEquals("description"u8)) - { - description = property.Value.GetString(); - continue; - } - if (property.NameEquals("structure"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - structure = JsonSerializer.Deserialize>>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("schema"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - schema = JsonSerializer.Deserialize>>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("linkedServiceName"u8)) - { - linkedServiceName = JsonSerializer.Deserialize(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("parameters"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - Dictionary dictionary = new Dictionary(); - foreach (var property0 in property.Value.EnumerateObject()) - { - dictionary.Add(property0.Name, EntityParameterSpecification.DeserializeEntityParameterSpecification(property0.Value)); - } - parameters = dictionary; - continue; - } - if (property.NameEquals("annotations"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - if (item.ValueKind == JsonValueKind.Null) - { - array.Add(null); - } - else - { - array.Add(BinaryData.FromString(item.GetRawText())); - } - } - annotations = array; - continue; - } - if (property.NameEquals("folder"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - folder = DatasetFolder.DeserializeDatasetFolder(property.Value); - continue; - } - if (property.NameEquals("typeProperties"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - foreach (var property0 in property.Value.EnumerateObject()) - { - if (property0.NameEquals("collection"u8)) - { - collection = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - } - continue; - } - additionalPropertiesDictionary.Add(property.Name, JsonSerializer.Deserialize>(property.Value.GetRawText())); - } - additionalProperties = additionalPropertiesDictionary; - return new MongoDBAtlasCollectionDataset(type, description.Value, structure.Value, schema.Value, linkedServiceName, Optional.ToDictionary(parameters), Optional.ToList(annotations), folder.Value, additionalProperties, collection); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/MongoDBAtlasCollectionDataset.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/MongoDBAtlasCollectionDataset.cs deleted file mode 100644 index 8a935586..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/MongoDBAtlasCollectionDataset.cs +++ /dev/null @@ -1,46 +0,0 @@ -// - -#nullable disable - -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// The MongoDB Atlas database dataset. - public partial class MongoDBAtlasCollectionDataset : DataFactoryDatasetProperties - { - /// Initializes a new instance of MongoDBAtlasCollectionDataset. - /// Linked service reference. - /// The collection name of the MongoDB Atlas database. Type: string (or Expression with resultType string). - /// or is null. - public MongoDBAtlasCollectionDataset(DataFactoryLinkedServiceReference linkedServiceName, DataFactoryElement collection) : base(linkedServiceName) - { - Argument.AssertNotNull(linkedServiceName, nameof(linkedServiceName)); - Argument.AssertNotNull(collection, nameof(collection)); - - Collection = collection; - DatasetType = "MongoDbAtlasCollection"; - } - - /// Initializes a new instance of MongoDBAtlasCollectionDataset. - /// Type of dataset. - /// Dataset description. - /// Columns that define the structure of the dataset. Type: array (or Expression with resultType array), itemType: DatasetDataElement. - /// Columns that define the physical type schema of the dataset. Type: array (or Expression with resultType array), itemType: DatasetSchemaDataElement. - /// Linked service reference. - /// Parameters for dataset. - /// List of tags that can be used for describing the Dataset. - /// The folder that this Dataset is in. If not specified, Dataset will appear at the root level. - /// Additional Properties. - /// The collection name of the MongoDB Atlas database. Type: string (or Expression with resultType string). - internal MongoDBAtlasCollectionDataset(string datasetType, string description, DataFactoryElement> structure, DataFactoryElement> schema, DataFactoryLinkedServiceReference linkedServiceName, IDictionary parameters, IList annotations, DatasetFolder folder, IDictionary> additionalProperties, DataFactoryElement collection) : base(datasetType, description, structure, schema, linkedServiceName, parameters, annotations, folder, additionalProperties) - { - Collection = collection; - DatasetType = datasetType ?? "MongoDbAtlasCollection"; - } - - /// The collection name of the MongoDB Atlas database. Type: string (or Expression with resultType string). - public DataFactoryElement Collection { get; set; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/MongoDBAtlasLinkedService.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/MongoDBAtlasLinkedService.Serialization.cs deleted file mode 100644 index 9fcedc15..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/MongoDBAtlasLinkedService.Serialization.cs +++ /dev/null @@ -1,191 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class MongoDBAtlasLinkedService : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - writer.WritePropertyName("type"u8); - writer.WriteStringValue(LinkedServiceType); - if (Optional.IsDefined(ConnectVia)) - { - writer.WritePropertyName("connectVia"u8); - writer.WriteObjectValue(ConnectVia); - } - if (Optional.IsDefined(Description)) - { - writer.WritePropertyName("description"u8); - writer.WriteStringValue(Description); - } - if (Optional.IsCollectionDefined(Parameters)) - { - writer.WritePropertyName("parameters"u8); - writer.WriteStartObject(); - foreach (var item in Parameters) - { - writer.WritePropertyName(item.Key); - writer.WriteObjectValue(item.Value); - } - writer.WriteEndObject(); - } - if (Optional.IsCollectionDefined(Annotations)) - { - writer.WritePropertyName("annotations"u8); - writer.WriteStartArray(); - foreach (var item in Annotations) - { - if (item == null) - { - writer.WriteNullValue(); - continue; - } -#if NET6_0_OR_GREATER - writer.WriteRawValue(item); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.ToString()).RootElement); -#endif - } - writer.WriteEndArray(); - } - writer.WritePropertyName("typeProperties"u8); - writer.WriteStartObject(); - writer.WritePropertyName("connectionString"u8); - JsonSerializer.Serialize(writer, ConnectionString); - writer.WritePropertyName("database"u8); - JsonSerializer.Serialize(writer, Database); - if (Optional.IsDefined(DriverVersion)) - { - writer.WritePropertyName("driverVersion"u8); - JsonSerializer.Serialize(writer, DriverVersion); - } - writer.WriteEndObject(); - foreach (var item in AdditionalProperties) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.Value.ToString()).RootElement); -#endif - } - writer.WriteEndObject(); - } - - internal static MongoDBAtlasLinkedService DeserializeMongoDBAtlasLinkedService(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - string type = default; - Optional connectVia = default; - Optional description = default; - Optional> parameters = default; - Optional> annotations = default; - DataFactoryElement connectionString = default; - DataFactoryElement database = default; - Optional> driverVersion = default; - IDictionary> additionalProperties = default; - Dictionary> additionalPropertiesDictionary = new Dictionary>(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("type"u8)) - { - type = property.Value.GetString(); - continue; - } - if (property.NameEquals("connectVia"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - connectVia = IntegrationRuntimeReference.DeserializeIntegrationRuntimeReference(property.Value); - continue; - } - if (property.NameEquals("description"u8)) - { - description = property.Value.GetString(); - continue; - } - if (property.NameEquals("parameters"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - Dictionary dictionary = new Dictionary(); - foreach (var property0 in property.Value.EnumerateObject()) - { - dictionary.Add(property0.Name, EntityParameterSpecification.DeserializeEntityParameterSpecification(property0.Value)); - } - parameters = dictionary; - continue; - } - if (property.NameEquals("annotations"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - if (item.ValueKind == JsonValueKind.Null) - { - array.Add(null); - } - else - { - array.Add(BinaryData.FromString(item.GetRawText())); - } - } - annotations = array; - continue; - } - if (property.NameEquals("typeProperties"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - foreach (var property0 in property.Value.EnumerateObject()) - { - if (property0.NameEquals("connectionString"u8)) - { - connectionString = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("database"u8)) - { - database = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("driverVersion"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - driverVersion = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - } - continue; - } - additionalPropertiesDictionary.Add(property.Name, JsonSerializer.Deserialize>(property.Value.GetRawText())); - } - additionalProperties = additionalPropertiesDictionary; - return new MongoDBAtlasLinkedService(type, connectVia.Value, description.Value, Optional.ToDictionary(parameters), Optional.ToList(annotations), additionalProperties, connectionString, database, driverVersion.Value); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/MongoDBAtlasLinkedService.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/MongoDBAtlasLinkedService.cs deleted file mode 100644 index f741abe0..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/MongoDBAtlasLinkedService.cs +++ /dev/null @@ -1,52 +0,0 @@ -// - -#nullable disable - -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// Linked service for MongoDB Atlas data source. - public partial class MongoDBAtlasLinkedService : DataFactoryLinkedServiceProperties - { - /// Initializes a new instance of MongoDBAtlasLinkedService. - /// The MongoDB Atlas connection string. Type: string, SecureString or AzureKeyVaultSecretReference. Type: string, SecureString or AzureKeyVaultSecretReference. - /// The name of the MongoDB Atlas database that you want to access. Type: string (or Expression with resultType string). - /// or is null. - public MongoDBAtlasLinkedService(DataFactoryElement connectionString, DataFactoryElement database) - { - Argument.AssertNotNull(connectionString, nameof(connectionString)); - Argument.AssertNotNull(database, nameof(database)); - - ConnectionString = connectionString; - Database = database; - LinkedServiceType = "MongoDbAtlas"; - } - - /// Initializes a new instance of MongoDBAtlasLinkedService. - /// Type of linked service. - /// The integration runtime reference. - /// Linked service description. - /// Parameters for linked service. - /// List of tags that can be used for describing the linked service. - /// Additional Properties. - /// The MongoDB Atlas connection string. Type: string, SecureString or AzureKeyVaultSecretReference. Type: string, SecureString or AzureKeyVaultSecretReference. - /// The name of the MongoDB Atlas database that you want to access. Type: string (or Expression with resultType string). - /// The driver version that you want to choose. Allowed value are v1 and v2. Type: string (or Expression with resultType string). - internal MongoDBAtlasLinkedService(string linkedServiceType, IntegrationRuntimeReference connectVia, string description, IDictionary parameters, IList annotations, IDictionary> additionalProperties, DataFactoryElement connectionString, DataFactoryElement database, DataFactoryElement driverVersion) : base(linkedServiceType, connectVia, description, parameters, annotations, additionalProperties) - { - ConnectionString = connectionString; - Database = database; - DriverVersion = driverVersion; - LinkedServiceType = linkedServiceType ?? "MongoDbAtlas"; - } - - /// The MongoDB Atlas connection string. Type: string, SecureString or AzureKeyVaultSecretReference. Type: string, SecureString or AzureKeyVaultSecretReference. - public DataFactoryElement ConnectionString { get; set; } - /// The name of the MongoDB Atlas database that you want to access. Type: string (or Expression with resultType string). - public DataFactoryElement Database { get; set; } - /// The driver version that you want to choose. Allowed value are v1 and v2. Type: string (or Expression with resultType string). - public DataFactoryElement DriverVersion { get; set; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/MongoDBAtlasSink.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/MongoDBAtlasSink.Serialization.cs deleted file mode 100644 index 93f096f8..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/MongoDBAtlasSink.Serialization.cs +++ /dev/null @@ -1,157 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class MongoDBAtlasSink : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - if (Optional.IsDefined(WriteBehavior)) - { - writer.WritePropertyName("writeBehavior"u8); - JsonSerializer.Serialize(writer, WriteBehavior); - } - writer.WritePropertyName("type"u8); - writer.WriteStringValue(CopySinkType); - if (Optional.IsDefined(WriteBatchSize)) - { - writer.WritePropertyName("writeBatchSize"u8); - JsonSerializer.Serialize(writer, WriteBatchSize); - } - if (Optional.IsDefined(WriteBatchTimeout)) - { - writer.WritePropertyName("writeBatchTimeout"u8); - JsonSerializer.Serialize(writer, WriteBatchTimeout); - } - if (Optional.IsDefined(SinkRetryCount)) - { - writer.WritePropertyName("sinkRetryCount"u8); - JsonSerializer.Serialize(writer, SinkRetryCount); - } - if (Optional.IsDefined(SinkRetryWait)) - { - writer.WritePropertyName("sinkRetryWait"u8); - JsonSerializer.Serialize(writer, SinkRetryWait); - } - if (Optional.IsDefined(MaxConcurrentConnections)) - { - writer.WritePropertyName("maxConcurrentConnections"u8); - JsonSerializer.Serialize(writer, MaxConcurrentConnections); - } - if (Optional.IsDefined(DisableMetricsCollection)) - { - writer.WritePropertyName("disableMetricsCollection"u8); - JsonSerializer.Serialize(writer, DisableMetricsCollection); - } - foreach (var item in AdditionalProperties) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.Value.ToString()).RootElement); -#endif - } - writer.WriteEndObject(); - } - - internal static MongoDBAtlasSink DeserializeMongoDBAtlasSink(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - Optional> writeBehavior = default; - string type = default; - Optional> writeBatchSize = default; - Optional> writeBatchTimeout = default; - Optional> sinkRetryCount = default; - Optional> sinkRetryWait = default; - Optional> maxConcurrentConnections = default; - Optional> disableMetricsCollection = default; - IDictionary> additionalProperties = default; - Dictionary> additionalPropertiesDictionary = new Dictionary>(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("writeBehavior"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - writeBehavior = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("type"u8)) - { - type = property.Value.GetString(); - continue; - } - if (property.NameEquals("writeBatchSize"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - writeBatchSize = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("writeBatchTimeout"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - writeBatchTimeout = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("sinkRetryCount"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - sinkRetryCount = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("sinkRetryWait"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - sinkRetryWait = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("maxConcurrentConnections"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - maxConcurrentConnections = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("disableMetricsCollection"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - disableMetricsCollection = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - additionalPropertiesDictionary.Add(property.Name, JsonSerializer.Deserialize>(property.Value.GetRawText())); - } - additionalProperties = additionalPropertiesDictionary; - return new MongoDBAtlasSink(type, writeBatchSize.Value, writeBatchTimeout.Value, sinkRetryCount.Value, sinkRetryWait.Value, maxConcurrentConnections.Value, disableMetricsCollection.Value, additionalProperties, writeBehavior.Value); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/MongoDBAtlasSink.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/MongoDBAtlasSink.cs deleted file mode 100644 index 1a98160e..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/MongoDBAtlasSink.cs +++ /dev/null @@ -1,37 +0,0 @@ -// - -#nullable disable - -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// A copy activity MongoDB Atlas sink. - public partial class MongoDBAtlasSink : CopySink - { - /// Initializes a new instance of MongoDBAtlasSink. - public MongoDBAtlasSink() - { - CopySinkType = "MongoDbAtlasSink"; - } - - /// Initializes a new instance of MongoDBAtlasSink. - /// Copy sink type. - /// Write batch size. Type: integer (or Expression with resultType integer), minimum: 0. - /// Write batch timeout. Type: string (or Expression with resultType string), pattern: ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). - /// Sink retry count. Type: integer (or Expression with resultType integer). - /// Sink retry wait. Type: string (or Expression with resultType string), pattern: ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). - /// The maximum concurrent connection count for the sink data store. Type: integer (or Expression with resultType integer). - /// If true, disable data store metrics collection. Default is false. Type: boolean (or Expression with resultType boolean). - /// Additional Properties. - /// Specifies whether the document with same key to be overwritten (upsert) rather than throw exception (insert). The default value is "insert". Type: string (or Expression with resultType string). Type: string (or Expression with resultType string). - internal MongoDBAtlasSink(string copySinkType, DataFactoryElement writeBatchSize, DataFactoryElement writeBatchTimeout, DataFactoryElement sinkRetryCount, DataFactoryElement sinkRetryWait, DataFactoryElement maxConcurrentConnections, DataFactoryElement disableMetricsCollection, IDictionary> additionalProperties, DataFactoryElement writeBehavior) : base(copySinkType, writeBatchSize, writeBatchTimeout, sinkRetryCount, sinkRetryWait, maxConcurrentConnections, disableMetricsCollection, additionalProperties) - { - WriteBehavior = writeBehavior; - CopySinkType = copySinkType ?? "MongoDbAtlasSink"; - } - - /// Specifies whether the document with same key to be overwritten (upsert) rather than throw exception (insert). The default value is "insert". Type: string (or Expression with resultType string). Type: string (or Expression with resultType string). - public DataFactoryElement WriteBehavior { get; set; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/MongoDBAtlasSource.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/MongoDBAtlasSource.Serialization.cs deleted file mode 100644 index daa377ec..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/MongoDBAtlasSource.Serialization.cs +++ /dev/null @@ -1,191 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class MongoDBAtlasSource : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - if (Optional.IsDefined(Filter)) - { - writer.WritePropertyName("filter"u8); - JsonSerializer.Serialize(writer, Filter); - } - if (Optional.IsDefined(CursorMethods)) - { - writer.WritePropertyName("cursorMethods"u8); - writer.WriteObjectValue(CursorMethods); - } - if (Optional.IsDefined(BatchSize)) - { - writer.WritePropertyName("batchSize"u8); - JsonSerializer.Serialize(writer, BatchSize); - } - if (Optional.IsDefined(QueryTimeout)) - { - writer.WritePropertyName("queryTimeout"u8); - JsonSerializer.Serialize(writer, QueryTimeout); - } - if (Optional.IsDefined(AdditionalColumns)) - { - writer.WritePropertyName("additionalColumns"u8); -#if NET6_0_OR_GREATER - writer.WriteRawValue(AdditionalColumns); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(AdditionalColumns.ToString()).RootElement); -#endif - } - writer.WritePropertyName("type"u8); - writer.WriteStringValue(CopySourceType); - if (Optional.IsDefined(SourceRetryCount)) - { - writer.WritePropertyName("sourceRetryCount"u8); - JsonSerializer.Serialize(writer, SourceRetryCount); - } - if (Optional.IsDefined(SourceRetryWait)) - { - writer.WritePropertyName("sourceRetryWait"u8); - JsonSerializer.Serialize(writer, SourceRetryWait); - } - if (Optional.IsDefined(MaxConcurrentConnections)) - { - writer.WritePropertyName("maxConcurrentConnections"u8); - JsonSerializer.Serialize(writer, MaxConcurrentConnections); - } - if (Optional.IsDefined(DisableMetricsCollection)) - { - writer.WritePropertyName("disableMetricsCollection"u8); - JsonSerializer.Serialize(writer, DisableMetricsCollection); - } - foreach (var item in AdditionalProperties) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.Value.ToString()).RootElement); -#endif - } - writer.WriteEndObject(); - } - - internal static MongoDBAtlasSource DeserializeMongoDBAtlasSource(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - Optional> filter = default; - Optional cursorMethods = default; - Optional> batchSize = default; - Optional> queryTimeout = default; - Optional additionalColumns = default; - string type = default; - Optional> sourceRetryCount = default; - Optional> sourceRetryWait = default; - Optional> maxConcurrentConnections = default; - Optional> disableMetricsCollection = default; - IDictionary> additionalProperties = default; - Dictionary> additionalPropertiesDictionary = new Dictionary>(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("filter"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - filter = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("cursorMethods"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - cursorMethods = MongoDBCursorMethodsProperties.DeserializeMongoDBCursorMethodsProperties(property.Value); - continue; - } - if (property.NameEquals("batchSize"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - batchSize = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("queryTimeout"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - queryTimeout = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("additionalColumns"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - additionalColumns = BinaryData.FromString(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("type"u8)) - { - type = property.Value.GetString(); - continue; - } - if (property.NameEquals("sourceRetryCount"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - sourceRetryCount = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("sourceRetryWait"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - sourceRetryWait = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("maxConcurrentConnections"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - maxConcurrentConnections = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("disableMetricsCollection"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - disableMetricsCollection = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - additionalPropertiesDictionary.Add(property.Name, JsonSerializer.Deserialize>(property.Value.GetRawText())); - } - additionalProperties = additionalPropertiesDictionary; - return new MongoDBAtlasSource(type, sourceRetryCount.Value, sourceRetryWait.Value, maxConcurrentConnections.Value, disableMetricsCollection.Value, additionalProperties, filter.Value, cursorMethods.Value, batchSize.Value, queryTimeout.Value, additionalColumns.Value); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/MongoDBAtlasSource.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/MongoDBAtlasSource.cs deleted file mode 100644 index fbada59c..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/MongoDBAtlasSource.cs +++ /dev/null @@ -1,80 +0,0 @@ -// - -#nullable disable - -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// A copy activity source for a MongoDB Atlas database. - public partial class MongoDBAtlasSource : CopyActivitySource - { - /// Initializes a new instance of MongoDBAtlasSource. - public MongoDBAtlasSource() - { - CopySourceType = "MongoDbAtlasSource"; - } - - /// Initializes a new instance of MongoDBAtlasSource. - /// Copy source type. - /// Source retry count. Type: integer (or Expression with resultType integer). - /// Source retry wait. Type: string (or Expression with resultType string), pattern: ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). - /// The maximum concurrent connection count for the source data store. Type: integer (or Expression with resultType integer). - /// If true, disable data store metrics collection. Default is false. Type: boolean (or Expression with resultType boolean). - /// Additional Properties. - /// Specifies selection filter using query operators. To return all documents in a collection, omit this parameter or pass an empty document ({}). Type: string (or Expression with resultType string). - /// Cursor methods for Mongodb query. - /// Specifies the number of documents to return in each batch of the response from MongoDB Atlas instance. In most cases, modifying the batch size will not affect the user or the application. This property's main purpose is to avoid hit the limitation of response size. Type: integer (or Expression with resultType integer). - /// 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). - internal MongoDBAtlasSource(string copySourceType, DataFactoryElement sourceRetryCount, DataFactoryElement sourceRetryWait, DataFactoryElement maxConcurrentConnections, DataFactoryElement disableMetricsCollection, IDictionary> additionalProperties, DataFactoryElement filter, MongoDBCursorMethodsProperties cursorMethods, DataFactoryElement batchSize, DataFactoryElement queryTimeout, BinaryData additionalColumns) : base(copySourceType, sourceRetryCount, sourceRetryWait, maxConcurrentConnections, disableMetricsCollection, additionalProperties) - { - Filter = filter; - CursorMethods = cursorMethods; - BatchSize = batchSize; - QueryTimeout = queryTimeout; - AdditionalColumns = additionalColumns; - CopySourceType = copySourceType ?? "MongoDbAtlasSource"; - } - - /// Specifies selection filter using query operators. To return all documents in a collection, omit this parameter or pass an empty document ({}). Type: string (or Expression with resultType string). - public DataFactoryElement Filter { get; set; } - /// Cursor methods for Mongodb query. - public MongoDBCursorMethodsProperties CursorMethods { get; set; } - /// Specifies the number of documents to return in each batch of the response from MongoDB Atlas instance. In most cases, modifying the batch size will not affect the user or the application. This property's main purpose is to avoid hit the limitation of response size. Type: integer (or Expression with resultType integer). - public DataFactoryElement BatchSize { get; set; } - /// Query timeout. Type: string (or Expression with resultType string), pattern: ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). - public DataFactoryElement QueryTimeout { get; set; } - /// - /// Specifies the additional columns to be added to source data. Type: array of objects(AdditionalColumns) (or Expression with resultType array of objects). - /// - /// To assign an object to this property use . - /// - /// - /// To assign an already formated json string to this property use . - /// - /// - /// Examples: - /// - /// - /// BinaryData.FromObjectAsJson("foo") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromString("\"foo\"") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromObjectAsJson(new { key = "value" }) - /// Creates a payload of { "key": "value" }. - /// - /// - /// BinaryData.FromString("{\"key\": \"value\"}") - /// Creates a payload of { "key": "value" }. - /// - /// - /// - /// - public BinaryData AdditionalColumns { get; set; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/MongoDBAuthenticationType.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/MongoDBAuthenticationType.cs deleted file mode 100644 index f0981da5..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/MongoDBAuthenticationType.cs +++ /dev/null @@ -1,47 +0,0 @@ -// - -#nullable disable - -using System.ComponentModel; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// The authentication type to be used to connect to the MongoDB database. - public readonly partial struct MongoDBAuthenticationType : IEquatable - { - private readonly string _value; - - /// Initializes a new instance of . - /// is null. - public MongoDBAuthenticationType(string value) - { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } - - private const string BasicValue = "Basic"; - private const string AnonymousValue = "Anonymous"; - - /// Basic. - public static MongoDBAuthenticationType Basic { get; } = new MongoDBAuthenticationType(BasicValue); - /// Anonymous. - public static MongoDBAuthenticationType Anonymous { get; } = new MongoDBAuthenticationType(AnonymousValue); - /// Determines if two values are the same. - public static bool operator ==(MongoDBAuthenticationType left, MongoDBAuthenticationType right) => left.Equals(right); - /// Determines if two values are not the same. - public static bool operator !=(MongoDBAuthenticationType left, MongoDBAuthenticationType right) => !left.Equals(right); - /// Converts a string to a . - public static implicit operator MongoDBAuthenticationType(string value) => new MongoDBAuthenticationType(value); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override bool Equals(object obj) => obj is MongoDBAuthenticationType other && Equals(other); - /// - public bool Equals(MongoDBAuthenticationType other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override int GetHashCode() => _value?.GetHashCode() ?? 0; - /// - public override string ToString() => _value; - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/MongoDBCollectionDataset.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/MongoDBCollectionDataset.Serialization.cs deleted file mode 100644 index 69bc76c0..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/MongoDBCollectionDataset.Serialization.cs +++ /dev/null @@ -1,205 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class MongoDBCollectionDataset : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - writer.WritePropertyName("type"u8); - writer.WriteStringValue(DatasetType); - if (Optional.IsDefined(Description)) - { - writer.WritePropertyName("description"u8); - writer.WriteStringValue(Description); - } - if (Optional.IsDefined(Structure)) - { - writer.WritePropertyName("structure"u8); - JsonSerializer.Serialize(writer, Structure); - } - if (Optional.IsDefined(Schema)) - { - writer.WritePropertyName("schema"u8); - JsonSerializer.Serialize(writer, Schema); - } - writer.WritePropertyName("linkedServiceName"u8); - JsonSerializer.Serialize(writer, LinkedServiceName); if (Optional.IsCollectionDefined(Parameters)) - { - writer.WritePropertyName("parameters"u8); - writer.WriteStartObject(); - foreach (var item in Parameters) - { - writer.WritePropertyName(item.Key); - writer.WriteObjectValue(item.Value); - } - writer.WriteEndObject(); - } - if (Optional.IsCollectionDefined(Annotations)) - { - writer.WritePropertyName("annotations"u8); - writer.WriteStartArray(); - foreach (var item in Annotations) - { - if (item == null) - { - writer.WriteNullValue(); - continue; - } -#if NET6_0_OR_GREATER - writer.WriteRawValue(item); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.ToString()).RootElement); -#endif - } - writer.WriteEndArray(); - } - if (Optional.IsDefined(Folder)) - { - writer.WritePropertyName("folder"u8); - writer.WriteObjectValue(Folder); - } - writer.WritePropertyName("typeProperties"u8); - writer.WriteStartObject(); - writer.WritePropertyName("collectionName"u8); - JsonSerializer.Serialize(writer, CollectionName); - writer.WriteEndObject(); - foreach (var item in AdditionalProperties) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.Value.ToString()).RootElement); -#endif - } - writer.WriteEndObject(); - } - - internal static MongoDBCollectionDataset DeserializeMongoDBCollectionDataset(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - string type = default; - Optional description = default; - Optional>> structure = default; - Optional>> schema = default; - DataFactoryLinkedServiceReference linkedServiceName = default; - Optional> parameters = default; - Optional> annotations = default; - Optional folder = default; - DataFactoryElement collectionName = default; - IDictionary> additionalProperties = default; - Dictionary> additionalPropertiesDictionary = new Dictionary>(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("type"u8)) - { - type = property.Value.GetString(); - continue; - } - if (property.NameEquals("description"u8)) - { - description = property.Value.GetString(); - continue; - } - if (property.NameEquals("structure"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - structure = JsonSerializer.Deserialize>>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("schema"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - schema = JsonSerializer.Deserialize>>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("linkedServiceName"u8)) - { - linkedServiceName = JsonSerializer.Deserialize(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("parameters"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - Dictionary dictionary = new Dictionary(); - foreach (var property0 in property.Value.EnumerateObject()) - { - dictionary.Add(property0.Name, EntityParameterSpecification.DeserializeEntityParameterSpecification(property0.Value)); - } - parameters = dictionary; - continue; - } - if (property.NameEquals("annotations"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - if (item.ValueKind == JsonValueKind.Null) - { - array.Add(null); - } - else - { - array.Add(BinaryData.FromString(item.GetRawText())); - } - } - annotations = array; - continue; - } - if (property.NameEquals("folder"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - folder = DatasetFolder.DeserializeDatasetFolder(property.Value); - continue; - } - if (property.NameEquals("typeProperties"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - foreach (var property0 in property.Value.EnumerateObject()) - { - if (property0.NameEquals("collectionName"u8)) - { - collectionName = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - } - continue; - } - additionalPropertiesDictionary.Add(property.Name, JsonSerializer.Deserialize>(property.Value.GetRawText())); - } - additionalProperties = additionalPropertiesDictionary; - return new MongoDBCollectionDataset(type, description.Value, structure.Value, schema.Value, linkedServiceName, Optional.ToDictionary(parameters), Optional.ToList(annotations), folder.Value, additionalProperties, collectionName); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/MongoDBCollectionDataset.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/MongoDBCollectionDataset.cs deleted file mode 100644 index e96e22e9..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/MongoDBCollectionDataset.cs +++ /dev/null @@ -1,46 +0,0 @@ -// - -#nullable disable - -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// The MongoDB database dataset. - public partial class MongoDBCollectionDataset : DataFactoryDatasetProperties - { - /// Initializes a new instance of MongoDBCollectionDataset. - /// Linked service reference. - /// The table name of the MongoDB database. Type: string (or Expression with resultType string). - /// or is null. - public MongoDBCollectionDataset(DataFactoryLinkedServiceReference linkedServiceName, DataFactoryElement collectionName) : base(linkedServiceName) - { - Argument.AssertNotNull(linkedServiceName, nameof(linkedServiceName)); - Argument.AssertNotNull(collectionName, nameof(collectionName)); - - CollectionName = collectionName; - DatasetType = "MongoDbCollection"; - } - - /// Initializes a new instance of MongoDBCollectionDataset. - /// Type of dataset. - /// Dataset description. - /// Columns that define the structure of the dataset. Type: array (or Expression with resultType array), itemType: DatasetDataElement. - /// Columns that define the physical type schema of the dataset. Type: array (or Expression with resultType array), itemType: DatasetSchemaDataElement. - /// Linked service reference. - /// Parameters for dataset. - /// List of tags that can be used for describing the Dataset. - /// The folder that this Dataset is in. If not specified, Dataset will appear at the root level. - /// Additional Properties. - /// The table name of the MongoDB database. Type: string (or Expression with resultType string). - internal MongoDBCollectionDataset(string datasetType, string description, DataFactoryElement> structure, DataFactoryElement> schema, DataFactoryLinkedServiceReference linkedServiceName, IDictionary parameters, IList annotations, DatasetFolder folder, IDictionary> additionalProperties, DataFactoryElement collectionName) : base(datasetType, description, structure, schema, linkedServiceName, parameters, annotations, folder, additionalProperties) - { - CollectionName = collectionName; - DatasetType = datasetType ?? "MongoDbCollection"; - } - - /// The table name of the MongoDB database. Type: string (or Expression with resultType string). - public DataFactoryElement CollectionName { get; set; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/MongoDBCursorMethodsProperties.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/MongoDBCursorMethodsProperties.Serialization.cs deleted file mode 100644 index 6b4eddd7..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/MongoDBCursorMethodsProperties.Serialization.cs +++ /dev/null @@ -1,104 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class MongoDBCursorMethodsProperties : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - if (Optional.IsDefined(Project)) - { - writer.WritePropertyName("project"u8); - JsonSerializer.Serialize(writer, Project); - } - if (Optional.IsDefined(Sort)) - { - writer.WritePropertyName("sort"u8); - JsonSerializer.Serialize(writer, Sort); - } - if (Optional.IsDefined(Skip)) - { - writer.WritePropertyName("skip"u8); - JsonSerializer.Serialize(writer, Skip); - } - if (Optional.IsDefined(Limit)) - { - writer.WritePropertyName("limit"u8); - JsonSerializer.Serialize(writer, Limit); - } - foreach (var item in AdditionalProperties) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.Value.ToString()).RootElement); -#endif - } - writer.WriteEndObject(); - } - - internal static MongoDBCursorMethodsProperties DeserializeMongoDBCursorMethodsProperties(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - Optional> project = default; - Optional> sort = default; - Optional> skip = default; - Optional> limit = default; - IDictionary> additionalProperties = default; - Dictionary> additionalPropertiesDictionary = new Dictionary>(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("project"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - project = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("sort"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - sort = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("skip"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - skip = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("limit"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - limit = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - additionalPropertiesDictionary.Add(property.Name, JsonSerializer.Deserialize>(property.Value.GetRawText())); - } - additionalProperties = additionalPropertiesDictionary; - return new MongoDBCursorMethodsProperties(project.Value, sort.Value, skip.Value, limit.Value, additionalProperties); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/MongoDBCursorMethodsProperties.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/MongoDBCursorMethodsProperties.cs deleted file mode 100644 index 496117df..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/MongoDBCursorMethodsProperties.cs +++ /dev/null @@ -1,74 +0,0 @@ -// - -#nullable disable - -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// Cursor methods for Mongodb query. - public partial class MongoDBCursorMethodsProperties - { - /// Initializes a new instance of MongoDBCursorMethodsProperties. - public MongoDBCursorMethodsProperties() - { - AdditionalProperties = new ChangeTrackingDictionary>(); - } - - /// Initializes a new instance of MongoDBCursorMethodsProperties. - /// Specifies the fields to return in the documents that match the query filter. To return all fields in the matching documents, omit this parameter. Type: string (or Expression with resultType string). - /// Specifies the order in which the query returns matching documents. Type: string (or Expression with resultType string). Type: string (or Expression with resultType string). - /// Specifies the how many documents skipped and where MongoDB begins returning results. This approach may be useful in implementing paginated results. Type: integer (or Expression with resultType integer). - /// Specifies the maximum number of documents the server returns. limit() is analogous to the LIMIT statement in a SQL database. Type: integer (or Expression with resultType integer). - /// Additional Properties. - internal MongoDBCursorMethodsProperties(DataFactoryElement project, DataFactoryElement sort, DataFactoryElement skip, DataFactoryElement limit, IDictionary> additionalProperties) - { - Project = project; - Sort = sort; - Skip = skip; - Limit = limit; - AdditionalProperties = additionalProperties; - } - - /// Specifies the fields to return in the documents that match the query filter. To return all fields in the matching documents, omit this parameter. Type: string (or Expression with resultType string). - public DataFactoryElement Project { get; set; } - /// Specifies the order in which the query returns matching documents. Type: string (or Expression with resultType string). Type: string (or Expression with resultType string). - public DataFactoryElement Sort { get; set; } - /// Specifies the how many documents skipped and where MongoDB begins returning results. This approach may be useful in implementing paginated results. Type: integer (or Expression with resultType integer). - public DataFactoryElement Skip { get; set; } - /// Specifies the maximum number of documents the server returns. limit() is analogous to the LIMIT statement in a SQL database. Type: integer (or Expression with resultType integer). - public DataFactoryElement Limit { get; set; } - /// - /// Additional Properties - /// - /// To assign an object to the value of this property use . - /// - /// - /// To assign an already formated json string to this property use . - /// - /// - /// Examples: - /// - /// - /// BinaryData.FromObjectAsJson("foo") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromString("\"foo\"") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromObjectAsJson(new { key = "value" }) - /// Creates a payload of { "key": "value" }. - /// - /// - /// BinaryData.FromString("{\"key\": \"value\"}") - /// Creates a payload of { "key": "value" }. - /// - /// - /// - /// - public IDictionary> AdditionalProperties { get; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/MongoDBLinkedService.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/MongoDBLinkedService.Serialization.cs deleted file mode 100644 index b4bdd004..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/MongoDBLinkedService.Serialization.cs +++ /dev/null @@ -1,292 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class MongoDBLinkedService : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - writer.WritePropertyName("type"u8); - writer.WriteStringValue(LinkedServiceType); - if (Optional.IsDefined(ConnectVia)) - { - writer.WritePropertyName("connectVia"u8); - writer.WriteObjectValue(ConnectVia); - } - if (Optional.IsDefined(Description)) - { - writer.WritePropertyName("description"u8); - writer.WriteStringValue(Description); - } - if (Optional.IsCollectionDefined(Parameters)) - { - writer.WritePropertyName("parameters"u8); - writer.WriteStartObject(); - foreach (var item in Parameters) - { - writer.WritePropertyName(item.Key); - writer.WriteObjectValue(item.Value); - } - writer.WriteEndObject(); - } - if (Optional.IsCollectionDefined(Annotations)) - { - writer.WritePropertyName("annotations"u8); - writer.WriteStartArray(); - foreach (var item in Annotations) - { - if (item == null) - { - writer.WriteNullValue(); - continue; - } -#if NET6_0_OR_GREATER - writer.WriteRawValue(item); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.ToString()).RootElement); -#endif - } - writer.WriteEndArray(); - } - writer.WritePropertyName("typeProperties"u8); - writer.WriteStartObject(); - writer.WritePropertyName("server"u8); - JsonSerializer.Serialize(writer, Server); - if (Optional.IsDefined(AuthenticationType)) - { - writer.WritePropertyName("authenticationType"u8); - writer.WriteStringValue(AuthenticationType.Value.ToString()); - } - writer.WritePropertyName("databaseName"u8); - JsonSerializer.Serialize(writer, DatabaseName); - if (Optional.IsDefined(Username)) - { - writer.WritePropertyName("username"u8); - JsonSerializer.Serialize(writer, Username); - } - if (Optional.IsDefined(Password)) - { - writer.WritePropertyName("password"u8); - JsonSerializer.Serialize(writer, Password); - } - if (Optional.IsDefined(AuthSource)) - { - writer.WritePropertyName("authSource"u8); - JsonSerializer.Serialize(writer, AuthSource); - } - if (Optional.IsDefined(Port)) - { - writer.WritePropertyName("port"u8); - JsonSerializer.Serialize(writer, Port); - } - if (Optional.IsDefined(EnableSsl)) - { - writer.WritePropertyName("enableSsl"u8); - JsonSerializer.Serialize(writer, EnableSsl); - } - if (Optional.IsDefined(AllowSelfSignedServerCert)) - { - writer.WritePropertyName("allowSelfSignedServerCert"u8); - JsonSerializer.Serialize(writer, AllowSelfSignedServerCert); - } - if (Optional.IsDefined(EncryptedCredential)) - { - writer.WritePropertyName("encryptedCredential"u8); - writer.WriteStringValue(EncryptedCredential); - } - writer.WriteEndObject(); - foreach (var item in AdditionalProperties) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.Value.ToString()).RootElement); -#endif - } - writer.WriteEndObject(); - } - - internal static MongoDBLinkedService DeserializeMongoDBLinkedService(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - string type = default; - Optional connectVia = default; - Optional description = default; - Optional> parameters = default; - Optional> annotations = default; - DataFactoryElement server = default; - Optional authenticationType = default; - DataFactoryElement databaseName = default; - Optional> username = default; - Optional password = default; - Optional> authSource = default; - Optional> port = default; - Optional> enableSsl = default; - Optional> allowSelfSignedServerCert = default; - Optional encryptedCredential = default; - IDictionary> additionalProperties = default; - Dictionary> additionalPropertiesDictionary = new Dictionary>(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("type"u8)) - { - type = property.Value.GetString(); - continue; - } - if (property.NameEquals("connectVia"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - connectVia = IntegrationRuntimeReference.DeserializeIntegrationRuntimeReference(property.Value); - continue; - } - if (property.NameEquals("description"u8)) - { - description = property.Value.GetString(); - continue; - } - if (property.NameEquals("parameters"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - Dictionary dictionary = new Dictionary(); - foreach (var property0 in property.Value.EnumerateObject()) - { - dictionary.Add(property0.Name, EntityParameterSpecification.DeserializeEntityParameterSpecification(property0.Value)); - } - parameters = dictionary; - continue; - } - if (property.NameEquals("annotations"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - if (item.ValueKind == JsonValueKind.Null) - { - array.Add(null); - } - else - { - array.Add(BinaryData.FromString(item.GetRawText())); - } - } - annotations = array; - continue; - } - if (property.NameEquals("typeProperties"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - foreach (var property0 in property.Value.EnumerateObject()) - { - if (property0.NameEquals("server"u8)) - { - server = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("authenticationType"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - authenticationType = new MongoDBAuthenticationType(property0.Value.GetString()); - continue; - } - if (property0.NameEquals("databaseName"u8)) - { - databaseName = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("username"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - username = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("password"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - password = JsonSerializer.Deserialize(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("authSource"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - authSource = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("port"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - port = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("enableSsl"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - enableSsl = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("allowSelfSignedServerCert"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - allowSelfSignedServerCert = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("encryptedCredential"u8)) - { - encryptedCredential = property0.Value.GetString(); - continue; - } - } - continue; - } - additionalPropertiesDictionary.Add(property.Name, JsonSerializer.Deserialize>(property.Value.GetRawText())); - } - additionalProperties = additionalPropertiesDictionary; - return new MongoDBLinkedService(type, connectVia.Value, description.Value, Optional.ToDictionary(parameters), Optional.ToList(annotations), additionalProperties, server, Optional.ToNullable(authenticationType), databaseName, username.Value, password, authSource.Value, port.Value, enableSsl.Value, allowSelfSignedServerCert.Value, encryptedCredential.Value); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/MongoDBLinkedService.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/MongoDBLinkedService.cs deleted file mode 100644 index ec8f00ce..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/MongoDBLinkedService.cs +++ /dev/null @@ -1,80 +0,0 @@ -// - -#nullable disable - -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// Linked service for MongoDb data source. - public partial class MongoDBLinkedService : DataFactoryLinkedServiceProperties - { - /// Initializes a new instance of MongoDBLinkedService. - /// The IP address or server name of the MongoDB server. Type: string (or Expression with resultType string). - /// The name of the MongoDB database that you want to access. Type: string (or Expression with resultType string). - /// or is null. - public MongoDBLinkedService(DataFactoryElement server, DataFactoryElement databaseName) - { - Argument.AssertNotNull(server, nameof(server)); - Argument.AssertNotNull(databaseName, nameof(databaseName)); - - Server = server; - DatabaseName = databaseName; - LinkedServiceType = "MongoDb"; - } - - /// Initializes a new instance of MongoDBLinkedService. - /// Type of linked service. - /// The integration runtime reference. - /// Linked service description. - /// Parameters for linked service. - /// List of tags that can be used for describing the linked service. - /// Additional Properties. - /// The IP address or server name of the MongoDB server. Type: string (or Expression with resultType string). - /// The authentication type to be used to connect to the MongoDB database. - /// The name of the MongoDB database that you want to access. Type: string (or Expression with resultType string). - /// Username for authentication. Type: string (or Expression with resultType string). - /// Password for authentication. - /// Database to verify the username and password. Type: string (or Expression with resultType string). - /// The TCP port number that the MongoDB server uses to listen for client connections. The default value is 27017. Type: integer (or Expression with resultType integer), minimum: 0. - /// Specifies whether the connections to the server are encrypted using SSL. The default value is false. Type: boolean (or Expression with resultType boolean). - /// Specifies whether to allow self-signed certificates from the server. The default value is false. Type: boolean (or Expression with resultType boolean). - /// The encrypted credential used for authentication. Credentials are encrypted using the integration runtime credential manager. Type: string. - internal MongoDBLinkedService(string linkedServiceType, IntegrationRuntimeReference connectVia, string description, IDictionary parameters, IList annotations, IDictionary> additionalProperties, DataFactoryElement server, MongoDBAuthenticationType? authenticationType, DataFactoryElement databaseName, DataFactoryElement username, DataFactorySecretBaseDefinition password, DataFactoryElement authSource, DataFactoryElement port, DataFactoryElement enableSsl, DataFactoryElement allowSelfSignedServerCert, string encryptedCredential) : base(linkedServiceType, connectVia, description, parameters, annotations, additionalProperties) - { - Server = server; - AuthenticationType = authenticationType; - DatabaseName = databaseName; - Username = username; - Password = password; - AuthSource = authSource; - Port = port; - EnableSsl = enableSsl; - AllowSelfSignedServerCert = allowSelfSignedServerCert; - EncryptedCredential = encryptedCredential; - LinkedServiceType = linkedServiceType ?? "MongoDb"; - } - - /// The IP address or server name of the MongoDB server. Type: string (or Expression with resultType string). - public DataFactoryElement Server { get; set; } - /// The authentication type to be used to connect to the MongoDB database. - public MongoDBAuthenticationType? AuthenticationType { get; set; } - /// The name of the MongoDB database that you want to access. Type: string (or Expression with resultType string). - public DataFactoryElement DatabaseName { get; set; } - /// Username for authentication. Type: string (or Expression with resultType string). - public DataFactoryElement Username { get; set; } - /// Password for authentication. - public DataFactorySecretBaseDefinition Password { get; set; } - /// Database to verify the username and password. Type: string (or Expression with resultType string). - public DataFactoryElement AuthSource { get; set; } - /// The TCP port number that the MongoDB server uses to listen for client connections. The default value is 27017. Type: integer (or Expression with resultType integer), minimum: 0. - public DataFactoryElement Port { get; set; } - /// Specifies whether the connections to the server are encrypted using SSL. The default value is false. Type: boolean (or Expression with resultType boolean). - public DataFactoryElement EnableSsl { get; set; } - /// Specifies whether to allow self-signed certificates from the server. The default value is false. Type: boolean (or Expression with resultType boolean). - public DataFactoryElement AllowSelfSignedServerCert { get; set; } - /// The encrypted credential used for authentication. Credentials are encrypted using the integration runtime credential manager. Type: string. - public string EncryptedCredential { get; set; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/MongoDBSource.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/MongoDBSource.Serialization.cs deleted file mode 100644 index 0d8be975..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/MongoDBSource.Serialization.cs +++ /dev/null @@ -1,146 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class MongoDBSource : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - if (Optional.IsDefined(Query)) - { - writer.WritePropertyName("query"u8); - JsonSerializer.Serialize(writer, Query); - } - if (Optional.IsDefined(AdditionalColumns)) - { - writer.WritePropertyName("additionalColumns"u8); -#if NET6_0_OR_GREATER - writer.WriteRawValue(AdditionalColumns); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(AdditionalColumns.ToString()).RootElement); -#endif - } - writer.WritePropertyName("type"u8); - writer.WriteStringValue(CopySourceType); - if (Optional.IsDefined(SourceRetryCount)) - { - writer.WritePropertyName("sourceRetryCount"u8); - JsonSerializer.Serialize(writer, SourceRetryCount); - } - if (Optional.IsDefined(SourceRetryWait)) - { - writer.WritePropertyName("sourceRetryWait"u8); - JsonSerializer.Serialize(writer, SourceRetryWait); - } - if (Optional.IsDefined(MaxConcurrentConnections)) - { - writer.WritePropertyName("maxConcurrentConnections"u8); - JsonSerializer.Serialize(writer, MaxConcurrentConnections); - } - if (Optional.IsDefined(DisableMetricsCollection)) - { - writer.WritePropertyName("disableMetricsCollection"u8); - JsonSerializer.Serialize(writer, DisableMetricsCollection); - } - foreach (var item in AdditionalProperties) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.Value.ToString()).RootElement); -#endif - } - writer.WriteEndObject(); - } - - internal static MongoDBSource DeserializeMongoDBSource(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - Optional> query = default; - Optional additionalColumns = default; - string type = default; - Optional> sourceRetryCount = default; - Optional> sourceRetryWait = default; - Optional> maxConcurrentConnections = default; - Optional> disableMetricsCollection = default; - IDictionary> additionalProperties = default; - Dictionary> additionalPropertiesDictionary = new Dictionary>(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("query"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - query = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("additionalColumns"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - additionalColumns = BinaryData.FromString(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("type"u8)) - { - type = property.Value.GetString(); - continue; - } - if (property.NameEquals("sourceRetryCount"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - sourceRetryCount = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("sourceRetryWait"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - sourceRetryWait = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("maxConcurrentConnections"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - maxConcurrentConnections = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("disableMetricsCollection"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - disableMetricsCollection = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - additionalPropertiesDictionary.Add(property.Name, JsonSerializer.Deserialize>(property.Value.GetRawText())); - } - additionalProperties = additionalPropertiesDictionary; - return new MongoDBSource(type, sourceRetryCount.Value, sourceRetryWait.Value, maxConcurrentConnections.Value, disableMetricsCollection.Value, additionalProperties, query.Value, additionalColumns.Value); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/MongoDBSource.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/MongoDBSource.cs deleted file mode 100644 index d31a543c..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/MongoDBSource.cs +++ /dev/null @@ -1,68 +0,0 @@ -// - -#nullable disable - -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// A copy activity source for a MongoDB database. - public partial class MongoDBSource : CopyActivitySource - { - /// Initializes a new instance of MongoDBSource. - public MongoDBSource() - { - CopySourceType = "MongoDbSource"; - } - - /// Initializes a new instance of MongoDBSource. - /// Copy source type. - /// Source retry count. Type: integer (or Expression with resultType integer). - /// Source retry wait. Type: string (or Expression with resultType string), pattern: ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). - /// The maximum concurrent connection count for the source data store. Type: integer (or Expression with resultType integer). - /// If true, disable data store metrics collection. Default is false. Type: boolean (or Expression with resultType boolean). - /// Additional Properties. - /// Database query. Should be a SQL-92 query expression. Type: string (or Expression with resultType string). - /// Specifies the additional columns to be added to source data. Type: array of objects(AdditionalColumns) (or Expression with resultType array of objects). - internal MongoDBSource(string copySourceType, DataFactoryElement sourceRetryCount, DataFactoryElement sourceRetryWait, DataFactoryElement maxConcurrentConnections, DataFactoryElement disableMetricsCollection, IDictionary> additionalProperties, DataFactoryElement query, BinaryData additionalColumns) : base(copySourceType, sourceRetryCount, sourceRetryWait, maxConcurrentConnections, disableMetricsCollection, additionalProperties) - { - Query = query; - AdditionalColumns = additionalColumns; - CopySourceType = copySourceType ?? "MongoDbSource"; - } - - /// Database query. Should be a SQL-92 query expression. Type: string (or Expression with resultType string). - public DataFactoryElement Query { get; set; } - /// - /// Specifies the additional columns to be added to source data. Type: array of objects(AdditionalColumns) (or Expression with resultType array of objects). - /// - /// To assign an object to this property use . - /// - /// - /// To assign an already formated json string to this property use . - /// - /// - /// Examples: - /// - /// - /// BinaryData.FromObjectAsJson("foo") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromString("\"foo\"") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromObjectAsJson(new { key = "value" }) - /// Creates a payload of { "key": "value" }. - /// - /// - /// BinaryData.FromString("{\"key\": \"value\"}") - /// Creates a payload of { "key": "value" }. - /// - /// - /// - /// - public BinaryData AdditionalColumns { get; set; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/MongoDBV2CollectionDataset.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/MongoDBV2CollectionDataset.Serialization.cs deleted file mode 100644 index bd0a92e1..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/MongoDBV2CollectionDataset.Serialization.cs +++ /dev/null @@ -1,205 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class MongoDBV2CollectionDataset : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - writer.WritePropertyName("type"u8); - writer.WriteStringValue(DatasetType); - if (Optional.IsDefined(Description)) - { - writer.WritePropertyName("description"u8); - writer.WriteStringValue(Description); - } - if (Optional.IsDefined(Structure)) - { - writer.WritePropertyName("structure"u8); - JsonSerializer.Serialize(writer, Structure); - } - if (Optional.IsDefined(Schema)) - { - writer.WritePropertyName("schema"u8); - JsonSerializer.Serialize(writer, Schema); - } - writer.WritePropertyName("linkedServiceName"u8); - JsonSerializer.Serialize(writer, LinkedServiceName); if (Optional.IsCollectionDefined(Parameters)) - { - writer.WritePropertyName("parameters"u8); - writer.WriteStartObject(); - foreach (var item in Parameters) - { - writer.WritePropertyName(item.Key); - writer.WriteObjectValue(item.Value); - } - writer.WriteEndObject(); - } - if (Optional.IsCollectionDefined(Annotations)) - { - writer.WritePropertyName("annotations"u8); - writer.WriteStartArray(); - foreach (var item in Annotations) - { - if (item == null) - { - writer.WriteNullValue(); - continue; - } -#if NET6_0_OR_GREATER - writer.WriteRawValue(item); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.ToString()).RootElement); -#endif - } - writer.WriteEndArray(); - } - if (Optional.IsDefined(Folder)) - { - writer.WritePropertyName("folder"u8); - writer.WriteObjectValue(Folder); - } - writer.WritePropertyName("typeProperties"u8); - writer.WriteStartObject(); - writer.WritePropertyName("collection"u8); - JsonSerializer.Serialize(writer, Collection); - writer.WriteEndObject(); - foreach (var item in AdditionalProperties) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.Value.ToString()).RootElement); -#endif - } - writer.WriteEndObject(); - } - - internal static MongoDBV2CollectionDataset DeserializeMongoDBV2CollectionDataset(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - string type = default; - Optional description = default; - Optional>> structure = default; - Optional>> schema = default; - DataFactoryLinkedServiceReference linkedServiceName = default; - Optional> parameters = default; - Optional> annotations = default; - Optional folder = default; - DataFactoryElement collection = default; - IDictionary> additionalProperties = default; - Dictionary> additionalPropertiesDictionary = new Dictionary>(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("type"u8)) - { - type = property.Value.GetString(); - continue; - } - if (property.NameEquals("description"u8)) - { - description = property.Value.GetString(); - continue; - } - if (property.NameEquals("structure"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - structure = JsonSerializer.Deserialize>>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("schema"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - schema = JsonSerializer.Deserialize>>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("linkedServiceName"u8)) - { - linkedServiceName = JsonSerializer.Deserialize(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("parameters"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - Dictionary dictionary = new Dictionary(); - foreach (var property0 in property.Value.EnumerateObject()) - { - dictionary.Add(property0.Name, EntityParameterSpecification.DeserializeEntityParameterSpecification(property0.Value)); - } - parameters = dictionary; - continue; - } - if (property.NameEquals("annotations"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - if (item.ValueKind == JsonValueKind.Null) - { - array.Add(null); - } - else - { - array.Add(BinaryData.FromString(item.GetRawText())); - } - } - annotations = array; - continue; - } - if (property.NameEquals("folder"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - folder = DatasetFolder.DeserializeDatasetFolder(property.Value); - continue; - } - if (property.NameEquals("typeProperties"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - foreach (var property0 in property.Value.EnumerateObject()) - { - if (property0.NameEquals("collection"u8)) - { - collection = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - } - continue; - } - additionalPropertiesDictionary.Add(property.Name, JsonSerializer.Deserialize>(property.Value.GetRawText())); - } - additionalProperties = additionalPropertiesDictionary; - return new MongoDBV2CollectionDataset(type, description.Value, structure.Value, schema.Value, linkedServiceName, Optional.ToDictionary(parameters), Optional.ToList(annotations), folder.Value, additionalProperties, collection); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/MongoDBV2CollectionDataset.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/MongoDBV2CollectionDataset.cs deleted file mode 100644 index c9c4c599..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/MongoDBV2CollectionDataset.cs +++ /dev/null @@ -1,46 +0,0 @@ -// - -#nullable disable - -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// The MongoDB database dataset. - public partial class MongoDBV2CollectionDataset : DataFactoryDatasetProperties - { - /// Initializes a new instance of MongoDBV2CollectionDataset. - /// Linked service reference. - /// The collection name of the MongoDB database. Type: string (or Expression with resultType string). - /// or is null. - public MongoDBV2CollectionDataset(DataFactoryLinkedServiceReference linkedServiceName, DataFactoryElement collection) : base(linkedServiceName) - { - Argument.AssertNotNull(linkedServiceName, nameof(linkedServiceName)); - Argument.AssertNotNull(collection, nameof(collection)); - - Collection = collection; - DatasetType = "MongoDbV2Collection"; - } - - /// Initializes a new instance of MongoDBV2CollectionDataset. - /// Type of dataset. - /// Dataset description. - /// Columns that define the structure of the dataset. Type: array (or Expression with resultType array), itemType: DatasetDataElement. - /// Columns that define the physical type schema of the dataset. Type: array (or Expression with resultType array), itemType: DatasetSchemaDataElement. - /// Linked service reference. - /// Parameters for dataset. - /// List of tags that can be used for describing the Dataset. - /// The folder that this Dataset is in. If not specified, Dataset will appear at the root level. - /// Additional Properties. - /// The collection name of the MongoDB database. Type: string (or Expression with resultType string). - internal MongoDBV2CollectionDataset(string datasetType, string description, DataFactoryElement> structure, DataFactoryElement> schema, DataFactoryLinkedServiceReference linkedServiceName, IDictionary parameters, IList annotations, DatasetFolder folder, IDictionary> additionalProperties, DataFactoryElement collection) : base(datasetType, description, structure, schema, linkedServiceName, parameters, annotations, folder, additionalProperties) - { - Collection = collection; - DatasetType = datasetType ?? "MongoDbV2Collection"; - } - - /// The collection name of the MongoDB database. Type: string (or Expression with resultType string). - public DataFactoryElement Collection { get; set; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/MongoDBV2LinkedService.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/MongoDBV2LinkedService.Serialization.cs deleted file mode 100644 index 6562d525..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/MongoDBV2LinkedService.Serialization.cs +++ /dev/null @@ -1,176 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class MongoDBV2LinkedService : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - writer.WritePropertyName("type"u8); - writer.WriteStringValue(LinkedServiceType); - if (Optional.IsDefined(ConnectVia)) - { - writer.WritePropertyName("connectVia"u8); - writer.WriteObjectValue(ConnectVia); - } - if (Optional.IsDefined(Description)) - { - writer.WritePropertyName("description"u8); - writer.WriteStringValue(Description); - } - if (Optional.IsCollectionDefined(Parameters)) - { - writer.WritePropertyName("parameters"u8); - writer.WriteStartObject(); - foreach (var item in Parameters) - { - writer.WritePropertyName(item.Key); - writer.WriteObjectValue(item.Value); - } - writer.WriteEndObject(); - } - if (Optional.IsCollectionDefined(Annotations)) - { - writer.WritePropertyName("annotations"u8); - writer.WriteStartArray(); - foreach (var item in Annotations) - { - if (item == null) - { - writer.WriteNullValue(); - continue; - } -#if NET6_0_OR_GREATER - writer.WriteRawValue(item); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.ToString()).RootElement); -#endif - } - writer.WriteEndArray(); - } - writer.WritePropertyName("typeProperties"u8); - writer.WriteStartObject(); - writer.WritePropertyName("connectionString"u8); - JsonSerializer.Serialize(writer, ConnectionString); - writer.WritePropertyName("database"u8); - JsonSerializer.Serialize(writer, Database); - writer.WriteEndObject(); - foreach (var item in AdditionalProperties) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.Value.ToString()).RootElement); -#endif - } - writer.WriteEndObject(); - } - - internal static MongoDBV2LinkedService DeserializeMongoDBV2LinkedService(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - string type = default; - Optional connectVia = default; - Optional description = default; - Optional> parameters = default; - Optional> annotations = default; - DataFactoryElement connectionString = default; - DataFactoryElement database = default; - IDictionary> additionalProperties = default; - Dictionary> additionalPropertiesDictionary = new Dictionary>(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("type"u8)) - { - type = property.Value.GetString(); - continue; - } - if (property.NameEquals("connectVia"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - connectVia = IntegrationRuntimeReference.DeserializeIntegrationRuntimeReference(property.Value); - continue; - } - if (property.NameEquals("description"u8)) - { - description = property.Value.GetString(); - continue; - } - if (property.NameEquals("parameters"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - Dictionary dictionary = new Dictionary(); - foreach (var property0 in property.Value.EnumerateObject()) - { - dictionary.Add(property0.Name, EntityParameterSpecification.DeserializeEntityParameterSpecification(property0.Value)); - } - parameters = dictionary; - continue; - } - if (property.NameEquals("annotations"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - if (item.ValueKind == JsonValueKind.Null) - { - array.Add(null); - } - else - { - array.Add(BinaryData.FromString(item.GetRawText())); - } - } - annotations = array; - continue; - } - if (property.NameEquals("typeProperties"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - foreach (var property0 in property.Value.EnumerateObject()) - { - if (property0.NameEquals("connectionString"u8)) - { - connectionString = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("database"u8)) - { - database = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - } - continue; - } - additionalPropertiesDictionary.Add(property.Name, JsonSerializer.Deserialize>(property.Value.GetRawText())); - } - additionalProperties = additionalPropertiesDictionary; - return new MongoDBV2LinkedService(type, connectVia.Value, description.Value, Optional.ToDictionary(parameters), Optional.ToList(annotations), additionalProperties, connectionString, database); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/MongoDBV2LinkedService.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/MongoDBV2LinkedService.cs deleted file mode 100644 index b67da073..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/MongoDBV2LinkedService.cs +++ /dev/null @@ -1,48 +0,0 @@ -// - -#nullable disable - -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// Linked service for MongoDB data source. - public partial class MongoDBV2LinkedService : DataFactoryLinkedServiceProperties - { - /// Initializes a new instance of MongoDBV2LinkedService. - /// The MongoDB connection string. Type: string, SecureString or AzureKeyVaultSecretReference. Type: string, SecureString or AzureKeyVaultSecretReference. - /// The name of the MongoDB database that you want to access. Type: string (or Expression with resultType string). - /// or is null. - public MongoDBV2LinkedService(DataFactoryElement connectionString, DataFactoryElement database) - { - Argument.AssertNotNull(connectionString, nameof(connectionString)); - Argument.AssertNotNull(database, nameof(database)); - - ConnectionString = connectionString; - Database = database; - LinkedServiceType = "MongoDbV2"; - } - - /// Initializes a new instance of MongoDBV2LinkedService. - /// Type of linked service. - /// The integration runtime reference. - /// Linked service description. - /// Parameters for linked service. - /// List of tags that can be used for describing the linked service. - /// Additional Properties. - /// The MongoDB connection string. Type: string, SecureString or AzureKeyVaultSecretReference. Type: string, SecureString or AzureKeyVaultSecretReference. - /// The name of the MongoDB database that you want to access. Type: string (or Expression with resultType string). - internal MongoDBV2LinkedService(string linkedServiceType, IntegrationRuntimeReference connectVia, string description, IDictionary parameters, IList annotations, IDictionary> additionalProperties, DataFactoryElement connectionString, DataFactoryElement database) : base(linkedServiceType, connectVia, description, parameters, annotations, additionalProperties) - { - ConnectionString = connectionString; - Database = database; - LinkedServiceType = linkedServiceType ?? "MongoDbV2"; - } - - /// The MongoDB connection string. Type: string, SecureString or AzureKeyVaultSecretReference. Type: string, SecureString or AzureKeyVaultSecretReference. - public DataFactoryElement ConnectionString { get; set; } - /// The name of the MongoDB database that you want to access. Type: string (or Expression with resultType string). - public DataFactoryElement Database { get; set; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/MongoDBV2Sink.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/MongoDBV2Sink.Serialization.cs deleted file mode 100644 index a32e3622..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/MongoDBV2Sink.Serialization.cs +++ /dev/null @@ -1,157 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class MongoDBV2Sink : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - if (Optional.IsDefined(WriteBehavior)) - { - writer.WritePropertyName("writeBehavior"u8); - JsonSerializer.Serialize(writer, WriteBehavior); - } - writer.WritePropertyName("type"u8); - writer.WriteStringValue(CopySinkType); - if (Optional.IsDefined(WriteBatchSize)) - { - writer.WritePropertyName("writeBatchSize"u8); - JsonSerializer.Serialize(writer, WriteBatchSize); - } - if (Optional.IsDefined(WriteBatchTimeout)) - { - writer.WritePropertyName("writeBatchTimeout"u8); - JsonSerializer.Serialize(writer, WriteBatchTimeout); - } - if (Optional.IsDefined(SinkRetryCount)) - { - writer.WritePropertyName("sinkRetryCount"u8); - JsonSerializer.Serialize(writer, SinkRetryCount); - } - if (Optional.IsDefined(SinkRetryWait)) - { - writer.WritePropertyName("sinkRetryWait"u8); - JsonSerializer.Serialize(writer, SinkRetryWait); - } - if (Optional.IsDefined(MaxConcurrentConnections)) - { - writer.WritePropertyName("maxConcurrentConnections"u8); - JsonSerializer.Serialize(writer, MaxConcurrentConnections); - } - if (Optional.IsDefined(DisableMetricsCollection)) - { - writer.WritePropertyName("disableMetricsCollection"u8); - JsonSerializer.Serialize(writer, DisableMetricsCollection); - } - foreach (var item in AdditionalProperties) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.Value.ToString()).RootElement); -#endif - } - writer.WriteEndObject(); - } - - internal static MongoDBV2Sink DeserializeMongoDBV2Sink(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - Optional> writeBehavior = default; - string type = default; - Optional> writeBatchSize = default; - Optional> writeBatchTimeout = default; - Optional> sinkRetryCount = default; - Optional> sinkRetryWait = default; - Optional> maxConcurrentConnections = default; - Optional> disableMetricsCollection = default; - IDictionary> additionalProperties = default; - Dictionary> additionalPropertiesDictionary = new Dictionary>(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("writeBehavior"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - writeBehavior = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("type"u8)) - { - type = property.Value.GetString(); - continue; - } - if (property.NameEquals("writeBatchSize"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - writeBatchSize = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("writeBatchTimeout"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - writeBatchTimeout = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("sinkRetryCount"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - sinkRetryCount = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("sinkRetryWait"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - sinkRetryWait = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("maxConcurrentConnections"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - maxConcurrentConnections = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("disableMetricsCollection"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - disableMetricsCollection = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - additionalPropertiesDictionary.Add(property.Name, JsonSerializer.Deserialize>(property.Value.GetRawText())); - } - additionalProperties = additionalPropertiesDictionary; - return new MongoDBV2Sink(type, writeBatchSize.Value, writeBatchTimeout.Value, sinkRetryCount.Value, sinkRetryWait.Value, maxConcurrentConnections.Value, disableMetricsCollection.Value, additionalProperties, writeBehavior.Value); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/MongoDBV2Sink.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/MongoDBV2Sink.cs deleted file mode 100644 index f0b0baa4..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/MongoDBV2Sink.cs +++ /dev/null @@ -1,37 +0,0 @@ -// - -#nullable disable - -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// A copy activity MongoDB sink. - public partial class MongoDBV2Sink : CopySink - { - /// Initializes a new instance of MongoDBV2Sink. - public MongoDBV2Sink() - { - CopySinkType = "MongoDbV2Sink"; - } - - /// Initializes a new instance of MongoDBV2Sink. - /// Copy sink type. - /// Write batch size. Type: integer (or Expression with resultType integer), minimum: 0. - /// Write batch timeout. Type: string (or Expression with resultType string), pattern: ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). - /// Sink retry count. Type: integer (or Expression with resultType integer). - /// Sink retry wait. Type: string (or Expression with resultType string), pattern: ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). - /// The maximum concurrent connection count for the sink data store. Type: integer (or Expression with resultType integer). - /// If true, disable data store metrics collection. Default is false. Type: boolean (or Expression with resultType boolean). - /// Additional Properties. - /// Specifies whether the document with same key to be overwritten (upsert) rather than throw exception (insert). The default value is "insert". Type: string (or Expression with resultType string). Type: string (or Expression with resultType string). - internal MongoDBV2Sink(string copySinkType, DataFactoryElement writeBatchSize, DataFactoryElement writeBatchTimeout, DataFactoryElement sinkRetryCount, DataFactoryElement sinkRetryWait, DataFactoryElement maxConcurrentConnections, DataFactoryElement disableMetricsCollection, IDictionary> additionalProperties, DataFactoryElement writeBehavior) : base(copySinkType, writeBatchSize, writeBatchTimeout, sinkRetryCount, sinkRetryWait, maxConcurrentConnections, disableMetricsCollection, additionalProperties) - { - WriteBehavior = writeBehavior; - CopySinkType = copySinkType ?? "MongoDbV2Sink"; - } - - /// Specifies whether the document with same key to be overwritten (upsert) rather than throw exception (insert). The default value is "insert". Type: string (or Expression with resultType string). Type: string (or Expression with resultType string). - public DataFactoryElement WriteBehavior { get; set; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/MongoDBV2Source.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/MongoDBV2Source.Serialization.cs deleted file mode 100644 index f38a56c6..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/MongoDBV2Source.Serialization.cs +++ /dev/null @@ -1,191 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class MongoDBV2Source : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - if (Optional.IsDefined(Filter)) - { - writer.WritePropertyName("filter"u8); - JsonSerializer.Serialize(writer, Filter); - } - if (Optional.IsDefined(CursorMethods)) - { - writer.WritePropertyName("cursorMethods"u8); - writer.WriteObjectValue(CursorMethods); - } - if (Optional.IsDefined(BatchSize)) - { - writer.WritePropertyName("batchSize"u8); - JsonSerializer.Serialize(writer, BatchSize); - } - if (Optional.IsDefined(QueryTimeout)) - { - writer.WritePropertyName("queryTimeout"u8); - JsonSerializer.Serialize(writer, QueryTimeout); - } - if (Optional.IsDefined(AdditionalColumns)) - { - writer.WritePropertyName("additionalColumns"u8); -#if NET6_0_OR_GREATER - writer.WriteRawValue(AdditionalColumns); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(AdditionalColumns.ToString()).RootElement); -#endif - } - writer.WritePropertyName("type"u8); - writer.WriteStringValue(CopySourceType); - if (Optional.IsDefined(SourceRetryCount)) - { - writer.WritePropertyName("sourceRetryCount"u8); - JsonSerializer.Serialize(writer, SourceRetryCount); - } - if (Optional.IsDefined(SourceRetryWait)) - { - writer.WritePropertyName("sourceRetryWait"u8); - JsonSerializer.Serialize(writer, SourceRetryWait); - } - if (Optional.IsDefined(MaxConcurrentConnections)) - { - writer.WritePropertyName("maxConcurrentConnections"u8); - JsonSerializer.Serialize(writer, MaxConcurrentConnections); - } - if (Optional.IsDefined(DisableMetricsCollection)) - { - writer.WritePropertyName("disableMetricsCollection"u8); - JsonSerializer.Serialize(writer, DisableMetricsCollection); - } - foreach (var item in AdditionalProperties) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.Value.ToString()).RootElement); -#endif - } - writer.WriteEndObject(); - } - - internal static MongoDBV2Source DeserializeMongoDBV2Source(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - Optional> filter = default; - Optional cursorMethods = default; - Optional> batchSize = default; - Optional> queryTimeout = default; - Optional additionalColumns = default; - string type = default; - Optional> sourceRetryCount = default; - Optional> sourceRetryWait = default; - Optional> maxConcurrentConnections = default; - Optional> disableMetricsCollection = default; - IDictionary> additionalProperties = default; - Dictionary> additionalPropertiesDictionary = new Dictionary>(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("filter"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - filter = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("cursorMethods"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - cursorMethods = MongoDBCursorMethodsProperties.DeserializeMongoDBCursorMethodsProperties(property.Value); - continue; - } - if (property.NameEquals("batchSize"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - batchSize = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("queryTimeout"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - queryTimeout = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("additionalColumns"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - additionalColumns = BinaryData.FromString(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("type"u8)) - { - type = property.Value.GetString(); - continue; - } - if (property.NameEquals("sourceRetryCount"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - sourceRetryCount = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("sourceRetryWait"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - sourceRetryWait = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("maxConcurrentConnections"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - maxConcurrentConnections = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("disableMetricsCollection"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - disableMetricsCollection = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - additionalPropertiesDictionary.Add(property.Name, JsonSerializer.Deserialize>(property.Value.GetRawText())); - } - additionalProperties = additionalPropertiesDictionary; - return new MongoDBV2Source(type, sourceRetryCount.Value, sourceRetryWait.Value, maxConcurrentConnections.Value, disableMetricsCollection.Value, additionalProperties, filter.Value, cursorMethods.Value, batchSize.Value, queryTimeout.Value, additionalColumns.Value); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/MongoDBV2Source.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/MongoDBV2Source.cs deleted file mode 100644 index 7055b0fb..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/MongoDBV2Source.cs +++ /dev/null @@ -1,80 +0,0 @@ -// - -#nullable disable - -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// A copy activity source for a MongoDB database. - public partial class MongoDBV2Source : CopyActivitySource - { - /// Initializes a new instance of MongoDBV2Source. - public MongoDBV2Source() - { - CopySourceType = "MongoDbV2Source"; - } - - /// Initializes a new instance of MongoDBV2Source. - /// Copy source type. - /// Source retry count. Type: integer (or Expression with resultType integer). - /// Source retry wait. Type: string (or Expression with resultType string), pattern: ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). - /// The maximum concurrent connection count for the source data store. Type: integer (or Expression with resultType integer). - /// If true, disable data store metrics collection. Default is false. Type: boolean (or Expression with resultType boolean). - /// Additional Properties. - /// Specifies selection filter using query operators. To return all documents in a collection, omit this parameter or pass an empty document ({}). Type: string (or Expression with resultType string). - /// Cursor methods for Mongodb query. - /// Specifies the number of documents to return in each batch of the response from MongoDB instance. In most cases, modifying the batch size will not affect the user or the application. This property's main purpose is to avoid hit the limitation of response size. Type: integer (or Expression with resultType integer). - /// 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). - internal MongoDBV2Source(string copySourceType, DataFactoryElement sourceRetryCount, DataFactoryElement sourceRetryWait, DataFactoryElement maxConcurrentConnections, DataFactoryElement disableMetricsCollection, IDictionary> additionalProperties, DataFactoryElement filter, MongoDBCursorMethodsProperties cursorMethods, DataFactoryElement batchSize, DataFactoryElement queryTimeout, BinaryData additionalColumns) : base(copySourceType, sourceRetryCount, sourceRetryWait, maxConcurrentConnections, disableMetricsCollection, additionalProperties) - { - Filter = filter; - CursorMethods = cursorMethods; - BatchSize = batchSize; - QueryTimeout = queryTimeout; - AdditionalColumns = additionalColumns; - CopySourceType = copySourceType ?? "MongoDbV2Source"; - } - - /// Specifies selection filter using query operators. To return all documents in a collection, omit this parameter or pass an empty document ({}). Type: string (or Expression with resultType string). - public DataFactoryElement Filter { get; set; } - /// Cursor methods for Mongodb query. - public MongoDBCursorMethodsProperties CursorMethods { get; set; } - /// Specifies the number of documents to return in each batch of the response from MongoDB instance. In most cases, modifying the batch size will not affect the user or the application. This property's main purpose is to avoid hit the limitation of response size. Type: integer (or Expression with resultType integer). - public DataFactoryElement BatchSize { get; set; } - /// Query timeout. Type: string (or Expression with resultType string), pattern: ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). - public DataFactoryElement QueryTimeout { get; set; } - /// - /// Specifies the additional columns to be added to source data. Type: array of objects(AdditionalColumns) (or Expression with resultType array of objects). - /// - /// To assign an object to this property use . - /// - /// - /// To assign an already formated json string to this property use . - /// - /// - /// Examples: - /// - /// - /// BinaryData.FromObjectAsJson("foo") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromString("\"foo\"") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromObjectAsJson(new { key = "value" }) - /// Creates a payload of { "key": "value" }. - /// - /// - /// BinaryData.FromString("{\"key\": \"value\"}") - /// Creates a payload of { "key": "value" }. - /// - /// - /// - /// - public BinaryData AdditionalColumns { get; set; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/MultiplePipelineTrigger.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/MultiplePipelineTrigger.Serialization.cs deleted file mode 100644 index b961212a..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/MultiplePipelineTrigger.Serialization.cs +++ /dev/null @@ -1,149 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class MultiplePipelineTrigger : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - if (Optional.IsCollectionDefined(Pipelines)) - { - writer.WritePropertyName("pipelines"u8); - writer.WriteStartArray(); - foreach (var item in Pipelines) - { - writer.WriteObjectValue(item); - } - writer.WriteEndArray(); - } - writer.WritePropertyName("type"u8); - writer.WriteStringValue(TriggerType); - if (Optional.IsDefined(Description)) - { - writer.WritePropertyName("description"u8); - writer.WriteStringValue(Description); - } - if (Optional.IsCollectionDefined(Annotations)) - { - writer.WritePropertyName("annotations"u8); - writer.WriteStartArray(); - foreach (var item in Annotations) - { - if (item == null) - { - writer.WriteNullValue(); - continue; - } -#if NET6_0_OR_GREATER - writer.WriteRawValue(item); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.ToString()).RootElement); -#endif - } - writer.WriteEndArray(); - } - foreach (var item in AdditionalProperties) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.Value.ToString()).RootElement); -#endif - } - writer.WriteEndObject(); - } - - internal static MultiplePipelineTrigger DeserializeMultiplePipelineTrigger(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - if (element.TryGetProperty("type", out JsonElement discriminator)) - { - switch (discriminator.GetString()) - { - case "BlobEventsTrigger": return DataFactoryBlobEventsTrigger.DeserializeDataFactoryBlobEventsTrigger(element); - case "BlobTrigger": return DataFactoryBlobTrigger.DeserializeDataFactoryBlobTrigger(element); - case "CustomEventsTrigger": return CustomEventsTrigger.DeserializeCustomEventsTrigger(element); - case "ScheduleTrigger": return DataFactoryScheduleTrigger.DeserializeDataFactoryScheduleTrigger(element); - } - } - Optional> pipelines = default; - string type = "MultiplePipelineTrigger"; - Optional description = default; - Optional runtimeState = default; - Optional> annotations = default; - IDictionary> additionalProperties = default; - Dictionary> additionalPropertiesDictionary = new Dictionary>(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("pipelines"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - array.Add(TriggerPipelineReference.DeserializeTriggerPipelineReference(item)); - } - pipelines = array; - continue; - } - if (property.NameEquals("type"u8)) - { - type = property.Value.GetString(); - continue; - } - if (property.NameEquals("description"u8)) - { - description = property.Value.GetString(); - continue; - } - if (property.NameEquals("runtimeState"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - runtimeState = new DataFactoryTriggerRuntimeState(property.Value.GetString()); - continue; - } - if (property.NameEquals("annotations"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - if (item.ValueKind == JsonValueKind.Null) - { - array.Add(null); - } - else - { - array.Add(BinaryData.FromString(item.GetRawText())); - } - } - annotations = array; - continue; - } - additionalPropertiesDictionary.Add(property.Name, JsonSerializer.Deserialize>(property.Value.GetRawText())); - } - additionalProperties = additionalPropertiesDictionary; - return new MultiplePipelineTrigger(type, description.Value, Optional.ToNullable(runtimeState), Optional.ToList(annotations), additionalProperties, Optional.ToList(pipelines)); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/MultiplePipelineTrigger.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/MultiplePipelineTrigger.cs deleted file mode 100644 index 7b959a1d..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/MultiplePipelineTrigger.cs +++ /dev/null @@ -1,40 +0,0 @@ -// - -#nullable disable - -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// - /// Base class for all triggers that support one to many model for trigger to pipeline. - /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. - /// The available derived classes include , , and . - /// - public partial class MultiplePipelineTrigger : DataFactoryTriggerProperties - { - /// Initializes a new instance of MultiplePipelineTrigger. - public MultiplePipelineTrigger() - { - Pipelines = new ChangeTrackingList(); - TriggerType = "MultiplePipelineTrigger"; - } - - /// Initializes a new instance of MultiplePipelineTrigger. - /// Trigger type. - /// Trigger description. - /// Indicates if trigger is running or not. Updated when Start/Stop APIs are called on the Trigger. - /// List of tags that can be used for describing the trigger. - /// Additional Properties. - /// Pipelines that need to be started. - internal MultiplePipelineTrigger(string triggerType, string description, DataFactoryTriggerRuntimeState? runtimeState, IList annotations, IDictionary> additionalProperties, IList pipelines) : base(triggerType, description, runtimeState, annotations, additionalProperties) - { - Pipelines = pipelines; - TriggerType = triggerType ?? "MultiplePipelineTrigger"; - } - - /// Pipelines that need to be started. - public IList Pipelines { get; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/MySqlLinkedService.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/MySqlLinkedService.Serialization.cs deleted file mode 100644 index 6e443a3c..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/MySqlLinkedService.Serialization.cs +++ /dev/null @@ -1,194 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class MySqlLinkedService : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - writer.WritePropertyName("type"u8); - writer.WriteStringValue(LinkedServiceType); - if (Optional.IsDefined(ConnectVia)) - { - writer.WritePropertyName("connectVia"u8); - writer.WriteObjectValue(ConnectVia); - } - if (Optional.IsDefined(Description)) - { - writer.WritePropertyName("description"u8); - writer.WriteStringValue(Description); - } - if (Optional.IsCollectionDefined(Parameters)) - { - writer.WritePropertyName("parameters"u8); - writer.WriteStartObject(); - foreach (var item in Parameters) - { - writer.WritePropertyName(item.Key); - writer.WriteObjectValue(item.Value); - } - writer.WriteEndObject(); - } - if (Optional.IsCollectionDefined(Annotations)) - { - writer.WritePropertyName("annotations"u8); - writer.WriteStartArray(); - foreach (var item in Annotations) - { - if (item == null) - { - writer.WriteNullValue(); - continue; - } -#if NET6_0_OR_GREATER - writer.WriteRawValue(item); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.ToString()).RootElement); -#endif - } - writer.WriteEndArray(); - } - writer.WritePropertyName("typeProperties"u8); - writer.WriteStartObject(); - writer.WritePropertyName("connectionString"u8); - JsonSerializer.Serialize(writer, ConnectionString); - if (Optional.IsDefined(Password)) - { - writer.WritePropertyName("password"u8); - JsonSerializer.Serialize(writer, Password); - } - if (Optional.IsDefined(EncryptedCredential)) - { - writer.WritePropertyName("encryptedCredential"u8); - writer.WriteStringValue(EncryptedCredential); - } - writer.WriteEndObject(); - foreach (var item in AdditionalProperties) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.Value.ToString()).RootElement); -#endif - } - writer.WriteEndObject(); - } - - internal static MySqlLinkedService DeserializeMySqlLinkedService(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - string type = default; - Optional connectVia = default; - Optional description = default; - Optional> parameters = default; - Optional> annotations = default; - DataFactoryElement connectionString = default; - Optional password = default; - Optional encryptedCredential = default; - IDictionary> additionalProperties = default; - Dictionary> additionalPropertiesDictionary = new Dictionary>(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("type"u8)) - { - type = property.Value.GetString(); - continue; - } - if (property.NameEquals("connectVia"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - connectVia = IntegrationRuntimeReference.DeserializeIntegrationRuntimeReference(property.Value); - continue; - } - if (property.NameEquals("description"u8)) - { - description = property.Value.GetString(); - continue; - } - if (property.NameEquals("parameters"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - Dictionary dictionary = new Dictionary(); - foreach (var property0 in property.Value.EnumerateObject()) - { - dictionary.Add(property0.Name, EntityParameterSpecification.DeserializeEntityParameterSpecification(property0.Value)); - } - parameters = dictionary; - continue; - } - if (property.NameEquals("annotations"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - if (item.ValueKind == JsonValueKind.Null) - { - array.Add(null); - } - else - { - array.Add(BinaryData.FromString(item.GetRawText())); - } - } - annotations = array; - continue; - } - if (property.NameEquals("typeProperties"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - foreach (var property0 in property.Value.EnumerateObject()) - { - if (property0.NameEquals("connectionString"u8)) - { - connectionString = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("password"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - password = JsonSerializer.Deserialize(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("encryptedCredential"u8)) - { - encryptedCredential = property0.Value.GetString(); - continue; - } - } - continue; - } - additionalPropertiesDictionary.Add(property.Name, JsonSerializer.Deserialize>(property.Value.GetRawText())); - } - additionalProperties = additionalPropertiesDictionary; - return new MySqlLinkedService(type, connectVia.Value, description.Value, Optional.ToDictionary(parameters), Optional.ToList(annotations), additionalProperties, connectionString, password, encryptedCredential.Value); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/MySqlLinkedService.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/MySqlLinkedService.cs deleted file mode 100644 index 5959c721..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/MySqlLinkedService.cs +++ /dev/null @@ -1,49 +0,0 @@ -// - -#nullable disable - -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// Linked service for MySQL data source. - public partial class MySqlLinkedService : DataFactoryLinkedServiceProperties - { - /// Initializes a new instance of MySqlLinkedService. - /// The connection string. Type: string, SecureString or AzureKeyVaultSecretReference. - /// is null. - public MySqlLinkedService(DataFactoryElement connectionString) - { - Argument.AssertNotNull(connectionString, nameof(connectionString)); - - ConnectionString = connectionString; - LinkedServiceType = "MySql"; - } - - /// Initializes a new instance of MySqlLinkedService. - /// Type of linked service. - /// The integration runtime reference. - /// Linked service description. - /// Parameters for linked service. - /// List of tags that can be used for describing the linked service. - /// Additional Properties. - /// The connection string. Type: string, SecureString or AzureKeyVaultSecretReference. - /// The Azure key vault secret reference of password in connection string. - /// The encrypted credential used for authentication. Credentials are encrypted using the integration runtime credential manager. Type: string. - internal MySqlLinkedService(string linkedServiceType, IntegrationRuntimeReference connectVia, string description, IDictionary parameters, IList annotations, IDictionary> additionalProperties, DataFactoryElement connectionString, DataFactoryKeyVaultSecretReference password, string encryptedCredential) : base(linkedServiceType, connectVia, description, parameters, annotations, additionalProperties) - { - ConnectionString = connectionString; - Password = password; - EncryptedCredential = encryptedCredential; - LinkedServiceType = linkedServiceType ?? "MySql"; - } - - /// The connection string. Type: string, SecureString or AzureKeyVaultSecretReference. - public DataFactoryElement ConnectionString { get; set; } - /// The Azure key vault secret reference of password in connection string. - public DataFactoryKeyVaultSecretReference Password { get; set; } - /// The encrypted credential used for authentication. Credentials are encrypted using the integration runtime credential manager. Type: string. - public string EncryptedCredential { get; set; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/MySqlSource.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/MySqlSource.Serialization.cs deleted file mode 100644 index 8bb2a3da..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/MySqlSource.Serialization.cs +++ /dev/null @@ -1,161 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class MySqlSource : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - if (Optional.IsDefined(Query)) - { - writer.WritePropertyName("query"u8); - JsonSerializer.Serialize(writer, Query); - } - if (Optional.IsDefined(QueryTimeout)) - { - writer.WritePropertyName("queryTimeout"u8); - JsonSerializer.Serialize(writer, QueryTimeout); - } - if (Optional.IsDefined(AdditionalColumns)) - { - writer.WritePropertyName("additionalColumns"u8); -#if NET6_0_OR_GREATER - writer.WriteRawValue(AdditionalColumns); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(AdditionalColumns.ToString()).RootElement); -#endif - } - writer.WritePropertyName("type"u8); - writer.WriteStringValue(CopySourceType); - if (Optional.IsDefined(SourceRetryCount)) - { - writer.WritePropertyName("sourceRetryCount"u8); - JsonSerializer.Serialize(writer, SourceRetryCount); - } - if (Optional.IsDefined(SourceRetryWait)) - { - writer.WritePropertyName("sourceRetryWait"u8); - JsonSerializer.Serialize(writer, SourceRetryWait); - } - if (Optional.IsDefined(MaxConcurrentConnections)) - { - writer.WritePropertyName("maxConcurrentConnections"u8); - JsonSerializer.Serialize(writer, MaxConcurrentConnections); - } - if (Optional.IsDefined(DisableMetricsCollection)) - { - writer.WritePropertyName("disableMetricsCollection"u8); - JsonSerializer.Serialize(writer, DisableMetricsCollection); - } - foreach (var item in AdditionalProperties) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.Value.ToString()).RootElement); -#endif - } - writer.WriteEndObject(); - } - - internal static MySqlSource DeserializeMySqlSource(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - Optional> query = default; - Optional> queryTimeout = default; - Optional additionalColumns = default; - string type = default; - Optional> sourceRetryCount = default; - Optional> sourceRetryWait = default; - Optional> maxConcurrentConnections = default; - Optional> disableMetricsCollection = default; - IDictionary> additionalProperties = default; - Dictionary> additionalPropertiesDictionary = new Dictionary>(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("query"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - query = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("queryTimeout"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - queryTimeout = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("additionalColumns"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - additionalColumns = BinaryData.FromString(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("type"u8)) - { - type = property.Value.GetString(); - continue; - } - if (property.NameEquals("sourceRetryCount"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - sourceRetryCount = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("sourceRetryWait"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - sourceRetryWait = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("maxConcurrentConnections"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - maxConcurrentConnections = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("disableMetricsCollection"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - disableMetricsCollection = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - additionalPropertiesDictionary.Add(property.Name, JsonSerializer.Deserialize>(property.Value.GetRawText())); - } - additionalProperties = additionalPropertiesDictionary; - return new MySqlSource(type, sourceRetryCount.Value, sourceRetryWait.Value, maxConcurrentConnections.Value, disableMetricsCollection.Value, additionalProperties, queryTimeout.Value, additionalColumns.Value, query.Value); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/MySqlSource.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/MySqlSource.cs deleted file mode 100644 index c7a4d2be..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/MySqlSource.cs +++ /dev/null @@ -1,37 +0,0 @@ -// - -#nullable disable - -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// A copy activity source for MySQL databases. - public partial class MySqlSource : TabularSource - { - /// Initializes a new instance of MySqlSource. - public MySqlSource() - { - CopySourceType = "MySqlSource"; - } - - /// Initializes a new instance of MySqlSource. - /// Copy source type. - /// Source retry count. Type: integer (or Expression with resultType integer). - /// Source retry wait. Type: string (or Expression with resultType string), pattern: ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). - /// The maximum concurrent connection count for the source data store. Type: integer (or Expression with resultType integer). - /// If true, disable data store metrics collection. Default is false. Type: boolean (or Expression with resultType boolean). - /// Additional Properties. - /// 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). - /// Database query. Type: string (or Expression with resultType string). - internal MySqlSource(string copySourceType, DataFactoryElement sourceRetryCount, DataFactoryElement sourceRetryWait, DataFactoryElement maxConcurrentConnections, DataFactoryElement disableMetricsCollection, IDictionary> additionalProperties, DataFactoryElement queryTimeout, BinaryData additionalColumns, DataFactoryElement query) : base(copySourceType, sourceRetryCount, sourceRetryWait, maxConcurrentConnections, disableMetricsCollection, additionalProperties, queryTimeout, additionalColumns) - { - Query = query; - CopySourceType = copySourceType ?? "MySqlSource"; - } - - /// Database query. Type: string (or Expression with resultType string). - public DataFactoryElement Query { get; set; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/MySqlTableDataset.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/MySqlTableDataset.Serialization.cs deleted file mode 100644 index 463d01cf..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/MySqlTableDataset.Serialization.cs +++ /dev/null @@ -1,212 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class MySqlTableDataset : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - writer.WritePropertyName("type"u8); - writer.WriteStringValue(DatasetType); - if (Optional.IsDefined(Description)) - { - writer.WritePropertyName("description"u8); - writer.WriteStringValue(Description); - } - if (Optional.IsDefined(Structure)) - { - writer.WritePropertyName("structure"u8); - JsonSerializer.Serialize(writer, Structure); - } - if (Optional.IsDefined(Schema)) - { - writer.WritePropertyName("schema"u8); - JsonSerializer.Serialize(writer, Schema); - } - writer.WritePropertyName("linkedServiceName"u8); - JsonSerializer.Serialize(writer, LinkedServiceName); if (Optional.IsCollectionDefined(Parameters)) - { - writer.WritePropertyName("parameters"u8); - writer.WriteStartObject(); - foreach (var item in Parameters) - { - writer.WritePropertyName(item.Key); - writer.WriteObjectValue(item.Value); - } - writer.WriteEndObject(); - } - if (Optional.IsCollectionDefined(Annotations)) - { - writer.WritePropertyName("annotations"u8); - writer.WriteStartArray(); - foreach (var item in Annotations) - { - if (item == null) - { - writer.WriteNullValue(); - continue; - } -#if NET6_0_OR_GREATER - writer.WriteRawValue(item); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.ToString()).RootElement); -#endif - } - writer.WriteEndArray(); - } - if (Optional.IsDefined(Folder)) - { - writer.WritePropertyName("folder"u8); - writer.WriteObjectValue(Folder); - } - writer.WritePropertyName("typeProperties"u8); - writer.WriteStartObject(); - if (Optional.IsDefined(TableName)) - { - writer.WritePropertyName("tableName"u8); - JsonSerializer.Serialize(writer, TableName); - } - writer.WriteEndObject(); - foreach (var item in AdditionalProperties) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.Value.ToString()).RootElement); -#endif - } - writer.WriteEndObject(); - } - - internal static MySqlTableDataset DeserializeMySqlTableDataset(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - string type = default; - Optional description = default; - Optional>> structure = default; - Optional>> schema = default; - DataFactoryLinkedServiceReference linkedServiceName = default; - Optional> parameters = default; - Optional> annotations = default; - Optional folder = default; - Optional> tableName = default; - IDictionary> additionalProperties = default; - Dictionary> additionalPropertiesDictionary = new Dictionary>(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("type"u8)) - { - type = property.Value.GetString(); - continue; - } - if (property.NameEquals("description"u8)) - { - description = property.Value.GetString(); - continue; - } - if (property.NameEquals("structure"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - structure = JsonSerializer.Deserialize>>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("schema"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - schema = JsonSerializer.Deserialize>>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("linkedServiceName"u8)) - { - linkedServiceName = JsonSerializer.Deserialize(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("parameters"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - Dictionary dictionary = new Dictionary(); - foreach (var property0 in property.Value.EnumerateObject()) - { - dictionary.Add(property0.Name, EntityParameterSpecification.DeserializeEntityParameterSpecification(property0.Value)); - } - parameters = dictionary; - continue; - } - if (property.NameEquals("annotations"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - if (item.ValueKind == JsonValueKind.Null) - { - array.Add(null); - } - else - { - array.Add(BinaryData.FromString(item.GetRawText())); - } - } - annotations = array; - continue; - } - if (property.NameEquals("folder"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - folder = DatasetFolder.DeserializeDatasetFolder(property.Value); - continue; - } - if (property.NameEquals("typeProperties"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - foreach (var property0 in property.Value.EnumerateObject()) - { - if (property0.NameEquals("tableName"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - tableName = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - } - continue; - } - additionalPropertiesDictionary.Add(property.Name, JsonSerializer.Deserialize>(property.Value.GetRawText())); - } - additionalProperties = additionalPropertiesDictionary; - return new MySqlTableDataset(type, description.Value, structure.Value, schema.Value, linkedServiceName, Optional.ToDictionary(parameters), Optional.ToList(annotations), folder.Value, additionalProperties, tableName.Value); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/MySqlTableDataset.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/MySqlTableDataset.cs deleted file mode 100644 index 006b89c2..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/MySqlTableDataset.cs +++ /dev/null @@ -1,43 +0,0 @@ -// - -#nullable disable - -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// The MySQL table dataset. - public partial class MySqlTableDataset : DataFactoryDatasetProperties - { - /// Initializes a new instance of MySqlTableDataset. - /// Linked service reference. - /// is null. - public MySqlTableDataset(DataFactoryLinkedServiceReference linkedServiceName) : base(linkedServiceName) - { - Argument.AssertNotNull(linkedServiceName, nameof(linkedServiceName)); - - DatasetType = "MySqlTable"; - } - - /// Initializes a new instance of MySqlTableDataset. - /// Type of dataset. - /// Dataset description. - /// Columns that define the structure of the dataset. Type: array (or Expression with resultType array), itemType: DatasetDataElement. - /// Columns that define the physical type schema of the dataset. Type: array (or Expression with resultType array), itemType: DatasetSchemaDataElement. - /// Linked service reference. - /// Parameters for dataset. - /// List of tags that can be used for describing the Dataset. - /// The folder that this Dataset is in. If not specified, Dataset will appear at the root level. - /// Additional Properties. - /// The MySQL table name. Type: string (or Expression with resultType string). - internal MySqlTableDataset(string datasetType, string description, DataFactoryElement> structure, DataFactoryElement> schema, DataFactoryLinkedServiceReference linkedServiceName, IDictionary parameters, IList annotations, DatasetFolder folder, IDictionary> additionalProperties, DataFactoryElement tableName) : base(datasetType, description, structure, schema, linkedServiceName, parameters, annotations, folder, additionalProperties) - { - TableName = tableName; - DatasetType = datasetType ?? "MySqlTable"; - } - - /// The MySQL table name. Type: string (or Expression with resultType string). - public DataFactoryElement TableName { get; set; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/NetezzaLinkedService.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/NetezzaLinkedService.Serialization.cs deleted file mode 100644 index 9812388f..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/NetezzaLinkedService.Serialization.cs +++ /dev/null @@ -1,201 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class NetezzaLinkedService : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - writer.WritePropertyName("type"u8); - writer.WriteStringValue(LinkedServiceType); - if (Optional.IsDefined(ConnectVia)) - { - writer.WritePropertyName("connectVia"u8); - writer.WriteObjectValue(ConnectVia); - } - if (Optional.IsDefined(Description)) - { - writer.WritePropertyName("description"u8); - writer.WriteStringValue(Description); - } - if (Optional.IsCollectionDefined(Parameters)) - { - writer.WritePropertyName("parameters"u8); - writer.WriteStartObject(); - foreach (var item in Parameters) - { - writer.WritePropertyName(item.Key); - writer.WriteObjectValue(item.Value); - } - writer.WriteEndObject(); - } - if (Optional.IsCollectionDefined(Annotations)) - { - writer.WritePropertyName("annotations"u8); - writer.WriteStartArray(); - foreach (var item in Annotations) - { - if (item == null) - { - writer.WriteNullValue(); - continue; - } -#if NET6_0_OR_GREATER - writer.WriteRawValue(item); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.ToString()).RootElement); -#endif - } - writer.WriteEndArray(); - } - writer.WritePropertyName("typeProperties"u8); - writer.WriteStartObject(); - if (Optional.IsDefined(ConnectionString)) - { - writer.WritePropertyName("connectionString"u8); - JsonSerializer.Serialize(writer, ConnectionString); - } - if (Optional.IsDefined(Password)) - { - writer.WritePropertyName("pwd"u8); - JsonSerializer.Serialize(writer, Password); - } - if (Optional.IsDefined(EncryptedCredential)) - { - writer.WritePropertyName("encryptedCredential"u8); - writer.WriteStringValue(EncryptedCredential); - } - writer.WriteEndObject(); - foreach (var item in AdditionalProperties) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.Value.ToString()).RootElement); -#endif - } - writer.WriteEndObject(); - } - - internal static NetezzaLinkedService DeserializeNetezzaLinkedService(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - string type = default; - Optional connectVia = default; - Optional description = default; - Optional> parameters = default; - Optional> annotations = default; - Optional> connectionString = default; - Optional password = default; - Optional encryptedCredential = default; - IDictionary> additionalProperties = default; - Dictionary> additionalPropertiesDictionary = new Dictionary>(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("type"u8)) - { - type = property.Value.GetString(); - continue; - } - if (property.NameEquals("connectVia"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - connectVia = IntegrationRuntimeReference.DeserializeIntegrationRuntimeReference(property.Value); - continue; - } - if (property.NameEquals("description"u8)) - { - description = property.Value.GetString(); - continue; - } - if (property.NameEquals("parameters"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - Dictionary dictionary = new Dictionary(); - foreach (var property0 in property.Value.EnumerateObject()) - { - dictionary.Add(property0.Name, EntityParameterSpecification.DeserializeEntityParameterSpecification(property0.Value)); - } - parameters = dictionary; - continue; - } - if (property.NameEquals("annotations"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - if (item.ValueKind == JsonValueKind.Null) - { - array.Add(null); - } - else - { - array.Add(BinaryData.FromString(item.GetRawText())); - } - } - annotations = array; - continue; - } - if (property.NameEquals("typeProperties"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - foreach (var property0 in property.Value.EnumerateObject()) - { - if (property0.NameEquals("connectionString"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - connectionString = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("pwd"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - password = JsonSerializer.Deserialize(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("encryptedCredential"u8)) - { - encryptedCredential = property0.Value.GetString(); - continue; - } - } - continue; - } - additionalPropertiesDictionary.Add(property.Name, JsonSerializer.Deserialize>(property.Value.GetRawText())); - } - additionalProperties = additionalPropertiesDictionary; - return new NetezzaLinkedService(type, connectVia.Value, description.Value, Optional.ToDictionary(parameters), Optional.ToList(annotations), additionalProperties, connectionString.Value, password, encryptedCredential.Value); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/NetezzaLinkedService.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/NetezzaLinkedService.cs deleted file mode 100644 index 7066e912..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/NetezzaLinkedService.cs +++ /dev/null @@ -1,43 +0,0 @@ -// - -#nullable disable - -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// Netezza linked service. - public partial class NetezzaLinkedService : DataFactoryLinkedServiceProperties - { - /// Initializes a new instance of NetezzaLinkedService. - public NetezzaLinkedService() - { - LinkedServiceType = "Netezza"; - } - - /// Initializes a new instance of NetezzaLinkedService. - /// Type of linked service. - /// The integration runtime reference. - /// Linked service description. - /// Parameters for linked service. - /// List of tags that can be used for describing the linked service. - /// Additional Properties. - /// An ODBC connection string. Type: string, SecureString or AzureKeyVaultSecretReference. - /// The Azure key vault secret reference of password in connection string. - /// The encrypted credential used for authentication. Credentials are encrypted using the integration runtime credential manager. Type: string. - internal NetezzaLinkedService(string linkedServiceType, IntegrationRuntimeReference connectVia, string description, IDictionary parameters, IList annotations, IDictionary> additionalProperties, DataFactoryElement connectionString, DataFactoryKeyVaultSecretReference password, string encryptedCredential) : base(linkedServiceType, connectVia, description, parameters, annotations, additionalProperties) - { - ConnectionString = connectionString; - Password = password; - EncryptedCredential = encryptedCredential; - LinkedServiceType = linkedServiceType ?? "Netezza"; - } - - /// An ODBC connection string. Type: string, SecureString or AzureKeyVaultSecretReference. - public DataFactoryElement ConnectionString { get; set; } - /// The Azure key vault secret reference of password in connection string. - public DataFactoryKeyVaultSecretReference Password { get; set; } - /// The encrypted credential used for authentication. Credentials are encrypted using the integration runtime credential manager. Type: string. - public string EncryptedCredential { get; set; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/NetezzaPartitionSettings.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/NetezzaPartitionSettings.Serialization.cs deleted file mode 100644 index 00a4ddbf..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/NetezzaPartitionSettings.Serialization.cs +++ /dev/null @@ -1,76 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class NetezzaPartitionSettings : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - if (Optional.IsDefined(PartitionColumnName)) - { - writer.WritePropertyName("partitionColumnName"u8); - JsonSerializer.Serialize(writer, PartitionColumnName); - } - if (Optional.IsDefined(PartitionUpperBound)) - { - writer.WritePropertyName("partitionUpperBound"u8); - JsonSerializer.Serialize(writer, PartitionUpperBound); - } - if (Optional.IsDefined(PartitionLowerBound)) - { - writer.WritePropertyName("partitionLowerBound"u8); - JsonSerializer.Serialize(writer, PartitionLowerBound); - } - writer.WriteEndObject(); - } - - internal static NetezzaPartitionSettings DeserializeNetezzaPartitionSettings(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - Optional> partitionColumnName = default; - Optional> partitionUpperBound = default; - Optional> partitionLowerBound = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("partitionColumnName"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - partitionColumnName = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("partitionUpperBound"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - partitionUpperBound = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("partitionLowerBound"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - partitionLowerBound = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - } - return new NetezzaPartitionSettings(partitionColumnName.Value, partitionUpperBound.Value, partitionLowerBound.Value); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/NetezzaPartitionSettings.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/NetezzaPartitionSettings.cs deleted file mode 100644 index 39d9e5bd..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/NetezzaPartitionSettings.cs +++ /dev/null @@ -1,35 +0,0 @@ -// - -#nullable disable - -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// The settings that will be leveraged for Netezza source partitioning. - public partial class NetezzaPartitionSettings - { - /// Initializes a new instance of NetezzaPartitionSettings. - public NetezzaPartitionSettings() - { - } - - /// Initializes a new instance of NetezzaPartitionSettings. - /// The name of the column in integer type that will be used for proceeding range partitioning. Type: string (or Expression with resultType string). - /// The maximum value of column specified in partitionColumnName that will be used for proceeding range partitioning. Type: string (or Expression with resultType string). - /// The minimum value of column specified in partitionColumnName that will be used for proceeding range partitioning. Type: string (or Expression with resultType string). - internal NetezzaPartitionSettings(DataFactoryElement partitionColumnName, DataFactoryElement partitionUpperBound, DataFactoryElement partitionLowerBound) - { - PartitionColumnName = partitionColumnName; - PartitionUpperBound = partitionUpperBound; - PartitionLowerBound = partitionLowerBound; - } - - /// The name of the column in integer type that will be used for proceeding range partitioning. Type: string (or Expression with resultType string). - public DataFactoryElement PartitionColumnName { get; set; } - /// The maximum value of column specified in partitionColumnName that will be used for proceeding range partitioning. Type: string (or Expression with resultType string). - public DataFactoryElement PartitionUpperBound { get; set; } - /// The minimum value of column specified in partitionColumnName that will be used for proceeding range partitioning. Type: string (or Expression with resultType string). - public DataFactoryElement PartitionLowerBound { get; set; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/NetezzaSource.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/NetezzaSource.Serialization.cs deleted file mode 100644 index 1b541280..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/NetezzaSource.Serialization.cs +++ /dev/null @@ -1,195 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class NetezzaSource : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - if (Optional.IsDefined(Query)) - { - writer.WritePropertyName("query"u8); - JsonSerializer.Serialize(writer, Query); - } - if (Optional.IsDefined(PartitionOption)) - { - writer.WritePropertyName("partitionOption"u8); -#if NET6_0_OR_GREATER - writer.WriteRawValue(PartitionOption); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(PartitionOption.ToString()).RootElement); -#endif - } - if (Optional.IsDefined(PartitionSettings)) - { - writer.WritePropertyName("partitionSettings"u8); - writer.WriteObjectValue(PartitionSettings); - } - if (Optional.IsDefined(QueryTimeout)) - { - writer.WritePropertyName("queryTimeout"u8); - JsonSerializer.Serialize(writer, QueryTimeout); - } - if (Optional.IsDefined(AdditionalColumns)) - { - writer.WritePropertyName("additionalColumns"u8); -#if NET6_0_OR_GREATER - writer.WriteRawValue(AdditionalColumns); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(AdditionalColumns.ToString()).RootElement); -#endif - } - writer.WritePropertyName("type"u8); - writer.WriteStringValue(CopySourceType); - if (Optional.IsDefined(SourceRetryCount)) - { - writer.WritePropertyName("sourceRetryCount"u8); - JsonSerializer.Serialize(writer, SourceRetryCount); - } - if (Optional.IsDefined(SourceRetryWait)) - { - writer.WritePropertyName("sourceRetryWait"u8); - JsonSerializer.Serialize(writer, SourceRetryWait); - } - if (Optional.IsDefined(MaxConcurrentConnections)) - { - writer.WritePropertyName("maxConcurrentConnections"u8); - JsonSerializer.Serialize(writer, MaxConcurrentConnections); - } - if (Optional.IsDefined(DisableMetricsCollection)) - { - writer.WritePropertyName("disableMetricsCollection"u8); - JsonSerializer.Serialize(writer, DisableMetricsCollection); - } - foreach (var item in AdditionalProperties) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.Value.ToString()).RootElement); -#endif - } - writer.WriteEndObject(); - } - - internal static NetezzaSource DeserializeNetezzaSource(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - Optional> query = default; - Optional partitionOption = default; - Optional partitionSettings = default; - Optional> queryTimeout = default; - Optional additionalColumns = default; - string type = default; - Optional> sourceRetryCount = default; - Optional> sourceRetryWait = default; - Optional> maxConcurrentConnections = default; - Optional> disableMetricsCollection = default; - IDictionary> additionalProperties = default; - Dictionary> additionalPropertiesDictionary = new Dictionary>(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("query"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - query = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("partitionOption"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - partitionOption = BinaryData.FromString(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("partitionSettings"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - partitionSettings = NetezzaPartitionSettings.DeserializeNetezzaPartitionSettings(property.Value); - continue; - } - if (property.NameEquals("queryTimeout"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - queryTimeout = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("additionalColumns"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - additionalColumns = BinaryData.FromString(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("type"u8)) - { - type = property.Value.GetString(); - continue; - } - if (property.NameEquals("sourceRetryCount"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - sourceRetryCount = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("sourceRetryWait"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - sourceRetryWait = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("maxConcurrentConnections"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - maxConcurrentConnections = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("disableMetricsCollection"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - disableMetricsCollection = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - additionalPropertiesDictionary.Add(property.Name, JsonSerializer.Deserialize>(property.Value.GetRawText())); - } - additionalProperties = additionalPropertiesDictionary; - return new NetezzaSource(type, sourceRetryCount.Value, sourceRetryWait.Value, maxConcurrentConnections.Value, disableMetricsCollection.Value, additionalProperties, queryTimeout.Value, additionalColumns.Value, query.Value, partitionOption.Value, partitionSettings.Value); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/NetezzaSource.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/NetezzaSource.cs deleted file mode 100644 index 80b5e3c2..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/NetezzaSource.cs +++ /dev/null @@ -1,74 +0,0 @@ -// - -#nullable disable - -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// A copy activity Netezza source. - public partial class NetezzaSource : TabularSource - { - /// Initializes a new instance of NetezzaSource. - public NetezzaSource() - { - CopySourceType = "NetezzaSource"; - } - - /// Initializes a new instance of NetezzaSource. - /// Copy source type. - /// Source retry count. Type: integer (or Expression with resultType integer). - /// Source retry wait. Type: string (or Expression with resultType string), pattern: ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). - /// The maximum concurrent connection count for the source data store. Type: integer (or Expression with resultType integer). - /// If true, disable data store metrics collection. Default is false. Type: boolean (or Expression with resultType boolean). - /// Additional Properties. - /// 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). - /// A query to retrieve data from source. Type: string (or Expression with resultType string). - /// The partition mechanism that will be used for Netezza read in parallel. Possible values include: "None", "DataSlice", "DynamicRange". - /// The settings that will be leveraged for Netezza source partitioning. - internal NetezzaSource(string copySourceType, DataFactoryElement sourceRetryCount, DataFactoryElement sourceRetryWait, DataFactoryElement maxConcurrentConnections, DataFactoryElement disableMetricsCollection, IDictionary> additionalProperties, DataFactoryElement queryTimeout, BinaryData additionalColumns, DataFactoryElement query, BinaryData partitionOption, NetezzaPartitionSettings partitionSettings) : base(copySourceType, sourceRetryCount, sourceRetryWait, maxConcurrentConnections, disableMetricsCollection, additionalProperties, queryTimeout, additionalColumns) - { - Query = query; - PartitionOption = partitionOption; - PartitionSettings = partitionSettings; - CopySourceType = copySourceType ?? "NetezzaSource"; - } - - /// A query to retrieve data from source. Type: string (or Expression with resultType string). - public DataFactoryElement Query { get; set; } - /// - /// The partition mechanism that will be used for Netezza read in parallel. Possible values include: "None", "DataSlice", "DynamicRange". - /// - /// To assign an object to this property use . - /// - /// - /// To assign an already formated json string to this property use . - /// - /// - /// Examples: - /// - /// - /// BinaryData.FromObjectAsJson("foo") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromString("\"foo\"") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromObjectAsJson(new { key = "value" }) - /// Creates a payload of { "key": "value" }. - /// - /// - /// BinaryData.FromString("{\"key\": \"value\"}") - /// Creates a payload of { "key": "value" }. - /// - /// - /// - /// - public BinaryData PartitionOption { get; set; } - /// The settings that will be leveraged for Netezza source partitioning. - public NetezzaPartitionSettings PartitionSettings { get; set; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/NetezzaTableDataset.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/NetezzaTableDataset.Serialization.cs deleted file mode 100644 index 9ffcfffb..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/NetezzaTableDataset.Serialization.cs +++ /dev/null @@ -1,246 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class NetezzaTableDataset : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - writer.WritePropertyName("type"u8); - writer.WriteStringValue(DatasetType); - if (Optional.IsDefined(Description)) - { - writer.WritePropertyName("description"u8); - writer.WriteStringValue(Description); - } - if (Optional.IsDefined(Structure)) - { - writer.WritePropertyName("structure"u8); - JsonSerializer.Serialize(writer, Structure); - } - if (Optional.IsDefined(Schema)) - { - writer.WritePropertyName("schema"u8); - JsonSerializer.Serialize(writer, Schema); - } - writer.WritePropertyName("linkedServiceName"u8); - JsonSerializer.Serialize(writer, LinkedServiceName); if (Optional.IsCollectionDefined(Parameters)) - { - writer.WritePropertyName("parameters"u8); - writer.WriteStartObject(); - foreach (var item in Parameters) - { - writer.WritePropertyName(item.Key); - writer.WriteObjectValue(item.Value); - } - writer.WriteEndObject(); - } - if (Optional.IsCollectionDefined(Annotations)) - { - writer.WritePropertyName("annotations"u8); - writer.WriteStartArray(); - foreach (var item in Annotations) - { - if (item == null) - { - writer.WriteNullValue(); - continue; - } -#if NET6_0_OR_GREATER - writer.WriteRawValue(item); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.ToString()).RootElement); -#endif - } - writer.WriteEndArray(); - } - if (Optional.IsDefined(Folder)) - { - writer.WritePropertyName("folder"u8); - writer.WriteObjectValue(Folder); - } - writer.WritePropertyName("typeProperties"u8); - writer.WriteStartObject(); - if (Optional.IsDefined(TableName)) - { - writer.WritePropertyName("tableName"u8); -#if NET6_0_OR_GREATER - writer.WriteRawValue(TableName); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(TableName.ToString()).RootElement); -#endif - } - if (Optional.IsDefined(Table)) - { - writer.WritePropertyName("table"u8); - JsonSerializer.Serialize(writer, Table); - } - if (Optional.IsDefined(SchemaTypePropertiesSchema)) - { - writer.WritePropertyName("schema"u8); - JsonSerializer.Serialize(writer, SchemaTypePropertiesSchema); - } - writer.WriteEndObject(); - foreach (var item in AdditionalProperties) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.Value.ToString()).RootElement); -#endif - } - writer.WriteEndObject(); - } - - internal static NetezzaTableDataset DeserializeNetezzaTableDataset(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - string type = default; - Optional description = default; - Optional>> structure = default; - Optional>> schema = default; - DataFactoryLinkedServiceReference linkedServiceName = default; - Optional> parameters = default; - Optional> annotations = default; - Optional folder = default; - Optional tableName = default; - Optional> table = default; - Optional> schema0 = default; - IDictionary> additionalProperties = default; - Dictionary> additionalPropertiesDictionary = new Dictionary>(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("type"u8)) - { - type = property.Value.GetString(); - continue; - } - if (property.NameEquals("description"u8)) - { - description = property.Value.GetString(); - continue; - } - if (property.NameEquals("structure"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - structure = JsonSerializer.Deserialize>>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("schema"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - schema = JsonSerializer.Deserialize>>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("linkedServiceName"u8)) - { - linkedServiceName = JsonSerializer.Deserialize(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("parameters"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - Dictionary dictionary = new Dictionary(); - foreach (var property0 in property.Value.EnumerateObject()) - { - dictionary.Add(property0.Name, EntityParameterSpecification.DeserializeEntityParameterSpecification(property0.Value)); - } - parameters = dictionary; - continue; - } - if (property.NameEquals("annotations"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - if (item.ValueKind == JsonValueKind.Null) - { - array.Add(null); - } - else - { - array.Add(BinaryData.FromString(item.GetRawText())); - } - } - annotations = array; - continue; - } - if (property.NameEquals("folder"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - folder = DatasetFolder.DeserializeDatasetFolder(property.Value); - continue; - } - if (property.NameEquals("typeProperties"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - foreach (var property0 in property.Value.EnumerateObject()) - { - if (property0.NameEquals("tableName"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - tableName = BinaryData.FromString(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("table"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - table = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("schema"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - schema0 = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - } - continue; - } - additionalPropertiesDictionary.Add(property.Name, JsonSerializer.Deserialize>(property.Value.GetRawText())); - } - additionalProperties = additionalPropertiesDictionary; - return new NetezzaTableDataset(type, description.Value, structure.Value, schema.Value, linkedServiceName, Optional.ToDictionary(parameters), Optional.ToList(annotations), folder.Value, additionalProperties, tableName.Value, table.Value, schema0.Value); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/NetezzaTableDataset.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/NetezzaTableDataset.cs deleted file mode 100644 index c9278311..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/NetezzaTableDataset.cs +++ /dev/null @@ -1,80 +0,0 @@ -// - -#nullable disable - -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// Netezza dataset. - public partial class NetezzaTableDataset : DataFactoryDatasetProperties - { - /// Initializes a new instance of NetezzaTableDataset. - /// Linked service reference. - /// is null. - public NetezzaTableDataset(DataFactoryLinkedServiceReference linkedServiceName) : base(linkedServiceName) - { - Argument.AssertNotNull(linkedServiceName, nameof(linkedServiceName)); - - DatasetType = "NetezzaTable"; - } - - /// Initializes a new instance of NetezzaTableDataset. - /// Type of dataset. - /// Dataset description. - /// Columns that define the structure of the dataset. Type: array (or Expression with resultType array), itemType: DatasetDataElement. - /// Columns that define the physical type schema of the dataset. Type: array (or Expression with resultType array), itemType: DatasetSchemaDataElement. - /// Linked service reference. - /// Parameters for dataset. - /// List of tags that can be used for describing the Dataset. - /// The folder that this Dataset is in. If not specified, Dataset will appear at the root level. - /// Additional Properties. - /// This property will be retired. Please consider using schema + table properties instead. - /// The table name of the Netezza. Type: string (or Expression with resultType string). - /// The schema name of the Netezza. Type: string (or Expression with resultType string). - internal NetezzaTableDataset(string datasetType, string description, DataFactoryElement> structure, DataFactoryElement> schema, DataFactoryLinkedServiceReference linkedServiceName, IDictionary parameters, IList annotations, DatasetFolder folder, IDictionary> additionalProperties, BinaryData tableName, DataFactoryElement table, DataFactoryElement schemaTypePropertiesSchema) : base(datasetType, description, structure, schema, linkedServiceName, parameters, annotations, folder, additionalProperties) - { - TableName = tableName; - Table = table; - SchemaTypePropertiesSchema = schemaTypePropertiesSchema; - DatasetType = datasetType ?? "NetezzaTable"; - } - - /// - /// This property will be retired. Please consider using schema + table properties instead. - /// - /// To assign an object to this property use . - /// - /// - /// To assign an already formated json string to this property use . - /// - /// - /// Examples: - /// - /// - /// BinaryData.FromObjectAsJson("foo") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromString("\"foo\"") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromObjectAsJson(new { key = "value" }) - /// Creates a payload of { "key": "value" }. - /// - /// - /// BinaryData.FromString("{\"key\": \"value\"}") - /// Creates a payload of { "key": "value" }. - /// - /// - /// - /// - public BinaryData TableName { get; set; } - /// The table name of the Netezza. Type: string (or Expression with resultType string). - public DataFactoryElement Table { get; set; } - /// The schema name of the Netezza. Type: string (or Expression with resultType string). - public DataFactoryElement SchemaTypePropertiesSchema { get; set; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/NotebookParameter.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/NotebookParameter.Serialization.cs deleted file mode 100644 index 74c4f28d..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/NotebookParameter.Serialization.cs +++ /dev/null @@ -1,69 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class NotebookParameter : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - if (Optional.IsDefined(Value)) - { - if (Value != null) - { - writer.WritePropertyName("value"u8); - JsonSerializer.Serialize(writer, Value); - } - else - { - writer.WriteNull("value"); - } - } - if (Optional.IsDefined(ParameterType)) - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ParameterType.Value.ToString()); - } - writer.WriteEndObject(); - } - - internal static NotebookParameter DeserializeNotebookParameter(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - Optional> value = default; - Optional type = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("value"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - value = null; - continue; - } - value = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("type"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - type = new NotebookParameterType(property.Value.GetString()); - continue; - } - } - return new NotebookParameter(value.Value, Optional.ToNullable(type)); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/NotebookParameter.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/NotebookParameter.cs deleted file mode 100644 index 1ae3b2ca..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/NotebookParameter.cs +++ /dev/null @@ -1,31 +0,0 @@ -// - -#nullable disable - -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// Notebook parameter. - public partial class NotebookParameter - { - /// Initializes a new instance of NotebookParameter. - public NotebookParameter() - { - } - - /// Initializes a new instance of NotebookParameter. - /// Notebook parameter value. Type: string (or Expression with resultType string). - /// Notebook parameter type. - internal NotebookParameter(DataFactoryElement value, NotebookParameterType? parameterType) - { - Value = value; - ParameterType = parameterType; - } - - /// Notebook parameter value. Type: string (or Expression with resultType string). - public DataFactoryElement Value { get; set; } - /// Notebook parameter type. - public NotebookParameterType? ParameterType { get; set; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/NotebookParameterType.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/NotebookParameterType.cs deleted file mode 100644 index 17b10e14..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/NotebookParameterType.cs +++ /dev/null @@ -1,53 +0,0 @@ -// - -#nullable disable - -using System.ComponentModel; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// Notebook parameter type. - public readonly partial struct NotebookParameterType : IEquatable - { - private readonly string _value; - - /// Initializes a new instance of . - /// is null. - public NotebookParameterType(string value) - { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } - - private const string StringValue = "string"; - private const string IntValue = "int"; - private const string FloatValue = "float"; - private const string BoolValue = "bool"; - - /// string. - public static NotebookParameterType String { get; } = new NotebookParameterType(StringValue); - /// int. - public static NotebookParameterType Int { get; } = new NotebookParameterType(IntValue); - /// float. - public static NotebookParameterType Float { get; } = new NotebookParameterType(FloatValue); - /// bool. - public static NotebookParameterType Bool { get; } = new NotebookParameterType(BoolValue); - /// Determines if two values are the same. - public static bool operator ==(NotebookParameterType left, NotebookParameterType right) => left.Equals(right); - /// Determines if two values are not the same. - public static bool operator !=(NotebookParameterType left, NotebookParameterType right) => !left.Equals(right); - /// Converts a string to a . - public static implicit operator NotebookParameterType(string value) => new NotebookParameterType(value); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override bool Equals(object obj) => obj is NotebookParameterType other && Equals(other); - /// - public bool Equals(NotebookParameterType other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override int GetHashCode() => _value?.GetHashCode() ?? 0; - /// - public override string ToString() => _value; - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/NotebookReferenceType.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/NotebookReferenceType.cs deleted file mode 100644 index fdaff79d..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/NotebookReferenceType.cs +++ /dev/null @@ -1,44 +0,0 @@ -// - -#nullable disable - -using System.ComponentModel; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// Synapse notebook reference type. - public readonly partial struct NotebookReferenceType : IEquatable - { - private readonly string _value; - - /// Initializes a new instance of . - /// is null. - public NotebookReferenceType(string value) - { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } - - private const string NotebookReferenceValue = "NotebookReference"; - - /// NotebookReference. - public static NotebookReferenceType NotebookReference { get; } = new NotebookReferenceType(NotebookReferenceValue); - /// Determines if two values are the same. - public static bool operator ==(NotebookReferenceType left, NotebookReferenceType right) => left.Equals(right); - /// Determines if two values are not the same. - public static bool operator !=(NotebookReferenceType left, NotebookReferenceType right) => !left.Equals(right); - /// Converts a string to a . - public static implicit operator NotebookReferenceType(string value) => new NotebookReferenceType(value); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override bool Equals(object obj) => obj is NotebookReferenceType other && Equals(other); - /// - public bool Equals(NotebookReferenceType other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override int GetHashCode() => _value?.GetHashCode() ?? 0; - /// - public override string ToString() => _value; - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/ODataAadServicePrincipalCredentialType.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/ODataAadServicePrincipalCredentialType.cs deleted file mode 100644 index 6b6e58fe..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/ODataAadServicePrincipalCredentialType.cs +++ /dev/null @@ -1,47 +0,0 @@ -// - -#nullable disable - -using System.ComponentModel; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// Specify the credential type (key or cert) is used for service principal. - public readonly partial struct ODataAadServicePrincipalCredentialType : IEquatable - { - private readonly string _value; - - /// Initializes a new instance of . - /// is null. - public ODataAadServicePrincipalCredentialType(string value) - { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } - - private const string ServicePrincipalKeyValue = "ServicePrincipalKey"; - private const string ServicePrincipalCertValue = "ServicePrincipalCert"; - - /// ServicePrincipalKey. - public static ODataAadServicePrincipalCredentialType ServicePrincipalKey { get; } = new ODataAadServicePrincipalCredentialType(ServicePrincipalKeyValue); - /// ServicePrincipalCert. - public static ODataAadServicePrincipalCredentialType ServicePrincipalCert { get; } = new ODataAadServicePrincipalCredentialType(ServicePrincipalCertValue); - /// Determines if two values are the same. - public static bool operator ==(ODataAadServicePrincipalCredentialType left, ODataAadServicePrincipalCredentialType right) => left.Equals(right); - /// Determines if two values are not the same. - public static bool operator !=(ODataAadServicePrincipalCredentialType left, ODataAadServicePrincipalCredentialType right) => !left.Equals(right); - /// Converts a string to a . - public static implicit operator ODataAadServicePrincipalCredentialType(string value) => new ODataAadServicePrincipalCredentialType(value); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override bool Equals(object obj) => obj is ODataAadServicePrincipalCredentialType other && Equals(other); - /// - public bool Equals(ODataAadServicePrincipalCredentialType other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override int GetHashCode() => _value?.GetHashCode() ?? 0; - /// - public override string ToString() => _value; - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/ODataAuthenticationType.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/ODataAuthenticationType.cs deleted file mode 100644 index 6af6820f..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/ODataAuthenticationType.cs +++ /dev/null @@ -1,56 +0,0 @@ -// - -#nullable disable - -using System.ComponentModel; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// Type of authentication used to connect to the OData service. - public readonly partial struct ODataAuthenticationType : IEquatable - { - private readonly string _value; - - /// Initializes a new instance of . - /// is null. - public ODataAuthenticationType(string value) - { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } - - private const string BasicValue = "Basic"; - private const string AnonymousValue = "Anonymous"; - private const string WindowsValue = "Windows"; - private const string AadServicePrincipalValue = "AadServicePrincipal"; - private const string ManagedServiceIdentityValue = "ManagedServiceIdentity"; - - /// Basic. - public static ODataAuthenticationType Basic { get; } = new ODataAuthenticationType(BasicValue); - /// Anonymous. - public static ODataAuthenticationType Anonymous { get; } = new ODataAuthenticationType(AnonymousValue); - /// Windows. - public static ODataAuthenticationType Windows { get; } = new ODataAuthenticationType(WindowsValue); - /// AadServicePrincipal. - public static ODataAuthenticationType AadServicePrincipal { get; } = new ODataAuthenticationType(AadServicePrincipalValue); - /// ManagedServiceIdentity. - public static ODataAuthenticationType ManagedServiceIdentity { get; } = new ODataAuthenticationType(ManagedServiceIdentityValue); - /// Determines if two values are the same. - public static bool operator ==(ODataAuthenticationType left, ODataAuthenticationType right) => left.Equals(right); - /// Determines if two values are not the same. - public static bool operator !=(ODataAuthenticationType left, ODataAuthenticationType right) => !left.Equals(right); - /// Converts a string to a . - public static implicit operator ODataAuthenticationType(string value) => new ODataAuthenticationType(value); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override bool Equals(object obj) => obj is ODataAuthenticationType other && Equals(other); - /// - public bool Equals(ODataAuthenticationType other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override int GetHashCode() => _value?.GetHashCode() ?? 0; - /// - public override string ToString() => _value; - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/ODataLinkedService.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/ODataLinkedService.Serialization.cs deleted file mode 100644 index 237a8f6e..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/ODataLinkedService.Serialization.cs +++ /dev/null @@ -1,359 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class ODataLinkedService : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - writer.WritePropertyName("type"u8); - writer.WriteStringValue(LinkedServiceType); - if (Optional.IsDefined(ConnectVia)) - { - writer.WritePropertyName("connectVia"u8); - writer.WriteObjectValue(ConnectVia); - } - if (Optional.IsDefined(Description)) - { - writer.WritePropertyName("description"u8); - writer.WriteStringValue(Description); - } - if (Optional.IsCollectionDefined(Parameters)) - { - writer.WritePropertyName("parameters"u8); - writer.WriteStartObject(); - foreach (var item in Parameters) - { - writer.WritePropertyName(item.Key); - writer.WriteObjectValue(item.Value); - } - writer.WriteEndObject(); - } - if (Optional.IsCollectionDefined(Annotations)) - { - writer.WritePropertyName("annotations"u8); - writer.WriteStartArray(); - foreach (var item in Annotations) - { - if (item == null) - { - writer.WriteNullValue(); - continue; - } -#if NET6_0_OR_GREATER - writer.WriteRawValue(item); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.ToString()).RootElement); -#endif - } - writer.WriteEndArray(); - } - writer.WritePropertyName("typeProperties"u8); - writer.WriteStartObject(); - writer.WritePropertyName("url"u8); - JsonSerializer.Serialize(writer, Uri); - if (Optional.IsDefined(AuthenticationType)) - { - writer.WritePropertyName("authenticationType"u8); - writer.WriteStringValue(AuthenticationType.Value.ToString()); - } - if (Optional.IsDefined(UserName)) - { - writer.WritePropertyName("userName"u8); - JsonSerializer.Serialize(writer, UserName); - } - if (Optional.IsDefined(Password)) - { - writer.WritePropertyName("password"u8); - JsonSerializer.Serialize(writer, Password); - } - if (Optional.IsDefined(AuthHeaders)) - { - writer.WritePropertyName("authHeaders"u8); - JsonSerializer.Serialize(writer, AuthHeaders); - } - if (Optional.IsDefined(Tenant)) - { - writer.WritePropertyName("tenant"u8); - JsonSerializer.Serialize(writer, Tenant); - } - if (Optional.IsDefined(ServicePrincipalId)) - { - writer.WritePropertyName("servicePrincipalId"u8); - JsonSerializer.Serialize(writer, ServicePrincipalId); - } - if (Optional.IsDefined(AzureCloudType)) - { - writer.WritePropertyName("azureCloudType"u8); - JsonSerializer.Serialize(writer, AzureCloudType); - } - if (Optional.IsDefined(AadResourceId)) - { - writer.WritePropertyName("aadResourceId"u8); - JsonSerializer.Serialize(writer, AadResourceId); - } - if (Optional.IsDefined(AadServicePrincipalCredentialType)) - { - writer.WritePropertyName("aadServicePrincipalCredentialType"u8); - writer.WriteStringValue(AadServicePrincipalCredentialType.Value.ToString()); - } - if (Optional.IsDefined(ServicePrincipalKey)) - { - writer.WritePropertyName("servicePrincipalKey"u8); - JsonSerializer.Serialize(writer, ServicePrincipalKey); - } - if (Optional.IsDefined(ServicePrincipalEmbeddedCert)) - { - writer.WritePropertyName("servicePrincipalEmbeddedCert"u8); - JsonSerializer.Serialize(writer, ServicePrincipalEmbeddedCert); - } - if (Optional.IsDefined(ServicePrincipalEmbeddedCertPassword)) - { - writer.WritePropertyName("servicePrincipalEmbeddedCertPassword"u8); - JsonSerializer.Serialize(writer, ServicePrincipalEmbeddedCertPassword); - } - if (Optional.IsDefined(EncryptedCredential)) - { - writer.WritePropertyName("encryptedCredential"u8); - writer.WriteStringValue(EncryptedCredential); - } - writer.WriteEndObject(); - foreach (var item in AdditionalProperties) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.Value.ToString()).RootElement); -#endif - } - writer.WriteEndObject(); - } - - internal static ODataLinkedService DeserializeODataLinkedService(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - string type = default; - Optional connectVia = default; - Optional description = default; - Optional> parameters = default; - Optional> annotations = default; - DataFactoryElement url = default; - Optional authenticationType = default; - Optional> userName = default; - Optional password = default; - Optional> authHeaders = default; - Optional> tenant = default; - Optional> servicePrincipalId = default; - Optional> azureCloudType = default; - Optional> aadResourceId = default; - Optional aadServicePrincipalCredentialType = default; - Optional servicePrincipalKey = default; - Optional servicePrincipalEmbeddedCert = default; - Optional servicePrincipalEmbeddedCertPassword = default; - Optional encryptedCredential = default; - IDictionary> additionalProperties = default; - Dictionary> additionalPropertiesDictionary = new Dictionary>(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("type"u8)) - { - type = property.Value.GetString(); - continue; - } - if (property.NameEquals("connectVia"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - connectVia = IntegrationRuntimeReference.DeserializeIntegrationRuntimeReference(property.Value); - continue; - } - if (property.NameEquals("description"u8)) - { - description = property.Value.GetString(); - continue; - } - if (property.NameEquals("parameters"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - Dictionary dictionary = new Dictionary(); - foreach (var property0 in property.Value.EnumerateObject()) - { - dictionary.Add(property0.Name, EntityParameterSpecification.DeserializeEntityParameterSpecification(property0.Value)); - } - parameters = dictionary; - continue; - } - if (property.NameEquals("annotations"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - if (item.ValueKind == JsonValueKind.Null) - { - array.Add(null); - } - else - { - array.Add(BinaryData.FromString(item.GetRawText())); - } - } - annotations = array; - continue; - } - if (property.NameEquals("typeProperties"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - foreach (var property0 in property.Value.EnumerateObject()) - { - if (property0.NameEquals("url"u8)) - { - url = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("authenticationType"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - authenticationType = new ODataAuthenticationType(property0.Value.GetString()); - continue; - } - if (property0.NameEquals("userName"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - userName = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("password"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - password = JsonSerializer.Deserialize(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("authHeaders"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - authHeaders = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("tenant"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - tenant = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("servicePrincipalId"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - servicePrincipalId = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("azureCloudType"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - azureCloudType = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("aadResourceId"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - aadResourceId = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("aadServicePrincipalCredentialType"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - aadServicePrincipalCredentialType = new ODataAadServicePrincipalCredentialType(property0.Value.GetString()); - continue; - } - if (property0.NameEquals("servicePrincipalKey"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - servicePrincipalKey = JsonSerializer.Deserialize(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("servicePrincipalEmbeddedCert"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - servicePrincipalEmbeddedCert = JsonSerializer.Deserialize(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("servicePrincipalEmbeddedCertPassword"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - servicePrincipalEmbeddedCertPassword = JsonSerializer.Deserialize(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("encryptedCredential"u8)) - { - encryptedCredential = property0.Value.GetString(); - continue; - } - } - continue; - } - additionalPropertiesDictionary.Add(property.Name, JsonSerializer.Deserialize>(property.Value.GetRawText())); - } - additionalProperties = additionalPropertiesDictionary; - return new ODataLinkedService(type, connectVia.Value, description.Value, Optional.ToDictionary(parameters), Optional.ToList(annotations), additionalProperties, url, Optional.ToNullable(authenticationType), userName.Value, password, authHeaders.Value, tenant.Value, servicePrincipalId.Value, azureCloudType.Value, aadResourceId.Value, Optional.ToNullable(aadServicePrincipalCredentialType), servicePrincipalKey, servicePrincipalEmbeddedCert, servicePrincipalEmbeddedCertPassword, encryptedCredential.Value); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/ODataLinkedService.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/ODataLinkedService.cs deleted file mode 100644 index cb1bae61..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/ODataLinkedService.cs +++ /dev/null @@ -1,93 +0,0 @@ -// - -#nullable disable - -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// Open Data Protocol (OData) linked service. - public partial class ODataLinkedService : DataFactoryLinkedServiceProperties - { - /// Initializes a new instance of ODataLinkedService. - /// The URL of the OData service endpoint. Type: string (or Expression with resultType string). - /// is null. - public ODataLinkedService(DataFactoryElement uri) - { - Argument.AssertNotNull(uri, nameof(uri)); - - Uri = uri; - LinkedServiceType = "OData"; - } - - /// Initializes a new instance of ODataLinkedService. - /// Type of linked service. - /// The integration runtime reference. - /// Linked service description. - /// Parameters for linked service. - /// List of tags that can be used for describing the linked service. - /// Additional Properties. - /// The URL of the OData service endpoint. Type: string (or Expression with resultType string). - /// Type of authentication used to connect to the OData service. - /// User name of the OData service. Type: string (or Expression with resultType string). - /// Password of the OData service. - /// The additional HTTP headers in the request to RESTful API used for authorization. Type: object (or Expression with resultType object). - /// Specify the tenant information (domain name or tenant ID) under which your application resides. Type: string (or Expression with resultType string). - /// Specify the application id of your application registered in Azure Active Directory. Type: string (or Expression with resultType string). - /// Indicates the azure cloud type of the service principle auth. Allowed values are AzurePublic, AzureChina, AzureUsGovernment, AzureGermany. Default value is the data factory regions’ cloud type. Type: string (or Expression with resultType string). - /// Specify the resource you are requesting authorization to use Directory. Type: string (or Expression with resultType string). - /// Specify the credential type (key or cert) is used for service principal. - /// Specify the secret of your application registered in Azure Active Directory. Type: string (or Expression with resultType string). - /// Specify the base64 encoded certificate of your application registered in Azure Active Directory. Type: string (or Expression with resultType string). - /// Specify the password of your certificate if your certificate has a password and you are using AadServicePrincipal authentication. Type: string (or Expression with resultType string). - /// The encrypted credential used for authentication. Credentials are encrypted using the integration runtime credential manager. Type: string. - internal ODataLinkedService(string linkedServiceType, IntegrationRuntimeReference connectVia, string description, IDictionary parameters, IList annotations, IDictionary> additionalProperties, DataFactoryElement uri, ODataAuthenticationType? authenticationType, DataFactoryElement userName, DataFactorySecretBaseDefinition password, DataFactoryElement authHeaders, DataFactoryElement tenant, DataFactoryElement servicePrincipalId, DataFactoryElement azureCloudType, DataFactoryElement aadResourceId, ODataAadServicePrincipalCredentialType? aadServicePrincipalCredentialType, DataFactorySecretBaseDefinition servicePrincipalKey, DataFactorySecretBaseDefinition servicePrincipalEmbeddedCert, DataFactorySecretBaseDefinition servicePrincipalEmbeddedCertPassword, string encryptedCredential) : base(linkedServiceType, connectVia, description, parameters, annotations, additionalProperties) - { - Uri = uri; - AuthenticationType = authenticationType; - UserName = userName; - Password = password; - AuthHeaders = authHeaders; - Tenant = tenant; - ServicePrincipalId = servicePrincipalId; - AzureCloudType = azureCloudType; - AadResourceId = aadResourceId; - AadServicePrincipalCredentialType = aadServicePrincipalCredentialType; - ServicePrincipalKey = servicePrincipalKey; - ServicePrincipalEmbeddedCert = servicePrincipalEmbeddedCert; - ServicePrincipalEmbeddedCertPassword = servicePrincipalEmbeddedCertPassword; - EncryptedCredential = encryptedCredential; - LinkedServiceType = linkedServiceType ?? "OData"; - } - - /// The URL of the OData service endpoint. Type: string (or Expression with resultType string). - public DataFactoryElement Uri { get; set; } - /// Type of authentication used to connect to the OData service. - public ODataAuthenticationType? AuthenticationType { get; set; } - /// User name of the OData service. Type: string (or Expression with resultType string). - public DataFactoryElement UserName { get; set; } - /// Password of the OData service. - public DataFactorySecretBaseDefinition Password { get; set; } - /// The additional HTTP headers in the request to RESTful API used for authorization. Type: object (or Expression with resultType object). - public DataFactoryElement AuthHeaders { get; set; } - /// Specify the tenant information (domain name or tenant ID) under which your application resides. Type: string (or Expression with resultType string). - public DataFactoryElement Tenant { get; set; } - /// Specify the application id of your application registered in Azure Active Directory. Type: string (or Expression with resultType string). - public DataFactoryElement ServicePrincipalId { get; set; } - /// Indicates the azure cloud type of the service principle auth. Allowed values are AzurePublic, AzureChina, AzureUsGovernment, AzureGermany. Default value is the data factory regions’ cloud type. Type: string (or Expression with resultType string). - public DataFactoryElement AzureCloudType { get; set; } - /// Specify the resource you are requesting authorization to use Directory. Type: string (or Expression with resultType string). - public DataFactoryElement AadResourceId { get; set; } - /// Specify the credential type (key or cert) is used for service principal. - public ODataAadServicePrincipalCredentialType? AadServicePrincipalCredentialType { get; set; } - /// Specify the secret of your application registered in Azure Active Directory. Type: string (or Expression with resultType string). - public DataFactorySecretBaseDefinition ServicePrincipalKey { get; set; } - /// Specify the base64 encoded certificate of your application registered in Azure Active Directory. Type: string (or Expression with resultType string). - public DataFactorySecretBaseDefinition ServicePrincipalEmbeddedCert { get; set; } - /// Specify the password of your certificate if your certificate has a password and you are using AadServicePrincipal authentication. Type: string (or Expression with resultType string). - public DataFactorySecretBaseDefinition ServicePrincipalEmbeddedCertPassword { get; set; } - /// The encrypted credential used for authentication. Credentials are encrypted using the integration runtime credential manager. Type: string. - public string EncryptedCredential { get; set; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/ODataResourceDataset.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/ODataResourceDataset.Serialization.cs deleted file mode 100644 index aa5597d4..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/ODataResourceDataset.Serialization.cs +++ /dev/null @@ -1,212 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class ODataResourceDataset : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - writer.WritePropertyName("type"u8); - writer.WriteStringValue(DatasetType); - if (Optional.IsDefined(Description)) - { - writer.WritePropertyName("description"u8); - writer.WriteStringValue(Description); - } - if (Optional.IsDefined(Structure)) - { - writer.WritePropertyName("structure"u8); - JsonSerializer.Serialize(writer, Structure); - } - if (Optional.IsDefined(Schema)) - { - writer.WritePropertyName("schema"u8); - JsonSerializer.Serialize(writer, Schema); - } - writer.WritePropertyName("linkedServiceName"u8); - JsonSerializer.Serialize(writer, LinkedServiceName); if (Optional.IsCollectionDefined(Parameters)) - { - writer.WritePropertyName("parameters"u8); - writer.WriteStartObject(); - foreach (var item in Parameters) - { - writer.WritePropertyName(item.Key); - writer.WriteObjectValue(item.Value); - } - writer.WriteEndObject(); - } - if (Optional.IsCollectionDefined(Annotations)) - { - writer.WritePropertyName("annotations"u8); - writer.WriteStartArray(); - foreach (var item in Annotations) - { - if (item == null) - { - writer.WriteNullValue(); - continue; - } -#if NET6_0_OR_GREATER - writer.WriteRawValue(item); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.ToString()).RootElement); -#endif - } - writer.WriteEndArray(); - } - if (Optional.IsDefined(Folder)) - { - writer.WritePropertyName("folder"u8); - writer.WriteObjectValue(Folder); - } - writer.WritePropertyName("typeProperties"u8); - writer.WriteStartObject(); - if (Optional.IsDefined(Path)) - { - writer.WritePropertyName("path"u8); - JsonSerializer.Serialize(writer, Path); - } - writer.WriteEndObject(); - foreach (var item in AdditionalProperties) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.Value.ToString()).RootElement); -#endif - } - writer.WriteEndObject(); - } - - internal static ODataResourceDataset DeserializeODataResourceDataset(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - string type = default; - Optional description = default; - Optional>> structure = default; - Optional>> schema = default; - DataFactoryLinkedServiceReference linkedServiceName = default; - Optional> parameters = default; - Optional> annotations = default; - Optional folder = default; - Optional> path = default; - IDictionary> additionalProperties = default; - Dictionary> additionalPropertiesDictionary = new Dictionary>(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("type"u8)) - { - type = property.Value.GetString(); - continue; - } - if (property.NameEquals("description"u8)) - { - description = property.Value.GetString(); - continue; - } - if (property.NameEquals("structure"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - structure = JsonSerializer.Deserialize>>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("schema"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - schema = JsonSerializer.Deserialize>>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("linkedServiceName"u8)) - { - linkedServiceName = JsonSerializer.Deserialize(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("parameters"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - Dictionary dictionary = new Dictionary(); - foreach (var property0 in property.Value.EnumerateObject()) - { - dictionary.Add(property0.Name, EntityParameterSpecification.DeserializeEntityParameterSpecification(property0.Value)); - } - parameters = dictionary; - continue; - } - if (property.NameEquals("annotations"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - if (item.ValueKind == JsonValueKind.Null) - { - array.Add(null); - } - else - { - array.Add(BinaryData.FromString(item.GetRawText())); - } - } - annotations = array; - continue; - } - if (property.NameEquals("folder"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - folder = DatasetFolder.DeserializeDatasetFolder(property.Value); - continue; - } - if (property.NameEquals("typeProperties"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - foreach (var property0 in property.Value.EnumerateObject()) - { - if (property0.NameEquals("path"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - path = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - } - continue; - } - additionalPropertiesDictionary.Add(property.Name, JsonSerializer.Deserialize>(property.Value.GetRawText())); - } - additionalProperties = additionalPropertiesDictionary; - return new ODataResourceDataset(type, description.Value, structure.Value, schema.Value, linkedServiceName, Optional.ToDictionary(parameters), Optional.ToList(annotations), folder.Value, additionalProperties, path.Value); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/ODataResourceDataset.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/ODataResourceDataset.cs deleted file mode 100644 index 533c27fb..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/ODataResourceDataset.cs +++ /dev/null @@ -1,43 +0,0 @@ -// - -#nullable disable - -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// The Open Data Protocol (OData) resource dataset. - public partial class ODataResourceDataset : DataFactoryDatasetProperties - { - /// Initializes a new instance of ODataResourceDataset. - /// Linked service reference. - /// is null. - public ODataResourceDataset(DataFactoryLinkedServiceReference linkedServiceName) : base(linkedServiceName) - { - Argument.AssertNotNull(linkedServiceName, nameof(linkedServiceName)); - - DatasetType = "ODataResource"; - } - - /// Initializes a new instance of ODataResourceDataset. - /// Type of dataset. - /// Dataset description. - /// Columns that define the structure of the dataset. Type: array (or Expression with resultType array), itemType: DatasetDataElement. - /// Columns that define the physical type schema of the dataset. Type: array (or Expression with resultType array), itemType: DatasetSchemaDataElement. - /// Linked service reference. - /// Parameters for dataset. - /// List of tags that can be used for describing the Dataset. - /// The folder that this Dataset is in. If not specified, Dataset will appear at the root level. - /// Additional Properties. - /// The OData resource path. Type: string (or Expression with resultType string). - internal ODataResourceDataset(string datasetType, string description, DataFactoryElement> structure, DataFactoryElement> schema, DataFactoryLinkedServiceReference linkedServiceName, IDictionary parameters, IList annotations, DatasetFolder folder, IDictionary> additionalProperties, DataFactoryElement path) : base(datasetType, description, structure, schema, linkedServiceName, parameters, annotations, folder, additionalProperties) - { - Path = path; - DatasetType = datasetType ?? "ODataResource"; - } - - /// The OData resource path. Type: string (or Expression with resultType string). - public DataFactoryElement Path { get; set; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/ODataSource.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/ODataSource.Serialization.cs deleted file mode 100644 index 354a2be3..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/ODataSource.Serialization.cs +++ /dev/null @@ -1,161 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class ODataSource : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - if (Optional.IsDefined(Query)) - { - writer.WritePropertyName("query"u8); - JsonSerializer.Serialize(writer, Query); - } - if (Optional.IsDefined(HttpRequestTimeout)) - { - writer.WritePropertyName("httpRequestTimeout"u8); - JsonSerializer.Serialize(writer, HttpRequestTimeout); - } - if (Optional.IsDefined(AdditionalColumns)) - { - writer.WritePropertyName("additionalColumns"u8); -#if NET6_0_OR_GREATER - writer.WriteRawValue(AdditionalColumns); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(AdditionalColumns.ToString()).RootElement); -#endif - } - writer.WritePropertyName("type"u8); - writer.WriteStringValue(CopySourceType); - if (Optional.IsDefined(SourceRetryCount)) - { - writer.WritePropertyName("sourceRetryCount"u8); - JsonSerializer.Serialize(writer, SourceRetryCount); - } - if (Optional.IsDefined(SourceRetryWait)) - { - writer.WritePropertyName("sourceRetryWait"u8); - JsonSerializer.Serialize(writer, SourceRetryWait); - } - if (Optional.IsDefined(MaxConcurrentConnections)) - { - writer.WritePropertyName("maxConcurrentConnections"u8); - JsonSerializer.Serialize(writer, MaxConcurrentConnections); - } - if (Optional.IsDefined(DisableMetricsCollection)) - { - writer.WritePropertyName("disableMetricsCollection"u8); - JsonSerializer.Serialize(writer, DisableMetricsCollection); - } - foreach (var item in AdditionalProperties) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.Value.ToString()).RootElement); -#endif - } - writer.WriteEndObject(); - } - - internal static ODataSource DeserializeODataSource(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - Optional> query = default; - Optional> httpRequestTimeout = default; - Optional additionalColumns = default; - string type = default; - Optional> sourceRetryCount = default; - Optional> sourceRetryWait = default; - Optional> maxConcurrentConnections = default; - Optional> disableMetricsCollection = default; - IDictionary> additionalProperties = default; - Dictionary> additionalPropertiesDictionary = new Dictionary>(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("query"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - query = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("httpRequestTimeout"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - httpRequestTimeout = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("additionalColumns"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - additionalColumns = BinaryData.FromString(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("type"u8)) - { - type = property.Value.GetString(); - continue; - } - if (property.NameEquals("sourceRetryCount"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - sourceRetryCount = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("sourceRetryWait"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - sourceRetryWait = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("maxConcurrentConnections"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - maxConcurrentConnections = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("disableMetricsCollection"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - disableMetricsCollection = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - additionalPropertiesDictionary.Add(property.Name, JsonSerializer.Deserialize>(property.Value.GetRawText())); - } - additionalProperties = additionalPropertiesDictionary; - return new ODataSource(type, sourceRetryCount.Value, sourceRetryWait.Value, maxConcurrentConnections.Value, disableMetricsCollection.Value, additionalProperties, query.Value, httpRequestTimeout.Value, additionalColumns.Value); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/ODataSource.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/ODataSource.cs deleted file mode 100644 index ff7aa8f3..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/ODataSource.cs +++ /dev/null @@ -1,72 +0,0 @@ -// - -#nullable disable - -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// A copy activity source for OData source. - public partial class ODataSource : CopyActivitySource - { - /// Initializes a new instance of ODataSource. - public ODataSource() - { - CopySourceType = "ODataSource"; - } - - /// Initializes a new instance of ODataSource. - /// Copy source type. - /// Source retry count. Type: integer (or Expression with resultType integer). - /// Source retry wait. Type: string (or Expression with resultType string), pattern: ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). - /// The maximum concurrent connection count for the source data store. Type: integer (or Expression with resultType integer). - /// If true, disable data store metrics collection. Default is false. Type: boolean (or Expression with resultType boolean). - /// Additional Properties. - /// OData query. For example, "$top=1". Type: string (or Expression with resultType string). - /// The timeout (TimeSpan) to get an HTTP response. It is the timeout to get a response, not the timeout to read response data. Default value: 00:05:00. 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). - internal ODataSource(string copySourceType, DataFactoryElement sourceRetryCount, DataFactoryElement sourceRetryWait, DataFactoryElement maxConcurrentConnections, DataFactoryElement disableMetricsCollection, IDictionary> additionalProperties, DataFactoryElement query, DataFactoryElement httpRequestTimeout, BinaryData additionalColumns) : base(copySourceType, sourceRetryCount, sourceRetryWait, maxConcurrentConnections, disableMetricsCollection, additionalProperties) - { - Query = query; - HttpRequestTimeout = httpRequestTimeout; - AdditionalColumns = additionalColumns; - CopySourceType = copySourceType ?? "ODataSource"; - } - - /// OData query. For example, "$top=1". Type: string (or Expression with resultType string). - public DataFactoryElement Query { get; set; } - /// The timeout (TimeSpan) to get an HTTP response. It is the timeout to get a response, not the timeout to read response data. Default value: 00:05:00. Type: string (or Expression with resultType string), pattern: ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). - public DataFactoryElement HttpRequestTimeout { get; set; } - /// - /// Specifies the additional columns to be added to source data. Type: array of objects(AdditionalColumns) (or Expression with resultType array of objects). - /// - /// To assign an object to this property use . - /// - /// - /// To assign an already formated json string to this property use . - /// - /// - /// Examples: - /// - /// - /// BinaryData.FromObjectAsJson("foo") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromString("\"foo\"") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromObjectAsJson(new { key = "value" }) - /// Creates a payload of { "key": "value" }. - /// - /// - /// BinaryData.FromString("{\"key\": \"value\"}") - /// Creates a payload of { "key": "value" }. - /// - /// - /// - /// - public BinaryData AdditionalColumns { get; set; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/OdbcLinkedService.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/OdbcLinkedService.Serialization.cs deleted file mode 100644 index ed640130..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/OdbcLinkedService.Serialization.cs +++ /dev/null @@ -1,239 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class OdbcLinkedService : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - writer.WritePropertyName("type"u8); - writer.WriteStringValue(LinkedServiceType); - if (Optional.IsDefined(ConnectVia)) - { - writer.WritePropertyName("connectVia"u8); - writer.WriteObjectValue(ConnectVia); - } - if (Optional.IsDefined(Description)) - { - writer.WritePropertyName("description"u8); - writer.WriteStringValue(Description); - } - if (Optional.IsCollectionDefined(Parameters)) - { - writer.WritePropertyName("parameters"u8); - writer.WriteStartObject(); - foreach (var item in Parameters) - { - writer.WritePropertyName(item.Key); - writer.WriteObjectValue(item.Value); - } - writer.WriteEndObject(); - } - if (Optional.IsCollectionDefined(Annotations)) - { - writer.WritePropertyName("annotations"u8); - writer.WriteStartArray(); - foreach (var item in Annotations) - { - if (item == null) - { - writer.WriteNullValue(); - continue; - } -#if NET6_0_OR_GREATER - writer.WriteRawValue(item); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.ToString()).RootElement); -#endif - } - writer.WriteEndArray(); - } - writer.WritePropertyName("typeProperties"u8); - writer.WriteStartObject(); - writer.WritePropertyName("connectionString"u8); - JsonSerializer.Serialize(writer, ConnectionString); - if (Optional.IsDefined(AuthenticationType)) - { - writer.WritePropertyName("authenticationType"u8); - JsonSerializer.Serialize(writer, AuthenticationType); - } - if (Optional.IsDefined(Credential)) - { - writer.WritePropertyName("credential"u8); - JsonSerializer.Serialize(writer, Credential); - } - if (Optional.IsDefined(UserName)) - { - writer.WritePropertyName("userName"u8); - JsonSerializer.Serialize(writer, UserName); - } - if (Optional.IsDefined(Password)) - { - writer.WritePropertyName("password"u8); - JsonSerializer.Serialize(writer, Password); - } - if (Optional.IsDefined(EncryptedCredential)) - { - writer.WritePropertyName("encryptedCredential"u8); - writer.WriteStringValue(EncryptedCredential); - } - writer.WriteEndObject(); - foreach (var item in AdditionalProperties) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.Value.ToString()).RootElement); -#endif - } - writer.WriteEndObject(); - } - - internal static OdbcLinkedService DeserializeOdbcLinkedService(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - string type = default; - Optional connectVia = default; - Optional description = default; - Optional> parameters = default; - Optional> annotations = default; - DataFactoryElement connectionString = default; - Optional> authenticationType = default; - Optional credential = default; - Optional> userName = default; - Optional password = default; - Optional encryptedCredential = default; - IDictionary> additionalProperties = default; - Dictionary> additionalPropertiesDictionary = new Dictionary>(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("type"u8)) - { - type = property.Value.GetString(); - continue; - } - if (property.NameEquals("connectVia"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - connectVia = IntegrationRuntimeReference.DeserializeIntegrationRuntimeReference(property.Value); - continue; - } - if (property.NameEquals("description"u8)) - { - description = property.Value.GetString(); - continue; - } - if (property.NameEquals("parameters"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - Dictionary dictionary = new Dictionary(); - foreach (var property0 in property.Value.EnumerateObject()) - { - dictionary.Add(property0.Name, EntityParameterSpecification.DeserializeEntityParameterSpecification(property0.Value)); - } - parameters = dictionary; - continue; - } - if (property.NameEquals("annotations"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - if (item.ValueKind == JsonValueKind.Null) - { - array.Add(null); - } - else - { - array.Add(BinaryData.FromString(item.GetRawText())); - } - } - annotations = array; - continue; - } - if (property.NameEquals("typeProperties"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - foreach (var property0 in property.Value.EnumerateObject()) - { - if (property0.NameEquals("connectionString"u8)) - { - connectionString = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("authenticationType"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - authenticationType = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("credential"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - credential = JsonSerializer.Deserialize(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("userName"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - userName = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("password"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - password = JsonSerializer.Deserialize(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("encryptedCredential"u8)) - { - encryptedCredential = property0.Value.GetString(); - continue; - } - } - continue; - } - additionalPropertiesDictionary.Add(property.Name, JsonSerializer.Deserialize>(property.Value.GetRawText())); - } - additionalProperties = additionalPropertiesDictionary; - return new OdbcLinkedService(type, connectVia.Value, description.Value, Optional.ToDictionary(parameters), Optional.ToList(annotations), additionalProperties, connectionString, authenticationType.Value, credential, userName.Value, password, encryptedCredential.Value); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/OdbcLinkedService.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/OdbcLinkedService.cs deleted file mode 100644 index 670b6c8f..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/OdbcLinkedService.cs +++ /dev/null @@ -1,61 +0,0 @@ -// - -#nullable disable - -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// Open Database Connectivity (ODBC) linked service. - public partial class OdbcLinkedService : DataFactoryLinkedServiceProperties - { - /// Initializes a new instance of OdbcLinkedService. - /// The non-access credential portion of the connection string as well as an optional encrypted credential. Type: string, or SecureString, or AzureKeyVaultSecretReference, or Expression with resultType string. - /// is null. - public OdbcLinkedService(DataFactoryElement connectionString) - { - Argument.AssertNotNull(connectionString, nameof(connectionString)); - - ConnectionString = connectionString; - LinkedServiceType = "Odbc"; - } - - /// Initializes a new instance of OdbcLinkedService. - /// Type of linked service. - /// The integration runtime reference. - /// Linked service description. - /// Parameters for linked service. - /// List of tags that can be used for describing the linked service. - /// Additional Properties. - /// The non-access credential portion of the connection string as well as an optional encrypted credential. Type: string, or SecureString, or AzureKeyVaultSecretReference, or Expression with resultType string. - /// Type of authentication used to connect to the ODBC data store. Possible values are: Anonymous and Basic. Type: string (or Expression with resultType string). - /// The access credential portion of the connection string specified in driver-specific property-value format. - /// User name for Basic authentication. Type: string (or Expression with resultType string). - /// Password for Basic authentication. - /// The encrypted credential used for authentication. Credentials are encrypted using the integration runtime credential manager. Type: string. - internal OdbcLinkedService(string linkedServiceType, IntegrationRuntimeReference connectVia, string description, IDictionary parameters, IList annotations, IDictionary> additionalProperties, DataFactoryElement connectionString, DataFactoryElement authenticationType, DataFactorySecretBaseDefinition credential, DataFactoryElement userName, DataFactorySecretBaseDefinition password, string encryptedCredential) : base(linkedServiceType, connectVia, description, parameters, annotations, additionalProperties) - { - ConnectionString = connectionString; - AuthenticationType = authenticationType; - Credential = credential; - UserName = userName; - Password = password; - EncryptedCredential = encryptedCredential; - LinkedServiceType = linkedServiceType ?? "Odbc"; - } - - /// The non-access credential portion of the connection string as well as an optional encrypted credential. Type: string, or SecureString, or AzureKeyVaultSecretReference, or Expression with resultType string. - public DataFactoryElement ConnectionString { get; set; } - /// Type of authentication used to connect to the ODBC data store. Possible values are: Anonymous and Basic. Type: string (or Expression with resultType string). - public DataFactoryElement AuthenticationType { get; set; } - /// The access credential portion of the connection string specified in driver-specific property-value format. - public DataFactorySecretBaseDefinition Credential { get; set; } - /// User name for Basic authentication. Type: string (or Expression with resultType string). - public DataFactoryElement UserName { get; set; } - /// Password for Basic authentication. - public DataFactorySecretBaseDefinition Password { get; set; } - /// The encrypted credential used for authentication. Credentials are encrypted using the integration runtime credential manager. Type: string. - public string EncryptedCredential { get; set; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/OdbcSink.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/OdbcSink.Serialization.cs deleted file mode 100644 index a82e5dc4..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/OdbcSink.Serialization.cs +++ /dev/null @@ -1,157 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class OdbcSink : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - if (Optional.IsDefined(PreCopyScript)) - { - writer.WritePropertyName("preCopyScript"u8); - JsonSerializer.Serialize(writer, PreCopyScript); - } - writer.WritePropertyName("type"u8); - writer.WriteStringValue(CopySinkType); - if (Optional.IsDefined(WriteBatchSize)) - { - writer.WritePropertyName("writeBatchSize"u8); - JsonSerializer.Serialize(writer, WriteBatchSize); - } - if (Optional.IsDefined(WriteBatchTimeout)) - { - writer.WritePropertyName("writeBatchTimeout"u8); - JsonSerializer.Serialize(writer, WriteBatchTimeout); - } - if (Optional.IsDefined(SinkRetryCount)) - { - writer.WritePropertyName("sinkRetryCount"u8); - JsonSerializer.Serialize(writer, SinkRetryCount); - } - if (Optional.IsDefined(SinkRetryWait)) - { - writer.WritePropertyName("sinkRetryWait"u8); - JsonSerializer.Serialize(writer, SinkRetryWait); - } - if (Optional.IsDefined(MaxConcurrentConnections)) - { - writer.WritePropertyName("maxConcurrentConnections"u8); - JsonSerializer.Serialize(writer, MaxConcurrentConnections); - } - if (Optional.IsDefined(DisableMetricsCollection)) - { - writer.WritePropertyName("disableMetricsCollection"u8); - JsonSerializer.Serialize(writer, DisableMetricsCollection); - } - foreach (var item in AdditionalProperties) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.Value.ToString()).RootElement); -#endif - } - writer.WriteEndObject(); - } - - internal static OdbcSink DeserializeOdbcSink(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - Optional> preCopyScript = default; - string type = default; - Optional> writeBatchSize = default; - Optional> writeBatchTimeout = default; - Optional> sinkRetryCount = default; - Optional> sinkRetryWait = default; - Optional> maxConcurrentConnections = default; - Optional> disableMetricsCollection = default; - IDictionary> additionalProperties = default; - Dictionary> additionalPropertiesDictionary = new Dictionary>(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("preCopyScript"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - preCopyScript = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("type"u8)) - { - type = property.Value.GetString(); - continue; - } - if (property.NameEquals("writeBatchSize"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - writeBatchSize = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("writeBatchTimeout"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - writeBatchTimeout = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("sinkRetryCount"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - sinkRetryCount = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("sinkRetryWait"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - sinkRetryWait = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("maxConcurrentConnections"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - maxConcurrentConnections = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("disableMetricsCollection"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - disableMetricsCollection = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - additionalPropertiesDictionary.Add(property.Name, JsonSerializer.Deserialize>(property.Value.GetRawText())); - } - additionalProperties = additionalPropertiesDictionary; - return new OdbcSink(type, writeBatchSize.Value, writeBatchTimeout.Value, sinkRetryCount.Value, sinkRetryWait.Value, maxConcurrentConnections.Value, disableMetricsCollection.Value, additionalProperties, preCopyScript.Value); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/OdbcSink.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/OdbcSink.cs deleted file mode 100644 index 8f34be7f..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/OdbcSink.cs +++ /dev/null @@ -1,37 +0,0 @@ -// - -#nullable disable - -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// A copy activity ODBC sink. - public partial class OdbcSink : CopySink - { - /// Initializes a new instance of OdbcSink. - public OdbcSink() - { - CopySinkType = "OdbcSink"; - } - - /// Initializes a new instance of OdbcSink. - /// Copy sink type. - /// Write batch size. Type: integer (or Expression with resultType integer), minimum: 0. - /// Write batch timeout. Type: string (or Expression with resultType string), pattern: ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). - /// Sink retry count. Type: integer (or Expression with resultType integer). - /// Sink retry wait. Type: string (or Expression with resultType string), pattern: ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). - /// The maximum concurrent connection count for the sink data store. Type: integer (or Expression with resultType integer). - /// If true, disable data store metrics collection. Default is false. Type: boolean (or Expression with resultType boolean). - /// Additional Properties. - /// A query to execute before starting the copy. Type: string (or Expression with resultType string). - internal OdbcSink(string copySinkType, DataFactoryElement writeBatchSize, DataFactoryElement writeBatchTimeout, DataFactoryElement sinkRetryCount, DataFactoryElement sinkRetryWait, DataFactoryElement maxConcurrentConnections, DataFactoryElement disableMetricsCollection, IDictionary> additionalProperties, DataFactoryElement preCopyScript) : base(copySinkType, writeBatchSize, writeBatchTimeout, sinkRetryCount, sinkRetryWait, maxConcurrentConnections, disableMetricsCollection, additionalProperties) - { - PreCopyScript = preCopyScript; - CopySinkType = copySinkType ?? "OdbcSink"; - } - - /// A query to execute before starting the copy. Type: string (or Expression with resultType string). - public DataFactoryElement PreCopyScript { get; set; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/OdbcSource.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/OdbcSource.Serialization.cs deleted file mode 100644 index dcda9d6a..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/OdbcSource.Serialization.cs +++ /dev/null @@ -1,161 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class OdbcSource : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - if (Optional.IsDefined(Query)) - { - writer.WritePropertyName("query"u8); - JsonSerializer.Serialize(writer, Query); - } - if (Optional.IsDefined(QueryTimeout)) - { - writer.WritePropertyName("queryTimeout"u8); - JsonSerializer.Serialize(writer, QueryTimeout); - } - if (Optional.IsDefined(AdditionalColumns)) - { - writer.WritePropertyName("additionalColumns"u8); -#if NET6_0_OR_GREATER - writer.WriteRawValue(AdditionalColumns); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(AdditionalColumns.ToString()).RootElement); -#endif - } - writer.WritePropertyName("type"u8); - writer.WriteStringValue(CopySourceType); - if (Optional.IsDefined(SourceRetryCount)) - { - writer.WritePropertyName("sourceRetryCount"u8); - JsonSerializer.Serialize(writer, SourceRetryCount); - } - if (Optional.IsDefined(SourceRetryWait)) - { - writer.WritePropertyName("sourceRetryWait"u8); - JsonSerializer.Serialize(writer, SourceRetryWait); - } - if (Optional.IsDefined(MaxConcurrentConnections)) - { - writer.WritePropertyName("maxConcurrentConnections"u8); - JsonSerializer.Serialize(writer, MaxConcurrentConnections); - } - if (Optional.IsDefined(DisableMetricsCollection)) - { - writer.WritePropertyName("disableMetricsCollection"u8); - JsonSerializer.Serialize(writer, DisableMetricsCollection); - } - foreach (var item in AdditionalProperties) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.Value.ToString()).RootElement); -#endif - } - writer.WriteEndObject(); - } - - internal static OdbcSource DeserializeOdbcSource(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - Optional> query = default; - Optional> queryTimeout = default; - Optional additionalColumns = default; - string type = default; - Optional> sourceRetryCount = default; - Optional> sourceRetryWait = default; - Optional> maxConcurrentConnections = default; - Optional> disableMetricsCollection = default; - IDictionary> additionalProperties = default; - Dictionary> additionalPropertiesDictionary = new Dictionary>(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("query"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - query = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("queryTimeout"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - queryTimeout = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("additionalColumns"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - additionalColumns = BinaryData.FromString(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("type"u8)) - { - type = property.Value.GetString(); - continue; - } - if (property.NameEquals("sourceRetryCount"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - sourceRetryCount = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("sourceRetryWait"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - sourceRetryWait = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("maxConcurrentConnections"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - maxConcurrentConnections = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("disableMetricsCollection"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - disableMetricsCollection = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - additionalPropertiesDictionary.Add(property.Name, JsonSerializer.Deserialize>(property.Value.GetRawText())); - } - additionalProperties = additionalPropertiesDictionary; - return new OdbcSource(type, sourceRetryCount.Value, sourceRetryWait.Value, maxConcurrentConnections.Value, disableMetricsCollection.Value, additionalProperties, queryTimeout.Value, additionalColumns.Value, query.Value); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/OdbcSource.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/OdbcSource.cs deleted file mode 100644 index 18fc4abf..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/OdbcSource.cs +++ /dev/null @@ -1,37 +0,0 @@ -// - -#nullable disable - -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// A copy activity source for ODBC databases. - public partial class OdbcSource : TabularSource - { - /// Initializes a new instance of OdbcSource. - public OdbcSource() - { - CopySourceType = "OdbcSource"; - } - - /// Initializes a new instance of OdbcSource. - /// Copy source type. - /// Source retry count. Type: integer (or Expression with resultType integer). - /// Source retry wait. Type: string (or Expression with resultType string), pattern: ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). - /// The maximum concurrent connection count for the source data store. Type: integer (or Expression with resultType integer). - /// If true, disable data store metrics collection. Default is false. Type: boolean (or Expression with resultType boolean). - /// Additional Properties. - /// 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). - /// Database query. Type: string (or Expression with resultType string). - internal OdbcSource(string copySourceType, DataFactoryElement sourceRetryCount, DataFactoryElement sourceRetryWait, DataFactoryElement maxConcurrentConnections, DataFactoryElement disableMetricsCollection, IDictionary> additionalProperties, DataFactoryElement queryTimeout, BinaryData additionalColumns, DataFactoryElement query) : base(copySourceType, sourceRetryCount, sourceRetryWait, maxConcurrentConnections, disableMetricsCollection, additionalProperties, queryTimeout, additionalColumns) - { - Query = query; - CopySourceType = copySourceType ?? "OdbcSource"; - } - - /// Database query. Type: string (or Expression with resultType string). - public DataFactoryElement Query { get; set; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/OdbcTableDataset.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/OdbcTableDataset.Serialization.cs deleted file mode 100644 index 8e4528be..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/OdbcTableDataset.Serialization.cs +++ /dev/null @@ -1,212 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class OdbcTableDataset : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - writer.WritePropertyName("type"u8); - writer.WriteStringValue(DatasetType); - if (Optional.IsDefined(Description)) - { - writer.WritePropertyName("description"u8); - writer.WriteStringValue(Description); - } - if (Optional.IsDefined(Structure)) - { - writer.WritePropertyName("structure"u8); - JsonSerializer.Serialize(writer, Structure); - } - if (Optional.IsDefined(Schema)) - { - writer.WritePropertyName("schema"u8); - JsonSerializer.Serialize(writer, Schema); - } - writer.WritePropertyName("linkedServiceName"u8); - JsonSerializer.Serialize(writer, LinkedServiceName); if (Optional.IsCollectionDefined(Parameters)) - { - writer.WritePropertyName("parameters"u8); - writer.WriteStartObject(); - foreach (var item in Parameters) - { - writer.WritePropertyName(item.Key); - writer.WriteObjectValue(item.Value); - } - writer.WriteEndObject(); - } - if (Optional.IsCollectionDefined(Annotations)) - { - writer.WritePropertyName("annotations"u8); - writer.WriteStartArray(); - foreach (var item in Annotations) - { - if (item == null) - { - writer.WriteNullValue(); - continue; - } -#if NET6_0_OR_GREATER - writer.WriteRawValue(item); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.ToString()).RootElement); -#endif - } - writer.WriteEndArray(); - } - if (Optional.IsDefined(Folder)) - { - writer.WritePropertyName("folder"u8); - writer.WriteObjectValue(Folder); - } - writer.WritePropertyName("typeProperties"u8); - writer.WriteStartObject(); - if (Optional.IsDefined(TableName)) - { - writer.WritePropertyName("tableName"u8); - JsonSerializer.Serialize(writer, TableName); - } - writer.WriteEndObject(); - foreach (var item in AdditionalProperties) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.Value.ToString()).RootElement); -#endif - } - writer.WriteEndObject(); - } - - internal static OdbcTableDataset DeserializeOdbcTableDataset(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - string type = default; - Optional description = default; - Optional>> structure = default; - Optional>> schema = default; - DataFactoryLinkedServiceReference linkedServiceName = default; - Optional> parameters = default; - Optional> annotations = default; - Optional folder = default; - Optional> tableName = default; - IDictionary> additionalProperties = default; - Dictionary> additionalPropertiesDictionary = new Dictionary>(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("type"u8)) - { - type = property.Value.GetString(); - continue; - } - if (property.NameEquals("description"u8)) - { - description = property.Value.GetString(); - continue; - } - if (property.NameEquals("structure"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - structure = JsonSerializer.Deserialize>>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("schema"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - schema = JsonSerializer.Deserialize>>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("linkedServiceName"u8)) - { - linkedServiceName = JsonSerializer.Deserialize(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("parameters"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - Dictionary dictionary = new Dictionary(); - foreach (var property0 in property.Value.EnumerateObject()) - { - dictionary.Add(property0.Name, EntityParameterSpecification.DeserializeEntityParameterSpecification(property0.Value)); - } - parameters = dictionary; - continue; - } - if (property.NameEquals("annotations"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - if (item.ValueKind == JsonValueKind.Null) - { - array.Add(null); - } - else - { - array.Add(BinaryData.FromString(item.GetRawText())); - } - } - annotations = array; - continue; - } - if (property.NameEquals("folder"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - folder = DatasetFolder.DeserializeDatasetFolder(property.Value); - continue; - } - if (property.NameEquals("typeProperties"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - foreach (var property0 in property.Value.EnumerateObject()) - { - if (property0.NameEquals("tableName"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - tableName = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - } - continue; - } - additionalPropertiesDictionary.Add(property.Name, JsonSerializer.Deserialize>(property.Value.GetRawText())); - } - additionalProperties = additionalPropertiesDictionary; - return new OdbcTableDataset(type, description.Value, structure.Value, schema.Value, linkedServiceName, Optional.ToDictionary(parameters), Optional.ToList(annotations), folder.Value, additionalProperties, tableName.Value); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/OdbcTableDataset.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/OdbcTableDataset.cs deleted file mode 100644 index de3015bf..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/OdbcTableDataset.cs +++ /dev/null @@ -1,43 +0,0 @@ -// - -#nullable disable - -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// The ODBC table dataset. - public partial class OdbcTableDataset : DataFactoryDatasetProperties - { - /// Initializes a new instance of OdbcTableDataset. - /// Linked service reference. - /// is null. - public OdbcTableDataset(DataFactoryLinkedServiceReference linkedServiceName) : base(linkedServiceName) - { - Argument.AssertNotNull(linkedServiceName, nameof(linkedServiceName)); - - DatasetType = "OdbcTable"; - } - - /// Initializes a new instance of OdbcTableDataset. - /// Type of dataset. - /// Dataset description. - /// Columns that define the structure of the dataset. Type: array (or Expression with resultType array), itemType: DatasetDataElement. - /// Columns that define the physical type schema of the dataset. Type: array (or Expression with resultType array), itemType: DatasetSchemaDataElement. - /// Linked service reference. - /// Parameters for dataset. - /// List of tags that can be used for describing the Dataset. - /// The folder that this Dataset is in. If not specified, Dataset will appear at the root level. - /// Additional Properties. - /// The ODBC table name. Type: string (or Expression with resultType string). - internal OdbcTableDataset(string datasetType, string description, DataFactoryElement> structure, DataFactoryElement> schema, DataFactoryLinkedServiceReference linkedServiceName, IDictionary parameters, IList annotations, DatasetFolder folder, IDictionary> additionalProperties, DataFactoryElement tableName) : base(datasetType, description, structure, schema, linkedServiceName, parameters, annotations, folder, additionalProperties) - { - TableName = tableName; - DatasetType = datasetType ?? "OdbcTable"; - } - - /// The ODBC table name. Type: string (or Expression with resultType string). - public DataFactoryElement TableName { get; set; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/Office365Dataset.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/Office365Dataset.Serialization.cs deleted file mode 100644 index dc9be251..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/Office365Dataset.Serialization.cs +++ /dev/null @@ -1,220 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class Office365Dataset : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - writer.WritePropertyName("type"u8); - writer.WriteStringValue(DatasetType); - if (Optional.IsDefined(Description)) - { - writer.WritePropertyName("description"u8); - writer.WriteStringValue(Description); - } - if (Optional.IsDefined(Structure)) - { - writer.WritePropertyName("structure"u8); - JsonSerializer.Serialize(writer, Structure); - } - if (Optional.IsDefined(Schema)) - { - writer.WritePropertyName("schema"u8); - JsonSerializer.Serialize(writer, Schema); - } - writer.WritePropertyName("linkedServiceName"u8); - JsonSerializer.Serialize(writer, LinkedServiceName); if (Optional.IsCollectionDefined(Parameters)) - { - writer.WritePropertyName("parameters"u8); - writer.WriteStartObject(); - foreach (var item in Parameters) - { - writer.WritePropertyName(item.Key); - writer.WriteObjectValue(item.Value); - } - writer.WriteEndObject(); - } - if (Optional.IsCollectionDefined(Annotations)) - { - writer.WritePropertyName("annotations"u8); - writer.WriteStartArray(); - foreach (var item in Annotations) - { - if (item == null) - { - writer.WriteNullValue(); - continue; - } -#if NET6_0_OR_GREATER - writer.WriteRawValue(item); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.ToString()).RootElement); -#endif - } - writer.WriteEndArray(); - } - if (Optional.IsDefined(Folder)) - { - writer.WritePropertyName("folder"u8); - writer.WriteObjectValue(Folder); - } - writer.WritePropertyName("typeProperties"u8); - writer.WriteStartObject(); - writer.WritePropertyName("tableName"u8); - JsonSerializer.Serialize(writer, TableName); - if (Optional.IsDefined(Predicate)) - { - writer.WritePropertyName("predicate"u8); - JsonSerializer.Serialize(writer, Predicate); - } - writer.WriteEndObject(); - foreach (var item in AdditionalProperties) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.Value.ToString()).RootElement); -#endif - } - writer.WriteEndObject(); - } - - internal static Office365Dataset DeserializeOffice365Dataset(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - string type = default; - Optional description = default; - Optional>> structure = default; - Optional>> schema = default; - DataFactoryLinkedServiceReference linkedServiceName = default; - Optional> parameters = default; - Optional> annotations = default; - Optional folder = default; - DataFactoryElement tableName = default; - Optional> predicate = default; - IDictionary> additionalProperties = default; - Dictionary> additionalPropertiesDictionary = new Dictionary>(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("type"u8)) - { - type = property.Value.GetString(); - continue; - } - if (property.NameEquals("description"u8)) - { - description = property.Value.GetString(); - continue; - } - if (property.NameEquals("structure"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - structure = JsonSerializer.Deserialize>>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("schema"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - schema = JsonSerializer.Deserialize>>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("linkedServiceName"u8)) - { - linkedServiceName = JsonSerializer.Deserialize(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("parameters"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - Dictionary dictionary = new Dictionary(); - foreach (var property0 in property.Value.EnumerateObject()) - { - dictionary.Add(property0.Name, EntityParameterSpecification.DeserializeEntityParameterSpecification(property0.Value)); - } - parameters = dictionary; - continue; - } - if (property.NameEquals("annotations"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - if (item.ValueKind == JsonValueKind.Null) - { - array.Add(null); - } - else - { - array.Add(BinaryData.FromString(item.GetRawText())); - } - } - annotations = array; - continue; - } - if (property.NameEquals("folder"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - folder = DatasetFolder.DeserializeDatasetFolder(property.Value); - continue; - } - if (property.NameEquals("typeProperties"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - foreach (var property0 in property.Value.EnumerateObject()) - { - if (property0.NameEquals("tableName"u8)) - { - tableName = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("predicate"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - predicate = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - } - continue; - } - additionalPropertiesDictionary.Add(property.Name, JsonSerializer.Deserialize>(property.Value.GetRawText())); - } - additionalProperties = additionalPropertiesDictionary; - return new Office365Dataset(type, description.Value, structure.Value, schema.Value, linkedServiceName, Optional.ToDictionary(parameters), Optional.ToList(annotations), folder.Value, additionalProperties, tableName, predicate.Value); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/Office365Dataset.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/Office365Dataset.cs deleted file mode 100644 index f11e0635..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/Office365Dataset.cs +++ /dev/null @@ -1,50 +0,0 @@ -// - -#nullable disable - -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// The Office365 account. - public partial class Office365Dataset : DataFactoryDatasetProperties - { - /// Initializes a new instance of Office365Dataset. - /// Linked service reference. - /// Name of the dataset to extract from Office 365. Type: string (or Expression with resultType string). - /// or is null. - public Office365Dataset(DataFactoryLinkedServiceReference linkedServiceName, DataFactoryElement tableName) : base(linkedServiceName) - { - Argument.AssertNotNull(linkedServiceName, nameof(linkedServiceName)); - Argument.AssertNotNull(tableName, nameof(tableName)); - - TableName = tableName; - DatasetType = "Office365Table"; - } - - /// Initializes a new instance of Office365Dataset. - /// Type of dataset. - /// Dataset description. - /// Columns that define the structure of the dataset. Type: array (or Expression with resultType array), itemType: DatasetDataElement. - /// Columns that define the physical type schema of the dataset. Type: array (or Expression with resultType array), itemType: DatasetSchemaDataElement. - /// Linked service reference. - /// Parameters for dataset. - /// List of tags that can be used for describing the Dataset. - /// The folder that this Dataset is in. If not specified, Dataset will appear at the root level. - /// Additional Properties. - /// Name of the dataset to extract from Office 365. Type: string (or Expression with resultType string). - /// A predicate expression that can be used to filter the specific rows to extract from Office 365. Type: string (or Expression with resultType string). - internal Office365Dataset(string datasetType, string description, DataFactoryElement> structure, DataFactoryElement> schema, DataFactoryLinkedServiceReference linkedServiceName, IDictionary parameters, IList annotations, DatasetFolder folder, IDictionary> additionalProperties, DataFactoryElement tableName, DataFactoryElement predicate) : base(datasetType, description, structure, schema, linkedServiceName, parameters, annotations, folder, additionalProperties) - { - TableName = tableName; - Predicate = predicate; - DatasetType = datasetType ?? "Office365Table"; - } - - /// Name of the dataset to extract from Office 365. Type: string (or Expression with resultType string). - public DataFactoryElement TableName { get; set; } - /// A predicate expression that can be used to filter the specific rows to extract from Office 365. Type: string (or Expression with resultType string). - public DataFactoryElement Predicate { get; set; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/Office365LinkedService.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/Office365LinkedService.Serialization.cs deleted file mode 100644 index e01aa3dc..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/Office365LinkedService.Serialization.cs +++ /dev/null @@ -1,202 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class Office365LinkedService : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - writer.WritePropertyName("type"u8); - writer.WriteStringValue(LinkedServiceType); - if (Optional.IsDefined(ConnectVia)) - { - writer.WritePropertyName("connectVia"u8); - writer.WriteObjectValue(ConnectVia); - } - if (Optional.IsDefined(Description)) - { - writer.WritePropertyName("description"u8); - writer.WriteStringValue(Description); - } - if (Optional.IsCollectionDefined(Parameters)) - { - writer.WritePropertyName("parameters"u8); - writer.WriteStartObject(); - foreach (var item in Parameters) - { - writer.WritePropertyName(item.Key); - writer.WriteObjectValue(item.Value); - } - writer.WriteEndObject(); - } - if (Optional.IsCollectionDefined(Annotations)) - { - writer.WritePropertyName("annotations"u8); - writer.WriteStartArray(); - foreach (var item in Annotations) - { - if (item == null) - { - writer.WriteNullValue(); - continue; - } -#if NET6_0_OR_GREATER - writer.WriteRawValue(item); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.ToString()).RootElement); -#endif - } - writer.WriteEndArray(); - } - writer.WritePropertyName("typeProperties"u8); - writer.WriteStartObject(); - writer.WritePropertyName("office365TenantId"u8); - JsonSerializer.Serialize(writer, Office365TenantId); - writer.WritePropertyName("servicePrincipalTenantId"u8); - JsonSerializer.Serialize(writer, ServicePrincipalTenantId); - writer.WritePropertyName("servicePrincipalId"u8); - JsonSerializer.Serialize(writer, ServicePrincipalId); - writer.WritePropertyName("servicePrincipalKey"u8); - JsonSerializer.Serialize(writer, ServicePrincipalKey); if (Optional.IsDefined(EncryptedCredential)) - { - writer.WritePropertyName("encryptedCredential"u8); - writer.WriteStringValue(EncryptedCredential); - } - writer.WriteEndObject(); - foreach (var item in AdditionalProperties) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.Value.ToString()).RootElement); -#endif - } - writer.WriteEndObject(); - } - - internal static Office365LinkedService DeserializeOffice365LinkedService(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - string type = default; - Optional connectVia = default; - Optional description = default; - Optional> parameters = default; - Optional> annotations = default; - DataFactoryElement office365TenantId = default; - DataFactoryElement servicePrincipalTenantId = default; - DataFactoryElement servicePrincipalId = default; - DataFactorySecretBaseDefinition servicePrincipalKey = default; - Optional encryptedCredential = default; - IDictionary> additionalProperties = default; - Dictionary> additionalPropertiesDictionary = new Dictionary>(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("type"u8)) - { - type = property.Value.GetString(); - continue; - } - if (property.NameEquals("connectVia"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - connectVia = IntegrationRuntimeReference.DeserializeIntegrationRuntimeReference(property.Value); - continue; - } - if (property.NameEquals("description"u8)) - { - description = property.Value.GetString(); - continue; - } - if (property.NameEquals("parameters"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - Dictionary dictionary = new Dictionary(); - foreach (var property0 in property.Value.EnumerateObject()) - { - dictionary.Add(property0.Name, EntityParameterSpecification.DeserializeEntityParameterSpecification(property0.Value)); - } - parameters = dictionary; - continue; - } - if (property.NameEquals("annotations"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - if (item.ValueKind == JsonValueKind.Null) - { - array.Add(null); - } - else - { - array.Add(BinaryData.FromString(item.GetRawText())); - } - } - annotations = array; - continue; - } - if (property.NameEquals("typeProperties"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - foreach (var property0 in property.Value.EnumerateObject()) - { - if (property0.NameEquals("office365TenantId"u8)) - { - office365TenantId = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("servicePrincipalTenantId"u8)) - { - servicePrincipalTenantId = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("servicePrincipalId"u8)) - { - servicePrincipalId = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("servicePrincipalKey"u8)) - { - servicePrincipalKey = JsonSerializer.Deserialize(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("encryptedCredential"u8)) - { - encryptedCredential = property0.Value.GetString(); - continue; - } - } - continue; - } - additionalPropertiesDictionary.Add(property.Name, JsonSerializer.Deserialize>(property.Value.GetRawText())); - } - additionalProperties = additionalPropertiesDictionary; - return new Office365LinkedService(type, connectVia.Value, description.Value, Optional.ToDictionary(parameters), Optional.ToList(annotations), additionalProperties, office365TenantId, servicePrincipalTenantId, servicePrincipalId, servicePrincipalKey, encryptedCredential.Value); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/Office365LinkedService.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/Office365LinkedService.cs deleted file mode 100644 index 093550be..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/Office365LinkedService.cs +++ /dev/null @@ -1,66 +0,0 @@ -// - -#nullable disable - -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// Office365 linked service. - public partial class Office365LinkedService : DataFactoryLinkedServiceProperties - { - /// Initializes a new instance of Office365LinkedService. - /// Azure tenant ID to which the Office 365 account belongs. Type: string (or Expression with resultType string). - /// Specify the tenant information under which your Azure AD web application resides. Type: string (or Expression with resultType string). - /// Specify the application's client ID. Type: string (or Expression with resultType string). - /// Specify the application's key. - /// , , or is null. - public Office365LinkedService(DataFactoryElement office365TenantId, DataFactoryElement servicePrincipalTenantId, DataFactoryElement servicePrincipalId, DataFactorySecretBaseDefinition servicePrincipalKey) - { - Argument.AssertNotNull(office365TenantId, nameof(office365TenantId)); - Argument.AssertNotNull(servicePrincipalTenantId, nameof(servicePrincipalTenantId)); - Argument.AssertNotNull(servicePrincipalId, nameof(servicePrincipalId)); - Argument.AssertNotNull(servicePrincipalKey, nameof(servicePrincipalKey)); - - Office365TenantId = office365TenantId; - ServicePrincipalTenantId = servicePrincipalTenantId; - ServicePrincipalId = servicePrincipalId; - ServicePrincipalKey = servicePrincipalKey; - LinkedServiceType = "Office365"; - } - - /// Initializes a new instance of Office365LinkedService. - /// Type of linked service. - /// The integration runtime reference. - /// Linked service description. - /// Parameters for linked service. - /// List of tags that can be used for describing the linked service. - /// Additional Properties. - /// Azure tenant ID to which the Office 365 account belongs. Type: string (or Expression with resultType string). - /// Specify the tenant information under which your Azure AD web application resides. Type: string (or Expression with resultType string). - /// Specify the application's client ID. Type: string (or Expression with resultType string). - /// Specify the application's key. - /// The encrypted credential used for authentication. Credentials are encrypted using the integration runtime credential manager. Type: string. - internal Office365LinkedService(string linkedServiceType, IntegrationRuntimeReference connectVia, string description, IDictionary parameters, IList annotations, IDictionary> additionalProperties, DataFactoryElement office365TenantId, DataFactoryElement servicePrincipalTenantId, DataFactoryElement servicePrincipalId, DataFactorySecretBaseDefinition servicePrincipalKey, string encryptedCredential) : base(linkedServiceType, connectVia, description, parameters, annotations, additionalProperties) - { - Office365TenantId = office365TenantId; - ServicePrincipalTenantId = servicePrincipalTenantId; - ServicePrincipalId = servicePrincipalId; - ServicePrincipalKey = servicePrincipalKey; - EncryptedCredential = encryptedCredential; - LinkedServiceType = linkedServiceType ?? "Office365"; - } - - /// Azure tenant ID to which the Office 365 account belongs. Type: string (or Expression with resultType string). - public DataFactoryElement Office365TenantId { get; set; } - /// Specify the tenant information under which your Azure AD web application resides. Type: string (or Expression with resultType string). - public DataFactoryElement ServicePrincipalTenantId { get; set; } - /// Specify the application's client ID. Type: string (or Expression with resultType string). - public DataFactoryElement ServicePrincipalId { get; set; } - /// Specify the application's key. - public DataFactorySecretBaseDefinition ServicePrincipalKey { get; set; } - /// The encrypted credential used for authentication. Credentials are encrypted using the integration runtime credential manager. Type: string. - public string EncryptedCredential { get; set; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/Office365Source.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/Office365Source.Serialization.cs deleted file mode 100644 index 1f1af6a4..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/Office365Source.Serialization.cs +++ /dev/null @@ -1,202 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class Office365Source : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - if (Optional.IsDefined(AllowedGroups)) - { - writer.WritePropertyName("allowedGroups"u8); - JsonSerializer.Serialize(writer, AllowedGroups); - } - if (Optional.IsDefined(UserScopeFilterUri)) - { - writer.WritePropertyName("userScopeFilterUri"u8); - JsonSerializer.Serialize(writer, UserScopeFilterUri); - } - if (Optional.IsDefined(DateFilterColumn)) - { - writer.WritePropertyName("dateFilterColumn"u8); - JsonSerializer.Serialize(writer, DateFilterColumn); - } - if (Optional.IsDefined(StartOn)) - { - writer.WritePropertyName("startTime"u8); - JsonSerializer.Serialize(writer, StartOn); - } - if (Optional.IsDefined(EndOn)) - { - writer.WritePropertyName("endTime"u8); - JsonSerializer.Serialize(writer, EndOn); - } - if (Optional.IsDefined(OutputColumns)) - { - writer.WritePropertyName("outputColumns"u8); - JsonSerializer.Serialize(writer, OutputColumns); - } - writer.WritePropertyName("type"u8); - writer.WriteStringValue(CopySourceType); - if (Optional.IsDefined(SourceRetryCount)) - { - writer.WritePropertyName("sourceRetryCount"u8); - JsonSerializer.Serialize(writer, SourceRetryCount); - } - if (Optional.IsDefined(SourceRetryWait)) - { - writer.WritePropertyName("sourceRetryWait"u8); - JsonSerializer.Serialize(writer, SourceRetryWait); - } - if (Optional.IsDefined(MaxConcurrentConnections)) - { - writer.WritePropertyName("maxConcurrentConnections"u8); - JsonSerializer.Serialize(writer, MaxConcurrentConnections); - } - if (Optional.IsDefined(DisableMetricsCollection)) - { - writer.WritePropertyName("disableMetricsCollection"u8); - JsonSerializer.Serialize(writer, DisableMetricsCollection); - } - foreach (var item in AdditionalProperties) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.Value.ToString()).RootElement); -#endif - } - writer.WriteEndObject(); - } - - internal static Office365Source DeserializeOffice365Source(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - Optional>> allowedGroups = default; - Optional> userScopeFilterUri = default; - Optional> dateFilterColumn = default; - Optional> startTime = default; - Optional> endTime = default; - Optional>> outputColumns = default; - string type = default; - Optional> sourceRetryCount = default; - Optional> sourceRetryWait = default; - Optional> maxConcurrentConnections = default; - Optional> disableMetricsCollection = default; - IDictionary> additionalProperties = default; - Dictionary> additionalPropertiesDictionary = new Dictionary>(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("allowedGroups"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - allowedGroups = JsonSerializer.Deserialize>>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("userScopeFilterUri"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - userScopeFilterUri = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("dateFilterColumn"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - dateFilterColumn = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("startTime"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - startTime = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("endTime"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - endTime = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("outputColumns"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - outputColumns = JsonSerializer.Deserialize>>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("type"u8)) - { - type = property.Value.GetString(); - continue; - } - if (property.NameEquals("sourceRetryCount"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - sourceRetryCount = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("sourceRetryWait"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - sourceRetryWait = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("maxConcurrentConnections"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - maxConcurrentConnections = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("disableMetricsCollection"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - disableMetricsCollection = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - additionalPropertiesDictionary.Add(property.Name, JsonSerializer.Deserialize>(property.Value.GetRawText())); - } - additionalProperties = additionalPropertiesDictionary; - return new Office365Source(type, sourceRetryCount.Value, sourceRetryWait.Value, maxConcurrentConnections.Value, disableMetricsCollection.Value, additionalProperties, allowedGroups.Value, userScopeFilterUri.Value, dateFilterColumn.Value, startTime.Value, endTime.Value, outputColumns.Value); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/Office365Source.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/Office365Source.cs deleted file mode 100644 index f0d34f64..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/Office365Source.cs +++ /dev/null @@ -1,55 +0,0 @@ -// - -#nullable disable - -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// A copy activity source for an Office 365 service. - public partial class Office365Source : CopyActivitySource - { - /// Initializes a new instance of Office365Source. - public Office365Source() - { - CopySourceType = "Office365Source"; - } - - /// Initializes a new instance of Office365Source. - /// Copy source type. - /// Source retry count. Type: integer (or Expression with resultType integer). - /// Source retry wait. Type: string (or Expression with resultType string), pattern: ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). - /// The maximum concurrent connection count for the source data store. Type: integer (or Expression with resultType integer). - /// If true, disable data store metrics collection. Default is false. Type: boolean (or Expression with resultType boolean). - /// Additional Properties. - /// The groups containing all the users. Type: array of strings (or Expression with resultType array of strings). - /// The user scope uri. Type: string (or Expression with resultType string). - /// The Column to apply the <paramref name="StartTime"/> and <paramref name="EndTime"/>. Type: string (or Expression with resultType string). - /// Start time of the requested range for this dataset. Type: string (or Expression with resultType string). - /// End time of the requested range for this dataset. Type: string (or Expression with resultType string). - /// The columns to be read out from the Office 365 table. Type: array of objects (or Expression with resultType array of objects). itemType: OutputColumn. Example: [ { "name": "Id" }, { "name": "CreatedDateTime" } ]. - internal Office365Source(string copySourceType, DataFactoryElement sourceRetryCount, DataFactoryElement sourceRetryWait, DataFactoryElement maxConcurrentConnections, DataFactoryElement disableMetricsCollection, IDictionary> additionalProperties, DataFactoryElement> allowedGroups, DataFactoryElement userScopeFilterUri, DataFactoryElement dateFilterColumn, DataFactoryElement startOn, DataFactoryElement endOn, DataFactoryElement> outputColumns) : base(copySourceType, sourceRetryCount, sourceRetryWait, maxConcurrentConnections, disableMetricsCollection, additionalProperties) - { - AllowedGroups = allowedGroups; - UserScopeFilterUri = userScopeFilterUri; - DateFilterColumn = dateFilterColumn; - StartOn = startOn; - EndOn = endOn; - OutputColumns = outputColumns; - CopySourceType = copySourceType ?? "Office365Source"; - } - - /// The groups containing all the users. Type: array of strings (or Expression with resultType array of strings). - public DataFactoryElement> AllowedGroups { get; set; } - /// The user scope uri. Type: string (or Expression with resultType string). - public DataFactoryElement UserScopeFilterUri { get; set; } - /// The Column to apply the <paramref name="StartTime"/> and <paramref name="EndTime"/>. Type: string (or Expression with resultType string). - public DataFactoryElement DateFilterColumn { get; set; } - /// Start time of the requested range for this dataset. Type: string (or Expression with resultType string). - public DataFactoryElement StartOn { get; set; } - /// End time of the requested range for this dataset. Type: string (or Expression with resultType string). - public DataFactoryElement EndOn { get; set; } - /// The columns to be read out from the Office 365 table. Type: array of objects (or Expression with resultType array of objects). itemType: OutputColumn. Example: [ { "name": "Id" }, { "name": "CreatedDateTime" } ]. - public DataFactoryElement> OutputColumns { get; set; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/Office365TableOutputColumn.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/Office365TableOutputColumn.Serialization.cs deleted file mode 100644 index 1088e79e..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/Office365TableOutputColumn.Serialization.cs +++ /dev/null @@ -1,56 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using System.Text.Json.Serialization; -using Azure.Core; - -namespace AzureDataFactory.TestingFramework.Models -{ - [JsonConverter(typeof(Office365TableOutputColumnConverter))] - public partial class Office365TableOutputColumn : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - if (Optional.IsDefined(Name)) - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - writer.WriteEndObject(); - } - - internal static Office365TableOutputColumn DeserializeOffice365TableOutputColumn(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - Optional name = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("name"u8)) - { - name = property.Value.GetString(); - continue; - } - } - return new Office365TableOutputColumn(name.Value); - } - - internal partial class Office365TableOutputColumnConverter : JsonConverter - { - public override void Write(Utf8JsonWriter writer, Office365TableOutputColumn model, JsonSerializerOptions options) - { - writer.WriteObjectValue(model); - } - public override Office365TableOutputColumn Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) - { - using var document = JsonDocument.ParseValue(ref reader); - return DeserializeOffice365TableOutputColumn(document.RootElement); - } - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/Office365TableOutputColumn.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/Office365TableOutputColumn.cs deleted file mode 100644 index f36662ce..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/Office365TableOutputColumn.cs +++ /dev/null @@ -1,25 +0,0 @@ -// - -#nullable disable - -namespace AzureDataFactory.TestingFramework.Models -{ - /// The columns to be read out from the Office 365 table. - public partial class Office365TableOutputColumn - { - /// Initializes a new instance of Office365TableOutputColumn. - public Office365TableOutputColumn() - { - } - - /// Initializes a new instance of Office365TableOutputColumn. - /// Name of the table column. Type: string. - internal Office365TableOutputColumn(string name) - { - Name = name; - } - - /// Name of the table column. Type: string. - public string Name { get; set; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/OracleCloudStorageLinkedService.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/OracleCloudStorageLinkedService.Serialization.cs deleted file mode 100644 index 52313a8b..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/OracleCloudStorageLinkedService.Serialization.cs +++ /dev/null @@ -1,216 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class OracleCloudStorageLinkedService : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - writer.WritePropertyName("type"u8); - writer.WriteStringValue(LinkedServiceType); - if (Optional.IsDefined(ConnectVia)) - { - writer.WritePropertyName("connectVia"u8); - writer.WriteObjectValue(ConnectVia); - } - if (Optional.IsDefined(Description)) - { - writer.WritePropertyName("description"u8); - writer.WriteStringValue(Description); - } - if (Optional.IsCollectionDefined(Parameters)) - { - writer.WritePropertyName("parameters"u8); - writer.WriteStartObject(); - foreach (var item in Parameters) - { - writer.WritePropertyName(item.Key); - writer.WriteObjectValue(item.Value); - } - writer.WriteEndObject(); - } - if (Optional.IsCollectionDefined(Annotations)) - { - writer.WritePropertyName("annotations"u8); - writer.WriteStartArray(); - foreach (var item in Annotations) - { - if (item == null) - { - writer.WriteNullValue(); - continue; - } -#if NET6_0_OR_GREATER - writer.WriteRawValue(item); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.ToString()).RootElement); -#endif - } - writer.WriteEndArray(); - } - writer.WritePropertyName("typeProperties"u8); - writer.WriteStartObject(); - if (Optional.IsDefined(AccessKeyId)) - { - writer.WritePropertyName("accessKeyId"u8); - JsonSerializer.Serialize(writer, AccessKeyId); - } - if (Optional.IsDefined(SecretAccessKey)) - { - writer.WritePropertyName("secretAccessKey"u8); - JsonSerializer.Serialize(writer, SecretAccessKey); - } - if (Optional.IsDefined(ServiceUri)) - { - writer.WritePropertyName("serviceUrl"u8); - JsonSerializer.Serialize(writer, ServiceUri); - } - if (Optional.IsDefined(EncryptedCredential)) - { - writer.WritePropertyName("encryptedCredential"u8); - writer.WriteStringValue(EncryptedCredential); - } - writer.WriteEndObject(); - foreach (var item in AdditionalProperties) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.Value.ToString()).RootElement); -#endif - } - writer.WriteEndObject(); - } - - internal static OracleCloudStorageLinkedService DeserializeOracleCloudStorageLinkedService(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - string type = default; - Optional connectVia = default; - Optional description = default; - Optional> parameters = default; - Optional> annotations = default; - Optional> accessKeyId = default; - Optional secretAccessKey = default; - Optional> serviceUrl = default; - Optional encryptedCredential = default; - IDictionary> additionalProperties = default; - Dictionary> additionalPropertiesDictionary = new Dictionary>(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("type"u8)) - { - type = property.Value.GetString(); - continue; - } - if (property.NameEquals("connectVia"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - connectVia = IntegrationRuntimeReference.DeserializeIntegrationRuntimeReference(property.Value); - continue; - } - if (property.NameEquals("description"u8)) - { - description = property.Value.GetString(); - continue; - } - if (property.NameEquals("parameters"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - Dictionary dictionary = new Dictionary(); - foreach (var property0 in property.Value.EnumerateObject()) - { - dictionary.Add(property0.Name, EntityParameterSpecification.DeserializeEntityParameterSpecification(property0.Value)); - } - parameters = dictionary; - continue; - } - if (property.NameEquals("annotations"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - if (item.ValueKind == JsonValueKind.Null) - { - array.Add(null); - } - else - { - array.Add(BinaryData.FromString(item.GetRawText())); - } - } - annotations = array; - continue; - } - if (property.NameEquals("typeProperties"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - foreach (var property0 in property.Value.EnumerateObject()) - { - if (property0.NameEquals("accessKeyId"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - accessKeyId = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("secretAccessKey"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - secretAccessKey = JsonSerializer.Deserialize(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("serviceUrl"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - serviceUrl = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("encryptedCredential"u8)) - { - encryptedCredential = property0.Value.GetString(); - continue; - } - } - continue; - } - additionalPropertiesDictionary.Add(property.Name, JsonSerializer.Deserialize>(property.Value.GetRawText())); - } - additionalProperties = additionalPropertiesDictionary; - return new OracleCloudStorageLinkedService(type, connectVia.Value, description.Value, Optional.ToDictionary(parameters), Optional.ToList(annotations), additionalProperties, accessKeyId.Value, secretAccessKey, serviceUrl.Value, encryptedCredential.Value); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/OracleCloudStorageLinkedService.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/OracleCloudStorageLinkedService.cs deleted file mode 100644 index 02e27f2b..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/OracleCloudStorageLinkedService.cs +++ /dev/null @@ -1,47 +0,0 @@ -// - -#nullable disable - -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// Linked service for Oracle Cloud Storage. - public partial class OracleCloudStorageLinkedService : DataFactoryLinkedServiceProperties - { - /// Initializes a new instance of OracleCloudStorageLinkedService. - public OracleCloudStorageLinkedService() - { - LinkedServiceType = "OracleCloudStorage"; - } - - /// Initializes a new instance of OracleCloudStorageLinkedService. - /// Type of linked service. - /// The integration runtime reference. - /// Linked service description. - /// Parameters for linked service. - /// List of tags that can be used for describing the linked service. - /// Additional Properties. - /// The access key identifier of the Oracle Cloud Storage Identity and Access Management (IAM) user. Type: string (or Expression with resultType string). - /// The secret access key of the Oracle Cloud Storage Identity and Access Management (IAM) user. - /// This value specifies the endpoint to access with the Oracle Cloud Storage Connector. This is an optional property; change it only if you want to try a different service endpoint or want to switch between https and http. Type: string (or Expression with resultType string). - /// The encrypted credential used for authentication. Credentials are encrypted using the integration runtime credential manager. Type: string. - internal OracleCloudStorageLinkedService(string linkedServiceType, IntegrationRuntimeReference connectVia, string description, IDictionary parameters, IList annotations, IDictionary> additionalProperties, DataFactoryElement accessKeyId, DataFactorySecretBaseDefinition secretAccessKey, DataFactoryElement serviceUri, string encryptedCredential) : base(linkedServiceType, connectVia, description, parameters, annotations, additionalProperties) - { - AccessKeyId = accessKeyId; - SecretAccessKey = secretAccessKey; - ServiceUri = serviceUri; - EncryptedCredential = encryptedCredential; - LinkedServiceType = linkedServiceType ?? "OracleCloudStorage"; - } - - /// The access key identifier of the Oracle Cloud Storage Identity and Access Management (IAM) user. Type: string (or Expression with resultType string). - public DataFactoryElement AccessKeyId { get; set; } - /// The secret access key of the Oracle Cloud Storage Identity and Access Management (IAM) user. - public DataFactorySecretBaseDefinition SecretAccessKey { get; set; } - /// This value specifies the endpoint to access with the Oracle Cloud Storage Connector. This is an optional property; change it only if you want to try a different service endpoint or want to switch between https and http. Type: string (or Expression with resultType string). - public DataFactoryElement ServiceUri { get; set; } - /// The encrypted credential used for authentication. Credentials are encrypted using the integration runtime credential manager. Type: string. - public string EncryptedCredential { get; set; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/OracleCloudStorageLocation.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/OracleCloudStorageLocation.Serialization.cs deleted file mode 100644 index 855b403d..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/OracleCloudStorageLocation.Serialization.cs +++ /dev/null @@ -1,112 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class OracleCloudStorageLocation : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - if (Optional.IsDefined(BucketName)) - { - writer.WritePropertyName("bucketName"u8); - JsonSerializer.Serialize(writer, BucketName); - } - if (Optional.IsDefined(Version)) - { - writer.WritePropertyName("version"u8); - JsonSerializer.Serialize(writer, Version); - } - writer.WritePropertyName("type"u8); - writer.WriteStringValue(DatasetLocationType); - if (Optional.IsDefined(FolderPath)) - { - writer.WritePropertyName("folderPath"u8); - JsonSerializer.Serialize(writer, FolderPath); - } - if (Optional.IsDefined(FileName)) - { - writer.WritePropertyName("fileName"u8); - JsonSerializer.Serialize(writer, FileName); - } - foreach (var item in AdditionalProperties) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.Value.ToString()).RootElement); -#endif - } - writer.WriteEndObject(); - } - - internal static OracleCloudStorageLocation DeserializeOracleCloudStorageLocation(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - Optional> bucketName = default; - Optional> version = default; - string type = default; - Optional> folderPath = default; - Optional> fileName = default; - IDictionary> additionalProperties = default; - Dictionary> additionalPropertiesDictionary = new Dictionary>(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("bucketName"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - bucketName = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("version"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - version = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("type"u8)) - { - type = property.Value.GetString(); - continue; - } - if (property.NameEquals("folderPath"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - folderPath = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("fileName"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - fileName = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - additionalPropertiesDictionary.Add(property.Name, JsonSerializer.Deserialize>(property.Value.GetRawText())); - } - additionalProperties = additionalPropertiesDictionary; - return new OracleCloudStorageLocation(type, folderPath.Value, fileName.Value, additionalProperties, bucketName.Value, version.Value); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/OracleCloudStorageLocation.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/OracleCloudStorageLocation.cs deleted file mode 100644 index 51a05961..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/OracleCloudStorageLocation.cs +++ /dev/null @@ -1,37 +0,0 @@ -// - -#nullable disable - -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// The location of Oracle Cloud Storage dataset. - public partial class OracleCloudStorageLocation : DatasetLocation - { - /// Initializes a new instance of OracleCloudStorageLocation. - public OracleCloudStorageLocation() - { - DatasetLocationType = "OracleCloudStorageLocation"; - } - - /// Initializes a new instance of OracleCloudStorageLocation. - /// Type of dataset storage location. - /// Specify the folder path of dataset. Type: string (or Expression with resultType string). - /// Specify the file name of dataset. Type: string (or Expression with resultType string). - /// Additional Properties. - /// Specify the bucketName of Oracle Cloud Storage. Type: string (or Expression with resultType string). - /// Specify the version of Oracle Cloud Storage. Type: string (or Expression with resultType string). - internal OracleCloudStorageLocation(string datasetLocationType, DataFactoryElement folderPath, DataFactoryElement fileName, IDictionary> additionalProperties, DataFactoryElement bucketName, DataFactoryElement version) : base(datasetLocationType, folderPath, fileName, additionalProperties) - { - BucketName = bucketName; - Version = version; - DatasetLocationType = datasetLocationType ?? "OracleCloudStorageLocation"; - } - - /// Specify the bucketName of Oracle Cloud Storage. Type: string (or Expression with resultType string). - public DataFactoryElement BucketName { get; set; } - /// Specify the version of Oracle Cloud Storage. Type: string (or Expression with resultType string). - public DataFactoryElement Version { get; set; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/OracleCloudStorageReadSettings.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/OracleCloudStorageReadSettings.Serialization.cs deleted file mode 100644 index a45e5385..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/OracleCloudStorageReadSettings.Serialization.cs +++ /dev/null @@ -1,232 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class OracleCloudStorageReadSettings : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - if (Optional.IsDefined(Recursive)) - { - writer.WritePropertyName("recursive"u8); - JsonSerializer.Serialize(writer, Recursive); - } - if (Optional.IsDefined(WildcardFolderPath)) - { - writer.WritePropertyName("wildcardFolderPath"u8); - JsonSerializer.Serialize(writer, WildcardFolderPath); - } - if (Optional.IsDefined(WildcardFileName)) - { - writer.WritePropertyName("wildcardFileName"u8); - JsonSerializer.Serialize(writer, WildcardFileName); - } - if (Optional.IsDefined(Prefix)) - { - writer.WritePropertyName("prefix"u8); - JsonSerializer.Serialize(writer, Prefix); - } - if (Optional.IsDefined(FileListPath)) - { - writer.WritePropertyName("fileListPath"u8); - JsonSerializer.Serialize(writer, FileListPath); - } - if (Optional.IsDefined(EnablePartitionDiscovery)) - { - writer.WritePropertyName("enablePartitionDiscovery"u8); - JsonSerializer.Serialize(writer, EnablePartitionDiscovery); - } - if (Optional.IsDefined(PartitionRootPath)) - { - writer.WritePropertyName("partitionRootPath"u8); - JsonSerializer.Serialize(writer, PartitionRootPath); - } - if (Optional.IsDefined(DeleteFilesAfterCompletion)) - { - writer.WritePropertyName("deleteFilesAfterCompletion"u8); - JsonSerializer.Serialize(writer, DeleteFilesAfterCompletion); - } - if (Optional.IsDefined(ModifiedDatetimeStart)) - { - writer.WritePropertyName("modifiedDatetimeStart"u8); - JsonSerializer.Serialize(writer, ModifiedDatetimeStart); - } - if (Optional.IsDefined(ModifiedDatetimeEnd)) - { - writer.WritePropertyName("modifiedDatetimeEnd"u8); - JsonSerializer.Serialize(writer, ModifiedDatetimeEnd); - } - writer.WritePropertyName("type"u8); - writer.WriteStringValue(StoreReadSettingsType); - if (Optional.IsDefined(MaxConcurrentConnections)) - { - writer.WritePropertyName("maxConcurrentConnections"u8); - JsonSerializer.Serialize(writer, MaxConcurrentConnections); - } - if (Optional.IsDefined(DisableMetricsCollection)) - { - writer.WritePropertyName("disableMetricsCollection"u8); - JsonSerializer.Serialize(writer, DisableMetricsCollection); - } - foreach (var item in AdditionalProperties) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.Value.ToString()).RootElement); -#endif - } - writer.WriteEndObject(); - } - - internal static OracleCloudStorageReadSettings DeserializeOracleCloudStorageReadSettings(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - Optional> recursive = default; - Optional> wildcardFolderPath = default; - Optional> wildcardFileName = default; - Optional> prefix = default; - Optional> fileListPath = default; - Optional> enablePartitionDiscovery = default; - Optional> partitionRootPath = default; - Optional> deleteFilesAfterCompletion = default; - Optional> modifiedDatetimeStart = default; - Optional> modifiedDatetimeEnd = default; - string type = default; - Optional> maxConcurrentConnections = default; - Optional> disableMetricsCollection = default; - IDictionary> additionalProperties = default; - Dictionary> additionalPropertiesDictionary = new Dictionary>(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("recursive"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - recursive = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("wildcardFolderPath"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - wildcardFolderPath = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("wildcardFileName"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - wildcardFileName = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("prefix"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - prefix = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("fileListPath"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - fileListPath = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("enablePartitionDiscovery"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - enablePartitionDiscovery = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("partitionRootPath"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - partitionRootPath = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("deleteFilesAfterCompletion"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - deleteFilesAfterCompletion = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("modifiedDatetimeStart"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - modifiedDatetimeStart = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("modifiedDatetimeEnd"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - modifiedDatetimeEnd = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("type"u8)) - { - type = property.Value.GetString(); - continue; - } - if (property.NameEquals("maxConcurrentConnections"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - maxConcurrentConnections = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("disableMetricsCollection"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - disableMetricsCollection = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - additionalPropertiesDictionary.Add(property.Name, JsonSerializer.Deserialize>(property.Value.GetRawText())); - } - additionalProperties = additionalPropertiesDictionary; - return new OracleCloudStorageReadSettings(type, maxConcurrentConnections.Value, disableMetricsCollection.Value, additionalProperties, recursive.Value, wildcardFolderPath.Value, wildcardFileName.Value, prefix.Value, fileListPath.Value, enablePartitionDiscovery.Value, partitionRootPath.Value, deleteFilesAfterCompletion.Value, modifiedDatetimeStart.Value, modifiedDatetimeEnd.Value); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/OracleCloudStorageReadSettings.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/OracleCloudStorageReadSettings.cs deleted file mode 100644 index 31eef128..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/OracleCloudStorageReadSettings.cs +++ /dev/null @@ -1,69 +0,0 @@ -// - -#nullable disable - -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// Oracle Cloud Storage read settings. - public partial class OracleCloudStorageReadSettings : StoreReadSettings - { - /// Initializes a new instance of OracleCloudStorageReadSettings. - public OracleCloudStorageReadSettings() - { - StoreReadSettingsType = "OracleCloudStorageReadSettings"; - } - - /// Initializes a new instance of OracleCloudStorageReadSettings. - /// The read setting type. - /// The maximum concurrent connection count for the source data store. Type: integer (or Expression with resultType integer). - /// If true, disable data store metrics collection. Default is false. Type: boolean (or Expression with resultType boolean). - /// Additional Properties. - /// If true, files under the folder path will be read recursively. Default is true. Type: boolean (or Expression with resultType boolean). - /// Oracle Cloud Storage wildcardFolderPath. Type: string (or Expression with resultType string). - /// Oracle Cloud Storage wildcardFileName. Type: string (or Expression with resultType string). - /// The prefix filter for the Oracle Cloud Storage object name. Type: string (or Expression with resultType string). - /// Point to a text file that lists each file (relative path to the path configured in the dataset) that you want to copy. Type: string (or Expression with resultType string). - /// Indicates whether to enable partition discovery. Type: boolean (or Expression with resultType boolean). - /// Specify the root path where partition discovery starts from. Type: string (or Expression with resultType string). - /// Indicates whether the source files need to be deleted after copy completion. Default is false. Type: boolean (or Expression with resultType boolean). - /// The start of file's modified datetime. Type: string (or Expression with resultType string). - /// The end of file's modified datetime. Type: string (or Expression with resultType string). - internal OracleCloudStorageReadSettings(string storeReadSettingsType, DataFactoryElement maxConcurrentConnections, DataFactoryElement disableMetricsCollection, IDictionary> additionalProperties, DataFactoryElement recursive, DataFactoryElement wildcardFolderPath, DataFactoryElement wildcardFileName, DataFactoryElement prefix, DataFactoryElement fileListPath, DataFactoryElement enablePartitionDiscovery, DataFactoryElement partitionRootPath, DataFactoryElement deleteFilesAfterCompletion, DataFactoryElement modifiedDatetimeStart, DataFactoryElement modifiedDatetimeEnd) : base(storeReadSettingsType, maxConcurrentConnections, disableMetricsCollection, additionalProperties) - { - Recursive = recursive; - WildcardFolderPath = wildcardFolderPath; - WildcardFileName = wildcardFileName; - Prefix = prefix; - FileListPath = fileListPath; - EnablePartitionDiscovery = enablePartitionDiscovery; - PartitionRootPath = partitionRootPath; - DeleteFilesAfterCompletion = deleteFilesAfterCompletion; - ModifiedDatetimeStart = modifiedDatetimeStart; - ModifiedDatetimeEnd = modifiedDatetimeEnd; - StoreReadSettingsType = storeReadSettingsType ?? "OracleCloudStorageReadSettings"; - } - - /// If true, files under the folder path will be read recursively. Default is true. Type: boolean (or Expression with resultType boolean). - public DataFactoryElement Recursive { get; set; } - /// Oracle Cloud Storage wildcardFolderPath. Type: string (or Expression with resultType string). - public DataFactoryElement WildcardFolderPath { get; set; } - /// Oracle Cloud Storage wildcardFileName. Type: string (or Expression with resultType string). - public DataFactoryElement WildcardFileName { get; set; } - /// The prefix filter for the Oracle Cloud Storage object name. Type: string (or Expression with resultType string). - public DataFactoryElement Prefix { get; set; } - /// Point to a text file that lists each file (relative path to the path configured in the dataset) that you want to copy. Type: string (or Expression with resultType string). - public DataFactoryElement FileListPath { get; set; } - /// Indicates whether to enable partition discovery. Type: boolean (or Expression with resultType boolean). - public DataFactoryElement EnablePartitionDiscovery { get; set; } - /// Specify the root path where partition discovery starts from. Type: string (or Expression with resultType string). - public DataFactoryElement PartitionRootPath { get; set; } - /// Indicates whether the source files need to be deleted after copy completion. Default is false. Type: boolean (or Expression with resultType boolean). - public DataFactoryElement DeleteFilesAfterCompletion { get; set; } - /// The start of file's modified datetime. Type: string (or Expression with resultType string). - public DataFactoryElement ModifiedDatetimeStart { get; set; } - /// The end of file's modified datetime. Type: string (or Expression with resultType string). - public DataFactoryElement ModifiedDatetimeEnd { get; set; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/OracleLinkedService.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/OracleLinkedService.Serialization.cs deleted file mode 100644 index 765ef367..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/OracleLinkedService.Serialization.cs +++ /dev/null @@ -1,194 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class OracleLinkedService : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - writer.WritePropertyName("type"u8); - writer.WriteStringValue(LinkedServiceType); - if (Optional.IsDefined(ConnectVia)) - { - writer.WritePropertyName("connectVia"u8); - writer.WriteObjectValue(ConnectVia); - } - if (Optional.IsDefined(Description)) - { - writer.WritePropertyName("description"u8); - writer.WriteStringValue(Description); - } - if (Optional.IsCollectionDefined(Parameters)) - { - writer.WritePropertyName("parameters"u8); - writer.WriteStartObject(); - foreach (var item in Parameters) - { - writer.WritePropertyName(item.Key); - writer.WriteObjectValue(item.Value); - } - writer.WriteEndObject(); - } - if (Optional.IsCollectionDefined(Annotations)) - { - writer.WritePropertyName("annotations"u8); - writer.WriteStartArray(); - foreach (var item in Annotations) - { - if (item == null) - { - writer.WriteNullValue(); - continue; - } -#if NET6_0_OR_GREATER - writer.WriteRawValue(item); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.ToString()).RootElement); -#endif - } - writer.WriteEndArray(); - } - writer.WritePropertyName("typeProperties"u8); - writer.WriteStartObject(); - writer.WritePropertyName("connectionString"u8); - JsonSerializer.Serialize(writer, ConnectionString); - if (Optional.IsDefined(Password)) - { - writer.WritePropertyName("password"u8); - JsonSerializer.Serialize(writer, Password); - } - if (Optional.IsDefined(EncryptedCredential)) - { - writer.WritePropertyName("encryptedCredential"u8); - writer.WriteStringValue(EncryptedCredential); - } - writer.WriteEndObject(); - foreach (var item in AdditionalProperties) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.Value.ToString()).RootElement); -#endif - } - writer.WriteEndObject(); - } - - internal static OracleLinkedService DeserializeOracleLinkedService(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - string type = default; - Optional connectVia = default; - Optional description = default; - Optional> parameters = default; - Optional> annotations = default; - DataFactoryElement connectionString = default; - Optional password = default; - Optional encryptedCredential = default; - IDictionary> additionalProperties = default; - Dictionary> additionalPropertiesDictionary = new Dictionary>(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("type"u8)) - { - type = property.Value.GetString(); - continue; - } - if (property.NameEquals("connectVia"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - connectVia = IntegrationRuntimeReference.DeserializeIntegrationRuntimeReference(property.Value); - continue; - } - if (property.NameEquals("description"u8)) - { - description = property.Value.GetString(); - continue; - } - if (property.NameEquals("parameters"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - Dictionary dictionary = new Dictionary(); - foreach (var property0 in property.Value.EnumerateObject()) - { - dictionary.Add(property0.Name, EntityParameterSpecification.DeserializeEntityParameterSpecification(property0.Value)); - } - parameters = dictionary; - continue; - } - if (property.NameEquals("annotations"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - if (item.ValueKind == JsonValueKind.Null) - { - array.Add(null); - } - else - { - array.Add(BinaryData.FromString(item.GetRawText())); - } - } - annotations = array; - continue; - } - if (property.NameEquals("typeProperties"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - foreach (var property0 in property.Value.EnumerateObject()) - { - if (property0.NameEquals("connectionString"u8)) - { - connectionString = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("password"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - password = JsonSerializer.Deserialize(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("encryptedCredential"u8)) - { - encryptedCredential = property0.Value.GetString(); - continue; - } - } - continue; - } - additionalPropertiesDictionary.Add(property.Name, JsonSerializer.Deserialize>(property.Value.GetRawText())); - } - additionalProperties = additionalPropertiesDictionary; - return new OracleLinkedService(type, connectVia.Value, description.Value, Optional.ToDictionary(parameters), Optional.ToList(annotations), additionalProperties, connectionString, password, encryptedCredential.Value); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/OracleLinkedService.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/OracleLinkedService.cs deleted file mode 100644 index 3e0d3b23..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/OracleLinkedService.cs +++ /dev/null @@ -1,49 +0,0 @@ -// - -#nullable disable - -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// Oracle database. - public partial class OracleLinkedService : DataFactoryLinkedServiceProperties - { - /// Initializes a new instance of OracleLinkedService. - /// The connection string. Type: string, SecureString or AzureKeyVaultSecretReference. - /// is null. - public OracleLinkedService(DataFactoryElement connectionString) - { - Argument.AssertNotNull(connectionString, nameof(connectionString)); - - ConnectionString = connectionString; - LinkedServiceType = "Oracle"; - } - - /// Initializes a new instance of OracleLinkedService. - /// Type of linked service. - /// The integration runtime reference. - /// Linked service description. - /// Parameters for linked service. - /// List of tags that can be used for describing the linked service. - /// Additional Properties. - /// The connection string. Type: string, SecureString or AzureKeyVaultSecretReference. - /// The Azure key vault secret reference of password in connection string. - /// The encrypted credential used for authentication. Credentials are encrypted using the integration runtime credential manager. Type: string. - internal OracleLinkedService(string linkedServiceType, IntegrationRuntimeReference connectVia, string description, IDictionary parameters, IList annotations, IDictionary> additionalProperties, DataFactoryElement connectionString, DataFactoryKeyVaultSecretReference password, string encryptedCredential) : base(linkedServiceType, connectVia, description, parameters, annotations, additionalProperties) - { - ConnectionString = connectionString; - Password = password; - EncryptedCredential = encryptedCredential; - LinkedServiceType = linkedServiceType ?? "Oracle"; - } - - /// The connection string. Type: string, SecureString or AzureKeyVaultSecretReference. - public DataFactoryElement ConnectionString { get; set; } - /// The Azure key vault secret reference of password in connection string. - public DataFactoryKeyVaultSecretReference Password { get; set; } - /// The encrypted credential used for authentication. Credentials are encrypted using the integration runtime credential manager. Type: string. - public string EncryptedCredential { get; set; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/OraclePartitionSettings.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/OraclePartitionSettings.Serialization.cs deleted file mode 100644 index f4a3ba9f..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/OraclePartitionSettings.Serialization.cs +++ /dev/null @@ -1,95 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class OraclePartitionSettings : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - if (Optional.IsDefined(PartitionNames)) - { - writer.WritePropertyName("partitionNames"u8); -#if NET6_0_OR_GREATER - writer.WriteRawValue(PartitionNames); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(PartitionNames.ToString()).RootElement); -#endif - } - if (Optional.IsDefined(PartitionColumnName)) - { - writer.WritePropertyName("partitionColumnName"u8); - JsonSerializer.Serialize(writer, PartitionColumnName); - } - if (Optional.IsDefined(PartitionUpperBound)) - { - writer.WritePropertyName("partitionUpperBound"u8); - JsonSerializer.Serialize(writer, PartitionUpperBound); - } - if (Optional.IsDefined(PartitionLowerBound)) - { - writer.WritePropertyName("partitionLowerBound"u8); - JsonSerializer.Serialize(writer, PartitionLowerBound); - } - writer.WriteEndObject(); - } - - internal static OraclePartitionSettings DeserializeOraclePartitionSettings(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - Optional partitionNames = default; - Optional> partitionColumnName = default; - Optional> partitionUpperBound = default; - Optional> partitionLowerBound = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("partitionNames"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - partitionNames = BinaryData.FromString(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("partitionColumnName"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - partitionColumnName = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("partitionUpperBound"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - partitionUpperBound = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("partitionLowerBound"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - partitionLowerBound = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - } - return new OraclePartitionSettings(partitionNames.Value, partitionColumnName.Value, partitionUpperBound.Value, partitionLowerBound.Value); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/OraclePartitionSettings.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/OraclePartitionSettings.cs deleted file mode 100644 index df5ef136..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/OraclePartitionSettings.cs +++ /dev/null @@ -1,68 +0,0 @@ -// - -#nullable disable - -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// The settings that will be leveraged for Oracle source partitioning. - public partial class OraclePartitionSettings - { - /// Initializes a new instance of OraclePartitionSettings. - public OraclePartitionSettings() - { - } - - /// Initializes a new instance of OraclePartitionSettings. - /// Names of the physical partitions of Oracle table. - /// The name of the column in integer type that will be used for proceeding range partitioning. Type: string (or Expression with resultType string). - /// The maximum value of column specified in partitionColumnName that will be used for proceeding range partitioning. Type: string (or Expression with resultType string). - /// The minimum value of column specified in partitionColumnName that will be used for proceeding range partitioning. Type: string (or Expression with resultType string). - internal OraclePartitionSettings(BinaryData partitionNames, DataFactoryElement partitionColumnName, DataFactoryElement partitionUpperBound, DataFactoryElement partitionLowerBound) - { - PartitionNames = partitionNames; - PartitionColumnName = partitionColumnName; - PartitionUpperBound = partitionUpperBound; - PartitionLowerBound = partitionLowerBound; - } - - /// - /// Names of the physical partitions of Oracle table. - /// - /// To assign an object to this property use . - /// - /// - /// To assign an already formated json string to this property use . - /// - /// - /// Examples: - /// - /// - /// BinaryData.FromObjectAsJson("foo") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromString("\"foo\"") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromObjectAsJson(new { key = "value" }) - /// Creates a payload of { "key": "value" }. - /// - /// - /// BinaryData.FromString("{\"key\": \"value\"}") - /// Creates a payload of { "key": "value" }. - /// - /// - /// - /// - public BinaryData PartitionNames { get; set; } - /// The name of the column in integer type that will be used for proceeding range partitioning. Type: string (or Expression with resultType string). - public DataFactoryElement PartitionColumnName { get; set; } - /// The maximum value of column specified in partitionColumnName that will be used for proceeding range partitioning. Type: string (or Expression with resultType string). - public DataFactoryElement PartitionUpperBound { get; set; } - /// The minimum value of column specified in partitionColumnName that will be used for proceeding range partitioning. Type: string (or Expression with resultType string). - public DataFactoryElement PartitionLowerBound { get; set; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/OracleServiceCloudLinkedService.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/OracleServiceCloudLinkedService.Serialization.cs deleted file mode 100644 index 1d752f07..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/OracleServiceCloudLinkedService.Serialization.cs +++ /dev/null @@ -1,247 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class OracleServiceCloudLinkedService : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - writer.WritePropertyName("type"u8); - writer.WriteStringValue(LinkedServiceType); - if (Optional.IsDefined(ConnectVia)) - { - writer.WritePropertyName("connectVia"u8); - writer.WriteObjectValue(ConnectVia); - } - if (Optional.IsDefined(Description)) - { - writer.WritePropertyName("description"u8); - writer.WriteStringValue(Description); - } - if (Optional.IsCollectionDefined(Parameters)) - { - writer.WritePropertyName("parameters"u8); - writer.WriteStartObject(); - foreach (var item in Parameters) - { - writer.WritePropertyName(item.Key); - writer.WriteObjectValue(item.Value); - } - writer.WriteEndObject(); - } - if (Optional.IsCollectionDefined(Annotations)) - { - writer.WritePropertyName("annotations"u8); - writer.WriteStartArray(); - foreach (var item in Annotations) - { - if (item == null) - { - writer.WriteNullValue(); - continue; - } -#if NET6_0_OR_GREATER - writer.WriteRawValue(item); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.ToString()).RootElement); -#endif - } - writer.WriteEndArray(); - } - writer.WritePropertyName("typeProperties"u8); - writer.WriteStartObject(); - writer.WritePropertyName("host"u8); -#if NET6_0_OR_GREATER - writer.WriteRawValue(Host); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(Host.ToString()).RootElement); -#endif - writer.WritePropertyName("username"u8); -#if NET6_0_OR_GREATER - writer.WriteRawValue(Username); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(Username.ToString()).RootElement); -#endif - writer.WritePropertyName("password"u8); - JsonSerializer.Serialize(writer, Password); if (Optional.IsDefined(UseEncryptedEndpoints)) - { - writer.WritePropertyName("useEncryptedEndpoints"u8); - JsonSerializer.Serialize(writer, UseEncryptedEndpoints); - } - if (Optional.IsDefined(UseHostVerification)) - { - writer.WritePropertyName("useHostVerification"u8); - JsonSerializer.Serialize(writer, UseHostVerification); - } - if (Optional.IsDefined(UsePeerVerification)) - { - writer.WritePropertyName("usePeerVerification"u8); - JsonSerializer.Serialize(writer, UsePeerVerification); - } - if (Optional.IsDefined(EncryptedCredential)) - { - writer.WritePropertyName("encryptedCredential"u8); - writer.WriteStringValue(EncryptedCredential); - } - writer.WriteEndObject(); - foreach (var item in AdditionalProperties) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.Value.ToString()).RootElement); -#endif - } - writer.WriteEndObject(); - } - - internal static OracleServiceCloudLinkedService DeserializeOracleServiceCloudLinkedService(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - string type = default; - Optional connectVia = default; - Optional description = default; - Optional> parameters = default; - Optional> annotations = default; - BinaryData host = default; - BinaryData username = default; - DataFactorySecretBaseDefinition password = default; - Optional> useEncryptedEndpoints = default; - Optional> useHostVerification = default; - Optional> usePeerVerification = default; - Optional encryptedCredential = default; - IDictionary> additionalProperties = default; - Dictionary> additionalPropertiesDictionary = new Dictionary>(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("type"u8)) - { - type = property.Value.GetString(); - continue; - } - if (property.NameEquals("connectVia"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - connectVia = IntegrationRuntimeReference.DeserializeIntegrationRuntimeReference(property.Value); - continue; - } - if (property.NameEquals("description"u8)) - { - description = property.Value.GetString(); - continue; - } - if (property.NameEquals("parameters"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - Dictionary dictionary = new Dictionary(); - foreach (var property0 in property.Value.EnumerateObject()) - { - dictionary.Add(property0.Name, EntityParameterSpecification.DeserializeEntityParameterSpecification(property0.Value)); - } - parameters = dictionary; - continue; - } - if (property.NameEquals("annotations"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - if (item.ValueKind == JsonValueKind.Null) - { - array.Add(null); - } - else - { - array.Add(BinaryData.FromString(item.GetRawText())); - } - } - annotations = array; - continue; - } - if (property.NameEquals("typeProperties"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - foreach (var property0 in property.Value.EnumerateObject()) - { - if (property0.NameEquals("host"u8)) - { - host = BinaryData.FromString(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("username"u8)) - { - username = BinaryData.FromString(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("password"u8)) - { - password = JsonSerializer.Deserialize(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("useEncryptedEndpoints"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - useEncryptedEndpoints = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("useHostVerification"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - useHostVerification = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("usePeerVerification"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - usePeerVerification = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("encryptedCredential"u8)) - { - encryptedCredential = property0.Value.GetString(); - continue; - } - } - continue; - } - additionalPropertiesDictionary.Add(property.Name, JsonSerializer.Deserialize>(property.Value.GetRawText())); - } - additionalProperties = additionalPropertiesDictionary; - return new OracleServiceCloudLinkedService(type, connectVia.Value, description.Value, Optional.ToDictionary(parameters), Optional.ToList(annotations), additionalProperties, host, username, password, useEncryptedEndpoints.Value, useHostVerification.Value, usePeerVerification.Value, encryptedCredential.Value); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/OracleServiceCloudLinkedService.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/OracleServiceCloudLinkedService.cs deleted file mode 100644 index 3310716c..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/OracleServiceCloudLinkedService.cs +++ /dev/null @@ -1,129 +0,0 @@ -// - -#nullable disable - -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// Oracle Service Cloud linked service. - public partial class OracleServiceCloudLinkedService : DataFactoryLinkedServiceProperties - { - /// Initializes a new instance of OracleServiceCloudLinkedService. - /// The URL of the Oracle Service Cloud instance. - /// The user name that you use to access Oracle Service Cloud server. - /// The password corresponding to the user name that you provided in the username key. - /// , or is null. - public OracleServiceCloudLinkedService(BinaryData host, BinaryData username, DataFactorySecretBaseDefinition password) - { - Argument.AssertNotNull(host, nameof(host)); - Argument.AssertNotNull(username, nameof(username)); - Argument.AssertNotNull(password, nameof(password)); - - Host = host; - Username = username; - Password = password; - LinkedServiceType = "OracleServiceCloud"; - } - - /// Initializes a new instance of OracleServiceCloudLinkedService. - /// Type of linked service. - /// The integration runtime reference. - /// Linked service description. - /// Parameters for linked service. - /// List of tags that can be used for describing the linked service. - /// Additional Properties. - /// The URL of the Oracle Service Cloud instance. - /// The user name that you use to access Oracle Service Cloud server. - /// The password corresponding to the user name that you provided in the username key. - /// Specifies whether the data source endpoints are encrypted using HTTPS. The default value is true. Type: boolean (or Expression with resultType boolean). - /// 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. Type: boolean (or Expression with resultType boolean). - /// Specifies whether to verify the identity of the server when connecting over SSL. The default value is true. Type: boolean (or Expression with resultType boolean). - /// The encrypted credential used for authentication. Credentials are encrypted using the integration runtime credential manager. Type: string. - internal OracleServiceCloudLinkedService(string linkedServiceType, IntegrationRuntimeReference connectVia, string description, IDictionary parameters, IList annotations, IDictionary> additionalProperties, BinaryData host, BinaryData username, DataFactorySecretBaseDefinition password, DataFactoryElement useEncryptedEndpoints, DataFactoryElement useHostVerification, DataFactoryElement usePeerVerification, string encryptedCredential) : base(linkedServiceType, connectVia, description, parameters, annotations, additionalProperties) - { - Host = host; - Username = username; - Password = password; - UseEncryptedEndpoints = useEncryptedEndpoints; - UseHostVerification = useHostVerification; - UsePeerVerification = usePeerVerification; - EncryptedCredential = encryptedCredential; - LinkedServiceType = linkedServiceType ?? "OracleServiceCloud"; - } - - /// - /// The URL of the Oracle Service Cloud instance. - /// - /// To assign an object to this property use . - /// - /// - /// To assign an already formated json string to this property use . - /// - /// - /// Examples: - /// - /// - /// BinaryData.FromObjectAsJson("foo") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromString("\"foo\"") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromObjectAsJson(new { key = "value" }) - /// Creates a payload of { "key": "value" }. - /// - /// - /// BinaryData.FromString("{\"key\": \"value\"}") - /// Creates a payload of { "key": "value" }. - /// - /// - /// - /// - public BinaryData Host { get; set; } - /// - /// The user name that you use to access Oracle Service Cloud server. - /// - /// To assign an object to this property use . - /// - /// - /// To assign an already formated json string to this property use . - /// - /// - /// Examples: - /// - /// - /// BinaryData.FromObjectAsJson("foo") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromString("\"foo\"") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromObjectAsJson(new { key = "value" }) - /// Creates a payload of { "key": "value" }. - /// - /// - /// BinaryData.FromString("{\"key\": \"value\"}") - /// Creates a payload of { "key": "value" }. - /// - /// - /// - /// - public BinaryData Username { get; set; } - /// The password corresponding to the user name that you provided in the username key. - public DataFactorySecretBaseDefinition Password { get; set; } - /// Specifies whether the data source endpoints are encrypted using HTTPS. The default value is true. Type: boolean (or Expression with resultType boolean). - public DataFactoryElement UseEncryptedEndpoints { get; set; } - /// 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. Type: boolean (or Expression with resultType boolean). - public DataFactoryElement UseHostVerification { get; set; } - /// Specifies whether to verify the identity of the server when connecting over SSL. The default value is true. Type: boolean (or Expression with resultType boolean). - public DataFactoryElement UsePeerVerification { get; set; } - /// The encrypted credential used for authentication. Credentials are encrypted using the integration runtime credential manager. Type: string. - public string EncryptedCredential { get; set; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/OracleServiceCloudObjectDataset.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/OracleServiceCloudObjectDataset.Serialization.cs deleted file mode 100644 index 6a2125ea..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/OracleServiceCloudObjectDataset.Serialization.cs +++ /dev/null @@ -1,212 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class OracleServiceCloudObjectDataset : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - writer.WritePropertyName("type"u8); - writer.WriteStringValue(DatasetType); - if (Optional.IsDefined(Description)) - { - writer.WritePropertyName("description"u8); - writer.WriteStringValue(Description); - } - if (Optional.IsDefined(Structure)) - { - writer.WritePropertyName("structure"u8); - JsonSerializer.Serialize(writer, Structure); - } - if (Optional.IsDefined(Schema)) - { - writer.WritePropertyName("schema"u8); - JsonSerializer.Serialize(writer, Schema); - } - writer.WritePropertyName("linkedServiceName"u8); - JsonSerializer.Serialize(writer, LinkedServiceName); if (Optional.IsCollectionDefined(Parameters)) - { - writer.WritePropertyName("parameters"u8); - writer.WriteStartObject(); - foreach (var item in Parameters) - { - writer.WritePropertyName(item.Key); - writer.WriteObjectValue(item.Value); - } - writer.WriteEndObject(); - } - if (Optional.IsCollectionDefined(Annotations)) - { - writer.WritePropertyName("annotations"u8); - writer.WriteStartArray(); - foreach (var item in Annotations) - { - if (item == null) - { - writer.WriteNullValue(); - continue; - } -#if NET6_0_OR_GREATER - writer.WriteRawValue(item); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.ToString()).RootElement); -#endif - } - writer.WriteEndArray(); - } - if (Optional.IsDefined(Folder)) - { - writer.WritePropertyName("folder"u8); - writer.WriteObjectValue(Folder); - } - writer.WritePropertyName("typeProperties"u8); - writer.WriteStartObject(); - if (Optional.IsDefined(TableName)) - { - writer.WritePropertyName("tableName"u8); - JsonSerializer.Serialize(writer, TableName); - } - writer.WriteEndObject(); - foreach (var item in AdditionalProperties) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.Value.ToString()).RootElement); -#endif - } - writer.WriteEndObject(); - } - - internal static OracleServiceCloudObjectDataset DeserializeOracleServiceCloudObjectDataset(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - string type = default; - Optional description = default; - Optional>> structure = default; - Optional>> schema = default; - DataFactoryLinkedServiceReference linkedServiceName = default; - Optional> parameters = default; - Optional> annotations = default; - Optional folder = default; - Optional> tableName = default; - IDictionary> additionalProperties = default; - Dictionary> additionalPropertiesDictionary = new Dictionary>(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("type"u8)) - { - type = property.Value.GetString(); - continue; - } - if (property.NameEquals("description"u8)) - { - description = property.Value.GetString(); - continue; - } - if (property.NameEquals("structure"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - structure = JsonSerializer.Deserialize>>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("schema"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - schema = JsonSerializer.Deserialize>>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("linkedServiceName"u8)) - { - linkedServiceName = JsonSerializer.Deserialize(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("parameters"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - Dictionary dictionary = new Dictionary(); - foreach (var property0 in property.Value.EnumerateObject()) - { - dictionary.Add(property0.Name, EntityParameterSpecification.DeserializeEntityParameterSpecification(property0.Value)); - } - parameters = dictionary; - continue; - } - if (property.NameEquals("annotations"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - if (item.ValueKind == JsonValueKind.Null) - { - array.Add(null); - } - else - { - array.Add(BinaryData.FromString(item.GetRawText())); - } - } - annotations = array; - continue; - } - if (property.NameEquals("folder"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - folder = DatasetFolder.DeserializeDatasetFolder(property.Value); - continue; - } - if (property.NameEquals("typeProperties"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - foreach (var property0 in property.Value.EnumerateObject()) - { - if (property0.NameEquals("tableName"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - tableName = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - } - continue; - } - additionalPropertiesDictionary.Add(property.Name, JsonSerializer.Deserialize>(property.Value.GetRawText())); - } - additionalProperties = additionalPropertiesDictionary; - return new OracleServiceCloudObjectDataset(type, description.Value, structure.Value, schema.Value, linkedServiceName, Optional.ToDictionary(parameters), Optional.ToList(annotations), folder.Value, additionalProperties, tableName.Value); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/OracleServiceCloudObjectDataset.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/OracleServiceCloudObjectDataset.cs deleted file mode 100644 index 296d6d85..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/OracleServiceCloudObjectDataset.cs +++ /dev/null @@ -1,43 +0,0 @@ -// - -#nullable disable - -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// Oracle Service Cloud dataset. - public partial class OracleServiceCloudObjectDataset : DataFactoryDatasetProperties - { - /// Initializes a new instance of OracleServiceCloudObjectDataset. - /// Linked service reference. - /// is null. - public OracleServiceCloudObjectDataset(DataFactoryLinkedServiceReference linkedServiceName) : base(linkedServiceName) - { - Argument.AssertNotNull(linkedServiceName, nameof(linkedServiceName)); - - DatasetType = "OracleServiceCloudObject"; - } - - /// Initializes a new instance of OracleServiceCloudObjectDataset. - /// Type of dataset. - /// Dataset description. - /// Columns that define the structure of the dataset. Type: array (or Expression with resultType array), itemType: DatasetDataElement. - /// Columns that define the physical type schema of the dataset. Type: array (or Expression with resultType array), itemType: DatasetSchemaDataElement. - /// Linked service reference. - /// Parameters for dataset. - /// List of tags that can be used for describing the Dataset. - /// The folder that this Dataset is in. If not specified, Dataset will appear at the root level. - /// Additional Properties. - /// The table name. Type: string (or Expression with resultType string). - internal OracleServiceCloudObjectDataset(string datasetType, string description, DataFactoryElement> structure, DataFactoryElement> schema, DataFactoryLinkedServiceReference linkedServiceName, IDictionary parameters, IList annotations, DatasetFolder folder, IDictionary> additionalProperties, DataFactoryElement tableName) : base(datasetType, description, structure, schema, linkedServiceName, parameters, annotations, folder, additionalProperties) - { - TableName = tableName; - DatasetType = datasetType ?? "OracleServiceCloudObject"; - } - - /// The table name. Type: string (or Expression with resultType string). - public DataFactoryElement TableName { get; set; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/OracleServiceCloudSource.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/OracleServiceCloudSource.Serialization.cs deleted file mode 100644 index 2e11a1ea..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/OracleServiceCloudSource.Serialization.cs +++ /dev/null @@ -1,161 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class OracleServiceCloudSource : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - if (Optional.IsDefined(Query)) - { - writer.WritePropertyName("query"u8); - JsonSerializer.Serialize(writer, Query); - } - if (Optional.IsDefined(QueryTimeout)) - { - writer.WritePropertyName("queryTimeout"u8); - JsonSerializer.Serialize(writer, QueryTimeout); - } - if (Optional.IsDefined(AdditionalColumns)) - { - writer.WritePropertyName("additionalColumns"u8); -#if NET6_0_OR_GREATER - writer.WriteRawValue(AdditionalColumns); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(AdditionalColumns.ToString()).RootElement); -#endif - } - writer.WritePropertyName("type"u8); - writer.WriteStringValue(CopySourceType); - if (Optional.IsDefined(SourceRetryCount)) - { - writer.WritePropertyName("sourceRetryCount"u8); - JsonSerializer.Serialize(writer, SourceRetryCount); - } - if (Optional.IsDefined(SourceRetryWait)) - { - writer.WritePropertyName("sourceRetryWait"u8); - JsonSerializer.Serialize(writer, SourceRetryWait); - } - if (Optional.IsDefined(MaxConcurrentConnections)) - { - writer.WritePropertyName("maxConcurrentConnections"u8); - JsonSerializer.Serialize(writer, MaxConcurrentConnections); - } - if (Optional.IsDefined(DisableMetricsCollection)) - { - writer.WritePropertyName("disableMetricsCollection"u8); - JsonSerializer.Serialize(writer, DisableMetricsCollection); - } - foreach (var item in AdditionalProperties) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.Value.ToString()).RootElement); -#endif - } - writer.WriteEndObject(); - } - - internal static OracleServiceCloudSource DeserializeOracleServiceCloudSource(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - Optional> query = default; - Optional> queryTimeout = default; - Optional additionalColumns = default; - string type = default; - Optional> sourceRetryCount = default; - Optional> sourceRetryWait = default; - Optional> maxConcurrentConnections = default; - Optional> disableMetricsCollection = default; - IDictionary> additionalProperties = default; - Dictionary> additionalPropertiesDictionary = new Dictionary>(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("query"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - query = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("queryTimeout"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - queryTimeout = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("additionalColumns"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - additionalColumns = BinaryData.FromString(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("type"u8)) - { - type = property.Value.GetString(); - continue; - } - if (property.NameEquals("sourceRetryCount"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - sourceRetryCount = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("sourceRetryWait"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - sourceRetryWait = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("maxConcurrentConnections"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - maxConcurrentConnections = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("disableMetricsCollection"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - disableMetricsCollection = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - additionalPropertiesDictionary.Add(property.Name, JsonSerializer.Deserialize>(property.Value.GetRawText())); - } - additionalProperties = additionalPropertiesDictionary; - return new OracleServiceCloudSource(type, sourceRetryCount.Value, sourceRetryWait.Value, maxConcurrentConnections.Value, disableMetricsCollection.Value, additionalProperties, queryTimeout.Value, additionalColumns.Value, query.Value); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/OracleServiceCloudSource.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/OracleServiceCloudSource.cs deleted file mode 100644 index 4f235b41..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/OracleServiceCloudSource.cs +++ /dev/null @@ -1,37 +0,0 @@ -// - -#nullable disable - -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// A copy activity Oracle Service Cloud source. - public partial class OracleServiceCloudSource : TabularSource - { - /// Initializes a new instance of OracleServiceCloudSource. - public OracleServiceCloudSource() - { - CopySourceType = "OracleServiceCloudSource"; - } - - /// Initializes a new instance of OracleServiceCloudSource. - /// Copy source type. - /// Source retry count. Type: integer (or Expression with resultType integer). - /// Source retry wait. Type: string (or Expression with resultType string), pattern: ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). - /// The maximum concurrent connection count for the source data store. Type: integer (or Expression with resultType integer). - /// If true, disable data store metrics collection. Default is false. Type: boolean (or Expression with resultType boolean). - /// Additional Properties. - /// 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). - /// A query to retrieve data from source. Type: string (or Expression with resultType string). - internal OracleServiceCloudSource(string copySourceType, DataFactoryElement sourceRetryCount, DataFactoryElement sourceRetryWait, DataFactoryElement maxConcurrentConnections, DataFactoryElement disableMetricsCollection, IDictionary> additionalProperties, DataFactoryElement queryTimeout, BinaryData additionalColumns, DataFactoryElement query) : base(copySourceType, sourceRetryCount, sourceRetryWait, maxConcurrentConnections, disableMetricsCollection, additionalProperties, queryTimeout, additionalColumns) - { - Query = query; - CopySourceType = copySourceType ?? "OracleServiceCloudSource"; - } - - /// A query to retrieve data from source. Type: string (or Expression with resultType string). - public DataFactoryElement Query { get; set; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/OracleSink.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/OracleSink.Serialization.cs deleted file mode 100644 index 1540ccd8..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/OracleSink.Serialization.cs +++ /dev/null @@ -1,157 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class OracleSink : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - if (Optional.IsDefined(PreCopyScript)) - { - writer.WritePropertyName("preCopyScript"u8); - JsonSerializer.Serialize(writer, PreCopyScript); - } - writer.WritePropertyName("type"u8); - writer.WriteStringValue(CopySinkType); - if (Optional.IsDefined(WriteBatchSize)) - { - writer.WritePropertyName("writeBatchSize"u8); - JsonSerializer.Serialize(writer, WriteBatchSize); - } - if (Optional.IsDefined(WriteBatchTimeout)) - { - writer.WritePropertyName("writeBatchTimeout"u8); - JsonSerializer.Serialize(writer, WriteBatchTimeout); - } - if (Optional.IsDefined(SinkRetryCount)) - { - writer.WritePropertyName("sinkRetryCount"u8); - JsonSerializer.Serialize(writer, SinkRetryCount); - } - if (Optional.IsDefined(SinkRetryWait)) - { - writer.WritePropertyName("sinkRetryWait"u8); - JsonSerializer.Serialize(writer, SinkRetryWait); - } - if (Optional.IsDefined(MaxConcurrentConnections)) - { - writer.WritePropertyName("maxConcurrentConnections"u8); - JsonSerializer.Serialize(writer, MaxConcurrentConnections); - } - if (Optional.IsDefined(DisableMetricsCollection)) - { - writer.WritePropertyName("disableMetricsCollection"u8); - JsonSerializer.Serialize(writer, DisableMetricsCollection); - } - foreach (var item in AdditionalProperties) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.Value.ToString()).RootElement); -#endif - } - writer.WriteEndObject(); - } - - internal static OracleSink DeserializeOracleSink(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - Optional> preCopyScript = default; - string type = default; - Optional> writeBatchSize = default; - Optional> writeBatchTimeout = default; - Optional> sinkRetryCount = default; - Optional> sinkRetryWait = default; - Optional> maxConcurrentConnections = default; - Optional> disableMetricsCollection = default; - IDictionary> additionalProperties = default; - Dictionary> additionalPropertiesDictionary = new Dictionary>(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("preCopyScript"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - preCopyScript = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("type"u8)) - { - type = property.Value.GetString(); - continue; - } - if (property.NameEquals("writeBatchSize"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - writeBatchSize = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("writeBatchTimeout"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - writeBatchTimeout = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("sinkRetryCount"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - sinkRetryCount = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("sinkRetryWait"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - sinkRetryWait = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("maxConcurrentConnections"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - maxConcurrentConnections = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("disableMetricsCollection"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - disableMetricsCollection = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - additionalPropertiesDictionary.Add(property.Name, JsonSerializer.Deserialize>(property.Value.GetRawText())); - } - additionalProperties = additionalPropertiesDictionary; - return new OracleSink(type, writeBatchSize.Value, writeBatchTimeout.Value, sinkRetryCount.Value, sinkRetryWait.Value, maxConcurrentConnections.Value, disableMetricsCollection.Value, additionalProperties, preCopyScript.Value); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/OracleSink.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/OracleSink.cs deleted file mode 100644 index 787b09a7..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/OracleSink.cs +++ /dev/null @@ -1,37 +0,0 @@ -// - -#nullable disable - -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// A copy activity Oracle sink. - public partial class OracleSink : CopySink - { - /// Initializes a new instance of OracleSink. - public OracleSink() - { - CopySinkType = "OracleSink"; - } - - /// Initializes a new instance of OracleSink. - /// Copy sink type. - /// Write batch size. Type: integer (or Expression with resultType integer), minimum: 0. - /// Write batch timeout. Type: string (or Expression with resultType string), pattern: ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). - /// Sink retry count. Type: integer (or Expression with resultType integer). - /// Sink retry wait. Type: string (or Expression with resultType string), pattern: ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). - /// The maximum concurrent connection count for the sink data store. Type: integer (or Expression with resultType integer). - /// If true, disable data store metrics collection. Default is false. Type: boolean (or Expression with resultType boolean). - /// Additional Properties. - /// SQL pre-copy script. Type: string (or Expression with resultType string). - internal OracleSink(string copySinkType, DataFactoryElement writeBatchSize, DataFactoryElement writeBatchTimeout, DataFactoryElement sinkRetryCount, DataFactoryElement sinkRetryWait, DataFactoryElement maxConcurrentConnections, DataFactoryElement disableMetricsCollection, IDictionary> additionalProperties, DataFactoryElement preCopyScript) : base(copySinkType, writeBatchSize, writeBatchTimeout, sinkRetryCount, sinkRetryWait, maxConcurrentConnections, disableMetricsCollection, additionalProperties) - { - PreCopyScript = preCopyScript; - CopySinkType = copySinkType ?? "OracleSink"; - } - - /// SQL pre-copy script. Type: string (or Expression with resultType string). - public DataFactoryElement PreCopyScript { get; set; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/OracleSource.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/OracleSource.Serialization.cs deleted file mode 100644 index 008961ef..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/OracleSource.Serialization.cs +++ /dev/null @@ -1,195 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class OracleSource : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - if (Optional.IsDefined(OracleReaderQuery)) - { - writer.WritePropertyName("oracleReaderQuery"u8); - JsonSerializer.Serialize(writer, OracleReaderQuery); - } - if (Optional.IsDefined(QueryTimeout)) - { - writer.WritePropertyName("queryTimeout"u8); - JsonSerializer.Serialize(writer, QueryTimeout); - } - if (Optional.IsDefined(PartitionOption)) - { - writer.WritePropertyName("partitionOption"u8); -#if NET6_0_OR_GREATER - writer.WriteRawValue(PartitionOption); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(PartitionOption.ToString()).RootElement); -#endif - } - if (Optional.IsDefined(PartitionSettings)) - { - writer.WritePropertyName("partitionSettings"u8); - writer.WriteObjectValue(PartitionSettings); - } - if (Optional.IsDefined(AdditionalColumns)) - { - writer.WritePropertyName("additionalColumns"u8); -#if NET6_0_OR_GREATER - writer.WriteRawValue(AdditionalColumns); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(AdditionalColumns.ToString()).RootElement); -#endif - } - writer.WritePropertyName("type"u8); - writer.WriteStringValue(CopySourceType); - if (Optional.IsDefined(SourceRetryCount)) - { - writer.WritePropertyName("sourceRetryCount"u8); - JsonSerializer.Serialize(writer, SourceRetryCount); - } - if (Optional.IsDefined(SourceRetryWait)) - { - writer.WritePropertyName("sourceRetryWait"u8); - JsonSerializer.Serialize(writer, SourceRetryWait); - } - if (Optional.IsDefined(MaxConcurrentConnections)) - { - writer.WritePropertyName("maxConcurrentConnections"u8); - JsonSerializer.Serialize(writer, MaxConcurrentConnections); - } - if (Optional.IsDefined(DisableMetricsCollection)) - { - writer.WritePropertyName("disableMetricsCollection"u8); - JsonSerializer.Serialize(writer, DisableMetricsCollection); - } - foreach (var item in AdditionalProperties) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.Value.ToString()).RootElement); -#endif - } - writer.WriteEndObject(); - } - - internal static OracleSource DeserializeOracleSource(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - Optional> oracleReaderQuery = default; - Optional> queryTimeout = default; - Optional partitionOption = default; - Optional partitionSettings = default; - Optional additionalColumns = default; - string type = default; - Optional> sourceRetryCount = default; - Optional> sourceRetryWait = default; - Optional> maxConcurrentConnections = default; - Optional> disableMetricsCollection = default; - IDictionary> additionalProperties = default; - Dictionary> additionalPropertiesDictionary = new Dictionary>(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("oracleReaderQuery"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - oracleReaderQuery = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("queryTimeout"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - queryTimeout = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("partitionOption"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - partitionOption = BinaryData.FromString(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("partitionSettings"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - partitionSettings = OraclePartitionSettings.DeserializeOraclePartitionSettings(property.Value); - continue; - } - if (property.NameEquals("additionalColumns"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - additionalColumns = BinaryData.FromString(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("type"u8)) - { - type = property.Value.GetString(); - continue; - } - if (property.NameEquals("sourceRetryCount"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - sourceRetryCount = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("sourceRetryWait"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - sourceRetryWait = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("maxConcurrentConnections"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - maxConcurrentConnections = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("disableMetricsCollection"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - disableMetricsCollection = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - additionalPropertiesDictionary.Add(property.Name, JsonSerializer.Deserialize>(property.Value.GetRawText())); - } - additionalProperties = additionalPropertiesDictionary; - return new OracleSource(type, sourceRetryCount.Value, sourceRetryWait.Value, maxConcurrentConnections.Value, disableMetricsCollection.Value, additionalProperties, oracleReaderQuery.Value, queryTimeout.Value, partitionOption.Value, partitionSettings.Value, additionalColumns.Value); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/OracleSource.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/OracleSource.cs deleted file mode 100644 index fb166a73..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/OracleSource.cs +++ /dev/null @@ -1,109 +0,0 @@ -// - -#nullable disable - -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// A copy activity Oracle source. - public partial class OracleSource : CopyActivitySource - { - /// Initializes a new instance of OracleSource. - public OracleSource() - { - CopySourceType = "OracleSource"; - } - - /// Initializes a new instance of OracleSource. - /// Copy source type. - /// Source retry count. Type: integer (or Expression with resultType integer). - /// Source retry wait. Type: string (or Expression with resultType string), pattern: ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). - /// The maximum concurrent connection count for the source data store. Type: integer (or Expression with resultType integer). - /// If true, disable data store metrics collection. Default is false. Type: boolean (or Expression with resultType boolean). - /// Additional Properties. - /// Oracle reader query. Type: string (or Expression with resultType string). - /// Query timeout. Type: string (or Expression with resultType string), pattern: ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). - /// The partition mechanism that will be used for Oracle read in parallel. Possible values include: "None", "PhysicalPartitionsOfTable", "DynamicRange". - /// The settings that will be leveraged for Oracle source partitioning. - /// Specifies the additional columns to be added to source data. Type: array of objects(AdditionalColumns) (or Expression with resultType array of objects). - internal OracleSource(string copySourceType, DataFactoryElement sourceRetryCount, DataFactoryElement sourceRetryWait, DataFactoryElement maxConcurrentConnections, DataFactoryElement disableMetricsCollection, IDictionary> additionalProperties, DataFactoryElement oracleReaderQuery, DataFactoryElement queryTimeout, BinaryData partitionOption, OraclePartitionSettings partitionSettings, BinaryData additionalColumns) : base(copySourceType, sourceRetryCount, sourceRetryWait, maxConcurrentConnections, disableMetricsCollection, additionalProperties) - { - OracleReaderQuery = oracleReaderQuery; - QueryTimeout = queryTimeout; - PartitionOption = partitionOption; - PartitionSettings = partitionSettings; - AdditionalColumns = additionalColumns; - CopySourceType = copySourceType ?? "OracleSource"; - } - - /// Oracle reader query. Type: string (or Expression with resultType string). - public DataFactoryElement OracleReaderQuery { get; set; } - /// Query timeout. Type: string (or Expression with resultType string), pattern: ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). - public DataFactoryElement QueryTimeout { get; set; } - /// - /// The partition mechanism that will be used for Oracle read in parallel. Possible values include: "None", "PhysicalPartitionsOfTable", "DynamicRange". - /// - /// To assign an object to this property use . - /// - /// - /// To assign an already formated json string to this property use . - /// - /// - /// Examples: - /// - /// - /// BinaryData.FromObjectAsJson("foo") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromString("\"foo\"") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromObjectAsJson(new { key = "value" }) - /// Creates a payload of { "key": "value" }. - /// - /// - /// BinaryData.FromString("{\"key\": \"value\"}") - /// Creates a payload of { "key": "value" }. - /// - /// - /// - /// - public BinaryData PartitionOption { get; set; } - /// The settings that will be leveraged for Oracle source partitioning. - public OraclePartitionSettings PartitionSettings { get; set; } - /// - /// Specifies the additional columns to be added to source data. Type: array of objects(AdditionalColumns) (or Expression with resultType array of objects). - /// - /// To assign an object to this property use . - /// - /// - /// To assign an already formated json string to this property use . - /// - /// - /// Examples: - /// - /// - /// BinaryData.FromObjectAsJson("foo") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromString("\"foo\"") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromObjectAsJson(new { key = "value" }) - /// Creates a payload of { "key": "value" }. - /// - /// - /// BinaryData.FromString("{\"key\": \"value\"}") - /// Creates a payload of { "key": "value" }. - /// - /// - /// - /// - public BinaryData AdditionalColumns { get; set; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/OracleTableDataset.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/OracleTableDataset.Serialization.cs deleted file mode 100644 index c4569369..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/OracleTableDataset.Serialization.cs +++ /dev/null @@ -1,246 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class OracleTableDataset : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - writer.WritePropertyName("type"u8); - writer.WriteStringValue(DatasetType); - if (Optional.IsDefined(Description)) - { - writer.WritePropertyName("description"u8); - writer.WriteStringValue(Description); - } - if (Optional.IsDefined(Structure)) - { - writer.WritePropertyName("structure"u8); - JsonSerializer.Serialize(writer, Structure); - } - if (Optional.IsDefined(Schema)) - { - writer.WritePropertyName("schema"u8); - JsonSerializer.Serialize(writer, Schema); - } - writer.WritePropertyName("linkedServiceName"u8); - JsonSerializer.Serialize(writer, LinkedServiceName); if (Optional.IsCollectionDefined(Parameters)) - { - writer.WritePropertyName("parameters"u8); - writer.WriteStartObject(); - foreach (var item in Parameters) - { - writer.WritePropertyName(item.Key); - writer.WriteObjectValue(item.Value); - } - writer.WriteEndObject(); - } - if (Optional.IsCollectionDefined(Annotations)) - { - writer.WritePropertyName("annotations"u8); - writer.WriteStartArray(); - foreach (var item in Annotations) - { - if (item == null) - { - writer.WriteNullValue(); - continue; - } -#if NET6_0_OR_GREATER - writer.WriteRawValue(item); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.ToString()).RootElement); -#endif - } - writer.WriteEndArray(); - } - if (Optional.IsDefined(Folder)) - { - writer.WritePropertyName("folder"u8); - writer.WriteObjectValue(Folder); - } - writer.WritePropertyName("typeProperties"u8); - writer.WriteStartObject(); - if (Optional.IsDefined(TableName)) - { - writer.WritePropertyName("tableName"u8); -#if NET6_0_OR_GREATER - writer.WriteRawValue(TableName); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(TableName.ToString()).RootElement); -#endif - } - if (Optional.IsDefined(SchemaTypePropertiesSchema)) - { - writer.WritePropertyName("schema"u8); - JsonSerializer.Serialize(writer, SchemaTypePropertiesSchema); - } - if (Optional.IsDefined(Table)) - { - writer.WritePropertyName("table"u8); - JsonSerializer.Serialize(writer, Table); - } - writer.WriteEndObject(); - foreach (var item in AdditionalProperties) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.Value.ToString()).RootElement); -#endif - } - writer.WriteEndObject(); - } - - internal static OracleTableDataset DeserializeOracleTableDataset(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - string type = default; - Optional description = default; - Optional>> structure = default; - Optional>> schema = default; - DataFactoryLinkedServiceReference linkedServiceName = default; - Optional> parameters = default; - Optional> annotations = default; - Optional folder = default; - Optional tableName = default; - Optional> schema0 = default; - Optional> table = default; - IDictionary> additionalProperties = default; - Dictionary> additionalPropertiesDictionary = new Dictionary>(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("type"u8)) - { - type = property.Value.GetString(); - continue; - } - if (property.NameEquals("description"u8)) - { - description = property.Value.GetString(); - continue; - } - if (property.NameEquals("structure"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - structure = JsonSerializer.Deserialize>>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("schema"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - schema = JsonSerializer.Deserialize>>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("linkedServiceName"u8)) - { - linkedServiceName = JsonSerializer.Deserialize(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("parameters"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - Dictionary dictionary = new Dictionary(); - foreach (var property0 in property.Value.EnumerateObject()) - { - dictionary.Add(property0.Name, EntityParameterSpecification.DeserializeEntityParameterSpecification(property0.Value)); - } - parameters = dictionary; - continue; - } - if (property.NameEquals("annotations"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - if (item.ValueKind == JsonValueKind.Null) - { - array.Add(null); - } - else - { - array.Add(BinaryData.FromString(item.GetRawText())); - } - } - annotations = array; - continue; - } - if (property.NameEquals("folder"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - folder = DatasetFolder.DeserializeDatasetFolder(property.Value); - continue; - } - if (property.NameEquals("typeProperties"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - foreach (var property0 in property.Value.EnumerateObject()) - { - if (property0.NameEquals("tableName"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - tableName = BinaryData.FromString(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("schema"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - schema0 = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("table"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - table = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - } - continue; - } - additionalPropertiesDictionary.Add(property.Name, JsonSerializer.Deserialize>(property.Value.GetRawText())); - } - additionalProperties = additionalPropertiesDictionary; - return new OracleTableDataset(type, description.Value, structure.Value, schema.Value, linkedServiceName, Optional.ToDictionary(parameters), Optional.ToList(annotations), folder.Value, additionalProperties, tableName.Value, schema0.Value, table.Value); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/OracleTableDataset.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/OracleTableDataset.cs deleted file mode 100644 index 3b58d0aa..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/OracleTableDataset.cs +++ /dev/null @@ -1,80 +0,0 @@ -// - -#nullable disable - -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// The on-premises Oracle database dataset. - public partial class OracleTableDataset : DataFactoryDatasetProperties - { - /// Initializes a new instance of OracleTableDataset. - /// Linked service reference. - /// is null. - public OracleTableDataset(DataFactoryLinkedServiceReference linkedServiceName) : base(linkedServiceName) - { - Argument.AssertNotNull(linkedServiceName, nameof(linkedServiceName)); - - DatasetType = "OracleTable"; - } - - /// Initializes a new instance of OracleTableDataset. - /// Type of dataset. - /// Dataset description. - /// Columns that define the structure of the dataset. Type: array (or Expression with resultType array), itemType: DatasetDataElement. - /// Columns that define the physical type schema of the dataset. Type: array (or Expression with resultType array), itemType: DatasetSchemaDataElement. - /// Linked service reference. - /// Parameters for dataset. - /// List of tags that can be used for describing the Dataset. - /// The folder that this Dataset is in. If not specified, Dataset will appear at the root level. - /// Additional Properties. - /// This property will be retired. Please consider using schema + table properties instead. - /// The schema name of the on-premises Oracle database. Type: string (or Expression with resultType string). - /// The table name of the on-premises Oracle database. Type: string (or Expression with resultType string). - internal OracleTableDataset(string datasetType, string description, DataFactoryElement> structure, DataFactoryElement> schema, DataFactoryLinkedServiceReference linkedServiceName, IDictionary parameters, IList annotations, DatasetFolder folder, IDictionary> additionalProperties, BinaryData tableName, DataFactoryElement schemaTypePropertiesSchema, DataFactoryElement table) : base(datasetType, description, structure, schema, linkedServiceName, parameters, annotations, folder, additionalProperties) - { - TableName = tableName; - SchemaTypePropertiesSchema = schemaTypePropertiesSchema; - Table = table; - DatasetType = datasetType ?? "OracleTable"; - } - - /// - /// This property will be retired. Please consider using schema + table properties instead. - /// - /// To assign an object to this property use . - /// - /// - /// To assign an already formated json string to this property use . - /// - /// - /// Examples: - /// - /// - /// BinaryData.FromObjectAsJson("foo") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromString("\"foo\"") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromObjectAsJson(new { key = "value" }) - /// Creates a payload of { "key": "value" }. - /// - /// - /// BinaryData.FromString("{\"key\": \"value\"}") - /// Creates a payload of { "key": "value" }. - /// - /// - /// - /// - public BinaryData TableName { get; set; } - /// The schema name of the on-premises Oracle database. Type: string (or Expression with resultType string). - public DataFactoryElement SchemaTypePropertiesSchema { get; set; } - /// The table name of the on-premises Oracle database. Type: string (or Expression with resultType string). - public DataFactoryElement Table { get; set; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/OrcDataset.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/OrcDataset.Serialization.cs deleted file mode 100644 index ea471df8..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/OrcDataset.Serialization.cs +++ /dev/null @@ -1,227 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class OrcDataset : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - writer.WritePropertyName("type"u8); - writer.WriteStringValue(DatasetType); - if (Optional.IsDefined(Description)) - { - writer.WritePropertyName("description"u8); - writer.WriteStringValue(Description); - } - if (Optional.IsDefined(Structure)) - { - writer.WritePropertyName("structure"u8); - JsonSerializer.Serialize(writer, Structure); - } - if (Optional.IsDefined(Schema)) - { - writer.WritePropertyName("schema"u8); - JsonSerializer.Serialize(writer, Schema); - } - writer.WritePropertyName("linkedServiceName"u8); - JsonSerializer.Serialize(writer, LinkedServiceName); if (Optional.IsCollectionDefined(Parameters)) - { - writer.WritePropertyName("parameters"u8); - writer.WriteStartObject(); - foreach (var item in Parameters) - { - writer.WritePropertyName(item.Key); - writer.WriteObjectValue(item.Value); - } - writer.WriteEndObject(); - } - if (Optional.IsCollectionDefined(Annotations)) - { - writer.WritePropertyName("annotations"u8); - writer.WriteStartArray(); - foreach (var item in Annotations) - { - if (item == null) - { - writer.WriteNullValue(); - continue; - } -#if NET6_0_OR_GREATER - writer.WriteRawValue(item); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.ToString()).RootElement); -#endif - } - writer.WriteEndArray(); - } - if (Optional.IsDefined(Folder)) - { - writer.WritePropertyName("folder"u8); - writer.WriteObjectValue(Folder); - } - writer.WritePropertyName("typeProperties"u8); - writer.WriteStartObject(); - if (Optional.IsDefined(DataLocation)) - { - writer.WritePropertyName("location"u8); - writer.WriteObjectValue(DataLocation); - } - if (Optional.IsDefined(OrcCompressionCodec)) - { - writer.WritePropertyName("orcCompressionCodec"u8); - JsonSerializer.Serialize(writer, OrcCompressionCodec); - } - writer.WriteEndObject(); - foreach (var item in AdditionalProperties) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.Value.ToString()).RootElement); -#endif - } - writer.WriteEndObject(); - } - - internal static OrcDataset DeserializeOrcDataset(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - string type = default; - Optional description = default; - Optional>> structure = default; - Optional>> schema = default; - DataFactoryLinkedServiceReference linkedServiceName = default; - Optional> parameters = default; - Optional> annotations = default; - Optional folder = default; - Optional location = default; - Optional> orcCompressionCodec = default; - IDictionary> additionalProperties = default; - Dictionary> additionalPropertiesDictionary = new Dictionary>(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("type"u8)) - { - type = property.Value.GetString(); - continue; - } - if (property.NameEquals("description"u8)) - { - description = property.Value.GetString(); - continue; - } - if (property.NameEquals("structure"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - structure = JsonSerializer.Deserialize>>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("schema"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - schema = JsonSerializer.Deserialize>>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("linkedServiceName"u8)) - { - linkedServiceName = JsonSerializer.Deserialize(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("parameters"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - Dictionary dictionary = new Dictionary(); - foreach (var property0 in property.Value.EnumerateObject()) - { - dictionary.Add(property0.Name, EntityParameterSpecification.DeserializeEntityParameterSpecification(property0.Value)); - } - parameters = dictionary; - continue; - } - if (property.NameEquals("annotations"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - if (item.ValueKind == JsonValueKind.Null) - { - array.Add(null); - } - else - { - array.Add(BinaryData.FromString(item.GetRawText())); - } - } - annotations = array; - continue; - } - if (property.NameEquals("folder"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - folder = DatasetFolder.DeserializeDatasetFolder(property.Value); - continue; - } - if (property.NameEquals("typeProperties"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - foreach (var property0 in property.Value.EnumerateObject()) - { - if (property0.NameEquals("location"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - location = DatasetLocation.DeserializeDatasetLocation(property0.Value); - continue; - } - if (property0.NameEquals("orcCompressionCodec"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - orcCompressionCodec = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - } - continue; - } - additionalPropertiesDictionary.Add(property.Name, JsonSerializer.Deserialize>(property.Value.GetRawText())); - } - additionalProperties = additionalPropertiesDictionary; - return new OrcDataset(type, description.Value, structure.Value, schema.Value, linkedServiceName, Optional.ToDictionary(parameters), Optional.ToList(annotations), folder.Value, additionalProperties, location.Value, orcCompressionCodec.Value); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/OrcDataset.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/OrcDataset.cs deleted file mode 100644 index 4f195d41..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/OrcDataset.cs +++ /dev/null @@ -1,55 +0,0 @@ -// - -#nullable disable - -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// ORC dataset. - public partial class OrcDataset : DataFactoryDatasetProperties - { - /// Initializes a new instance of OrcDataset. - /// Linked service reference. - /// is null. - public OrcDataset(DataFactoryLinkedServiceReference linkedServiceName) : base(linkedServiceName) - { - Argument.AssertNotNull(linkedServiceName, nameof(linkedServiceName)); - - DatasetType = "Orc"; - } - - /// Initializes a new instance of OrcDataset. - /// Type of dataset. - /// Dataset description. - /// Columns that define the structure of the dataset. Type: array (or Expression with resultType array), itemType: DatasetDataElement. - /// Columns that define the physical type schema of the dataset. Type: array (or Expression with resultType array), itemType: DatasetSchemaDataElement. - /// Linked service reference. - /// Parameters for dataset. - /// List of tags that can be used for describing the Dataset. - /// The folder that this Dataset is in. If not specified, Dataset will appear at the root level. - /// Additional Properties. - /// - /// The location of the ORC data storage. - /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. - /// The available derived classes include , , , , , , , , , , , and . - /// - /// The data orcCompressionCodec. Type: string (or Expression with resultType string). - internal OrcDataset(string datasetType, string description, DataFactoryElement> structure, DataFactoryElement> schema, DataFactoryLinkedServiceReference linkedServiceName, IDictionary parameters, IList annotations, DatasetFolder folder, IDictionary> additionalProperties, DatasetLocation dataLocation, DataFactoryElement orcCompressionCodec) : base(datasetType, description, structure, schema, linkedServiceName, parameters, annotations, folder, additionalProperties) - { - DataLocation = dataLocation; - OrcCompressionCodec = orcCompressionCodec; - DatasetType = datasetType ?? "Orc"; - } - - /// - /// The location of the ORC data storage. - /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. - /// The available derived classes include , , , , , , , , , , , and . - /// - public DatasetLocation DataLocation { get; set; } - /// The data orcCompressionCodec. Type: string (or Expression with resultType string). - public DataFactoryElement OrcCompressionCodec { get; set; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/OrcSink.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/OrcSink.Serialization.cs deleted file mode 100644 index 9ee65041..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/OrcSink.Serialization.cs +++ /dev/null @@ -1,172 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class OrcSink : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - if (Optional.IsDefined(StoreSettings)) - { - writer.WritePropertyName("storeSettings"u8); - writer.WriteObjectValue(StoreSettings); - } - if (Optional.IsDefined(FormatSettings)) - { - writer.WritePropertyName("formatSettings"u8); - writer.WriteObjectValue(FormatSettings); - } - writer.WritePropertyName("type"u8); - writer.WriteStringValue(CopySinkType); - if (Optional.IsDefined(WriteBatchSize)) - { - writer.WritePropertyName("writeBatchSize"u8); - JsonSerializer.Serialize(writer, WriteBatchSize); - } - if (Optional.IsDefined(WriteBatchTimeout)) - { - writer.WritePropertyName("writeBatchTimeout"u8); - JsonSerializer.Serialize(writer, WriteBatchTimeout); - } - if (Optional.IsDefined(SinkRetryCount)) - { - writer.WritePropertyName("sinkRetryCount"u8); - JsonSerializer.Serialize(writer, SinkRetryCount); - } - if (Optional.IsDefined(SinkRetryWait)) - { - writer.WritePropertyName("sinkRetryWait"u8); - JsonSerializer.Serialize(writer, SinkRetryWait); - } - if (Optional.IsDefined(MaxConcurrentConnections)) - { - writer.WritePropertyName("maxConcurrentConnections"u8); - JsonSerializer.Serialize(writer, MaxConcurrentConnections); - } - if (Optional.IsDefined(DisableMetricsCollection)) - { - writer.WritePropertyName("disableMetricsCollection"u8); - JsonSerializer.Serialize(writer, DisableMetricsCollection); - } - foreach (var item in AdditionalProperties) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.Value.ToString()).RootElement); -#endif - } - writer.WriteEndObject(); - } - - internal static OrcSink DeserializeOrcSink(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - Optional storeSettings = default; - Optional formatSettings = default; - string type = default; - Optional> writeBatchSize = default; - Optional> writeBatchTimeout = default; - Optional> sinkRetryCount = default; - Optional> sinkRetryWait = default; - Optional> maxConcurrentConnections = default; - Optional> disableMetricsCollection = default; - IDictionary> additionalProperties = default; - Dictionary> additionalPropertiesDictionary = new Dictionary>(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("storeSettings"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - storeSettings = StoreWriteSettings.DeserializeStoreWriteSettings(property.Value); - continue; - } - if (property.NameEquals("formatSettings"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - formatSettings = OrcWriteSettings.DeserializeOrcWriteSettings(property.Value); - continue; - } - if (property.NameEquals("type"u8)) - { - type = property.Value.GetString(); - continue; - } - if (property.NameEquals("writeBatchSize"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - writeBatchSize = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("writeBatchTimeout"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - writeBatchTimeout = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("sinkRetryCount"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - sinkRetryCount = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("sinkRetryWait"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - sinkRetryWait = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("maxConcurrentConnections"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - maxConcurrentConnections = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("disableMetricsCollection"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - disableMetricsCollection = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - additionalPropertiesDictionary.Add(property.Name, JsonSerializer.Deserialize>(property.Value.GetRawText())); - } - additionalProperties = additionalPropertiesDictionary; - return new OrcSink(type, writeBatchSize.Value, writeBatchTimeout.Value, sinkRetryCount.Value, sinkRetryWait.Value, maxConcurrentConnections.Value, disableMetricsCollection.Value, additionalProperties, storeSettings.Value, formatSettings.Value); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/OrcSink.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/OrcSink.cs deleted file mode 100644 index 12bb5385..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/OrcSink.cs +++ /dev/null @@ -1,49 +0,0 @@ -// - -#nullable disable - -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// A copy activity ORC sink. - public partial class OrcSink : CopySink - { - /// Initializes a new instance of OrcSink. - public OrcSink() - { - CopySinkType = "OrcSink"; - } - - /// Initializes a new instance of OrcSink. - /// Copy sink type. - /// Write batch size. Type: integer (or Expression with resultType integer), minimum: 0. - /// Write batch timeout. Type: string (or Expression with resultType string), pattern: ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). - /// Sink retry count. Type: integer (or Expression with resultType integer). - /// Sink retry wait. Type: string (or Expression with resultType string), pattern: ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). - /// The maximum concurrent connection count for the sink data store. Type: integer (or Expression with resultType integer). - /// If true, disable data store metrics collection. Default is false. Type: boolean (or Expression with resultType boolean). - /// Additional Properties. - /// - /// ORC store settings. - /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. - /// The available derived classes include , , , , and . - /// - /// ORC format settings. - internal OrcSink(string copySinkType, DataFactoryElement writeBatchSize, DataFactoryElement writeBatchTimeout, DataFactoryElement sinkRetryCount, DataFactoryElement sinkRetryWait, DataFactoryElement maxConcurrentConnections, DataFactoryElement disableMetricsCollection, IDictionary> additionalProperties, StoreWriteSettings storeSettings, OrcWriteSettings formatSettings) : base(copySinkType, writeBatchSize, writeBatchTimeout, sinkRetryCount, sinkRetryWait, maxConcurrentConnections, disableMetricsCollection, additionalProperties) - { - StoreSettings = storeSettings; - FormatSettings = formatSettings; - CopySinkType = copySinkType ?? "OrcSink"; - } - - /// - /// ORC store settings. - /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. - /// The available derived classes include , , , , and . - /// - public StoreWriteSettings StoreSettings { get; set; } - /// ORC format settings. - public OrcWriteSettings FormatSettings { get; set; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/OrcSource.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/OrcSource.Serialization.cs deleted file mode 100644 index 707870b7..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/OrcSource.Serialization.cs +++ /dev/null @@ -1,146 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class OrcSource : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - if (Optional.IsDefined(StoreSettings)) - { - writer.WritePropertyName("storeSettings"u8); - writer.WriteObjectValue(StoreSettings); - } - if (Optional.IsDefined(AdditionalColumns)) - { - writer.WritePropertyName("additionalColumns"u8); -#if NET6_0_OR_GREATER - writer.WriteRawValue(AdditionalColumns); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(AdditionalColumns.ToString()).RootElement); -#endif - } - writer.WritePropertyName("type"u8); - writer.WriteStringValue(CopySourceType); - if (Optional.IsDefined(SourceRetryCount)) - { - writer.WritePropertyName("sourceRetryCount"u8); - JsonSerializer.Serialize(writer, SourceRetryCount); - } - if (Optional.IsDefined(SourceRetryWait)) - { - writer.WritePropertyName("sourceRetryWait"u8); - JsonSerializer.Serialize(writer, SourceRetryWait); - } - if (Optional.IsDefined(MaxConcurrentConnections)) - { - writer.WritePropertyName("maxConcurrentConnections"u8); - JsonSerializer.Serialize(writer, MaxConcurrentConnections); - } - if (Optional.IsDefined(DisableMetricsCollection)) - { - writer.WritePropertyName("disableMetricsCollection"u8); - JsonSerializer.Serialize(writer, DisableMetricsCollection); - } - foreach (var item in AdditionalProperties) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.Value.ToString()).RootElement); -#endif - } - writer.WriteEndObject(); - } - - internal static OrcSource DeserializeOrcSource(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - Optional storeSettings = default; - Optional additionalColumns = default; - string type = default; - Optional> sourceRetryCount = default; - Optional> sourceRetryWait = default; - Optional> maxConcurrentConnections = default; - Optional> disableMetricsCollection = default; - IDictionary> additionalProperties = default; - Dictionary> additionalPropertiesDictionary = new Dictionary>(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("storeSettings"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - storeSettings = StoreReadSettings.DeserializeStoreReadSettings(property.Value); - continue; - } - if (property.NameEquals("additionalColumns"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - additionalColumns = BinaryData.FromString(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("type"u8)) - { - type = property.Value.GetString(); - continue; - } - if (property.NameEquals("sourceRetryCount"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - sourceRetryCount = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("sourceRetryWait"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - sourceRetryWait = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("maxConcurrentConnections"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - maxConcurrentConnections = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("disableMetricsCollection"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - disableMetricsCollection = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - additionalPropertiesDictionary.Add(property.Name, JsonSerializer.Deserialize>(property.Value.GetRawText())); - } - additionalProperties = additionalPropertiesDictionary; - return new OrcSource(type, sourceRetryCount.Value, sourceRetryWait.Value, maxConcurrentConnections.Value, disableMetricsCollection.Value, additionalProperties, storeSettings.Value, additionalColumns.Value); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/OrcSource.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/OrcSource.cs deleted file mode 100644 index 76419f81..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/OrcSource.cs +++ /dev/null @@ -1,76 +0,0 @@ -// - -#nullable disable - -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// A copy activity ORC source. - public partial class OrcSource : CopyActivitySource - { - /// Initializes a new instance of OrcSource. - public OrcSource() - { - CopySourceType = "OrcSource"; - } - - /// Initializes a new instance of OrcSource. - /// Copy source type. - /// Source retry count. Type: integer (or Expression with resultType integer). - /// Source retry wait. Type: string (or Expression with resultType string), pattern: ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). - /// The maximum concurrent connection count for the source data store. Type: integer (or Expression with resultType integer). - /// If true, disable data store metrics collection. Default is false. Type: boolean (or Expression with resultType boolean). - /// Additional Properties. - /// - /// ORC store settings. - /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. - /// The available derived classes include , , , , , , , , , , , and . - /// - /// Specifies the additional columns to be added to source data. Type: array of objects(AdditionalColumns) (or Expression with resultType array of objects). - internal OrcSource(string copySourceType, DataFactoryElement sourceRetryCount, DataFactoryElement sourceRetryWait, DataFactoryElement maxConcurrentConnections, DataFactoryElement disableMetricsCollection, IDictionary> additionalProperties, StoreReadSettings storeSettings, BinaryData additionalColumns) : base(copySourceType, sourceRetryCount, sourceRetryWait, maxConcurrentConnections, disableMetricsCollection, additionalProperties) - { - StoreSettings = storeSettings; - AdditionalColumns = additionalColumns; - CopySourceType = copySourceType ?? "OrcSource"; - } - - /// - /// ORC store settings. - /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. - /// The available derived classes include , , , , , , , , , , , and . - /// - public StoreReadSettings StoreSettings { get; set; } - /// - /// Specifies the additional columns to be added to source data. Type: array of objects(AdditionalColumns) (or Expression with resultType array of objects). - /// - /// To assign an object to this property use . - /// - /// - /// To assign an already formated json string to this property use . - /// - /// - /// Examples: - /// - /// - /// BinaryData.FromObjectAsJson("foo") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromString("\"foo\"") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromObjectAsJson(new { key = "value" }) - /// Creates a payload of { "key": "value" }. - /// - /// - /// BinaryData.FromString("{\"key\": \"value\"}") - /// Creates a payload of { "key": "value" }. - /// - /// - /// - /// - public BinaryData AdditionalColumns { get; set; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/OrcWriteSettings.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/OrcWriteSettings.Serialization.cs deleted file mode 100644 index 1329ad43..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/OrcWriteSettings.Serialization.cs +++ /dev/null @@ -1,82 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class OrcWriteSettings : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - if (Optional.IsDefined(MaxRowsPerFile)) - { - writer.WritePropertyName("maxRowsPerFile"u8); - JsonSerializer.Serialize(writer, MaxRowsPerFile); - } - if (Optional.IsDefined(FileNamePrefix)) - { - writer.WritePropertyName("fileNamePrefix"u8); - JsonSerializer.Serialize(writer, FileNamePrefix); - } - writer.WritePropertyName("type"u8); - writer.WriteStringValue(FormatWriteSettingsType); - foreach (var item in AdditionalProperties) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.Value.ToString()).RootElement); -#endif - } - writer.WriteEndObject(); - } - - internal static OrcWriteSettings DeserializeOrcWriteSettings(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - Optional> maxRowsPerFile = default; - Optional> fileNamePrefix = default; - string type = default; - IDictionary> additionalProperties = default; - Dictionary> additionalPropertiesDictionary = new Dictionary>(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("maxRowsPerFile"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - maxRowsPerFile = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("fileNamePrefix"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - fileNamePrefix = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("type"u8)) - { - type = property.Value.GetString(); - continue; - } - additionalPropertiesDictionary.Add(property.Name, JsonSerializer.Deserialize>(property.Value.GetRawText())); - } - additionalProperties = additionalPropertiesDictionary; - return new OrcWriteSettings(type, additionalProperties, maxRowsPerFile.Value, fileNamePrefix.Value); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/OrcWriteSettings.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/OrcWriteSettings.cs deleted file mode 100644 index a444a983..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/OrcWriteSettings.cs +++ /dev/null @@ -1,35 +0,0 @@ -// - -#nullable disable - -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// Orc write settings. - public partial class OrcWriteSettings : FormatWriteSettings - { - /// Initializes a new instance of OrcWriteSettings. - public OrcWriteSettings() - { - FormatWriteSettingsType = "OrcWriteSettings"; - } - - /// Initializes a new instance of OrcWriteSettings. - /// The write setting type. - /// Additional Properties. - /// Limit the written file's row count to be smaller than or equal to the specified count. Type: integer (or Expression with resultType integer). - /// Specifies the file name pattern <fileNamePrefix>_<fileIndex>.<fileExtension> when copy from non-file based store without partitionOptions. Type: string (or Expression with resultType string). - internal OrcWriteSettings(string formatWriteSettingsType, IDictionary> additionalProperties, DataFactoryElement maxRowsPerFile, DataFactoryElement fileNamePrefix) : base(formatWriteSettingsType, additionalProperties) - { - MaxRowsPerFile = maxRowsPerFile; - FileNamePrefix = fileNamePrefix; - FormatWriteSettingsType = formatWriteSettingsType ?? "OrcWriteSettings"; - } - - /// Limit the written file's row count to be smaller than or equal to the specified count. Type: integer (or Expression with resultType integer). - public DataFactoryElement MaxRowsPerFile { get; set; } - /// Specifies the file name pattern <fileNamePrefix>_<fileIndex>.<fileExtension> when copy from non-file based store without partitionOptions. Type: string (or Expression with resultType string). - public DataFactoryElement FileNamePrefix { get; set; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/ParquetDataset.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/ParquetDataset.Serialization.cs deleted file mode 100644 index 11f497e8..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/ParquetDataset.Serialization.cs +++ /dev/null @@ -1,227 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class ParquetDataset : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - writer.WritePropertyName("type"u8); - writer.WriteStringValue(DatasetType); - if (Optional.IsDefined(Description)) - { - writer.WritePropertyName("description"u8); - writer.WriteStringValue(Description); - } - if (Optional.IsDefined(Structure)) - { - writer.WritePropertyName("structure"u8); - JsonSerializer.Serialize(writer, Structure); - } - if (Optional.IsDefined(Schema)) - { - writer.WritePropertyName("schema"u8); - JsonSerializer.Serialize(writer, Schema); - } - writer.WritePropertyName("linkedServiceName"u8); - JsonSerializer.Serialize(writer, LinkedServiceName); if (Optional.IsCollectionDefined(Parameters)) - { - writer.WritePropertyName("parameters"u8); - writer.WriteStartObject(); - foreach (var item in Parameters) - { - writer.WritePropertyName(item.Key); - writer.WriteObjectValue(item.Value); - } - writer.WriteEndObject(); - } - if (Optional.IsCollectionDefined(Annotations)) - { - writer.WritePropertyName("annotations"u8); - writer.WriteStartArray(); - foreach (var item in Annotations) - { - if (item == null) - { - writer.WriteNullValue(); - continue; - } -#if NET6_0_OR_GREATER - writer.WriteRawValue(item); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.ToString()).RootElement); -#endif - } - writer.WriteEndArray(); - } - if (Optional.IsDefined(Folder)) - { - writer.WritePropertyName("folder"u8); - writer.WriteObjectValue(Folder); - } - writer.WritePropertyName("typeProperties"u8); - writer.WriteStartObject(); - if (Optional.IsDefined(DataLocation)) - { - writer.WritePropertyName("location"u8); - writer.WriteObjectValue(DataLocation); - } - if (Optional.IsDefined(CompressionCodec)) - { - writer.WritePropertyName("compressionCodec"u8); - JsonSerializer.Serialize(writer, CompressionCodec); - } - writer.WriteEndObject(); - foreach (var item in AdditionalProperties) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.Value.ToString()).RootElement); -#endif - } - writer.WriteEndObject(); - } - - internal static ParquetDataset DeserializeParquetDataset(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - string type = default; - Optional description = default; - Optional>> structure = default; - Optional>> schema = default; - DataFactoryLinkedServiceReference linkedServiceName = default; - Optional> parameters = default; - Optional> annotations = default; - Optional folder = default; - Optional location = default; - Optional> compressionCodec = default; - IDictionary> additionalProperties = default; - Dictionary> additionalPropertiesDictionary = new Dictionary>(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("type"u8)) - { - type = property.Value.GetString(); - continue; - } - if (property.NameEquals("description"u8)) - { - description = property.Value.GetString(); - continue; - } - if (property.NameEquals("structure"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - structure = JsonSerializer.Deserialize>>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("schema"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - schema = JsonSerializer.Deserialize>>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("linkedServiceName"u8)) - { - linkedServiceName = JsonSerializer.Deserialize(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("parameters"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - Dictionary dictionary = new Dictionary(); - foreach (var property0 in property.Value.EnumerateObject()) - { - dictionary.Add(property0.Name, EntityParameterSpecification.DeserializeEntityParameterSpecification(property0.Value)); - } - parameters = dictionary; - continue; - } - if (property.NameEquals("annotations"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - if (item.ValueKind == JsonValueKind.Null) - { - array.Add(null); - } - else - { - array.Add(BinaryData.FromString(item.GetRawText())); - } - } - annotations = array; - continue; - } - if (property.NameEquals("folder"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - folder = DatasetFolder.DeserializeDatasetFolder(property.Value); - continue; - } - if (property.NameEquals("typeProperties"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - foreach (var property0 in property.Value.EnumerateObject()) - { - if (property0.NameEquals("location"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - location = DatasetLocation.DeserializeDatasetLocation(property0.Value); - continue; - } - if (property0.NameEquals("compressionCodec"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - compressionCodec = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - } - continue; - } - additionalPropertiesDictionary.Add(property.Name, JsonSerializer.Deserialize>(property.Value.GetRawText())); - } - additionalProperties = additionalPropertiesDictionary; - return new ParquetDataset(type, description.Value, structure.Value, schema.Value, linkedServiceName, Optional.ToDictionary(parameters), Optional.ToList(annotations), folder.Value, additionalProperties, location.Value, compressionCodec.Value); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/ParquetDataset.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/ParquetDataset.cs deleted file mode 100644 index 7a754ffd..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/ParquetDataset.cs +++ /dev/null @@ -1,55 +0,0 @@ -// - -#nullable disable - -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// Parquet dataset. - public partial class ParquetDataset : DataFactoryDatasetProperties - { - /// Initializes a new instance of ParquetDataset. - /// Linked service reference. - /// is null. - public ParquetDataset(DataFactoryLinkedServiceReference linkedServiceName) : base(linkedServiceName) - { - Argument.AssertNotNull(linkedServiceName, nameof(linkedServiceName)); - - DatasetType = "Parquet"; - } - - /// Initializes a new instance of ParquetDataset. - /// Type of dataset. - /// Dataset description. - /// Columns that define the structure of the dataset. Type: array (or Expression with resultType array), itemType: DatasetDataElement. - /// Columns that define the physical type schema of the dataset. Type: array (or Expression with resultType array), itemType: DatasetSchemaDataElement. - /// Linked service reference. - /// Parameters for dataset. - /// List of tags that can be used for describing the Dataset. - /// The folder that this Dataset is in. If not specified, Dataset will appear at the root level. - /// Additional Properties. - /// - /// The location of the parquet storage. - /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. - /// The available derived classes include , , , , , , , , , , , and . - /// - /// The data compressionCodec. Type: string (or Expression with resultType string). - internal ParquetDataset(string datasetType, string description, DataFactoryElement> structure, DataFactoryElement> schema, DataFactoryLinkedServiceReference linkedServiceName, IDictionary parameters, IList annotations, DatasetFolder folder, IDictionary> additionalProperties, DatasetLocation dataLocation, DataFactoryElement compressionCodec) : base(datasetType, description, structure, schema, linkedServiceName, parameters, annotations, folder, additionalProperties) - { - DataLocation = dataLocation; - CompressionCodec = compressionCodec; - DatasetType = datasetType ?? "Parquet"; - } - - /// - /// The location of the parquet storage. - /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. - /// The available derived classes include , , , , , , , , , , , and . - /// - public DatasetLocation DataLocation { get; set; } - /// The data compressionCodec. Type: string (or Expression with resultType string). - public DataFactoryElement CompressionCodec { get; set; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/ParquetSink.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/ParquetSink.Serialization.cs deleted file mode 100644 index 07a4805f..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/ParquetSink.Serialization.cs +++ /dev/null @@ -1,172 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class ParquetSink : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - if (Optional.IsDefined(StoreSettings)) - { - writer.WritePropertyName("storeSettings"u8); - writer.WriteObjectValue(StoreSettings); - } - if (Optional.IsDefined(FormatSettings)) - { - writer.WritePropertyName("formatSettings"u8); - writer.WriteObjectValue(FormatSettings); - } - writer.WritePropertyName("type"u8); - writer.WriteStringValue(CopySinkType); - if (Optional.IsDefined(WriteBatchSize)) - { - writer.WritePropertyName("writeBatchSize"u8); - JsonSerializer.Serialize(writer, WriteBatchSize); - } - if (Optional.IsDefined(WriteBatchTimeout)) - { - writer.WritePropertyName("writeBatchTimeout"u8); - JsonSerializer.Serialize(writer, WriteBatchTimeout); - } - if (Optional.IsDefined(SinkRetryCount)) - { - writer.WritePropertyName("sinkRetryCount"u8); - JsonSerializer.Serialize(writer, SinkRetryCount); - } - if (Optional.IsDefined(SinkRetryWait)) - { - writer.WritePropertyName("sinkRetryWait"u8); - JsonSerializer.Serialize(writer, SinkRetryWait); - } - if (Optional.IsDefined(MaxConcurrentConnections)) - { - writer.WritePropertyName("maxConcurrentConnections"u8); - JsonSerializer.Serialize(writer, MaxConcurrentConnections); - } - if (Optional.IsDefined(DisableMetricsCollection)) - { - writer.WritePropertyName("disableMetricsCollection"u8); - JsonSerializer.Serialize(writer, DisableMetricsCollection); - } - foreach (var item in AdditionalProperties) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.Value.ToString()).RootElement); -#endif - } - writer.WriteEndObject(); - } - - internal static ParquetSink DeserializeParquetSink(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - Optional storeSettings = default; - Optional formatSettings = default; - string type = default; - Optional> writeBatchSize = default; - Optional> writeBatchTimeout = default; - Optional> sinkRetryCount = default; - Optional> sinkRetryWait = default; - Optional> maxConcurrentConnections = default; - Optional> disableMetricsCollection = default; - IDictionary> additionalProperties = default; - Dictionary> additionalPropertiesDictionary = new Dictionary>(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("storeSettings"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - storeSettings = StoreWriteSettings.DeserializeStoreWriteSettings(property.Value); - continue; - } - if (property.NameEquals("formatSettings"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - formatSettings = ParquetWriteSettings.DeserializeParquetWriteSettings(property.Value); - continue; - } - if (property.NameEquals("type"u8)) - { - type = property.Value.GetString(); - continue; - } - if (property.NameEquals("writeBatchSize"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - writeBatchSize = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("writeBatchTimeout"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - writeBatchTimeout = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("sinkRetryCount"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - sinkRetryCount = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("sinkRetryWait"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - sinkRetryWait = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("maxConcurrentConnections"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - maxConcurrentConnections = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("disableMetricsCollection"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - disableMetricsCollection = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - additionalPropertiesDictionary.Add(property.Name, JsonSerializer.Deserialize>(property.Value.GetRawText())); - } - additionalProperties = additionalPropertiesDictionary; - return new ParquetSink(type, writeBatchSize.Value, writeBatchTimeout.Value, sinkRetryCount.Value, sinkRetryWait.Value, maxConcurrentConnections.Value, disableMetricsCollection.Value, additionalProperties, storeSettings.Value, formatSettings.Value); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/ParquetSink.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/ParquetSink.cs deleted file mode 100644 index f8d1b266..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/ParquetSink.cs +++ /dev/null @@ -1,49 +0,0 @@ -// - -#nullable disable - -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// A copy activity Parquet sink. - public partial class ParquetSink : CopySink - { - /// Initializes a new instance of ParquetSink. - public ParquetSink() - { - CopySinkType = "ParquetSink"; - } - - /// Initializes a new instance of ParquetSink. - /// Copy sink type. - /// Write batch size. Type: integer (or Expression with resultType integer), minimum: 0. - /// Write batch timeout. Type: string (or Expression with resultType string), pattern: ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). - /// Sink retry count. Type: integer (or Expression with resultType integer). - /// Sink retry wait. Type: string (or Expression with resultType string), pattern: ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). - /// The maximum concurrent connection count for the sink data store. Type: integer (or Expression with resultType integer). - /// If true, disable data store metrics collection. Default is false. Type: boolean (or Expression with resultType boolean). - /// Additional Properties. - /// - /// Parquet store settings. - /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. - /// The available derived classes include , , , , and . - /// - /// Parquet format settings. - internal ParquetSink(string copySinkType, DataFactoryElement writeBatchSize, DataFactoryElement writeBatchTimeout, DataFactoryElement sinkRetryCount, DataFactoryElement sinkRetryWait, DataFactoryElement maxConcurrentConnections, DataFactoryElement disableMetricsCollection, IDictionary> additionalProperties, StoreWriteSettings storeSettings, ParquetWriteSettings formatSettings) : base(copySinkType, writeBatchSize, writeBatchTimeout, sinkRetryCount, sinkRetryWait, maxConcurrentConnections, disableMetricsCollection, additionalProperties) - { - StoreSettings = storeSettings; - FormatSettings = formatSettings; - CopySinkType = copySinkType ?? "ParquetSink"; - } - - /// - /// Parquet store settings. - /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. - /// The available derived classes include , , , , and . - /// - public StoreWriteSettings StoreSettings { get; set; } - /// Parquet format settings. - public ParquetWriteSettings FormatSettings { get; set; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/ParquetSource.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/ParquetSource.Serialization.cs deleted file mode 100644 index 1f7039cd..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/ParquetSource.Serialization.cs +++ /dev/null @@ -1,146 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class ParquetSource : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - if (Optional.IsDefined(StoreSettings)) - { - writer.WritePropertyName("storeSettings"u8); - writer.WriteObjectValue(StoreSettings); - } - if (Optional.IsDefined(AdditionalColumns)) - { - writer.WritePropertyName("additionalColumns"u8); -#if NET6_0_OR_GREATER - writer.WriteRawValue(AdditionalColumns); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(AdditionalColumns.ToString()).RootElement); -#endif - } - writer.WritePropertyName("type"u8); - writer.WriteStringValue(CopySourceType); - if (Optional.IsDefined(SourceRetryCount)) - { - writer.WritePropertyName("sourceRetryCount"u8); - JsonSerializer.Serialize(writer, SourceRetryCount); - } - if (Optional.IsDefined(SourceRetryWait)) - { - writer.WritePropertyName("sourceRetryWait"u8); - JsonSerializer.Serialize(writer, SourceRetryWait); - } - if (Optional.IsDefined(MaxConcurrentConnections)) - { - writer.WritePropertyName("maxConcurrentConnections"u8); - JsonSerializer.Serialize(writer, MaxConcurrentConnections); - } - if (Optional.IsDefined(DisableMetricsCollection)) - { - writer.WritePropertyName("disableMetricsCollection"u8); - JsonSerializer.Serialize(writer, DisableMetricsCollection); - } - foreach (var item in AdditionalProperties) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.Value.ToString()).RootElement); -#endif - } - writer.WriteEndObject(); - } - - internal static ParquetSource DeserializeParquetSource(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - Optional storeSettings = default; - Optional additionalColumns = default; - string type = default; - Optional> sourceRetryCount = default; - Optional> sourceRetryWait = default; - Optional> maxConcurrentConnections = default; - Optional> disableMetricsCollection = default; - IDictionary> additionalProperties = default; - Dictionary> additionalPropertiesDictionary = new Dictionary>(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("storeSettings"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - storeSettings = StoreReadSettings.DeserializeStoreReadSettings(property.Value); - continue; - } - if (property.NameEquals("additionalColumns"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - additionalColumns = BinaryData.FromString(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("type"u8)) - { - type = property.Value.GetString(); - continue; - } - if (property.NameEquals("sourceRetryCount"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - sourceRetryCount = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("sourceRetryWait"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - sourceRetryWait = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("maxConcurrentConnections"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - maxConcurrentConnections = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("disableMetricsCollection"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - disableMetricsCollection = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - additionalPropertiesDictionary.Add(property.Name, JsonSerializer.Deserialize>(property.Value.GetRawText())); - } - additionalProperties = additionalPropertiesDictionary; - return new ParquetSource(type, sourceRetryCount.Value, sourceRetryWait.Value, maxConcurrentConnections.Value, disableMetricsCollection.Value, additionalProperties, storeSettings.Value, additionalColumns.Value); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/ParquetSource.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/ParquetSource.cs deleted file mode 100644 index f5abe1f7..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/ParquetSource.cs +++ /dev/null @@ -1,76 +0,0 @@ -// - -#nullable disable - -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// A copy activity Parquet source. - public partial class ParquetSource : CopyActivitySource - { - /// Initializes a new instance of ParquetSource. - public ParquetSource() - { - CopySourceType = "ParquetSource"; - } - - /// Initializes a new instance of ParquetSource. - /// Copy source type. - /// Source retry count. Type: integer (or Expression with resultType integer). - /// Source retry wait. Type: string (or Expression with resultType string), pattern: ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). - /// The maximum concurrent connection count for the source data store. Type: integer (or Expression with resultType integer). - /// If true, disable data store metrics collection. Default is false. Type: boolean (or Expression with resultType boolean). - /// Additional Properties. - /// - /// Parquet store settings. - /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. - /// The available derived classes include , , , , , , , , , , , and . - /// - /// Specifies the additional columns to be added to source data. Type: array of objects(AdditionalColumns) (or Expression with resultType array of objects). - internal ParquetSource(string copySourceType, DataFactoryElement sourceRetryCount, DataFactoryElement sourceRetryWait, DataFactoryElement maxConcurrentConnections, DataFactoryElement disableMetricsCollection, IDictionary> additionalProperties, StoreReadSettings storeSettings, BinaryData additionalColumns) : base(copySourceType, sourceRetryCount, sourceRetryWait, maxConcurrentConnections, disableMetricsCollection, additionalProperties) - { - StoreSettings = storeSettings; - AdditionalColumns = additionalColumns; - CopySourceType = copySourceType ?? "ParquetSource"; - } - - /// - /// Parquet store settings. - /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. - /// The available derived classes include , , , , , , , , , , , and . - /// - public StoreReadSettings StoreSettings { get; set; } - /// - /// Specifies the additional columns to be added to source data. Type: array of objects(AdditionalColumns) (or Expression with resultType array of objects). - /// - /// To assign an object to this property use . - /// - /// - /// To assign an already formated json string to this property use . - /// - /// - /// Examples: - /// - /// - /// BinaryData.FromObjectAsJson("foo") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromString("\"foo\"") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromObjectAsJson(new { key = "value" }) - /// Creates a payload of { "key": "value" }. - /// - /// - /// BinaryData.FromString("{\"key\": \"value\"}") - /// Creates a payload of { "key": "value" }. - /// - /// - /// - /// - public BinaryData AdditionalColumns { get; set; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/ParquetWriteSettings.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/ParquetWriteSettings.Serialization.cs deleted file mode 100644 index 8787eb24..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/ParquetWriteSettings.Serialization.cs +++ /dev/null @@ -1,82 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class ParquetWriteSettings : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - if (Optional.IsDefined(MaxRowsPerFile)) - { - writer.WritePropertyName("maxRowsPerFile"u8); - JsonSerializer.Serialize(writer, MaxRowsPerFile); - } - if (Optional.IsDefined(FileNamePrefix)) - { - writer.WritePropertyName("fileNamePrefix"u8); - JsonSerializer.Serialize(writer, FileNamePrefix); - } - writer.WritePropertyName("type"u8); - writer.WriteStringValue(FormatWriteSettingsType); - foreach (var item in AdditionalProperties) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.Value.ToString()).RootElement); -#endif - } - writer.WriteEndObject(); - } - - internal static ParquetWriteSettings DeserializeParquetWriteSettings(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - Optional> maxRowsPerFile = default; - Optional> fileNamePrefix = default; - string type = default; - IDictionary> additionalProperties = default; - Dictionary> additionalPropertiesDictionary = new Dictionary>(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("maxRowsPerFile"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - maxRowsPerFile = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("fileNamePrefix"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - fileNamePrefix = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("type"u8)) - { - type = property.Value.GetString(); - continue; - } - additionalPropertiesDictionary.Add(property.Name, JsonSerializer.Deserialize>(property.Value.GetRawText())); - } - additionalProperties = additionalPropertiesDictionary; - return new ParquetWriteSettings(type, additionalProperties, maxRowsPerFile.Value, fileNamePrefix.Value); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/ParquetWriteSettings.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/ParquetWriteSettings.cs deleted file mode 100644 index d7c531d3..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/ParquetWriteSettings.cs +++ /dev/null @@ -1,35 +0,0 @@ -// - -#nullable disable - -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// Parquet write settings. - public partial class ParquetWriteSettings : FormatWriteSettings - { - /// Initializes a new instance of ParquetWriteSettings. - public ParquetWriteSettings() - { - FormatWriteSettingsType = "ParquetWriteSettings"; - } - - /// Initializes a new instance of ParquetWriteSettings. - /// The write setting type. - /// Additional Properties. - /// Limit the written file's row count to be smaller than or equal to the specified count. Type: integer (or Expression with resultType integer). - /// Specifies the file name pattern <fileNamePrefix>_<fileIndex>.<fileExtension> when copy from non-file based store without partitionOptions. Type: string (or Expression with resultType string). - internal ParquetWriteSettings(string formatWriteSettingsType, IDictionary> additionalProperties, DataFactoryElement maxRowsPerFile, DataFactoryElement fileNamePrefix) : base(formatWriteSettingsType, additionalProperties) - { - MaxRowsPerFile = maxRowsPerFile; - FileNamePrefix = fileNamePrefix; - FormatWriteSettingsType = formatWriteSettingsType ?? "ParquetWriteSettings"; - } - - /// Limit the written file's row count to be smaller than or equal to the specified count. Type: integer (or Expression with resultType integer). - public DataFactoryElement MaxRowsPerFile { get; set; } - /// Specifies the file name pattern <fileNamePrefix>_<fileIndex>.<fileExtension> when copy from non-file based store without partitionOptions. Type: string (or Expression with resultType string). - public DataFactoryElement FileNamePrefix { get; set; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/PaypalLinkedService.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/PaypalLinkedService.Serialization.cs deleted file mode 100644 index 7faf2dcd..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/PaypalLinkedService.Serialization.cs +++ /dev/null @@ -1,247 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class PaypalLinkedService : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - writer.WritePropertyName("type"u8); - writer.WriteStringValue(LinkedServiceType); - if (Optional.IsDefined(ConnectVia)) - { - writer.WritePropertyName("connectVia"u8); - writer.WriteObjectValue(ConnectVia); - } - if (Optional.IsDefined(Description)) - { - writer.WritePropertyName("description"u8); - writer.WriteStringValue(Description); - } - if (Optional.IsCollectionDefined(Parameters)) - { - writer.WritePropertyName("parameters"u8); - writer.WriteStartObject(); - foreach (var item in Parameters) - { - writer.WritePropertyName(item.Key); - writer.WriteObjectValue(item.Value); - } - writer.WriteEndObject(); - } - if (Optional.IsCollectionDefined(Annotations)) - { - writer.WritePropertyName("annotations"u8); - writer.WriteStartArray(); - foreach (var item in Annotations) - { - if (item == null) - { - writer.WriteNullValue(); - continue; - } -#if NET6_0_OR_GREATER - writer.WriteRawValue(item); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.ToString()).RootElement); -#endif - } - writer.WriteEndArray(); - } - writer.WritePropertyName("typeProperties"u8); - writer.WriteStartObject(); - writer.WritePropertyName("host"u8); - JsonSerializer.Serialize(writer, Host); - writer.WritePropertyName("clientId"u8); - JsonSerializer.Serialize(writer, ClientId); - if (Optional.IsDefined(ClientSecret)) - { - writer.WritePropertyName("clientSecret"u8); - JsonSerializer.Serialize(writer, ClientSecret); - } - if (Optional.IsDefined(UseEncryptedEndpoints)) - { - writer.WritePropertyName("useEncryptedEndpoints"u8); - JsonSerializer.Serialize(writer, UseEncryptedEndpoints); - } - if (Optional.IsDefined(UseHostVerification)) - { - writer.WritePropertyName("useHostVerification"u8); - JsonSerializer.Serialize(writer, UseHostVerification); - } - if (Optional.IsDefined(UsePeerVerification)) - { - writer.WritePropertyName("usePeerVerification"u8); - JsonSerializer.Serialize(writer, UsePeerVerification); - } - if (Optional.IsDefined(EncryptedCredential)) - { - writer.WritePropertyName("encryptedCredential"u8); - writer.WriteStringValue(EncryptedCredential); - } - writer.WriteEndObject(); - foreach (var item in AdditionalProperties) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.Value.ToString()).RootElement); -#endif - } - writer.WriteEndObject(); - } - - internal static PaypalLinkedService DeserializePaypalLinkedService(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - string type = default; - Optional connectVia = default; - Optional description = default; - Optional> parameters = default; - Optional> annotations = default; - DataFactoryElement host = default; - DataFactoryElement clientId = default; - Optional clientSecret = default; - Optional> useEncryptedEndpoints = default; - Optional> useHostVerification = default; - Optional> usePeerVerification = default; - Optional encryptedCredential = default; - IDictionary> additionalProperties = default; - Dictionary> additionalPropertiesDictionary = new Dictionary>(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("type"u8)) - { - type = property.Value.GetString(); - continue; - } - if (property.NameEquals("connectVia"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - connectVia = IntegrationRuntimeReference.DeserializeIntegrationRuntimeReference(property.Value); - continue; - } - if (property.NameEquals("description"u8)) - { - description = property.Value.GetString(); - continue; - } - if (property.NameEquals("parameters"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - Dictionary dictionary = new Dictionary(); - foreach (var property0 in property.Value.EnumerateObject()) - { - dictionary.Add(property0.Name, EntityParameterSpecification.DeserializeEntityParameterSpecification(property0.Value)); - } - parameters = dictionary; - continue; - } - if (property.NameEquals("annotations"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - if (item.ValueKind == JsonValueKind.Null) - { - array.Add(null); - } - else - { - array.Add(BinaryData.FromString(item.GetRawText())); - } - } - annotations = array; - continue; - } - if (property.NameEquals("typeProperties"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - foreach (var property0 in property.Value.EnumerateObject()) - { - if (property0.NameEquals("host"u8)) - { - host = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("clientId"u8)) - { - clientId = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("clientSecret"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - clientSecret = JsonSerializer.Deserialize(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("useEncryptedEndpoints"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - useEncryptedEndpoints = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("useHostVerification"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - useHostVerification = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("usePeerVerification"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - usePeerVerification = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("encryptedCredential"u8)) - { - encryptedCredential = property0.Value.GetString(); - continue; - } - } - continue; - } - additionalPropertiesDictionary.Add(property.Name, JsonSerializer.Deserialize>(property.Value.GetRawText())); - } - additionalProperties = additionalPropertiesDictionary; - return new PaypalLinkedService(type, connectVia.Value, description.Value, Optional.ToDictionary(parameters), Optional.ToList(annotations), additionalProperties, host, clientId, clientSecret, useEncryptedEndpoints.Value, useHostVerification.Value, usePeerVerification.Value, encryptedCredential.Value); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/PaypalLinkedService.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/PaypalLinkedService.cs deleted file mode 100644 index 03370a1f..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/PaypalLinkedService.cs +++ /dev/null @@ -1,68 +0,0 @@ -// - -#nullable disable - -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// Paypal Service linked service. - public partial class PaypalLinkedService : DataFactoryLinkedServiceProperties - { - /// Initializes a new instance of PaypalLinkedService. - /// The URL of the PayPal instance. (i.e. api.sandbox.paypal.com). - /// The client ID associated with your PayPal application. - /// or is null. - public PaypalLinkedService(DataFactoryElement host, DataFactoryElement clientId) - { - Argument.AssertNotNull(host, nameof(host)); - Argument.AssertNotNull(clientId, nameof(clientId)); - - Host = host; - ClientId = clientId; - LinkedServiceType = "Paypal"; - } - - /// Initializes a new instance of PaypalLinkedService. - /// Type of linked service. - /// The integration runtime reference. - /// Linked service description. - /// Parameters for linked service. - /// List of tags that can be used for describing the linked service. - /// Additional Properties. - /// The URL of the PayPal instance. (i.e. api.sandbox.paypal.com). - /// The client ID associated with your PayPal application. - /// The client secret associated with your PayPal application. - /// Specifies whether the data source endpoints are encrypted using HTTPS. The default value is true. - /// 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. - /// Specifies whether to verify the identity of the server when connecting over SSL. The default value is true. - /// The encrypted credential used for authentication. Credentials are encrypted using the integration runtime credential manager. Type: string. - internal PaypalLinkedService(string linkedServiceType, IntegrationRuntimeReference connectVia, string description, IDictionary parameters, IList annotations, IDictionary> additionalProperties, DataFactoryElement host, DataFactoryElement clientId, DataFactorySecretBaseDefinition clientSecret, DataFactoryElement useEncryptedEndpoints, DataFactoryElement useHostVerification, DataFactoryElement usePeerVerification, string encryptedCredential) : base(linkedServiceType, connectVia, description, parameters, annotations, additionalProperties) - { - Host = host; - ClientId = clientId; - ClientSecret = clientSecret; - UseEncryptedEndpoints = useEncryptedEndpoints; - UseHostVerification = useHostVerification; - UsePeerVerification = usePeerVerification; - EncryptedCredential = encryptedCredential; - LinkedServiceType = linkedServiceType ?? "Paypal"; - } - - /// The URL of the PayPal instance. (i.e. api.sandbox.paypal.com). - public DataFactoryElement Host { get; set; } - /// The client ID associated with your PayPal application. - public DataFactoryElement ClientId { get; set; } - /// The client secret associated with your PayPal application. - public DataFactorySecretBaseDefinition ClientSecret { get; set; } - /// Specifies whether the data source endpoints are encrypted using HTTPS. The default value is true. - public DataFactoryElement UseEncryptedEndpoints { get; set; } - /// 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. - public DataFactoryElement UseHostVerification { get; set; } - /// Specifies whether to verify the identity of the server when connecting over SSL. The default value is true. - public DataFactoryElement UsePeerVerification { get; set; } - /// The encrypted credential used for authentication. Credentials are encrypted using the integration runtime credential manager. Type: string. - public string EncryptedCredential { get; set; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/PaypalObjectDataset.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/PaypalObjectDataset.Serialization.cs deleted file mode 100644 index 7dc346a3..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/PaypalObjectDataset.Serialization.cs +++ /dev/null @@ -1,212 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class PaypalObjectDataset : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - writer.WritePropertyName("type"u8); - writer.WriteStringValue(DatasetType); - if (Optional.IsDefined(Description)) - { - writer.WritePropertyName("description"u8); - writer.WriteStringValue(Description); - } - if (Optional.IsDefined(Structure)) - { - writer.WritePropertyName("structure"u8); - JsonSerializer.Serialize(writer, Structure); - } - if (Optional.IsDefined(Schema)) - { - writer.WritePropertyName("schema"u8); - JsonSerializer.Serialize(writer, Schema); - } - writer.WritePropertyName("linkedServiceName"u8); - JsonSerializer.Serialize(writer, LinkedServiceName); if (Optional.IsCollectionDefined(Parameters)) - { - writer.WritePropertyName("parameters"u8); - writer.WriteStartObject(); - foreach (var item in Parameters) - { - writer.WritePropertyName(item.Key); - writer.WriteObjectValue(item.Value); - } - writer.WriteEndObject(); - } - if (Optional.IsCollectionDefined(Annotations)) - { - writer.WritePropertyName("annotations"u8); - writer.WriteStartArray(); - foreach (var item in Annotations) - { - if (item == null) - { - writer.WriteNullValue(); - continue; - } -#if NET6_0_OR_GREATER - writer.WriteRawValue(item); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.ToString()).RootElement); -#endif - } - writer.WriteEndArray(); - } - if (Optional.IsDefined(Folder)) - { - writer.WritePropertyName("folder"u8); - writer.WriteObjectValue(Folder); - } - writer.WritePropertyName("typeProperties"u8); - writer.WriteStartObject(); - if (Optional.IsDefined(TableName)) - { - writer.WritePropertyName("tableName"u8); - JsonSerializer.Serialize(writer, TableName); - } - writer.WriteEndObject(); - foreach (var item in AdditionalProperties) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.Value.ToString()).RootElement); -#endif - } - writer.WriteEndObject(); - } - - internal static PaypalObjectDataset DeserializePaypalObjectDataset(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - string type = default; - Optional description = default; - Optional>> structure = default; - Optional>> schema = default; - DataFactoryLinkedServiceReference linkedServiceName = default; - Optional> parameters = default; - Optional> annotations = default; - Optional folder = default; - Optional> tableName = default; - IDictionary> additionalProperties = default; - Dictionary> additionalPropertiesDictionary = new Dictionary>(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("type"u8)) - { - type = property.Value.GetString(); - continue; - } - if (property.NameEquals("description"u8)) - { - description = property.Value.GetString(); - continue; - } - if (property.NameEquals("structure"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - structure = JsonSerializer.Deserialize>>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("schema"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - schema = JsonSerializer.Deserialize>>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("linkedServiceName"u8)) - { - linkedServiceName = JsonSerializer.Deserialize(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("parameters"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - Dictionary dictionary = new Dictionary(); - foreach (var property0 in property.Value.EnumerateObject()) - { - dictionary.Add(property0.Name, EntityParameterSpecification.DeserializeEntityParameterSpecification(property0.Value)); - } - parameters = dictionary; - continue; - } - if (property.NameEquals("annotations"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - if (item.ValueKind == JsonValueKind.Null) - { - array.Add(null); - } - else - { - array.Add(BinaryData.FromString(item.GetRawText())); - } - } - annotations = array; - continue; - } - if (property.NameEquals("folder"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - folder = DatasetFolder.DeserializeDatasetFolder(property.Value); - continue; - } - if (property.NameEquals("typeProperties"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - foreach (var property0 in property.Value.EnumerateObject()) - { - if (property0.NameEquals("tableName"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - tableName = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - } - continue; - } - additionalPropertiesDictionary.Add(property.Name, JsonSerializer.Deserialize>(property.Value.GetRawText())); - } - additionalProperties = additionalPropertiesDictionary; - return new PaypalObjectDataset(type, description.Value, structure.Value, schema.Value, linkedServiceName, Optional.ToDictionary(parameters), Optional.ToList(annotations), folder.Value, additionalProperties, tableName.Value); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/PaypalObjectDataset.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/PaypalObjectDataset.cs deleted file mode 100644 index 295828e9..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/PaypalObjectDataset.cs +++ /dev/null @@ -1,43 +0,0 @@ -// - -#nullable disable - -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// Paypal Service dataset. - public partial class PaypalObjectDataset : DataFactoryDatasetProperties - { - /// Initializes a new instance of PaypalObjectDataset. - /// Linked service reference. - /// is null. - public PaypalObjectDataset(DataFactoryLinkedServiceReference linkedServiceName) : base(linkedServiceName) - { - Argument.AssertNotNull(linkedServiceName, nameof(linkedServiceName)); - - DatasetType = "PaypalObject"; - } - - /// Initializes a new instance of PaypalObjectDataset. - /// Type of dataset. - /// Dataset description. - /// Columns that define the structure of the dataset. Type: array (or Expression with resultType array), itemType: DatasetDataElement. - /// Columns that define the physical type schema of the dataset. Type: array (or Expression with resultType array), itemType: DatasetSchemaDataElement. - /// Linked service reference. - /// Parameters for dataset. - /// List of tags that can be used for describing the Dataset. - /// The folder that this Dataset is in. If not specified, Dataset will appear at the root level. - /// Additional Properties. - /// The table name. Type: string (or Expression with resultType string). - internal PaypalObjectDataset(string datasetType, string description, DataFactoryElement> structure, DataFactoryElement> schema, DataFactoryLinkedServiceReference linkedServiceName, IDictionary parameters, IList annotations, DatasetFolder folder, IDictionary> additionalProperties, DataFactoryElement tableName) : base(datasetType, description, structure, schema, linkedServiceName, parameters, annotations, folder, additionalProperties) - { - TableName = tableName; - DatasetType = datasetType ?? "PaypalObject"; - } - - /// The table name. Type: string (or Expression with resultType string). - public DataFactoryElement TableName { get; set; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/PaypalSource.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/PaypalSource.Serialization.cs deleted file mode 100644 index 250f5935..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/PaypalSource.Serialization.cs +++ /dev/null @@ -1,161 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class PaypalSource : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - if (Optional.IsDefined(Query)) - { - writer.WritePropertyName("query"u8); - JsonSerializer.Serialize(writer, Query); - } - if (Optional.IsDefined(QueryTimeout)) - { - writer.WritePropertyName("queryTimeout"u8); - JsonSerializer.Serialize(writer, QueryTimeout); - } - if (Optional.IsDefined(AdditionalColumns)) - { - writer.WritePropertyName("additionalColumns"u8); -#if NET6_0_OR_GREATER - writer.WriteRawValue(AdditionalColumns); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(AdditionalColumns.ToString()).RootElement); -#endif - } - writer.WritePropertyName("type"u8); - writer.WriteStringValue(CopySourceType); - if (Optional.IsDefined(SourceRetryCount)) - { - writer.WritePropertyName("sourceRetryCount"u8); - JsonSerializer.Serialize(writer, SourceRetryCount); - } - if (Optional.IsDefined(SourceRetryWait)) - { - writer.WritePropertyName("sourceRetryWait"u8); - JsonSerializer.Serialize(writer, SourceRetryWait); - } - if (Optional.IsDefined(MaxConcurrentConnections)) - { - writer.WritePropertyName("maxConcurrentConnections"u8); - JsonSerializer.Serialize(writer, MaxConcurrentConnections); - } - if (Optional.IsDefined(DisableMetricsCollection)) - { - writer.WritePropertyName("disableMetricsCollection"u8); - JsonSerializer.Serialize(writer, DisableMetricsCollection); - } - foreach (var item in AdditionalProperties) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.Value.ToString()).RootElement); -#endif - } - writer.WriteEndObject(); - } - - internal static PaypalSource DeserializePaypalSource(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - Optional> query = default; - Optional> queryTimeout = default; - Optional additionalColumns = default; - string type = default; - Optional> sourceRetryCount = default; - Optional> sourceRetryWait = default; - Optional> maxConcurrentConnections = default; - Optional> disableMetricsCollection = default; - IDictionary> additionalProperties = default; - Dictionary> additionalPropertiesDictionary = new Dictionary>(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("query"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - query = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("queryTimeout"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - queryTimeout = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("additionalColumns"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - additionalColumns = BinaryData.FromString(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("type"u8)) - { - type = property.Value.GetString(); - continue; - } - if (property.NameEquals("sourceRetryCount"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - sourceRetryCount = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("sourceRetryWait"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - sourceRetryWait = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("maxConcurrentConnections"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - maxConcurrentConnections = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("disableMetricsCollection"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - disableMetricsCollection = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - additionalPropertiesDictionary.Add(property.Name, JsonSerializer.Deserialize>(property.Value.GetRawText())); - } - additionalProperties = additionalPropertiesDictionary; - return new PaypalSource(type, sourceRetryCount.Value, sourceRetryWait.Value, maxConcurrentConnections.Value, disableMetricsCollection.Value, additionalProperties, queryTimeout.Value, additionalColumns.Value, query.Value); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/PaypalSource.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/PaypalSource.cs deleted file mode 100644 index 10279f12..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/PaypalSource.cs +++ /dev/null @@ -1,37 +0,0 @@ -// - -#nullable disable - -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// A copy activity Paypal Service source. - public partial class PaypalSource : TabularSource - { - /// Initializes a new instance of PaypalSource. - public PaypalSource() - { - CopySourceType = "PaypalSource"; - } - - /// Initializes a new instance of PaypalSource. - /// Copy source type. - /// Source retry count. Type: integer (or Expression with resultType integer). - /// Source retry wait. Type: string (or Expression with resultType string), pattern: ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). - /// The maximum concurrent connection count for the source data store. Type: integer (or Expression with resultType integer). - /// If true, disable data store metrics collection. Default is false. Type: boolean (or Expression with resultType boolean). - /// Additional Properties. - /// 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). - /// A query to retrieve data from source. Type: string (or Expression with resultType string). - internal PaypalSource(string copySourceType, DataFactoryElement sourceRetryCount, DataFactoryElement sourceRetryWait, DataFactoryElement maxConcurrentConnections, DataFactoryElement disableMetricsCollection, IDictionary> additionalProperties, DataFactoryElement queryTimeout, BinaryData additionalColumns, DataFactoryElement query) : base(copySourceType, sourceRetryCount, sourceRetryWait, maxConcurrentConnections, disableMetricsCollection, additionalProperties, queryTimeout, additionalColumns) - { - Query = query; - CopySourceType = copySourceType ?? "PaypalSource"; - } - - /// A query to retrieve data from source. Type: string (or Expression with resultType string). - public DataFactoryElement Query { get; set; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/PhoenixAuthenticationType.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/PhoenixAuthenticationType.cs deleted file mode 100644 index 375d8bde..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/PhoenixAuthenticationType.cs +++ /dev/null @@ -1,50 +0,0 @@ -// - -#nullable disable - -using System.ComponentModel; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// The authentication mechanism used to connect to the Phoenix server. - public readonly partial struct PhoenixAuthenticationType : IEquatable - { - private readonly string _value; - - /// Initializes a new instance of . - /// is null. - public PhoenixAuthenticationType(string value) - { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } - - private const string AnonymousValue = "Anonymous"; - private const string UsernameAndPasswordValue = "UsernameAndPassword"; - private const string WindowsAzureHDInsightServiceValue = "WindowsAzureHDInsightService"; - - /// Anonymous. - public static PhoenixAuthenticationType Anonymous { get; } = new PhoenixAuthenticationType(AnonymousValue); - /// UsernameAndPassword. - public static PhoenixAuthenticationType UsernameAndPassword { get; } = new PhoenixAuthenticationType(UsernameAndPasswordValue); - /// WindowsAzureHDInsightService. - public static PhoenixAuthenticationType WindowsAzureHDInsightService { get; } = new PhoenixAuthenticationType(WindowsAzureHDInsightServiceValue); - /// Determines if two values are the same. - public static bool operator ==(PhoenixAuthenticationType left, PhoenixAuthenticationType right) => left.Equals(right); - /// Determines if two values are not the same. - public static bool operator !=(PhoenixAuthenticationType left, PhoenixAuthenticationType right) => !left.Equals(right); - /// Converts a string to a . - public static implicit operator PhoenixAuthenticationType(string value) => new PhoenixAuthenticationType(value); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override bool Equals(object obj) => obj is PhoenixAuthenticationType other && Equals(other); - /// - public bool Equals(PhoenixAuthenticationType other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override int GetHashCode() => _value?.GetHashCode() ?? 0; - /// - public override string ToString() => _value; - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/PhoenixLinkedService.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/PhoenixLinkedService.Serialization.cs deleted file mode 100644 index 51e8ccbc..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/PhoenixLinkedService.Serialization.cs +++ /dev/null @@ -1,322 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class PhoenixLinkedService : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - writer.WritePropertyName("type"u8); - writer.WriteStringValue(LinkedServiceType); - if (Optional.IsDefined(ConnectVia)) - { - writer.WritePropertyName("connectVia"u8); - writer.WriteObjectValue(ConnectVia); - } - if (Optional.IsDefined(Description)) - { - writer.WritePropertyName("description"u8); - writer.WriteStringValue(Description); - } - if (Optional.IsCollectionDefined(Parameters)) - { - writer.WritePropertyName("parameters"u8); - writer.WriteStartObject(); - foreach (var item in Parameters) - { - writer.WritePropertyName(item.Key); - writer.WriteObjectValue(item.Value); - } - writer.WriteEndObject(); - } - if (Optional.IsCollectionDefined(Annotations)) - { - writer.WritePropertyName("annotations"u8); - writer.WriteStartArray(); - foreach (var item in Annotations) - { - if (item == null) - { - writer.WriteNullValue(); - continue; - } -#if NET6_0_OR_GREATER - writer.WriteRawValue(item); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.ToString()).RootElement); -#endif - } - writer.WriteEndArray(); - } - writer.WritePropertyName("typeProperties"u8); - writer.WriteStartObject(); - writer.WritePropertyName("host"u8); - JsonSerializer.Serialize(writer, Host); - if (Optional.IsDefined(Port)) - { - writer.WritePropertyName("port"u8); - JsonSerializer.Serialize(writer, Port); - } - if (Optional.IsDefined(HttpPath)) - { - writer.WritePropertyName("httpPath"u8); - JsonSerializer.Serialize(writer, HttpPath); - } - writer.WritePropertyName("authenticationType"u8); - writer.WriteStringValue(AuthenticationType.ToString()); - if (Optional.IsDefined(Username)) - { - writer.WritePropertyName("username"u8); - JsonSerializer.Serialize(writer, Username); - } - if (Optional.IsDefined(Password)) - { - writer.WritePropertyName("password"u8); - JsonSerializer.Serialize(writer, Password); - } - if (Optional.IsDefined(EnableSsl)) - { - writer.WritePropertyName("enableSsl"u8); - JsonSerializer.Serialize(writer, EnableSsl); - } - if (Optional.IsDefined(TrustedCertPath)) - { - writer.WritePropertyName("trustedCertPath"u8); - JsonSerializer.Serialize(writer, TrustedCertPath); - } - if (Optional.IsDefined(UseSystemTrustStore)) - { - writer.WritePropertyName("useSystemTrustStore"u8); - JsonSerializer.Serialize(writer, UseSystemTrustStore); - } - if (Optional.IsDefined(AllowHostNameCNMismatch)) - { - writer.WritePropertyName("allowHostNameCNMismatch"u8); - JsonSerializer.Serialize(writer, AllowHostNameCNMismatch); - } - if (Optional.IsDefined(AllowSelfSignedServerCert)) - { - writer.WritePropertyName("allowSelfSignedServerCert"u8); - JsonSerializer.Serialize(writer, AllowSelfSignedServerCert); - } - if (Optional.IsDefined(EncryptedCredential)) - { - writer.WritePropertyName("encryptedCredential"u8); - writer.WriteStringValue(EncryptedCredential); - } - writer.WriteEndObject(); - foreach (var item in AdditionalProperties) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.Value.ToString()).RootElement); -#endif - } - writer.WriteEndObject(); - } - - internal static PhoenixLinkedService DeserializePhoenixLinkedService(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - string type = default; - Optional connectVia = default; - Optional description = default; - Optional> parameters = default; - Optional> annotations = default; - DataFactoryElement host = default; - Optional> port = default; - Optional> httpPath = default; - PhoenixAuthenticationType authenticationType = default; - Optional> username = default; - Optional password = default; - Optional> enableSsl = default; - Optional> trustedCertPath = default; - Optional> useSystemTrustStore = default; - Optional> allowHostNameCNMismatch = default; - Optional> allowSelfSignedServerCert = default; - Optional encryptedCredential = default; - IDictionary> additionalProperties = default; - Dictionary> additionalPropertiesDictionary = new Dictionary>(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("type"u8)) - { - type = property.Value.GetString(); - continue; - } - if (property.NameEquals("connectVia"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - connectVia = IntegrationRuntimeReference.DeserializeIntegrationRuntimeReference(property.Value); - continue; - } - if (property.NameEquals("description"u8)) - { - description = property.Value.GetString(); - continue; - } - if (property.NameEquals("parameters"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - Dictionary dictionary = new Dictionary(); - foreach (var property0 in property.Value.EnumerateObject()) - { - dictionary.Add(property0.Name, EntityParameterSpecification.DeserializeEntityParameterSpecification(property0.Value)); - } - parameters = dictionary; - continue; - } - if (property.NameEquals("annotations"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - if (item.ValueKind == JsonValueKind.Null) - { - array.Add(null); - } - else - { - array.Add(BinaryData.FromString(item.GetRawText())); - } - } - annotations = array; - continue; - } - if (property.NameEquals("typeProperties"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - foreach (var property0 in property.Value.EnumerateObject()) - { - if (property0.NameEquals("host"u8)) - { - host = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("port"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - port = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("httpPath"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - httpPath = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("authenticationType"u8)) - { - authenticationType = new PhoenixAuthenticationType(property0.Value.GetString()); - continue; - } - if (property0.NameEquals("username"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - username = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("password"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - password = JsonSerializer.Deserialize(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("enableSsl"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - enableSsl = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("trustedCertPath"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - trustedCertPath = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("useSystemTrustStore"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - useSystemTrustStore = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("allowHostNameCNMismatch"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - allowHostNameCNMismatch = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("allowSelfSignedServerCert"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - allowSelfSignedServerCert = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("encryptedCredential"u8)) - { - encryptedCredential = property0.Value.GetString(); - continue; - } - } - continue; - } - additionalPropertiesDictionary.Add(property.Name, JsonSerializer.Deserialize>(property.Value.GetRawText())); - } - additionalProperties = additionalPropertiesDictionary; - return new PhoenixLinkedService(type, connectVia.Value, description.Value, Optional.ToDictionary(parameters), Optional.ToList(annotations), additionalProperties, host, port.Value, httpPath.Value, authenticationType, username.Value, password, enableSsl.Value, trustedCertPath.Value, useSystemTrustStore.Value, allowHostNameCNMismatch.Value, allowSelfSignedServerCert.Value, encryptedCredential.Value); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/PhoenixLinkedService.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/PhoenixLinkedService.cs deleted file mode 100644 index 623798f4..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/PhoenixLinkedService.cs +++ /dev/null @@ -1,87 +0,0 @@ -// - -#nullable disable - -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// Phoenix server linked service. - public partial class PhoenixLinkedService : DataFactoryLinkedServiceProperties - { - /// Initializes a new instance of PhoenixLinkedService. - /// The IP address or host name of the Phoenix server. (i.e. 192.168.222.160). - /// The authentication mechanism used to connect to the Phoenix server. - /// is null. - public PhoenixLinkedService(DataFactoryElement host, PhoenixAuthenticationType authenticationType) - { - Argument.AssertNotNull(host, nameof(host)); - - Host = host; - AuthenticationType = authenticationType; - LinkedServiceType = "Phoenix"; - } - - /// Initializes a new instance of PhoenixLinkedService. - /// Type of linked service. - /// The integration runtime reference. - /// Linked service description. - /// Parameters for linked service. - /// List of tags that can be used for describing the linked service. - /// Additional Properties. - /// The IP address or host name of the Phoenix server. (i.e. 192.168.222.160). - /// The TCP port that the Phoenix server uses to listen for client connections. The default value is 8765. - /// The partial URL corresponding to the Phoenix server. (i.e. /gateway/sandbox/phoenix/version). The default value is hbasephoenix if using WindowsAzureHDInsightService. - /// The authentication mechanism used to connect to the Phoenix server. - /// The user name used to connect to the Phoenix server. - /// The password corresponding to the user name. - /// Specifies whether the connections to the server are encrypted using SSL. The default value is false. - /// The full path of the .pem file containing trusted CA certificates for verifying the server when connecting over SSL. This property can only be set when using SSL on self-hosted IR. The default value is the cacerts.pem file installed with the IR. - /// Specifies whether to use a CA certificate from the system trust store or from a specified PEM file. The default value is false. - /// Specifies whether to require a CA-issued SSL certificate name to match the host name of the server when connecting over SSL. The default value is false. - /// Specifies whether to allow self-signed certificates from the server. The default value is false. - /// The encrypted credential used for authentication. Credentials are encrypted using the integration runtime credential manager. Type: string. - internal PhoenixLinkedService(string linkedServiceType, IntegrationRuntimeReference connectVia, string description, IDictionary parameters, IList annotations, IDictionary> additionalProperties, DataFactoryElement host, DataFactoryElement port, DataFactoryElement httpPath, PhoenixAuthenticationType authenticationType, DataFactoryElement username, DataFactorySecretBaseDefinition password, DataFactoryElement enableSsl, DataFactoryElement trustedCertPath, DataFactoryElement useSystemTrustStore, DataFactoryElement allowHostNameCNMismatch, DataFactoryElement allowSelfSignedServerCert, string encryptedCredential) : base(linkedServiceType, connectVia, description, parameters, annotations, additionalProperties) - { - Host = host; - Port = port; - HttpPath = httpPath; - AuthenticationType = authenticationType; - Username = username; - Password = password; - EnableSsl = enableSsl; - TrustedCertPath = trustedCertPath; - UseSystemTrustStore = useSystemTrustStore; - AllowHostNameCNMismatch = allowHostNameCNMismatch; - AllowSelfSignedServerCert = allowSelfSignedServerCert; - EncryptedCredential = encryptedCredential; - LinkedServiceType = linkedServiceType ?? "Phoenix"; - } - - /// The IP address or host name of the Phoenix server. (i.e. 192.168.222.160). - public DataFactoryElement Host { get; set; } - /// The TCP port that the Phoenix server uses to listen for client connections. The default value is 8765. - public DataFactoryElement Port { get; set; } - /// The partial URL corresponding to the Phoenix server. (i.e. /gateway/sandbox/phoenix/version). The default value is hbasephoenix if using WindowsAzureHDInsightService. - public DataFactoryElement HttpPath { get; set; } - /// The authentication mechanism used to connect to the Phoenix server. - public PhoenixAuthenticationType AuthenticationType { get; set; } - /// The user name used to connect to the Phoenix server. - public DataFactoryElement Username { get; set; } - /// The password corresponding to the user name. - public DataFactorySecretBaseDefinition Password { get; set; } - /// Specifies whether the connections to the server are encrypted using SSL. The default value is false. - public DataFactoryElement EnableSsl { get; set; } - /// The full path of the .pem file containing trusted CA certificates for verifying the server when connecting over SSL. This property can only be set when using SSL on self-hosted IR. The default value is the cacerts.pem file installed with the IR. - public DataFactoryElement TrustedCertPath { get; set; } - /// Specifies whether to use a CA certificate from the system trust store or from a specified PEM file. The default value is false. - public DataFactoryElement UseSystemTrustStore { get; set; } - /// Specifies whether to require a CA-issued SSL certificate name to match the host name of the server when connecting over SSL. The default value is false. - public DataFactoryElement AllowHostNameCNMismatch { get; set; } - /// Specifies whether to allow self-signed certificates from the server. The default value is false. - public DataFactoryElement AllowSelfSignedServerCert { get; set; } - /// The encrypted credential used for authentication. Credentials are encrypted using the integration runtime credential manager. Type: string. - public string EncryptedCredential { get; set; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/PhoenixObjectDataset.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/PhoenixObjectDataset.Serialization.cs deleted file mode 100644 index 2f7d64c8..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/PhoenixObjectDataset.Serialization.cs +++ /dev/null @@ -1,246 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class PhoenixObjectDataset : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - writer.WritePropertyName("type"u8); - writer.WriteStringValue(DatasetType); - if (Optional.IsDefined(Description)) - { - writer.WritePropertyName("description"u8); - writer.WriteStringValue(Description); - } - if (Optional.IsDefined(Structure)) - { - writer.WritePropertyName("structure"u8); - JsonSerializer.Serialize(writer, Structure); - } - if (Optional.IsDefined(Schema)) - { - writer.WritePropertyName("schema"u8); - JsonSerializer.Serialize(writer, Schema); - } - writer.WritePropertyName("linkedServiceName"u8); - JsonSerializer.Serialize(writer, LinkedServiceName); if (Optional.IsCollectionDefined(Parameters)) - { - writer.WritePropertyName("parameters"u8); - writer.WriteStartObject(); - foreach (var item in Parameters) - { - writer.WritePropertyName(item.Key); - writer.WriteObjectValue(item.Value); - } - writer.WriteEndObject(); - } - if (Optional.IsCollectionDefined(Annotations)) - { - writer.WritePropertyName("annotations"u8); - writer.WriteStartArray(); - foreach (var item in Annotations) - { - if (item == null) - { - writer.WriteNullValue(); - continue; - } -#if NET6_0_OR_GREATER - writer.WriteRawValue(item); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.ToString()).RootElement); -#endif - } - writer.WriteEndArray(); - } - if (Optional.IsDefined(Folder)) - { - writer.WritePropertyName("folder"u8); - writer.WriteObjectValue(Folder); - } - writer.WritePropertyName("typeProperties"u8); - writer.WriteStartObject(); - if (Optional.IsDefined(TableName)) - { - writer.WritePropertyName("tableName"u8); -#if NET6_0_OR_GREATER - writer.WriteRawValue(TableName); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(TableName.ToString()).RootElement); -#endif - } - if (Optional.IsDefined(Table)) - { - writer.WritePropertyName("table"u8); - JsonSerializer.Serialize(writer, Table); - } - if (Optional.IsDefined(SchemaTypePropertiesSchema)) - { - writer.WritePropertyName("schema"u8); - JsonSerializer.Serialize(writer, SchemaTypePropertiesSchema); - } - writer.WriteEndObject(); - foreach (var item in AdditionalProperties) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.Value.ToString()).RootElement); -#endif - } - writer.WriteEndObject(); - } - - internal static PhoenixObjectDataset DeserializePhoenixObjectDataset(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - string type = default; - Optional description = default; - Optional>> structure = default; - Optional>> schema = default; - DataFactoryLinkedServiceReference linkedServiceName = default; - Optional> parameters = default; - Optional> annotations = default; - Optional folder = default; - Optional tableName = default; - Optional> table = default; - Optional> schema0 = default; - IDictionary> additionalProperties = default; - Dictionary> additionalPropertiesDictionary = new Dictionary>(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("type"u8)) - { - type = property.Value.GetString(); - continue; - } - if (property.NameEquals("description"u8)) - { - description = property.Value.GetString(); - continue; - } - if (property.NameEquals("structure"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - structure = JsonSerializer.Deserialize>>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("schema"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - schema = JsonSerializer.Deserialize>>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("linkedServiceName"u8)) - { - linkedServiceName = JsonSerializer.Deserialize(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("parameters"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - Dictionary dictionary = new Dictionary(); - foreach (var property0 in property.Value.EnumerateObject()) - { - dictionary.Add(property0.Name, EntityParameterSpecification.DeserializeEntityParameterSpecification(property0.Value)); - } - parameters = dictionary; - continue; - } - if (property.NameEquals("annotations"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - if (item.ValueKind == JsonValueKind.Null) - { - array.Add(null); - } - else - { - array.Add(BinaryData.FromString(item.GetRawText())); - } - } - annotations = array; - continue; - } - if (property.NameEquals("folder"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - folder = DatasetFolder.DeserializeDatasetFolder(property.Value); - continue; - } - if (property.NameEquals("typeProperties"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - foreach (var property0 in property.Value.EnumerateObject()) - { - if (property0.NameEquals("tableName"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - tableName = BinaryData.FromString(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("table"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - table = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("schema"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - schema0 = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - } - continue; - } - additionalPropertiesDictionary.Add(property.Name, JsonSerializer.Deserialize>(property.Value.GetRawText())); - } - additionalProperties = additionalPropertiesDictionary; - return new PhoenixObjectDataset(type, description.Value, structure.Value, schema.Value, linkedServiceName, Optional.ToDictionary(parameters), Optional.ToList(annotations), folder.Value, additionalProperties, tableName.Value, table.Value, schema0.Value); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/PhoenixObjectDataset.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/PhoenixObjectDataset.cs deleted file mode 100644 index 95d4f79b..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/PhoenixObjectDataset.cs +++ /dev/null @@ -1,80 +0,0 @@ -// - -#nullable disable - -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// Phoenix server dataset. - public partial class PhoenixObjectDataset : DataFactoryDatasetProperties - { - /// Initializes a new instance of PhoenixObjectDataset. - /// Linked service reference. - /// is null. - public PhoenixObjectDataset(DataFactoryLinkedServiceReference linkedServiceName) : base(linkedServiceName) - { - Argument.AssertNotNull(linkedServiceName, nameof(linkedServiceName)); - - DatasetType = "PhoenixObject"; - } - - /// Initializes a new instance of PhoenixObjectDataset. - /// Type of dataset. - /// Dataset description. - /// Columns that define the structure of the dataset. Type: array (or Expression with resultType array), itemType: DatasetDataElement. - /// Columns that define the physical type schema of the dataset. Type: array (or Expression with resultType array), itemType: DatasetSchemaDataElement. - /// Linked service reference. - /// Parameters for dataset. - /// List of tags that can be used for describing the Dataset. - /// The folder that this Dataset is in. If not specified, Dataset will appear at the root level. - /// Additional Properties. - /// This property will be retired. Please consider using schema + table properties instead. - /// The table name of the Phoenix. Type: string (or Expression with resultType string). - /// The schema name of the Phoenix. Type: string (or Expression with resultType string). - internal PhoenixObjectDataset(string datasetType, string description, DataFactoryElement> structure, DataFactoryElement> schema, DataFactoryLinkedServiceReference linkedServiceName, IDictionary parameters, IList annotations, DatasetFolder folder, IDictionary> additionalProperties, BinaryData tableName, DataFactoryElement table, DataFactoryElement schemaTypePropertiesSchema) : base(datasetType, description, structure, schema, linkedServiceName, parameters, annotations, folder, additionalProperties) - { - TableName = tableName; - Table = table; - SchemaTypePropertiesSchema = schemaTypePropertiesSchema; - DatasetType = datasetType ?? "PhoenixObject"; - } - - /// - /// This property will be retired. Please consider using schema + table properties instead. - /// - /// To assign an object to this property use . - /// - /// - /// To assign an already formated json string to this property use . - /// - /// - /// Examples: - /// - /// - /// BinaryData.FromObjectAsJson("foo") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromString("\"foo\"") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromObjectAsJson(new { key = "value" }) - /// Creates a payload of { "key": "value" }. - /// - /// - /// BinaryData.FromString("{\"key\": \"value\"}") - /// Creates a payload of { "key": "value" }. - /// - /// - /// - /// - public BinaryData TableName { get; set; } - /// The table name of the Phoenix. Type: string (or Expression with resultType string). - public DataFactoryElement Table { get; set; } - /// The schema name of the Phoenix. Type: string (or Expression with resultType string). - public DataFactoryElement SchemaTypePropertiesSchema { get; set; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/PhoenixSource.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/PhoenixSource.Serialization.cs deleted file mode 100644 index f76736db..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/PhoenixSource.Serialization.cs +++ /dev/null @@ -1,161 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class PhoenixSource : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - if (Optional.IsDefined(Query)) - { - writer.WritePropertyName("query"u8); - JsonSerializer.Serialize(writer, Query); - } - if (Optional.IsDefined(QueryTimeout)) - { - writer.WritePropertyName("queryTimeout"u8); - JsonSerializer.Serialize(writer, QueryTimeout); - } - if (Optional.IsDefined(AdditionalColumns)) - { - writer.WritePropertyName("additionalColumns"u8); -#if NET6_0_OR_GREATER - writer.WriteRawValue(AdditionalColumns); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(AdditionalColumns.ToString()).RootElement); -#endif - } - writer.WritePropertyName("type"u8); - writer.WriteStringValue(CopySourceType); - if (Optional.IsDefined(SourceRetryCount)) - { - writer.WritePropertyName("sourceRetryCount"u8); - JsonSerializer.Serialize(writer, SourceRetryCount); - } - if (Optional.IsDefined(SourceRetryWait)) - { - writer.WritePropertyName("sourceRetryWait"u8); - JsonSerializer.Serialize(writer, SourceRetryWait); - } - if (Optional.IsDefined(MaxConcurrentConnections)) - { - writer.WritePropertyName("maxConcurrentConnections"u8); - JsonSerializer.Serialize(writer, MaxConcurrentConnections); - } - if (Optional.IsDefined(DisableMetricsCollection)) - { - writer.WritePropertyName("disableMetricsCollection"u8); - JsonSerializer.Serialize(writer, DisableMetricsCollection); - } - foreach (var item in AdditionalProperties) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.Value.ToString()).RootElement); -#endif - } - writer.WriteEndObject(); - } - - internal static PhoenixSource DeserializePhoenixSource(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - Optional> query = default; - Optional> queryTimeout = default; - Optional additionalColumns = default; - string type = default; - Optional> sourceRetryCount = default; - Optional> sourceRetryWait = default; - Optional> maxConcurrentConnections = default; - Optional> disableMetricsCollection = default; - IDictionary> additionalProperties = default; - Dictionary> additionalPropertiesDictionary = new Dictionary>(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("query"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - query = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("queryTimeout"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - queryTimeout = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("additionalColumns"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - additionalColumns = BinaryData.FromString(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("type"u8)) - { - type = property.Value.GetString(); - continue; - } - if (property.NameEquals("sourceRetryCount"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - sourceRetryCount = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("sourceRetryWait"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - sourceRetryWait = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("maxConcurrentConnections"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - maxConcurrentConnections = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("disableMetricsCollection"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - disableMetricsCollection = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - additionalPropertiesDictionary.Add(property.Name, JsonSerializer.Deserialize>(property.Value.GetRawText())); - } - additionalProperties = additionalPropertiesDictionary; - return new PhoenixSource(type, sourceRetryCount.Value, sourceRetryWait.Value, maxConcurrentConnections.Value, disableMetricsCollection.Value, additionalProperties, queryTimeout.Value, additionalColumns.Value, query.Value); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/PhoenixSource.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/PhoenixSource.cs deleted file mode 100644 index 5f0c4dbb..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/PhoenixSource.cs +++ /dev/null @@ -1,37 +0,0 @@ -// - -#nullable disable - -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// A copy activity Phoenix server source. - public partial class PhoenixSource : TabularSource - { - /// Initializes a new instance of PhoenixSource. - public PhoenixSource() - { - CopySourceType = "PhoenixSource"; - } - - /// Initializes a new instance of PhoenixSource. - /// Copy source type. - /// Source retry count. Type: integer (or Expression with resultType integer). - /// Source retry wait. Type: string (or Expression with resultType string), pattern: ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). - /// The maximum concurrent connection count for the source data store. Type: integer (or Expression with resultType integer). - /// If true, disable data store metrics collection. Default is false. Type: boolean (or Expression with resultType boolean). - /// Additional Properties. - /// 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). - /// A query to retrieve data from source. Type: string (or Expression with resultType string). - internal PhoenixSource(string copySourceType, DataFactoryElement sourceRetryCount, DataFactoryElement sourceRetryWait, DataFactoryElement maxConcurrentConnections, DataFactoryElement disableMetricsCollection, IDictionary> additionalProperties, DataFactoryElement queryTimeout, BinaryData additionalColumns, DataFactoryElement query) : base(copySourceType, sourceRetryCount, sourceRetryWait, maxConcurrentConnections, disableMetricsCollection, additionalProperties, queryTimeout, additionalColumns) - { - Query = query; - CopySourceType = copySourceType ?? "PhoenixSource"; - } - - /// A query to retrieve data from source. Type: string (or Expression with resultType string). - public DataFactoryElement Query { get; set; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/PipelineActivity.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/PipelineActivity.Serialization.cs deleted file mode 100644 index e443c87b..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/PipelineActivity.Serialization.cs +++ /dev/null @@ -1,122 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class PipelineActivity : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ActivityType); - if (Optional.IsDefined(Description)) - { - writer.WritePropertyName("description"u8); - writer.WriteStringValue(Description); - } - if (Optional.IsDefined(State)) - { - writer.WritePropertyName("state"u8); - writer.WriteStringValue(State.Value.ToString()); - } - if (Optional.IsDefined(OnInactiveMarkAs)) - { - writer.WritePropertyName("onInactiveMarkAs"u8); - writer.WriteStringValue(OnInactiveMarkAs.Value.ToString()); - } - if (Optional.IsCollectionDefined(DependsOn)) - { - writer.WritePropertyName("dependsOn"u8); - writer.WriteStartArray(); - foreach (var item in DependsOn) - { - writer.WriteObjectValue(item); - } - writer.WriteEndArray(); - } - if (Optional.IsCollectionDefined(UserProperties)) - { - writer.WritePropertyName("userProperties"u8); - writer.WriteStartArray(); - foreach (var item in UserProperties) - { - writer.WriteObjectValue(item); - } - writer.WriteEndArray(); - } - foreach (var item in AdditionalProperties) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.Value.ToString()).RootElement); -#endif - } - writer.WriteEndObject(); - } - - internal static PipelineActivity DeserializePipelineActivity(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - if (element.TryGetProperty("type", out JsonElement discriminator)) - { - switch (discriminator.GetString()) - { - case "AppendVariable": return AppendVariableActivity.DeserializeAppendVariableActivity(element); - case "AzureDataExplorerCommand": return AzureDataExplorerCommandActivity.DeserializeAzureDataExplorerCommandActivity(element); - case "AzureFunctionActivity": return AzureFunctionActivity.DeserializeAzureFunctionActivity(element); - case "AzureMLBatchExecution": return AzureMLBatchExecutionActivity.DeserializeAzureMLBatchExecutionActivity(element); - case "AzureMLExecutePipeline": return AzureMLExecutePipelineActivity.DeserializeAzureMLExecutePipelineActivity(element); - case "AzureMLUpdateResource": return AzureMLUpdateResourceActivity.DeserializeAzureMLUpdateResourceActivity(element); - case "Container": return ControlActivity.DeserializeControlActivity(element); - case "Copy": return CopyActivity.DeserializeCopyActivity(element); - case "Custom": return CustomActivity.DeserializeCustomActivity(element); - case "DataLakeAnalyticsU-SQL": return DataLakeAnalyticsUsqlActivity.DeserializeDataLakeAnalyticsUsqlActivity(element); - case "DatabricksNotebook": return DatabricksNotebookActivity.DeserializeDatabricksNotebookActivity(element); - case "DatabricksSparkJar": return DatabricksSparkJarActivity.DeserializeDatabricksSparkJarActivity(element); - case "DatabricksSparkPython": return DatabricksSparkPythonActivity.DeserializeDatabricksSparkPythonActivity(element); - case "Delete": return DeleteActivity.DeserializeDeleteActivity(element); - case "ExecuteDataFlow": return ExecuteDataFlowActivity.DeserializeExecuteDataFlowActivity(element); - case "ExecutePipeline": return ExecutePipelineActivity.DeserializeExecutePipelineActivity(element); - case "ExecuteSSISPackage": return ExecuteSsisPackageActivity.DeserializeExecuteSsisPackageActivity(element); - case "ExecuteWranglingDataflow": return ExecuteWranglingDataflowActivity.DeserializeExecuteWranglingDataflowActivity(element); - case "Execution": return ExecutionActivity.DeserializeExecutionActivity(element); - case "Fail": return FailActivity.DeserializeFailActivity(element); - case "Filter": return FilterActivity.DeserializeFilterActivity(element); - case "ForEach": return ForEachActivity.DeserializeForEachActivity(element); - case "GetMetadata": return GetDatasetMetadataActivity.DeserializeGetDatasetMetadataActivity(element); - case "HDInsightHive": return HDInsightHiveActivity.DeserializeHDInsightHiveActivity(element); - case "HDInsightMapReduce": return HDInsightMapReduceActivity.DeserializeHDInsightMapReduceActivity(element); - case "HDInsightPig": return HDInsightPigActivity.DeserializeHDInsightPigActivity(element); - case "HDInsightSpark": return HDInsightSparkActivity.DeserializeHDInsightSparkActivity(element); - case "HDInsightStreaming": return HDInsightStreamingActivity.DeserializeHDInsightStreamingActivity(element); - case "IfCondition": return IfConditionActivity.DeserializeIfConditionActivity(element); - case "Lookup": return LookupActivity.DeserializeLookupActivity(element); - case "Script": return DataFactoryScriptActivity.DeserializeDataFactoryScriptActivity(element); - case "SetVariable": return SetVariableActivity.DeserializeSetVariableActivity(element); - case "SparkJob": return SynapseSparkJobDefinitionActivity.DeserializeSynapseSparkJobDefinitionActivity(element); - case "SqlServerStoredProcedure": return SqlServerStoredProcedureActivity.DeserializeSqlServerStoredProcedureActivity(element); - case "Switch": return SwitchActivity.DeserializeSwitchActivity(element); - case "SynapseNotebook": return SynapseNotebookActivity.DeserializeSynapseNotebookActivity(element); - case "Until": return UntilActivity.DeserializeUntilActivity(element); - case "Validation": return ValidationActivity.DeserializeValidationActivity(element); - case "Wait": return WaitActivity.DeserializeWaitActivity(element); - case "WebActivity": return WebActivity.DeserializeWebActivity(element); - case "WebHook": return WebHookActivity.DeserializeWebHookActivity(element); - } - } - return UnknownActivity.DeserializeUnknownActivity(element); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/PipelineActivity.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/PipelineActivity.cs deleted file mode 100644 index f1416e9a..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/PipelineActivity.cs +++ /dev/null @@ -1,97 +0,0 @@ -// - -#nullable disable - -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// - /// A pipeline activity. - /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. - /// The available derived classes include , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , and . - /// - public partial class PipelineActivity - { - /// Initializes a new instance of PipelineActivity. - /// Activity name. - /// is null. - public PipelineActivity(string name) - { - Argument.AssertNotNull(name, nameof(name)); - - Name = name; - DependsOn = new ChangeTrackingList(); - UserProperties = new ChangeTrackingList(); - AdditionalProperties = new ChangeTrackingDictionary>(); - } - - /// Initializes a new instance of PipelineActivity. - /// Activity name. - /// Type of activity. - /// Activity description. - /// Activity state. This is an optional property and if not provided, the state will be Active by default. - /// 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. - /// Activity depends on condition. - /// Activity user properties. - /// Additional Properties. - internal PipelineActivity(string name, string activityType, string description, PipelineActivityState? state, ActivityOnInactiveMarkAs? onInactiveMarkAs, IList dependsOn, IList userProperties, IDictionary> additionalProperties) - { - Name = name; - ActivityType = activityType; - Description = description; - State = state; - OnInactiveMarkAs = onInactiveMarkAs; - DependsOn = dependsOn; - UserProperties = userProperties; - AdditionalProperties = additionalProperties; - } - - /// Activity name. - public string Name { get; set; } - /// Type of activity. - internal string ActivityType { get; set; } - /// Activity description. - public string Description { get; set; } - /// Activity state. This is an optional property and if not provided, the state will be Active by default. - public PipelineActivityState? State { get; set; } - /// 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. - public ActivityOnInactiveMarkAs? OnInactiveMarkAs { get; set; } - /// Activity depends on condition. - public IList DependsOn { get; } - /// Activity user properties. - public IList UserProperties { get; } - /// - /// Additional Properties - /// - /// To assign an object to the value of this property use . - /// - /// - /// To assign an already formated json string to this property use . - /// - /// - /// Examples: - /// - /// - /// BinaryData.FromObjectAsJson("foo") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromString("\"foo\"") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromObjectAsJson(new { key = "value" }) - /// Creates a payload of { "key": "value" }. - /// - /// - /// BinaryData.FromString("{\"key\": \"value\"}") - /// Creates a payload of { "key": "value" }. - /// - /// - /// - /// - public IDictionary> AdditionalProperties { get; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/PipelineActivityDependency.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/PipelineActivityDependency.Serialization.cs deleted file mode 100644 index 96e867f1..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/PipelineActivityDependency.Serialization.cs +++ /dev/null @@ -1,70 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class PipelineActivityDependency : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - writer.WritePropertyName("activity"u8); - writer.WriteStringValue(Activity); - writer.WritePropertyName("dependencyConditions"u8); - writer.WriteStartArray(); - foreach (var item in DependencyConditions) - { - writer.WriteStringValue(item.ToString()); - } - writer.WriteEndArray(); - foreach (var item in AdditionalProperties) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.Value.ToString()).RootElement); -#endif - } - writer.WriteEndObject(); - } - - internal static PipelineActivityDependency DeserializePipelineActivityDependency(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - string activity = default; - IList dependencyConditions = default; - IDictionary> additionalProperties = default; - Dictionary> additionalPropertiesDictionary = new Dictionary>(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("activity"u8)) - { - activity = property.Value.GetString(); - continue; - } - if (property.NameEquals("dependencyConditions"u8)) - { - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - array.Add(new DependencyCondition(item.GetString())); - } - dependencyConditions = array; - continue; - } - additionalPropertiesDictionary.Add(property.Name, JsonSerializer.Deserialize>(property.Value.GetRawText())); - } - additionalProperties = additionalPropertiesDictionary; - return new PipelineActivityDependency(activity, dependencyConditions, additionalProperties); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/PipelineActivityDependency.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/PipelineActivityDependency.cs deleted file mode 100644 index 8cf0d21c..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/PipelineActivityDependency.cs +++ /dev/null @@ -1,74 +0,0 @@ -// - -#nullable disable - -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// Activity dependency information. - public partial class PipelineActivityDependency - { - /// Initializes a new instance of PipelineActivityDependency. - /// Activity name. - /// Match-Condition for the dependency. - /// or is null. - public PipelineActivityDependency(string activity, IEnumerable dependencyConditions) - { - Argument.AssertNotNull(activity, nameof(activity)); - Argument.AssertNotNull(dependencyConditions, nameof(dependencyConditions)); - - Activity = activity; - DependencyConditions = dependencyConditions.ToList(); - AdditionalProperties = new ChangeTrackingDictionary>(); - } - - /// Initializes a new instance of PipelineActivityDependency. - /// Activity name. - /// Match-Condition for the dependency. - /// Additional Properties. - internal PipelineActivityDependency(string activity, IList dependencyConditions, IDictionary> additionalProperties) - { - Activity = activity; - DependencyConditions = dependencyConditions; - AdditionalProperties = additionalProperties; - } - - /// Activity name. - public string Activity { get; set; } - /// Match-Condition for the dependency. - public IList DependencyConditions { get; } - /// - /// Additional Properties - /// - /// To assign an object to the value of this property use . - /// - /// - /// To assign an already formated json string to this property use . - /// - /// - /// Examples: - /// - /// - /// BinaryData.FromObjectAsJson("foo") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromString("\"foo\"") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromObjectAsJson(new { key = "value" }) - /// Creates a payload of { "key": "value" }. - /// - /// - /// BinaryData.FromString("{\"key\": \"value\"}") - /// Creates a payload of { "key": "value" }. - /// - /// - /// - /// - public IDictionary> AdditionalProperties { get; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/PipelineActivityPolicy.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/PipelineActivityPolicy.Serialization.cs deleted file mode 100644 index 35148732..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/PipelineActivityPolicy.Serialization.cs +++ /dev/null @@ -1,119 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class PipelineActivityPolicy : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - if (Optional.IsDefined(Timeout)) - { - writer.WritePropertyName("timeout"u8); - JsonSerializer.Serialize(writer, Timeout); - } - if (Optional.IsDefined(Retry)) - { - writer.WritePropertyName("retry"u8); - JsonSerializer.Serialize(writer, Retry); - } - if (Optional.IsDefined(RetryIntervalInSeconds)) - { - writer.WritePropertyName("retryIntervalInSeconds"u8); - writer.WriteNumberValue(RetryIntervalInSeconds.Value); - } - if (Optional.IsDefined(IsSecureInputEnabled)) - { - writer.WritePropertyName("secureInput"u8); - writer.WriteBooleanValue(IsSecureInputEnabled.Value); - } - if (Optional.IsDefined(IsSecureOutputEnabled)) - { - writer.WritePropertyName("secureOutput"u8); - writer.WriteBooleanValue(IsSecureOutputEnabled.Value); - } - foreach (var item in AdditionalProperties) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.Value.ToString()).RootElement); -#endif - } - writer.WriteEndObject(); - } - - internal static PipelineActivityPolicy DeserializePipelineActivityPolicy(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - Optional> timeout = default; - Optional> retry = default; - Optional retryIntervalInSeconds = default; - Optional secureInput = default; - Optional secureOutput = default; - IDictionary> additionalProperties = default; - Dictionary> additionalPropertiesDictionary = new Dictionary>(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("timeout"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - timeout = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("retry"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - retry = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("retryIntervalInSeconds"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - retryIntervalInSeconds = property.Value.GetInt32(); - continue; - } - if (property.NameEquals("secureInput"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - secureInput = property.Value.GetBoolean(); - continue; - } - if (property.NameEquals("secureOutput"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - secureOutput = property.Value.GetBoolean(); - continue; - } - additionalPropertiesDictionary.Add(property.Name, JsonSerializer.Deserialize>(property.Value.GetRawText())); - } - additionalProperties = additionalPropertiesDictionary; - return new PipelineActivityPolicy(timeout.Value, retry.Value, Optional.ToNullable(retryIntervalInSeconds), Optional.ToNullable(secureInput), Optional.ToNullable(secureOutput), additionalProperties); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/PipelineActivityPolicy.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/PipelineActivityPolicy.cs deleted file mode 100644 index 7a4cf666..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/PipelineActivityPolicy.cs +++ /dev/null @@ -1,78 +0,0 @@ -// - -#nullable disable - -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// Execution policy for an activity. - public partial class PipelineActivityPolicy - { - /// Initializes a new instance of PipelineActivityPolicy. - public PipelineActivityPolicy() - { - AdditionalProperties = new ChangeTrackingDictionary>(); - } - - /// Initializes a new instance of PipelineActivityPolicy. - /// Specifies the timeout for the activity to run. The default timeout is 7 days. Type: string (or Expression with resultType string), pattern: ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). - /// Maximum ordinary retry attempts. Default is 0. Type: integer (or Expression with resultType integer), minimum: 0. - /// Interval between each retry attempt (in seconds). The default is 30 sec. - /// When set to true, Input from activity is considered as secure and will not be logged to monitoring. - /// When set to true, Output from activity is considered as secure and will not be logged to monitoring. - /// Additional Properties. - internal PipelineActivityPolicy(DataFactoryElement timeout, DataFactoryElement retry, int? retryIntervalInSeconds, bool? isSecureInputEnabled, bool? isSecureOutputEnabled, IDictionary> additionalProperties) - { - Timeout = timeout; - Retry = retry; - RetryIntervalInSeconds = retryIntervalInSeconds; - IsSecureInputEnabled = isSecureInputEnabled; - IsSecureOutputEnabled = isSecureOutputEnabled; - AdditionalProperties = additionalProperties; - } - - /// Specifies the timeout for the activity to run. The default timeout is 7 days. Type: string (or Expression with resultType string), pattern: ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). - public DataFactoryElement Timeout { get; set; } - /// Maximum ordinary retry attempts. Default is 0. Type: integer (or Expression with resultType integer), minimum: 0. - public DataFactoryElement Retry { get; set; } - /// Interval between each retry attempt (in seconds). The default is 30 sec. - public int? RetryIntervalInSeconds { get; set; } - /// When set to true, Input from activity is considered as secure and will not be logged to monitoring. - public bool? IsSecureInputEnabled { get; set; } - /// When set to true, Output from activity is considered as secure and will not be logged to monitoring. - public bool? IsSecureOutputEnabled { get; set; } - /// - /// Additional Properties - /// - /// To assign an object to the value of this property use . - /// - /// - /// To assign an already formated json string to this property use . - /// - /// - /// Examples: - /// - /// - /// BinaryData.FromObjectAsJson("foo") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromString("\"foo\"") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromObjectAsJson(new { key = "value" }) - /// Creates a payload of { "key": "value" }. - /// - /// - /// BinaryData.FromString("{\"key\": \"value\"}") - /// Creates a payload of { "key": "value" }. - /// - /// - /// - /// - public IDictionary> AdditionalProperties { get; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/PipelineActivityRunInformation.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/PipelineActivityRunInformation.Serialization.cs deleted file mode 100644 index 25b76dba..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/PipelineActivityRunInformation.Serialization.cs +++ /dev/null @@ -1,139 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class PipelineActivityRunInformation - { - internal static PipelineActivityRunInformation DeserializePipelineActivityRunInformation(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - Optional pipelineName = default; - Optional pipelineRunId = default; - Optional activityName = default; - Optional activityType = default; - Optional activityRunId = default; - Optional linkedServiceName = default; - Optional status = default; - Optional activityRunStart = default; - Optional activityRunEnd = default; - Optional durationInMs = default; - Optional input = default; - Optional output = default; - Optional error = default; - IReadOnlyDictionary> additionalProperties = default; - Dictionary> additionalPropertiesDictionary = new Dictionary>(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("pipelineName"u8)) - { - pipelineName = property.Value.GetString(); - continue; - } - if (property.NameEquals("pipelineRunId"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - pipelineRunId = property.Value.GetGuid(); - continue; - } - if (property.NameEquals("activityName"u8)) - { - activityName = property.Value.GetString(); - continue; - } - if (property.NameEquals("activityType"u8)) - { - activityType = property.Value.GetString(); - continue; - } - if (property.NameEquals("activityRunId"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - activityRunId = property.Value.GetGuid(); - continue; - } - if (property.NameEquals("linkedServiceName"u8)) - { - linkedServiceName = property.Value.GetString(); - continue; - } - if (property.NameEquals("status"u8)) - { - status = property.Value.GetString(); - continue; - } - if (property.NameEquals("activityRunStart"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - activityRunStart = property.Value.GetDateTimeOffset("O"); - continue; - } - if (property.NameEquals("activityRunEnd"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - activityRunEnd = property.Value.GetDateTimeOffset("O"); - continue; - } - if (property.NameEquals("durationInMs"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - durationInMs = property.Value.GetInt32(); - continue; - } - if (property.NameEquals("input"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - input = BinaryData.FromString(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("output"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - output = BinaryData.FromString(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("error"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - error = BinaryData.FromString(property.Value.GetRawText()); - continue; - } - additionalPropertiesDictionary.Add(property.Name, JsonSerializer.Deserialize>(property.Value.GetRawText())); - } - additionalProperties = additionalPropertiesDictionary; - return new PipelineActivityRunInformation(pipelineName.Value, Optional.ToNullable(pipelineRunId), activityName.Value, activityType.Value, Optional.ToNullable(activityRunId), linkedServiceName.Value, status.Value, Optional.ToNullable(activityRunStart), Optional.ToNullable(activityRunEnd), Optional.ToNullable(durationInMs), input.Value, output.Value, error.Value, additionalProperties); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/PipelineActivityRunInformation.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/PipelineActivityRunInformation.cs deleted file mode 100644 index 482670bb..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/PipelineActivityRunInformation.cs +++ /dev/null @@ -1,197 +0,0 @@ -// - -#nullable disable - -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// Information about an activity run in a pipeline. - public partial class PipelineActivityRunInformation - { - /// Initializes a new instance of PipelineActivityRunInformation. - internal PipelineActivityRunInformation() - { - AdditionalProperties = new ChangeTrackingDictionary>(); - } - - /// Initializes a new instance of PipelineActivityRunInformation. - /// The name of the pipeline. - /// The id of the pipeline run. - /// The name of the activity. - /// The type of the activity. - /// The id of the activity run. - /// The name of the compute linked service. - /// The status of the activity run. - /// The start time of the activity run in 'ISO 8601' format. - /// The end time of the activity run in 'ISO 8601' format. - /// The duration of the activity run. - /// The input for the activity. - /// The output for the activity. - /// The error if any from the activity run. - /// Additional Properties. - internal PipelineActivityRunInformation(string pipelineName, Guid? pipelineRunId, string activityName, string activityType, Guid? activityRunId, string linkedServiceName, string status, DateTimeOffset? startOn, DateTimeOffset? endOn, int? durationInMs, BinaryData input, BinaryData output, BinaryData error, IReadOnlyDictionary> additionalProperties) - { - PipelineName = pipelineName; - PipelineRunId = pipelineRunId; - ActivityName = activityName; - ActivityType = activityType; - ActivityRunId = activityRunId; - LinkedServiceName = linkedServiceName; - Status = status; - StartOn = startOn; - EndOn = endOn; - DurationInMs = durationInMs; - Input = input; - Output = output; - Error = error; - AdditionalProperties = additionalProperties; - } - - /// The name of the pipeline. - public string PipelineName { get; } - /// The id of the pipeline run. - public Guid? PipelineRunId { get; } - /// The name of the activity. - public string ActivityName { get; } - /// The type of the activity. - public string ActivityType { get; } - /// The id of the activity run. - public Guid? ActivityRunId { get; } - /// The name of the compute linked service. - public string LinkedServiceName { get; } - /// The status of the activity run. - public string Status { get; } - /// The start time of the activity run in 'ISO 8601' format. - public DateTimeOffset? StartOn { get; } - /// The end time of the activity run in 'ISO 8601' format. - public DateTimeOffset? EndOn { get; } - /// The duration of the activity run. - public int? DurationInMs { get; } - /// - /// The input for the activity. - /// - /// To assign an object to this property use . - /// - /// - /// To assign an already formated json string to this property use . - /// - /// - /// Examples: - /// - /// - /// BinaryData.FromObjectAsJson("foo") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromString("\"foo\"") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromObjectAsJson(new { key = "value" }) - /// Creates a payload of { "key": "value" }. - /// - /// - /// BinaryData.FromString("{\"key\": \"value\"}") - /// Creates a payload of { "key": "value" }. - /// - /// - /// - /// - public BinaryData Input { get; } - /// - /// The output for the activity. - /// - /// To assign an object to this property use . - /// - /// - /// To assign an already formated json string to this property use . - /// - /// - /// Examples: - /// - /// - /// BinaryData.FromObjectAsJson("foo") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromString("\"foo\"") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromObjectAsJson(new { key = "value" }) - /// Creates a payload of { "key": "value" }. - /// - /// - /// BinaryData.FromString("{\"key\": \"value\"}") - /// Creates a payload of { "key": "value" }. - /// - /// - /// - /// - public BinaryData Output { get; } - /// - /// The error if any from the activity run. - /// - /// To assign an object to this property use . - /// - /// - /// To assign an already formated json string to this property use . - /// - /// - /// Examples: - /// - /// - /// BinaryData.FromObjectAsJson("foo") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromString("\"foo\"") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromObjectAsJson(new { key = "value" }) - /// Creates a payload of { "key": "value" }. - /// - /// - /// BinaryData.FromString("{\"key\": \"value\"}") - /// Creates a payload of { "key": "value" }. - /// - /// - /// - /// - public BinaryData Error { get; } - /// - /// Additional Properties - /// - /// To assign an object to the value of this property use . - /// - /// - /// To assign an already formated json string to this property use . - /// - /// - /// Examples: - /// - /// - /// BinaryData.FromObjectAsJson("foo") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromString("\"foo\"") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromObjectAsJson(new { key = "value" }) - /// Creates a payload of { "key": "value" }. - /// - /// - /// BinaryData.FromString("{\"key\": \"value\"}") - /// Creates a payload of { "key": "value" }. - /// - /// - /// - /// - public IReadOnlyDictionary> AdditionalProperties { get; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/PipelineActivityRunsResult.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/PipelineActivityRunsResult.Serialization.cs deleted file mode 100644 index a6ce662e..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/PipelineActivityRunsResult.Serialization.cs +++ /dev/null @@ -1,41 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; - -namespace AzureDataFactory.TestingFramework.Models -{ - internal partial class PipelineActivityRunsResult - { - internal static PipelineActivityRunsResult DeserializePipelineActivityRunsResult(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - IReadOnlyList value = default; - Optional continuationToken = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("value"u8)) - { - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - array.Add(PipelineActivityRunInformation.DeserializePipelineActivityRunInformation(item)); - } - value = array; - continue; - } - if (property.NameEquals("continuationToken"u8)) - { - continuationToken = property.Value.GetString(); - continue; - } - } - return new PipelineActivityRunsResult(value, continuationToken.Value); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/PipelineActivityRunsResult.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/PipelineActivityRunsResult.cs deleted file mode 100644 index 7b9bf832..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/PipelineActivityRunsResult.cs +++ /dev/null @@ -1,36 +0,0 @@ -// - -#nullable disable - -using Azure.Core; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// A list activity runs. - internal partial class PipelineActivityRunsResult - { - /// Initializes a new instance of PipelineActivityRunsResult. - /// List of activity runs. - /// is null. - internal PipelineActivityRunsResult(IEnumerable value) - { - Argument.AssertNotNull(value, nameof(value)); - - Value = value.ToList(); - } - - /// Initializes a new instance of PipelineActivityRunsResult. - /// List of activity runs. - /// The continuation token for getting the next page of results, if any remaining results exist, null otherwise. - internal PipelineActivityRunsResult(IReadOnlyList value, string continuationToken) - { - Value = value; - ContinuationToken = continuationToken; - } - - /// List of activity runs. - public IReadOnlyList Value { get; } - /// The continuation token for getting the next page of results, if any remaining results exist, null otherwise. - public string ContinuationToken { get; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/PipelineActivityState.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/PipelineActivityState.cs deleted file mode 100644 index 757cd176..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/PipelineActivityState.cs +++ /dev/null @@ -1,47 +0,0 @@ -// - -#nullable disable - -using System.ComponentModel; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// Activity state. This is an optional property and if not provided, the state will be Active by default. - public readonly partial struct PipelineActivityState : IEquatable - { - private readonly string _value; - - /// Initializes a new instance of . - /// is null. - public PipelineActivityState(string value) - { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } - - private const string ActiveValue = "Active"; - private const string InactiveValue = "Inactive"; - - /// Active. - public static PipelineActivityState Active { get; } = new PipelineActivityState(ActiveValue); - /// Inactive. - public static PipelineActivityState Inactive { get; } = new PipelineActivityState(InactiveValue); - /// Determines if two values are the same. - public static bool operator ==(PipelineActivityState left, PipelineActivityState right) => left.Equals(right); - /// Determines if two values are not the same. - public static bool operator !=(PipelineActivityState left, PipelineActivityState right) => !left.Equals(right); - /// Converts a string to a . - public static implicit operator PipelineActivityState(string value) => new PipelineActivityState(value); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override bool Equals(object obj) => obj is PipelineActivityState other && Equals(other); - /// - public bool Equals(PipelineActivityState other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override int GetHashCode() => _value?.GetHashCode() ?? 0; - /// - public override string ToString() => _value; - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/PipelineActivityUserProperty.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/PipelineActivityUserProperty.Serialization.cs deleted file mode 100644 index fd3e5fee..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/PipelineActivityUserProperty.Serialization.cs +++ /dev/null @@ -1,47 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class PipelineActivityUserProperty : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - writer.WritePropertyName("value"u8); - JsonSerializer.Serialize(writer, Value); - writer.WriteEndObject(); - } - - internal static PipelineActivityUserProperty DeserializePipelineActivityUserProperty(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - string name = default; - DataFactoryElement value = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("name"u8)) - { - name = property.Value.GetString(); - continue; - } - if (property.NameEquals("value"u8)) - { - value = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - } - return new PipelineActivityUserProperty(name, value); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/PipelineActivityUserProperty.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/PipelineActivityUserProperty.cs deleted file mode 100644 index 2d3b62e2..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/PipelineActivityUserProperty.cs +++ /dev/null @@ -1,31 +0,0 @@ -// - -#nullable disable - -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// User property. - public partial class PipelineActivityUserProperty - { - /// Initializes a new instance of PipelineActivityUserProperty. - /// User property name. - /// User property value. Type: string (or Expression with resultType string). - /// or is null. - public PipelineActivityUserProperty(string name, DataFactoryElement value) - { - Argument.AssertNotNull(name, nameof(name)); - Argument.AssertNotNull(value, nameof(value)); - - Name = name; - Value = value; - } - - /// User property name. - public string Name { get; set; } - /// User property value. Type: string (or Expression with resultType string). - public DataFactoryElement Value { get; set; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/PipelineCreateRunResult.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/PipelineCreateRunResult.Serialization.cs deleted file mode 100644 index d3d0e0a2..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/PipelineCreateRunResult.Serialization.cs +++ /dev/null @@ -1,29 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class PipelineCreateRunResult - { - internal static PipelineCreateRunResult DeserializePipelineCreateRunResult(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - Guid runId = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("runId"u8)) - { - runId = property.Value.GetGuid(); - continue; - } - } - return new PipelineCreateRunResult(runId); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/PipelineCreateRunResult.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/PipelineCreateRunResult.cs deleted file mode 100644 index 25430a67..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/PipelineCreateRunResult.cs +++ /dev/null @@ -1,20 +0,0 @@ -// - -#nullable disable - -namespace AzureDataFactory.TestingFramework.Models -{ - /// Response body with a run identifier. - public partial class PipelineCreateRunResult - { - /// Initializes a new instance of PipelineCreateRunResult. - /// Identifier of a run. - internal PipelineCreateRunResult(Guid runId) - { - RunId = runId; - } - - /// Identifier of a run. - public Guid RunId { get; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/PipelineElapsedTimeMetricPolicy.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/PipelineElapsedTimeMetricPolicy.Serialization.cs deleted file mode 100644 index 795ce5c3..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/PipelineElapsedTimeMetricPolicy.Serialization.cs +++ /dev/null @@ -1,49 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; - -namespace AzureDataFactory.TestingFramework.Models -{ - internal partial class PipelineElapsedTimeMetricPolicy : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - if (Optional.IsDefined(Duration)) - { - writer.WritePropertyName("duration"u8); -#if NET6_0_OR_GREATER - writer.WriteRawValue(Duration); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(Duration.ToString()).RootElement); -#endif - } - writer.WriteEndObject(); - } - - internal static PipelineElapsedTimeMetricPolicy DeserializePipelineElapsedTimeMetricPolicy(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - Optional duration = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("duration"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - duration = BinaryData.FromString(property.Value.GetRawText()); - continue; - } - } - return new PipelineElapsedTimeMetricPolicy(duration.Value); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/PipelineElapsedTimeMetricPolicy.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/PipelineElapsedTimeMetricPolicy.cs deleted file mode 100644 index 3ef2dc99..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/PipelineElapsedTimeMetricPolicy.cs +++ /dev/null @@ -1,54 +0,0 @@ -// - -#nullable disable - -namespace AzureDataFactory.TestingFramework.Models -{ - /// Pipeline ElapsedTime Metric Policy. - internal partial class PipelineElapsedTimeMetricPolicy - { - /// Initializes a new instance of PipelineElapsedTimeMetricPolicy. - public PipelineElapsedTimeMetricPolicy() - { - } - - /// Initializes a new instance of PipelineElapsedTimeMetricPolicy. - /// TimeSpan value, after which an Azure Monitoring Metric is fired. - internal PipelineElapsedTimeMetricPolicy(BinaryData duration) - { - Duration = duration; - } - - /// - /// TimeSpan value, after which an Azure Monitoring Metric is fired. - /// - /// To assign an object to this property use . - /// - /// - /// To assign an already formated json string to this property use . - /// - /// - /// Examples: - /// - /// - /// BinaryData.FromObjectAsJson("foo") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromString("\"foo\"") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromObjectAsJson(new { key = "value" }) - /// Creates a payload of { "key": "value" }. - /// - /// - /// BinaryData.FromString("{\"key\": \"value\"}") - /// Creates a payload of { "key": "value" }. - /// - /// - /// - /// - public BinaryData Duration { get; set; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/PipelineExternalComputeScaleProperties.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/PipelineExternalComputeScaleProperties.Serialization.cs deleted file mode 100644 index a26b5faf..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/PipelineExternalComputeScaleProperties.Serialization.cs +++ /dev/null @@ -1,59 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class PipelineExternalComputeScaleProperties : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - if (Optional.IsDefined(TimeToLive)) - { - writer.WritePropertyName("timeToLive"u8); - writer.WriteNumberValue(TimeToLive.Value); - } - foreach (var item in AdditionalProperties) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.Value.ToString()).RootElement); -#endif - } - writer.WriteEndObject(); - } - - internal static PipelineExternalComputeScaleProperties DeserializePipelineExternalComputeScaleProperties(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - Optional timeToLive = default; - IDictionary> additionalProperties = default; - Dictionary> additionalPropertiesDictionary = new Dictionary>(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("timeToLive"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - timeToLive = property.Value.GetInt32(); - continue; - } - additionalPropertiesDictionary.Add(property.Name, JsonSerializer.Deserialize>(property.Value.GetRawText())); - } - additionalProperties = additionalPropertiesDictionary; - return new PipelineExternalComputeScaleProperties(Optional.ToNullable(timeToLive), additionalProperties); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/PipelineExternalComputeScaleProperties.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/PipelineExternalComputeScaleProperties.cs deleted file mode 100644 index 4eb789b8..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/PipelineExternalComputeScaleProperties.cs +++ /dev/null @@ -1,62 +0,0 @@ -// - -#nullable disable - -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// PipelineExternalComputeScale properties for managed integration runtime. - public partial class PipelineExternalComputeScaleProperties - { - /// Initializes a new instance of PipelineExternalComputeScaleProperties. - public PipelineExternalComputeScaleProperties() - { - AdditionalProperties = new ChangeTrackingDictionary>(); - } - - /// Initializes a new instance of PipelineExternalComputeScaleProperties. - /// Time to live (in minutes) setting of integration runtime which will execute pipeline and external activity. - /// Additional Properties. - internal PipelineExternalComputeScaleProperties(int? timeToLive, IDictionary> additionalProperties) - { - TimeToLive = timeToLive; - AdditionalProperties = additionalProperties; - } - - /// Time to live (in minutes) setting of integration runtime which will execute pipeline and external activity. - public int? TimeToLive { get; set; } - /// - /// Additional Properties - /// - /// To assign an object to the value of this property use . - /// - /// - /// To assign an already formated json string to this property use . - /// - /// - /// Examples: - /// - /// - /// BinaryData.FromObjectAsJson("foo") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromString("\"foo\"") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromObjectAsJson(new { key = "value" }) - /// Creates a payload of { "key": "value" }. - /// - /// - /// BinaryData.FromString("{\"key\": \"value\"}") - /// Creates a payload of { "key": "value" }. - /// - /// - /// - /// - public IDictionary> AdditionalProperties { get; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/PipelineFolder.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/PipelineFolder.Serialization.cs deleted file mode 100644 index 0626a7dc..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/PipelineFolder.Serialization.cs +++ /dev/null @@ -1,41 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; - -namespace AzureDataFactory.TestingFramework.Models -{ - internal partial class PipelineFolder : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - if (Optional.IsDefined(Name)) - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - writer.WriteEndObject(); - } - - internal static PipelineFolder DeserializePipelineFolder(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - Optional name = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("name"u8)) - { - name = property.Value.GetString(); - continue; - } - } - return new PipelineFolder(name.Value); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/PipelineFolder.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/PipelineFolder.cs deleted file mode 100644 index 88ea5d3d..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/PipelineFolder.cs +++ /dev/null @@ -1,25 +0,0 @@ -// - -#nullable disable - -namespace AzureDataFactory.TestingFramework.Models -{ - /// The folder that this Pipeline is in. If not specified, Pipeline will appear at the root level. - internal partial class PipelineFolder - { - /// Initializes a new instance of PipelineFolder. - public PipelineFolder() - { - } - - /// Initializes a new instance of PipelineFolder. - /// The name of the folder that this Pipeline is in. - internal PipelineFolder(string name) - { - Name = name; - } - - /// The name of the folder that this Pipeline is in. - public string Name { get; set; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/PipelineVariableSpecification.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/PipelineVariableSpecification.Serialization.cs deleted file mode 100644 index 023f5170..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/PipelineVariableSpecification.Serialization.cs +++ /dev/null @@ -1,57 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class PipelineVariableSpecification : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - writer.WritePropertyName("type"u8); - writer.WriteStringValue(VariableType.ToString()); - if (Optional.IsDefined(DefaultValue)) - { - writer.WritePropertyName("defaultValue"u8); -#if NET6_0_OR_GREATER - writer.WriteRawValue(DefaultValue); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(DefaultValue.ToString()).RootElement); -#endif - } - writer.WriteEndObject(); - } - - internal static PipelineVariableSpecification DeserializePipelineVariableSpecification(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - PipelineVariableType type = default; - Optional defaultValue = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("type"u8)) - { - type = new PipelineVariableType(property.Value.GetString()); - continue; - } - if (property.NameEquals("defaultValue"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - defaultValue = BinaryData.FromString(property.Value.GetRawText()); - continue; - } - } - return new PipelineVariableSpecification(type, defaultValue.Value); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/PipelineVariableSpecification.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/PipelineVariableSpecification.cs deleted file mode 100644 index 76d372d0..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/PipelineVariableSpecification.cs +++ /dev/null @@ -1,60 +0,0 @@ -// - -#nullable disable - -namespace AzureDataFactory.TestingFramework.Models -{ - /// Definition of a single variable for a Pipeline. - public partial class PipelineVariableSpecification - { - /// Initializes a new instance of PipelineVariableSpecification. - /// Variable type. - public PipelineVariableSpecification(PipelineVariableType variableType) - { - VariableType = variableType; - } - - /// Initializes a new instance of PipelineVariableSpecification. - /// Variable type. - /// Default value of variable. - internal PipelineVariableSpecification(PipelineVariableType variableType, BinaryData defaultValue) - { - VariableType = variableType; - DefaultValue = defaultValue; - } - - /// Variable type. - public PipelineVariableType VariableType { get; set; } - /// - /// Default value of variable. - /// - /// To assign an object to this property use . - /// - /// - /// To assign an already formated json string to this property use . - /// - /// - /// Examples: - /// - /// - /// BinaryData.FromObjectAsJson("foo") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromString("\"foo\"") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromObjectAsJson(new { key = "value" }) - /// Creates a payload of { "key": "value" }. - /// - /// - /// BinaryData.FromString("{\"key\": \"value\"}") - /// Creates a payload of { "key": "value" }. - /// - /// - /// - /// - public BinaryData DefaultValue { get; set; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/PipelineVariableType.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/PipelineVariableType.cs deleted file mode 100644 index 63df6a3b..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/PipelineVariableType.cs +++ /dev/null @@ -1,50 +0,0 @@ -// - -#nullable disable - -using System.ComponentModel; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// Variable type. - public readonly partial struct PipelineVariableType : IEquatable - { - private readonly string _value; - - /// Initializes a new instance of . - /// is null. - public PipelineVariableType(string value) - { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } - - private const string StringValue = "String"; - private const string BoolValue = "Bool"; - private const string ArrayValue = "Array"; - - /// String. - public static PipelineVariableType String { get; } = new PipelineVariableType(StringValue); - /// Bool. - public static PipelineVariableType Bool { get; } = new PipelineVariableType(BoolValue); - /// Array. - public static PipelineVariableType Array { get; } = new PipelineVariableType(ArrayValue); - /// Determines if two values are the same. - public static bool operator ==(PipelineVariableType left, PipelineVariableType right) => left.Equals(right); - /// Determines if two values are not the same. - public static bool operator !=(PipelineVariableType left, PipelineVariableType right) => !left.Equals(right); - /// Converts a string to a . - public static implicit operator PipelineVariableType(string value) => new PipelineVariableType(value); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override bool Equals(object obj) => obj is PipelineVariableType other && Equals(other); - /// - public bool Equals(PipelineVariableType other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override int GetHashCode() => _value?.GetHashCode() ?? 0; - /// - public override string ToString() => _value; - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/PolybaseSettings.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/PolybaseSettings.Serialization.cs deleted file mode 100644 index 146240b6..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/PolybaseSettings.Serialization.cs +++ /dev/null @@ -1,108 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class PolybaseSettings : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - if (Optional.IsDefined(RejectType)) - { - writer.WritePropertyName("rejectType"u8); - writer.WriteStringValue(RejectType.Value.ToString()); - } - if (Optional.IsDefined(RejectValue)) - { - writer.WritePropertyName("rejectValue"u8); -#if NET6_0_OR_GREATER - writer.WriteRawValue(RejectValue); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(RejectValue.ToString()).RootElement); -#endif - } - if (Optional.IsDefined(RejectSampleValue)) - { - writer.WritePropertyName("rejectSampleValue"u8); - JsonSerializer.Serialize(writer, RejectSampleValue); - } - if (Optional.IsDefined(UseTypeDefault)) - { - writer.WritePropertyName("useTypeDefault"u8); - JsonSerializer.Serialize(writer, UseTypeDefault); - } - foreach (var item in AdditionalProperties) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.Value.ToString()).RootElement); -#endif - } - writer.WriteEndObject(); - } - - internal static PolybaseSettings DeserializePolybaseSettings(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - Optional rejectType = default; - Optional rejectValue = default; - Optional> rejectSampleValue = default; - Optional> useTypeDefault = default; - IDictionary> additionalProperties = default; - Dictionary> additionalPropertiesDictionary = new Dictionary>(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("rejectType"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - rejectType = new PolybaseSettingsRejectType(property.Value.GetString()); - continue; - } - if (property.NameEquals("rejectValue"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - rejectValue = BinaryData.FromString(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("rejectSampleValue"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - rejectSampleValue = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("useTypeDefault"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - useTypeDefault = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - additionalPropertiesDictionary.Add(property.Name, JsonSerializer.Deserialize>(property.Value.GetRawText())); - } - additionalProperties = additionalPropertiesDictionary; - return new PolybaseSettings(Optional.ToNullable(rejectType), rejectValue.Value, rejectSampleValue.Value, useTypeDefault.Value, additionalProperties); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/PolybaseSettings.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/PolybaseSettings.cs deleted file mode 100644 index abd4a3fc..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/PolybaseSettings.cs +++ /dev/null @@ -1,103 +0,0 @@ -// - -#nullable disable - -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// PolyBase settings. - public partial class PolybaseSettings - { - /// Initializes a new instance of PolybaseSettings. - public PolybaseSettings() - { - AdditionalProperties = new ChangeTrackingDictionary>(); - } - - /// Initializes a new instance of PolybaseSettings. - /// Reject type. - /// Specifies the value or the percentage of rows that can be rejected before the query fails. Type: number (or Expression with resultType number), minimum: 0. - /// Determines the number of rows to attempt to retrieve before the PolyBase recalculates the percentage of rejected rows. Type: integer (or Expression with resultType integer), minimum: 0. - /// Specifies how to handle missing values in delimited text files when PolyBase retrieves data from the text file. Type: boolean (or Expression with resultType boolean). - /// Additional Properties. - internal PolybaseSettings(PolybaseSettingsRejectType? rejectType, BinaryData rejectValue, DataFactoryElement rejectSampleValue, DataFactoryElement useTypeDefault, IDictionary> additionalProperties) - { - RejectType = rejectType; - RejectValue = rejectValue; - RejectSampleValue = rejectSampleValue; - UseTypeDefault = useTypeDefault; - AdditionalProperties = additionalProperties; - } - - /// Reject type. - public PolybaseSettingsRejectType? RejectType { get; set; } - /// - /// Specifies the value or the percentage of rows that can be rejected before the query fails. Type: number (or Expression with resultType number), minimum: 0. - /// - /// To assign an object to this property use . - /// - /// - /// To assign an already formated json string to this property use . - /// - /// - /// Examples: - /// - /// - /// BinaryData.FromObjectAsJson("foo") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromString("\"foo\"") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromObjectAsJson(new { key = "value" }) - /// Creates a payload of { "key": "value" }. - /// - /// - /// BinaryData.FromString("{\"key\": \"value\"}") - /// Creates a payload of { "key": "value" }. - /// - /// - /// - /// - public BinaryData RejectValue { get; set; } - /// Determines the number of rows to attempt to retrieve before the PolyBase recalculates the percentage of rejected rows. Type: integer (or Expression with resultType integer), minimum: 0. - public DataFactoryElement RejectSampleValue { get; set; } - /// Specifies how to handle missing values in delimited text files when PolyBase retrieves data from the text file. Type: boolean (or Expression with resultType boolean). - public DataFactoryElement UseTypeDefault { get; set; } - /// - /// Additional Properties - /// - /// To assign an object to the value of this property use . - /// - /// - /// To assign an already formated json string to this property use . - /// - /// - /// Examples: - /// - /// - /// BinaryData.FromObjectAsJson("foo") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromString("\"foo\"") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromObjectAsJson(new { key = "value" }) - /// Creates a payload of { "key": "value" }. - /// - /// - /// BinaryData.FromString("{\"key\": \"value\"}") - /// Creates a payload of { "key": "value" }. - /// - /// - /// - /// - public IDictionary> AdditionalProperties { get; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/PolybaseSettingsRejectType.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/PolybaseSettingsRejectType.cs deleted file mode 100644 index a1f3397a..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/PolybaseSettingsRejectType.cs +++ /dev/null @@ -1,47 +0,0 @@ -// - -#nullable disable - -using System.ComponentModel; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// Indicates whether the RejectValue property is specified as a literal value or a percentage. - public readonly partial struct PolybaseSettingsRejectType : IEquatable - { - private readonly string _value; - - /// Initializes a new instance of . - /// is null. - public PolybaseSettingsRejectType(string value) - { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } - - private const string ValueValue = "value"; - private const string PercentageValue = "percentage"; - - /// value. - public static PolybaseSettingsRejectType Value { get; } = new PolybaseSettingsRejectType(ValueValue); - /// percentage. - public static PolybaseSettingsRejectType Percentage { get; } = new PolybaseSettingsRejectType(PercentageValue); - /// Determines if two values are the same. - public static bool operator ==(PolybaseSettingsRejectType left, PolybaseSettingsRejectType right) => left.Equals(right); - /// Determines if two values are not the same. - public static bool operator !=(PolybaseSettingsRejectType left, PolybaseSettingsRejectType right) => !left.Equals(right); - /// Converts a string to a . - public static implicit operator PolybaseSettingsRejectType(string value) => new PolybaseSettingsRejectType(value); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override bool Equals(object obj) => obj is PolybaseSettingsRejectType other && Equals(other); - /// - public bool Equals(PolybaseSettingsRejectType other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override int GetHashCode() => _value?.GetHashCode() ?? 0; - /// - public override string ToString() => _value; - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/PostgreSqlLinkedService.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/PostgreSqlLinkedService.Serialization.cs deleted file mode 100644 index ea9895d4..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/PostgreSqlLinkedService.Serialization.cs +++ /dev/null @@ -1,194 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class PostgreSqlLinkedService : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - writer.WritePropertyName("type"u8); - writer.WriteStringValue(LinkedServiceType); - if (Optional.IsDefined(ConnectVia)) - { - writer.WritePropertyName("connectVia"u8); - writer.WriteObjectValue(ConnectVia); - } - if (Optional.IsDefined(Description)) - { - writer.WritePropertyName("description"u8); - writer.WriteStringValue(Description); - } - if (Optional.IsCollectionDefined(Parameters)) - { - writer.WritePropertyName("parameters"u8); - writer.WriteStartObject(); - foreach (var item in Parameters) - { - writer.WritePropertyName(item.Key); - writer.WriteObjectValue(item.Value); - } - writer.WriteEndObject(); - } - if (Optional.IsCollectionDefined(Annotations)) - { - writer.WritePropertyName("annotations"u8); - writer.WriteStartArray(); - foreach (var item in Annotations) - { - if (item == null) - { - writer.WriteNullValue(); - continue; - } -#if NET6_0_OR_GREATER - writer.WriteRawValue(item); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.ToString()).RootElement); -#endif - } - writer.WriteEndArray(); - } - writer.WritePropertyName("typeProperties"u8); - writer.WriteStartObject(); - writer.WritePropertyName("connectionString"u8); - JsonSerializer.Serialize(writer, ConnectionString); - if (Optional.IsDefined(Password)) - { - writer.WritePropertyName("password"u8); - JsonSerializer.Serialize(writer, Password); - } - if (Optional.IsDefined(EncryptedCredential)) - { - writer.WritePropertyName("encryptedCredential"u8); - writer.WriteStringValue(EncryptedCredential); - } - writer.WriteEndObject(); - foreach (var item in AdditionalProperties) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.Value.ToString()).RootElement); -#endif - } - writer.WriteEndObject(); - } - - internal static PostgreSqlLinkedService DeserializePostgreSqlLinkedService(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - string type = default; - Optional connectVia = default; - Optional description = default; - Optional> parameters = default; - Optional> annotations = default; - DataFactoryElement connectionString = default; - Optional password = default; - Optional encryptedCredential = default; - IDictionary> additionalProperties = default; - Dictionary> additionalPropertiesDictionary = new Dictionary>(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("type"u8)) - { - type = property.Value.GetString(); - continue; - } - if (property.NameEquals("connectVia"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - connectVia = IntegrationRuntimeReference.DeserializeIntegrationRuntimeReference(property.Value); - continue; - } - if (property.NameEquals("description"u8)) - { - description = property.Value.GetString(); - continue; - } - if (property.NameEquals("parameters"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - Dictionary dictionary = new Dictionary(); - foreach (var property0 in property.Value.EnumerateObject()) - { - dictionary.Add(property0.Name, EntityParameterSpecification.DeserializeEntityParameterSpecification(property0.Value)); - } - parameters = dictionary; - continue; - } - if (property.NameEquals("annotations"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - if (item.ValueKind == JsonValueKind.Null) - { - array.Add(null); - } - else - { - array.Add(BinaryData.FromString(item.GetRawText())); - } - } - annotations = array; - continue; - } - if (property.NameEquals("typeProperties"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - foreach (var property0 in property.Value.EnumerateObject()) - { - if (property0.NameEquals("connectionString"u8)) - { - connectionString = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("password"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - password = JsonSerializer.Deserialize(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("encryptedCredential"u8)) - { - encryptedCredential = property0.Value.GetString(); - continue; - } - } - continue; - } - additionalPropertiesDictionary.Add(property.Name, JsonSerializer.Deserialize>(property.Value.GetRawText())); - } - additionalProperties = additionalPropertiesDictionary; - return new PostgreSqlLinkedService(type, connectVia.Value, description.Value, Optional.ToDictionary(parameters), Optional.ToList(annotations), additionalProperties, connectionString, password, encryptedCredential.Value); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/PostgreSqlLinkedService.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/PostgreSqlLinkedService.cs deleted file mode 100644 index 7a5b7e5f..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/PostgreSqlLinkedService.cs +++ /dev/null @@ -1,49 +0,0 @@ -// - -#nullable disable - -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// Linked service for PostgreSQL data source. - public partial class PostgreSqlLinkedService : DataFactoryLinkedServiceProperties - { - /// Initializes a new instance of PostgreSqlLinkedService. - /// The connection string. Type: string, SecureString or AzureKeyVaultSecretReference. - /// is null. - public PostgreSqlLinkedService(DataFactoryElement connectionString) - { - Argument.AssertNotNull(connectionString, nameof(connectionString)); - - ConnectionString = connectionString; - LinkedServiceType = "PostgreSql"; - } - - /// Initializes a new instance of PostgreSqlLinkedService. - /// Type of linked service. - /// The integration runtime reference. - /// Linked service description. - /// Parameters for linked service. - /// List of tags that can be used for describing the linked service. - /// Additional Properties. - /// The connection string. Type: string, SecureString or AzureKeyVaultSecretReference. - /// The Azure key vault secret reference of password in connection string. - /// The encrypted credential used for authentication. Credentials are encrypted using the integration runtime credential manager. Type: string. - internal PostgreSqlLinkedService(string linkedServiceType, IntegrationRuntimeReference connectVia, string description, IDictionary parameters, IList annotations, IDictionary> additionalProperties, DataFactoryElement connectionString, DataFactoryKeyVaultSecretReference password, string encryptedCredential) : base(linkedServiceType, connectVia, description, parameters, annotations, additionalProperties) - { - ConnectionString = connectionString; - Password = password; - EncryptedCredential = encryptedCredential; - LinkedServiceType = linkedServiceType ?? "PostgreSql"; - } - - /// The connection string. Type: string, SecureString or AzureKeyVaultSecretReference. - public DataFactoryElement ConnectionString { get; set; } - /// The Azure key vault secret reference of password in connection string. - public DataFactoryKeyVaultSecretReference Password { get; set; } - /// The encrypted credential used for authentication. Credentials are encrypted using the integration runtime credential manager. Type: string. - public string EncryptedCredential { get; set; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/PostgreSqlSource.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/PostgreSqlSource.Serialization.cs deleted file mode 100644 index b6189071..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/PostgreSqlSource.Serialization.cs +++ /dev/null @@ -1,161 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class PostgreSqlSource : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - if (Optional.IsDefined(Query)) - { - writer.WritePropertyName("query"u8); - JsonSerializer.Serialize(writer, Query); - } - if (Optional.IsDefined(QueryTimeout)) - { - writer.WritePropertyName("queryTimeout"u8); - JsonSerializer.Serialize(writer, QueryTimeout); - } - if (Optional.IsDefined(AdditionalColumns)) - { - writer.WritePropertyName("additionalColumns"u8); -#if NET6_0_OR_GREATER - writer.WriteRawValue(AdditionalColumns); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(AdditionalColumns.ToString()).RootElement); -#endif - } - writer.WritePropertyName("type"u8); - writer.WriteStringValue(CopySourceType); - if (Optional.IsDefined(SourceRetryCount)) - { - writer.WritePropertyName("sourceRetryCount"u8); - JsonSerializer.Serialize(writer, SourceRetryCount); - } - if (Optional.IsDefined(SourceRetryWait)) - { - writer.WritePropertyName("sourceRetryWait"u8); - JsonSerializer.Serialize(writer, SourceRetryWait); - } - if (Optional.IsDefined(MaxConcurrentConnections)) - { - writer.WritePropertyName("maxConcurrentConnections"u8); - JsonSerializer.Serialize(writer, MaxConcurrentConnections); - } - if (Optional.IsDefined(DisableMetricsCollection)) - { - writer.WritePropertyName("disableMetricsCollection"u8); - JsonSerializer.Serialize(writer, DisableMetricsCollection); - } - foreach (var item in AdditionalProperties) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.Value.ToString()).RootElement); -#endif - } - writer.WriteEndObject(); - } - - internal static PostgreSqlSource DeserializePostgreSqlSource(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - Optional> query = default; - Optional> queryTimeout = default; - Optional additionalColumns = default; - string type = default; - Optional> sourceRetryCount = default; - Optional> sourceRetryWait = default; - Optional> maxConcurrentConnections = default; - Optional> disableMetricsCollection = default; - IDictionary> additionalProperties = default; - Dictionary> additionalPropertiesDictionary = new Dictionary>(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("query"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - query = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("queryTimeout"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - queryTimeout = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("additionalColumns"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - additionalColumns = BinaryData.FromString(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("type"u8)) - { - type = property.Value.GetString(); - continue; - } - if (property.NameEquals("sourceRetryCount"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - sourceRetryCount = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("sourceRetryWait"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - sourceRetryWait = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("maxConcurrentConnections"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - maxConcurrentConnections = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("disableMetricsCollection"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - disableMetricsCollection = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - additionalPropertiesDictionary.Add(property.Name, JsonSerializer.Deserialize>(property.Value.GetRawText())); - } - additionalProperties = additionalPropertiesDictionary; - return new PostgreSqlSource(type, sourceRetryCount.Value, sourceRetryWait.Value, maxConcurrentConnections.Value, disableMetricsCollection.Value, additionalProperties, queryTimeout.Value, additionalColumns.Value, query.Value); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/PostgreSqlSource.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/PostgreSqlSource.cs deleted file mode 100644 index 0159ef08..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/PostgreSqlSource.cs +++ /dev/null @@ -1,37 +0,0 @@ -// - -#nullable disable - -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// A copy activity source for PostgreSQL databases. - public partial class PostgreSqlSource : TabularSource - { - /// Initializes a new instance of PostgreSqlSource. - public PostgreSqlSource() - { - CopySourceType = "PostgreSqlSource"; - } - - /// Initializes a new instance of PostgreSqlSource. - /// Copy source type. - /// Source retry count. Type: integer (or Expression with resultType integer). - /// Source retry wait. Type: string (or Expression with resultType string), pattern: ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). - /// The maximum concurrent connection count for the source data store. Type: integer (or Expression with resultType integer). - /// If true, disable data store metrics collection. Default is false. Type: boolean (or Expression with resultType boolean). - /// Additional Properties. - /// 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). - /// Database query. Type: string (or Expression with resultType string). - internal PostgreSqlSource(string copySourceType, DataFactoryElement sourceRetryCount, DataFactoryElement sourceRetryWait, DataFactoryElement maxConcurrentConnections, DataFactoryElement disableMetricsCollection, IDictionary> additionalProperties, DataFactoryElement queryTimeout, BinaryData additionalColumns, DataFactoryElement query) : base(copySourceType, sourceRetryCount, sourceRetryWait, maxConcurrentConnections, disableMetricsCollection, additionalProperties, queryTimeout, additionalColumns) - { - Query = query; - CopySourceType = copySourceType ?? "PostgreSqlSource"; - } - - /// Database query. Type: string (or Expression with resultType string). - public DataFactoryElement Query { get; set; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/PostgreSqlTableDataset.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/PostgreSqlTableDataset.Serialization.cs deleted file mode 100644 index b4819563..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/PostgreSqlTableDataset.Serialization.cs +++ /dev/null @@ -1,246 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class PostgreSqlTableDataset : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - writer.WritePropertyName("type"u8); - writer.WriteStringValue(DatasetType); - if (Optional.IsDefined(Description)) - { - writer.WritePropertyName("description"u8); - writer.WriteStringValue(Description); - } - if (Optional.IsDefined(Structure)) - { - writer.WritePropertyName("structure"u8); - JsonSerializer.Serialize(writer, Structure); - } - if (Optional.IsDefined(Schema)) - { - writer.WritePropertyName("schema"u8); - JsonSerializer.Serialize(writer, Schema); - } - writer.WritePropertyName("linkedServiceName"u8); - JsonSerializer.Serialize(writer, LinkedServiceName); if (Optional.IsCollectionDefined(Parameters)) - { - writer.WritePropertyName("parameters"u8); - writer.WriteStartObject(); - foreach (var item in Parameters) - { - writer.WritePropertyName(item.Key); - writer.WriteObjectValue(item.Value); - } - writer.WriteEndObject(); - } - if (Optional.IsCollectionDefined(Annotations)) - { - writer.WritePropertyName("annotations"u8); - writer.WriteStartArray(); - foreach (var item in Annotations) - { - if (item == null) - { - writer.WriteNullValue(); - continue; - } -#if NET6_0_OR_GREATER - writer.WriteRawValue(item); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.ToString()).RootElement); -#endif - } - writer.WriteEndArray(); - } - if (Optional.IsDefined(Folder)) - { - writer.WritePropertyName("folder"u8); - writer.WriteObjectValue(Folder); - } - writer.WritePropertyName("typeProperties"u8); - writer.WriteStartObject(); - if (Optional.IsDefined(TableName)) - { - writer.WritePropertyName("tableName"u8); -#if NET6_0_OR_GREATER - writer.WriteRawValue(TableName); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(TableName.ToString()).RootElement); -#endif - } - if (Optional.IsDefined(Table)) - { - writer.WritePropertyName("table"u8); - JsonSerializer.Serialize(writer, Table); - } - if (Optional.IsDefined(SchemaTypePropertiesSchema)) - { - writer.WritePropertyName("schema"u8); - JsonSerializer.Serialize(writer, SchemaTypePropertiesSchema); - } - writer.WriteEndObject(); - foreach (var item in AdditionalProperties) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.Value.ToString()).RootElement); -#endif - } - writer.WriteEndObject(); - } - - internal static PostgreSqlTableDataset DeserializePostgreSqlTableDataset(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - string type = default; - Optional description = default; - Optional>> structure = default; - Optional>> schema = default; - DataFactoryLinkedServiceReference linkedServiceName = default; - Optional> parameters = default; - Optional> annotations = default; - Optional folder = default; - Optional tableName = default; - Optional> table = default; - Optional> schema0 = default; - IDictionary> additionalProperties = default; - Dictionary> additionalPropertiesDictionary = new Dictionary>(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("type"u8)) - { - type = property.Value.GetString(); - continue; - } - if (property.NameEquals("description"u8)) - { - description = property.Value.GetString(); - continue; - } - if (property.NameEquals("structure"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - structure = JsonSerializer.Deserialize>>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("schema"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - schema = JsonSerializer.Deserialize>>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("linkedServiceName"u8)) - { - linkedServiceName = JsonSerializer.Deserialize(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("parameters"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - Dictionary dictionary = new Dictionary(); - foreach (var property0 in property.Value.EnumerateObject()) - { - dictionary.Add(property0.Name, EntityParameterSpecification.DeserializeEntityParameterSpecification(property0.Value)); - } - parameters = dictionary; - continue; - } - if (property.NameEquals("annotations"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - if (item.ValueKind == JsonValueKind.Null) - { - array.Add(null); - } - else - { - array.Add(BinaryData.FromString(item.GetRawText())); - } - } - annotations = array; - continue; - } - if (property.NameEquals("folder"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - folder = DatasetFolder.DeserializeDatasetFolder(property.Value); - continue; - } - if (property.NameEquals("typeProperties"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - foreach (var property0 in property.Value.EnumerateObject()) - { - if (property0.NameEquals("tableName"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - tableName = BinaryData.FromString(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("table"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - table = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("schema"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - schema0 = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - } - continue; - } - additionalPropertiesDictionary.Add(property.Name, JsonSerializer.Deserialize>(property.Value.GetRawText())); - } - additionalProperties = additionalPropertiesDictionary; - return new PostgreSqlTableDataset(type, description.Value, structure.Value, schema.Value, linkedServiceName, Optional.ToDictionary(parameters), Optional.ToList(annotations), folder.Value, additionalProperties, tableName.Value, table.Value, schema0.Value); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/PostgreSqlTableDataset.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/PostgreSqlTableDataset.cs deleted file mode 100644 index 0b7fc2e0..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/PostgreSqlTableDataset.cs +++ /dev/null @@ -1,80 +0,0 @@ -// - -#nullable disable - -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// The PostgreSQL table dataset. - public partial class PostgreSqlTableDataset : DataFactoryDatasetProperties - { - /// Initializes a new instance of PostgreSqlTableDataset. - /// Linked service reference. - /// is null. - public PostgreSqlTableDataset(DataFactoryLinkedServiceReference linkedServiceName) : base(linkedServiceName) - { - Argument.AssertNotNull(linkedServiceName, nameof(linkedServiceName)); - - DatasetType = "PostgreSqlTable"; - } - - /// Initializes a new instance of PostgreSqlTableDataset. - /// Type of dataset. - /// Dataset description. - /// Columns that define the structure of the dataset. Type: array (or Expression with resultType array), itemType: DatasetDataElement. - /// Columns that define the physical type schema of the dataset. Type: array (or Expression with resultType array), itemType: DatasetSchemaDataElement. - /// Linked service reference. - /// Parameters for dataset. - /// List of tags that can be used for describing the Dataset. - /// The folder that this Dataset is in. If not specified, Dataset will appear at the root level. - /// Additional Properties. - /// This property will be retired. Please consider using schema + table properties instead. - /// The PostgreSQL table name. Type: string (or Expression with resultType string). - /// The PostgreSQL schema name. Type: string (or Expression with resultType string). - internal PostgreSqlTableDataset(string datasetType, string description, DataFactoryElement> structure, DataFactoryElement> schema, DataFactoryLinkedServiceReference linkedServiceName, IDictionary parameters, IList annotations, DatasetFolder folder, IDictionary> additionalProperties, BinaryData tableName, DataFactoryElement table, DataFactoryElement schemaTypePropertiesSchema) : base(datasetType, description, structure, schema, linkedServiceName, parameters, annotations, folder, additionalProperties) - { - TableName = tableName; - Table = table; - SchemaTypePropertiesSchema = schemaTypePropertiesSchema; - DatasetType = datasetType ?? "PostgreSqlTable"; - } - - /// - /// This property will be retired. Please consider using schema + table properties instead. - /// - /// To assign an object to this property use . - /// - /// - /// To assign an already formated json string to this property use . - /// - /// - /// Examples: - /// - /// - /// BinaryData.FromObjectAsJson("foo") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromString("\"foo\"") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromObjectAsJson(new { key = "value" }) - /// Creates a payload of { "key": "value" }. - /// - /// - /// BinaryData.FromString("{\"key\": \"value\"}") - /// Creates a payload of { "key": "value" }. - /// - /// - /// - /// - public BinaryData TableName { get; set; } - /// The PostgreSQL table name. Type: string (or Expression with resultType string). - public DataFactoryElement Table { get; set; } - /// The PostgreSQL schema name. Type: string (or Expression with resultType string). - public DataFactoryElement SchemaTypePropertiesSchema { get; set; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/PowerQuerySink.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/PowerQuerySink.Serialization.cs deleted file mode 100644 index f53a6b95..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/PowerQuerySink.Serialization.cs +++ /dev/null @@ -1,136 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class PowerQuerySink : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - if (Optional.IsDefined(Script)) - { - writer.WritePropertyName("script"u8); - writer.WriteStringValue(Script); - } - if (Optional.IsDefined(SchemaLinkedService)) - { - writer.WritePropertyName("schemaLinkedService"u8); - JsonSerializer.Serialize(writer, SchemaLinkedService); - } - if (Optional.IsDefined(RejectedDataLinkedService)) - { - writer.WritePropertyName("rejectedDataLinkedService"u8); - JsonSerializer.Serialize(writer, RejectedDataLinkedService); - } - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - if (Optional.IsDefined(Description)) - { - writer.WritePropertyName("description"u8); - writer.WriteStringValue(Description); - } - if (Optional.IsDefined(Dataset)) - { - writer.WritePropertyName("dataset"u8); - writer.WriteObjectValue(Dataset); - } - if (Optional.IsDefined(LinkedService)) - { - writer.WritePropertyName("linkedService"u8); - JsonSerializer.Serialize(writer, LinkedService); - } - if (Optional.IsDefined(Flowlet)) - { - writer.WritePropertyName("flowlet"u8); - writer.WriteObjectValue(Flowlet); - } - writer.WriteEndObject(); - } - - internal static PowerQuerySink DeserializePowerQuerySink(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - Optional script = default; - Optional schemaLinkedService = default; - Optional rejectedDataLinkedService = default; - string name = default; - Optional description = default; - Optional dataset = default; - Optional linkedService = default; - Optional flowlet = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("script"u8)) - { - script = property.Value.GetString(); - continue; - } - if (property.NameEquals("schemaLinkedService"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - schemaLinkedService = JsonSerializer.Deserialize(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("rejectedDataLinkedService"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - rejectedDataLinkedService = JsonSerializer.Deserialize(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("name"u8)) - { - name = property.Value.GetString(); - continue; - } - if (property.NameEquals("description"u8)) - { - description = property.Value.GetString(); - continue; - } - if (property.NameEquals("dataset"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - dataset = DatasetReference.DeserializeDatasetReference(property.Value); - continue; - } - if (property.NameEquals("linkedService"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - linkedService = JsonSerializer.Deserialize(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("flowlet"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - flowlet = DataFlowReference.DeserializeDataFlowReference(property.Value); - continue; - } - } - return new PowerQuerySink(name, description.Value, dataset.Value, linkedService, flowlet.Value, schemaLinkedService, rejectedDataLinkedService, script.Value); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/PowerQuerySink.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/PowerQuerySink.cs deleted file mode 100644 index 7350cd7c..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/PowerQuerySink.cs +++ /dev/null @@ -1,38 +0,0 @@ -// - -#nullable disable - -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// Power query sink. - public partial class PowerQuerySink : DataFlowSink - { - /// Initializes a new instance of PowerQuerySink. - /// Transformation name. - /// is null. - public PowerQuerySink(string name) : base(name) - { - Argument.AssertNotNull(name, nameof(name)); - } - - /// Initializes a new instance of PowerQuerySink. - /// Transformation name. - /// Transformation description. - /// Dataset reference. - /// Linked service reference. - /// Flowlet Reference. - /// Schema linked service reference. - /// Rejected data linked service reference. - /// sink script. - internal PowerQuerySink(string name, string description, DatasetReference dataset, DataFactoryLinkedServiceReference linkedService, DataFlowReference flowlet, DataFactoryLinkedServiceReference schemaLinkedService, DataFactoryLinkedServiceReference rejectedDataLinkedService, string script) : base(name, description, dataset, linkedService, flowlet, schemaLinkedService, rejectedDataLinkedService) - { - Script = script; - } - - /// sink script. - public string Script { get; set; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/PowerQuerySinkMapping.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/PowerQuerySinkMapping.Serialization.cs deleted file mode 100644 index 6cf74b41..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/PowerQuerySinkMapping.Serialization.cs +++ /dev/null @@ -1,66 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class PowerQuerySinkMapping : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - if (Optional.IsDefined(QueryName)) - { - writer.WritePropertyName("queryName"u8); - writer.WriteStringValue(QueryName); - } - if (Optional.IsCollectionDefined(DataflowSinks)) - { - writer.WritePropertyName("dataflowSinks"u8); - writer.WriteStartArray(); - foreach (var item in DataflowSinks) - { - writer.WriteObjectValue(item); - } - writer.WriteEndArray(); - } - writer.WriteEndObject(); - } - - internal static PowerQuerySinkMapping DeserializePowerQuerySinkMapping(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - Optional queryName = default; - Optional> dataflowSinks = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("queryName"u8)) - { - queryName = property.Value.GetString(); - continue; - } - if (property.NameEquals("dataflowSinks"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - array.Add(PowerQuerySink.DeserializePowerQuerySink(item)); - } - dataflowSinks = array; - continue; - } - } - return new PowerQuerySinkMapping(queryName.Value, Optional.ToList(dataflowSinks)); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/PowerQuerySinkMapping.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/PowerQuerySinkMapping.cs deleted file mode 100644 index f5c5f468..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/PowerQuerySinkMapping.cs +++ /dev/null @@ -1,32 +0,0 @@ -// - -#nullable disable - -using Azure.Core; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// Map Power Query mashup query to sink dataset(s). - public partial class PowerQuerySinkMapping - { - /// Initializes a new instance of PowerQuerySinkMapping. - public PowerQuerySinkMapping() - { - DataflowSinks = new ChangeTrackingList(); - } - - /// Initializes a new instance of PowerQuerySinkMapping. - /// Name of the query in Power Query mashup document. - /// List of sinks mapped to Power Query mashup query. - internal PowerQuerySinkMapping(string queryName, IList dataflowSinks) - { - QueryName = queryName; - DataflowSinks = dataflowSinks; - } - - /// Name of the query in Power Query mashup document. - public string QueryName { get; set; } - /// List of sinks mapped to Power Query mashup query. - public IList DataflowSinks { get; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/PowerQuerySource.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/PowerQuerySource.Serialization.cs deleted file mode 100644 index cce9da6b..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/PowerQuerySource.Serialization.cs +++ /dev/null @@ -1,121 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class PowerQuerySource : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - if (Optional.IsDefined(Script)) - { - writer.WritePropertyName("script"u8); - writer.WriteStringValue(Script); - } - if (Optional.IsDefined(SchemaLinkedService)) - { - writer.WritePropertyName("schemaLinkedService"u8); - JsonSerializer.Serialize(writer, SchemaLinkedService); - } - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - if (Optional.IsDefined(Description)) - { - writer.WritePropertyName("description"u8); - writer.WriteStringValue(Description); - } - if (Optional.IsDefined(Dataset)) - { - writer.WritePropertyName("dataset"u8); - writer.WriteObjectValue(Dataset); - } - if (Optional.IsDefined(LinkedService)) - { - writer.WritePropertyName("linkedService"u8); - JsonSerializer.Serialize(writer, LinkedService); - } - if (Optional.IsDefined(Flowlet)) - { - writer.WritePropertyName("flowlet"u8); - writer.WriteObjectValue(Flowlet); - } - writer.WriteEndObject(); - } - - internal static PowerQuerySource DeserializePowerQuerySource(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - Optional script = default; - Optional schemaLinkedService = default; - string name = default; - Optional description = default; - Optional dataset = default; - Optional linkedService = default; - Optional flowlet = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("script"u8)) - { - script = property.Value.GetString(); - continue; - } - if (property.NameEquals("schemaLinkedService"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - schemaLinkedService = JsonSerializer.Deserialize(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("name"u8)) - { - name = property.Value.GetString(); - continue; - } - if (property.NameEquals("description"u8)) - { - description = property.Value.GetString(); - continue; - } - if (property.NameEquals("dataset"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - dataset = DatasetReference.DeserializeDatasetReference(property.Value); - continue; - } - if (property.NameEquals("linkedService"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - linkedService = JsonSerializer.Deserialize(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("flowlet"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - flowlet = DataFlowReference.DeserializeDataFlowReference(property.Value); - continue; - } - } - return new PowerQuerySource(name, description.Value, dataset.Value, linkedService, flowlet.Value, schemaLinkedService, script.Value); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/PowerQuerySource.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/PowerQuerySource.cs deleted file mode 100644 index bfcaa83a..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/PowerQuerySource.cs +++ /dev/null @@ -1,37 +0,0 @@ -// - -#nullable disable - -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// Power query source. - public partial class PowerQuerySource : DataFlowSource - { - /// Initializes a new instance of PowerQuerySource. - /// Transformation name. - /// is null. - public PowerQuerySource(string name) : base(name) - { - Argument.AssertNotNull(name, nameof(name)); - } - - /// Initializes a new instance of PowerQuerySource. - /// Transformation name. - /// Transformation description. - /// Dataset reference. - /// Linked service reference. - /// Flowlet Reference. - /// Schema linked service reference. - /// source script. - internal PowerQuerySource(string name, string description, DatasetReference dataset, DataFactoryLinkedServiceReference linkedService, DataFlowReference flowlet, DataFactoryLinkedServiceReference schemaLinkedService, string script) : base(name, description, dataset, linkedService, flowlet, schemaLinkedService) - { - Script = script; - } - - /// source script. - public string Script { get; set; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/PrestoAuthenticationType.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/PrestoAuthenticationType.cs deleted file mode 100644 index 129234e3..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/PrestoAuthenticationType.cs +++ /dev/null @@ -1,47 +0,0 @@ -// - -#nullable disable - -using System.ComponentModel; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// The authentication mechanism used to connect to the Presto server. - public readonly partial struct PrestoAuthenticationType : IEquatable - { - private readonly string _value; - - /// Initializes a new instance of . - /// is null. - public PrestoAuthenticationType(string value) - { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } - - private const string AnonymousValue = "Anonymous"; - private const string LdapValue = "LDAP"; - - /// Anonymous. - public static PrestoAuthenticationType Anonymous { get; } = new PrestoAuthenticationType(AnonymousValue); - /// LDAP. - public static PrestoAuthenticationType Ldap { get; } = new PrestoAuthenticationType(LdapValue); - /// Determines if two values are the same. - public static bool operator ==(PrestoAuthenticationType left, PrestoAuthenticationType right) => left.Equals(right); - /// Determines if two values are not the same. - public static bool operator !=(PrestoAuthenticationType left, PrestoAuthenticationType right) => !left.Equals(right); - /// Converts a string to a . - public static implicit operator PrestoAuthenticationType(string value) => new PrestoAuthenticationType(value); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override bool Equals(object obj) => obj is PrestoAuthenticationType other && Equals(other); - /// - public bool Equals(PrestoAuthenticationType other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override int GetHashCode() => _value?.GetHashCode() ?? 0; - /// - public override string ToString() => _value; - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/PrestoLinkedService.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/PrestoLinkedService.Serialization.cs deleted file mode 100644 index b6128cbb..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/PrestoLinkedService.Serialization.cs +++ /dev/null @@ -1,338 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class PrestoLinkedService : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - writer.WritePropertyName("type"u8); - writer.WriteStringValue(LinkedServiceType); - if (Optional.IsDefined(ConnectVia)) - { - writer.WritePropertyName("connectVia"u8); - writer.WriteObjectValue(ConnectVia); - } - if (Optional.IsDefined(Description)) - { - writer.WritePropertyName("description"u8); - writer.WriteStringValue(Description); - } - if (Optional.IsCollectionDefined(Parameters)) - { - writer.WritePropertyName("parameters"u8); - writer.WriteStartObject(); - foreach (var item in Parameters) - { - writer.WritePropertyName(item.Key); - writer.WriteObjectValue(item.Value); - } - writer.WriteEndObject(); - } - if (Optional.IsCollectionDefined(Annotations)) - { - writer.WritePropertyName("annotations"u8); - writer.WriteStartArray(); - foreach (var item in Annotations) - { - if (item == null) - { - writer.WriteNullValue(); - continue; - } -#if NET6_0_OR_GREATER - writer.WriteRawValue(item); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.ToString()).RootElement); -#endif - } - writer.WriteEndArray(); - } - writer.WritePropertyName("typeProperties"u8); - writer.WriteStartObject(); - writer.WritePropertyName("host"u8); - JsonSerializer.Serialize(writer, Host); - writer.WritePropertyName("serverVersion"u8); - JsonSerializer.Serialize(writer, ServerVersion); - writer.WritePropertyName("catalog"u8); - JsonSerializer.Serialize(writer, Catalog); - if (Optional.IsDefined(Port)) - { - writer.WritePropertyName("port"u8); - JsonSerializer.Serialize(writer, Port); - } - writer.WritePropertyName("authenticationType"u8); - writer.WriteStringValue(AuthenticationType.ToString()); - if (Optional.IsDefined(Username)) - { - writer.WritePropertyName("username"u8); - JsonSerializer.Serialize(writer, Username); - } - if (Optional.IsDefined(Password)) - { - writer.WritePropertyName("password"u8); - JsonSerializer.Serialize(writer, Password); - } - if (Optional.IsDefined(EnableSsl)) - { - writer.WritePropertyName("enableSsl"u8); - JsonSerializer.Serialize(writer, EnableSsl); - } - if (Optional.IsDefined(TrustedCertPath)) - { - writer.WritePropertyName("trustedCertPath"u8); - JsonSerializer.Serialize(writer, TrustedCertPath); - } - if (Optional.IsDefined(UseSystemTrustStore)) - { - writer.WritePropertyName("useSystemTrustStore"u8); - JsonSerializer.Serialize(writer, UseSystemTrustStore); - } - if (Optional.IsDefined(AllowHostNameCNMismatch)) - { - writer.WritePropertyName("allowHostNameCNMismatch"u8); - JsonSerializer.Serialize(writer, AllowHostNameCNMismatch); - } - if (Optional.IsDefined(AllowSelfSignedServerCert)) - { - writer.WritePropertyName("allowSelfSignedServerCert"u8); - JsonSerializer.Serialize(writer, AllowSelfSignedServerCert); - } - if (Optional.IsDefined(TimeZoneId)) - { - writer.WritePropertyName("timeZoneID"u8); - JsonSerializer.Serialize(writer, TimeZoneId); - } - if (Optional.IsDefined(EncryptedCredential)) - { - writer.WritePropertyName("encryptedCredential"u8); - writer.WriteStringValue(EncryptedCredential); - } - writer.WriteEndObject(); - foreach (var item in AdditionalProperties) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.Value.ToString()).RootElement); -#endif - } - writer.WriteEndObject(); - } - - internal static PrestoLinkedService DeserializePrestoLinkedService(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - string type = default; - Optional connectVia = default; - Optional description = default; - Optional> parameters = default; - Optional> annotations = default; - DataFactoryElement host = default; - DataFactoryElement serverVersion = default; - DataFactoryElement catalog = default; - Optional> port = default; - PrestoAuthenticationType authenticationType = default; - Optional> username = default; - Optional password = default; - Optional> enableSsl = default; - Optional> trustedCertPath = default; - Optional> useSystemTrustStore = default; - Optional> allowHostNameCNMismatch = default; - Optional> allowSelfSignedServerCert = default; - Optional> timeZoneId = default; - Optional encryptedCredential = default; - IDictionary> additionalProperties = default; - Dictionary> additionalPropertiesDictionary = new Dictionary>(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("type"u8)) - { - type = property.Value.GetString(); - continue; - } - if (property.NameEquals("connectVia"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - connectVia = IntegrationRuntimeReference.DeserializeIntegrationRuntimeReference(property.Value); - continue; - } - if (property.NameEquals("description"u8)) - { - description = property.Value.GetString(); - continue; - } - if (property.NameEquals("parameters"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - Dictionary dictionary = new Dictionary(); - foreach (var property0 in property.Value.EnumerateObject()) - { - dictionary.Add(property0.Name, EntityParameterSpecification.DeserializeEntityParameterSpecification(property0.Value)); - } - parameters = dictionary; - continue; - } - if (property.NameEquals("annotations"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - if (item.ValueKind == JsonValueKind.Null) - { - array.Add(null); - } - else - { - array.Add(BinaryData.FromString(item.GetRawText())); - } - } - annotations = array; - continue; - } - if (property.NameEquals("typeProperties"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - foreach (var property0 in property.Value.EnumerateObject()) - { - if (property0.NameEquals("host"u8)) - { - host = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("serverVersion"u8)) - { - serverVersion = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("catalog"u8)) - { - catalog = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("port"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - port = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("authenticationType"u8)) - { - authenticationType = new PrestoAuthenticationType(property0.Value.GetString()); - continue; - } - if (property0.NameEquals("username"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - username = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("password"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - password = JsonSerializer.Deserialize(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("enableSsl"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - enableSsl = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("trustedCertPath"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - trustedCertPath = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("useSystemTrustStore"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - useSystemTrustStore = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("allowHostNameCNMismatch"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - allowHostNameCNMismatch = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("allowSelfSignedServerCert"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - allowSelfSignedServerCert = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("timeZoneID"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - timeZoneId = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("encryptedCredential"u8)) - { - encryptedCredential = property0.Value.GetString(); - continue; - } - } - continue; - } - additionalPropertiesDictionary.Add(property.Name, JsonSerializer.Deserialize>(property.Value.GetRawText())); - } - additionalProperties = additionalPropertiesDictionary; - return new PrestoLinkedService(type, connectVia.Value, description.Value, Optional.ToDictionary(parameters), Optional.ToList(annotations), additionalProperties, host, serverVersion, catalog, port.Value, authenticationType, username.Value, password, enableSsl.Value, trustedCertPath.Value, useSystemTrustStore.Value, allowHostNameCNMismatch.Value, allowSelfSignedServerCert.Value, timeZoneId.Value, encryptedCredential.Value); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/PrestoLinkedService.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/PrestoLinkedService.cs deleted file mode 100644 index 963c6c87..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/PrestoLinkedService.cs +++ /dev/null @@ -1,101 +0,0 @@ -// - -#nullable disable - -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// Presto server linked service. - public partial class PrestoLinkedService : DataFactoryLinkedServiceProperties - { - /// Initializes a new instance of PrestoLinkedService. - /// The IP address or host name of the Presto server. (i.e. 192.168.222.160). - /// The version of the Presto server. (i.e. 0.148-t). - /// The catalog context for all request against the server. - /// The authentication mechanism used to connect to the Presto server. - /// , or is null. - public PrestoLinkedService(DataFactoryElement host, DataFactoryElement serverVersion, DataFactoryElement catalog, PrestoAuthenticationType authenticationType) - { - Argument.AssertNotNull(host, nameof(host)); - Argument.AssertNotNull(serverVersion, nameof(serverVersion)); - Argument.AssertNotNull(catalog, nameof(catalog)); - - Host = host; - ServerVersion = serverVersion; - Catalog = catalog; - AuthenticationType = authenticationType; - LinkedServiceType = "Presto"; - } - - /// Initializes a new instance of PrestoLinkedService. - /// Type of linked service. - /// The integration runtime reference. - /// Linked service description. - /// Parameters for linked service. - /// List of tags that can be used for describing the linked service. - /// Additional Properties. - /// The IP address or host name of the Presto server. (i.e. 192.168.222.160). - /// The version of the Presto server. (i.e. 0.148-t). - /// The catalog context for all request against the server. - /// The TCP port that the Presto server uses to listen for client connections. The default value is 8080. - /// The authentication mechanism used to connect to the Presto server. - /// The user name used to connect to the Presto server. - /// The password corresponding to the user name. - /// Specifies whether the connections to the server are encrypted using SSL. The default value is false. - /// The full path of the .pem file containing trusted CA certificates for verifying the server when connecting over SSL. This property can only be set when using SSL on self-hosted IR. The default value is the cacerts.pem file installed with the IR. - /// Specifies whether to use a CA certificate from the system trust store or from a specified PEM file. The default value is false. - /// Specifies whether to require a CA-issued SSL certificate name to match the host name of the server when connecting over SSL. The default value is false. - /// Specifies whether to allow self-signed certificates from the server. The default value is false. - /// The local time zone used by the connection. Valid values for this option are specified in the IANA Time Zone Database. The default value is the system time zone. - /// The encrypted credential used for authentication. Credentials are encrypted using the integration runtime credential manager. Type: string. - internal PrestoLinkedService(string linkedServiceType, IntegrationRuntimeReference connectVia, string description, IDictionary parameters, IList annotations, IDictionary> additionalProperties, DataFactoryElement host, DataFactoryElement serverVersion, DataFactoryElement catalog, DataFactoryElement port, PrestoAuthenticationType authenticationType, DataFactoryElement username, DataFactorySecretBaseDefinition password, DataFactoryElement enableSsl, DataFactoryElement trustedCertPath, DataFactoryElement useSystemTrustStore, DataFactoryElement allowHostNameCNMismatch, DataFactoryElement allowSelfSignedServerCert, DataFactoryElement timeZoneId, string encryptedCredential) : base(linkedServiceType, connectVia, description, parameters, annotations, additionalProperties) - { - Host = host; - ServerVersion = serverVersion; - Catalog = catalog; - Port = port; - AuthenticationType = authenticationType; - Username = username; - Password = password; - EnableSsl = enableSsl; - TrustedCertPath = trustedCertPath; - UseSystemTrustStore = useSystemTrustStore; - AllowHostNameCNMismatch = allowHostNameCNMismatch; - AllowSelfSignedServerCert = allowSelfSignedServerCert; - TimeZoneId = timeZoneId; - EncryptedCredential = encryptedCredential; - LinkedServiceType = linkedServiceType ?? "Presto"; - } - - /// The IP address or host name of the Presto server. (i.e. 192.168.222.160). - public DataFactoryElement Host { get; set; } - /// The version of the Presto server. (i.e. 0.148-t). - public DataFactoryElement ServerVersion { get; set; } - /// The catalog context for all request against the server. - public DataFactoryElement Catalog { get; set; } - /// The TCP port that the Presto server uses to listen for client connections. The default value is 8080. - public DataFactoryElement Port { get; set; } - /// The authentication mechanism used to connect to the Presto server. - public PrestoAuthenticationType AuthenticationType { get; set; } - /// The user name used to connect to the Presto server. - public DataFactoryElement Username { get; set; } - /// The password corresponding to the user name. - public DataFactorySecretBaseDefinition Password { get; set; } - /// Specifies whether the connections to the server are encrypted using SSL. The default value is false. - public DataFactoryElement EnableSsl { get; set; } - /// The full path of the .pem file containing trusted CA certificates for verifying the server when connecting over SSL. This property can only be set when using SSL on self-hosted IR. The default value is the cacerts.pem file installed with the IR. - public DataFactoryElement TrustedCertPath { get; set; } - /// Specifies whether to use a CA certificate from the system trust store or from a specified PEM file. The default value is false. - public DataFactoryElement UseSystemTrustStore { get; set; } - /// Specifies whether to require a CA-issued SSL certificate name to match the host name of the server when connecting over SSL. The default value is false. - public DataFactoryElement AllowHostNameCNMismatch { get; set; } - /// Specifies whether to allow self-signed certificates from the server. The default value is false. - public DataFactoryElement AllowSelfSignedServerCert { get; set; } - /// The local time zone used by the connection. Valid values for this option are specified in the IANA Time Zone Database. The default value is the system time zone. - public DataFactoryElement TimeZoneId { get; set; } - /// The encrypted credential used for authentication. Credentials are encrypted using the integration runtime credential manager. Type: string. - public string EncryptedCredential { get; set; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/PrestoObjectDataset.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/PrestoObjectDataset.Serialization.cs deleted file mode 100644 index 5d3473fc..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/PrestoObjectDataset.Serialization.cs +++ /dev/null @@ -1,246 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class PrestoObjectDataset : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - writer.WritePropertyName("type"u8); - writer.WriteStringValue(DatasetType); - if (Optional.IsDefined(Description)) - { - writer.WritePropertyName("description"u8); - writer.WriteStringValue(Description); - } - if (Optional.IsDefined(Structure)) - { - writer.WritePropertyName("structure"u8); - JsonSerializer.Serialize(writer, Structure); - } - if (Optional.IsDefined(Schema)) - { - writer.WritePropertyName("schema"u8); - JsonSerializer.Serialize(writer, Schema); - } - writer.WritePropertyName("linkedServiceName"u8); - JsonSerializer.Serialize(writer, LinkedServiceName); if (Optional.IsCollectionDefined(Parameters)) - { - writer.WritePropertyName("parameters"u8); - writer.WriteStartObject(); - foreach (var item in Parameters) - { - writer.WritePropertyName(item.Key); - writer.WriteObjectValue(item.Value); - } - writer.WriteEndObject(); - } - if (Optional.IsCollectionDefined(Annotations)) - { - writer.WritePropertyName("annotations"u8); - writer.WriteStartArray(); - foreach (var item in Annotations) - { - if (item == null) - { - writer.WriteNullValue(); - continue; - } -#if NET6_0_OR_GREATER - writer.WriteRawValue(item); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.ToString()).RootElement); -#endif - } - writer.WriteEndArray(); - } - if (Optional.IsDefined(Folder)) - { - writer.WritePropertyName("folder"u8); - writer.WriteObjectValue(Folder); - } - writer.WritePropertyName("typeProperties"u8); - writer.WriteStartObject(); - if (Optional.IsDefined(TableName)) - { - writer.WritePropertyName("tableName"u8); -#if NET6_0_OR_GREATER - writer.WriteRawValue(TableName); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(TableName.ToString()).RootElement); -#endif - } - if (Optional.IsDefined(Table)) - { - writer.WritePropertyName("table"u8); - JsonSerializer.Serialize(writer, Table); - } - if (Optional.IsDefined(SchemaTypePropertiesSchema)) - { - writer.WritePropertyName("schema"u8); - JsonSerializer.Serialize(writer, SchemaTypePropertiesSchema); - } - writer.WriteEndObject(); - foreach (var item in AdditionalProperties) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.Value.ToString()).RootElement); -#endif - } - writer.WriteEndObject(); - } - - internal static PrestoObjectDataset DeserializePrestoObjectDataset(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - string type = default; - Optional description = default; - Optional>> structure = default; - Optional>> schema = default; - DataFactoryLinkedServiceReference linkedServiceName = default; - Optional> parameters = default; - Optional> annotations = default; - Optional folder = default; - Optional tableName = default; - Optional> table = default; - Optional> schema0 = default; - IDictionary> additionalProperties = default; - Dictionary> additionalPropertiesDictionary = new Dictionary>(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("type"u8)) - { - type = property.Value.GetString(); - continue; - } - if (property.NameEquals("description"u8)) - { - description = property.Value.GetString(); - continue; - } - if (property.NameEquals("structure"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - structure = JsonSerializer.Deserialize>>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("schema"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - schema = JsonSerializer.Deserialize>>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("linkedServiceName"u8)) - { - linkedServiceName = JsonSerializer.Deserialize(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("parameters"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - Dictionary dictionary = new Dictionary(); - foreach (var property0 in property.Value.EnumerateObject()) - { - dictionary.Add(property0.Name, EntityParameterSpecification.DeserializeEntityParameterSpecification(property0.Value)); - } - parameters = dictionary; - continue; - } - if (property.NameEquals("annotations"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - if (item.ValueKind == JsonValueKind.Null) - { - array.Add(null); - } - else - { - array.Add(BinaryData.FromString(item.GetRawText())); - } - } - annotations = array; - continue; - } - if (property.NameEquals("folder"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - folder = DatasetFolder.DeserializeDatasetFolder(property.Value); - continue; - } - if (property.NameEquals("typeProperties"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - foreach (var property0 in property.Value.EnumerateObject()) - { - if (property0.NameEquals("tableName"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - tableName = BinaryData.FromString(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("table"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - table = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("schema"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - schema0 = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - } - continue; - } - additionalPropertiesDictionary.Add(property.Name, JsonSerializer.Deserialize>(property.Value.GetRawText())); - } - additionalProperties = additionalPropertiesDictionary; - return new PrestoObjectDataset(type, description.Value, structure.Value, schema.Value, linkedServiceName, Optional.ToDictionary(parameters), Optional.ToList(annotations), folder.Value, additionalProperties, tableName.Value, table.Value, schema0.Value); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/PrestoObjectDataset.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/PrestoObjectDataset.cs deleted file mode 100644 index 643d2897..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/PrestoObjectDataset.cs +++ /dev/null @@ -1,80 +0,0 @@ -// - -#nullable disable - -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// Presto server dataset. - public partial class PrestoObjectDataset : DataFactoryDatasetProperties - { - /// Initializes a new instance of PrestoObjectDataset. - /// Linked service reference. - /// is null. - public PrestoObjectDataset(DataFactoryLinkedServiceReference linkedServiceName) : base(linkedServiceName) - { - Argument.AssertNotNull(linkedServiceName, nameof(linkedServiceName)); - - DatasetType = "PrestoObject"; - } - - /// Initializes a new instance of PrestoObjectDataset. - /// Type of dataset. - /// Dataset description. - /// Columns that define the structure of the dataset. Type: array (or Expression with resultType array), itemType: DatasetDataElement. - /// Columns that define the physical type schema of the dataset. Type: array (or Expression with resultType array), itemType: DatasetSchemaDataElement. - /// Linked service reference. - /// Parameters for dataset. - /// List of tags that can be used for describing the Dataset. - /// The folder that this Dataset is in. If not specified, Dataset will appear at the root level. - /// Additional Properties. - /// This property will be retired. Please consider using schema + table properties instead. - /// The table name of the Presto. Type: string (or Expression with resultType string). - /// The schema name of the Presto. Type: string (or Expression with resultType string). - internal PrestoObjectDataset(string datasetType, string description, DataFactoryElement> structure, DataFactoryElement> schema, DataFactoryLinkedServiceReference linkedServiceName, IDictionary parameters, IList annotations, DatasetFolder folder, IDictionary> additionalProperties, BinaryData tableName, DataFactoryElement table, DataFactoryElement schemaTypePropertiesSchema) : base(datasetType, description, structure, schema, linkedServiceName, parameters, annotations, folder, additionalProperties) - { - TableName = tableName; - Table = table; - SchemaTypePropertiesSchema = schemaTypePropertiesSchema; - DatasetType = datasetType ?? "PrestoObject"; - } - - /// - /// This property will be retired. Please consider using schema + table properties instead. - /// - /// To assign an object to this property use . - /// - /// - /// To assign an already formated json string to this property use . - /// - /// - /// Examples: - /// - /// - /// BinaryData.FromObjectAsJson("foo") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromString("\"foo\"") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromObjectAsJson(new { key = "value" }) - /// Creates a payload of { "key": "value" }. - /// - /// - /// BinaryData.FromString("{\"key\": \"value\"}") - /// Creates a payload of { "key": "value" }. - /// - /// - /// - /// - public BinaryData TableName { get; set; } - /// The table name of the Presto. Type: string (or Expression with resultType string). - public DataFactoryElement Table { get; set; } - /// The schema name of the Presto. Type: string (or Expression with resultType string). - public DataFactoryElement SchemaTypePropertiesSchema { get; set; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/PrestoSource.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/PrestoSource.Serialization.cs deleted file mode 100644 index 52694c20..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/PrestoSource.Serialization.cs +++ /dev/null @@ -1,161 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class PrestoSource : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - if (Optional.IsDefined(Query)) - { - writer.WritePropertyName("query"u8); - JsonSerializer.Serialize(writer, Query); - } - if (Optional.IsDefined(QueryTimeout)) - { - writer.WritePropertyName("queryTimeout"u8); - JsonSerializer.Serialize(writer, QueryTimeout); - } - if (Optional.IsDefined(AdditionalColumns)) - { - writer.WritePropertyName("additionalColumns"u8); -#if NET6_0_OR_GREATER - writer.WriteRawValue(AdditionalColumns); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(AdditionalColumns.ToString()).RootElement); -#endif - } - writer.WritePropertyName("type"u8); - writer.WriteStringValue(CopySourceType); - if (Optional.IsDefined(SourceRetryCount)) - { - writer.WritePropertyName("sourceRetryCount"u8); - JsonSerializer.Serialize(writer, SourceRetryCount); - } - if (Optional.IsDefined(SourceRetryWait)) - { - writer.WritePropertyName("sourceRetryWait"u8); - JsonSerializer.Serialize(writer, SourceRetryWait); - } - if (Optional.IsDefined(MaxConcurrentConnections)) - { - writer.WritePropertyName("maxConcurrentConnections"u8); - JsonSerializer.Serialize(writer, MaxConcurrentConnections); - } - if (Optional.IsDefined(DisableMetricsCollection)) - { - writer.WritePropertyName("disableMetricsCollection"u8); - JsonSerializer.Serialize(writer, DisableMetricsCollection); - } - foreach (var item in AdditionalProperties) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.Value.ToString()).RootElement); -#endif - } - writer.WriteEndObject(); - } - - internal static PrestoSource DeserializePrestoSource(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - Optional> query = default; - Optional> queryTimeout = default; - Optional additionalColumns = default; - string type = default; - Optional> sourceRetryCount = default; - Optional> sourceRetryWait = default; - Optional> maxConcurrentConnections = default; - Optional> disableMetricsCollection = default; - IDictionary> additionalProperties = default; - Dictionary> additionalPropertiesDictionary = new Dictionary>(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("query"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - query = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("queryTimeout"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - queryTimeout = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("additionalColumns"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - additionalColumns = BinaryData.FromString(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("type"u8)) - { - type = property.Value.GetString(); - continue; - } - if (property.NameEquals("sourceRetryCount"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - sourceRetryCount = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("sourceRetryWait"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - sourceRetryWait = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("maxConcurrentConnections"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - maxConcurrentConnections = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("disableMetricsCollection"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - disableMetricsCollection = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - additionalPropertiesDictionary.Add(property.Name, JsonSerializer.Deserialize>(property.Value.GetRawText())); - } - additionalProperties = additionalPropertiesDictionary; - return new PrestoSource(type, sourceRetryCount.Value, sourceRetryWait.Value, maxConcurrentConnections.Value, disableMetricsCollection.Value, additionalProperties, queryTimeout.Value, additionalColumns.Value, query.Value); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/PrestoSource.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/PrestoSource.cs deleted file mode 100644 index 28cb7b01..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/PrestoSource.cs +++ /dev/null @@ -1,37 +0,0 @@ -// - -#nullable disable - -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// A copy activity Presto server source. - public partial class PrestoSource : TabularSource - { - /// Initializes a new instance of PrestoSource. - public PrestoSource() - { - CopySourceType = "PrestoSource"; - } - - /// Initializes a new instance of PrestoSource. - /// Copy source type. - /// Source retry count. Type: integer (or Expression with resultType integer). - /// Source retry wait. Type: string (or Expression with resultType string), pattern: ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). - /// The maximum concurrent connection count for the source data store. Type: integer (or Expression with resultType integer). - /// If true, disable data store metrics collection. Default is false. Type: boolean (or Expression with resultType boolean). - /// Additional Properties. - /// 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). - /// A query to retrieve data from source. Type: string (or Expression with resultType string). - internal PrestoSource(string copySourceType, DataFactoryElement sourceRetryCount, DataFactoryElement sourceRetryWait, DataFactoryElement maxConcurrentConnections, DataFactoryElement disableMetricsCollection, IDictionary> additionalProperties, DataFactoryElement queryTimeout, BinaryData additionalColumns, DataFactoryElement query) : base(copySourceType, sourceRetryCount, sourceRetryWait, maxConcurrentConnections, disableMetricsCollection, additionalProperties, queryTimeout, additionalColumns) - { - Query = query; - CopySourceType = copySourceType ?? "PrestoSource"; - } - - /// A query to retrieve data from source. Type: string (or Expression with resultType string). - public DataFactoryElement Query { get; set; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/PrivateLinkConnectionApprovalRequest.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/PrivateLinkConnectionApprovalRequest.Serialization.cs deleted file mode 100644 index 97d42766..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/PrivateLinkConnectionApprovalRequest.Serialization.cs +++ /dev/null @@ -1,61 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; -using Azure.ResourceManager.Resources.Models; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class PrivateLinkConnectionApprovalRequest : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - if (Optional.IsDefined(PrivateLinkServiceConnectionState)) - { - writer.WritePropertyName("privateLinkServiceConnectionState"u8); - writer.WriteObjectValue(PrivateLinkServiceConnectionState); - } - if (Optional.IsDefined(PrivateEndpoint)) - { - writer.WritePropertyName("privateEndpoint"u8); - JsonSerializer.Serialize(writer, PrivateEndpoint); - } - writer.WriteEndObject(); - } - - internal static PrivateLinkConnectionApprovalRequest DeserializePrivateLinkConnectionApprovalRequest(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - Optional privateLinkServiceConnectionState = default; - Optional privateEndpoint = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("privateLinkServiceConnectionState"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - privateLinkServiceConnectionState = PrivateLinkConnectionState.DeserializePrivateLinkConnectionState(property.Value); - continue; - } - if (property.NameEquals("privateEndpoint"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - privateEndpoint = JsonSerializer.Deserialize(property.Value.GetRawText()); - continue; - } - } - return new PrivateLinkConnectionApprovalRequest(privateLinkServiceConnectionState.Value, privateEndpoint); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/PrivateLinkConnectionApprovalRequest.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/PrivateLinkConnectionApprovalRequest.cs deleted file mode 100644 index fc1f2367..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/PrivateLinkConnectionApprovalRequest.cs +++ /dev/null @@ -1,43 +0,0 @@ -// - -#nullable disable - -using Azure.Core; -using Azure.ResourceManager.Resources.Models; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// A request to approve or reject a private endpoint connection. - public partial class PrivateLinkConnectionApprovalRequest - { - /// Initializes a new instance of PrivateLinkConnectionApprovalRequest. - public PrivateLinkConnectionApprovalRequest() - { - } - - /// Initializes a new instance of PrivateLinkConnectionApprovalRequest. - /// The state of a private link connection. - /// The resource of private endpoint. - internal PrivateLinkConnectionApprovalRequest(PrivateLinkConnectionState privateLinkServiceConnectionState, WritableSubResource privateEndpoint) - { - PrivateLinkServiceConnectionState = privateLinkServiceConnectionState; - PrivateEndpoint = privateEndpoint; - } - - /// The state of a private link connection. - public PrivateLinkConnectionState PrivateLinkServiceConnectionState { get; set; } - /// The resource of private endpoint. - internal WritableSubResource PrivateEndpoint { get; set; } - /// Gets or sets Id. - public ResourceIdentifier PrivateEndpointId - { - get => PrivateEndpoint is null ? default : PrivateEndpoint.Id; - set - { - if (PrivateEndpoint is null) - PrivateEndpoint = new WritableSubResource(); - PrivateEndpoint.Id = value; - } - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/PrivateLinkConnectionState.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/PrivateLinkConnectionState.Serialization.cs deleted file mode 100644 index ade99ba7..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/PrivateLinkConnectionState.Serialization.cs +++ /dev/null @@ -1,63 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class PrivateLinkConnectionState : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - if (Optional.IsDefined(Status)) - { - writer.WritePropertyName("status"u8); - writer.WriteStringValue(Status); - } - if (Optional.IsDefined(Description)) - { - writer.WritePropertyName("description"u8); - writer.WriteStringValue(Description); - } - if (Optional.IsDefined(ActionsRequired)) - { - writer.WritePropertyName("actionsRequired"u8); - writer.WriteStringValue(ActionsRequired); - } - writer.WriteEndObject(); - } - - internal static PrivateLinkConnectionState DeserializePrivateLinkConnectionState(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - Optional status = default; - Optional description = default; - Optional actionsRequired = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("status"u8)) - { - status = property.Value.GetString(); - continue; - } - if (property.NameEquals("description"u8)) - { - description = property.Value.GetString(); - continue; - } - if (property.NameEquals("actionsRequired"u8)) - { - actionsRequired = property.Value.GetString(); - continue; - } - } - return new PrivateLinkConnectionState(status.Value, description.Value, actionsRequired.Value); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/PrivateLinkConnectionState.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/PrivateLinkConnectionState.cs deleted file mode 100644 index b17eaba6..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/PrivateLinkConnectionState.cs +++ /dev/null @@ -1,33 +0,0 @@ -// - -#nullable disable - -namespace AzureDataFactory.TestingFramework.Models -{ - /// The state of a private link connection. - public partial class PrivateLinkConnectionState - { - /// Initializes a new instance of PrivateLinkConnectionState. - public PrivateLinkConnectionState() - { - } - - /// Initializes a new instance of PrivateLinkConnectionState. - /// Status of a private link connection. - /// Description of a private link connection. - /// ActionsRequired for a private link connection. - internal PrivateLinkConnectionState(string status, string description, string actionsRequired) - { - Status = status; - Description = description; - ActionsRequired = actionsRequired; - } - - /// Status of a private link connection. - public string Status { get; set; } - /// Description of a private link connection. - public string Description { get; set; } - /// ActionsRequired for a private link connection. - public string ActionsRequired { get; set; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/PrivateLinkResourcesWrapper.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/PrivateLinkResourcesWrapper.Serialization.cs deleted file mode 100644 index 321b185c..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/PrivateLinkResourcesWrapper.Serialization.cs +++ /dev/null @@ -1,34 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; - -namespace AzureDataFactory.TestingFramework.Models -{ - internal partial class PrivateLinkResourcesWrapper - { - internal static PrivateLinkResourcesWrapper DeserializePrivateLinkResourcesWrapper(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - IReadOnlyList value = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("value"u8)) - { - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - array.Add(DataFactoryPrivateLinkResource.DeserializeDataFactoryPrivateLinkResource(item)); - } - value = array; - continue; - } - } - return new PrivateLinkResourcesWrapper(value); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/PrivateLinkResourcesWrapper.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/PrivateLinkResourcesWrapper.cs deleted file mode 100644 index 5d67e435..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/PrivateLinkResourcesWrapper.cs +++ /dev/null @@ -1,32 +0,0 @@ -// - -#nullable disable - -using Azure.Core; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// Wrapper for a collection of private link resources. - internal partial class PrivateLinkResourcesWrapper - { - /// Initializes a new instance of PrivateLinkResourcesWrapper. - /// - /// is null. - internal PrivateLinkResourcesWrapper(IEnumerable value) - { - Argument.AssertNotNull(value, nameof(value)); - - Value = value.ToList(); - } - - /// Initializes a new instance of PrivateLinkResourcesWrapper. - /// - internal PrivateLinkResourcesWrapper(IReadOnlyList value) - { - Value = value; - } - - /// Gets the value. - public IReadOnlyList Value { get; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/QuickBooksLinkedService.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/QuickBooksLinkedService.Serialization.cs deleted file mode 100644 index 17733df1..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/QuickBooksLinkedService.Serialization.cs +++ /dev/null @@ -1,295 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class QuickBooksLinkedService : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - writer.WritePropertyName("type"u8); - writer.WriteStringValue(LinkedServiceType); - if (Optional.IsDefined(ConnectVia)) - { - writer.WritePropertyName("connectVia"u8); - writer.WriteObjectValue(ConnectVia); - } - if (Optional.IsDefined(Description)) - { - writer.WritePropertyName("description"u8); - writer.WriteStringValue(Description); - } - if (Optional.IsCollectionDefined(Parameters)) - { - writer.WritePropertyName("parameters"u8); - writer.WriteStartObject(); - foreach (var item in Parameters) - { - writer.WritePropertyName(item.Key); - writer.WriteObjectValue(item.Value); - } - writer.WriteEndObject(); - } - if (Optional.IsCollectionDefined(Annotations)) - { - writer.WritePropertyName("annotations"u8); - writer.WriteStartArray(); - foreach (var item in Annotations) - { - if (item == null) - { - writer.WriteNullValue(); - continue; - } -#if NET6_0_OR_GREATER - writer.WriteRawValue(item); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.ToString()).RootElement); -#endif - } - writer.WriteEndArray(); - } - writer.WritePropertyName("typeProperties"u8); - writer.WriteStartObject(); - if (Optional.IsDefined(ConnectionProperties)) - { - writer.WritePropertyName("connectionProperties"u8); -#if NET6_0_OR_GREATER - writer.WriteRawValue(ConnectionProperties); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(ConnectionProperties.ToString()).RootElement); -#endif - } - if (Optional.IsDefined(Endpoint)) - { - writer.WritePropertyName("endpoint"u8); - JsonSerializer.Serialize(writer, Endpoint); - } - if (Optional.IsDefined(CompanyId)) - { - writer.WritePropertyName("companyId"u8); - JsonSerializer.Serialize(writer, CompanyId); - } - if (Optional.IsDefined(ConsumerKey)) - { - writer.WritePropertyName("consumerKey"u8); - JsonSerializer.Serialize(writer, ConsumerKey); - } - if (Optional.IsDefined(ConsumerSecret)) - { - writer.WritePropertyName("consumerSecret"u8); - JsonSerializer.Serialize(writer, ConsumerSecret); - } - if (Optional.IsDefined(AccessToken)) - { - writer.WritePropertyName("accessToken"u8); - JsonSerializer.Serialize(writer, AccessToken); - } - if (Optional.IsDefined(AccessTokenSecret)) - { - writer.WritePropertyName("accessTokenSecret"u8); - JsonSerializer.Serialize(writer, AccessTokenSecret); - } - if (Optional.IsDefined(UseEncryptedEndpoints)) - { - writer.WritePropertyName("useEncryptedEndpoints"u8); - JsonSerializer.Serialize(writer, UseEncryptedEndpoints); - } - if (Optional.IsDefined(EncryptedCredential)) - { - writer.WritePropertyName("encryptedCredential"u8); - writer.WriteStringValue(EncryptedCredential); - } - writer.WriteEndObject(); - foreach (var item in AdditionalProperties) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.Value.ToString()).RootElement); -#endif - } - writer.WriteEndObject(); - } - - internal static QuickBooksLinkedService DeserializeQuickBooksLinkedService(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - string type = default; - Optional connectVia = default; - Optional description = default; - Optional> parameters = default; - Optional> annotations = default; - Optional connectionProperties = default; - Optional> endpoint = default; - Optional> companyId = default; - Optional> consumerKey = default; - Optional consumerSecret = default; - Optional accessToken = default; - Optional accessTokenSecret = default; - Optional> useEncryptedEndpoints = default; - Optional encryptedCredential = default; - IDictionary> additionalProperties = default; - Dictionary> additionalPropertiesDictionary = new Dictionary>(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("type"u8)) - { - type = property.Value.GetString(); - continue; - } - if (property.NameEquals("connectVia"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - connectVia = IntegrationRuntimeReference.DeserializeIntegrationRuntimeReference(property.Value); - continue; - } - if (property.NameEquals("description"u8)) - { - description = property.Value.GetString(); - continue; - } - if (property.NameEquals("parameters"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - Dictionary dictionary = new Dictionary(); - foreach (var property0 in property.Value.EnumerateObject()) - { - dictionary.Add(property0.Name, EntityParameterSpecification.DeserializeEntityParameterSpecification(property0.Value)); - } - parameters = dictionary; - continue; - } - if (property.NameEquals("annotations"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - if (item.ValueKind == JsonValueKind.Null) - { - array.Add(null); - } - else - { - array.Add(BinaryData.FromString(item.GetRawText())); - } - } - annotations = array; - continue; - } - if (property.NameEquals("typeProperties"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - foreach (var property0 in property.Value.EnumerateObject()) - { - if (property0.NameEquals("connectionProperties"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - connectionProperties = BinaryData.FromString(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("endpoint"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - endpoint = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("companyId"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - companyId = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("consumerKey"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - consumerKey = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("consumerSecret"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - consumerSecret = JsonSerializer.Deserialize(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("accessToken"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - accessToken = JsonSerializer.Deserialize(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("accessTokenSecret"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - accessTokenSecret = JsonSerializer.Deserialize(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("useEncryptedEndpoints"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - useEncryptedEndpoints = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("encryptedCredential"u8)) - { - encryptedCredential = property0.Value.GetString(); - continue; - } - } - continue; - } - additionalPropertiesDictionary.Add(property.Name, JsonSerializer.Deserialize>(property.Value.GetRawText())); - } - additionalProperties = additionalPropertiesDictionary; - return new QuickBooksLinkedService(type, connectVia.Value, description.Value, Optional.ToDictionary(parameters), Optional.ToList(annotations), additionalProperties, connectionProperties.Value, endpoint.Value, companyId.Value, consumerKey.Value, consumerSecret, accessToken, accessTokenSecret, useEncryptedEndpoints.Value, encryptedCredential.Value); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/QuickBooksLinkedService.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/QuickBooksLinkedService.cs deleted file mode 100644 index f4b7fba8..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/QuickBooksLinkedService.cs +++ /dev/null @@ -1,96 +0,0 @@ -// - -#nullable disable - -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// QuickBooks server linked service. - public partial class QuickBooksLinkedService : DataFactoryLinkedServiceProperties - { - /// Initializes a new instance of QuickBooksLinkedService. - public QuickBooksLinkedService() - { - LinkedServiceType = "QuickBooks"; - } - - /// Initializes a new instance of QuickBooksLinkedService. - /// Type of linked service. - /// The integration runtime reference. - /// Linked service description. - /// Parameters for linked service. - /// List of tags that can be used for describing the linked service. - /// Additional Properties. - /// Properties used to connect to QuickBooks. It is mutually exclusive with any other properties in the linked service. Type: object. - /// The endpoint of the QuickBooks server. (i.e. quickbooks.api.intuit.com). - /// The company ID of the QuickBooks company to authorize. - /// The consumer key for OAuth 1.0 authentication. - /// The consumer secret for OAuth 1.0 authentication. - /// The access token for OAuth 1.0 authentication. - /// The access token secret for OAuth 1.0 authentication. - /// Specifies whether the data source endpoints are encrypted using HTTPS. The default value is true. - /// The encrypted credential used for authentication. Credentials are encrypted using the integration runtime credential manager. Type: string. - internal QuickBooksLinkedService(string linkedServiceType, IntegrationRuntimeReference connectVia, string description, IDictionary parameters, IList annotations, IDictionary> additionalProperties, BinaryData connectionProperties, DataFactoryElement endpoint, DataFactoryElement companyId, DataFactoryElement consumerKey, DataFactorySecretBaseDefinition consumerSecret, DataFactorySecretBaseDefinition accessToken, DataFactorySecretBaseDefinition accessTokenSecret, DataFactoryElement useEncryptedEndpoints, string encryptedCredential) : base(linkedServiceType, connectVia, description, parameters, annotations, additionalProperties) - { - ConnectionProperties = connectionProperties; - Endpoint = endpoint; - CompanyId = companyId; - ConsumerKey = consumerKey; - ConsumerSecret = consumerSecret; - AccessToken = accessToken; - AccessTokenSecret = accessTokenSecret; - UseEncryptedEndpoints = useEncryptedEndpoints; - EncryptedCredential = encryptedCredential; - LinkedServiceType = linkedServiceType ?? "QuickBooks"; - } - - /// - /// Properties used to connect to QuickBooks. It is mutually exclusive with any other properties in the linked service. Type: object. - /// - /// To assign an object to this property use . - /// - /// - /// To assign an already formated json string to this property use . - /// - /// - /// Examples: - /// - /// - /// BinaryData.FromObjectAsJson("foo") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromString("\"foo\"") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromObjectAsJson(new { key = "value" }) - /// Creates a payload of { "key": "value" }. - /// - /// - /// BinaryData.FromString("{\"key\": \"value\"}") - /// Creates a payload of { "key": "value" }. - /// - /// - /// - /// - public BinaryData ConnectionProperties { get; set; } - /// The endpoint of the QuickBooks server. (i.e. quickbooks.api.intuit.com). - public DataFactoryElement Endpoint { get; set; } - /// The company ID of the QuickBooks company to authorize. - public DataFactoryElement CompanyId { get; set; } - /// The consumer key for OAuth 1.0 authentication. - public DataFactoryElement ConsumerKey { get; set; } - /// The consumer secret for OAuth 1.0 authentication. - public DataFactorySecretBaseDefinition ConsumerSecret { get; set; } - /// The access token for OAuth 1.0 authentication. - public DataFactorySecretBaseDefinition AccessToken { get; set; } - /// The access token secret for OAuth 1.0 authentication. - public DataFactorySecretBaseDefinition AccessTokenSecret { get; set; } - /// Specifies whether the data source endpoints are encrypted using HTTPS. The default value is true. - public DataFactoryElement UseEncryptedEndpoints { get; set; } - /// The encrypted credential used for authentication. Credentials are encrypted using the integration runtime credential manager. Type: string. - public string EncryptedCredential { get; set; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/QuickBooksObjectDataset.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/QuickBooksObjectDataset.Serialization.cs deleted file mode 100644 index ff610f6d..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/QuickBooksObjectDataset.Serialization.cs +++ /dev/null @@ -1,212 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class QuickBooksObjectDataset : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - writer.WritePropertyName("type"u8); - writer.WriteStringValue(DatasetType); - if (Optional.IsDefined(Description)) - { - writer.WritePropertyName("description"u8); - writer.WriteStringValue(Description); - } - if (Optional.IsDefined(Structure)) - { - writer.WritePropertyName("structure"u8); - JsonSerializer.Serialize(writer, Structure); - } - if (Optional.IsDefined(Schema)) - { - writer.WritePropertyName("schema"u8); - JsonSerializer.Serialize(writer, Schema); - } - writer.WritePropertyName("linkedServiceName"u8); - JsonSerializer.Serialize(writer, LinkedServiceName); if (Optional.IsCollectionDefined(Parameters)) - { - writer.WritePropertyName("parameters"u8); - writer.WriteStartObject(); - foreach (var item in Parameters) - { - writer.WritePropertyName(item.Key); - writer.WriteObjectValue(item.Value); - } - writer.WriteEndObject(); - } - if (Optional.IsCollectionDefined(Annotations)) - { - writer.WritePropertyName("annotations"u8); - writer.WriteStartArray(); - foreach (var item in Annotations) - { - if (item == null) - { - writer.WriteNullValue(); - continue; - } -#if NET6_0_OR_GREATER - writer.WriteRawValue(item); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.ToString()).RootElement); -#endif - } - writer.WriteEndArray(); - } - if (Optional.IsDefined(Folder)) - { - writer.WritePropertyName("folder"u8); - writer.WriteObjectValue(Folder); - } - writer.WritePropertyName("typeProperties"u8); - writer.WriteStartObject(); - if (Optional.IsDefined(TableName)) - { - writer.WritePropertyName("tableName"u8); - JsonSerializer.Serialize(writer, TableName); - } - writer.WriteEndObject(); - foreach (var item in AdditionalProperties) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.Value.ToString()).RootElement); -#endif - } - writer.WriteEndObject(); - } - - internal static QuickBooksObjectDataset DeserializeQuickBooksObjectDataset(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - string type = default; - Optional description = default; - Optional>> structure = default; - Optional>> schema = default; - DataFactoryLinkedServiceReference linkedServiceName = default; - Optional> parameters = default; - Optional> annotations = default; - Optional folder = default; - Optional> tableName = default; - IDictionary> additionalProperties = default; - Dictionary> additionalPropertiesDictionary = new Dictionary>(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("type"u8)) - { - type = property.Value.GetString(); - continue; - } - if (property.NameEquals("description"u8)) - { - description = property.Value.GetString(); - continue; - } - if (property.NameEquals("structure"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - structure = JsonSerializer.Deserialize>>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("schema"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - schema = JsonSerializer.Deserialize>>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("linkedServiceName"u8)) - { - linkedServiceName = JsonSerializer.Deserialize(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("parameters"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - Dictionary dictionary = new Dictionary(); - foreach (var property0 in property.Value.EnumerateObject()) - { - dictionary.Add(property0.Name, EntityParameterSpecification.DeserializeEntityParameterSpecification(property0.Value)); - } - parameters = dictionary; - continue; - } - if (property.NameEquals("annotations"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - if (item.ValueKind == JsonValueKind.Null) - { - array.Add(null); - } - else - { - array.Add(BinaryData.FromString(item.GetRawText())); - } - } - annotations = array; - continue; - } - if (property.NameEquals("folder"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - folder = DatasetFolder.DeserializeDatasetFolder(property.Value); - continue; - } - if (property.NameEquals("typeProperties"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - foreach (var property0 in property.Value.EnumerateObject()) - { - if (property0.NameEquals("tableName"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - tableName = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - } - continue; - } - additionalPropertiesDictionary.Add(property.Name, JsonSerializer.Deserialize>(property.Value.GetRawText())); - } - additionalProperties = additionalPropertiesDictionary; - return new QuickBooksObjectDataset(type, description.Value, structure.Value, schema.Value, linkedServiceName, Optional.ToDictionary(parameters), Optional.ToList(annotations), folder.Value, additionalProperties, tableName.Value); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/QuickBooksObjectDataset.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/QuickBooksObjectDataset.cs deleted file mode 100644 index 95743035..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/QuickBooksObjectDataset.cs +++ /dev/null @@ -1,43 +0,0 @@ -// - -#nullable disable - -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// QuickBooks server dataset. - public partial class QuickBooksObjectDataset : DataFactoryDatasetProperties - { - /// Initializes a new instance of QuickBooksObjectDataset. - /// Linked service reference. - /// is null. - public QuickBooksObjectDataset(DataFactoryLinkedServiceReference linkedServiceName) : base(linkedServiceName) - { - Argument.AssertNotNull(linkedServiceName, nameof(linkedServiceName)); - - DatasetType = "QuickBooksObject"; - } - - /// Initializes a new instance of QuickBooksObjectDataset. - /// Type of dataset. - /// Dataset description. - /// Columns that define the structure of the dataset. Type: array (or Expression with resultType array), itemType: DatasetDataElement. - /// Columns that define the physical type schema of the dataset. Type: array (or Expression with resultType array), itemType: DatasetSchemaDataElement. - /// Linked service reference. - /// Parameters for dataset. - /// List of tags that can be used for describing the Dataset. - /// The folder that this Dataset is in. If not specified, Dataset will appear at the root level. - /// Additional Properties. - /// The table name. Type: string (or Expression with resultType string). - internal QuickBooksObjectDataset(string datasetType, string description, DataFactoryElement> structure, DataFactoryElement> schema, DataFactoryLinkedServiceReference linkedServiceName, IDictionary parameters, IList annotations, DatasetFolder folder, IDictionary> additionalProperties, DataFactoryElement tableName) : base(datasetType, description, structure, schema, linkedServiceName, parameters, annotations, folder, additionalProperties) - { - TableName = tableName; - DatasetType = datasetType ?? "QuickBooksObject"; - } - - /// The table name. Type: string (or Expression with resultType string). - public DataFactoryElement TableName { get; set; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/QuickBooksSource.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/QuickBooksSource.Serialization.cs deleted file mode 100644 index 8b44b76f..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/QuickBooksSource.Serialization.cs +++ /dev/null @@ -1,161 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class QuickBooksSource : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - if (Optional.IsDefined(Query)) - { - writer.WritePropertyName("query"u8); - JsonSerializer.Serialize(writer, Query); - } - if (Optional.IsDefined(QueryTimeout)) - { - writer.WritePropertyName("queryTimeout"u8); - JsonSerializer.Serialize(writer, QueryTimeout); - } - if (Optional.IsDefined(AdditionalColumns)) - { - writer.WritePropertyName("additionalColumns"u8); -#if NET6_0_OR_GREATER - writer.WriteRawValue(AdditionalColumns); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(AdditionalColumns.ToString()).RootElement); -#endif - } - writer.WritePropertyName("type"u8); - writer.WriteStringValue(CopySourceType); - if (Optional.IsDefined(SourceRetryCount)) - { - writer.WritePropertyName("sourceRetryCount"u8); - JsonSerializer.Serialize(writer, SourceRetryCount); - } - if (Optional.IsDefined(SourceRetryWait)) - { - writer.WritePropertyName("sourceRetryWait"u8); - JsonSerializer.Serialize(writer, SourceRetryWait); - } - if (Optional.IsDefined(MaxConcurrentConnections)) - { - writer.WritePropertyName("maxConcurrentConnections"u8); - JsonSerializer.Serialize(writer, MaxConcurrentConnections); - } - if (Optional.IsDefined(DisableMetricsCollection)) - { - writer.WritePropertyName("disableMetricsCollection"u8); - JsonSerializer.Serialize(writer, DisableMetricsCollection); - } - foreach (var item in AdditionalProperties) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.Value.ToString()).RootElement); -#endif - } - writer.WriteEndObject(); - } - - internal static QuickBooksSource DeserializeQuickBooksSource(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - Optional> query = default; - Optional> queryTimeout = default; - Optional additionalColumns = default; - string type = default; - Optional> sourceRetryCount = default; - Optional> sourceRetryWait = default; - Optional> maxConcurrentConnections = default; - Optional> disableMetricsCollection = default; - IDictionary> additionalProperties = default; - Dictionary> additionalPropertiesDictionary = new Dictionary>(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("query"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - query = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("queryTimeout"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - queryTimeout = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("additionalColumns"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - additionalColumns = BinaryData.FromString(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("type"u8)) - { - type = property.Value.GetString(); - continue; - } - if (property.NameEquals("sourceRetryCount"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - sourceRetryCount = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("sourceRetryWait"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - sourceRetryWait = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("maxConcurrentConnections"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - maxConcurrentConnections = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("disableMetricsCollection"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - disableMetricsCollection = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - additionalPropertiesDictionary.Add(property.Name, JsonSerializer.Deserialize>(property.Value.GetRawText())); - } - additionalProperties = additionalPropertiesDictionary; - return new QuickBooksSource(type, sourceRetryCount.Value, sourceRetryWait.Value, maxConcurrentConnections.Value, disableMetricsCollection.Value, additionalProperties, queryTimeout.Value, additionalColumns.Value, query.Value); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/QuickBooksSource.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/QuickBooksSource.cs deleted file mode 100644 index 97b4008b..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/QuickBooksSource.cs +++ /dev/null @@ -1,37 +0,0 @@ -// - -#nullable disable - -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// A copy activity QuickBooks server source. - public partial class QuickBooksSource : TabularSource - { - /// Initializes a new instance of QuickBooksSource. - public QuickBooksSource() - { - CopySourceType = "QuickBooksSource"; - } - - /// Initializes a new instance of QuickBooksSource. - /// Copy source type. - /// Source retry count. Type: integer (or Expression with resultType integer). - /// Source retry wait. Type: string (or Expression with resultType string), pattern: ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). - /// The maximum concurrent connection count for the source data store. Type: integer (or Expression with resultType integer). - /// If true, disable data store metrics collection. Default is false. Type: boolean (or Expression with resultType boolean). - /// Additional Properties. - /// 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). - /// A query to retrieve data from source. Type: string (or Expression with resultType string). - internal QuickBooksSource(string copySourceType, DataFactoryElement sourceRetryCount, DataFactoryElement sourceRetryWait, DataFactoryElement maxConcurrentConnections, DataFactoryElement disableMetricsCollection, IDictionary> additionalProperties, DataFactoryElement queryTimeout, BinaryData additionalColumns, DataFactoryElement query) : base(copySourceType, sourceRetryCount, sourceRetryWait, maxConcurrentConnections, disableMetricsCollection, additionalProperties, queryTimeout, additionalColumns) - { - Query = query; - CopySourceType = copySourceType ?? "QuickBooksSource"; - } - - /// A query to retrieve data from source. Type: string (or Expression with resultType string). - public DataFactoryElement Query { get; set; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/QuickbaseLinkedService.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/QuickbaseLinkedService.Serialization.cs deleted file mode 100644 index 203f509f..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/QuickbaseLinkedService.Serialization.cs +++ /dev/null @@ -1,186 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class QuickbaseLinkedService : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - writer.WritePropertyName("type"u8); - writer.WriteStringValue(LinkedServiceType); - if (Optional.IsDefined(ConnectVia)) - { - writer.WritePropertyName("connectVia"u8); - writer.WriteObjectValue(ConnectVia); - } - if (Optional.IsDefined(Description)) - { - writer.WritePropertyName("description"u8); - writer.WriteStringValue(Description); - } - if (Optional.IsCollectionDefined(Parameters)) - { - writer.WritePropertyName("parameters"u8); - writer.WriteStartObject(); - foreach (var item in Parameters) - { - writer.WritePropertyName(item.Key); - writer.WriteObjectValue(item.Value); - } - writer.WriteEndObject(); - } - if (Optional.IsCollectionDefined(Annotations)) - { - writer.WritePropertyName("annotations"u8); - writer.WriteStartArray(); - foreach (var item in Annotations) - { - if (item == null) - { - writer.WriteNullValue(); - continue; - } -#if NET6_0_OR_GREATER - writer.WriteRawValue(item); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.ToString()).RootElement); -#endif - } - writer.WriteEndArray(); - } - writer.WritePropertyName("typeProperties"u8); - writer.WriteStartObject(); - writer.WritePropertyName("url"u8); - JsonSerializer.Serialize(writer, Uri); - writer.WritePropertyName("userToken"u8); - JsonSerializer.Serialize(writer, UserToken); if (Optional.IsDefined(EncryptedCredential)) - { - writer.WritePropertyName("encryptedCredential"u8); - writer.WriteStringValue(EncryptedCredential); - } - writer.WriteEndObject(); - foreach (var item in AdditionalProperties) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.Value.ToString()).RootElement); -#endif - } - writer.WriteEndObject(); - } - - internal static QuickbaseLinkedService DeserializeQuickbaseLinkedService(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - string type = default; - Optional connectVia = default; - Optional description = default; - Optional> parameters = default; - Optional> annotations = default; - DataFactoryElement url = default; - DataFactorySecretBaseDefinition userToken = default; - Optional encryptedCredential = default; - IDictionary> additionalProperties = default; - Dictionary> additionalPropertiesDictionary = new Dictionary>(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("type"u8)) - { - type = property.Value.GetString(); - continue; - } - if (property.NameEquals("connectVia"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - connectVia = IntegrationRuntimeReference.DeserializeIntegrationRuntimeReference(property.Value); - continue; - } - if (property.NameEquals("description"u8)) - { - description = property.Value.GetString(); - continue; - } - if (property.NameEquals("parameters"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - Dictionary dictionary = new Dictionary(); - foreach (var property0 in property.Value.EnumerateObject()) - { - dictionary.Add(property0.Name, EntityParameterSpecification.DeserializeEntityParameterSpecification(property0.Value)); - } - parameters = dictionary; - continue; - } - if (property.NameEquals("annotations"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - if (item.ValueKind == JsonValueKind.Null) - { - array.Add(null); - } - else - { - array.Add(BinaryData.FromString(item.GetRawText())); - } - } - annotations = array; - continue; - } - if (property.NameEquals("typeProperties"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - foreach (var property0 in property.Value.EnumerateObject()) - { - if (property0.NameEquals("url"u8)) - { - url = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("userToken"u8)) - { - userToken = JsonSerializer.Deserialize(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("encryptedCredential"u8)) - { - encryptedCredential = property0.Value.GetString(); - continue; - } - } - continue; - } - additionalPropertiesDictionary.Add(property.Name, JsonSerializer.Deserialize>(property.Value.GetRawText())); - } - additionalProperties = additionalPropertiesDictionary; - return new QuickbaseLinkedService(type, connectVia.Value, description.Value, Optional.ToDictionary(parameters), Optional.ToList(annotations), additionalProperties, url, userToken, encryptedCredential.Value); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/QuickbaseLinkedService.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/QuickbaseLinkedService.cs deleted file mode 100644 index 36f145ab..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/QuickbaseLinkedService.cs +++ /dev/null @@ -1,52 +0,0 @@ -// - -#nullable disable - -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// Linked service for Quickbase. - public partial class QuickbaseLinkedService : DataFactoryLinkedServiceProperties - { - /// Initializes a new instance of QuickbaseLinkedService. - /// The url to connect Quickbase source. Type: string (or Expression with resultType string). - /// The user token for the Quickbase source. - /// or is null. - public QuickbaseLinkedService(DataFactoryElement uri, DataFactorySecretBaseDefinition userToken) - { - Argument.AssertNotNull(uri, nameof(uri)); - Argument.AssertNotNull(userToken, nameof(userToken)); - - Uri = uri; - UserToken = userToken; - LinkedServiceType = "Quickbase"; - } - - /// Initializes a new instance of QuickbaseLinkedService. - /// Type of linked service. - /// The integration runtime reference. - /// Linked service description. - /// Parameters for linked service. - /// List of tags that can be used for describing the linked service. - /// Additional Properties. - /// The url to connect Quickbase source. Type: string (or Expression with resultType string). - /// The user token for the Quickbase source. - /// The encrypted credential used for authentication. Credentials are encrypted using the integration runtime credential manager. Type: string. - internal QuickbaseLinkedService(string linkedServiceType, IntegrationRuntimeReference connectVia, string description, IDictionary parameters, IList annotations, IDictionary> additionalProperties, DataFactoryElement uri, DataFactorySecretBaseDefinition userToken, string encryptedCredential) : base(linkedServiceType, connectVia, description, parameters, annotations, additionalProperties) - { - Uri = uri; - UserToken = userToken; - EncryptedCredential = encryptedCredential; - LinkedServiceType = linkedServiceType ?? "Quickbase"; - } - - /// The url to connect Quickbase source. Type: string (or Expression with resultType string). - public DataFactoryElement Uri { get; set; } - /// The user token for the Quickbase source. - public DataFactorySecretBaseDefinition UserToken { get; set; } - /// The encrypted credential used for authentication. Credentials are encrypted using the integration runtime credential manager. Type: string. - public string EncryptedCredential { get; set; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/RedirectIncompatibleRowSettings.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/RedirectIncompatibleRowSettings.Serialization.cs deleted file mode 100644 index 21be516e..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/RedirectIncompatibleRowSettings.Serialization.cs +++ /dev/null @@ -1,67 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class RedirectIncompatibleRowSettings : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - writer.WritePropertyName("linkedServiceName"u8); - JsonSerializer.Serialize(writer, LinkedServiceName); - if (Optional.IsDefined(Path)) - { - writer.WritePropertyName("path"u8); - JsonSerializer.Serialize(writer, Path); - } - foreach (var item in AdditionalProperties) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.Value.ToString()).RootElement); -#endif - } - writer.WriteEndObject(); - } - - internal static RedirectIncompatibleRowSettings DeserializeRedirectIncompatibleRowSettings(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - DataFactoryElement linkedServiceName = default; - Optional> path = default; - IDictionary> additionalProperties = default; - Dictionary> additionalPropertiesDictionary = new Dictionary>(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("linkedServiceName"u8)) - { - linkedServiceName = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("path"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - path = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - additionalPropertiesDictionary.Add(property.Name, JsonSerializer.Deserialize>(property.Value.GetRawText())); - } - additionalProperties = additionalPropertiesDictionary; - return new RedirectIncompatibleRowSettings(linkedServiceName, path.Value, additionalProperties); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/RedirectIncompatibleRowSettings.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/RedirectIncompatibleRowSettings.cs deleted file mode 100644 index 9961f0d0..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/RedirectIncompatibleRowSettings.cs +++ /dev/null @@ -1,71 +0,0 @@ -// - -#nullable disable - -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// Redirect incompatible row settings. - public partial class RedirectIncompatibleRowSettings - { - /// Initializes a new instance of RedirectIncompatibleRowSettings. - /// Name of the Azure Storage, Storage SAS, or Azure Data Lake Store linked service used for redirecting incompatible row. Must be specified if redirectIncompatibleRowSettings is specified. Type: string (or Expression with resultType string). - /// is null. - public RedirectIncompatibleRowSettings(DataFactoryElement linkedServiceName) - { - Argument.AssertNotNull(linkedServiceName, nameof(linkedServiceName)); - - LinkedServiceName = linkedServiceName; - AdditionalProperties = new ChangeTrackingDictionary>(); - } - - /// Initializes a new instance of RedirectIncompatibleRowSettings. - /// Name of the Azure Storage, Storage SAS, or Azure Data Lake Store linked service used for redirecting incompatible row. Must be specified if redirectIncompatibleRowSettings is specified. Type: string (or Expression with resultType string). - /// The path for storing the redirect incompatible row data. Type: string (or Expression with resultType string). - /// Additional Properties. - internal RedirectIncompatibleRowSettings(DataFactoryElement linkedServiceName, DataFactoryElement path, IDictionary> additionalProperties) - { - LinkedServiceName = linkedServiceName; - Path = path; - AdditionalProperties = additionalProperties; - } - - /// Name of the Azure Storage, Storage SAS, or Azure Data Lake Store linked service used for redirecting incompatible row. Must be specified if redirectIncompatibleRowSettings is specified. Type: string (or Expression with resultType string). - public DataFactoryElement LinkedServiceName { get; set; } - /// The path for storing the redirect incompatible row data. Type: string (or Expression with resultType string). - public DataFactoryElement Path { get; set; } - /// - /// Additional Properties - /// - /// To assign an object to the value of this property use . - /// - /// - /// To assign an already formated json string to this property use . - /// - /// - /// Examples: - /// - /// - /// BinaryData.FromObjectAsJson("foo") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromString("\"foo\"") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromObjectAsJson(new { key = "value" }) - /// Creates a payload of { "key": "value" }. - /// - /// - /// BinaryData.FromString("{\"key\": \"value\"}") - /// Creates a payload of { "key": "value" }. - /// - /// - /// - /// - public IDictionary> AdditionalProperties { get; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/RedshiftUnloadSettings.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/RedshiftUnloadSettings.Serialization.cs deleted file mode 100644 index 4b709960..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/RedshiftUnloadSettings.Serialization.cs +++ /dev/null @@ -1,46 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class RedshiftUnloadSettings : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - writer.WritePropertyName("s3LinkedServiceName"u8); - JsonSerializer.Serialize(writer, S3LinkedServiceName); writer.WritePropertyName("bucketName"u8); - JsonSerializer.Serialize(writer, BucketName); - writer.WriteEndObject(); - } - - internal static RedshiftUnloadSettings DeserializeRedshiftUnloadSettings(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - DataFactoryLinkedServiceReference s3LinkedServiceName = default; - DataFactoryElement bucketName = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("s3LinkedServiceName"u8)) - { - s3LinkedServiceName = JsonSerializer.Deserialize(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("bucketName"u8)) - { - bucketName = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - } - return new RedshiftUnloadSettings(s3LinkedServiceName, bucketName); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/RedshiftUnloadSettings.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/RedshiftUnloadSettings.cs deleted file mode 100644 index 419fb4e7..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/RedshiftUnloadSettings.cs +++ /dev/null @@ -1,31 +0,0 @@ -// - -#nullable disable - -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// The Amazon S3 settings needed for the interim Amazon S3 when copying from Amazon Redshift with unload. With this, data from Amazon Redshift source will be unloaded into S3 first and then copied into the targeted sink from the interim S3. - public partial class RedshiftUnloadSettings - { - /// Initializes a new instance of RedshiftUnloadSettings. - /// The name of the Amazon S3 linked service which will be used for the unload operation when copying from the Amazon Redshift source. - /// The bucket of the interim Amazon S3 which will be used to store the unloaded data from Amazon Redshift source. The bucket must be in the same region as the Amazon Redshift source. Type: string (or Expression with resultType string). - /// or is null. - public RedshiftUnloadSettings(DataFactoryLinkedServiceReference s3LinkedServiceName, DataFactoryElement bucketName) - { - Argument.AssertNotNull(s3LinkedServiceName, nameof(s3LinkedServiceName)); - Argument.AssertNotNull(bucketName, nameof(bucketName)); - - S3LinkedServiceName = s3LinkedServiceName; - BucketName = bucketName; - } - - /// The name of the Amazon S3 linked service which will be used for the unload operation when copying from the Amazon Redshift source. - public DataFactoryLinkedServiceReference S3LinkedServiceName { get; set; } - /// The bucket of the interim Amazon S3 which will be used to store the unloaded data from Amazon Redshift source. The bucket must be in the same region as the Amazon Redshift source. Type: string (or Expression with resultType string). - public DataFactoryElement BucketName { get; set; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/RelationalSource.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/RelationalSource.Serialization.cs deleted file mode 100644 index 302471f5..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/RelationalSource.Serialization.cs +++ /dev/null @@ -1,146 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class RelationalSource : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - if (Optional.IsDefined(Query)) - { - writer.WritePropertyName("query"u8); - JsonSerializer.Serialize(writer, Query); - } - if (Optional.IsDefined(AdditionalColumns)) - { - writer.WritePropertyName("additionalColumns"u8); -#if NET6_0_OR_GREATER - writer.WriteRawValue(AdditionalColumns); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(AdditionalColumns.ToString()).RootElement); -#endif - } - writer.WritePropertyName("type"u8); - writer.WriteStringValue(CopySourceType); - if (Optional.IsDefined(SourceRetryCount)) - { - writer.WritePropertyName("sourceRetryCount"u8); - JsonSerializer.Serialize(writer, SourceRetryCount); - } - if (Optional.IsDefined(SourceRetryWait)) - { - writer.WritePropertyName("sourceRetryWait"u8); - JsonSerializer.Serialize(writer, SourceRetryWait); - } - if (Optional.IsDefined(MaxConcurrentConnections)) - { - writer.WritePropertyName("maxConcurrentConnections"u8); - JsonSerializer.Serialize(writer, MaxConcurrentConnections); - } - if (Optional.IsDefined(DisableMetricsCollection)) - { - writer.WritePropertyName("disableMetricsCollection"u8); - JsonSerializer.Serialize(writer, DisableMetricsCollection); - } - foreach (var item in AdditionalProperties) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.Value.ToString()).RootElement); -#endif - } - writer.WriteEndObject(); - } - - internal static RelationalSource DeserializeRelationalSource(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - Optional> query = default; - Optional additionalColumns = default; - string type = default; - Optional> sourceRetryCount = default; - Optional> sourceRetryWait = default; - Optional> maxConcurrentConnections = default; - Optional> disableMetricsCollection = default; - IDictionary> additionalProperties = default; - Dictionary> additionalPropertiesDictionary = new Dictionary>(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("query"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - query = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("additionalColumns"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - additionalColumns = BinaryData.FromString(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("type"u8)) - { - type = property.Value.GetString(); - continue; - } - if (property.NameEquals("sourceRetryCount"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - sourceRetryCount = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("sourceRetryWait"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - sourceRetryWait = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("maxConcurrentConnections"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - maxConcurrentConnections = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("disableMetricsCollection"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - disableMetricsCollection = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - additionalPropertiesDictionary.Add(property.Name, JsonSerializer.Deserialize>(property.Value.GetRawText())); - } - additionalProperties = additionalPropertiesDictionary; - return new RelationalSource(type, sourceRetryCount.Value, sourceRetryWait.Value, maxConcurrentConnections.Value, disableMetricsCollection.Value, additionalProperties, query.Value, additionalColumns.Value); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/RelationalSource.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/RelationalSource.cs deleted file mode 100644 index 446747b6..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/RelationalSource.cs +++ /dev/null @@ -1,68 +0,0 @@ -// - -#nullable disable - -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// A copy activity source for various relational databases. - public partial class RelationalSource : CopyActivitySource - { - /// Initializes a new instance of RelationalSource. - public RelationalSource() - { - CopySourceType = "RelationalSource"; - } - - /// Initializes a new instance of RelationalSource. - /// Copy source type. - /// Source retry count. Type: integer (or Expression with resultType integer). - /// Source retry wait. Type: string (or Expression with resultType string), pattern: ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). - /// The maximum concurrent connection count for the source data store. Type: integer (or Expression with resultType integer). - /// If true, disable data store metrics collection. Default is false. Type: boolean (or Expression with resultType boolean). - /// Additional Properties. - /// Database query. Type: string (or Expression with resultType string). - /// Specifies the additional columns to be added to source data. Type: array of objects(AdditionalColumns) (or Expression with resultType array of objects). - internal RelationalSource(string copySourceType, DataFactoryElement sourceRetryCount, DataFactoryElement sourceRetryWait, DataFactoryElement maxConcurrentConnections, DataFactoryElement disableMetricsCollection, IDictionary> additionalProperties, DataFactoryElement query, BinaryData additionalColumns) : base(copySourceType, sourceRetryCount, sourceRetryWait, maxConcurrentConnections, disableMetricsCollection, additionalProperties) - { - Query = query; - AdditionalColumns = additionalColumns; - CopySourceType = copySourceType ?? "RelationalSource"; - } - - /// Database query. Type: string (or Expression with resultType string). - public DataFactoryElement Query { get; set; } - /// - /// Specifies the additional columns to be added to source data. Type: array of objects(AdditionalColumns) (or Expression with resultType array of objects). - /// - /// To assign an object to this property use . - /// - /// - /// To assign an already formated json string to this property use . - /// - /// - /// Examples: - /// - /// - /// BinaryData.FromObjectAsJson("foo") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromString("\"foo\"") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromObjectAsJson(new { key = "value" }) - /// Creates a payload of { "key": "value" }. - /// - /// - /// BinaryData.FromString("{\"key\": \"value\"}") - /// Creates a payload of { "key": "value" }. - /// - /// - /// - /// - public BinaryData AdditionalColumns { get; set; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/RelationalTableDataset.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/RelationalTableDataset.Serialization.cs deleted file mode 100644 index cfd0dd03..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/RelationalTableDataset.Serialization.cs +++ /dev/null @@ -1,212 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class RelationalTableDataset : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - writer.WritePropertyName("type"u8); - writer.WriteStringValue(DatasetType); - if (Optional.IsDefined(Description)) - { - writer.WritePropertyName("description"u8); - writer.WriteStringValue(Description); - } - if (Optional.IsDefined(Structure)) - { - writer.WritePropertyName("structure"u8); - JsonSerializer.Serialize(writer, Structure); - } - if (Optional.IsDefined(Schema)) - { - writer.WritePropertyName("schema"u8); - JsonSerializer.Serialize(writer, Schema); - } - writer.WritePropertyName("linkedServiceName"u8); - JsonSerializer.Serialize(writer, LinkedServiceName); if (Optional.IsCollectionDefined(Parameters)) - { - writer.WritePropertyName("parameters"u8); - writer.WriteStartObject(); - foreach (var item in Parameters) - { - writer.WritePropertyName(item.Key); - writer.WriteObjectValue(item.Value); - } - writer.WriteEndObject(); - } - if (Optional.IsCollectionDefined(Annotations)) - { - writer.WritePropertyName("annotations"u8); - writer.WriteStartArray(); - foreach (var item in Annotations) - { - if (item == null) - { - writer.WriteNullValue(); - continue; - } -#if NET6_0_OR_GREATER - writer.WriteRawValue(item); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.ToString()).RootElement); -#endif - } - writer.WriteEndArray(); - } - if (Optional.IsDefined(Folder)) - { - writer.WritePropertyName("folder"u8); - writer.WriteObjectValue(Folder); - } - writer.WritePropertyName("typeProperties"u8); - writer.WriteStartObject(); - if (Optional.IsDefined(TableName)) - { - writer.WritePropertyName("tableName"u8); - JsonSerializer.Serialize(writer, TableName); - } - writer.WriteEndObject(); - foreach (var item in AdditionalProperties) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.Value.ToString()).RootElement); -#endif - } - writer.WriteEndObject(); - } - - internal static RelationalTableDataset DeserializeRelationalTableDataset(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - string type = default; - Optional description = default; - Optional>> structure = default; - Optional>> schema = default; - DataFactoryLinkedServiceReference linkedServiceName = default; - Optional> parameters = default; - Optional> annotations = default; - Optional folder = default; - Optional> tableName = default; - IDictionary> additionalProperties = default; - Dictionary> additionalPropertiesDictionary = new Dictionary>(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("type"u8)) - { - type = property.Value.GetString(); - continue; - } - if (property.NameEquals("description"u8)) - { - description = property.Value.GetString(); - continue; - } - if (property.NameEquals("structure"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - structure = JsonSerializer.Deserialize>>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("schema"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - schema = JsonSerializer.Deserialize>>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("linkedServiceName"u8)) - { - linkedServiceName = JsonSerializer.Deserialize(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("parameters"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - Dictionary dictionary = new Dictionary(); - foreach (var property0 in property.Value.EnumerateObject()) - { - dictionary.Add(property0.Name, EntityParameterSpecification.DeserializeEntityParameterSpecification(property0.Value)); - } - parameters = dictionary; - continue; - } - if (property.NameEquals("annotations"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - if (item.ValueKind == JsonValueKind.Null) - { - array.Add(null); - } - else - { - array.Add(BinaryData.FromString(item.GetRawText())); - } - } - annotations = array; - continue; - } - if (property.NameEquals("folder"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - folder = DatasetFolder.DeserializeDatasetFolder(property.Value); - continue; - } - if (property.NameEquals("typeProperties"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - foreach (var property0 in property.Value.EnumerateObject()) - { - if (property0.NameEquals("tableName"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - tableName = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - } - continue; - } - additionalPropertiesDictionary.Add(property.Name, JsonSerializer.Deserialize>(property.Value.GetRawText())); - } - additionalProperties = additionalPropertiesDictionary; - return new RelationalTableDataset(type, description.Value, structure.Value, schema.Value, linkedServiceName, Optional.ToDictionary(parameters), Optional.ToList(annotations), folder.Value, additionalProperties, tableName.Value); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/RelationalTableDataset.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/RelationalTableDataset.cs deleted file mode 100644 index 55fee804..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/RelationalTableDataset.cs +++ /dev/null @@ -1,43 +0,0 @@ -// - -#nullable disable - -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// The relational table dataset. - public partial class RelationalTableDataset : DataFactoryDatasetProperties - { - /// Initializes a new instance of RelationalTableDataset. - /// Linked service reference. - /// is null. - public RelationalTableDataset(DataFactoryLinkedServiceReference linkedServiceName) : base(linkedServiceName) - { - Argument.AssertNotNull(linkedServiceName, nameof(linkedServiceName)); - - DatasetType = "RelationalTable"; - } - - /// Initializes a new instance of RelationalTableDataset. - /// Type of dataset. - /// Dataset description. - /// Columns that define the structure of the dataset. Type: array (or Expression with resultType array), itemType: DatasetDataElement. - /// Columns that define the physical type schema of the dataset. Type: array (or Expression with resultType array), itemType: DatasetSchemaDataElement. - /// Linked service reference. - /// Parameters for dataset. - /// List of tags that can be used for describing the Dataset. - /// The folder that this Dataset is in. If not specified, Dataset will appear at the root level. - /// Additional Properties. - /// The relational table name. Type: string (or Expression with resultType string). - internal RelationalTableDataset(string datasetType, string description, DataFactoryElement> structure, DataFactoryElement> schema, DataFactoryLinkedServiceReference linkedServiceName, IDictionary parameters, IList annotations, DatasetFolder folder, IDictionary> additionalProperties, DataFactoryElement tableName) : base(datasetType, description, structure, schema, linkedServiceName, parameters, annotations, folder, additionalProperties) - { - TableName = tableName; - DatasetType = datasetType ?? "RelationalTable"; - } - - /// The relational table name. Type: string (or Expression with resultType string). - public DataFactoryElement TableName { get; set; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/RerunTumblingWindowTrigger.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/RerunTumblingWindowTrigger.Serialization.cs deleted file mode 100644 index 2367e04f..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/RerunTumblingWindowTrigger.Serialization.cs +++ /dev/null @@ -1,165 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class RerunTumblingWindowTrigger : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - writer.WritePropertyName("type"u8); - writer.WriteStringValue(TriggerType); - if (Optional.IsDefined(Description)) - { - writer.WritePropertyName("description"u8); - writer.WriteStringValue(Description); - } - if (Optional.IsCollectionDefined(Annotations)) - { - writer.WritePropertyName("annotations"u8); - writer.WriteStartArray(); - foreach (var item in Annotations) - { - if (item == null) - { - writer.WriteNullValue(); - continue; - } -#if NET6_0_OR_GREATER - writer.WriteRawValue(item); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.ToString()).RootElement); -#endif - } - writer.WriteEndArray(); - } - writer.WritePropertyName("typeProperties"u8); - writer.WriteStartObject(); - writer.WritePropertyName("parentTrigger"u8); -#if NET6_0_OR_GREATER - writer.WriteRawValue(ParentTrigger); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(ParentTrigger.ToString()).RootElement); -#endif - writer.WritePropertyName("requestedStartTime"u8); - writer.WriteStringValue(RequestedStartOn, "O"); - writer.WritePropertyName("requestedEndTime"u8); - writer.WriteStringValue(RequestedEndOn, "O"); - writer.WritePropertyName("rerunConcurrency"u8); - writer.WriteNumberValue(RerunConcurrency); - writer.WriteEndObject(); - foreach (var item in AdditionalProperties) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.Value.ToString()).RootElement); -#endif - } - writer.WriteEndObject(); - } - - internal static RerunTumblingWindowTrigger DeserializeRerunTumblingWindowTrigger(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - string type = default; - Optional description = default; - Optional runtimeState = default; - Optional> annotations = default; - BinaryData parentTrigger = default; - DateTimeOffset requestedStartTime = default; - DateTimeOffset requestedEndTime = default; - int rerunConcurrency = default; - IDictionary> additionalProperties = default; - Dictionary> additionalPropertiesDictionary = new Dictionary>(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("type"u8)) - { - type = property.Value.GetString(); - continue; - } - if (property.NameEquals("description"u8)) - { - description = property.Value.GetString(); - continue; - } - if (property.NameEquals("runtimeState"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - runtimeState = new DataFactoryTriggerRuntimeState(property.Value.GetString()); - continue; - } - if (property.NameEquals("annotations"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - if (item.ValueKind == JsonValueKind.Null) - { - array.Add(null); - } - else - { - array.Add(BinaryData.FromString(item.GetRawText())); - } - } - annotations = array; - continue; - } - if (property.NameEquals("typeProperties"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - foreach (var property0 in property.Value.EnumerateObject()) - { - if (property0.NameEquals("parentTrigger"u8)) - { - parentTrigger = BinaryData.FromString(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("requestedStartTime"u8)) - { - requestedStartTime = property0.Value.GetDateTimeOffset("O"); - continue; - } - if (property0.NameEquals("requestedEndTime"u8)) - { - requestedEndTime = property0.Value.GetDateTimeOffset("O"); - continue; - } - if (property0.NameEquals("rerunConcurrency"u8)) - { - rerunConcurrency = property0.Value.GetInt32(); - continue; - } - } - continue; - } - additionalPropertiesDictionary.Add(property.Name, JsonSerializer.Deserialize>(property.Value.GetRawText())); - } - additionalProperties = additionalPropertiesDictionary; - return new RerunTumblingWindowTrigger(type, description.Value, Optional.ToNullable(runtimeState), Optional.ToList(annotations), additionalProperties, parentTrigger, requestedStartTime, requestedEndTime, rerunConcurrency); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/RerunTumblingWindowTrigger.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/RerunTumblingWindowTrigger.cs deleted file mode 100644 index 4cf8f8aa..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/RerunTumblingWindowTrigger.cs +++ /dev/null @@ -1,87 +0,0 @@ -// - -#nullable disable - -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// Trigger that schedules pipeline reruns for all fixed time interval windows from a requested start time to requested end time. - public partial class RerunTumblingWindowTrigger : DataFactoryTriggerProperties - { - /// Initializes a new instance of RerunTumblingWindowTrigger. - /// The parent trigger reference. - /// The start time for the time period for which restatement is initiated. Only UTC time is currently supported. - /// The end time for the time period for which restatement is initiated. Only UTC time is currently supported. - /// The max number of parallel time windows (ready for execution) for which a rerun is triggered. - /// is null. - public RerunTumblingWindowTrigger(BinaryData parentTrigger, DateTimeOffset requestedStartOn, DateTimeOffset requestedEndOn, int rerunConcurrency) - { - Argument.AssertNotNull(parentTrigger, nameof(parentTrigger)); - - ParentTrigger = parentTrigger; - RequestedStartOn = requestedStartOn; - RequestedEndOn = requestedEndOn; - RerunConcurrency = rerunConcurrency; - TriggerType = "RerunTumblingWindowTrigger"; - } - - /// Initializes a new instance of RerunTumblingWindowTrigger. - /// Trigger type. - /// Trigger description. - /// Indicates if trigger is running or not. Updated when Start/Stop APIs are called on the Trigger. - /// List of tags that can be used for describing the trigger. - /// Additional Properties. - /// The parent trigger reference. - /// The start time for the time period for which restatement is initiated. Only UTC time is currently supported. - /// The end time for the time period for which restatement is initiated. Only UTC time is currently supported. - /// The max number of parallel time windows (ready for execution) for which a rerun is triggered. - internal RerunTumblingWindowTrigger(string triggerType, string description, DataFactoryTriggerRuntimeState? runtimeState, IList annotations, IDictionary> additionalProperties, BinaryData parentTrigger, DateTimeOffset requestedStartOn, DateTimeOffset requestedEndOn, int rerunConcurrency) : base(triggerType, description, runtimeState, annotations, additionalProperties) - { - ParentTrigger = parentTrigger; - RequestedStartOn = requestedStartOn; - RequestedEndOn = requestedEndOn; - RerunConcurrency = rerunConcurrency; - TriggerType = triggerType ?? "RerunTumblingWindowTrigger"; - } - - /// - /// The parent trigger reference. - /// - /// To assign an object to this property use . - /// - /// - /// To assign an already formated json string to this property use . - /// - /// - /// Examples: - /// - /// - /// BinaryData.FromObjectAsJson("foo") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromString("\"foo\"") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromObjectAsJson(new { key = "value" }) - /// Creates a payload of { "key": "value" }. - /// - /// - /// BinaryData.FromString("{\"key\": \"value\"}") - /// Creates a payload of { "key": "value" }. - /// - /// - /// - /// - public BinaryData ParentTrigger { get; set; } - /// The start time for the time period for which restatement is initiated. Only UTC time is currently supported. - public DateTimeOffset RequestedStartOn { get; set; } - /// The end time for the time period for which restatement is initiated. Only UTC time is currently supported. - public DateTimeOffset RequestedEndOn { get; set; } - /// The max number of parallel time windows (ready for execution) for which a rerun is triggered. - public int RerunConcurrency { get; set; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/ResponsysLinkedService.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/ResponsysLinkedService.Serialization.cs deleted file mode 100644 index b0525764..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/ResponsysLinkedService.Serialization.cs +++ /dev/null @@ -1,251 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class ResponsysLinkedService : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - writer.WritePropertyName("type"u8); - writer.WriteStringValue(LinkedServiceType); - if (Optional.IsDefined(ConnectVia)) - { - writer.WritePropertyName("connectVia"u8); - writer.WriteObjectValue(ConnectVia); - } - if (Optional.IsDefined(Description)) - { - writer.WritePropertyName("description"u8); - writer.WriteStringValue(Description); - } - if (Optional.IsCollectionDefined(Parameters)) - { - writer.WritePropertyName("parameters"u8); - writer.WriteStartObject(); - foreach (var item in Parameters) - { - writer.WritePropertyName(item.Key); - writer.WriteObjectValue(item.Value); - } - writer.WriteEndObject(); - } - if (Optional.IsCollectionDefined(Annotations)) - { - writer.WritePropertyName("annotations"u8); - writer.WriteStartArray(); - foreach (var item in Annotations) - { - if (item == null) - { - writer.WriteNullValue(); - continue; - } -#if NET6_0_OR_GREATER - writer.WriteRawValue(item); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.ToString()).RootElement); -#endif - } - writer.WriteEndArray(); - } - writer.WritePropertyName("typeProperties"u8); - writer.WriteStartObject(); - writer.WritePropertyName("endpoint"u8); -#if NET6_0_OR_GREATER - writer.WriteRawValue(Endpoint); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(Endpoint.ToString()).RootElement); -#endif - writer.WritePropertyName("clientId"u8); - JsonSerializer.Serialize(writer, ClientId); - if (Optional.IsDefined(ClientSecret)) - { - writer.WritePropertyName("clientSecret"u8); - JsonSerializer.Serialize(writer, ClientSecret); - } - if (Optional.IsDefined(UseEncryptedEndpoints)) - { - writer.WritePropertyName("useEncryptedEndpoints"u8); - JsonSerializer.Serialize(writer, UseEncryptedEndpoints); - } - if (Optional.IsDefined(UseHostVerification)) - { - writer.WritePropertyName("useHostVerification"u8); - JsonSerializer.Serialize(writer, UseHostVerification); - } - if (Optional.IsDefined(UsePeerVerification)) - { - writer.WritePropertyName("usePeerVerification"u8); - JsonSerializer.Serialize(writer, UsePeerVerification); - } - if (Optional.IsDefined(EncryptedCredential)) - { - writer.WritePropertyName("encryptedCredential"u8); - writer.WriteStringValue(EncryptedCredential); - } - writer.WriteEndObject(); - foreach (var item in AdditionalProperties) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.Value.ToString()).RootElement); -#endif - } - writer.WriteEndObject(); - } - - internal static ResponsysLinkedService DeserializeResponsysLinkedService(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - string type = default; - Optional connectVia = default; - Optional description = default; - Optional> parameters = default; - Optional> annotations = default; - BinaryData endpoint = default; - DataFactoryElement clientId = default; - Optional clientSecret = default; - Optional> useEncryptedEndpoints = default; - Optional> useHostVerification = default; - Optional> usePeerVerification = default; - Optional encryptedCredential = default; - IDictionary> additionalProperties = default; - Dictionary> additionalPropertiesDictionary = new Dictionary>(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("type"u8)) - { - type = property.Value.GetString(); - continue; - } - if (property.NameEquals("connectVia"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - connectVia = IntegrationRuntimeReference.DeserializeIntegrationRuntimeReference(property.Value); - continue; - } - if (property.NameEquals("description"u8)) - { - description = property.Value.GetString(); - continue; - } - if (property.NameEquals("parameters"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - Dictionary dictionary = new Dictionary(); - foreach (var property0 in property.Value.EnumerateObject()) - { - dictionary.Add(property0.Name, EntityParameterSpecification.DeserializeEntityParameterSpecification(property0.Value)); - } - parameters = dictionary; - continue; - } - if (property.NameEquals("annotations"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - if (item.ValueKind == JsonValueKind.Null) - { - array.Add(null); - } - else - { - array.Add(BinaryData.FromString(item.GetRawText())); - } - } - annotations = array; - continue; - } - if (property.NameEquals("typeProperties"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - foreach (var property0 in property.Value.EnumerateObject()) - { - if (property0.NameEquals("endpoint"u8)) - { - endpoint = BinaryData.FromString(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("clientId"u8)) - { - clientId = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("clientSecret"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - clientSecret = JsonSerializer.Deserialize(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("useEncryptedEndpoints"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - useEncryptedEndpoints = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("useHostVerification"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - useHostVerification = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("usePeerVerification"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - usePeerVerification = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("encryptedCredential"u8)) - { - encryptedCredential = property0.Value.GetString(); - continue; - } - } - continue; - } - additionalPropertiesDictionary.Add(property.Name, JsonSerializer.Deserialize>(property.Value.GetRawText())); - } - additionalProperties = additionalPropertiesDictionary; - return new ResponsysLinkedService(type, connectVia.Value, description.Value, Optional.ToDictionary(parameters), Optional.ToList(annotations), additionalProperties, endpoint, clientId, clientSecret, useEncryptedEndpoints.Value, useHostVerification.Value, usePeerVerification.Value, encryptedCredential.Value); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/ResponsysLinkedService.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/ResponsysLinkedService.cs deleted file mode 100644 index a2b1685b..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/ResponsysLinkedService.cs +++ /dev/null @@ -1,97 +0,0 @@ -// - -#nullable disable - -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// Responsys linked service. - public partial class ResponsysLinkedService : DataFactoryLinkedServiceProperties - { - /// Initializes a new instance of ResponsysLinkedService. - /// The endpoint of the Responsys server. - /// The client ID associated with the Responsys application. Type: string (or Expression with resultType string). - /// or is null. - public ResponsysLinkedService(BinaryData endpoint, DataFactoryElement clientId) - { - Argument.AssertNotNull(endpoint, nameof(endpoint)); - Argument.AssertNotNull(clientId, nameof(clientId)); - - Endpoint = endpoint; - ClientId = clientId; - LinkedServiceType = "Responsys"; - } - - /// Initializes a new instance of ResponsysLinkedService. - /// Type of linked service. - /// The integration runtime reference. - /// Linked service description. - /// Parameters for linked service. - /// List of tags that can be used for describing the linked service. - /// Additional Properties. - /// The endpoint of the Responsys server. - /// The client ID associated with the Responsys application. Type: string (or Expression with resultType string). - /// The client secret associated with the Responsys application. Type: string (or Expression with resultType string). - /// Specifies whether the data source endpoints are encrypted using HTTPS. The default value is true. Type: boolean (or Expression with resultType boolean). - /// 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. Type: boolean (or Expression with resultType boolean). - /// Specifies whether to verify the identity of the server when connecting over SSL. The default value is true. Type: boolean (or Expression with resultType boolean). - /// The encrypted credential used for authentication. Credentials are encrypted using the integration runtime credential manager. Type: string. - internal ResponsysLinkedService(string linkedServiceType, IntegrationRuntimeReference connectVia, string description, IDictionary parameters, IList annotations, IDictionary> additionalProperties, BinaryData endpoint, DataFactoryElement clientId, DataFactorySecretBaseDefinition clientSecret, DataFactoryElement useEncryptedEndpoints, DataFactoryElement useHostVerification, DataFactoryElement usePeerVerification, string encryptedCredential) : base(linkedServiceType, connectVia, description, parameters, annotations, additionalProperties) - { - Endpoint = endpoint; - ClientId = clientId; - ClientSecret = clientSecret; - UseEncryptedEndpoints = useEncryptedEndpoints; - UseHostVerification = useHostVerification; - UsePeerVerification = usePeerVerification; - EncryptedCredential = encryptedCredential; - LinkedServiceType = linkedServiceType ?? "Responsys"; - } - - /// - /// The endpoint of the Responsys server. - /// - /// To assign an object to this property use . - /// - /// - /// To assign an already formated json string to this property use . - /// - /// - /// Examples: - /// - /// - /// BinaryData.FromObjectAsJson("foo") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromString("\"foo\"") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromObjectAsJson(new { key = "value" }) - /// Creates a payload of { "key": "value" }. - /// - /// - /// BinaryData.FromString("{\"key\": \"value\"}") - /// Creates a payload of { "key": "value" }. - /// - /// - /// - /// - public BinaryData Endpoint { get; set; } - /// The client ID associated with the Responsys application. Type: string (or Expression with resultType string). - public DataFactoryElement ClientId { get; set; } - /// The client secret associated with the Responsys application. Type: string (or Expression with resultType string). - public DataFactorySecretBaseDefinition ClientSecret { get; set; } - /// Specifies whether the data source endpoints are encrypted using HTTPS. The default value is true. Type: boolean (or Expression with resultType boolean). - public DataFactoryElement UseEncryptedEndpoints { get; set; } - /// 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. Type: boolean (or Expression with resultType boolean). - public DataFactoryElement UseHostVerification { get; set; } - /// Specifies whether to verify the identity of the server when connecting over SSL. The default value is true. Type: boolean (or Expression with resultType boolean). - public DataFactoryElement UsePeerVerification { get; set; } - /// The encrypted credential used for authentication. Credentials are encrypted using the integration runtime credential manager. Type: string. - public string EncryptedCredential { get; set; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/ResponsysObjectDataset.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/ResponsysObjectDataset.Serialization.cs deleted file mode 100644 index 4060afbc..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/ResponsysObjectDataset.Serialization.cs +++ /dev/null @@ -1,212 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class ResponsysObjectDataset : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - writer.WritePropertyName("type"u8); - writer.WriteStringValue(DatasetType); - if (Optional.IsDefined(Description)) - { - writer.WritePropertyName("description"u8); - writer.WriteStringValue(Description); - } - if (Optional.IsDefined(Structure)) - { - writer.WritePropertyName("structure"u8); - JsonSerializer.Serialize(writer, Structure); - } - if (Optional.IsDefined(Schema)) - { - writer.WritePropertyName("schema"u8); - JsonSerializer.Serialize(writer, Schema); - } - writer.WritePropertyName("linkedServiceName"u8); - JsonSerializer.Serialize(writer, LinkedServiceName); if (Optional.IsCollectionDefined(Parameters)) - { - writer.WritePropertyName("parameters"u8); - writer.WriteStartObject(); - foreach (var item in Parameters) - { - writer.WritePropertyName(item.Key); - writer.WriteObjectValue(item.Value); - } - writer.WriteEndObject(); - } - if (Optional.IsCollectionDefined(Annotations)) - { - writer.WritePropertyName("annotations"u8); - writer.WriteStartArray(); - foreach (var item in Annotations) - { - if (item == null) - { - writer.WriteNullValue(); - continue; - } -#if NET6_0_OR_GREATER - writer.WriteRawValue(item); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.ToString()).RootElement); -#endif - } - writer.WriteEndArray(); - } - if (Optional.IsDefined(Folder)) - { - writer.WritePropertyName("folder"u8); - writer.WriteObjectValue(Folder); - } - writer.WritePropertyName("typeProperties"u8); - writer.WriteStartObject(); - if (Optional.IsDefined(TableName)) - { - writer.WritePropertyName("tableName"u8); - JsonSerializer.Serialize(writer, TableName); - } - writer.WriteEndObject(); - foreach (var item in AdditionalProperties) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.Value.ToString()).RootElement); -#endif - } - writer.WriteEndObject(); - } - - internal static ResponsysObjectDataset DeserializeResponsysObjectDataset(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - string type = default; - Optional description = default; - Optional>> structure = default; - Optional>> schema = default; - DataFactoryLinkedServiceReference linkedServiceName = default; - Optional> parameters = default; - Optional> annotations = default; - Optional folder = default; - Optional> tableName = default; - IDictionary> additionalProperties = default; - Dictionary> additionalPropertiesDictionary = new Dictionary>(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("type"u8)) - { - type = property.Value.GetString(); - continue; - } - if (property.NameEquals("description"u8)) - { - description = property.Value.GetString(); - continue; - } - if (property.NameEquals("structure"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - structure = JsonSerializer.Deserialize>>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("schema"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - schema = JsonSerializer.Deserialize>>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("linkedServiceName"u8)) - { - linkedServiceName = JsonSerializer.Deserialize(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("parameters"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - Dictionary dictionary = new Dictionary(); - foreach (var property0 in property.Value.EnumerateObject()) - { - dictionary.Add(property0.Name, EntityParameterSpecification.DeserializeEntityParameterSpecification(property0.Value)); - } - parameters = dictionary; - continue; - } - if (property.NameEquals("annotations"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - if (item.ValueKind == JsonValueKind.Null) - { - array.Add(null); - } - else - { - array.Add(BinaryData.FromString(item.GetRawText())); - } - } - annotations = array; - continue; - } - if (property.NameEquals("folder"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - folder = DatasetFolder.DeserializeDatasetFolder(property.Value); - continue; - } - if (property.NameEquals("typeProperties"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - foreach (var property0 in property.Value.EnumerateObject()) - { - if (property0.NameEquals("tableName"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - tableName = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - } - continue; - } - additionalPropertiesDictionary.Add(property.Name, JsonSerializer.Deserialize>(property.Value.GetRawText())); - } - additionalProperties = additionalPropertiesDictionary; - return new ResponsysObjectDataset(type, description.Value, structure.Value, schema.Value, linkedServiceName, Optional.ToDictionary(parameters), Optional.ToList(annotations), folder.Value, additionalProperties, tableName.Value); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/ResponsysObjectDataset.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/ResponsysObjectDataset.cs deleted file mode 100644 index ba6c312c..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/ResponsysObjectDataset.cs +++ /dev/null @@ -1,43 +0,0 @@ -// - -#nullable disable - -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// Responsys dataset. - public partial class ResponsysObjectDataset : DataFactoryDatasetProperties - { - /// Initializes a new instance of ResponsysObjectDataset. - /// Linked service reference. - /// is null. - public ResponsysObjectDataset(DataFactoryLinkedServiceReference linkedServiceName) : base(linkedServiceName) - { - Argument.AssertNotNull(linkedServiceName, nameof(linkedServiceName)); - - DatasetType = "ResponsysObject"; - } - - /// Initializes a new instance of ResponsysObjectDataset. - /// Type of dataset. - /// Dataset description. - /// Columns that define the structure of the dataset. Type: array (or Expression with resultType array), itemType: DatasetDataElement. - /// Columns that define the physical type schema of the dataset. Type: array (or Expression with resultType array), itemType: DatasetSchemaDataElement. - /// Linked service reference. - /// Parameters for dataset. - /// List of tags that can be used for describing the Dataset. - /// The folder that this Dataset is in. If not specified, Dataset will appear at the root level. - /// Additional Properties. - /// The table name. Type: string (or Expression with resultType string). - internal ResponsysObjectDataset(string datasetType, string description, DataFactoryElement> structure, DataFactoryElement> schema, DataFactoryLinkedServiceReference linkedServiceName, IDictionary parameters, IList annotations, DatasetFolder folder, IDictionary> additionalProperties, DataFactoryElement tableName) : base(datasetType, description, structure, schema, linkedServiceName, parameters, annotations, folder, additionalProperties) - { - TableName = tableName; - DatasetType = datasetType ?? "ResponsysObject"; - } - - /// The table name. Type: string (or Expression with resultType string). - public DataFactoryElement TableName { get; set; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/ResponsysSource.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/ResponsysSource.Serialization.cs deleted file mode 100644 index e34bd807..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/ResponsysSource.Serialization.cs +++ /dev/null @@ -1,161 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class ResponsysSource : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - if (Optional.IsDefined(Query)) - { - writer.WritePropertyName("query"u8); - JsonSerializer.Serialize(writer, Query); - } - if (Optional.IsDefined(QueryTimeout)) - { - writer.WritePropertyName("queryTimeout"u8); - JsonSerializer.Serialize(writer, QueryTimeout); - } - if (Optional.IsDefined(AdditionalColumns)) - { - writer.WritePropertyName("additionalColumns"u8); -#if NET6_0_OR_GREATER - writer.WriteRawValue(AdditionalColumns); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(AdditionalColumns.ToString()).RootElement); -#endif - } - writer.WritePropertyName("type"u8); - writer.WriteStringValue(CopySourceType); - if (Optional.IsDefined(SourceRetryCount)) - { - writer.WritePropertyName("sourceRetryCount"u8); - JsonSerializer.Serialize(writer, SourceRetryCount); - } - if (Optional.IsDefined(SourceRetryWait)) - { - writer.WritePropertyName("sourceRetryWait"u8); - JsonSerializer.Serialize(writer, SourceRetryWait); - } - if (Optional.IsDefined(MaxConcurrentConnections)) - { - writer.WritePropertyName("maxConcurrentConnections"u8); - JsonSerializer.Serialize(writer, MaxConcurrentConnections); - } - if (Optional.IsDefined(DisableMetricsCollection)) - { - writer.WritePropertyName("disableMetricsCollection"u8); - JsonSerializer.Serialize(writer, DisableMetricsCollection); - } - foreach (var item in AdditionalProperties) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.Value.ToString()).RootElement); -#endif - } - writer.WriteEndObject(); - } - - internal static ResponsysSource DeserializeResponsysSource(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - Optional> query = default; - Optional> queryTimeout = default; - Optional additionalColumns = default; - string type = default; - Optional> sourceRetryCount = default; - Optional> sourceRetryWait = default; - Optional> maxConcurrentConnections = default; - Optional> disableMetricsCollection = default; - IDictionary> additionalProperties = default; - Dictionary> additionalPropertiesDictionary = new Dictionary>(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("query"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - query = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("queryTimeout"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - queryTimeout = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("additionalColumns"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - additionalColumns = BinaryData.FromString(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("type"u8)) - { - type = property.Value.GetString(); - continue; - } - if (property.NameEquals("sourceRetryCount"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - sourceRetryCount = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("sourceRetryWait"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - sourceRetryWait = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("maxConcurrentConnections"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - maxConcurrentConnections = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("disableMetricsCollection"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - disableMetricsCollection = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - additionalPropertiesDictionary.Add(property.Name, JsonSerializer.Deserialize>(property.Value.GetRawText())); - } - additionalProperties = additionalPropertiesDictionary; - return new ResponsysSource(type, sourceRetryCount.Value, sourceRetryWait.Value, maxConcurrentConnections.Value, disableMetricsCollection.Value, additionalProperties, queryTimeout.Value, additionalColumns.Value, query.Value); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/ResponsysSource.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/ResponsysSource.cs deleted file mode 100644 index ff4dd803..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/ResponsysSource.cs +++ /dev/null @@ -1,37 +0,0 @@ -// - -#nullable disable - -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// A copy activity Responsys source. - public partial class ResponsysSource : TabularSource - { - /// Initializes a new instance of ResponsysSource. - public ResponsysSource() - { - CopySourceType = "ResponsysSource"; - } - - /// Initializes a new instance of ResponsysSource. - /// Copy source type. - /// Source retry count. Type: integer (or Expression with resultType integer). - /// Source retry wait. Type: string (or Expression with resultType string), pattern: ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). - /// The maximum concurrent connection count for the source data store. Type: integer (or Expression with resultType integer). - /// If true, disable data store metrics collection. Default is false. Type: boolean (or Expression with resultType boolean). - /// Additional Properties. - /// 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). - /// A query to retrieve data from source. Type: string (or Expression with resultType string). - internal ResponsysSource(string copySourceType, DataFactoryElement sourceRetryCount, DataFactoryElement sourceRetryWait, DataFactoryElement maxConcurrentConnections, DataFactoryElement disableMetricsCollection, IDictionary> additionalProperties, DataFactoryElement queryTimeout, BinaryData additionalColumns, DataFactoryElement query) : base(copySourceType, sourceRetryCount, sourceRetryWait, maxConcurrentConnections, disableMetricsCollection, additionalProperties, queryTimeout, additionalColumns) - { - Query = query; - CopySourceType = copySourceType ?? "ResponsysSource"; - } - - /// A query to retrieve data from source. Type: string (or Expression with resultType string). - public DataFactoryElement Query { get; set; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/RestResourceDataset.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/RestResourceDataset.Serialization.cs deleted file mode 100644 index 1c85c392..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/RestResourceDataset.Serialization.cs +++ /dev/null @@ -1,326 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class RestResourceDataset : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - writer.WritePropertyName("type"u8); - writer.WriteStringValue(DatasetType); - if (Optional.IsDefined(Description)) - { - writer.WritePropertyName("description"u8); - writer.WriteStringValue(Description); - } - if (Optional.IsDefined(Structure)) - { - writer.WritePropertyName("structure"u8); - JsonSerializer.Serialize(writer, Structure); - } - if (Optional.IsDefined(Schema)) - { - writer.WritePropertyName("schema"u8); - JsonSerializer.Serialize(writer, Schema); - } - writer.WritePropertyName("linkedServiceName"u8); - JsonSerializer.Serialize(writer, LinkedServiceName); if (Optional.IsCollectionDefined(Parameters)) - { - writer.WritePropertyName("parameters"u8); - writer.WriteStartObject(); - foreach (var item in Parameters) - { - writer.WritePropertyName(item.Key); - writer.WriteObjectValue(item.Value); - } - writer.WriteEndObject(); - } - if (Optional.IsCollectionDefined(Annotations)) - { - writer.WritePropertyName("annotations"u8); - writer.WriteStartArray(); - foreach (var item in Annotations) - { - if (item == null) - { - writer.WriteNullValue(); - continue; - } -#if NET6_0_OR_GREATER - writer.WriteRawValue(item); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.ToString()).RootElement); -#endif - } - writer.WriteEndArray(); - } - if (Optional.IsDefined(Folder)) - { - writer.WritePropertyName("folder"u8); - writer.WriteObjectValue(Folder); - } - writer.WritePropertyName("typeProperties"u8); - writer.WriteStartObject(); - if (Optional.IsDefined(RelativeUri)) - { - writer.WritePropertyName("relativeUrl"u8); - JsonSerializer.Serialize(writer, RelativeUri); - } - if (Optional.IsDefined(RequestMethod)) - { - writer.WritePropertyName("requestMethod"u8); - JsonSerializer.Serialize(writer, RequestMethod); - } - if (Optional.IsDefined(RequestBody)) - { - writer.WritePropertyName("requestBody"u8); - JsonSerializer.Serialize(writer, RequestBody); - } - if (Optional.IsCollectionDefined(AdditionalHeaders)) - { - writer.WritePropertyName("additionalHeaders"u8); - writer.WriteStartObject(); - foreach (var item in AdditionalHeaders) - { - writer.WritePropertyName(item.Key); - if (item.Value == null) - { - writer.WriteNullValue(); - continue; - } -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.Value.ToString()).RootElement); -#endif - } - writer.WriteEndObject(); - } - if (Optional.IsCollectionDefined(PaginationRules)) - { - writer.WritePropertyName("paginationRules"u8); - writer.WriteStartObject(); - foreach (var item in PaginationRules) - { - writer.WritePropertyName(item.Key); - if (item.Value == null) - { - writer.WriteNullValue(); - continue; - } -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.Value.ToString()).RootElement); -#endif - } - writer.WriteEndObject(); - } - writer.WriteEndObject(); - foreach (var item in AdditionalProperties) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.Value.ToString()).RootElement); -#endif - } - writer.WriteEndObject(); - } - - internal static RestResourceDataset DeserializeRestResourceDataset(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - string type = default; - Optional description = default; - Optional>> structure = default; - Optional>> schema = default; - DataFactoryLinkedServiceReference linkedServiceName = default; - Optional> parameters = default; - Optional> annotations = default; - Optional folder = default; - Optional> relativeUrl = default; - Optional> requestMethod = default; - Optional> requestBody = default; - Optional>> additionalHeaders = default; - Optional>> paginationRules = default; - IDictionary> additionalProperties = default; - Dictionary> additionalPropertiesDictionary = new Dictionary>(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("type"u8)) - { - type = property.Value.GetString(); - continue; - } - if (property.NameEquals("description"u8)) - { - description = property.Value.GetString(); - continue; - } - if (property.NameEquals("structure"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - structure = JsonSerializer.Deserialize>>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("schema"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - schema = JsonSerializer.Deserialize>>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("linkedServiceName"u8)) - { - linkedServiceName = JsonSerializer.Deserialize(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("parameters"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - Dictionary dictionary = new Dictionary(); - foreach (var property0 in property.Value.EnumerateObject()) - { - dictionary.Add(property0.Name, EntityParameterSpecification.DeserializeEntityParameterSpecification(property0.Value)); - } - parameters = dictionary; - continue; - } - if (property.NameEquals("annotations"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - if (item.ValueKind == JsonValueKind.Null) - { - array.Add(null); - } - else - { - array.Add(BinaryData.FromString(item.GetRawText())); - } - } - annotations = array; - continue; - } - if (property.NameEquals("folder"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - folder = DatasetFolder.DeserializeDatasetFolder(property.Value); - continue; - } - if (property.NameEquals("typeProperties"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - foreach (var property0 in property.Value.EnumerateObject()) - { - if (property0.NameEquals("relativeUrl"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - relativeUrl = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("requestMethod"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - requestMethod = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("requestBody"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - requestBody = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("additionalHeaders"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - Dictionary> dictionary = new Dictionary>(); - foreach (var property1 in property0.Value.EnumerateObject()) - { - if (property1.Value.ValueKind == JsonValueKind.Null) - { - dictionary.Add(property1.Name, null); - } - else - { - dictionary.Add(property1.Name, JsonSerializer.Deserialize>(property1.Value.GetRawText())); - } - } - additionalHeaders = dictionary; - continue; - } - if (property0.NameEquals("paginationRules"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - Dictionary> dictionary = new Dictionary>(); - foreach (var property1 in property0.Value.EnumerateObject()) - { - if (property1.Value.ValueKind == JsonValueKind.Null) - { - dictionary.Add(property1.Name, null); - } - else - { - dictionary.Add(property1.Name, JsonSerializer.Deserialize>(property1.Value.GetRawText())); - } - } - paginationRules = dictionary; - continue; - } - } - continue; - } - additionalPropertiesDictionary.Add(property.Name, JsonSerializer.Deserialize>(property.Value.GetRawText())); - } - additionalProperties = additionalPropertiesDictionary; - return new RestResourceDataset(type, description.Value, structure.Value, schema.Value, linkedServiceName, Optional.ToDictionary(parameters), Optional.ToList(annotations), folder.Value, additionalProperties, relativeUrl.Value, requestMethod.Value, requestBody.Value, Optional.ToDictionary(additionalHeaders), Optional.ToDictionary(paginationRules)); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/RestResourceDataset.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/RestResourceDataset.cs deleted file mode 100644 index f82483d7..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/RestResourceDataset.cs +++ /dev/null @@ -1,119 +0,0 @@ -// - -#nullable disable - -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// A Rest service dataset. - public partial class RestResourceDataset : DataFactoryDatasetProperties - { - /// Initializes a new instance of RestResourceDataset. - /// Linked service reference. - /// is null. - public RestResourceDataset(DataFactoryLinkedServiceReference linkedServiceName) : base(linkedServiceName) - { - Argument.AssertNotNull(linkedServiceName, nameof(linkedServiceName)); - - AdditionalHeaders = new ChangeTrackingDictionary>(); - PaginationRules = new ChangeTrackingDictionary>(); - DatasetType = "RestResource"; - } - - /// Initializes a new instance of RestResourceDataset. - /// Type of dataset. - /// Dataset description. - /// Columns that define the structure of the dataset. Type: array (or Expression with resultType array), itemType: DatasetDataElement. - /// Columns that define the physical type schema of the dataset. Type: array (or Expression with resultType array), itemType: DatasetSchemaDataElement. - /// Linked service reference. - /// Parameters for dataset. - /// List of tags that can be used for describing the Dataset. - /// The folder that this Dataset is in. If not specified, Dataset will appear at the root level. - /// Additional Properties. - /// The relative URL to the resource that the RESTful API provides. Type: string (or Expression with resultType string). - /// The HTTP method used to call the RESTful API. The default is GET. Type: string (or Expression with resultType string). - /// The HTTP request body to the RESTful API if requestMethod is POST. Type: string (or Expression with resultType string). - /// The additional HTTP headers in the request to the RESTful API. - /// The pagination rules to compose next page requests. - internal RestResourceDataset(string datasetType, string description, DataFactoryElement> structure, DataFactoryElement> schema, DataFactoryLinkedServiceReference linkedServiceName, IDictionary parameters, IList annotations, DatasetFolder folder, IDictionary> additionalProperties, DataFactoryElement relativeUri, DataFactoryElement requestMethod, DataFactoryElement requestBody, IDictionary> additionalHeaders, IDictionary> paginationRules) : base(datasetType, description, structure, schema, linkedServiceName, parameters, annotations, folder, additionalProperties) - { - RelativeUri = relativeUri; - RequestMethod = requestMethod; - RequestBody = requestBody; - AdditionalHeaders = additionalHeaders; - PaginationRules = paginationRules; - DatasetType = datasetType ?? "RestResource"; - } - - /// The relative URL to the resource that the RESTful API provides. Type: string (or Expression with resultType string). - public DataFactoryElement RelativeUri { get; set; } - /// The HTTP method used to call the RESTful API. The default is GET. Type: string (or Expression with resultType string). - public DataFactoryElement RequestMethod { get; set; } - /// The HTTP request body to the RESTful API if requestMethod is POST. Type: string (or Expression with resultType string). - public DataFactoryElement RequestBody { get; set; } - /// - /// The additional HTTP headers in the request to the RESTful API. - /// - /// To assign an object to the value of this property use . - /// - /// - /// To assign an already formated json string to this property use . - /// - /// - /// Examples: - /// - /// - /// BinaryData.FromObjectAsJson("foo") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromString("\"foo\"") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromObjectAsJson(new { key = "value" }) - /// Creates a payload of { "key": "value" }. - /// - /// - /// BinaryData.FromString("{\"key\": \"value\"}") - /// Creates a payload of { "key": "value" }. - /// - /// - /// - /// - public IDictionary> AdditionalHeaders { get; } - /// - /// The pagination rules to compose next page requests. - /// - /// To assign an object to the value of this property use . - /// - /// - /// To assign an already formated json string to this property use . - /// - /// - /// Examples: - /// - /// - /// BinaryData.FromObjectAsJson("foo") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromString("\"foo\"") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromObjectAsJson(new { key = "value" }) - /// Creates a payload of { "key": "value" }. - /// - /// - /// BinaryData.FromString("{\"key\": \"value\"}") - /// Creates a payload of { "key": "value" }. - /// - /// - /// - /// - public IDictionary> PaginationRules { get; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/RestServiceAuthenticationType.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/RestServiceAuthenticationType.cs deleted file mode 100644 index 8456ad15..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/RestServiceAuthenticationType.cs +++ /dev/null @@ -1,56 +0,0 @@ -// - -#nullable disable - -using System.ComponentModel; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// Type of authentication used to connect to the REST service. - public readonly partial struct RestServiceAuthenticationType : IEquatable - { - private readonly string _value; - - /// Initializes a new instance of . - /// is null. - public RestServiceAuthenticationType(string value) - { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } - - private const string AnonymousValue = "Anonymous"; - private const string BasicValue = "Basic"; - private const string AadServicePrincipalValue = "AadServicePrincipal"; - private const string ManagedServiceIdentityValue = "ManagedServiceIdentity"; - private const string OAuth2ClientCredentialValue = "OAuth2ClientCredential"; - - /// Anonymous. - public static RestServiceAuthenticationType Anonymous { get; } = new RestServiceAuthenticationType(AnonymousValue); - /// Basic. - public static RestServiceAuthenticationType Basic { get; } = new RestServiceAuthenticationType(BasicValue); - /// AadServicePrincipal. - public static RestServiceAuthenticationType AadServicePrincipal { get; } = new RestServiceAuthenticationType(AadServicePrincipalValue); - /// ManagedServiceIdentity. - public static RestServiceAuthenticationType ManagedServiceIdentity { get; } = new RestServiceAuthenticationType(ManagedServiceIdentityValue); - /// OAuth2ClientCredential. - public static RestServiceAuthenticationType OAuth2ClientCredential { get; } = new RestServiceAuthenticationType(OAuth2ClientCredentialValue); - /// Determines if two values are the same. - public static bool operator ==(RestServiceAuthenticationType left, RestServiceAuthenticationType right) => left.Equals(right); - /// Determines if two values are not the same. - public static bool operator !=(RestServiceAuthenticationType left, RestServiceAuthenticationType right) => !left.Equals(right); - /// Converts a string to a . - public static implicit operator RestServiceAuthenticationType(string value) => new RestServiceAuthenticationType(value); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override bool Equals(object obj) => obj is RestServiceAuthenticationType other && Equals(other); - /// - public bool Equals(RestServiceAuthenticationType other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override int GetHashCode() => _value?.GetHashCode() ?? 0; - /// - public override string ToString() => _value; - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/RestServiceLinkedService.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/RestServiceLinkedService.Serialization.cs deleted file mode 100644 index c7d2b950..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/RestServiceLinkedService.Serialization.cs +++ /dev/null @@ -1,412 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class RestServiceLinkedService : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - writer.WritePropertyName("type"u8); - writer.WriteStringValue(LinkedServiceType); - if (Optional.IsDefined(ConnectVia)) - { - writer.WritePropertyName("connectVia"u8); - writer.WriteObjectValue(ConnectVia); - } - if (Optional.IsDefined(Description)) - { - writer.WritePropertyName("description"u8); - writer.WriteStringValue(Description); - } - if (Optional.IsCollectionDefined(Parameters)) - { - writer.WritePropertyName("parameters"u8); - writer.WriteStartObject(); - foreach (var item in Parameters) - { - writer.WritePropertyName(item.Key); - writer.WriteObjectValue(item.Value); - } - writer.WriteEndObject(); - } - if (Optional.IsCollectionDefined(Annotations)) - { - writer.WritePropertyName("annotations"u8); - writer.WriteStartArray(); - foreach (var item in Annotations) - { - if (item == null) - { - writer.WriteNullValue(); - continue; - } -#if NET6_0_OR_GREATER - writer.WriteRawValue(item); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.ToString()).RootElement); -#endif - } - writer.WriteEndArray(); - } - writer.WritePropertyName("typeProperties"u8); - writer.WriteStartObject(); - writer.WritePropertyName("url"u8); - JsonSerializer.Serialize(writer, Uri); - if (Optional.IsDefined(EnableServerCertificateValidation)) - { - writer.WritePropertyName("enableServerCertificateValidation"u8); - JsonSerializer.Serialize(writer, EnableServerCertificateValidation); - } - writer.WritePropertyName("authenticationType"u8); - writer.WriteStringValue(AuthenticationType.ToString()); - if (Optional.IsDefined(UserName)) - { - writer.WritePropertyName("userName"u8); - JsonSerializer.Serialize(writer, UserName); - } - if (Optional.IsDefined(Password)) - { - writer.WritePropertyName("password"u8); - JsonSerializer.Serialize(writer, Password); - } - if (Optional.IsDefined(AuthHeaders)) - { - writer.WritePropertyName("authHeaders"u8); - JsonSerializer.Serialize(writer, AuthHeaders); - } - if (Optional.IsDefined(ServicePrincipalId)) - { - writer.WritePropertyName("servicePrincipalId"u8); - JsonSerializer.Serialize(writer, ServicePrincipalId); - } - if (Optional.IsDefined(ServicePrincipalKey)) - { - writer.WritePropertyName("servicePrincipalKey"u8); - JsonSerializer.Serialize(writer, ServicePrincipalKey); - } - if (Optional.IsDefined(Tenant)) - { - writer.WritePropertyName("tenant"u8); - JsonSerializer.Serialize(writer, Tenant); - } - if (Optional.IsDefined(AzureCloudType)) - { - writer.WritePropertyName("azureCloudType"u8); - JsonSerializer.Serialize(writer, AzureCloudType); - } - if (Optional.IsDefined(AadResourceId)) - { - writer.WritePropertyName("aadResourceId"u8); - JsonSerializer.Serialize(writer, AadResourceId); - } - if (Optional.IsDefined(EncryptedCredential)) - { - writer.WritePropertyName("encryptedCredential"u8); - writer.WriteStringValue(EncryptedCredential); - } - if (Optional.IsDefined(Credential)) - { - writer.WritePropertyName("credential"u8); - writer.WriteObjectValue(Credential); - } - if (Optional.IsDefined(ClientId)) - { - writer.WritePropertyName("clientId"u8); - JsonSerializer.Serialize(writer, ClientId); - } - if (Optional.IsDefined(ClientSecret)) - { - writer.WritePropertyName("clientSecret"u8); - JsonSerializer.Serialize(writer, ClientSecret); - } - if (Optional.IsDefined(TokenEndpoint)) - { - writer.WritePropertyName("tokenEndpoint"u8); - JsonSerializer.Serialize(writer, TokenEndpoint); - } - if (Optional.IsDefined(Resource)) - { - writer.WritePropertyName("resource"u8); - JsonSerializer.Serialize(writer, Resource); - } - if (Optional.IsDefined(Scope)) - { - writer.WritePropertyName("scope"u8); - JsonSerializer.Serialize(writer, Scope); - } - writer.WriteEndObject(); - foreach (var item in AdditionalProperties) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.Value.ToString()).RootElement); -#endif - } - writer.WriteEndObject(); - } - - internal static RestServiceLinkedService DeserializeRestServiceLinkedService(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - string type = default; - Optional connectVia = default; - Optional description = default; - Optional> parameters = default; - Optional> annotations = default; - DataFactoryElement url = default; - Optional> enableServerCertificateValidation = default; - RestServiceAuthenticationType authenticationType = default; - Optional> userName = default; - Optional password = default; - Optional> authHeaders = default; - Optional> servicePrincipalId = default; - Optional servicePrincipalKey = default; - Optional> tenant = default; - Optional> azureCloudType = default; - Optional> aadResourceId = default; - Optional encryptedCredential = default; - Optional credential = default; - Optional> clientId = default; - Optional clientSecret = default; - Optional> tokenEndpoint = default; - Optional> resource = default; - Optional> scope = default; - IDictionary> additionalProperties = default; - Dictionary> additionalPropertiesDictionary = new Dictionary>(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("type"u8)) - { - type = property.Value.GetString(); - continue; - } - if (property.NameEquals("connectVia"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - connectVia = IntegrationRuntimeReference.DeserializeIntegrationRuntimeReference(property.Value); - continue; - } - if (property.NameEquals("description"u8)) - { - description = property.Value.GetString(); - continue; - } - if (property.NameEquals("parameters"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - Dictionary dictionary = new Dictionary(); - foreach (var property0 in property.Value.EnumerateObject()) - { - dictionary.Add(property0.Name, EntityParameterSpecification.DeserializeEntityParameterSpecification(property0.Value)); - } - parameters = dictionary; - continue; - } - if (property.NameEquals("annotations"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - if (item.ValueKind == JsonValueKind.Null) - { - array.Add(null); - } - else - { - array.Add(BinaryData.FromString(item.GetRawText())); - } - } - annotations = array; - continue; - } - if (property.NameEquals("typeProperties"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - foreach (var property0 in property.Value.EnumerateObject()) - { - if (property0.NameEquals("url"u8)) - { - url = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("enableServerCertificateValidation"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - enableServerCertificateValidation = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("authenticationType"u8)) - { - authenticationType = new RestServiceAuthenticationType(property0.Value.GetString()); - continue; - } - if (property0.NameEquals("userName"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - userName = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("password"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - password = JsonSerializer.Deserialize(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("authHeaders"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - authHeaders = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("servicePrincipalId"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - servicePrincipalId = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("servicePrincipalKey"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - servicePrincipalKey = JsonSerializer.Deserialize(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("tenant"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - tenant = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("azureCloudType"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - azureCloudType = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("aadResourceId"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - aadResourceId = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("encryptedCredential"u8)) - { - encryptedCredential = property0.Value.GetString(); - continue; - } - if (property0.NameEquals("credential"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - credential = DataFactoryCredentialReference.DeserializeDataFactoryCredentialReference(property0.Value); - continue; - } - if (property0.NameEquals("clientId"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - clientId = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("clientSecret"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - clientSecret = JsonSerializer.Deserialize(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("tokenEndpoint"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - tokenEndpoint = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("resource"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - resource = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("scope"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - scope = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - } - continue; - } - additionalPropertiesDictionary.Add(property.Name, JsonSerializer.Deserialize>(property.Value.GetRawText())); - } - additionalProperties = additionalPropertiesDictionary; - return new RestServiceLinkedService(type, connectVia.Value, description.Value, Optional.ToDictionary(parameters), Optional.ToList(annotations), additionalProperties, url, enableServerCertificateValidation.Value, authenticationType, userName.Value, password, authHeaders.Value, servicePrincipalId.Value, servicePrincipalKey, tenant.Value, azureCloudType.Value, aadResourceId.Value, encryptedCredential.Value, credential.Value, clientId.Value, clientSecret, tokenEndpoint.Value, resource.Value, scope.Value); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/RestServiceLinkedService.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/RestServiceLinkedService.cs deleted file mode 100644 index 6147f80e..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/RestServiceLinkedService.cs +++ /dev/null @@ -1,111 +0,0 @@ -// - -#nullable disable - -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// Rest Service linked service. - public partial class RestServiceLinkedService : DataFactoryLinkedServiceProperties - { - /// Initializes a new instance of RestServiceLinkedService. - /// The base URL of the REST service. Type: string (or Expression with resultType string). - /// Type of authentication used to connect to the REST service. - /// is null. - public RestServiceLinkedService(DataFactoryElement uri, RestServiceAuthenticationType authenticationType) - { - Argument.AssertNotNull(uri, nameof(uri)); - - Uri = uri; - AuthenticationType = authenticationType; - LinkedServiceType = "RestService"; - } - - /// Initializes a new instance of RestServiceLinkedService. - /// Type of linked service. - /// The integration runtime reference. - /// Linked service description. - /// Parameters for linked service. - /// List of tags that can be used for describing the linked service. - /// Additional Properties. - /// The base URL of the REST service. Type: string (or Expression with resultType string). - /// Whether to validate server side SSL certificate when connecting to the endpoint.The default value is true. Type: boolean (or Expression with resultType boolean). - /// Type of authentication used to connect to the REST service. - /// The user name used in Basic authentication type. Type: string (or Expression with resultType string). - /// The password used in Basic authentication type. - /// The additional HTTP headers in the request to RESTful API used for authorization. Type: object (or Expression with resultType object). - /// The application's client ID used in AadServicePrincipal authentication type. Type: string (or Expression with resultType string). - /// The application's key used in AadServicePrincipal authentication type. - /// The tenant information (domain name or tenant ID) used in AadServicePrincipal authentication type under which your application resides. Type: string (or Expression with resultType string). - /// Indicates the azure cloud type of the service principle auth. Allowed values are AzurePublic, AzureChina, AzureUsGovernment, AzureGermany. Default value is the data factory regions’ cloud type. Type: string (or Expression with resultType string). - /// The resource you are requesting authorization to use. Type: string (or Expression with resultType string). - /// The encrypted credential used for authentication. Credentials are encrypted using the integration runtime credential manager. Type: string. - /// The credential reference containing authentication information. - /// The client ID associated with your application. Type: string (or Expression with resultType string). - /// The client secret associated with your application. - /// The token endpoint of the authorization server to acquire access token. Type: string (or Expression with resultType string). - /// The target service or resource to which the access will be requested. Type: string (or Expression with resultType string). - /// The scope of the access required. It describes what kind of access will be requested. Type: string (or Expression with resultType string). - internal RestServiceLinkedService(string linkedServiceType, IntegrationRuntimeReference connectVia, string description, IDictionary parameters, IList annotations, IDictionary> additionalProperties, DataFactoryElement uri, DataFactoryElement enableServerCertificateValidation, RestServiceAuthenticationType authenticationType, DataFactoryElement userName, DataFactorySecretBaseDefinition password, DataFactoryElement authHeaders, DataFactoryElement servicePrincipalId, DataFactorySecretBaseDefinition servicePrincipalKey, DataFactoryElement tenant, DataFactoryElement azureCloudType, DataFactoryElement aadResourceId, string encryptedCredential, DataFactoryCredentialReference credential, DataFactoryElement clientId, DataFactorySecretBaseDefinition clientSecret, DataFactoryElement tokenEndpoint, DataFactoryElement resource, DataFactoryElement scope) : base(linkedServiceType, connectVia, description, parameters, annotations, additionalProperties) - { - Uri = uri; - EnableServerCertificateValidation = enableServerCertificateValidation; - AuthenticationType = authenticationType; - UserName = userName; - Password = password; - AuthHeaders = authHeaders; - ServicePrincipalId = servicePrincipalId; - ServicePrincipalKey = servicePrincipalKey; - Tenant = tenant; - AzureCloudType = azureCloudType; - AadResourceId = aadResourceId; - EncryptedCredential = encryptedCredential; - Credential = credential; - ClientId = clientId; - ClientSecret = clientSecret; - TokenEndpoint = tokenEndpoint; - Resource = resource; - Scope = scope; - LinkedServiceType = linkedServiceType ?? "RestService"; - } - - /// The base URL of the REST service. Type: string (or Expression with resultType string). - public DataFactoryElement Uri { get; set; } - /// Whether to validate server side SSL certificate when connecting to the endpoint.The default value is true. Type: boolean (or Expression with resultType boolean). - public DataFactoryElement EnableServerCertificateValidation { get; set; } - /// Type of authentication used to connect to the REST service. - public RestServiceAuthenticationType AuthenticationType { get; set; } - /// The user name used in Basic authentication type. Type: string (or Expression with resultType string). - public DataFactoryElement UserName { get; set; } - /// The password used in Basic authentication type. - public DataFactorySecretBaseDefinition Password { get; set; } - /// The additional HTTP headers in the request to RESTful API used for authorization. Type: object (or Expression with resultType object). - public DataFactoryElement AuthHeaders { get; set; } - /// The application's client ID used in AadServicePrincipal authentication type. Type: string (or Expression with resultType string). - public DataFactoryElement ServicePrincipalId { get; set; } - /// The application's key used in AadServicePrincipal authentication type. - public DataFactorySecretBaseDefinition ServicePrincipalKey { get; set; } - /// The tenant information (domain name or tenant ID) used in AadServicePrincipal authentication type under which your application resides. Type: string (or Expression with resultType string). - public DataFactoryElement Tenant { get; set; } - /// Indicates the azure cloud type of the service principle auth. Allowed values are AzurePublic, AzureChina, AzureUsGovernment, AzureGermany. Default value is the data factory regions’ cloud type. Type: string (or Expression with resultType string). - public DataFactoryElement AzureCloudType { get; set; } - /// The resource you are requesting authorization to use. Type: string (or Expression with resultType string). - public DataFactoryElement AadResourceId { get; set; } - /// The encrypted credential used for authentication. Credentials are encrypted using the integration runtime credential manager. Type: string. - public string EncryptedCredential { get; set; } - /// The credential reference containing authentication information. - public DataFactoryCredentialReference Credential { get; set; } - /// The client ID associated with your application. Type: string (or Expression with resultType string). - public DataFactoryElement ClientId { get; set; } - /// The client secret associated with your application. - public DataFactorySecretBaseDefinition ClientSecret { get; set; } - /// The token endpoint of the authorization server to acquire access token. Type: string (or Expression with resultType string). - public DataFactoryElement TokenEndpoint { get; set; } - /// The target service or resource to which the access will be requested. Type: string (or Expression with resultType string). - public DataFactoryElement Resource { get; set; } - /// The scope of the access required. It describes what kind of access will be requested. Type: string (or Expression with resultType string). - public DataFactoryElement Scope { get; set; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/RestSink.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/RestSink.Serialization.cs deleted file mode 100644 index f7a5954b..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/RestSink.Serialization.cs +++ /dev/null @@ -1,225 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class RestSink : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - if (Optional.IsDefined(RequestMethod)) - { - writer.WritePropertyName("requestMethod"u8); - JsonSerializer.Serialize(writer, RequestMethod); - } - if (Optional.IsDefined(AdditionalHeaders)) - { - writer.WritePropertyName("additionalHeaders"u8); - JsonSerializer.Serialize(writer, AdditionalHeaders); - } - if (Optional.IsDefined(HttpRequestTimeout)) - { - writer.WritePropertyName("httpRequestTimeout"u8); - JsonSerializer.Serialize(writer, HttpRequestTimeout); - } - if (Optional.IsDefined(RequestInterval)) - { - writer.WritePropertyName("requestInterval"u8); -#if NET6_0_OR_GREATER - writer.WriteRawValue(RequestInterval); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(RequestInterval.ToString()).RootElement); -#endif - } - if (Optional.IsDefined(HttpCompressionType)) - { - writer.WritePropertyName("httpCompressionType"u8); -#if NET6_0_OR_GREATER - writer.WriteRawValue(HttpCompressionType); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(HttpCompressionType.ToString()).RootElement); -#endif - } - writer.WritePropertyName("type"u8); - writer.WriteStringValue(CopySinkType); - if (Optional.IsDefined(WriteBatchSize)) - { - writer.WritePropertyName("writeBatchSize"u8); - JsonSerializer.Serialize(writer, WriteBatchSize); - } - if (Optional.IsDefined(WriteBatchTimeout)) - { - writer.WritePropertyName("writeBatchTimeout"u8); - JsonSerializer.Serialize(writer, WriteBatchTimeout); - } - if (Optional.IsDefined(SinkRetryCount)) - { - writer.WritePropertyName("sinkRetryCount"u8); - JsonSerializer.Serialize(writer, SinkRetryCount); - } - if (Optional.IsDefined(SinkRetryWait)) - { - writer.WritePropertyName("sinkRetryWait"u8); - JsonSerializer.Serialize(writer, SinkRetryWait); - } - if (Optional.IsDefined(MaxConcurrentConnections)) - { - writer.WritePropertyName("maxConcurrentConnections"u8); - JsonSerializer.Serialize(writer, MaxConcurrentConnections); - } - if (Optional.IsDefined(DisableMetricsCollection)) - { - writer.WritePropertyName("disableMetricsCollection"u8); - JsonSerializer.Serialize(writer, DisableMetricsCollection); - } - foreach (var item in AdditionalProperties) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.Value.ToString()).RootElement); -#endif - } - writer.WriteEndObject(); - } - - internal static RestSink DeserializeRestSink(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - Optional> requestMethod = default; - Optional> additionalHeaders = default; - Optional> httpRequestTimeout = default; - Optional requestInterval = default; - Optional httpCompressionType = default; - string type = default; - Optional> writeBatchSize = default; - Optional> writeBatchTimeout = default; - Optional> sinkRetryCount = default; - Optional> sinkRetryWait = default; - Optional> maxConcurrentConnections = default; - Optional> disableMetricsCollection = default; - IDictionary> additionalProperties = default; - Dictionary> additionalPropertiesDictionary = new Dictionary>(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("requestMethod"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - requestMethod = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("additionalHeaders"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - additionalHeaders = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("httpRequestTimeout"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - httpRequestTimeout = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("requestInterval"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - requestInterval = BinaryData.FromString(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("httpCompressionType"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - httpCompressionType = BinaryData.FromString(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("type"u8)) - { - type = property.Value.GetString(); - continue; - } - if (property.NameEquals("writeBatchSize"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - writeBatchSize = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("writeBatchTimeout"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - writeBatchTimeout = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("sinkRetryCount"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - sinkRetryCount = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("sinkRetryWait"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - sinkRetryWait = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("maxConcurrentConnections"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - maxConcurrentConnections = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("disableMetricsCollection"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - disableMetricsCollection = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - additionalPropertiesDictionary.Add(property.Name, JsonSerializer.Deserialize>(property.Value.GetRawText())); - } - additionalProperties = additionalPropertiesDictionary; - return new RestSink(type, writeBatchSize.Value, writeBatchTimeout.Value, sinkRetryCount.Value, sinkRetryWait.Value, maxConcurrentConnections.Value, disableMetricsCollection.Value, additionalProperties, requestMethod.Value, additionalHeaders.Value, httpRequestTimeout.Value, requestInterval.Value, httpCompressionType.Value); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/RestSink.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/RestSink.cs deleted file mode 100644 index 8ed33997..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/RestSink.cs +++ /dev/null @@ -1,111 +0,0 @@ -// - -#nullable disable - -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// A copy activity Rest service Sink. - public partial class RestSink : CopySink - { - /// Initializes a new instance of RestSink. - public RestSink() - { - CopySinkType = "RestSink"; - } - - /// Initializes a new instance of RestSink. - /// Copy sink type. - /// Write batch size. Type: integer (or Expression with resultType integer), minimum: 0. - /// Write batch timeout. Type: string (or Expression with resultType string), pattern: ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). - /// Sink retry count. Type: integer (or Expression with resultType integer). - /// Sink retry wait. Type: string (or Expression with resultType string), pattern: ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). - /// The maximum concurrent connection count for the sink data store. Type: integer (or Expression with resultType integer). - /// If true, disable data store metrics collection. Default is false. Type: boolean (or Expression with resultType boolean). - /// Additional Properties. - /// The HTTP method used to call the RESTful API. The default is POST. Type: string (or Expression with resultType string). - /// The additional HTTP headers in the request to the RESTful API. Type: string (or Expression with resultType string). - /// The timeout (TimeSpan) to get an HTTP response. It is the timeout to get a response, not the timeout to read response data. Default value: 00:01:40. Type: string (or Expression with resultType string), pattern: ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). - /// The time to await before sending next request, in milliseconds. - /// Http Compression Type to Send data in compressed format with Optimal Compression Level, Default is None. And The Only Supported option is Gzip. - internal RestSink(string copySinkType, DataFactoryElement writeBatchSize, DataFactoryElement writeBatchTimeout, DataFactoryElement sinkRetryCount, DataFactoryElement sinkRetryWait, DataFactoryElement maxConcurrentConnections, DataFactoryElement disableMetricsCollection, IDictionary> additionalProperties, DataFactoryElement requestMethod, DataFactoryElement additionalHeaders, DataFactoryElement httpRequestTimeout, BinaryData requestInterval, BinaryData httpCompressionType) : base(copySinkType, writeBatchSize, writeBatchTimeout, sinkRetryCount, sinkRetryWait, maxConcurrentConnections, disableMetricsCollection, additionalProperties) - { - RequestMethod = requestMethod; - AdditionalHeaders = additionalHeaders; - HttpRequestTimeout = httpRequestTimeout; - RequestInterval = requestInterval; - HttpCompressionType = httpCompressionType; - CopySinkType = copySinkType ?? "RestSink"; - } - - /// The HTTP method used to call the RESTful API. The default is POST. Type: string (or Expression with resultType string). - public DataFactoryElement RequestMethod { get; set; } - /// The additional HTTP headers in the request to the RESTful API. Type: string (or Expression with resultType string). - public DataFactoryElement AdditionalHeaders { get; set; } - /// The timeout (TimeSpan) to get an HTTP response. It is the timeout to get a response, not the timeout to read response data. Default value: 00:01:40. Type: string (or Expression with resultType string), pattern: ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). - public DataFactoryElement HttpRequestTimeout { get; set; } - /// - /// The time to await before sending next request, in milliseconds - /// - /// To assign an object to this property use . - /// - /// - /// To assign an already formated json string to this property use . - /// - /// - /// Examples: - /// - /// - /// BinaryData.FromObjectAsJson("foo") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromString("\"foo\"") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromObjectAsJson(new { key = "value" }) - /// Creates a payload of { "key": "value" }. - /// - /// - /// BinaryData.FromString("{\"key\": \"value\"}") - /// Creates a payload of { "key": "value" }. - /// - /// - /// - /// - public BinaryData RequestInterval { get; set; } - /// - /// Http Compression Type to Send data in compressed format with Optimal Compression Level, Default is None. And The Only Supported option is Gzip. - /// - /// To assign an object to this property use . - /// - /// - /// To assign an already formated json string to this property use . - /// - /// - /// Examples: - /// - /// - /// BinaryData.FromObjectAsJson("foo") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromString("\"foo\"") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromObjectAsJson(new { key = "value" }) - /// Creates a payload of { "key": "value" }. - /// - /// - /// BinaryData.FromString("{\"key\": \"value\"}") - /// Creates a payload of { "key": "value" }. - /// - /// - /// - /// - public BinaryData HttpCompressionType { get; set; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/RestSource.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/RestSource.Serialization.cs deleted file mode 100644 index d6ae6312..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/RestSource.Serialization.cs +++ /dev/null @@ -1,225 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class RestSource : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - if (Optional.IsDefined(RequestMethod)) - { - writer.WritePropertyName("requestMethod"u8); - JsonSerializer.Serialize(writer, RequestMethod); - } - if (Optional.IsDefined(RequestBody)) - { - writer.WritePropertyName("requestBody"u8); - JsonSerializer.Serialize(writer, RequestBody); - } - if (Optional.IsDefined(AdditionalHeaders)) - { - writer.WritePropertyName("additionalHeaders"u8); - JsonSerializer.Serialize(writer, AdditionalHeaders); - } - if (Optional.IsDefined(PaginationRules)) - { - writer.WritePropertyName("paginationRules"u8); - JsonSerializer.Serialize(writer, PaginationRules); - } - if (Optional.IsDefined(HttpRequestTimeout)) - { - writer.WritePropertyName("httpRequestTimeout"u8); - JsonSerializer.Serialize(writer, HttpRequestTimeout); - } - if (Optional.IsDefined(RequestInterval)) - { - writer.WritePropertyName("requestInterval"u8); -#if NET6_0_OR_GREATER - writer.WriteRawValue(RequestInterval); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(RequestInterval.ToString()).RootElement); -#endif - } - if (Optional.IsDefined(AdditionalColumns)) - { - writer.WritePropertyName("additionalColumns"u8); -#if NET6_0_OR_GREATER - writer.WriteRawValue(AdditionalColumns); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(AdditionalColumns.ToString()).RootElement); -#endif - } - writer.WritePropertyName("type"u8); - writer.WriteStringValue(CopySourceType); - if (Optional.IsDefined(SourceRetryCount)) - { - writer.WritePropertyName("sourceRetryCount"u8); - JsonSerializer.Serialize(writer, SourceRetryCount); - } - if (Optional.IsDefined(SourceRetryWait)) - { - writer.WritePropertyName("sourceRetryWait"u8); - JsonSerializer.Serialize(writer, SourceRetryWait); - } - if (Optional.IsDefined(MaxConcurrentConnections)) - { - writer.WritePropertyName("maxConcurrentConnections"u8); - JsonSerializer.Serialize(writer, MaxConcurrentConnections); - } - if (Optional.IsDefined(DisableMetricsCollection)) - { - writer.WritePropertyName("disableMetricsCollection"u8); - JsonSerializer.Serialize(writer, DisableMetricsCollection); - } - foreach (var item in AdditionalProperties) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.Value.ToString()).RootElement); -#endif - } - writer.WriteEndObject(); - } - - internal static RestSource DeserializeRestSource(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - Optional> requestMethod = default; - Optional> requestBody = default; - Optional> additionalHeaders = default; - Optional> paginationRules = default; - Optional> httpRequestTimeout = default; - Optional requestInterval = default; - Optional additionalColumns = default; - string type = default; - Optional> sourceRetryCount = default; - Optional> sourceRetryWait = default; - Optional> maxConcurrentConnections = default; - Optional> disableMetricsCollection = default; - IDictionary> additionalProperties = default; - Dictionary> additionalPropertiesDictionary = new Dictionary>(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("requestMethod"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - requestMethod = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("requestBody"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - requestBody = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("additionalHeaders"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - additionalHeaders = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("paginationRules"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - paginationRules = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("httpRequestTimeout"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - httpRequestTimeout = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("requestInterval"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - requestInterval = BinaryData.FromString(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("additionalColumns"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - additionalColumns = BinaryData.FromString(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("type"u8)) - { - type = property.Value.GetString(); - continue; - } - if (property.NameEquals("sourceRetryCount"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - sourceRetryCount = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("sourceRetryWait"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - sourceRetryWait = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("maxConcurrentConnections"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - maxConcurrentConnections = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("disableMetricsCollection"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - disableMetricsCollection = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - additionalPropertiesDictionary.Add(property.Name, JsonSerializer.Deserialize>(property.Value.GetRawText())); - } - additionalProperties = additionalPropertiesDictionary; - return new RestSource(type, sourceRetryCount.Value, sourceRetryWait.Value, maxConcurrentConnections.Value, disableMetricsCollection.Value, additionalProperties, requestMethod.Value, requestBody.Value, additionalHeaders.Value, paginationRules.Value, httpRequestTimeout.Value, requestInterval.Value, additionalColumns.Value); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/RestSource.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/RestSource.cs deleted file mode 100644 index 287f3200..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/RestSource.cs +++ /dev/null @@ -1,117 +0,0 @@ -// - -#nullable disable - -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// A copy activity Rest service source. - public partial class RestSource : CopyActivitySource - { - /// Initializes a new instance of RestSource. - public RestSource() - { - CopySourceType = "RestSource"; - } - - /// Initializes a new instance of RestSource. - /// Copy source type. - /// Source retry count. Type: integer (or Expression with resultType integer). - /// Source retry wait. Type: string (or Expression with resultType string), pattern: ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). - /// The maximum concurrent connection count for the source data store. Type: integer (or Expression with resultType integer). - /// If true, disable data store metrics collection. Default is false. Type: boolean (or Expression with resultType boolean). - /// Additional Properties. - /// The HTTP method used to call the RESTful API. The default is GET. Type: string (or Expression with resultType string). - /// The HTTP request body to the RESTful API if requestMethod is POST. Type: string (or Expression with resultType string). - /// The additional HTTP headers in the request to the RESTful API. Type: string (or Expression with resultType string). - /// The pagination rules to compose next page requests. Type: string (or Expression with resultType string). - /// The timeout (TimeSpan) to get an HTTP response. It is the timeout to get a response, not the timeout to read response data. Default value: 00:01:40. Type: string (or Expression with resultType string), pattern: ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). - /// The time to await before sending next page request. - /// Specifies the additional columns to be added to source data. Type: array of objects(AdditionalColumns) (or Expression with resultType array of objects). - internal RestSource(string copySourceType, DataFactoryElement sourceRetryCount, DataFactoryElement sourceRetryWait, DataFactoryElement maxConcurrentConnections, DataFactoryElement disableMetricsCollection, IDictionary> additionalProperties, DataFactoryElement requestMethod, DataFactoryElement requestBody, DataFactoryElement additionalHeaders, DataFactoryElement paginationRules, DataFactoryElement httpRequestTimeout, BinaryData requestInterval, BinaryData additionalColumns) : base(copySourceType, sourceRetryCount, sourceRetryWait, maxConcurrentConnections, disableMetricsCollection, additionalProperties) - { - RequestMethod = requestMethod; - RequestBody = requestBody; - AdditionalHeaders = additionalHeaders; - PaginationRules = paginationRules; - HttpRequestTimeout = httpRequestTimeout; - RequestInterval = requestInterval; - AdditionalColumns = additionalColumns; - CopySourceType = copySourceType ?? "RestSource"; - } - - /// The HTTP method used to call the RESTful API. The default is GET. Type: string (or Expression with resultType string). - public DataFactoryElement RequestMethod { get; set; } - /// The HTTP request body to the RESTful API if requestMethod is POST. Type: string (or Expression with resultType string). - public DataFactoryElement RequestBody { get; set; } - /// The additional HTTP headers in the request to the RESTful API. Type: string (or Expression with resultType string). - public DataFactoryElement AdditionalHeaders { get; set; } - /// The pagination rules to compose next page requests. Type: string (or Expression with resultType string). - public DataFactoryElement PaginationRules { get; set; } - /// The timeout (TimeSpan) to get an HTTP response. It is the timeout to get a response, not the timeout to read response data. Default value: 00:01:40. Type: string (or Expression with resultType string), pattern: ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). - public DataFactoryElement HttpRequestTimeout { get; set; } - /// - /// The time to await before sending next page request. - /// - /// To assign an object to this property use . - /// - /// - /// To assign an already formated json string to this property use . - /// - /// - /// Examples: - /// - /// - /// BinaryData.FromObjectAsJson("foo") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromString("\"foo\"") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromObjectAsJson(new { key = "value" }) - /// Creates a payload of { "key": "value" }. - /// - /// - /// BinaryData.FromString("{\"key\": \"value\"}") - /// Creates a payload of { "key": "value" }. - /// - /// - /// - /// - public BinaryData RequestInterval { get; set; } - /// - /// Specifies the additional columns to be added to source data. Type: array of objects(AdditionalColumns) (or Expression with resultType array of objects). - /// - /// To assign an object to this property use . - /// - /// - /// To assign an already formated json string to this property use . - /// - /// - /// Examples: - /// - /// - /// BinaryData.FromObjectAsJson("foo") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromString("\"foo\"") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromObjectAsJson(new { key = "value" }) - /// Creates a payload of { "key": "value" }. - /// - /// - /// BinaryData.FromString("{\"key\": \"value\"}") - /// Creates a payload of { "key": "value" }. - /// - /// - /// - /// - public BinaryData AdditionalColumns { get; set; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/RetryPolicy.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/RetryPolicy.Serialization.cs deleted file mode 100644 index cced8a15..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/RetryPolicy.Serialization.cs +++ /dev/null @@ -1,61 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class RetryPolicy : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - if (Optional.IsDefined(Count)) - { - writer.WritePropertyName("count"u8); - JsonSerializer.Serialize(writer, Count); - } - if (Optional.IsDefined(IntervalInSeconds)) - { - writer.WritePropertyName("intervalInSeconds"u8); - writer.WriteNumberValue(IntervalInSeconds.Value); - } - writer.WriteEndObject(); - } - - internal static RetryPolicy DeserializeRetryPolicy(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - Optional> count = default; - Optional intervalInSeconds = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("count"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - count = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("intervalInSeconds"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - intervalInSeconds = property.Value.GetInt32(); - continue; - } - } - return new RetryPolicy(count.Value, Optional.ToNullable(intervalInSeconds)); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/RetryPolicy.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/RetryPolicy.cs deleted file mode 100644 index 4cf1dbfd..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/RetryPolicy.cs +++ /dev/null @@ -1,31 +0,0 @@ -// - -#nullable disable - -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// Execution policy for an activity. - public partial class RetryPolicy - { - /// Initializes a new instance of RetryPolicy. - public RetryPolicy() - { - } - - /// Initializes a new instance of RetryPolicy. - /// Maximum ordinary retry attempts. Default is 0. Type: integer (or Expression with resultType integer), minimum: 0. - /// Interval between retries in seconds. Default is 30. - internal RetryPolicy(DataFactoryElement count, int? intervalInSeconds) - { - Count = count; - IntervalInSeconds = intervalInSeconds; - } - - /// Maximum ordinary retry attempts. Default is 0. Type: integer (or Expression with resultType integer), minimum: 0. - public DataFactoryElement Count { get; set; } - /// Interval between retries in seconds. Default is 30. - public int? IntervalInSeconds { get; set; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/RunFilterContent.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/RunFilterContent.Serialization.cs deleted file mode 100644 index 21d733cb..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/RunFilterContent.Serialization.cs +++ /dev/null @@ -1,47 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class RunFilterContent : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - if (Optional.IsDefined(ContinuationToken)) - { - writer.WritePropertyName("continuationToken"u8); - writer.WriteStringValue(ContinuationToken); - } - writer.WritePropertyName("lastUpdatedAfter"u8); - writer.WriteStringValue(LastUpdatedAfter, "O"); - writer.WritePropertyName("lastUpdatedBefore"u8); - writer.WriteStringValue(LastUpdatedBefore, "O"); - if (Optional.IsCollectionDefined(Filters)) - { - writer.WritePropertyName("filters"u8); - writer.WriteStartArray(); - foreach (var item in Filters) - { - writer.WriteObjectValue(item); - } - writer.WriteEndArray(); - } - if (Optional.IsCollectionDefined(OrderBy)) - { - writer.WritePropertyName("orderBy"u8); - writer.WriteStartArray(); - foreach (var item in OrderBy) - { - writer.WriteObjectValue(item); - } - writer.WriteEndArray(); - } - writer.WriteEndObject(); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/RunFilterContent.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/RunFilterContent.cs deleted file mode 100644 index 933882d6..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/RunFilterContent.cs +++ /dev/null @@ -1,34 +0,0 @@ -// - -#nullable disable - -using Azure.Core; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// Query parameters for listing runs. - public partial class RunFilterContent - { - /// Initializes a new instance of RunFilterContent. - /// The time at or after which the run event was updated in 'ISO 8601' format. - /// The time at or before which the run event was updated in 'ISO 8601' format. - public RunFilterContent(DateTimeOffset lastUpdatedAfter, DateTimeOffset lastUpdatedBefore) - { - LastUpdatedAfter = lastUpdatedAfter; - LastUpdatedBefore = lastUpdatedBefore; - Filters = new ChangeTrackingList(); - OrderBy = new ChangeTrackingList(); - } - - /// The continuation token for getting the next page of results. Null for first page. - public string ContinuationToken { get; set; } - /// The time at or after which the run event was updated in 'ISO 8601' format. - public DateTimeOffset LastUpdatedAfter { get; } - /// The time at or before which the run event was updated in 'ISO 8601' format. - public DateTimeOffset LastUpdatedBefore { get; } - /// List of filters. - public IList Filters { get; } - /// List of OrderBy option. - public IList OrderBy { get; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/RunQueryFilter.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/RunQueryFilter.Serialization.cs deleted file mode 100644 index fea5dd45..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/RunQueryFilter.Serialization.cs +++ /dev/null @@ -1,29 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class RunQueryFilter : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - writer.WritePropertyName("operand"u8); - writer.WriteStringValue(Operand.ToString()); - writer.WritePropertyName("operator"u8); - writer.WriteStringValue(Operator.ToString()); - writer.WritePropertyName("values"u8); - writer.WriteStartArray(); - foreach (var item in Values) - { - writer.WriteStringValue(item); - } - writer.WriteEndArray(); - writer.WriteEndObject(); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/RunQueryFilter.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/RunQueryFilter.cs deleted file mode 100644 index 53bbdc22..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/RunQueryFilter.cs +++ /dev/null @@ -1,33 +0,0 @@ -// - -#nullable disable - -using Azure.Core; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// Query filter option for listing runs. - public partial class RunQueryFilter - { - /// Initializes a new instance of RunQueryFilter. - /// Parameter name to be used for filter. The allowed operands to query pipeline runs are PipelineName, RunStart, RunEnd and Status; to query activity runs are ActivityName, ActivityRunStart, ActivityRunEnd, ActivityType and Status, and to query trigger runs are TriggerName, TriggerRunTimestamp and Status. - /// Operator to be used for filter. - /// List of filter values. - /// is null. - public RunQueryFilter(RunQueryFilterOperand operand, RunQueryFilterOperator @operator, IEnumerable values) - { - Argument.AssertNotNull(values, nameof(values)); - - Operand = operand; - Operator = @operator; - Values = values.ToList(); - } - - /// Parameter name to be used for filter. The allowed operands to query pipeline runs are PipelineName, RunStart, RunEnd and Status; to query activity runs are ActivityName, ActivityRunStart, ActivityRunEnd, ActivityType and Status, and to query trigger runs are TriggerName, TriggerRunTimestamp and Status. - public RunQueryFilterOperand Operand { get; } - /// Operator to be used for filter. - public RunQueryFilterOperator Operator { get; } - /// List of filter values. - public IList Values { get; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/RunQueryFilterOperand.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/RunQueryFilterOperand.cs deleted file mode 100644 index 6bbf0f9f..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/RunQueryFilterOperand.cs +++ /dev/null @@ -1,77 +0,0 @@ -// - -#nullable disable - -using System.ComponentModel; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// Parameter name to be used for filter. The allowed operands to query pipeline runs are PipelineName, RunStart, RunEnd and Status; to query activity runs are ActivityName, ActivityRunStart, ActivityRunEnd, ActivityType and Status, and to query trigger runs are TriggerName, TriggerRunTimestamp and Status. - public readonly partial struct RunQueryFilterOperand : IEquatable - { - private readonly string _value; - - /// Initializes a new instance of . - /// is null. - public RunQueryFilterOperand(string value) - { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } - - private const string PipelineNameValue = "PipelineName"; - private const string StatusValue = "Status"; - private const string RunStartValue = "RunStart"; - private const string RunEndValue = "RunEnd"; - private const string ActivityNameValue = "ActivityName"; - private const string ActivityRunStartValue = "ActivityRunStart"; - private const string ActivityRunEndValue = "ActivityRunEnd"; - private const string ActivityTypeValue = "ActivityType"; - private const string TriggerNameValue = "TriggerName"; - private const string TriggerRunTimestampValue = "TriggerRunTimestamp"; - private const string RunGroupIdValue = "RunGroupId"; - private const string LatestOnlyValue = "LatestOnly"; - - /// PipelineName. - public static RunQueryFilterOperand PipelineName { get; } = new RunQueryFilterOperand(PipelineNameValue); - /// Status. - public static RunQueryFilterOperand Status { get; } = new RunQueryFilterOperand(StatusValue); - /// RunStart. - public static RunQueryFilterOperand RunStart { get; } = new RunQueryFilterOperand(RunStartValue); - /// RunEnd. - public static RunQueryFilterOperand RunEnd { get; } = new RunQueryFilterOperand(RunEndValue); - /// ActivityName. - public static RunQueryFilterOperand ActivityName { get; } = new RunQueryFilterOperand(ActivityNameValue); - /// ActivityRunStart. - public static RunQueryFilterOperand ActivityRunStart { get; } = new RunQueryFilterOperand(ActivityRunStartValue); - /// ActivityRunEnd. - public static RunQueryFilterOperand ActivityRunEnd { get; } = new RunQueryFilterOperand(ActivityRunEndValue); - /// ActivityType. - public static RunQueryFilterOperand ActivityType { get; } = new RunQueryFilterOperand(ActivityTypeValue); - /// TriggerName. - public static RunQueryFilterOperand TriggerName { get; } = new RunQueryFilterOperand(TriggerNameValue); - /// TriggerRunTimestamp. - public static RunQueryFilterOperand TriggerRunTimestamp { get; } = new RunQueryFilterOperand(TriggerRunTimestampValue); - /// RunGroupId. - public static RunQueryFilterOperand RunGroupId { get; } = new RunQueryFilterOperand(RunGroupIdValue); - /// LatestOnly. - public static RunQueryFilterOperand LatestOnly { get; } = new RunQueryFilterOperand(LatestOnlyValue); - /// Determines if two values are the same. - public static bool operator ==(RunQueryFilterOperand left, RunQueryFilterOperand right) => left.Equals(right); - /// Determines if two values are not the same. - public static bool operator !=(RunQueryFilterOperand left, RunQueryFilterOperand right) => !left.Equals(right); - /// Converts a string to a . - public static implicit operator RunQueryFilterOperand(string value) => new RunQueryFilterOperand(value); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override bool Equals(object obj) => obj is RunQueryFilterOperand other && Equals(other); - /// - public bool Equals(RunQueryFilterOperand other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override int GetHashCode() => _value?.GetHashCode() ?? 0; - /// - public override string ToString() => _value; - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/RunQueryFilterOperator.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/RunQueryFilterOperator.cs deleted file mode 100644 index 6860053c..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/RunQueryFilterOperator.cs +++ /dev/null @@ -1,53 +0,0 @@ -// - -#nullable disable - -using System.ComponentModel; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// Operator to be used for filter. - public readonly partial struct RunQueryFilterOperator : IEquatable - { - private readonly string _value; - - /// Initializes a new instance of . - /// is null. - public RunQueryFilterOperator(string value) - { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } - - private const string EqualsValueValue = "Equals"; - private const string NotEqualsValue = "NotEquals"; - private const string InValue = "In"; - private const string NotInValue = "NotIn"; - - /// Equals. - public static RunQueryFilterOperator EqualsValue { get; } = new RunQueryFilterOperator(EqualsValueValue); - /// NotEquals. - public static RunQueryFilterOperator NotEquals { get; } = new RunQueryFilterOperator(NotEqualsValue); - /// In. - public static RunQueryFilterOperator In { get; } = new RunQueryFilterOperator(InValue); - /// NotIn. - public static RunQueryFilterOperator NotIn { get; } = new RunQueryFilterOperator(NotInValue); - /// Determines if two values are the same. - public static bool operator ==(RunQueryFilterOperator left, RunQueryFilterOperator right) => left.Equals(right); - /// Determines if two values are not the same. - public static bool operator !=(RunQueryFilterOperator left, RunQueryFilterOperator right) => !left.Equals(right); - /// Converts a string to a . - public static implicit operator RunQueryFilterOperator(string value) => new RunQueryFilterOperator(value); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override bool Equals(object obj) => obj is RunQueryFilterOperator other && Equals(other); - /// - public bool Equals(RunQueryFilterOperator other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override int GetHashCode() => _value?.GetHashCode() ?? 0; - /// - public override string ToString() => _value; - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/RunQueryOrder.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/RunQueryOrder.cs deleted file mode 100644 index 8cfdb010..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/RunQueryOrder.cs +++ /dev/null @@ -1,47 +0,0 @@ -// - -#nullable disable - -using System.ComponentModel; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// Sorting order of the parameter. - public readonly partial struct RunQueryOrder : IEquatable - { - private readonly string _value; - - /// Initializes a new instance of . - /// is null. - public RunQueryOrder(string value) - { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } - - private const string AscValue = "ASC"; - private const string DescValue = "DESC"; - - /// ASC. - public static RunQueryOrder Asc { get; } = new RunQueryOrder(AscValue); - /// DESC. - public static RunQueryOrder Desc { get; } = new RunQueryOrder(DescValue); - /// Determines if two values are the same. - public static bool operator ==(RunQueryOrder left, RunQueryOrder right) => left.Equals(right); - /// Determines if two values are not the same. - public static bool operator !=(RunQueryOrder left, RunQueryOrder right) => !left.Equals(right); - /// Converts a string to a . - public static implicit operator RunQueryOrder(string value) => new RunQueryOrder(value); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override bool Equals(object obj) => obj is RunQueryOrder other && Equals(other); - /// - public bool Equals(RunQueryOrder other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override int GetHashCode() => _value?.GetHashCode() ?? 0; - /// - public override string ToString() => _value; - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/RunQueryOrderBy.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/RunQueryOrderBy.Serialization.cs deleted file mode 100644 index 184d7cef..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/RunQueryOrderBy.Serialization.cs +++ /dev/null @@ -1,22 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class RunQueryOrderBy : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - writer.WritePropertyName("orderBy"u8); - writer.WriteStringValue(OrderBy.ToString()); - writer.WritePropertyName("order"u8); - writer.WriteStringValue(Order.ToString()); - writer.WriteEndObject(); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/RunQueryOrderBy.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/RunQueryOrderBy.cs deleted file mode 100644 index 840b40c0..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/RunQueryOrderBy.cs +++ /dev/null @@ -1,24 +0,0 @@ -// - -#nullable disable - -namespace AzureDataFactory.TestingFramework.Models -{ - /// An object to provide order by options for listing runs. - public partial class RunQueryOrderBy - { - /// Initializes a new instance of RunQueryOrderBy. - /// Parameter name to be used for order by. The allowed parameters to order by for pipeline runs are PipelineName, RunStart, RunEnd and Status; for activity runs are ActivityName, ActivityRunStart, ActivityRunEnd and Status; for trigger runs are TriggerName, TriggerRunTimestamp and Status. - /// Sorting order of the parameter. - public RunQueryOrderBy(RunQueryOrderByField orderBy, RunQueryOrder order) - { - OrderBy = orderBy; - Order = order; - } - - /// Parameter name to be used for order by. The allowed parameters to order by for pipeline runs are PipelineName, RunStart, RunEnd and Status; for activity runs are ActivityName, ActivityRunStart, ActivityRunEnd and Status; for trigger runs are TriggerName, TriggerRunTimestamp and Status. - public RunQueryOrderByField OrderBy { get; } - /// Sorting order of the parameter. - public RunQueryOrder Order { get; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/RunQueryOrderByField.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/RunQueryOrderByField.cs deleted file mode 100644 index ea8e753d..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/RunQueryOrderByField.cs +++ /dev/null @@ -1,68 +0,0 @@ -// - -#nullable disable - -using System.ComponentModel; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// Parameter name to be used for order by. The allowed parameters to order by for pipeline runs are PipelineName, RunStart, RunEnd and Status; for activity runs are ActivityName, ActivityRunStart, ActivityRunEnd and Status; for trigger runs are TriggerName, TriggerRunTimestamp and Status. - public readonly partial struct RunQueryOrderByField : IEquatable - { - private readonly string _value; - - /// Initializes a new instance of . - /// is null. - public RunQueryOrderByField(string value) - { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } - - private const string RunStartValue = "RunStart"; - private const string RunEndValue = "RunEnd"; - private const string PipelineNameValue = "PipelineName"; - private const string StatusValue = "Status"; - private const string ActivityNameValue = "ActivityName"; - private const string ActivityRunStartValue = "ActivityRunStart"; - private const string ActivityRunEndValue = "ActivityRunEnd"; - private const string TriggerNameValue = "TriggerName"; - private const string TriggerRunTimestampValue = "TriggerRunTimestamp"; - - /// RunStart. - public static RunQueryOrderByField RunStart { get; } = new RunQueryOrderByField(RunStartValue); - /// RunEnd. - public static RunQueryOrderByField RunEnd { get; } = new RunQueryOrderByField(RunEndValue); - /// PipelineName. - public static RunQueryOrderByField PipelineName { get; } = new RunQueryOrderByField(PipelineNameValue); - /// Status. - public static RunQueryOrderByField Status { get; } = new RunQueryOrderByField(StatusValue); - /// ActivityName. - public static RunQueryOrderByField ActivityName { get; } = new RunQueryOrderByField(ActivityNameValue); - /// ActivityRunStart. - public static RunQueryOrderByField ActivityRunStart { get; } = new RunQueryOrderByField(ActivityRunStartValue); - /// ActivityRunEnd. - public static RunQueryOrderByField ActivityRunEnd { get; } = new RunQueryOrderByField(ActivityRunEndValue); - /// TriggerName. - public static RunQueryOrderByField TriggerName { get; } = new RunQueryOrderByField(TriggerNameValue); - /// TriggerRunTimestamp. - public static RunQueryOrderByField TriggerRunTimestamp { get; } = new RunQueryOrderByField(TriggerRunTimestampValue); - /// Determines if two values are the same. - public static bool operator ==(RunQueryOrderByField left, RunQueryOrderByField right) => left.Equals(right); - /// Determines if two values are not the same. - public static bool operator !=(RunQueryOrderByField left, RunQueryOrderByField right) => !left.Equals(right); - /// Converts a string to a . - public static implicit operator RunQueryOrderByField(string value) => new RunQueryOrderByField(value); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override bool Equals(object obj) => obj is RunQueryOrderByField other && Equals(other); - /// - public bool Equals(RunQueryOrderByField other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override int GetHashCode() => _value?.GetHashCode() ?? 0; - /// - public override string ToString() => _value; - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SalesforceLinkedService.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SalesforceLinkedService.Serialization.cs deleted file mode 100644 index e3079ead..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SalesforceLinkedService.Serialization.cs +++ /dev/null @@ -1,246 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class SalesforceLinkedService : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - writer.WritePropertyName("type"u8); - writer.WriteStringValue(LinkedServiceType); - if (Optional.IsDefined(ConnectVia)) - { - writer.WritePropertyName("connectVia"u8); - writer.WriteObjectValue(ConnectVia); - } - if (Optional.IsDefined(Description)) - { - writer.WritePropertyName("description"u8); - writer.WriteStringValue(Description); - } - if (Optional.IsCollectionDefined(Parameters)) - { - writer.WritePropertyName("parameters"u8); - writer.WriteStartObject(); - foreach (var item in Parameters) - { - writer.WritePropertyName(item.Key); - writer.WriteObjectValue(item.Value); - } - writer.WriteEndObject(); - } - if (Optional.IsCollectionDefined(Annotations)) - { - writer.WritePropertyName("annotations"u8); - writer.WriteStartArray(); - foreach (var item in Annotations) - { - if (item == null) - { - writer.WriteNullValue(); - continue; - } -#if NET6_0_OR_GREATER - writer.WriteRawValue(item); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.ToString()).RootElement); -#endif - } - writer.WriteEndArray(); - } - writer.WritePropertyName("typeProperties"u8); - writer.WriteStartObject(); - if (Optional.IsDefined(EnvironmentUri)) - { - writer.WritePropertyName("environmentUrl"u8); - JsonSerializer.Serialize(writer, EnvironmentUri); - } - if (Optional.IsDefined(Username)) - { - writer.WritePropertyName("username"u8); - JsonSerializer.Serialize(writer, Username); - } - if (Optional.IsDefined(Password)) - { - writer.WritePropertyName("password"u8); - JsonSerializer.Serialize(writer, Password); - } - if (Optional.IsDefined(SecurityToken)) - { - writer.WritePropertyName("securityToken"u8); - JsonSerializer.Serialize(writer, SecurityToken); - } - if (Optional.IsDefined(ApiVersion)) - { - writer.WritePropertyName("apiVersion"u8); - JsonSerializer.Serialize(writer, ApiVersion); - } - if (Optional.IsDefined(EncryptedCredential)) - { - writer.WritePropertyName("encryptedCredential"u8); - writer.WriteStringValue(EncryptedCredential); - } - writer.WriteEndObject(); - foreach (var item in AdditionalProperties) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.Value.ToString()).RootElement); -#endif - } - writer.WriteEndObject(); - } - - internal static SalesforceLinkedService DeserializeSalesforceLinkedService(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - string type = default; - Optional connectVia = default; - Optional description = default; - Optional> parameters = default; - Optional> annotations = default; - Optional> environmentUrl = default; - Optional> username = default; - Optional password = default; - Optional securityToken = default; - Optional> apiVersion = default; - Optional encryptedCredential = default; - IDictionary> additionalProperties = default; - Dictionary> additionalPropertiesDictionary = new Dictionary>(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("type"u8)) - { - type = property.Value.GetString(); - continue; - } - if (property.NameEquals("connectVia"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - connectVia = IntegrationRuntimeReference.DeserializeIntegrationRuntimeReference(property.Value); - continue; - } - if (property.NameEquals("description"u8)) - { - description = property.Value.GetString(); - continue; - } - if (property.NameEquals("parameters"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - Dictionary dictionary = new Dictionary(); - foreach (var property0 in property.Value.EnumerateObject()) - { - dictionary.Add(property0.Name, EntityParameterSpecification.DeserializeEntityParameterSpecification(property0.Value)); - } - parameters = dictionary; - continue; - } - if (property.NameEquals("annotations"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - if (item.ValueKind == JsonValueKind.Null) - { - array.Add(null); - } - else - { - array.Add(BinaryData.FromString(item.GetRawText())); - } - } - annotations = array; - continue; - } - if (property.NameEquals("typeProperties"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - foreach (var property0 in property.Value.EnumerateObject()) - { - if (property0.NameEquals("environmentUrl"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - environmentUrl = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("username"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - username = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("password"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - password = JsonSerializer.Deserialize(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("securityToken"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - securityToken = JsonSerializer.Deserialize(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("apiVersion"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - apiVersion = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("encryptedCredential"u8)) - { - encryptedCredential = property0.Value.GetString(); - continue; - } - } - continue; - } - additionalPropertiesDictionary.Add(property.Name, JsonSerializer.Deserialize>(property.Value.GetRawText())); - } - additionalProperties = additionalPropertiesDictionary; - return new SalesforceLinkedService(type, connectVia.Value, description.Value, Optional.ToDictionary(parameters), Optional.ToList(annotations), additionalProperties, environmentUrl.Value, username.Value, password, securityToken, apiVersion.Value, encryptedCredential.Value); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SalesforceLinkedService.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SalesforceLinkedService.cs deleted file mode 100644 index 91c2d5bc..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SalesforceLinkedService.cs +++ /dev/null @@ -1,55 +0,0 @@ -// - -#nullable disable - -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// Linked service for Salesforce. - public partial class SalesforceLinkedService : DataFactoryLinkedServiceProperties - { - /// Initializes a new instance of SalesforceLinkedService. - public SalesforceLinkedService() - { - LinkedServiceType = "Salesforce"; - } - - /// Initializes a new instance of SalesforceLinkedService. - /// Type of linked service. - /// The integration runtime reference. - /// Linked service description. - /// Parameters for linked service. - /// List of tags that can be used for describing the linked service. - /// Additional Properties. - /// The URL of Salesforce instance. Default is 'https://login.salesforce.com'. To copy data from sandbox, specify 'https://test.salesforce.com'. To copy data from custom domain, specify, for example, 'https://[domain].my.salesforce.com'. Type: string (or Expression with resultType string). - /// The username for Basic authentication of the Salesforce instance. Type: string (or Expression with resultType string). - /// The password for Basic authentication of the Salesforce instance. - /// The security token is optional to remotely access Salesforce instance. - /// The Salesforce API version used in ADF. Type: string (or Expression with resultType string). - /// The encrypted credential used for authentication. Credentials are encrypted using the integration runtime credential manager. Type: string. - internal SalesforceLinkedService(string linkedServiceType, IntegrationRuntimeReference connectVia, string description, IDictionary parameters, IList annotations, IDictionary> additionalProperties, DataFactoryElement environmentUri, DataFactoryElement username, DataFactorySecretBaseDefinition password, DataFactorySecretBaseDefinition securityToken, DataFactoryElement apiVersion, string encryptedCredential) : base(linkedServiceType, connectVia, description, parameters, annotations, additionalProperties) - { - EnvironmentUri = environmentUri; - Username = username; - Password = password; - SecurityToken = securityToken; - ApiVersion = apiVersion; - EncryptedCredential = encryptedCredential; - LinkedServiceType = linkedServiceType ?? "Salesforce"; - } - - /// The URL of Salesforce instance. Default is 'https://login.salesforce.com'. To copy data from sandbox, specify 'https://test.salesforce.com'. To copy data from custom domain, specify, for example, 'https://[domain].my.salesforce.com'. Type: string (or Expression with resultType string). - public DataFactoryElement EnvironmentUri { get; set; } - /// The username for Basic authentication of the Salesforce instance. Type: string (or Expression with resultType string). - public DataFactoryElement Username { get; set; } - /// The password for Basic authentication of the Salesforce instance. - public DataFactorySecretBaseDefinition Password { get; set; } - /// The security token is optional to remotely access Salesforce instance. - public DataFactorySecretBaseDefinition SecurityToken { get; set; } - /// The Salesforce API version used in ADF. Type: string (or Expression with resultType string). - public DataFactoryElement ApiVersion { get; set; } - /// The encrypted credential used for authentication. Credentials are encrypted using the integration runtime credential manager. Type: string. - public string EncryptedCredential { get; set; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SalesforceMarketingCloudLinkedService.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SalesforceMarketingCloudLinkedService.Serialization.cs deleted file mode 100644 index 1c90ebd6..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SalesforceMarketingCloudLinkedService.Serialization.cs +++ /dev/null @@ -1,265 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class SalesforceMarketingCloudLinkedService : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - writer.WritePropertyName("type"u8); - writer.WriteStringValue(LinkedServiceType); - if (Optional.IsDefined(ConnectVia)) - { - writer.WritePropertyName("connectVia"u8); - writer.WriteObjectValue(ConnectVia); - } - if (Optional.IsDefined(Description)) - { - writer.WritePropertyName("description"u8); - writer.WriteStringValue(Description); - } - if (Optional.IsCollectionDefined(Parameters)) - { - writer.WritePropertyName("parameters"u8); - writer.WriteStartObject(); - foreach (var item in Parameters) - { - writer.WritePropertyName(item.Key); - writer.WriteObjectValue(item.Value); - } - writer.WriteEndObject(); - } - if (Optional.IsCollectionDefined(Annotations)) - { - writer.WritePropertyName("annotations"u8); - writer.WriteStartArray(); - foreach (var item in Annotations) - { - if (item == null) - { - writer.WriteNullValue(); - continue; - } -#if NET6_0_OR_GREATER - writer.WriteRawValue(item); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.ToString()).RootElement); -#endif - } - writer.WriteEndArray(); - } - writer.WritePropertyName("typeProperties"u8); - writer.WriteStartObject(); - if (Optional.IsDefined(ConnectionProperties)) - { - writer.WritePropertyName("connectionProperties"u8); -#if NET6_0_OR_GREATER - writer.WriteRawValue(ConnectionProperties); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(ConnectionProperties.ToString()).RootElement); -#endif - } - if (Optional.IsDefined(ClientId)) - { - writer.WritePropertyName("clientId"u8); - JsonSerializer.Serialize(writer, ClientId); - } - if (Optional.IsDefined(ClientSecret)) - { - writer.WritePropertyName("clientSecret"u8); - JsonSerializer.Serialize(writer, ClientSecret); - } - if (Optional.IsDefined(UseEncryptedEndpoints)) - { - writer.WritePropertyName("useEncryptedEndpoints"u8); - JsonSerializer.Serialize(writer, UseEncryptedEndpoints); - } - if (Optional.IsDefined(UseHostVerification)) - { - writer.WritePropertyName("useHostVerification"u8); - JsonSerializer.Serialize(writer, UseHostVerification); - } - if (Optional.IsDefined(UsePeerVerification)) - { - writer.WritePropertyName("usePeerVerification"u8); - JsonSerializer.Serialize(writer, UsePeerVerification); - } - if (Optional.IsDefined(EncryptedCredential)) - { - writer.WritePropertyName("encryptedCredential"u8); - writer.WriteStringValue(EncryptedCredential); - } - writer.WriteEndObject(); - foreach (var item in AdditionalProperties) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.Value.ToString()).RootElement); -#endif - } - writer.WriteEndObject(); - } - - internal static SalesforceMarketingCloudLinkedService DeserializeSalesforceMarketingCloudLinkedService(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - string type = default; - Optional connectVia = default; - Optional description = default; - Optional> parameters = default; - Optional> annotations = default; - Optional connectionProperties = default; - Optional> clientId = default; - Optional clientSecret = default; - Optional> useEncryptedEndpoints = default; - Optional> useHostVerification = default; - Optional> usePeerVerification = default; - Optional encryptedCredential = default; - IDictionary> additionalProperties = default; - Dictionary> additionalPropertiesDictionary = new Dictionary>(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("type"u8)) - { - type = property.Value.GetString(); - continue; - } - if (property.NameEquals("connectVia"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - connectVia = IntegrationRuntimeReference.DeserializeIntegrationRuntimeReference(property.Value); - continue; - } - if (property.NameEquals("description"u8)) - { - description = property.Value.GetString(); - continue; - } - if (property.NameEquals("parameters"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - Dictionary dictionary = new Dictionary(); - foreach (var property0 in property.Value.EnumerateObject()) - { - dictionary.Add(property0.Name, EntityParameterSpecification.DeserializeEntityParameterSpecification(property0.Value)); - } - parameters = dictionary; - continue; - } - if (property.NameEquals("annotations"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - if (item.ValueKind == JsonValueKind.Null) - { - array.Add(null); - } - else - { - array.Add(BinaryData.FromString(item.GetRawText())); - } - } - annotations = array; - continue; - } - if (property.NameEquals("typeProperties"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - foreach (var property0 in property.Value.EnumerateObject()) - { - if (property0.NameEquals("connectionProperties"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - connectionProperties = BinaryData.FromString(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("clientId"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - clientId = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("clientSecret"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - clientSecret = JsonSerializer.Deserialize(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("useEncryptedEndpoints"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - useEncryptedEndpoints = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("useHostVerification"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - useHostVerification = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("usePeerVerification"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - usePeerVerification = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("encryptedCredential"u8)) - { - encryptedCredential = property0.Value.GetString(); - continue; - } - } - continue; - } - additionalPropertiesDictionary.Add(property.Name, JsonSerializer.Deserialize>(property.Value.GetRawText())); - } - additionalProperties = additionalPropertiesDictionary; - return new SalesforceMarketingCloudLinkedService(type, connectVia.Value, description.Value, Optional.ToDictionary(parameters), Optional.ToList(annotations), additionalProperties, connectionProperties.Value, clientId.Value, clientSecret, useEncryptedEndpoints.Value, useHostVerification.Value, usePeerVerification.Value, encryptedCredential.Value); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SalesforceMarketingCloudLinkedService.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SalesforceMarketingCloudLinkedService.cs deleted file mode 100644 index 13cf945d..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SalesforceMarketingCloudLinkedService.cs +++ /dev/null @@ -1,88 +0,0 @@ -// - -#nullable disable - -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// Salesforce Marketing Cloud linked service. - public partial class SalesforceMarketingCloudLinkedService : DataFactoryLinkedServiceProperties - { - /// Initializes a new instance of SalesforceMarketingCloudLinkedService. - public SalesforceMarketingCloudLinkedService() - { - LinkedServiceType = "SalesforceMarketingCloud"; - } - - /// Initializes a new instance of SalesforceMarketingCloudLinkedService. - /// Type of linked service. - /// The integration runtime reference. - /// Linked service description. - /// Parameters for linked service. - /// List of tags that can be used for describing the linked service. - /// Additional Properties. - /// Properties used to connect to Salesforce Marketing Cloud. It is mutually exclusive with any other properties in the linked service. Type: object. - /// The client ID associated with the Salesforce Marketing Cloud application. Type: string (or Expression with resultType string). - /// The client secret associated with the Salesforce Marketing Cloud application. Type: string (or Expression with resultType string). - /// Specifies whether the data source endpoints are encrypted using HTTPS. The default value is true. Type: boolean (or Expression with resultType boolean). - /// 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. Type: boolean (or Expression with resultType boolean). - /// Specifies whether to verify the identity of the server when connecting over SSL. The default value is true. Type: boolean (or Expression with resultType boolean). - /// The encrypted credential used for authentication. Credentials are encrypted using the integration runtime credential manager. Type: string. - internal SalesforceMarketingCloudLinkedService(string linkedServiceType, IntegrationRuntimeReference connectVia, string description, IDictionary parameters, IList annotations, IDictionary> additionalProperties, BinaryData connectionProperties, DataFactoryElement clientId, DataFactorySecretBaseDefinition clientSecret, DataFactoryElement useEncryptedEndpoints, DataFactoryElement useHostVerification, DataFactoryElement usePeerVerification, string encryptedCredential) : base(linkedServiceType, connectVia, description, parameters, annotations, additionalProperties) - { - ConnectionProperties = connectionProperties; - ClientId = clientId; - ClientSecret = clientSecret; - UseEncryptedEndpoints = useEncryptedEndpoints; - UseHostVerification = useHostVerification; - UsePeerVerification = usePeerVerification; - EncryptedCredential = encryptedCredential; - LinkedServiceType = linkedServiceType ?? "SalesforceMarketingCloud"; - } - - /// - /// Properties used to connect to Salesforce Marketing Cloud. It is mutually exclusive with any other properties in the linked service. Type: object. - /// - /// To assign an object to this property use . - /// - /// - /// To assign an already formated json string to this property use . - /// - /// - /// Examples: - /// - /// - /// BinaryData.FromObjectAsJson("foo") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromString("\"foo\"") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromObjectAsJson(new { key = "value" }) - /// Creates a payload of { "key": "value" }. - /// - /// - /// BinaryData.FromString("{\"key\": \"value\"}") - /// Creates a payload of { "key": "value" }. - /// - /// - /// - /// - public BinaryData ConnectionProperties { get; set; } - /// The client ID associated with the Salesforce Marketing Cloud application. Type: string (or Expression with resultType string). - public DataFactoryElement ClientId { get; set; } - /// The client secret associated with the Salesforce Marketing Cloud application. Type: string (or Expression with resultType string). - public DataFactorySecretBaseDefinition ClientSecret { get; set; } - /// Specifies whether the data source endpoints are encrypted using HTTPS. The default value is true. Type: boolean (or Expression with resultType boolean). - public DataFactoryElement UseEncryptedEndpoints { get; set; } - /// 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. Type: boolean (or Expression with resultType boolean). - public DataFactoryElement UseHostVerification { get; set; } - /// Specifies whether to verify the identity of the server when connecting over SSL. The default value is true. Type: boolean (or Expression with resultType boolean). - public DataFactoryElement UsePeerVerification { get; set; } - /// The encrypted credential used for authentication. Credentials are encrypted using the integration runtime credential manager. Type: string. - public string EncryptedCredential { get; set; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SalesforceMarketingCloudObjectDataset.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SalesforceMarketingCloudObjectDataset.Serialization.cs deleted file mode 100644 index 3c2caea7..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SalesforceMarketingCloudObjectDataset.Serialization.cs +++ /dev/null @@ -1,212 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class SalesforceMarketingCloudObjectDataset : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - writer.WritePropertyName("type"u8); - writer.WriteStringValue(DatasetType); - if (Optional.IsDefined(Description)) - { - writer.WritePropertyName("description"u8); - writer.WriteStringValue(Description); - } - if (Optional.IsDefined(Structure)) - { - writer.WritePropertyName("structure"u8); - JsonSerializer.Serialize(writer, Structure); - } - if (Optional.IsDefined(Schema)) - { - writer.WritePropertyName("schema"u8); - JsonSerializer.Serialize(writer, Schema); - } - writer.WritePropertyName("linkedServiceName"u8); - JsonSerializer.Serialize(writer, LinkedServiceName); if (Optional.IsCollectionDefined(Parameters)) - { - writer.WritePropertyName("parameters"u8); - writer.WriteStartObject(); - foreach (var item in Parameters) - { - writer.WritePropertyName(item.Key); - writer.WriteObjectValue(item.Value); - } - writer.WriteEndObject(); - } - if (Optional.IsCollectionDefined(Annotations)) - { - writer.WritePropertyName("annotations"u8); - writer.WriteStartArray(); - foreach (var item in Annotations) - { - if (item == null) - { - writer.WriteNullValue(); - continue; - } -#if NET6_0_OR_GREATER - writer.WriteRawValue(item); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.ToString()).RootElement); -#endif - } - writer.WriteEndArray(); - } - if (Optional.IsDefined(Folder)) - { - writer.WritePropertyName("folder"u8); - writer.WriteObjectValue(Folder); - } - writer.WritePropertyName("typeProperties"u8); - writer.WriteStartObject(); - if (Optional.IsDefined(TableName)) - { - writer.WritePropertyName("tableName"u8); - JsonSerializer.Serialize(writer, TableName); - } - writer.WriteEndObject(); - foreach (var item in AdditionalProperties) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.Value.ToString()).RootElement); -#endif - } - writer.WriteEndObject(); - } - - internal static SalesforceMarketingCloudObjectDataset DeserializeSalesforceMarketingCloudObjectDataset(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - string type = default; - Optional description = default; - Optional>> structure = default; - Optional>> schema = default; - DataFactoryLinkedServiceReference linkedServiceName = default; - Optional> parameters = default; - Optional> annotations = default; - Optional folder = default; - Optional> tableName = default; - IDictionary> additionalProperties = default; - Dictionary> additionalPropertiesDictionary = new Dictionary>(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("type"u8)) - { - type = property.Value.GetString(); - continue; - } - if (property.NameEquals("description"u8)) - { - description = property.Value.GetString(); - continue; - } - if (property.NameEquals("structure"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - structure = JsonSerializer.Deserialize>>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("schema"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - schema = JsonSerializer.Deserialize>>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("linkedServiceName"u8)) - { - linkedServiceName = JsonSerializer.Deserialize(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("parameters"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - Dictionary dictionary = new Dictionary(); - foreach (var property0 in property.Value.EnumerateObject()) - { - dictionary.Add(property0.Name, EntityParameterSpecification.DeserializeEntityParameterSpecification(property0.Value)); - } - parameters = dictionary; - continue; - } - if (property.NameEquals("annotations"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - if (item.ValueKind == JsonValueKind.Null) - { - array.Add(null); - } - else - { - array.Add(BinaryData.FromString(item.GetRawText())); - } - } - annotations = array; - continue; - } - if (property.NameEquals("folder"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - folder = DatasetFolder.DeserializeDatasetFolder(property.Value); - continue; - } - if (property.NameEquals("typeProperties"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - foreach (var property0 in property.Value.EnumerateObject()) - { - if (property0.NameEquals("tableName"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - tableName = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - } - continue; - } - additionalPropertiesDictionary.Add(property.Name, JsonSerializer.Deserialize>(property.Value.GetRawText())); - } - additionalProperties = additionalPropertiesDictionary; - return new SalesforceMarketingCloudObjectDataset(type, description.Value, structure.Value, schema.Value, linkedServiceName, Optional.ToDictionary(parameters), Optional.ToList(annotations), folder.Value, additionalProperties, tableName.Value); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SalesforceMarketingCloudObjectDataset.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SalesforceMarketingCloudObjectDataset.cs deleted file mode 100644 index cb59ce5b..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SalesforceMarketingCloudObjectDataset.cs +++ /dev/null @@ -1,43 +0,0 @@ -// - -#nullable disable - -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// Salesforce Marketing Cloud dataset. - public partial class SalesforceMarketingCloudObjectDataset : DataFactoryDatasetProperties - { - /// Initializes a new instance of SalesforceMarketingCloudObjectDataset. - /// Linked service reference. - /// is null. - public SalesforceMarketingCloudObjectDataset(DataFactoryLinkedServiceReference linkedServiceName) : base(linkedServiceName) - { - Argument.AssertNotNull(linkedServiceName, nameof(linkedServiceName)); - - DatasetType = "SalesforceMarketingCloudObject"; - } - - /// Initializes a new instance of SalesforceMarketingCloudObjectDataset. - /// Type of dataset. - /// Dataset description. - /// Columns that define the structure of the dataset. Type: array (or Expression with resultType array), itemType: DatasetDataElement. - /// Columns that define the physical type schema of the dataset. Type: array (or Expression with resultType array), itemType: DatasetSchemaDataElement. - /// Linked service reference. - /// Parameters for dataset. - /// List of tags that can be used for describing the Dataset. - /// The folder that this Dataset is in. If not specified, Dataset will appear at the root level. - /// Additional Properties. - /// The table name. Type: string (or Expression with resultType string). - internal SalesforceMarketingCloudObjectDataset(string datasetType, string description, DataFactoryElement> structure, DataFactoryElement> schema, DataFactoryLinkedServiceReference linkedServiceName, IDictionary parameters, IList annotations, DatasetFolder folder, IDictionary> additionalProperties, DataFactoryElement tableName) : base(datasetType, description, structure, schema, linkedServiceName, parameters, annotations, folder, additionalProperties) - { - TableName = tableName; - DatasetType = datasetType ?? "SalesforceMarketingCloudObject"; - } - - /// The table name. Type: string (or Expression with resultType string). - public DataFactoryElement TableName { get; set; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SalesforceMarketingCloudSource.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SalesforceMarketingCloudSource.Serialization.cs deleted file mode 100644 index c06fdbb7..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SalesforceMarketingCloudSource.Serialization.cs +++ /dev/null @@ -1,161 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class SalesforceMarketingCloudSource : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - if (Optional.IsDefined(Query)) - { - writer.WritePropertyName("query"u8); - JsonSerializer.Serialize(writer, Query); - } - if (Optional.IsDefined(QueryTimeout)) - { - writer.WritePropertyName("queryTimeout"u8); - JsonSerializer.Serialize(writer, QueryTimeout); - } - if (Optional.IsDefined(AdditionalColumns)) - { - writer.WritePropertyName("additionalColumns"u8); -#if NET6_0_OR_GREATER - writer.WriteRawValue(AdditionalColumns); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(AdditionalColumns.ToString()).RootElement); -#endif - } - writer.WritePropertyName("type"u8); - writer.WriteStringValue(CopySourceType); - if (Optional.IsDefined(SourceRetryCount)) - { - writer.WritePropertyName("sourceRetryCount"u8); - JsonSerializer.Serialize(writer, SourceRetryCount); - } - if (Optional.IsDefined(SourceRetryWait)) - { - writer.WritePropertyName("sourceRetryWait"u8); - JsonSerializer.Serialize(writer, SourceRetryWait); - } - if (Optional.IsDefined(MaxConcurrentConnections)) - { - writer.WritePropertyName("maxConcurrentConnections"u8); - JsonSerializer.Serialize(writer, MaxConcurrentConnections); - } - if (Optional.IsDefined(DisableMetricsCollection)) - { - writer.WritePropertyName("disableMetricsCollection"u8); - JsonSerializer.Serialize(writer, DisableMetricsCollection); - } - foreach (var item in AdditionalProperties) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.Value.ToString()).RootElement); -#endif - } - writer.WriteEndObject(); - } - - internal static SalesforceMarketingCloudSource DeserializeSalesforceMarketingCloudSource(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - Optional> query = default; - Optional> queryTimeout = default; - Optional additionalColumns = default; - string type = default; - Optional> sourceRetryCount = default; - Optional> sourceRetryWait = default; - Optional> maxConcurrentConnections = default; - Optional> disableMetricsCollection = default; - IDictionary> additionalProperties = default; - Dictionary> additionalPropertiesDictionary = new Dictionary>(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("query"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - query = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("queryTimeout"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - queryTimeout = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("additionalColumns"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - additionalColumns = BinaryData.FromString(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("type"u8)) - { - type = property.Value.GetString(); - continue; - } - if (property.NameEquals("sourceRetryCount"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - sourceRetryCount = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("sourceRetryWait"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - sourceRetryWait = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("maxConcurrentConnections"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - maxConcurrentConnections = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("disableMetricsCollection"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - disableMetricsCollection = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - additionalPropertiesDictionary.Add(property.Name, JsonSerializer.Deserialize>(property.Value.GetRawText())); - } - additionalProperties = additionalPropertiesDictionary; - return new SalesforceMarketingCloudSource(type, sourceRetryCount.Value, sourceRetryWait.Value, maxConcurrentConnections.Value, disableMetricsCollection.Value, additionalProperties, queryTimeout.Value, additionalColumns.Value, query.Value); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SalesforceMarketingCloudSource.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SalesforceMarketingCloudSource.cs deleted file mode 100644 index 30a3c137..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SalesforceMarketingCloudSource.cs +++ /dev/null @@ -1,37 +0,0 @@ -// - -#nullable disable - -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// A copy activity Salesforce Marketing Cloud source. - public partial class SalesforceMarketingCloudSource : TabularSource - { - /// Initializes a new instance of SalesforceMarketingCloudSource. - public SalesforceMarketingCloudSource() - { - CopySourceType = "SalesforceMarketingCloudSource"; - } - - /// Initializes a new instance of SalesforceMarketingCloudSource. - /// Copy source type. - /// Source retry count. Type: integer (or Expression with resultType integer). - /// Source retry wait. Type: string (or Expression with resultType string), pattern: ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). - /// The maximum concurrent connection count for the source data store. Type: integer (or Expression with resultType integer). - /// If true, disable data store metrics collection. Default is false. Type: boolean (or Expression with resultType boolean). - /// Additional Properties. - /// 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). - /// A query to retrieve data from source. Type: string (or Expression with resultType string). - internal SalesforceMarketingCloudSource(string copySourceType, DataFactoryElement sourceRetryCount, DataFactoryElement sourceRetryWait, DataFactoryElement maxConcurrentConnections, DataFactoryElement disableMetricsCollection, IDictionary> additionalProperties, DataFactoryElement queryTimeout, BinaryData additionalColumns, DataFactoryElement query) : base(copySourceType, sourceRetryCount, sourceRetryWait, maxConcurrentConnections, disableMetricsCollection, additionalProperties, queryTimeout, additionalColumns) - { - Query = query; - CopySourceType = copySourceType ?? "SalesforceMarketingCloudSource"; - } - - /// A query to retrieve data from source. Type: string (or Expression with resultType string). - public DataFactoryElement Query { get; set; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SalesforceObjectDataset.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SalesforceObjectDataset.Serialization.cs deleted file mode 100644 index 322926b6..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SalesforceObjectDataset.Serialization.cs +++ /dev/null @@ -1,212 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class SalesforceObjectDataset : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - writer.WritePropertyName("type"u8); - writer.WriteStringValue(DatasetType); - if (Optional.IsDefined(Description)) - { - writer.WritePropertyName("description"u8); - writer.WriteStringValue(Description); - } - if (Optional.IsDefined(Structure)) - { - writer.WritePropertyName("structure"u8); - JsonSerializer.Serialize(writer, Structure); - } - if (Optional.IsDefined(Schema)) - { - writer.WritePropertyName("schema"u8); - JsonSerializer.Serialize(writer, Schema); - } - writer.WritePropertyName("linkedServiceName"u8); - JsonSerializer.Serialize(writer, LinkedServiceName); if (Optional.IsCollectionDefined(Parameters)) - { - writer.WritePropertyName("parameters"u8); - writer.WriteStartObject(); - foreach (var item in Parameters) - { - writer.WritePropertyName(item.Key); - writer.WriteObjectValue(item.Value); - } - writer.WriteEndObject(); - } - if (Optional.IsCollectionDefined(Annotations)) - { - writer.WritePropertyName("annotations"u8); - writer.WriteStartArray(); - foreach (var item in Annotations) - { - if (item == null) - { - writer.WriteNullValue(); - continue; - } -#if NET6_0_OR_GREATER - writer.WriteRawValue(item); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.ToString()).RootElement); -#endif - } - writer.WriteEndArray(); - } - if (Optional.IsDefined(Folder)) - { - writer.WritePropertyName("folder"u8); - writer.WriteObjectValue(Folder); - } - writer.WritePropertyName("typeProperties"u8); - writer.WriteStartObject(); - if (Optional.IsDefined(ObjectApiName)) - { - writer.WritePropertyName("objectApiName"u8); - JsonSerializer.Serialize(writer, ObjectApiName); - } - writer.WriteEndObject(); - foreach (var item in AdditionalProperties) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.Value.ToString()).RootElement); -#endif - } - writer.WriteEndObject(); - } - - internal static SalesforceObjectDataset DeserializeSalesforceObjectDataset(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - string type = default; - Optional description = default; - Optional>> structure = default; - Optional>> schema = default; - DataFactoryLinkedServiceReference linkedServiceName = default; - Optional> parameters = default; - Optional> annotations = default; - Optional folder = default; - Optional> objectApiName = default; - IDictionary> additionalProperties = default; - Dictionary> additionalPropertiesDictionary = new Dictionary>(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("type"u8)) - { - type = property.Value.GetString(); - continue; - } - if (property.NameEquals("description"u8)) - { - description = property.Value.GetString(); - continue; - } - if (property.NameEquals("structure"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - structure = JsonSerializer.Deserialize>>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("schema"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - schema = JsonSerializer.Deserialize>>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("linkedServiceName"u8)) - { - linkedServiceName = JsonSerializer.Deserialize(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("parameters"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - Dictionary dictionary = new Dictionary(); - foreach (var property0 in property.Value.EnumerateObject()) - { - dictionary.Add(property0.Name, EntityParameterSpecification.DeserializeEntityParameterSpecification(property0.Value)); - } - parameters = dictionary; - continue; - } - if (property.NameEquals("annotations"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - if (item.ValueKind == JsonValueKind.Null) - { - array.Add(null); - } - else - { - array.Add(BinaryData.FromString(item.GetRawText())); - } - } - annotations = array; - continue; - } - if (property.NameEquals("folder"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - folder = DatasetFolder.DeserializeDatasetFolder(property.Value); - continue; - } - if (property.NameEquals("typeProperties"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - foreach (var property0 in property.Value.EnumerateObject()) - { - if (property0.NameEquals("objectApiName"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - objectApiName = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - } - continue; - } - additionalPropertiesDictionary.Add(property.Name, JsonSerializer.Deserialize>(property.Value.GetRawText())); - } - additionalProperties = additionalPropertiesDictionary; - return new SalesforceObjectDataset(type, description.Value, structure.Value, schema.Value, linkedServiceName, Optional.ToDictionary(parameters), Optional.ToList(annotations), folder.Value, additionalProperties, objectApiName.Value); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SalesforceObjectDataset.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SalesforceObjectDataset.cs deleted file mode 100644 index c30ce4f6..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SalesforceObjectDataset.cs +++ /dev/null @@ -1,43 +0,0 @@ -// - -#nullable disable - -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// The Salesforce object dataset. - public partial class SalesforceObjectDataset : DataFactoryDatasetProperties - { - /// Initializes a new instance of SalesforceObjectDataset. - /// Linked service reference. - /// is null. - public SalesforceObjectDataset(DataFactoryLinkedServiceReference linkedServiceName) : base(linkedServiceName) - { - Argument.AssertNotNull(linkedServiceName, nameof(linkedServiceName)); - - DatasetType = "SalesforceObject"; - } - - /// Initializes a new instance of SalesforceObjectDataset. - /// Type of dataset. - /// Dataset description. - /// Columns that define the structure of the dataset. Type: array (or Expression with resultType array), itemType: DatasetDataElement. - /// Columns that define the physical type schema of the dataset. Type: array (or Expression with resultType array), itemType: DatasetSchemaDataElement. - /// Linked service reference. - /// Parameters for dataset. - /// List of tags that can be used for describing the Dataset. - /// The folder that this Dataset is in. If not specified, Dataset will appear at the root level. - /// Additional Properties. - /// The Salesforce object API name. Type: string (or Expression with resultType string). - internal SalesforceObjectDataset(string datasetType, string description, DataFactoryElement> structure, DataFactoryElement> schema, DataFactoryLinkedServiceReference linkedServiceName, IDictionary parameters, IList annotations, DatasetFolder folder, IDictionary> additionalProperties, DataFactoryElement objectApiName) : base(datasetType, description, structure, schema, linkedServiceName, parameters, annotations, folder, additionalProperties) - { - ObjectApiName = objectApiName; - DatasetType = datasetType ?? "SalesforceObject"; - } - - /// The Salesforce object API name. Type: string (or Expression with resultType string). - public DataFactoryElement ObjectApiName { get; set; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SalesforceServiceCloudLinkedService.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SalesforceServiceCloudLinkedService.Serialization.cs deleted file mode 100644 index 7b2ce68b..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SalesforceServiceCloudLinkedService.Serialization.cs +++ /dev/null @@ -1,261 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class SalesforceServiceCloudLinkedService : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - writer.WritePropertyName("type"u8); - writer.WriteStringValue(LinkedServiceType); - if (Optional.IsDefined(ConnectVia)) - { - writer.WritePropertyName("connectVia"u8); - writer.WriteObjectValue(ConnectVia); - } - if (Optional.IsDefined(Description)) - { - writer.WritePropertyName("description"u8); - writer.WriteStringValue(Description); - } - if (Optional.IsCollectionDefined(Parameters)) - { - writer.WritePropertyName("parameters"u8); - writer.WriteStartObject(); - foreach (var item in Parameters) - { - writer.WritePropertyName(item.Key); - writer.WriteObjectValue(item.Value); - } - writer.WriteEndObject(); - } - if (Optional.IsCollectionDefined(Annotations)) - { - writer.WritePropertyName("annotations"u8); - writer.WriteStartArray(); - foreach (var item in Annotations) - { - if (item == null) - { - writer.WriteNullValue(); - continue; - } -#if NET6_0_OR_GREATER - writer.WriteRawValue(item); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.ToString()).RootElement); -#endif - } - writer.WriteEndArray(); - } - writer.WritePropertyName("typeProperties"u8); - writer.WriteStartObject(); - if (Optional.IsDefined(EnvironmentUri)) - { - writer.WritePropertyName("environmentUrl"u8); - JsonSerializer.Serialize(writer, EnvironmentUri); - } - if (Optional.IsDefined(Username)) - { - writer.WritePropertyName("username"u8); - JsonSerializer.Serialize(writer, Username); - } - if (Optional.IsDefined(Password)) - { - writer.WritePropertyName("password"u8); - JsonSerializer.Serialize(writer, Password); - } - if (Optional.IsDefined(SecurityToken)) - { - writer.WritePropertyName("securityToken"u8); - JsonSerializer.Serialize(writer, SecurityToken); - } - if (Optional.IsDefined(ApiVersion)) - { - writer.WritePropertyName("apiVersion"u8); - JsonSerializer.Serialize(writer, ApiVersion); - } - if (Optional.IsDefined(ExtendedProperties)) - { - writer.WritePropertyName("extendedProperties"u8); - JsonSerializer.Serialize(writer, ExtendedProperties); - } - if (Optional.IsDefined(EncryptedCredential)) - { - writer.WritePropertyName("encryptedCredential"u8); - writer.WriteStringValue(EncryptedCredential); - } - writer.WriteEndObject(); - foreach (var item in AdditionalProperties) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.Value.ToString()).RootElement); -#endif - } - writer.WriteEndObject(); - } - - internal static SalesforceServiceCloudLinkedService DeserializeSalesforceServiceCloudLinkedService(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - string type = default; - Optional connectVia = default; - Optional description = default; - Optional> parameters = default; - Optional> annotations = default; - Optional> environmentUrl = default; - Optional> username = default; - Optional password = default; - Optional securityToken = default; - Optional> apiVersion = default; - Optional> extendedProperties = default; - Optional encryptedCredential = default; - IDictionary> additionalProperties = default; - Dictionary> additionalPropertiesDictionary = new Dictionary>(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("type"u8)) - { - type = property.Value.GetString(); - continue; - } - if (property.NameEquals("connectVia"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - connectVia = IntegrationRuntimeReference.DeserializeIntegrationRuntimeReference(property.Value); - continue; - } - if (property.NameEquals("description"u8)) - { - description = property.Value.GetString(); - continue; - } - if (property.NameEquals("parameters"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - Dictionary dictionary = new Dictionary(); - foreach (var property0 in property.Value.EnumerateObject()) - { - dictionary.Add(property0.Name, EntityParameterSpecification.DeserializeEntityParameterSpecification(property0.Value)); - } - parameters = dictionary; - continue; - } - if (property.NameEquals("annotations"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - if (item.ValueKind == JsonValueKind.Null) - { - array.Add(null); - } - else - { - array.Add(BinaryData.FromString(item.GetRawText())); - } - } - annotations = array; - continue; - } - if (property.NameEquals("typeProperties"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - foreach (var property0 in property.Value.EnumerateObject()) - { - if (property0.NameEquals("environmentUrl"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - environmentUrl = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("username"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - username = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("password"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - password = JsonSerializer.Deserialize(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("securityToken"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - securityToken = JsonSerializer.Deserialize(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("apiVersion"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - apiVersion = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("extendedProperties"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - extendedProperties = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("encryptedCredential"u8)) - { - encryptedCredential = property0.Value.GetString(); - continue; - } - } - continue; - } - additionalPropertiesDictionary.Add(property.Name, JsonSerializer.Deserialize>(property.Value.GetRawText())); - } - additionalProperties = additionalPropertiesDictionary; - return new SalesforceServiceCloudLinkedService(type, connectVia.Value, description.Value, Optional.ToDictionary(parameters), Optional.ToList(annotations), additionalProperties, environmentUrl.Value, username.Value, password, securityToken, apiVersion.Value, extendedProperties.Value, encryptedCredential.Value); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SalesforceServiceCloudLinkedService.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SalesforceServiceCloudLinkedService.cs deleted file mode 100644 index bc0230e5..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SalesforceServiceCloudLinkedService.cs +++ /dev/null @@ -1,59 +0,0 @@ -// - -#nullable disable - -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// Linked service for Salesforce Service Cloud. - public partial class SalesforceServiceCloudLinkedService : DataFactoryLinkedServiceProperties - { - /// Initializes a new instance of SalesforceServiceCloudLinkedService. - public SalesforceServiceCloudLinkedService() - { - LinkedServiceType = "SalesforceServiceCloud"; - } - - /// Initializes a new instance of SalesforceServiceCloudLinkedService. - /// Type of linked service. - /// The integration runtime reference. - /// Linked service description. - /// Parameters for linked service. - /// List of tags that can be used for describing the linked service. - /// Additional Properties. - /// The URL of Salesforce Service Cloud instance. Default is 'https://login.salesforce.com'. To copy data from sandbox, specify 'https://test.salesforce.com'. To copy data from custom domain, specify, for example, 'https://[domain].my.salesforce.com'. Type: string (or Expression with resultType string). - /// The username for Basic authentication of the Salesforce instance. Type: string (or Expression with resultType string). - /// The password for Basic authentication of the Salesforce instance. - /// The security token is optional to remotely access Salesforce instance. - /// The Salesforce API version used in ADF. Type: string (or Expression with resultType string). - /// Extended properties appended to the connection string. Type: string (or Expression with resultType string). - /// The encrypted credential used for authentication. Credentials are encrypted using the integration runtime credential manager. Type: string. - internal SalesforceServiceCloudLinkedService(string linkedServiceType, IntegrationRuntimeReference connectVia, string description, IDictionary parameters, IList annotations, IDictionary> additionalProperties, DataFactoryElement environmentUri, DataFactoryElement username, DataFactorySecretBaseDefinition password, DataFactorySecretBaseDefinition securityToken, DataFactoryElement apiVersion, DataFactoryElement extendedProperties, string encryptedCredential) : base(linkedServiceType, connectVia, description, parameters, annotations, additionalProperties) - { - EnvironmentUri = environmentUri; - Username = username; - Password = password; - SecurityToken = securityToken; - ApiVersion = apiVersion; - ExtendedProperties = extendedProperties; - EncryptedCredential = encryptedCredential; - LinkedServiceType = linkedServiceType ?? "SalesforceServiceCloud"; - } - - /// The URL of Salesforce Service Cloud instance. Default is 'https://login.salesforce.com'. To copy data from sandbox, specify 'https://test.salesforce.com'. To copy data from custom domain, specify, for example, 'https://[domain].my.salesforce.com'. Type: string (or Expression with resultType string). - public DataFactoryElement EnvironmentUri { get; set; } - /// The username for Basic authentication of the Salesforce instance. Type: string (or Expression with resultType string). - public DataFactoryElement Username { get; set; } - /// The password for Basic authentication of the Salesforce instance. - public DataFactorySecretBaseDefinition Password { get; set; } - /// The security token is optional to remotely access Salesforce instance. - public DataFactorySecretBaseDefinition SecurityToken { get; set; } - /// The Salesforce API version used in ADF. Type: string (or Expression with resultType string). - public DataFactoryElement ApiVersion { get; set; } - /// Extended properties appended to the connection string. Type: string (or Expression with resultType string). - public DataFactoryElement ExtendedProperties { get; set; } - /// The encrypted credential used for authentication. Credentials are encrypted using the integration runtime credential manager. Type: string. - public string EncryptedCredential { get; set; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SalesforceServiceCloudObjectDataset.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SalesforceServiceCloudObjectDataset.Serialization.cs deleted file mode 100644 index 77887cf1..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SalesforceServiceCloudObjectDataset.Serialization.cs +++ /dev/null @@ -1,212 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class SalesforceServiceCloudObjectDataset : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - writer.WritePropertyName("type"u8); - writer.WriteStringValue(DatasetType); - if (Optional.IsDefined(Description)) - { - writer.WritePropertyName("description"u8); - writer.WriteStringValue(Description); - } - if (Optional.IsDefined(Structure)) - { - writer.WritePropertyName("structure"u8); - JsonSerializer.Serialize(writer, Structure); - } - if (Optional.IsDefined(Schema)) - { - writer.WritePropertyName("schema"u8); - JsonSerializer.Serialize(writer, Schema); - } - writer.WritePropertyName("linkedServiceName"u8); - JsonSerializer.Serialize(writer, LinkedServiceName); if (Optional.IsCollectionDefined(Parameters)) - { - writer.WritePropertyName("parameters"u8); - writer.WriteStartObject(); - foreach (var item in Parameters) - { - writer.WritePropertyName(item.Key); - writer.WriteObjectValue(item.Value); - } - writer.WriteEndObject(); - } - if (Optional.IsCollectionDefined(Annotations)) - { - writer.WritePropertyName("annotations"u8); - writer.WriteStartArray(); - foreach (var item in Annotations) - { - if (item == null) - { - writer.WriteNullValue(); - continue; - } -#if NET6_0_OR_GREATER - writer.WriteRawValue(item); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.ToString()).RootElement); -#endif - } - writer.WriteEndArray(); - } - if (Optional.IsDefined(Folder)) - { - writer.WritePropertyName("folder"u8); - writer.WriteObjectValue(Folder); - } - writer.WritePropertyName("typeProperties"u8); - writer.WriteStartObject(); - if (Optional.IsDefined(ObjectApiName)) - { - writer.WritePropertyName("objectApiName"u8); - JsonSerializer.Serialize(writer, ObjectApiName); - } - writer.WriteEndObject(); - foreach (var item in AdditionalProperties) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.Value.ToString()).RootElement); -#endif - } - writer.WriteEndObject(); - } - - internal static SalesforceServiceCloudObjectDataset DeserializeSalesforceServiceCloudObjectDataset(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - string type = default; - Optional description = default; - Optional>> structure = default; - Optional>> schema = default; - DataFactoryLinkedServiceReference linkedServiceName = default; - Optional> parameters = default; - Optional> annotations = default; - Optional folder = default; - Optional> objectApiName = default; - IDictionary> additionalProperties = default; - Dictionary> additionalPropertiesDictionary = new Dictionary>(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("type"u8)) - { - type = property.Value.GetString(); - continue; - } - if (property.NameEquals("description"u8)) - { - description = property.Value.GetString(); - continue; - } - if (property.NameEquals("structure"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - structure = JsonSerializer.Deserialize>>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("schema"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - schema = JsonSerializer.Deserialize>>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("linkedServiceName"u8)) - { - linkedServiceName = JsonSerializer.Deserialize(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("parameters"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - Dictionary dictionary = new Dictionary(); - foreach (var property0 in property.Value.EnumerateObject()) - { - dictionary.Add(property0.Name, EntityParameterSpecification.DeserializeEntityParameterSpecification(property0.Value)); - } - parameters = dictionary; - continue; - } - if (property.NameEquals("annotations"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - if (item.ValueKind == JsonValueKind.Null) - { - array.Add(null); - } - else - { - array.Add(BinaryData.FromString(item.GetRawText())); - } - } - annotations = array; - continue; - } - if (property.NameEquals("folder"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - folder = DatasetFolder.DeserializeDatasetFolder(property.Value); - continue; - } - if (property.NameEquals("typeProperties"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - foreach (var property0 in property.Value.EnumerateObject()) - { - if (property0.NameEquals("objectApiName"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - objectApiName = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - } - continue; - } - additionalPropertiesDictionary.Add(property.Name, JsonSerializer.Deserialize>(property.Value.GetRawText())); - } - additionalProperties = additionalPropertiesDictionary; - return new SalesforceServiceCloudObjectDataset(type, description.Value, structure.Value, schema.Value, linkedServiceName, Optional.ToDictionary(parameters), Optional.ToList(annotations), folder.Value, additionalProperties, objectApiName.Value); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SalesforceServiceCloudObjectDataset.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SalesforceServiceCloudObjectDataset.cs deleted file mode 100644 index 638cbe5e..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SalesforceServiceCloudObjectDataset.cs +++ /dev/null @@ -1,43 +0,0 @@ -// - -#nullable disable - -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// The Salesforce Service Cloud object dataset. - public partial class SalesforceServiceCloudObjectDataset : DataFactoryDatasetProperties - { - /// Initializes a new instance of SalesforceServiceCloudObjectDataset. - /// Linked service reference. - /// is null. - public SalesforceServiceCloudObjectDataset(DataFactoryLinkedServiceReference linkedServiceName) : base(linkedServiceName) - { - Argument.AssertNotNull(linkedServiceName, nameof(linkedServiceName)); - - DatasetType = "SalesforceServiceCloudObject"; - } - - /// Initializes a new instance of SalesforceServiceCloudObjectDataset. - /// Type of dataset. - /// Dataset description. - /// Columns that define the structure of the dataset. Type: array (or Expression with resultType array), itemType: DatasetDataElement. - /// Columns that define the physical type schema of the dataset. Type: array (or Expression with resultType array), itemType: DatasetSchemaDataElement. - /// Linked service reference. - /// Parameters for dataset. - /// List of tags that can be used for describing the Dataset. - /// The folder that this Dataset is in. If not specified, Dataset will appear at the root level. - /// Additional Properties. - /// The Salesforce Service Cloud object API name. Type: string (or Expression with resultType string). - internal SalesforceServiceCloudObjectDataset(string datasetType, string description, DataFactoryElement> structure, DataFactoryElement> schema, DataFactoryLinkedServiceReference linkedServiceName, IDictionary parameters, IList annotations, DatasetFolder folder, IDictionary> additionalProperties, DataFactoryElement objectApiName) : base(datasetType, description, structure, schema, linkedServiceName, parameters, annotations, folder, additionalProperties) - { - ObjectApiName = objectApiName; - DatasetType = datasetType ?? "SalesforceServiceCloudObject"; - } - - /// The Salesforce Service Cloud object API name. Type: string (or Expression with resultType string). - public DataFactoryElement ObjectApiName { get; set; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SalesforceServiceCloudSink.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SalesforceServiceCloudSink.Serialization.cs deleted file mode 100644 index 5ef2f135..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SalesforceServiceCloudSink.Serialization.cs +++ /dev/null @@ -1,187 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class SalesforceServiceCloudSink : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - if (Optional.IsDefined(WriteBehavior)) - { - writer.WritePropertyName("writeBehavior"u8); - writer.WriteStringValue(WriteBehavior.Value.ToString()); - } - if (Optional.IsDefined(ExternalIdFieldName)) - { - writer.WritePropertyName("externalIdFieldName"u8); - JsonSerializer.Serialize(writer, ExternalIdFieldName); - } - if (Optional.IsDefined(IgnoreNullValues)) - { - writer.WritePropertyName("ignoreNullValues"u8); - JsonSerializer.Serialize(writer, IgnoreNullValues); - } - writer.WritePropertyName("type"u8); - writer.WriteStringValue(CopySinkType); - if (Optional.IsDefined(WriteBatchSize)) - { - writer.WritePropertyName("writeBatchSize"u8); - JsonSerializer.Serialize(writer, WriteBatchSize); - } - if (Optional.IsDefined(WriteBatchTimeout)) - { - writer.WritePropertyName("writeBatchTimeout"u8); - JsonSerializer.Serialize(writer, WriteBatchTimeout); - } - if (Optional.IsDefined(SinkRetryCount)) - { - writer.WritePropertyName("sinkRetryCount"u8); - JsonSerializer.Serialize(writer, SinkRetryCount); - } - if (Optional.IsDefined(SinkRetryWait)) - { - writer.WritePropertyName("sinkRetryWait"u8); - JsonSerializer.Serialize(writer, SinkRetryWait); - } - if (Optional.IsDefined(MaxConcurrentConnections)) - { - writer.WritePropertyName("maxConcurrentConnections"u8); - JsonSerializer.Serialize(writer, MaxConcurrentConnections); - } - if (Optional.IsDefined(DisableMetricsCollection)) - { - writer.WritePropertyName("disableMetricsCollection"u8); - JsonSerializer.Serialize(writer, DisableMetricsCollection); - } - foreach (var item in AdditionalProperties) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.Value.ToString()).RootElement); -#endif - } - writer.WriteEndObject(); - } - - internal static SalesforceServiceCloudSink DeserializeSalesforceServiceCloudSink(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - Optional writeBehavior = default; - Optional> externalIdFieldName = default; - Optional> ignoreNullValues = default; - string type = default; - Optional> writeBatchSize = default; - Optional> writeBatchTimeout = default; - Optional> sinkRetryCount = default; - Optional> sinkRetryWait = default; - Optional> maxConcurrentConnections = default; - Optional> disableMetricsCollection = default; - IDictionary> additionalProperties = default; - Dictionary> additionalPropertiesDictionary = new Dictionary>(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("writeBehavior"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - writeBehavior = new SalesforceSinkWriteBehavior(property.Value.GetString()); - continue; - } - if (property.NameEquals("externalIdFieldName"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - externalIdFieldName = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("ignoreNullValues"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - ignoreNullValues = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("type"u8)) - { - type = property.Value.GetString(); - continue; - } - if (property.NameEquals("writeBatchSize"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - writeBatchSize = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("writeBatchTimeout"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - writeBatchTimeout = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("sinkRetryCount"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - sinkRetryCount = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("sinkRetryWait"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - sinkRetryWait = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("maxConcurrentConnections"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - maxConcurrentConnections = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("disableMetricsCollection"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - disableMetricsCollection = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - additionalPropertiesDictionary.Add(property.Name, JsonSerializer.Deserialize>(property.Value.GetRawText())); - } - additionalProperties = additionalPropertiesDictionary; - return new SalesforceServiceCloudSink(type, writeBatchSize.Value, writeBatchTimeout.Value, sinkRetryCount.Value, sinkRetryWait.Value, maxConcurrentConnections.Value, disableMetricsCollection.Value, additionalProperties, Optional.ToNullable(writeBehavior), externalIdFieldName.Value, ignoreNullValues.Value); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SalesforceServiceCloudSink.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SalesforceServiceCloudSink.cs deleted file mode 100644 index 1e5eeeff..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SalesforceServiceCloudSink.cs +++ /dev/null @@ -1,45 +0,0 @@ -// - -#nullable disable - -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// A copy activity Salesforce Service Cloud sink. - public partial class SalesforceServiceCloudSink : CopySink - { - /// Initializes a new instance of SalesforceServiceCloudSink. - public SalesforceServiceCloudSink() - { - CopySinkType = "SalesforceServiceCloudSink"; - } - - /// Initializes a new instance of SalesforceServiceCloudSink. - /// Copy sink type. - /// Write batch size. Type: integer (or Expression with resultType integer), minimum: 0. - /// Write batch timeout. Type: string (or Expression with resultType string), pattern: ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). - /// Sink retry count. Type: integer (or Expression with resultType integer). - /// Sink retry wait. Type: string (or Expression with resultType string), pattern: ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). - /// The maximum concurrent connection count for the sink data store. Type: integer (or Expression with resultType integer). - /// If true, disable data store metrics collection. Default is false. Type: boolean (or Expression with resultType boolean). - /// Additional Properties. - /// The write behavior for the operation. Default is Insert. - /// The name of the external ID field for upsert operation. Default value is 'Id' column. Type: string (or Expression with resultType string). - /// The flag indicating whether or not to ignore null values from input dataset (except key fields) during write operation. Default value is false. If set it to true, it means ADF will leave the data in the destination object unchanged when doing upsert/update operation and insert defined default value when doing insert operation, versus ADF will update the data in the destination object to NULL when doing upsert/update operation and insert NULL value when doing insert operation. Type: boolean (or Expression with resultType boolean). - internal SalesforceServiceCloudSink(string copySinkType, DataFactoryElement writeBatchSize, DataFactoryElement writeBatchTimeout, DataFactoryElement sinkRetryCount, DataFactoryElement sinkRetryWait, DataFactoryElement maxConcurrentConnections, DataFactoryElement disableMetricsCollection, IDictionary> additionalProperties, SalesforceSinkWriteBehavior? writeBehavior, DataFactoryElement externalIdFieldName, DataFactoryElement ignoreNullValues) : base(copySinkType, writeBatchSize, writeBatchTimeout, sinkRetryCount, sinkRetryWait, maxConcurrentConnections, disableMetricsCollection, additionalProperties) - { - WriteBehavior = writeBehavior; - ExternalIdFieldName = externalIdFieldName; - IgnoreNullValues = ignoreNullValues; - CopySinkType = copySinkType ?? "SalesforceServiceCloudSink"; - } - - /// The write behavior for the operation. Default is Insert. - public SalesforceSinkWriteBehavior? WriteBehavior { get; set; } - /// The name of the external ID field for upsert operation. Default value is 'Id' column. Type: string (or Expression with resultType string). - public DataFactoryElement ExternalIdFieldName { get; set; } - /// The flag indicating whether or not to ignore null values from input dataset (except key fields) during write operation. Default value is false. If set it to true, it means ADF will leave the data in the destination object unchanged when doing upsert/update operation and insert defined default value when doing insert operation, versus ADF will update the data in the destination object to NULL when doing upsert/update operation and insert NULL value when doing insert operation. Type: boolean (or Expression with resultType boolean). - public DataFactoryElement IgnoreNullValues { get; set; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SalesforceServiceCloudSource.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SalesforceServiceCloudSource.Serialization.cs deleted file mode 100644 index a2d9717c..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SalesforceServiceCloudSource.Serialization.cs +++ /dev/null @@ -1,161 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class SalesforceServiceCloudSource : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - if (Optional.IsDefined(Query)) - { - writer.WritePropertyName("query"u8); - JsonSerializer.Serialize(writer, Query); - } - if (Optional.IsDefined(ReadBehavior)) - { - writer.WritePropertyName("readBehavior"u8); - JsonSerializer.Serialize(writer, ReadBehavior); - } - if (Optional.IsDefined(AdditionalColumns)) - { - writer.WritePropertyName("additionalColumns"u8); -#if NET6_0_OR_GREATER - writer.WriteRawValue(AdditionalColumns); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(AdditionalColumns.ToString()).RootElement); -#endif - } - writer.WritePropertyName("type"u8); - writer.WriteStringValue(CopySourceType); - if (Optional.IsDefined(SourceRetryCount)) - { - writer.WritePropertyName("sourceRetryCount"u8); - JsonSerializer.Serialize(writer, SourceRetryCount); - } - if (Optional.IsDefined(SourceRetryWait)) - { - writer.WritePropertyName("sourceRetryWait"u8); - JsonSerializer.Serialize(writer, SourceRetryWait); - } - if (Optional.IsDefined(MaxConcurrentConnections)) - { - writer.WritePropertyName("maxConcurrentConnections"u8); - JsonSerializer.Serialize(writer, MaxConcurrentConnections); - } - if (Optional.IsDefined(DisableMetricsCollection)) - { - writer.WritePropertyName("disableMetricsCollection"u8); - JsonSerializer.Serialize(writer, DisableMetricsCollection); - } - foreach (var item in AdditionalProperties) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.Value.ToString()).RootElement); -#endif - } - writer.WriteEndObject(); - } - - internal static SalesforceServiceCloudSource DeserializeSalesforceServiceCloudSource(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - Optional> query = default; - Optional> readBehavior = default; - Optional additionalColumns = default; - string type = default; - Optional> sourceRetryCount = default; - Optional> sourceRetryWait = default; - Optional> maxConcurrentConnections = default; - Optional> disableMetricsCollection = default; - IDictionary> additionalProperties = default; - Dictionary> additionalPropertiesDictionary = new Dictionary>(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("query"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - query = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("readBehavior"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - readBehavior = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("additionalColumns"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - additionalColumns = BinaryData.FromString(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("type"u8)) - { - type = property.Value.GetString(); - continue; - } - if (property.NameEquals("sourceRetryCount"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - sourceRetryCount = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("sourceRetryWait"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - sourceRetryWait = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("maxConcurrentConnections"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - maxConcurrentConnections = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("disableMetricsCollection"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - disableMetricsCollection = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - additionalPropertiesDictionary.Add(property.Name, JsonSerializer.Deserialize>(property.Value.GetRawText())); - } - additionalProperties = additionalPropertiesDictionary; - return new SalesforceServiceCloudSource(type, sourceRetryCount.Value, sourceRetryWait.Value, maxConcurrentConnections.Value, disableMetricsCollection.Value, additionalProperties, query.Value, readBehavior.Value, additionalColumns.Value); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SalesforceServiceCloudSource.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SalesforceServiceCloudSource.cs deleted file mode 100644 index 78eaf970..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SalesforceServiceCloudSource.cs +++ /dev/null @@ -1,72 +0,0 @@ -// - -#nullable disable - -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// A copy activity Salesforce Service Cloud source. - public partial class SalesforceServiceCloudSource : CopyActivitySource - { - /// Initializes a new instance of SalesforceServiceCloudSource. - public SalesforceServiceCloudSource() - { - CopySourceType = "SalesforceServiceCloudSource"; - } - - /// Initializes a new instance of SalesforceServiceCloudSource. - /// Copy source type. - /// Source retry count. Type: integer (or Expression with resultType integer). - /// Source retry wait. Type: string (or Expression with resultType string), pattern: ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). - /// The maximum concurrent connection count for the source data store. Type: integer (or Expression with resultType integer). - /// If true, disable data store metrics collection. Default is false. Type: boolean (or Expression with resultType boolean). - /// Additional Properties. - /// Database query. Type: string (or Expression with resultType string). - /// The read behavior for the operation. Default is Query. Allowed values: Query/QueryAll. Type: string (or Expression with resultType string). - /// Specifies the additional columns to be added to source data. Type: array of objects(AdditionalColumns) (or Expression with resultType array of objects). - internal SalesforceServiceCloudSource(string copySourceType, DataFactoryElement sourceRetryCount, DataFactoryElement sourceRetryWait, DataFactoryElement maxConcurrentConnections, DataFactoryElement disableMetricsCollection, IDictionary> additionalProperties, DataFactoryElement query, DataFactoryElement readBehavior, BinaryData additionalColumns) : base(copySourceType, sourceRetryCount, sourceRetryWait, maxConcurrentConnections, disableMetricsCollection, additionalProperties) - { - Query = query; - ReadBehavior = readBehavior; - AdditionalColumns = additionalColumns; - CopySourceType = copySourceType ?? "SalesforceServiceCloudSource"; - } - - /// Database query. Type: string (or Expression with resultType string). - public DataFactoryElement Query { get; set; } - /// The read behavior for the operation. Default is Query. Allowed values: Query/QueryAll. Type: string (or Expression with resultType string). - public DataFactoryElement ReadBehavior { get; set; } - /// - /// Specifies the additional columns to be added to source data. Type: array of objects(AdditionalColumns) (or Expression with resultType array of objects). - /// - /// To assign an object to this property use . - /// - /// - /// To assign an already formated json string to this property use . - /// - /// - /// Examples: - /// - /// - /// BinaryData.FromObjectAsJson("foo") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromString("\"foo\"") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromObjectAsJson(new { key = "value" }) - /// Creates a payload of { "key": "value" }. - /// - /// - /// BinaryData.FromString("{\"key\": \"value\"}") - /// Creates a payload of { "key": "value" }. - /// - /// - /// - /// - public BinaryData AdditionalColumns { get; set; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SalesforceSink.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SalesforceSink.Serialization.cs deleted file mode 100644 index e1d6e7b7..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SalesforceSink.Serialization.cs +++ /dev/null @@ -1,187 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class SalesforceSink : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - if (Optional.IsDefined(WriteBehavior)) - { - writer.WritePropertyName("writeBehavior"u8); - writer.WriteStringValue(WriteBehavior.Value.ToString()); - } - if (Optional.IsDefined(ExternalIdFieldName)) - { - writer.WritePropertyName("externalIdFieldName"u8); - JsonSerializer.Serialize(writer, ExternalIdFieldName); - } - if (Optional.IsDefined(IgnoreNullValues)) - { - writer.WritePropertyName("ignoreNullValues"u8); - JsonSerializer.Serialize(writer, IgnoreNullValues); - } - writer.WritePropertyName("type"u8); - writer.WriteStringValue(CopySinkType); - if (Optional.IsDefined(WriteBatchSize)) - { - writer.WritePropertyName("writeBatchSize"u8); - JsonSerializer.Serialize(writer, WriteBatchSize); - } - if (Optional.IsDefined(WriteBatchTimeout)) - { - writer.WritePropertyName("writeBatchTimeout"u8); - JsonSerializer.Serialize(writer, WriteBatchTimeout); - } - if (Optional.IsDefined(SinkRetryCount)) - { - writer.WritePropertyName("sinkRetryCount"u8); - JsonSerializer.Serialize(writer, SinkRetryCount); - } - if (Optional.IsDefined(SinkRetryWait)) - { - writer.WritePropertyName("sinkRetryWait"u8); - JsonSerializer.Serialize(writer, SinkRetryWait); - } - if (Optional.IsDefined(MaxConcurrentConnections)) - { - writer.WritePropertyName("maxConcurrentConnections"u8); - JsonSerializer.Serialize(writer, MaxConcurrentConnections); - } - if (Optional.IsDefined(DisableMetricsCollection)) - { - writer.WritePropertyName("disableMetricsCollection"u8); - JsonSerializer.Serialize(writer, DisableMetricsCollection); - } - foreach (var item in AdditionalProperties) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.Value.ToString()).RootElement); -#endif - } - writer.WriteEndObject(); - } - - internal static SalesforceSink DeserializeSalesforceSink(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - Optional writeBehavior = default; - Optional> externalIdFieldName = default; - Optional> ignoreNullValues = default; - string type = default; - Optional> writeBatchSize = default; - Optional> writeBatchTimeout = default; - Optional> sinkRetryCount = default; - Optional> sinkRetryWait = default; - Optional> maxConcurrentConnections = default; - Optional> disableMetricsCollection = default; - IDictionary> additionalProperties = default; - Dictionary> additionalPropertiesDictionary = new Dictionary>(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("writeBehavior"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - writeBehavior = new SalesforceSinkWriteBehavior(property.Value.GetString()); - continue; - } - if (property.NameEquals("externalIdFieldName"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - externalIdFieldName = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("ignoreNullValues"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - ignoreNullValues = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("type"u8)) - { - type = property.Value.GetString(); - continue; - } - if (property.NameEquals("writeBatchSize"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - writeBatchSize = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("writeBatchTimeout"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - writeBatchTimeout = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("sinkRetryCount"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - sinkRetryCount = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("sinkRetryWait"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - sinkRetryWait = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("maxConcurrentConnections"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - maxConcurrentConnections = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("disableMetricsCollection"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - disableMetricsCollection = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - additionalPropertiesDictionary.Add(property.Name, JsonSerializer.Deserialize>(property.Value.GetRawText())); - } - additionalProperties = additionalPropertiesDictionary; - return new SalesforceSink(type, writeBatchSize.Value, writeBatchTimeout.Value, sinkRetryCount.Value, sinkRetryWait.Value, maxConcurrentConnections.Value, disableMetricsCollection.Value, additionalProperties, Optional.ToNullable(writeBehavior), externalIdFieldName.Value, ignoreNullValues.Value); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SalesforceSink.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SalesforceSink.cs deleted file mode 100644 index 63e8ad5c..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SalesforceSink.cs +++ /dev/null @@ -1,45 +0,0 @@ -// - -#nullable disable - -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// A copy activity Salesforce sink. - public partial class SalesforceSink : CopySink - { - /// Initializes a new instance of SalesforceSink. - public SalesforceSink() - { - CopySinkType = "SalesforceSink"; - } - - /// Initializes a new instance of SalesforceSink. - /// Copy sink type. - /// Write batch size. Type: integer (or Expression with resultType integer), minimum: 0. - /// Write batch timeout. Type: string (or Expression with resultType string), pattern: ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). - /// Sink retry count. Type: integer (or Expression with resultType integer). - /// Sink retry wait. Type: string (or Expression with resultType string), pattern: ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). - /// The maximum concurrent connection count for the sink data store. Type: integer (or Expression with resultType integer). - /// If true, disable data store metrics collection. Default is false. Type: boolean (or Expression with resultType boolean). - /// Additional Properties. - /// The write behavior for the operation. Default is Insert. - /// The name of the external ID field for upsert operation. Default value is 'Id' column. Type: string (or Expression with resultType string). - /// The flag indicating whether or not to ignore null values from input dataset (except key fields) during write operation. Default value is false. If set it to true, it means ADF will leave the data in the destination object unchanged when doing upsert/update operation and insert defined default value when doing insert operation, versus ADF will update the data in the destination object to NULL when doing upsert/update operation and insert NULL value when doing insert operation. Type: boolean (or Expression with resultType boolean). - internal SalesforceSink(string copySinkType, DataFactoryElement writeBatchSize, DataFactoryElement writeBatchTimeout, DataFactoryElement sinkRetryCount, DataFactoryElement sinkRetryWait, DataFactoryElement maxConcurrentConnections, DataFactoryElement disableMetricsCollection, IDictionary> additionalProperties, SalesforceSinkWriteBehavior? writeBehavior, DataFactoryElement externalIdFieldName, DataFactoryElement ignoreNullValues) : base(copySinkType, writeBatchSize, writeBatchTimeout, sinkRetryCount, sinkRetryWait, maxConcurrentConnections, disableMetricsCollection, additionalProperties) - { - WriteBehavior = writeBehavior; - ExternalIdFieldName = externalIdFieldName; - IgnoreNullValues = ignoreNullValues; - CopySinkType = copySinkType ?? "SalesforceSink"; - } - - /// The write behavior for the operation. Default is Insert. - public SalesforceSinkWriteBehavior? WriteBehavior { get; set; } - /// The name of the external ID field for upsert operation. Default value is 'Id' column. Type: string (or Expression with resultType string). - public DataFactoryElement ExternalIdFieldName { get; set; } - /// The flag indicating whether or not to ignore null values from input dataset (except key fields) during write operation. Default value is false. If set it to true, it means ADF will leave the data in the destination object unchanged when doing upsert/update operation and insert defined default value when doing insert operation, versus ADF will update the data in the destination object to NULL when doing upsert/update operation and insert NULL value when doing insert operation. Type: boolean (or Expression with resultType boolean). - public DataFactoryElement IgnoreNullValues { get; set; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SalesforceSinkWriteBehavior.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SalesforceSinkWriteBehavior.cs deleted file mode 100644 index 9d2221c0..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SalesforceSinkWriteBehavior.cs +++ /dev/null @@ -1,47 +0,0 @@ -// - -#nullable disable - -using System.ComponentModel; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// The write behavior for the operation. Default is Insert. - public readonly partial struct SalesforceSinkWriteBehavior : IEquatable - { - private readonly string _value; - - /// Initializes a new instance of . - /// is null. - public SalesforceSinkWriteBehavior(string value) - { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } - - private const string InsertValue = "Insert"; - private const string UpsertValue = "Upsert"; - - /// Insert. - public static SalesforceSinkWriteBehavior Insert { get; } = new SalesforceSinkWriteBehavior(InsertValue); - /// Upsert. - public static SalesforceSinkWriteBehavior Upsert { get; } = new SalesforceSinkWriteBehavior(UpsertValue); - /// Determines if two values are the same. - public static bool operator ==(SalesforceSinkWriteBehavior left, SalesforceSinkWriteBehavior right) => left.Equals(right); - /// Determines if two values are not the same. - public static bool operator !=(SalesforceSinkWriteBehavior left, SalesforceSinkWriteBehavior right) => !left.Equals(right); - /// Converts a string to a . - public static implicit operator SalesforceSinkWriteBehavior(string value) => new SalesforceSinkWriteBehavior(value); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override bool Equals(object obj) => obj is SalesforceSinkWriteBehavior other && Equals(other); - /// - public bool Equals(SalesforceSinkWriteBehavior other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override int GetHashCode() => _value?.GetHashCode() ?? 0; - /// - public override string ToString() => _value; - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SalesforceSource.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SalesforceSource.Serialization.cs deleted file mode 100644 index 546564c7..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SalesforceSource.Serialization.cs +++ /dev/null @@ -1,176 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class SalesforceSource : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - if (Optional.IsDefined(Query)) - { - writer.WritePropertyName("query"u8); - JsonSerializer.Serialize(writer, Query); - } - if (Optional.IsDefined(ReadBehavior)) - { - writer.WritePropertyName("readBehavior"u8); - JsonSerializer.Serialize(writer, ReadBehavior); - } - if (Optional.IsDefined(QueryTimeout)) - { - writer.WritePropertyName("queryTimeout"u8); - JsonSerializer.Serialize(writer, QueryTimeout); - } - if (Optional.IsDefined(AdditionalColumns)) - { - writer.WritePropertyName("additionalColumns"u8); -#if NET6_0_OR_GREATER - writer.WriteRawValue(AdditionalColumns); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(AdditionalColumns.ToString()).RootElement); -#endif - } - writer.WritePropertyName("type"u8); - writer.WriteStringValue(CopySourceType); - if (Optional.IsDefined(SourceRetryCount)) - { - writer.WritePropertyName("sourceRetryCount"u8); - JsonSerializer.Serialize(writer, SourceRetryCount); - } - if (Optional.IsDefined(SourceRetryWait)) - { - writer.WritePropertyName("sourceRetryWait"u8); - JsonSerializer.Serialize(writer, SourceRetryWait); - } - if (Optional.IsDefined(MaxConcurrentConnections)) - { - writer.WritePropertyName("maxConcurrentConnections"u8); - JsonSerializer.Serialize(writer, MaxConcurrentConnections); - } - if (Optional.IsDefined(DisableMetricsCollection)) - { - writer.WritePropertyName("disableMetricsCollection"u8); - JsonSerializer.Serialize(writer, DisableMetricsCollection); - } - foreach (var item in AdditionalProperties) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.Value.ToString()).RootElement); -#endif - } - writer.WriteEndObject(); - } - - internal static SalesforceSource DeserializeSalesforceSource(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - Optional> query = default; - Optional> readBehavior = default; - Optional> queryTimeout = default; - Optional additionalColumns = default; - string type = default; - Optional> sourceRetryCount = default; - Optional> sourceRetryWait = default; - Optional> maxConcurrentConnections = default; - Optional> disableMetricsCollection = default; - IDictionary> additionalProperties = default; - Dictionary> additionalPropertiesDictionary = new Dictionary>(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("query"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - query = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("readBehavior"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - readBehavior = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("queryTimeout"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - queryTimeout = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("additionalColumns"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - additionalColumns = BinaryData.FromString(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("type"u8)) - { - type = property.Value.GetString(); - continue; - } - if (property.NameEquals("sourceRetryCount"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - sourceRetryCount = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("sourceRetryWait"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - sourceRetryWait = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("maxConcurrentConnections"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - maxConcurrentConnections = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("disableMetricsCollection"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - disableMetricsCollection = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - additionalPropertiesDictionary.Add(property.Name, JsonSerializer.Deserialize>(property.Value.GetRawText())); - } - additionalProperties = additionalPropertiesDictionary; - return new SalesforceSource(type, sourceRetryCount.Value, sourceRetryWait.Value, maxConcurrentConnections.Value, disableMetricsCollection.Value, additionalProperties, queryTimeout.Value, additionalColumns.Value, query.Value, readBehavior.Value); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SalesforceSource.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SalesforceSource.cs deleted file mode 100644 index 1d494c38..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SalesforceSource.cs +++ /dev/null @@ -1,41 +0,0 @@ -// - -#nullable disable - -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// A copy activity Salesforce source. - public partial class SalesforceSource : TabularSource - { - /// Initializes a new instance of SalesforceSource. - public SalesforceSource() - { - CopySourceType = "SalesforceSource"; - } - - /// Initializes a new instance of SalesforceSource. - /// Copy source type. - /// Source retry count. Type: integer (or Expression with resultType integer). - /// Source retry wait. Type: string (or Expression with resultType string), pattern: ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). - /// The maximum concurrent connection count for the source data store. Type: integer (or Expression with resultType integer). - /// If true, disable data store metrics collection. Default is false. Type: boolean (or Expression with resultType boolean). - /// Additional Properties. - /// 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). - /// Database query. Type: string (or Expression with resultType string). - /// The read behavior for the operation. Default is Query. Allowed values: Query/QueryAll. Type: string (or Expression with resultType string). - internal SalesforceSource(string copySourceType, DataFactoryElement sourceRetryCount, DataFactoryElement sourceRetryWait, DataFactoryElement maxConcurrentConnections, DataFactoryElement disableMetricsCollection, IDictionary> additionalProperties, DataFactoryElement queryTimeout, BinaryData additionalColumns, DataFactoryElement query, DataFactoryElement readBehavior) : base(copySourceType, sourceRetryCount, sourceRetryWait, maxConcurrentConnections, disableMetricsCollection, additionalProperties, queryTimeout, additionalColumns) - { - Query = query; - ReadBehavior = readBehavior; - CopySourceType = copySourceType ?? "SalesforceSource"; - } - - /// Database query. Type: string (or Expression with resultType string). - public DataFactoryElement Query { get; set; } - /// The read behavior for the operation. Default is Query. Allowed values: Query/QueryAll. Type: string (or Expression with resultType string). - public DataFactoryElement ReadBehavior { get; set; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SapBWCubeDataset.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SapBWCubeDataset.Serialization.cs deleted file mode 100644 index 1e145cf0..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SapBWCubeDataset.Serialization.cs +++ /dev/null @@ -1,182 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class SapBWCubeDataset : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - writer.WritePropertyName("type"u8); - writer.WriteStringValue(DatasetType); - if (Optional.IsDefined(Description)) - { - writer.WritePropertyName("description"u8); - writer.WriteStringValue(Description); - } - if (Optional.IsDefined(Structure)) - { - writer.WritePropertyName("structure"u8); - JsonSerializer.Serialize(writer, Structure); - } - if (Optional.IsDefined(Schema)) - { - writer.WritePropertyName("schema"u8); - JsonSerializer.Serialize(writer, Schema); - } - writer.WritePropertyName("linkedServiceName"u8); - JsonSerializer.Serialize(writer, LinkedServiceName); if (Optional.IsCollectionDefined(Parameters)) - { - writer.WritePropertyName("parameters"u8); - writer.WriteStartObject(); - foreach (var item in Parameters) - { - writer.WritePropertyName(item.Key); - writer.WriteObjectValue(item.Value); - } - writer.WriteEndObject(); - } - if (Optional.IsCollectionDefined(Annotations)) - { - writer.WritePropertyName("annotations"u8); - writer.WriteStartArray(); - foreach (var item in Annotations) - { - if (item == null) - { - writer.WriteNullValue(); - continue; - } -#if NET6_0_OR_GREATER - writer.WriteRawValue(item); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.ToString()).RootElement); -#endif - } - writer.WriteEndArray(); - } - if (Optional.IsDefined(Folder)) - { - writer.WritePropertyName("folder"u8); - writer.WriteObjectValue(Folder); - } - foreach (var item in AdditionalProperties) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.Value.ToString()).RootElement); -#endif - } - writer.WriteEndObject(); - } - - internal static SapBWCubeDataset DeserializeSapBWCubeDataset(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - string type = default; - Optional description = default; - Optional>> structure = default; - Optional>> schema = default; - DataFactoryLinkedServiceReference linkedServiceName = default; - Optional> parameters = default; - Optional> annotations = default; - Optional folder = default; - IDictionary> additionalProperties = default; - Dictionary> additionalPropertiesDictionary = new Dictionary>(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("type"u8)) - { - type = property.Value.GetString(); - continue; - } - if (property.NameEquals("description"u8)) - { - description = property.Value.GetString(); - continue; - } - if (property.NameEquals("structure"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - structure = JsonSerializer.Deserialize>>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("schema"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - schema = JsonSerializer.Deserialize>>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("linkedServiceName"u8)) - { - linkedServiceName = JsonSerializer.Deserialize(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("parameters"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - Dictionary dictionary = new Dictionary(); - foreach (var property0 in property.Value.EnumerateObject()) - { - dictionary.Add(property0.Name, EntityParameterSpecification.DeserializeEntityParameterSpecification(property0.Value)); - } - parameters = dictionary; - continue; - } - if (property.NameEquals("annotations"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - if (item.ValueKind == JsonValueKind.Null) - { - array.Add(null); - } - else - { - array.Add(BinaryData.FromString(item.GetRawText())); - } - } - annotations = array; - continue; - } - if (property.NameEquals("folder"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - folder = DatasetFolder.DeserializeDatasetFolder(property.Value); - continue; - } - additionalPropertiesDictionary.Add(property.Name, JsonSerializer.Deserialize>(property.Value.GetRawText())); - } - additionalProperties = additionalPropertiesDictionary; - return new SapBWCubeDataset(type, description.Value, structure.Value, schema.Value, linkedServiceName, Optional.ToDictionary(parameters), Optional.ToList(annotations), folder.Value, additionalProperties); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SapBWCubeDataset.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SapBWCubeDataset.cs deleted file mode 100644 index 6fe473cf..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SapBWCubeDataset.cs +++ /dev/null @@ -1,38 +0,0 @@ -// - -#nullable disable - -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// The SAP BW cube dataset. - public partial class SapBWCubeDataset : DataFactoryDatasetProperties - { - /// Initializes a new instance of SapBWCubeDataset. - /// Linked service reference. - /// is null. - public SapBWCubeDataset(DataFactoryLinkedServiceReference linkedServiceName) : base(linkedServiceName) - { - Argument.AssertNotNull(linkedServiceName, nameof(linkedServiceName)); - - DatasetType = "SapBwCube"; - } - - /// Initializes a new instance of SapBWCubeDataset. - /// Type of dataset. - /// Dataset description. - /// Columns that define the structure of the dataset. Type: array (or Expression with resultType array), itemType: DatasetDataElement. - /// Columns that define the physical type schema of the dataset. Type: array (or Expression with resultType array), itemType: DatasetSchemaDataElement. - /// Linked service reference. - /// Parameters for dataset. - /// List of tags that can be used for describing the Dataset. - /// The folder that this Dataset is in. If not specified, Dataset will appear at the root level. - /// Additional Properties. - internal SapBWCubeDataset(string datasetType, string description, DataFactoryElement> structure, DataFactoryElement> schema, DataFactoryLinkedServiceReference linkedServiceName, IDictionary parameters, IList annotations, DatasetFolder folder, IDictionary> additionalProperties) : base(datasetType, description, structure, schema, linkedServiceName, parameters, annotations, folder, additionalProperties) - { - DatasetType = datasetType ?? "SapBwCube"; - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SapBWLinkedService.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SapBWLinkedService.Serialization.cs deleted file mode 100644 index f9e239c3..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SapBWLinkedService.Serialization.cs +++ /dev/null @@ -1,225 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class SapBWLinkedService : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - writer.WritePropertyName("type"u8); - writer.WriteStringValue(LinkedServiceType); - if (Optional.IsDefined(ConnectVia)) - { - writer.WritePropertyName("connectVia"u8); - writer.WriteObjectValue(ConnectVia); - } - if (Optional.IsDefined(Description)) - { - writer.WritePropertyName("description"u8); - writer.WriteStringValue(Description); - } - if (Optional.IsCollectionDefined(Parameters)) - { - writer.WritePropertyName("parameters"u8); - writer.WriteStartObject(); - foreach (var item in Parameters) - { - writer.WritePropertyName(item.Key); - writer.WriteObjectValue(item.Value); - } - writer.WriteEndObject(); - } - if (Optional.IsCollectionDefined(Annotations)) - { - writer.WritePropertyName("annotations"u8); - writer.WriteStartArray(); - foreach (var item in Annotations) - { - if (item == null) - { - writer.WriteNullValue(); - continue; - } -#if NET6_0_OR_GREATER - writer.WriteRawValue(item); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.ToString()).RootElement); -#endif - } - writer.WriteEndArray(); - } - writer.WritePropertyName("typeProperties"u8); - writer.WriteStartObject(); - writer.WritePropertyName("server"u8); - JsonSerializer.Serialize(writer, Server); - writer.WritePropertyName("systemNumber"u8); - JsonSerializer.Serialize(writer, SystemNumber); - writer.WritePropertyName("clientId"u8); - JsonSerializer.Serialize(writer, ClientId); - if (Optional.IsDefined(UserName)) - { - writer.WritePropertyName("userName"u8); - JsonSerializer.Serialize(writer, UserName); - } - if (Optional.IsDefined(Password)) - { - writer.WritePropertyName("password"u8); - JsonSerializer.Serialize(writer, Password); - } - if (Optional.IsDefined(EncryptedCredential)) - { - writer.WritePropertyName("encryptedCredential"u8); - writer.WriteStringValue(EncryptedCredential); - } - writer.WriteEndObject(); - foreach (var item in AdditionalProperties) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.Value.ToString()).RootElement); -#endif - } - writer.WriteEndObject(); - } - - internal static SapBWLinkedService DeserializeSapBWLinkedService(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - string type = default; - Optional connectVia = default; - Optional description = default; - Optional> parameters = default; - Optional> annotations = default; - DataFactoryElement server = default; - DataFactoryElement systemNumber = default; - DataFactoryElement clientId = default; - Optional> userName = default; - Optional password = default; - Optional encryptedCredential = default; - IDictionary> additionalProperties = default; - Dictionary> additionalPropertiesDictionary = new Dictionary>(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("type"u8)) - { - type = property.Value.GetString(); - continue; - } - if (property.NameEquals("connectVia"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - connectVia = IntegrationRuntimeReference.DeserializeIntegrationRuntimeReference(property.Value); - continue; - } - if (property.NameEquals("description"u8)) - { - description = property.Value.GetString(); - continue; - } - if (property.NameEquals("parameters"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - Dictionary dictionary = new Dictionary(); - foreach (var property0 in property.Value.EnumerateObject()) - { - dictionary.Add(property0.Name, EntityParameterSpecification.DeserializeEntityParameterSpecification(property0.Value)); - } - parameters = dictionary; - continue; - } - if (property.NameEquals("annotations"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - if (item.ValueKind == JsonValueKind.Null) - { - array.Add(null); - } - else - { - array.Add(BinaryData.FromString(item.GetRawText())); - } - } - annotations = array; - continue; - } - if (property.NameEquals("typeProperties"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - foreach (var property0 in property.Value.EnumerateObject()) - { - if (property0.NameEquals("server"u8)) - { - server = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("systemNumber"u8)) - { - systemNumber = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("clientId"u8)) - { - clientId = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("userName"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - userName = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("password"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - password = JsonSerializer.Deserialize(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("encryptedCredential"u8)) - { - encryptedCredential = property0.Value.GetString(); - continue; - } - } - continue; - } - additionalPropertiesDictionary.Add(property.Name, JsonSerializer.Deserialize>(property.Value.GetRawText())); - } - additionalProperties = additionalPropertiesDictionary; - return new SapBWLinkedService(type, connectVia.Value, description.Value, Optional.ToDictionary(parameters), Optional.ToList(annotations), additionalProperties, server, systemNumber, clientId, userName.Value, password, encryptedCredential.Value); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SapBWLinkedService.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SapBWLinkedService.cs deleted file mode 100644 index e938286f..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SapBWLinkedService.cs +++ /dev/null @@ -1,67 +0,0 @@ -// - -#nullable disable - -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// SAP Business Warehouse Linked Service. - public partial class SapBWLinkedService : DataFactoryLinkedServiceProperties - { - /// Initializes a new instance of SapBWLinkedService. - /// Host name of the SAP BW instance. Type: string (or Expression with resultType string). - /// System number of the BW system. (Usually a two-digit decimal number represented as a string.) Type: string (or Expression with resultType string). - /// Client ID of the client on the BW system. (Usually a three-digit decimal number represented as a string) Type: string (or Expression with resultType string). - /// , or is null. - public SapBWLinkedService(DataFactoryElement server, DataFactoryElement systemNumber, DataFactoryElement clientId) - { - Argument.AssertNotNull(server, nameof(server)); - Argument.AssertNotNull(systemNumber, nameof(systemNumber)); - Argument.AssertNotNull(clientId, nameof(clientId)); - - Server = server; - SystemNumber = systemNumber; - ClientId = clientId; - LinkedServiceType = "SapBW"; - } - - /// Initializes a new instance of SapBWLinkedService. - /// Type of linked service. - /// The integration runtime reference. - /// Linked service description. - /// Parameters for linked service. - /// List of tags that can be used for describing the linked service. - /// Additional Properties. - /// Host name of the SAP BW instance. Type: string (or Expression with resultType string). - /// System number of the BW system. (Usually a two-digit decimal number represented as a string.) Type: string (or Expression with resultType string). - /// Client ID of the client on the BW system. (Usually a three-digit decimal number represented as a string) Type: string (or Expression with resultType string). - /// Username to access the SAP BW server. Type: string (or Expression with resultType string). - /// Password to access the SAP BW server. - /// The encrypted credential used for authentication. Credentials are encrypted using the integration runtime credential manager. Type: string. - internal SapBWLinkedService(string linkedServiceType, IntegrationRuntimeReference connectVia, string description, IDictionary parameters, IList annotations, IDictionary> additionalProperties, DataFactoryElement server, DataFactoryElement systemNumber, DataFactoryElement clientId, DataFactoryElement userName, DataFactorySecretBaseDefinition password, string encryptedCredential) : base(linkedServiceType, connectVia, description, parameters, annotations, additionalProperties) - { - Server = server; - SystemNumber = systemNumber; - ClientId = clientId; - UserName = userName; - Password = password; - EncryptedCredential = encryptedCredential; - LinkedServiceType = linkedServiceType ?? "SapBW"; - } - - /// Host name of the SAP BW instance. Type: string (or Expression with resultType string). - public DataFactoryElement Server { get; set; } - /// System number of the BW system. (Usually a two-digit decimal number represented as a string.) Type: string (or Expression with resultType string). - public DataFactoryElement SystemNumber { get; set; } - /// Client ID of the client on the BW system. (Usually a three-digit decimal number represented as a string) Type: string (or Expression with resultType string). - public DataFactoryElement ClientId { get; set; } - /// Username to access the SAP BW server. Type: string (or Expression with resultType string). - public DataFactoryElement UserName { get; set; } - /// Password to access the SAP BW server. - public DataFactorySecretBaseDefinition Password { get; set; } - /// The encrypted credential used for authentication. Credentials are encrypted using the integration runtime credential manager. Type: string. - public string EncryptedCredential { get; set; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SapBWSource.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SapBWSource.Serialization.cs deleted file mode 100644 index 5bc889bf..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SapBWSource.Serialization.cs +++ /dev/null @@ -1,161 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class SapBWSource : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - if (Optional.IsDefined(Query)) - { - writer.WritePropertyName("query"u8); - JsonSerializer.Serialize(writer, Query); - } - if (Optional.IsDefined(QueryTimeout)) - { - writer.WritePropertyName("queryTimeout"u8); - JsonSerializer.Serialize(writer, QueryTimeout); - } - if (Optional.IsDefined(AdditionalColumns)) - { - writer.WritePropertyName("additionalColumns"u8); -#if NET6_0_OR_GREATER - writer.WriteRawValue(AdditionalColumns); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(AdditionalColumns.ToString()).RootElement); -#endif - } - writer.WritePropertyName("type"u8); - writer.WriteStringValue(CopySourceType); - if (Optional.IsDefined(SourceRetryCount)) - { - writer.WritePropertyName("sourceRetryCount"u8); - JsonSerializer.Serialize(writer, SourceRetryCount); - } - if (Optional.IsDefined(SourceRetryWait)) - { - writer.WritePropertyName("sourceRetryWait"u8); - JsonSerializer.Serialize(writer, SourceRetryWait); - } - if (Optional.IsDefined(MaxConcurrentConnections)) - { - writer.WritePropertyName("maxConcurrentConnections"u8); - JsonSerializer.Serialize(writer, MaxConcurrentConnections); - } - if (Optional.IsDefined(DisableMetricsCollection)) - { - writer.WritePropertyName("disableMetricsCollection"u8); - JsonSerializer.Serialize(writer, DisableMetricsCollection); - } - foreach (var item in AdditionalProperties) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.Value.ToString()).RootElement); -#endif - } - writer.WriteEndObject(); - } - - internal static SapBWSource DeserializeSapBWSource(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - Optional> query = default; - Optional> queryTimeout = default; - Optional additionalColumns = default; - string type = default; - Optional> sourceRetryCount = default; - Optional> sourceRetryWait = default; - Optional> maxConcurrentConnections = default; - Optional> disableMetricsCollection = default; - IDictionary> additionalProperties = default; - Dictionary> additionalPropertiesDictionary = new Dictionary>(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("query"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - query = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("queryTimeout"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - queryTimeout = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("additionalColumns"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - additionalColumns = BinaryData.FromString(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("type"u8)) - { - type = property.Value.GetString(); - continue; - } - if (property.NameEquals("sourceRetryCount"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - sourceRetryCount = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("sourceRetryWait"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - sourceRetryWait = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("maxConcurrentConnections"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - maxConcurrentConnections = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("disableMetricsCollection"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - disableMetricsCollection = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - additionalPropertiesDictionary.Add(property.Name, JsonSerializer.Deserialize>(property.Value.GetRawText())); - } - additionalProperties = additionalPropertiesDictionary; - return new SapBWSource(type, sourceRetryCount.Value, sourceRetryWait.Value, maxConcurrentConnections.Value, disableMetricsCollection.Value, additionalProperties, queryTimeout.Value, additionalColumns.Value, query.Value); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SapBWSource.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SapBWSource.cs deleted file mode 100644 index f3d99dd0..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SapBWSource.cs +++ /dev/null @@ -1,37 +0,0 @@ -// - -#nullable disable - -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// A copy activity source for SapBW server via MDX. - public partial class SapBWSource : TabularSource - { - /// Initializes a new instance of SapBWSource. - public SapBWSource() - { - CopySourceType = "SapBwSource"; - } - - /// Initializes a new instance of SapBWSource. - /// Copy source type. - /// Source retry count. Type: integer (or Expression with resultType integer). - /// Source retry wait. Type: string (or Expression with resultType string), pattern: ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). - /// The maximum concurrent connection count for the source data store. Type: integer (or Expression with resultType integer). - /// If true, disable data store metrics collection. Default is false. Type: boolean (or Expression with resultType boolean). - /// Additional Properties. - /// 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). - /// MDX query. Type: string (or Expression with resultType string). - internal SapBWSource(string copySourceType, DataFactoryElement sourceRetryCount, DataFactoryElement sourceRetryWait, DataFactoryElement maxConcurrentConnections, DataFactoryElement disableMetricsCollection, IDictionary> additionalProperties, DataFactoryElement queryTimeout, BinaryData additionalColumns, DataFactoryElement query) : base(copySourceType, sourceRetryCount, sourceRetryWait, maxConcurrentConnections, disableMetricsCollection, additionalProperties, queryTimeout, additionalColumns) - { - Query = query; - CopySourceType = copySourceType ?? "SapBwSource"; - } - - /// MDX query. Type: string (or Expression with resultType string). - public DataFactoryElement Query { get; set; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SapCloudForCustomerLinkedService.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SapCloudForCustomerLinkedService.Serialization.cs deleted file mode 100644 index 1be95db2..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SapCloudForCustomerLinkedService.Serialization.cs +++ /dev/null @@ -1,209 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class SapCloudForCustomerLinkedService : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - writer.WritePropertyName("type"u8); - writer.WriteStringValue(LinkedServiceType); - if (Optional.IsDefined(ConnectVia)) - { - writer.WritePropertyName("connectVia"u8); - writer.WriteObjectValue(ConnectVia); - } - if (Optional.IsDefined(Description)) - { - writer.WritePropertyName("description"u8); - writer.WriteStringValue(Description); - } - if (Optional.IsCollectionDefined(Parameters)) - { - writer.WritePropertyName("parameters"u8); - writer.WriteStartObject(); - foreach (var item in Parameters) - { - writer.WritePropertyName(item.Key); - writer.WriteObjectValue(item.Value); - } - writer.WriteEndObject(); - } - if (Optional.IsCollectionDefined(Annotations)) - { - writer.WritePropertyName("annotations"u8); - writer.WriteStartArray(); - foreach (var item in Annotations) - { - if (item == null) - { - writer.WriteNullValue(); - continue; - } -#if NET6_0_OR_GREATER - writer.WriteRawValue(item); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.ToString()).RootElement); -#endif - } - writer.WriteEndArray(); - } - writer.WritePropertyName("typeProperties"u8); - writer.WriteStartObject(); - writer.WritePropertyName("url"u8); - JsonSerializer.Serialize(writer, Uri); - if (Optional.IsDefined(Username)) - { - writer.WritePropertyName("username"u8); - JsonSerializer.Serialize(writer, Username); - } - if (Optional.IsDefined(Password)) - { - writer.WritePropertyName("password"u8); - JsonSerializer.Serialize(writer, Password); - } - if (Optional.IsDefined(EncryptedCredential)) - { - writer.WritePropertyName("encryptedCredential"u8); - writer.WriteStringValue(EncryptedCredential); - } - writer.WriteEndObject(); - foreach (var item in AdditionalProperties) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.Value.ToString()).RootElement); -#endif - } - writer.WriteEndObject(); - } - - internal static SapCloudForCustomerLinkedService DeserializeSapCloudForCustomerLinkedService(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - string type = default; - Optional connectVia = default; - Optional description = default; - Optional> parameters = default; - Optional> annotations = default; - DataFactoryElement url = default; - Optional> username = default; - Optional password = default; - Optional encryptedCredential = default; - IDictionary> additionalProperties = default; - Dictionary> additionalPropertiesDictionary = new Dictionary>(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("type"u8)) - { - type = property.Value.GetString(); - continue; - } - if (property.NameEquals("connectVia"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - connectVia = IntegrationRuntimeReference.DeserializeIntegrationRuntimeReference(property.Value); - continue; - } - if (property.NameEquals("description"u8)) - { - description = property.Value.GetString(); - continue; - } - if (property.NameEquals("parameters"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - Dictionary dictionary = new Dictionary(); - foreach (var property0 in property.Value.EnumerateObject()) - { - dictionary.Add(property0.Name, EntityParameterSpecification.DeserializeEntityParameterSpecification(property0.Value)); - } - parameters = dictionary; - continue; - } - if (property.NameEquals("annotations"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - if (item.ValueKind == JsonValueKind.Null) - { - array.Add(null); - } - else - { - array.Add(BinaryData.FromString(item.GetRawText())); - } - } - annotations = array; - continue; - } - if (property.NameEquals("typeProperties"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - foreach (var property0 in property.Value.EnumerateObject()) - { - if (property0.NameEquals("url"u8)) - { - url = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("username"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - username = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("password"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - password = JsonSerializer.Deserialize(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("encryptedCredential"u8)) - { - encryptedCredential = property0.Value.GetString(); - continue; - } - } - continue; - } - additionalPropertiesDictionary.Add(property.Name, JsonSerializer.Deserialize>(property.Value.GetRawText())); - } - additionalProperties = additionalPropertiesDictionary; - return new SapCloudForCustomerLinkedService(type, connectVia.Value, description.Value, Optional.ToDictionary(parameters), Optional.ToList(annotations), additionalProperties, url, username.Value, password, encryptedCredential.Value); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SapCloudForCustomerLinkedService.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SapCloudForCustomerLinkedService.cs deleted file mode 100644 index dc08bf2f..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SapCloudForCustomerLinkedService.cs +++ /dev/null @@ -1,53 +0,0 @@ -// - -#nullable disable - -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// Linked service for SAP Cloud for Customer. - public partial class SapCloudForCustomerLinkedService : DataFactoryLinkedServiceProperties - { - /// Initializes a new instance of SapCloudForCustomerLinkedService. - /// The URL of SAP Cloud for Customer OData API. For example, '[https://[tenantname].crm.ondemand.com/sap/c4c/odata/v1]'. Type: string (or Expression with resultType string). - /// is null. - public SapCloudForCustomerLinkedService(DataFactoryElement uri) - { - Argument.AssertNotNull(uri, nameof(uri)); - - Uri = uri; - LinkedServiceType = "SapCloudForCustomer"; - } - - /// Initializes a new instance of SapCloudForCustomerLinkedService. - /// Type of linked service. - /// The integration runtime reference. - /// Linked service description. - /// Parameters for linked service. - /// List of tags that can be used for describing the linked service. - /// Additional Properties. - /// The URL of SAP Cloud for Customer OData API. For example, '[https://[tenantname].crm.ondemand.com/sap/c4c/odata/v1]'. Type: string (or Expression with resultType string). - /// The username for Basic authentication. Type: string (or Expression with resultType string). - /// The password for Basic authentication. - /// The encrypted credential used for authentication. Credentials are encrypted using the integration runtime credential manager. Either encryptedCredential or username/password must be provided. Type: string. - internal SapCloudForCustomerLinkedService(string linkedServiceType, IntegrationRuntimeReference connectVia, string description, IDictionary parameters, IList annotations, IDictionary> additionalProperties, DataFactoryElement uri, DataFactoryElement username, DataFactorySecretBaseDefinition password, string encryptedCredential) : base(linkedServiceType, connectVia, description, parameters, annotations, additionalProperties) - { - Uri = uri; - Username = username; - Password = password; - EncryptedCredential = encryptedCredential; - LinkedServiceType = linkedServiceType ?? "SapCloudForCustomer"; - } - - /// The URL of SAP Cloud for Customer OData API. For example, '[https://[tenantname].crm.ondemand.com/sap/c4c/odata/v1]'. Type: string (or Expression with resultType string). - public DataFactoryElement Uri { get; set; } - /// The username for Basic authentication. Type: string (or Expression with resultType string). - public DataFactoryElement Username { get; set; } - /// The password for Basic authentication. - public DataFactorySecretBaseDefinition Password { get; set; } - /// The encrypted credential used for authentication. Credentials are encrypted using the integration runtime credential manager. Either encryptedCredential or username/password must be provided. Type: string. - public string EncryptedCredential { get; set; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SapCloudForCustomerResourceDataset.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SapCloudForCustomerResourceDataset.Serialization.cs deleted file mode 100644 index c0281d05..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SapCloudForCustomerResourceDataset.Serialization.cs +++ /dev/null @@ -1,205 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class SapCloudForCustomerResourceDataset : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - writer.WritePropertyName("type"u8); - writer.WriteStringValue(DatasetType); - if (Optional.IsDefined(Description)) - { - writer.WritePropertyName("description"u8); - writer.WriteStringValue(Description); - } - if (Optional.IsDefined(Structure)) - { - writer.WritePropertyName("structure"u8); - JsonSerializer.Serialize(writer, Structure); - } - if (Optional.IsDefined(Schema)) - { - writer.WritePropertyName("schema"u8); - JsonSerializer.Serialize(writer, Schema); - } - writer.WritePropertyName("linkedServiceName"u8); - JsonSerializer.Serialize(writer, LinkedServiceName); if (Optional.IsCollectionDefined(Parameters)) - { - writer.WritePropertyName("parameters"u8); - writer.WriteStartObject(); - foreach (var item in Parameters) - { - writer.WritePropertyName(item.Key); - writer.WriteObjectValue(item.Value); - } - writer.WriteEndObject(); - } - if (Optional.IsCollectionDefined(Annotations)) - { - writer.WritePropertyName("annotations"u8); - writer.WriteStartArray(); - foreach (var item in Annotations) - { - if (item == null) - { - writer.WriteNullValue(); - continue; - } -#if NET6_0_OR_GREATER - writer.WriteRawValue(item); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.ToString()).RootElement); -#endif - } - writer.WriteEndArray(); - } - if (Optional.IsDefined(Folder)) - { - writer.WritePropertyName("folder"u8); - writer.WriteObjectValue(Folder); - } - writer.WritePropertyName("typeProperties"u8); - writer.WriteStartObject(); - writer.WritePropertyName("path"u8); - JsonSerializer.Serialize(writer, Path); - writer.WriteEndObject(); - foreach (var item in AdditionalProperties) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.Value.ToString()).RootElement); -#endif - } - writer.WriteEndObject(); - } - - internal static SapCloudForCustomerResourceDataset DeserializeSapCloudForCustomerResourceDataset(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - string type = default; - Optional description = default; - Optional>> structure = default; - Optional>> schema = default; - DataFactoryLinkedServiceReference linkedServiceName = default; - Optional> parameters = default; - Optional> annotations = default; - Optional folder = default; - DataFactoryElement path = default; - IDictionary> additionalProperties = default; - Dictionary> additionalPropertiesDictionary = new Dictionary>(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("type"u8)) - { - type = property.Value.GetString(); - continue; - } - if (property.NameEquals("description"u8)) - { - description = property.Value.GetString(); - continue; - } - if (property.NameEquals("structure"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - structure = JsonSerializer.Deserialize>>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("schema"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - schema = JsonSerializer.Deserialize>>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("linkedServiceName"u8)) - { - linkedServiceName = JsonSerializer.Deserialize(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("parameters"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - Dictionary dictionary = new Dictionary(); - foreach (var property0 in property.Value.EnumerateObject()) - { - dictionary.Add(property0.Name, EntityParameterSpecification.DeserializeEntityParameterSpecification(property0.Value)); - } - parameters = dictionary; - continue; - } - if (property.NameEquals("annotations"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - if (item.ValueKind == JsonValueKind.Null) - { - array.Add(null); - } - else - { - array.Add(BinaryData.FromString(item.GetRawText())); - } - } - annotations = array; - continue; - } - if (property.NameEquals("folder"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - folder = DatasetFolder.DeserializeDatasetFolder(property.Value); - continue; - } - if (property.NameEquals("typeProperties"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - foreach (var property0 in property.Value.EnumerateObject()) - { - if (property0.NameEquals("path"u8)) - { - path = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - } - continue; - } - additionalPropertiesDictionary.Add(property.Name, JsonSerializer.Deserialize>(property.Value.GetRawText())); - } - additionalProperties = additionalPropertiesDictionary; - return new SapCloudForCustomerResourceDataset(type, description.Value, structure.Value, schema.Value, linkedServiceName, Optional.ToDictionary(parameters), Optional.ToList(annotations), folder.Value, additionalProperties, path); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SapCloudForCustomerResourceDataset.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SapCloudForCustomerResourceDataset.cs deleted file mode 100644 index 065b727a..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SapCloudForCustomerResourceDataset.cs +++ /dev/null @@ -1,46 +0,0 @@ -// - -#nullable disable - -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// The path of the SAP Cloud for Customer OData entity. - public partial class SapCloudForCustomerResourceDataset : DataFactoryDatasetProperties - { - /// Initializes a new instance of SapCloudForCustomerResourceDataset. - /// Linked service reference. - /// The path of the SAP Cloud for Customer OData entity. Type: string (or Expression with resultType string). - /// or is null. - public SapCloudForCustomerResourceDataset(DataFactoryLinkedServiceReference linkedServiceName, DataFactoryElement path) : base(linkedServiceName) - { - Argument.AssertNotNull(linkedServiceName, nameof(linkedServiceName)); - Argument.AssertNotNull(path, nameof(path)); - - Path = path; - DatasetType = "SapCloudForCustomerResource"; - } - - /// Initializes a new instance of SapCloudForCustomerResourceDataset. - /// Type of dataset. - /// Dataset description. - /// Columns that define the structure of the dataset. Type: array (or Expression with resultType array), itemType: DatasetDataElement. - /// Columns that define the physical type schema of the dataset. Type: array (or Expression with resultType array), itemType: DatasetSchemaDataElement. - /// Linked service reference. - /// Parameters for dataset. - /// List of tags that can be used for describing the Dataset. - /// The folder that this Dataset is in. If not specified, Dataset will appear at the root level. - /// Additional Properties. - /// The path of the SAP Cloud for Customer OData entity. Type: string (or Expression with resultType string). - internal SapCloudForCustomerResourceDataset(string datasetType, string description, DataFactoryElement> structure, DataFactoryElement> schema, DataFactoryLinkedServiceReference linkedServiceName, IDictionary parameters, IList annotations, DatasetFolder folder, IDictionary> additionalProperties, DataFactoryElement path) : base(datasetType, description, structure, schema, linkedServiceName, parameters, annotations, folder, additionalProperties) - { - Path = path; - DatasetType = datasetType ?? "SapCloudForCustomerResource"; - } - - /// The path of the SAP Cloud for Customer OData entity. Type: string (or Expression with resultType string). - public DataFactoryElement Path { get; set; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SapCloudForCustomerSink.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SapCloudForCustomerSink.Serialization.cs deleted file mode 100644 index 8578fa1f..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SapCloudForCustomerSink.Serialization.cs +++ /dev/null @@ -1,172 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class SapCloudForCustomerSink : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - if (Optional.IsDefined(WriteBehavior)) - { - writer.WritePropertyName("writeBehavior"u8); - writer.WriteStringValue(WriteBehavior.Value.ToString()); - } - if (Optional.IsDefined(HttpRequestTimeout)) - { - writer.WritePropertyName("httpRequestTimeout"u8); - JsonSerializer.Serialize(writer, HttpRequestTimeout); - } - writer.WritePropertyName("type"u8); - writer.WriteStringValue(CopySinkType); - if (Optional.IsDefined(WriteBatchSize)) - { - writer.WritePropertyName("writeBatchSize"u8); - JsonSerializer.Serialize(writer, WriteBatchSize); - } - if (Optional.IsDefined(WriteBatchTimeout)) - { - writer.WritePropertyName("writeBatchTimeout"u8); - JsonSerializer.Serialize(writer, WriteBatchTimeout); - } - if (Optional.IsDefined(SinkRetryCount)) - { - writer.WritePropertyName("sinkRetryCount"u8); - JsonSerializer.Serialize(writer, SinkRetryCount); - } - if (Optional.IsDefined(SinkRetryWait)) - { - writer.WritePropertyName("sinkRetryWait"u8); - JsonSerializer.Serialize(writer, SinkRetryWait); - } - if (Optional.IsDefined(MaxConcurrentConnections)) - { - writer.WritePropertyName("maxConcurrentConnections"u8); - JsonSerializer.Serialize(writer, MaxConcurrentConnections); - } - if (Optional.IsDefined(DisableMetricsCollection)) - { - writer.WritePropertyName("disableMetricsCollection"u8); - JsonSerializer.Serialize(writer, DisableMetricsCollection); - } - foreach (var item in AdditionalProperties) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.Value.ToString()).RootElement); -#endif - } - writer.WriteEndObject(); - } - - internal static SapCloudForCustomerSink DeserializeSapCloudForCustomerSink(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - Optional writeBehavior = default; - Optional> httpRequestTimeout = default; - string type = default; - Optional> writeBatchSize = default; - Optional> writeBatchTimeout = default; - Optional> sinkRetryCount = default; - Optional> sinkRetryWait = default; - Optional> maxConcurrentConnections = default; - Optional> disableMetricsCollection = default; - IDictionary> additionalProperties = default; - Dictionary> additionalPropertiesDictionary = new Dictionary>(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("writeBehavior"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - writeBehavior = new SapCloudForCustomerSinkWriteBehavior(property.Value.GetString()); - continue; - } - if (property.NameEquals("httpRequestTimeout"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - httpRequestTimeout = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("type"u8)) - { - type = property.Value.GetString(); - continue; - } - if (property.NameEquals("writeBatchSize"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - writeBatchSize = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("writeBatchTimeout"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - writeBatchTimeout = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("sinkRetryCount"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - sinkRetryCount = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("sinkRetryWait"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - sinkRetryWait = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("maxConcurrentConnections"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - maxConcurrentConnections = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("disableMetricsCollection"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - disableMetricsCollection = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - additionalPropertiesDictionary.Add(property.Name, JsonSerializer.Deserialize>(property.Value.GetRawText())); - } - additionalProperties = additionalPropertiesDictionary; - return new SapCloudForCustomerSink(type, writeBatchSize.Value, writeBatchTimeout.Value, sinkRetryCount.Value, sinkRetryWait.Value, maxConcurrentConnections.Value, disableMetricsCollection.Value, additionalProperties, Optional.ToNullable(writeBehavior), httpRequestTimeout.Value); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SapCloudForCustomerSink.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SapCloudForCustomerSink.cs deleted file mode 100644 index 4ebd60e2..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SapCloudForCustomerSink.cs +++ /dev/null @@ -1,41 +0,0 @@ -// - -#nullable disable - -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// A copy activity SAP Cloud for Customer sink. - public partial class SapCloudForCustomerSink : CopySink - { - /// Initializes a new instance of SapCloudForCustomerSink. - public SapCloudForCustomerSink() - { - CopySinkType = "SapCloudForCustomerSink"; - } - - /// Initializes a new instance of SapCloudForCustomerSink. - /// Copy sink type. - /// Write batch size. Type: integer (or Expression with resultType integer), minimum: 0. - /// Write batch timeout. Type: string (or Expression with resultType string), pattern: ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). - /// Sink retry count. Type: integer (or Expression with resultType integer). - /// Sink retry wait. Type: string (or Expression with resultType string), pattern: ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). - /// The maximum concurrent connection count for the sink data store. Type: integer (or Expression with resultType integer). - /// If true, disable data store metrics collection. Default is false. Type: boolean (or Expression with resultType boolean). - /// Additional Properties. - /// The write behavior for the operation. Default is 'Insert'. - /// The timeout (TimeSpan) to get an HTTP response. It is the timeout to get a response, not the timeout to read response data. Default value: 00:05:00. Type: string (or Expression with resultType string), pattern: ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). - internal SapCloudForCustomerSink(string copySinkType, DataFactoryElement writeBatchSize, DataFactoryElement writeBatchTimeout, DataFactoryElement sinkRetryCount, DataFactoryElement sinkRetryWait, DataFactoryElement maxConcurrentConnections, DataFactoryElement disableMetricsCollection, IDictionary> additionalProperties, SapCloudForCustomerSinkWriteBehavior? writeBehavior, DataFactoryElement httpRequestTimeout) : base(copySinkType, writeBatchSize, writeBatchTimeout, sinkRetryCount, sinkRetryWait, maxConcurrentConnections, disableMetricsCollection, additionalProperties) - { - WriteBehavior = writeBehavior; - HttpRequestTimeout = httpRequestTimeout; - CopySinkType = copySinkType ?? "SapCloudForCustomerSink"; - } - - /// The write behavior for the operation. Default is 'Insert'. - public SapCloudForCustomerSinkWriteBehavior? WriteBehavior { get; set; } - /// The timeout (TimeSpan) to get an HTTP response. It is the timeout to get a response, not the timeout to read response data. Default value: 00:05:00. Type: string (or Expression with resultType string), pattern: ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). - public DataFactoryElement HttpRequestTimeout { get; set; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SapCloudForCustomerSinkWriteBehavior.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SapCloudForCustomerSinkWriteBehavior.cs deleted file mode 100644 index d9155f8b..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SapCloudForCustomerSinkWriteBehavior.cs +++ /dev/null @@ -1,47 +0,0 @@ -// - -#nullable disable - -using System.ComponentModel; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// The write behavior for the operation. Default is 'Insert'. - public readonly partial struct SapCloudForCustomerSinkWriteBehavior : IEquatable - { - private readonly string _value; - - /// Initializes a new instance of . - /// is null. - public SapCloudForCustomerSinkWriteBehavior(string value) - { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } - - private const string InsertValue = "Insert"; - private const string UpdateValue = "Update"; - - /// Insert. - public static SapCloudForCustomerSinkWriteBehavior Insert { get; } = new SapCloudForCustomerSinkWriteBehavior(InsertValue); - /// Update. - public static SapCloudForCustomerSinkWriteBehavior Update { get; } = new SapCloudForCustomerSinkWriteBehavior(UpdateValue); - /// Determines if two values are the same. - public static bool operator ==(SapCloudForCustomerSinkWriteBehavior left, SapCloudForCustomerSinkWriteBehavior right) => left.Equals(right); - /// Determines if two values are not the same. - public static bool operator !=(SapCloudForCustomerSinkWriteBehavior left, SapCloudForCustomerSinkWriteBehavior right) => !left.Equals(right); - /// Converts a string to a . - public static implicit operator SapCloudForCustomerSinkWriteBehavior(string value) => new SapCloudForCustomerSinkWriteBehavior(value); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override bool Equals(object obj) => obj is SapCloudForCustomerSinkWriteBehavior other && Equals(other); - /// - public bool Equals(SapCloudForCustomerSinkWriteBehavior other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override int GetHashCode() => _value?.GetHashCode() ?? 0; - /// - public override string ToString() => _value; - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SapCloudForCustomerSource.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SapCloudForCustomerSource.Serialization.cs deleted file mode 100644 index 38f46f13..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SapCloudForCustomerSource.Serialization.cs +++ /dev/null @@ -1,176 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class SapCloudForCustomerSource : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - if (Optional.IsDefined(Query)) - { - writer.WritePropertyName("query"u8); - JsonSerializer.Serialize(writer, Query); - } - if (Optional.IsDefined(HttpRequestTimeout)) - { - writer.WritePropertyName("httpRequestTimeout"u8); - JsonSerializer.Serialize(writer, HttpRequestTimeout); - } - if (Optional.IsDefined(QueryTimeout)) - { - writer.WritePropertyName("queryTimeout"u8); - JsonSerializer.Serialize(writer, QueryTimeout); - } - if (Optional.IsDefined(AdditionalColumns)) - { - writer.WritePropertyName("additionalColumns"u8); -#if NET6_0_OR_GREATER - writer.WriteRawValue(AdditionalColumns); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(AdditionalColumns.ToString()).RootElement); -#endif - } - writer.WritePropertyName("type"u8); - writer.WriteStringValue(CopySourceType); - if (Optional.IsDefined(SourceRetryCount)) - { - writer.WritePropertyName("sourceRetryCount"u8); - JsonSerializer.Serialize(writer, SourceRetryCount); - } - if (Optional.IsDefined(SourceRetryWait)) - { - writer.WritePropertyName("sourceRetryWait"u8); - JsonSerializer.Serialize(writer, SourceRetryWait); - } - if (Optional.IsDefined(MaxConcurrentConnections)) - { - writer.WritePropertyName("maxConcurrentConnections"u8); - JsonSerializer.Serialize(writer, MaxConcurrentConnections); - } - if (Optional.IsDefined(DisableMetricsCollection)) - { - writer.WritePropertyName("disableMetricsCollection"u8); - JsonSerializer.Serialize(writer, DisableMetricsCollection); - } - foreach (var item in AdditionalProperties) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.Value.ToString()).RootElement); -#endif - } - writer.WriteEndObject(); - } - - internal static SapCloudForCustomerSource DeserializeSapCloudForCustomerSource(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - Optional> query = default; - Optional> httpRequestTimeout = default; - Optional> queryTimeout = default; - Optional additionalColumns = default; - string type = default; - Optional> sourceRetryCount = default; - Optional> sourceRetryWait = default; - Optional> maxConcurrentConnections = default; - Optional> disableMetricsCollection = default; - IDictionary> additionalProperties = default; - Dictionary> additionalPropertiesDictionary = new Dictionary>(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("query"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - query = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("httpRequestTimeout"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - httpRequestTimeout = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("queryTimeout"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - queryTimeout = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("additionalColumns"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - additionalColumns = BinaryData.FromString(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("type"u8)) - { - type = property.Value.GetString(); - continue; - } - if (property.NameEquals("sourceRetryCount"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - sourceRetryCount = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("sourceRetryWait"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - sourceRetryWait = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("maxConcurrentConnections"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - maxConcurrentConnections = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("disableMetricsCollection"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - disableMetricsCollection = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - additionalPropertiesDictionary.Add(property.Name, JsonSerializer.Deserialize>(property.Value.GetRawText())); - } - additionalProperties = additionalPropertiesDictionary; - return new SapCloudForCustomerSource(type, sourceRetryCount.Value, sourceRetryWait.Value, maxConcurrentConnections.Value, disableMetricsCollection.Value, additionalProperties, queryTimeout.Value, additionalColumns.Value, query.Value, httpRequestTimeout.Value); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SapCloudForCustomerSource.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SapCloudForCustomerSource.cs deleted file mode 100644 index 24f7535d..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SapCloudForCustomerSource.cs +++ /dev/null @@ -1,41 +0,0 @@ -// - -#nullable disable - -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// A copy activity source for SAP Cloud for Customer source. - public partial class SapCloudForCustomerSource : TabularSource - { - /// Initializes a new instance of SapCloudForCustomerSource. - public SapCloudForCustomerSource() - { - CopySourceType = "SapCloudForCustomerSource"; - } - - /// Initializes a new instance of SapCloudForCustomerSource. - /// Copy source type. - /// Source retry count. Type: integer (or Expression with resultType integer). - /// Source retry wait. Type: string (or Expression with resultType string), pattern: ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). - /// The maximum concurrent connection count for the source data store. Type: integer (or Expression with resultType integer). - /// If true, disable data store metrics collection. Default is false. Type: boolean (or Expression with resultType boolean). - /// Additional Properties. - /// 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). - /// SAP Cloud for Customer OData query. For example, "$top=1". Type: string (or Expression with resultType string). - /// The timeout (TimeSpan) to get an HTTP response. It is the timeout to get a response, not the timeout to read response data. Default value: 00:05:00. Type: string (or Expression with resultType string), pattern: ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). - internal SapCloudForCustomerSource(string copySourceType, DataFactoryElement sourceRetryCount, DataFactoryElement sourceRetryWait, DataFactoryElement maxConcurrentConnections, DataFactoryElement disableMetricsCollection, IDictionary> additionalProperties, DataFactoryElement queryTimeout, BinaryData additionalColumns, DataFactoryElement query, DataFactoryElement httpRequestTimeout) : base(copySourceType, sourceRetryCount, sourceRetryWait, maxConcurrentConnections, disableMetricsCollection, additionalProperties, queryTimeout, additionalColumns) - { - Query = query; - HttpRequestTimeout = httpRequestTimeout; - CopySourceType = copySourceType ?? "SapCloudForCustomerSource"; - } - - /// SAP Cloud for Customer OData query. For example, "$top=1". Type: string (or Expression with resultType string). - public DataFactoryElement Query { get; set; } - /// The timeout (TimeSpan) to get an HTTP response. It is the timeout to get a response, not the timeout to read response data. Default value: 00:05:00. Type: string (or Expression with resultType string), pattern: ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). - public DataFactoryElement HttpRequestTimeout { get; set; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SapEccLinkedService.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SapEccLinkedService.Serialization.cs deleted file mode 100644 index a5d4ea32..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SapEccLinkedService.Serialization.cs +++ /dev/null @@ -1,209 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class SapEccLinkedService : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - writer.WritePropertyName("type"u8); - writer.WriteStringValue(LinkedServiceType); - if (Optional.IsDefined(ConnectVia)) - { - writer.WritePropertyName("connectVia"u8); - writer.WriteObjectValue(ConnectVia); - } - if (Optional.IsDefined(Description)) - { - writer.WritePropertyName("description"u8); - writer.WriteStringValue(Description); - } - if (Optional.IsCollectionDefined(Parameters)) - { - writer.WritePropertyName("parameters"u8); - writer.WriteStartObject(); - foreach (var item in Parameters) - { - writer.WritePropertyName(item.Key); - writer.WriteObjectValue(item.Value); - } - writer.WriteEndObject(); - } - if (Optional.IsCollectionDefined(Annotations)) - { - writer.WritePropertyName("annotations"u8); - writer.WriteStartArray(); - foreach (var item in Annotations) - { - if (item == null) - { - writer.WriteNullValue(); - continue; - } -#if NET6_0_OR_GREATER - writer.WriteRawValue(item); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.ToString()).RootElement); -#endif - } - writer.WriteEndArray(); - } - writer.WritePropertyName("typeProperties"u8); - writer.WriteStartObject(); - writer.WritePropertyName("url"u8); - JsonSerializer.Serialize(writer, Uri); - if (Optional.IsDefined(Username)) - { - writer.WritePropertyName("username"u8); - JsonSerializer.Serialize(writer, Username); - } - if (Optional.IsDefined(Password)) - { - writer.WritePropertyName("password"u8); - JsonSerializer.Serialize(writer, Password); - } - if (Optional.IsDefined(EncryptedCredential)) - { - writer.WritePropertyName("encryptedCredential"u8); - writer.WriteStringValue(EncryptedCredential); - } - writer.WriteEndObject(); - foreach (var item in AdditionalProperties) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.Value.ToString()).RootElement); -#endif - } - writer.WriteEndObject(); - } - - internal static SapEccLinkedService DeserializeSapEccLinkedService(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - string type = default; - Optional connectVia = default; - Optional description = default; - Optional> parameters = default; - Optional> annotations = default; - DataFactoryElement url = default; - Optional> username = default; - Optional password = default; - Optional encryptedCredential = default; - IDictionary> additionalProperties = default; - Dictionary> additionalPropertiesDictionary = new Dictionary>(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("type"u8)) - { - type = property.Value.GetString(); - continue; - } - if (property.NameEquals("connectVia"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - connectVia = IntegrationRuntimeReference.DeserializeIntegrationRuntimeReference(property.Value); - continue; - } - if (property.NameEquals("description"u8)) - { - description = property.Value.GetString(); - continue; - } - if (property.NameEquals("parameters"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - Dictionary dictionary = new Dictionary(); - foreach (var property0 in property.Value.EnumerateObject()) - { - dictionary.Add(property0.Name, EntityParameterSpecification.DeserializeEntityParameterSpecification(property0.Value)); - } - parameters = dictionary; - continue; - } - if (property.NameEquals("annotations"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - if (item.ValueKind == JsonValueKind.Null) - { - array.Add(null); - } - else - { - array.Add(BinaryData.FromString(item.GetRawText())); - } - } - annotations = array; - continue; - } - if (property.NameEquals("typeProperties"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - foreach (var property0 in property.Value.EnumerateObject()) - { - if (property0.NameEquals("url"u8)) - { - url = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("username"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - username = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("password"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - password = JsonSerializer.Deserialize(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("encryptedCredential"u8)) - { - encryptedCredential = property0.Value.GetString(); - continue; - } - } - continue; - } - additionalPropertiesDictionary.Add(property.Name, JsonSerializer.Deserialize>(property.Value.GetRawText())); - } - additionalProperties = additionalPropertiesDictionary; - return new SapEccLinkedService(type, connectVia.Value, description.Value, Optional.ToDictionary(parameters), Optional.ToList(annotations), additionalProperties, url, username.Value, password, encryptedCredential.Value); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SapEccLinkedService.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SapEccLinkedService.cs deleted file mode 100644 index efd66646..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SapEccLinkedService.cs +++ /dev/null @@ -1,53 +0,0 @@ -// - -#nullable disable - -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// Linked service for SAP ERP Central Component(SAP ECC). - public partial class SapEccLinkedService : DataFactoryLinkedServiceProperties - { - /// Initializes a new instance of SapEccLinkedService. - /// The URL of SAP ECC OData API. For example, '[https://hostname:port/sap/opu/odata/sap/servicename/]'. Type: string (or Expression with resultType string). - /// is null. - public SapEccLinkedService(DataFactoryElement uri) - { - Argument.AssertNotNull(uri, nameof(uri)); - - Uri = uri; - LinkedServiceType = "SapEcc"; - } - - /// Initializes a new instance of SapEccLinkedService. - /// Type of linked service. - /// The integration runtime reference. - /// Linked service description. - /// Parameters for linked service. - /// List of tags that can be used for describing the linked service. - /// Additional Properties. - /// The URL of SAP ECC OData API. For example, '[https://hostname:port/sap/opu/odata/sap/servicename/]'. Type: string (or Expression with resultType string). - /// The username for Basic authentication. Type: string (or Expression with resultType string). - /// The password for Basic authentication. - /// The encrypted credential used for authentication. Credentials are encrypted using the integration runtime credential manager. Either encryptedCredential or username/password must be provided. Type: string. - internal SapEccLinkedService(string linkedServiceType, IntegrationRuntimeReference connectVia, string description, IDictionary parameters, IList annotations, IDictionary> additionalProperties, DataFactoryElement uri, DataFactoryElement username, DataFactorySecretBaseDefinition password, string encryptedCredential) : base(linkedServiceType, connectVia, description, parameters, annotations, additionalProperties) - { - Uri = uri; - Username = username; - Password = password; - EncryptedCredential = encryptedCredential; - LinkedServiceType = linkedServiceType ?? "SapEcc"; - } - - /// The URL of SAP ECC OData API. For example, '[https://hostname:port/sap/opu/odata/sap/servicename/]'. Type: string (or Expression with resultType string). - public DataFactoryElement Uri { get; set; } - /// The username for Basic authentication. Type: string (or Expression with resultType string). - public DataFactoryElement Username { get; set; } - /// The password for Basic authentication. - public DataFactorySecretBaseDefinition Password { get; set; } - /// The encrypted credential used for authentication. Credentials are encrypted using the integration runtime credential manager. Either encryptedCredential or username/password must be provided. Type: string. - public string EncryptedCredential { get; set; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SapEccResourceDataset.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SapEccResourceDataset.Serialization.cs deleted file mode 100644 index 472f1b4c..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SapEccResourceDataset.Serialization.cs +++ /dev/null @@ -1,205 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class SapEccResourceDataset : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - writer.WritePropertyName("type"u8); - writer.WriteStringValue(DatasetType); - if (Optional.IsDefined(Description)) - { - writer.WritePropertyName("description"u8); - writer.WriteStringValue(Description); - } - if (Optional.IsDefined(Structure)) - { - writer.WritePropertyName("structure"u8); - JsonSerializer.Serialize(writer, Structure); - } - if (Optional.IsDefined(Schema)) - { - writer.WritePropertyName("schema"u8); - JsonSerializer.Serialize(writer, Schema); - } - writer.WritePropertyName("linkedServiceName"u8); - JsonSerializer.Serialize(writer, LinkedServiceName); if (Optional.IsCollectionDefined(Parameters)) - { - writer.WritePropertyName("parameters"u8); - writer.WriteStartObject(); - foreach (var item in Parameters) - { - writer.WritePropertyName(item.Key); - writer.WriteObjectValue(item.Value); - } - writer.WriteEndObject(); - } - if (Optional.IsCollectionDefined(Annotations)) - { - writer.WritePropertyName("annotations"u8); - writer.WriteStartArray(); - foreach (var item in Annotations) - { - if (item == null) - { - writer.WriteNullValue(); - continue; - } -#if NET6_0_OR_GREATER - writer.WriteRawValue(item); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.ToString()).RootElement); -#endif - } - writer.WriteEndArray(); - } - if (Optional.IsDefined(Folder)) - { - writer.WritePropertyName("folder"u8); - writer.WriteObjectValue(Folder); - } - writer.WritePropertyName("typeProperties"u8); - writer.WriteStartObject(); - writer.WritePropertyName("path"u8); - JsonSerializer.Serialize(writer, Path); - writer.WriteEndObject(); - foreach (var item in AdditionalProperties) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.Value.ToString()).RootElement); -#endif - } - writer.WriteEndObject(); - } - - internal static SapEccResourceDataset DeserializeSapEccResourceDataset(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - string type = default; - Optional description = default; - Optional>> structure = default; - Optional>> schema = default; - DataFactoryLinkedServiceReference linkedServiceName = default; - Optional> parameters = default; - Optional> annotations = default; - Optional folder = default; - DataFactoryElement path = default; - IDictionary> additionalProperties = default; - Dictionary> additionalPropertiesDictionary = new Dictionary>(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("type"u8)) - { - type = property.Value.GetString(); - continue; - } - if (property.NameEquals("description"u8)) - { - description = property.Value.GetString(); - continue; - } - if (property.NameEquals("structure"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - structure = JsonSerializer.Deserialize>>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("schema"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - schema = JsonSerializer.Deserialize>>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("linkedServiceName"u8)) - { - linkedServiceName = JsonSerializer.Deserialize(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("parameters"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - Dictionary dictionary = new Dictionary(); - foreach (var property0 in property.Value.EnumerateObject()) - { - dictionary.Add(property0.Name, EntityParameterSpecification.DeserializeEntityParameterSpecification(property0.Value)); - } - parameters = dictionary; - continue; - } - if (property.NameEquals("annotations"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - if (item.ValueKind == JsonValueKind.Null) - { - array.Add(null); - } - else - { - array.Add(BinaryData.FromString(item.GetRawText())); - } - } - annotations = array; - continue; - } - if (property.NameEquals("folder"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - folder = DatasetFolder.DeserializeDatasetFolder(property.Value); - continue; - } - if (property.NameEquals("typeProperties"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - foreach (var property0 in property.Value.EnumerateObject()) - { - if (property0.NameEquals("path"u8)) - { - path = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - } - continue; - } - additionalPropertiesDictionary.Add(property.Name, JsonSerializer.Deserialize>(property.Value.GetRawText())); - } - additionalProperties = additionalPropertiesDictionary; - return new SapEccResourceDataset(type, description.Value, structure.Value, schema.Value, linkedServiceName, Optional.ToDictionary(parameters), Optional.ToList(annotations), folder.Value, additionalProperties, path); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SapEccResourceDataset.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SapEccResourceDataset.cs deleted file mode 100644 index 7bacc014..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SapEccResourceDataset.cs +++ /dev/null @@ -1,46 +0,0 @@ -// - -#nullable disable - -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// The path of the SAP ECC OData entity. - public partial class SapEccResourceDataset : DataFactoryDatasetProperties - { - /// Initializes a new instance of SapEccResourceDataset. - /// Linked service reference. - /// The path of the SAP ECC OData entity. Type: string (or Expression with resultType string). - /// or is null. - public SapEccResourceDataset(DataFactoryLinkedServiceReference linkedServiceName, DataFactoryElement path) : base(linkedServiceName) - { - Argument.AssertNotNull(linkedServiceName, nameof(linkedServiceName)); - Argument.AssertNotNull(path, nameof(path)); - - Path = path; - DatasetType = "SapEccResource"; - } - - /// Initializes a new instance of SapEccResourceDataset. - /// Type of dataset. - /// Dataset description. - /// Columns that define the structure of the dataset. Type: array (or Expression with resultType array), itemType: DatasetDataElement. - /// Columns that define the physical type schema of the dataset. Type: array (or Expression with resultType array), itemType: DatasetSchemaDataElement. - /// Linked service reference. - /// Parameters for dataset. - /// List of tags that can be used for describing the Dataset. - /// The folder that this Dataset is in. If not specified, Dataset will appear at the root level. - /// Additional Properties. - /// The path of the SAP ECC OData entity. Type: string (or Expression with resultType string). - internal SapEccResourceDataset(string datasetType, string description, DataFactoryElement> structure, DataFactoryElement> schema, DataFactoryLinkedServiceReference linkedServiceName, IDictionary parameters, IList annotations, DatasetFolder folder, IDictionary> additionalProperties, DataFactoryElement path) : base(datasetType, description, structure, schema, linkedServiceName, parameters, annotations, folder, additionalProperties) - { - Path = path; - DatasetType = datasetType ?? "SapEccResource"; - } - - /// The path of the SAP ECC OData entity. Type: string (or Expression with resultType string). - public DataFactoryElement Path { get; set; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SapEccSource.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SapEccSource.Serialization.cs deleted file mode 100644 index e2b80529..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SapEccSource.Serialization.cs +++ /dev/null @@ -1,176 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class SapEccSource : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - if (Optional.IsDefined(Query)) - { - writer.WritePropertyName("query"u8); - JsonSerializer.Serialize(writer, Query); - } - if (Optional.IsDefined(HttpRequestTimeout)) - { - writer.WritePropertyName("httpRequestTimeout"u8); - JsonSerializer.Serialize(writer, HttpRequestTimeout); - } - if (Optional.IsDefined(QueryTimeout)) - { - writer.WritePropertyName("queryTimeout"u8); - JsonSerializer.Serialize(writer, QueryTimeout); - } - if (Optional.IsDefined(AdditionalColumns)) - { - writer.WritePropertyName("additionalColumns"u8); -#if NET6_0_OR_GREATER - writer.WriteRawValue(AdditionalColumns); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(AdditionalColumns.ToString()).RootElement); -#endif - } - writer.WritePropertyName("type"u8); - writer.WriteStringValue(CopySourceType); - if (Optional.IsDefined(SourceRetryCount)) - { - writer.WritePropertyName("sourceRetryCount"u8); - JsonSerializer.Serialize(writer, SourceRetryCount); - } - if (Optional.IsDefined(SourceRetryWait)) - { - writer.WritePropertyName("sourceRetryWait"u8); - JsonSerializer.Serialize(writer, SourceRetryWait); - } - if (Optional.IsDefined(MaxConcurrentConnections)) - { - writer.WritePropertyName("maxConcurrentConnections"u8); - JsonSerializer.Serialize(writer, MaxConcurrentConnections); - } - if (Optional.IsDefined(DisableMetricsCollection)) - { - writer.WritePropertyName("disableMetricsCollection"u8); - JsonSerializer.Serialize(writer, DisableMetricsCollection); - } - foreach (var item in AdditionalProperties) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.Value.ToString()).RootElement); -#endif - } - writer.WriteEndObject(); - } - - internal static SapEccSource DeserializeSapEccSource(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - Optional> query = default; - Optional> httpRequestTimeout = default; - Optional> queryTimeout = default; - Optional additionalColumns = default; - string type = default; - Optional> sourceRetryCount = default; - Optional> sourceRetryWait = default; - Optional> maxConcurrentConnections = default; - Optional> disableMetricsCollection = default; - IDictionary> additionalProperties = default; - Dictionary> additionalPropertiesDictionary = new Dictionary>(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("query"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - query = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("httpRequestTimeout"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - httpRequestTimeout = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("queryTimeout"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - queryTimeout = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("additionalColumns"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - additionalColumns = BinaryData.FromString(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("type"u8)) - { - type = property.Value.GetString(); - continue; - } - if (property.NameEquals("sourceRetryCount"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - sourceRetryCount = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("sourceRetryWait"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - sourceRetryWait = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("maxConcurrentConnections"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - maxConcurrentConnections = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("disableMetricsCollection"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - disableMetricsCollection = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - additionalPropertiesDictionary.Add(property.Name, JsonSerializer.Deserialize>(property.Value.GetRawText())); - } - additionalProperties = additionalPropertiesDictionary; - return new SapEccSource(type, sourceRetryCount.Value, sourceRetryWait.Value, maxConcurrentConnections.Value, disableMetricsCollection.Value, additionalProperties, queryTimeout.Value, additionalColumns.Value, query.Value, httpRequestTimeout.Value); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SapEccSource.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SapEccSource.cs deleted file mode 100644 index 7d475e12..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SapEccSource.cs +++ /dev/null @@ -1,41 +0,0 @@ -// - -#nullable disable - -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// A copy activity source for SAP ECC source. - public partial class SapEccSource : TabularSource - { - /// Initializes a new instance of SapEccSource. - public SapEccSource() - { - CopySourceType = "SapEccSource"; - } - - /// Initializes a new instance of SapEccSource. - /// Copy source type. - /// Source retry count. Type: integer (or Expression with resultType integer). - /// Source retry wait. Type: string (or Expression with resultType string), pattern: ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). - /// The maximum concurrent connection count for the source data store. Type: integer (or Expression with resultType integer). - /// If true, disable data store metrics collection. Default is false. Type: boolean (or Expression with resultType boolean). - /// Additional Properties. - /// 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). - /// SAP ECC OData query. For example, "$top=1". Type: string (or Expression with resultType string). - /// The timeout (TimeSpan) to get an HTTP response. It is the timeout to get a response, not the timeout to read response data. Default value: 00:05:00. Type: string (or Expression with resultType string), pattern: ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). - internal SapEccSource(string copySourceType, DataFactoryElement sourceRetryCount, DataFactoryElement sourceRetryWait, DataFactoryElement maxConcurrentConnections, DataFactoryElement disableMetricsCollection, IDictionary> additionalProperties, DataFactoryElement queryTimeout, BinaryData additionalColumns, DataFactoryElement query, DataFactoryElement httpRequestTimeout) : base(copySourceType, sourceRetryCount, sourceRetryWait, maxConcurrentConnections, disableMetricsCollection, additionalProperties, queryTimeout, additionalColumns) - { - Query = query; - HttpRequestTimeout = httpRequestTimeout; - CopySourceType = copySourceType ?? "SapEccSource"; - } - - /// SAP ECC OData query. For example, "$top=1". Type: string (or Expression with resultType string). - public DataFactoryElement Query { get; set; } - /// The timeout (TimeSpan) to get an HTTP response. It is the timeout to get a response, not the timeout to read response data. Default value: 00:05:00. Type: string (or Expression with resultType string), pattern: ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). - public DataFactoryElement HttpRequestTimeout { get; set; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SapHanaAuthenticationType.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SapHanaAuthenticationType.cs deleted file mode 100644 index b4a87f22..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SapHanaAuthenticationType.cs +++ /dev/null @@ -1,47 +0,0 @@ -// - -#nullable disable - -using System.ComponentModel; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// The authentication type to be used to connect to the SAP HANA server. - public readonly partial struct SapHanaAuthenticationType : IEquatable - { - private readonly string _value; - - /// Initializes a new instance of . - /// is null. - public SapHanaAuthenticationType(string value) - { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } - - private const string BasicValue = "Basic"; - private const string WindowsValue = "Windows"; - - /// Basic. - public static SapHanaAuthenticationType Basic { get; } = new SapHanaAuthenticationType(BasicValue); - /// Windows. - public static SapHanaAuthenticationType Windows { get; } = new SapHanaAuthenticationType(WindowsValue); - /// Determines if two values are the same. - public static bool operator ==(SapHanaAuthenticationType left, SapHanaAuthenticationType right) => left.Equals(right); - /// Determines if two values are not the same. - public static bool operator !=(SapHanaAuthenticationType left, SapHanaAuthenticationType right) => !left.Equals(right); - /// Converts a string to a . - public static implicit operator SapHanaAuthenticationType(string value) => new SapHanaAuthenticationType(value); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override bool Equals(object obj) => obj is SapHanaAuthenticationType other && Equals(other); - /// - public bool Equals(SapHanaAuthenticationType other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override int GetHashCode() => _value?.GetHashCode() ?? 0; - /// - public override string ToString() => _value; - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SapHanaLinkedService.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SapHanaLinkedService.Serialization.cs deleted file mode 100644 index 8f025726..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SapHanaLinkedService.Serialization.cs +++ /dev/null @@ -1,246 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class SapHanaLinkedService : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - writer.WritePropertyName("type"u8); - writer.WriteStringValue(LinkedServiceType); - if (Optional.IsDefined(ConnectVia)) - { - writer.WritePropertyName("connectVia"u8); - writer.WriteObjectValue(ConnectVia); - } - if (Optional.IsDefined(Description)) - { - writer.WritePropertyName("description"u8); - writer.WriteStringValue(Description); - } - if (Optional.IsCollectionDefined(Parameters)) - { - writer.WritePropertyName("parameters"u8); - writer.WriteStartObject(); - foreach (var item in Parameters) - { - writer.WritePropertyName(item.Key); - writer.WriteObjectValue(item.Value); - } - writer.WriteEndObject(); - } - if (Optional.IsCollectionDefined(Annotations)) - { - writer.WritePropertyName("annotations"u8); - writer.WriteStartArray(); - foreach (var item in Annotations) - { - if (item == null) - { - writer.WriteNullValue(); - continue; - } -#if NET6_0_OR_GREATER - writer.WriteRawValue(item); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.ToString()).RootElement); -#endif - } - writer.WriteEndArray(); - } - writer.WritePropertyName("typeProperties"u8); - writer.WriteStartObject(); - if (Optional.IsDefined(ConnectionString)) - { - writer.WritePropertyName("connectionString"u8); - JsonSerializer.Serialize(writer, ConnectionString); - } - if (Optional.IsDefined(Server)) - { - writer.WritePropertyName("server"u8); - JsonSerializer.Serialize(writer, Server); - } - if (Optional.IsDefined(AuthenticationType)) - { - writer.WritePropertyName("authenticationType"u8); - writer.WriteStringValue(AuthenticationType.Value.ToString()); - } - if (Optional.IsDefined(UserName)) - { - writer.WritePropertyName("userName"u8); - JsonSerializer.Serialize(writer, UserName); - } - if (Optional.IsDefined(Password)) - { - writer.WritePropertyName("password"u8); - JsonSerializer.Serialize(writer, Password); - } - if (Optional.IsDefined(EncryptedCredential)) - { - writer.WritePropertyName("encryptedCredential"u8); - writer.WriteStringValue(EncryptedCredential); - } - writer.WriteEndObject(); - foreach (var item in AdditionalProperties) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.Value.ToString()).RootElement); -#endif - } - writer.WriteEndObject(); - } - - internal static SapHanaLinkedService DeserializeSapHanaLinkedService(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - string type = default; - Optional connectVia = default; - Optional description = default; - Optional> parameters = default; - Optional> annotations = default; - Optional> connectionString = default; - Optional> server = default; - Optional authenticationType = default; - Optional> userName = default; - Optional password = default; - Optional encryptedCredential = default; - IDictionary> additionalProperties = default; - Dictionary> additionalPropertiesDictionary = new Dictionary>(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("type"u8)) - { - type = property.Value.GetString(); - continue; - } - if (property.NameEquals("connectVia"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - connectVia = IntegrationRuntimeReference.DeserializeIntegrationRuntimeReference(property.Value); - continue; - } - if (property.NameEquals("description"u8)) - { - description = property.Value.GetString(); - continue; - } - if (property.NameEquals("parameters"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - Dictionary dictionary = new Dictionary(); - foreach (var property0 in property.Value.EnumerateObject()) - { - dictionary.Add(property0.Name, EntityParameterSpecification.DeserializeEntityParameterSpecification(property0.Value)); - } - parameters = dictionary; - continue; - } - if (property.NameEquals("annotations"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - if (item.ValueKind == JsonValueKind.Null) - { - array.Add(null); - } - else - { - array.Add(BinaryData.FromString(item.GetRawText())); - } - } - annotations = array; - continue; - } - if (property.NameEquals("typeProperties"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - foreach (var property0 in property.Value.EnumerateObject()) - { - if (property0.NameEquals("connectionString"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - connectionString = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("server"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - server = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("authenticationType"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - authenticationType = new SapHanaAuthenticationType(property0.Value.GetString()); - continue; - } - if (property0.NameEquals("userName"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - userName = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("password"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - password = JsonSerializer.Deserialize(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("encryptedCredential"u8)) - { - encryptedCredential = property0.Value.GetString(); - continue; - } - } - continue; - } - additionalPropertiesDictionary.Add(property.Name, JsonSerializer.Deserialize>(property.Value.GetRawText())); - } - additionalProperties = additionalPropertiesDictionary; - return new SapHanaLinkedService(type, connectVia.Value, description.Value, Optional.ToDictionary(parameters), Optional.ToList(annotations), additionalProperties, connectionString.Value, server.Value, Optional.ToNullable(authenticationType), userName.Value, password, encryptedCredential.Value); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SapHanaLinkedService.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SapHanaLinkedService.cs deleted file mode 100644 index 9090911d..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SapHanaLinkedService.cs +++ /dev/null @@ -1,55 +0,0 @@ -// - -#nullable disable - -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// SAP HANA Linked Service. - public partial class SapHanaLinkedService : DataFactoryLinkedServiceProperties - { - /// Initializes a new instance of SapHanaLinkedService. - public SapHanaLinkedService() - { - LinkedServiceType = "SapHana"; - } - - /// Initializes a new instance of SapHanaLinkedService. - /// Type of linked service. - /// The integration runtime reference. - /// Linked service description. - /// Parameters for linked service. - /// List of tags that can be used for describing the linked service. - /// Additional Properties. - /// SAP HANA ODBC connection string. Type: string, SecureString or AzureKeyVaultSecretReference. - /// Host name of the SAP HANA server. Type: string (or Expression with resultType string). - /// The authentication type to be used to connect to the SAP HANA server. - /// Username to access the SAP HANA server. Type: string (or Expression with resultType string). - /// Password to access the SAP HANA server. - /// The encrypted credential used for authentication. Credentials are encrypted using the integration runtime credential manager. Type: string. - internal SapHanaLinkedService(string linkedServiceType, IntegrationRuntimeReference connectVia, string description, IDictionary parameters, IList annotations, IDictionary> additionalProperties, DataFactoryElement connectionString, DataFactoryElement server, SapHanaAuthenticationType? authenticationType, DataFactoryElement userName, DataFactorySecretBaseDefinition password, string encryptedCredential) : base(linkedServiceType, connectVia, description, parameters, annotations, additionalProperties) - { - ConnectionString = connectionString; - Server = server; - AuthenticationType = authenticationType; - UserName = userName; - Password = password; - EncryptedCredential = encryptedCredential; - LinkedServiceType = linkedServiceType ?? "SapHana"; - } - - /// SAP HANA ODBC connection string. Type: string, SecureString or AzureKeyVaultSecretReference. - public DataFactoryElement ConnectionString { get; set; } - /// Host name of the SAP HANA server. Type: string (or Expression with resultType string). - public DataFactoryElement Server { get; set; } - /// The authentication type to be used to connect to the SAP HANA server. - public SapHanaAuthenticationType? AuthenticationType { get; set; } - /// Username to access the SAP HANA server. Type: string (or Expression with resultType string). - public DataFactoryElement UserName { get; set; } - /// Password to access the SAP HANA server. - public DataFactorySecretBaseDefinition Password { get; set; } - /// The encrypted credential used for authentication. Credentials are encrypted using the integration runtime credential manager. Type: string. - public string EncryptedCredential { get; set; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SapHanaPartitionSettings.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SapHanaPartitionSettings.Serialization.cs deleted file mode 100644 index a1fb84a1..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SapHanaPartitionSettings.Serialization.cs +++ /dev/null @@ -1,46 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - internal partial class SapHanaPartitionSettings : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - if (Optional.IsDefined(PartitionColumnName)) - { - writer.WritePropertyName("partitionColumnName"u8); - JsonSerializer.Serialize(writer, PartitionColumnName); - } - writer.WriteEndObject(); - } - - internal static SapHanaPartitionSettings DeserializeSapHanaPartitionSettings(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - Optional> partitionColumnName = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("partitionColumnName"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - partitionColumnName = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - } - return new SapHanaPartitionSettings(partitionColumnName.Value); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SapHanaPartitionSettings.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SapHanaPartitionSettings.cs deleted file mode 100644 index 3c697ddd..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SapHanaPartitionSettings.cs +++ /dev/null @@ -1,27 +0,0 @@ -// - -#nullable disable - -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// The settings that will be leveraged for SAP HANA source partitioning. - internal partial class SapHanaPartitionSettings - { - /// Initializes a new instance of SapHanaPartitionSettings. - public SapHanaPartitionSettings() - { - } - - /// Initializes a new instance of SapHanaPartitionSettings. - /// The name of the column that will be used for proceeding range partitioning. Type: string (or Expression with resultType string). - internal SapHanaPartitionSettings(DataFactoryElement partitionColumnName) - { - PartitionColumnName = partitionColumnName; - } - - /// The name of the column that will be used for proceeding range partitioning. Type: string (or Expression with resultType string). - public DataFactoryElement PartitionColumnName { get; set; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SapHanaSource.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SapHanaSource.Serialization.cs deleted file mode 100644 index d7c5149d..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SapHanaSource.Serialization.cs +++ /dev/null @@ -1,210 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class SapHanaSource : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - if (Optional.IsDefined(Query)) - { - writer.WritePropertyName("query"u8); - JsonSerializer.Serialize(writer, Query); - } - if (Optional.IsDefined(PacketSize)) - { - writer.WritePropertyName("packetSize"u8); - JsonSerializer.Serialize(writer, PacketSize); - } - if (Optional.IsDefined(PartitionOption)) - { - writer.WritePropertyName("partitionOption"u8); -#if NET6_0_OR_GREATER - writer.WriteRawValue(PartitionOption); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(PartitionOption.ToString()).RootElement); -#endif - } - if (Optional.IsDefined(PartitionSettings)) - { - writer.WritePropertyName("partitionSettings"u8); - writer.WriteObjectValue(PartitionSettings); - } - if (Optional.IsDefined(QueryTimeout)) - { - writer.WritePropertyName("queryTimeout"u8); - JsonSerializer.Serialize(writer, QueryTimeout); - } - if (Optional.IsDefined(AdditionalColumns)) - { - writer.WritePropertyName("additionalColumns"u8); -#if NET6_0_OR_GREATER - writer.WriteRawValue(AdditionalColumns); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(AdditionalColumns.ToString()).RootElement); -#endif - } - writer.WritePropertyName("type"u8); - writer.WriteStringValue(CopySourceType); - if (Optional.IsDefined(SourceRetryCount)) - { - writer.WritePropertyName("sourceRetryCount"u8); - JsonSerializer.Serialize(writer, SourceRetryCount); - } - if (Optional.IsDefined(SourceRetryWait)) - { - writer.WritePropertyName("sourceRetryWait"u8); - JsonSerializer.Serialize(writer, SourceRetryWait); - } - if (Optional.IsDefined(MaxConcurrentConnections)) - { - writer.WritePropertyName("maxConcurrentConnections"u8); - JsonSerializer.Serialize(writer, MaxConcurrentConnections); - } - if (Optional.IsDefined(DisableMetricsCollection)) - { - writer.WritePropertyName("disableMetricsCollection"u8); - JsonSerializer.Serialize(writer, DisableMetricsCollection); - } - foreach (var item in AdditionalProperties) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.Value.ToString()).RootElement); -#endif - } - writer.WriteEndObject(); - } - - internal static SapHanaSource DeserializeSapHanaSource(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - Optional> query = default; - Optional> packetSize = default; - Optional partitionOption = default; - Optional partitionSettings = default; - Optional> queryTimeout = default; - Optional additionalColumns = default; - string type = default; - Optional> sourceRetryCount = default; - Optional> sourceRetryWait = default; - Optional> maxConcurrentConnections = default; - Optional> disableMetricsCollection = default; - IDictionary> additionalProperties = default; - Dictionary> additionalPropertiesDictionary = new Dictionary>(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("query"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - query = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("packetSize"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - packetSize = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("partitionOption"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - partitionOption = BinaryData.FromString(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("partitionSettings"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - partitionSettings = SapHanaPartitionSettings.DeserializeSapHanaPartitionSettings(property.Value); - continue; - } - if (property.NameEquals("queryTimeout"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - queryTimeout = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("additionalColumns"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - additionalColumns = BinaryData.FromString(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("type"u8)) - { - type = property.Value.GetString(); - continue; - } - if (property.NameEquals("sourceRetryCount"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - sourceRetryCount = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("sourceRetryWait"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - sourceRetryWait = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("maxConcurrentConnections"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - maxConcurrentConnections = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("disableMetricsCollection"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - disableMetricsCollection = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - additionalPropertiesDictionary.Add(property.Name, JsonSerializer.Deserialize>(property.Value.GetRawText())); - } - additionalProperties = additionalPropertiesDictionary; - return new SapHanaSource(type, sourceRetryCount.Value, sourceRetryWait.Value, maxConcurrentConnections.Value, disableMetricsCollection.Value, additionalProperties, queryTimeout.Value, additionalColumns.Value, query.Value, packetSize.Value, partitionOption.Value, partitionSettings.Value); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SapHanaSource.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SapHanaSource.cs deleted file mode 100644 index b4d15086..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SapHanaSource.cs +++ /dev/null @@ -1,89 +0,0 @@ -// - -#nullable disable - -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// A copy activity source for SAP HANA source. - public partial class SapHanaSource : TabularSource - { - /// Initializes a new instance of SapHanaSource. - public SapHanaSource() - { - CopySourceType = "SapHanaSource"; - } - - /// Initializes a new instance of SapHanaSource. - /// Copy source type. - /// Source retry count. Type: integer (or Expression with resultType integer). - /// Source retry wait. Type: string (or Expression with resultType string), pattern: ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). - /// The maximum concurrent connection count for the source data store. Type: integer (or Expression with resultType integer). - /// If true, disable data store metrics collection. Default is false. Type: boolean (or Expression with resultType boolean). - /// Additional Properties. - /// 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). - /// SAP HANA Sql query. Type: string (or Expression with resultType string). - /// The packet size of data read from SAP HANA. Type: integer(or Expression with resultType integer). - /// The partition mechanism that will be used for SAP HANA read in parallel. Possible values include: "None", "PhysicalPartitionsOfTable", "SapHanaDynamicRange". - /// The settings that will be leveraged for SAP HANA source partitioning. - internal SapHanaSource(string copySourceType, DataFactoryElement sourceRetryCount, DataFactoryElement sourceRetryWait, DataFactoryElement maxConcurrentConnections, DataFactoryElement disableMetricsCollection, IDictionary> additionalProperties, DataFactoryElement queryTimeout, BinaryData additionalColumns, DataFactoryElement query, DataFactoryElement packetSize, BinaryData partitionOption, SapHanaPartitionSettings partitionSettings) : base(copySourceType, sourceRetryCount, sourceRetryWait, maxConcurrentConnections, disableMetricsCollection, additionalProperties, queryTimeout, additionalColumns) - { - Query = query; - PacketSize = packetSize; - PartitionOption = partitionOption; - PartitionSettings = partitionSettings; - CopySourceType = copySourceType ?? "SapHanaSource"; - } - - /// SAP HANA Sql query. Type: string (or Expression with resultType string). - public DataFactoryElement Query { get; set; } - /// The packet size of data read from SAP HANA. Type: integer(or Expression with resultType integer). - public DataFactoryElement PacketSize { get; set; } - /// - /// The partition mechanism that will be used for SAP HANA read in parallel. Possible values include: "None", "PhysicalPartitionsOfTable", "SapHanaDynamicRange". - /// - /// To assign an object to this property use . - /// - /// - /// To assign an already formated json string to this property use . - /// - /// - /// Examples: - /// - /// - /// BinaryData.FromObjectAsJson("foo") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromString("\"foo\"") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromObjectAsJson(new { key = "value" }) - /// Creates a payload of { "key": "value" }. - /// - /// - /// BinaryData.FromString("{\"key\": \"value\"}") - /// Creates a payload of { "key": "value" }. - /// - /// - /// - /// - public BinaryData PartitionOption { get; set; } - /// The settings that will be leveraged for SAP HANA source partitioning. - internal SapHanaPartitionSettings PartitionSettings { get; set; } - /// The name of the column that will be used for proceeding range partitioning. Type: string (or Expression with resultType string). - public DataFactoryElement PartitionColumnName - { - get => PartitionSettings is null ? default : PartitionSettings.PartitionColumnName; - set - { - if (PartitionSettings is null) - PartitionSettings = new SapHanaPartitionSettings(); - PartitionSettings.PartitionColumnName = value; - } - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SapHanaTableDataset.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SapHanaTableDataset.Serialization.cs deleted file mode 100644 index b10bdbb6..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SapHanaTableDataset.Serialization.cs +++ /dev/null @@ -1,227 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class SapHanaTableDataset : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - writer.WritePropertyName("type"u8); - writer.WriteStringValue(DatasetType); - if (Optional.IsDefined(Description)) - { - writer.WritePropertyName("description"u8); - writer.WriteStringValue(Description); - } - if (Optional.IsDefined(Structure)) - { - writer.WritePropertyName("structure"u8); - JsonSerializer.Serialize(writer, Structure); - } - if (Optional.IsDefined(Schema)) - { - writer.WritePropertyName("schema"u8); - JsonSerializer.Serialize(writer, Schema); - } - writer.WritePropertyName("linkedServiceName"u8); - JsonSerializer.Serialize(writer, LinkedServiceName); if (Optional.IsCollectionDefined(Parameters)) - { - writer.WritePropertyName("parameters"u8); - writer.WriteStartObject(); - foreach (var item in Parameters) - { - writer.WritePropertyName(item.Key); - writer.WriteObjectValue(item.Value); - } - writer.WriteEndObject(); - } - if (Optional.IsCollectionDefined(Annotations)) - { - writer.WritePropertyName("annotations"u8); - writer.WriteStartArray(); - foreach (var item in Annotations) - { - if (item == null) - { - writer.WriteNullValue(); - continue; - } -#if NET6_0_OR_GREATER - writer.WriteRawValue(item); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.ToString()).RootElement); -#endif - } - writer.WriteEndArray(); - } - if (Optional.IsDefined(Folder)) - { - writer.WritePropertyName("folder"u8); - writer.WriteObjectValue(Folder); - } - writer.WritePropertyName("typeProperties"u8); - writer.WriteStartObject(); - if (Optional.IsDefined(SchemaTypePropertiesSchema)) - { - writer.WritePropertyName("schema"u8); - JsonSerializer.Serialize(writer, SchemaTypePropertiesSchema); - } - if (Optional.IsDefined(Table)) - { - writer.WritePropertyName("table"u8); - JsonSerializer.Serialize(writer, Table); - } - writer.WriteEndObject(); - foreach (var item in AdditionalProperties) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.Value.ToString()).RootElement); -#endif - } - writer.WriteEndObject(); - } - - internal static SapHanaTableDataset DeserializeSapHanaTableDataset(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - string type = default; - Optional description = default; - Optional>> structure = default; - Optional>> schema = default; - DataFactoryLinkedServiceReference linkedServiceName = default; - Optional> parameters = default; - Optional> annotations = default; - Optional folder = default; - Optional> schema0 = default; - Optional> table = default; - IDictionary> additionalProperties = default; - Dictionary> additionalPropertiesDictionary = new Dictionary>(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("type"u8)) - { - type = property.Value.GetString(); - continue; - } - if (property.NameEquals("description"u8)) - { - description = property.Value.GetString(); - continue; - } - if (property.NameEquals("structure"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - structure = JsonSerializer.Deserialize>>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("schema"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - schema = JsonSerializer.Deserialize>>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("linkedServiceName"u8)) - { - linkedServiceName = JsonSerializer.Deserialize(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("parameters"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - Dictionary dictionary = new Dictionary(); - foreach (var property0 in property.Value.EnumerateObject()) - { - dictionary.Add(property0.Name, EntityParameterSpecification.DeserializeEntityParameterSpecification(property0.Value)); - } - parameters = dictionary; - continue; - } - if (property.NameEquals("annotations"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - if (item.ValueKind == JsonValueKind.Null) - { - array.Add(null); - } - else - { - array.Add(BinaryData.FromString(item.GetRawText())); - } - } - annotations = array; - continue; - } - if (property.NameEquals("folder"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - folder = DatasetFolder.DeserializeDatasetFolder(property.Value); - continue; - } - if (property.NameEquals("typeProperties"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - foreach (var property0 in property.Value.EnumerateObject()) - { - if (property0.NameEquals("schema"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - schema0 = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("table"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - table = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - } - continue; - } - additionalPropertiesDictionary.Add(property.Name, JsonSerializer.Deserialize>(property.Value.GetRawText())); - } - additionalProperties = additionalPropertiesDictionary; - return new SapHanaTableDataset(type, description.Value, structure.Value, schema.Value, linkedServiceName, Optional.ToDictionary(parameters), Optional.ToList(annotations), folder.Value, additionalProperties, schema0.Value, table.Value); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SapHanaTableDataset.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SapHanaTableDataset.cs deleted file mode 100644 index 207d8237..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SapHanaTableDataset.cs +++ /dev/null @@ -1,47 +0,0 @@ -// - -#nullable disable - -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// SAP HANA Table properties. - public partial class SapHanaTableDataset : DataFactoryDatasetProperties - { - /// Initializes a new instance of SapHanaTableDataset. - /// Linked service reference. - /// is null. - public SapHanaTableDataset(DataFactoryLinkedServiceReference linkedServiceName) : base(linkedServiceName) - { - Argument.AssertNotNull(linkedServiceName, nameof(linkedServiceName)); - - DatasetType = "SapHanaTable"; - } - - /// Initializes a new instance of SapHanaTableDataset. - /// Type of dataset. - /// Dataset description. - /// Columns that define the structure of the dataset. Type: array (or Expression with resultType array), itemType: DatasetDataElement. - /// Columns that define the physical type schema of the dataset. Type: array (or Expression with resultType array), itemType: DatasetSchemaDataElement. - /// Linked service reference. - /// Parameters for dataset. - /// List of tags that can be used for describing the Dataset. - /// The folder that this Dataset is in. If not specified, Dataset will appear at the root level. - /// Additional Properties. - /// The schema name of SAP HANA. Type: string (or Expression with resultType string). - /// The table name of SAP HANA. Type: string (or Expression with resultType string). - internal SapHanaTableDataset(string datasetType, string description, DataFactoryElement> structure, DataFactoryElement> schema, DataFactoryLinkedServiceReference linkedServiceName, IDictionary parameters, IList annotations, DatasetFolder folder, IDictionary> additionalProperties, DataFactoryElement schemaTypePropertiesSchema, DataFactoryElement table) : base(datasetType, description, structure, schema, linkedServiceName, parameters, annotations, folder, additionalProperties) - { - SchemaTypePropertiesSchema = schemaTypePropertiesSchema; - Table = table; - DatasetType = datasetType ?? "SapHanaTable"; - } - - /// The schema name of SAP HANA. Type: string (or Expression with resultType string). - public DataFactoryElement SchemaTypePropertiesSchema { get; set; } - /// The table name of SAP HANA. Type: string (or Expression with resultType string). - public DataFactoryElement Table { get; set; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SapOdpLinkedService.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SapOdpLinkedService.Serialization.cs deleted file mode 100644 index b8c61d60..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SapOdpLinkedService.Serialization.cs +++ /dev/null @@ -1,426 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class SapOdpLinkedService : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - writer.WritePropertyName("type"u8); - writer.WriteStringValue(LinkedServiceType); - if (Optional.IsDefined(ConnectVia)) - { - writer.WritePropertyName("connectVia"u8); - writer.WriteObjectValue(ConnectVia); - } - if (Optional.IsDefined(Description)) - { - writer.WritePropertyName("description"u8); - writer.WriteStringValue(Description); - } - if (Optional.IsCollectionDefined(Parameters)) - { - writer.WritePropertyName("parameters"u8); - writer.WriteStartObject(); - foreach (var item in Parameters) - { - writer.WritePropertyName(item.Key); - writer.WriteObjectValue(item.Value); - } - writer.WriteEndObject(); - } - if (Optional.IsCollectionDefined(Annotations)) - { - writer.WritePropertyName("annotations"u8); - writer.WriteStartArray(); - foreach (var item in Annotations) - { - if (item == null) - { - writer.WriteNullValue(); - continue; - } -#if NET6_0_OR_GREATER - writer.WriteRawValue(item); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.ToString()).RootElement); -#endif - } - writer.WriteEndArray(); - } - writer.WritePropertyName("typeProperties"u8); - writer.WriteStartObject(); - if (Optional.IsDefined(Server)) - { - writer.WritePropertyName("server"u8); - JsonSerializer.Serialize(writer, Server); - } - if (Optional.IsDefined(SystemNumber)) - { - writer.WritePropertyName("systemNumber"u8); - JsonSerializer.Serialize(writer, SystemNumber); - } - if (Optional.IsDefined(ClientId)) - { - writer.WritePropertyName("clientId"u8); - JsonSerializer.Serialize(writer, ClientId); - } - if (Optional.IsDefined(Language)) - { - writer.WritePropertyName("language"u8); - JsonSerializer.Serialize(writer, Language); - } - if (Optional.IsDefined(SystemId)) - { - writer.WritePropertyName("systemId"u8); - JsonSerializer.Serialize(writer, SystemId); - } - if (Optional.IsDefined(UserName)) - { - writer.WritePropertyName("userName"u8); - JsonSerializer.Serialize(writer, UserName); - } - if (Optional.IsDefined(Password)) - { - writer.WritePropertyName("password"u8); - JsonSerializer.Serialize(writer, Password); - } - if (Optional.IsDefined(MessageServer)) - { - writer.WritePropertyName("messageServer"u8); - JsonSerializer.Serialize(writer, MessageServer); - } - if (Optional.IsDefined(MessageServerService)) - { - writer.WritePropertyName("messageServerService"u8); - JsonSerializer.Serialize(writer, MessageServerService); - } - if (Optional.IsDefined(SncMode)) - { - writer.WritePropertyName("sncMode"u8); - JsonSerializer.Serialize(writer, SncMode); - } - if (Optional.IsDefined(SncMyName)) - { - writer.WritePropertyName("sncMyName"u8); - JsonSerializer.Serialize(writer, SncMyName); - } - if (Optional.IsDefined(SncPartnerName)) - { - writer.WritePropertyName("sncPartnerName"u8); - JsonSerializer.Serialize(writer, SncPartnerName); - } - if (Optional.IsDefined(SncLibraryPath)) - { - writer.WritePropertyName("sncLibraryPath"u8); - JsonSerializer.Serialize(writer, SncLibraryPath); - } - if (Optional.IsDefined(SncQop)) - { - writer.WritePropertyName("sncQop"u8); - JsonSerializer.Serialize(writer, SncQop); - } - if (Optional.IsDefined(X509CertificatePath)) - { - writer.WritePropertyName("x509CertificatePath"u8); - JsonSerializer.Serialize(writer, X509CertificatePath); - } - if (Optional.IsDefined(LogonGroup)) - { - writer.WritePropertyName("logonGroup"u8); - JsonSerializer.Serialize(writer, LogonGroup); - } - if (Optional.IsDefined(SubscriberName)) - { - writer.WritePropertyName("subscriberName"u8); - JsonSerializer.Serialize(writer, SubscriberName); - } - if (Optional.IsDefined(EncryptedCredential)) - { - writer.WritePropertyName("encryptedCredential"u8); - writer.WriteStringValue(EncryptedCredential); - } - writer.WriteEndObject(); - foreach (var item in AdditionalProperties) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.Value.ToString()).RootElement); -#endif - } - writer.WriteEndObject(); - } - - internal static SapOdpLinkedService DeserializeSapOdpLinkedService(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - string type = default; - Optional connectVia = default; - Optional description = default; - Optional> parameters = default; - Optional> annotations = default; - Optional> server = default; - Optional> systemNumber = default; - Optional> clientId = default; - Optional> language = default; - Optional> systemId = default; - Optional> userName = default; - Optional password = default; - Optional> messageServer = default; - Optional> messageServerService = default; - Optional> sncMode = default; - Optional> sncMyName = default; - Optional> sncPartnerName = default; - Optional> sncLibraryPath = default; - Optional> sncQop = default; - Optional> x509CertificatePath = default; - Optional> logonGroup = default; - Optional> subscriberName = default; - Optional encryptedCredential = default; - IDictionary> additionalProperties = default; - Dictionary> additionalPropertiesDictionary = new Dictionary>(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("type"u8)) - { - type = property.Value.GetString(); - continue; - } - if (property.NameEquals("connectVia"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - connectVia = IntegrationRuntimeReference.DeserializeIntegrationRuntimeReference(property.Value); - continue; - } - if (property.NameEquals("description"u8)) - { - description = property.Value.GetString(); - continue; - } - if (property.NameEquals("parameters"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - Dictionary dictionary = new Dictionary(); - foreach (var property0 in property.Value.EnumerateObject()) - { - dictionary.Add(property0.Name, EntityParameterSpecification.DeserializeEntityParameterSpecification(property0.Value)); - } - parameters = dictionary; - continue; - } - if (property.NameEquals("annotations"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - if (item.ValueKind == JsonValueKind.Null) - { - array.Add(null); - } - else - { - array.Add(BinaryData.FromString(item.GetRawText())); - } - } - annotations = array; - continue; - } - if (property.NameEquals("typeProperties"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - foreach (var property0 in property.Value.EnumerateObject()) - { - if (property0.NameEquals("server"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - server = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("systemNumber"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - systemNumber = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("clientId"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - clientId = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("language"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - language = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("systemId"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - systemId = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("userName"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - userName = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("password"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - password = JsonSerializer.Deserialize(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("messageServer"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - messageServer = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("messageServerService"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - messageServerService = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("sncMode"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - sncMode = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("sncMyName"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - sncMyName = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("sncPartnerName"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - sncPartnerName = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("sncLibraryPath"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - sncLibraryPath = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("sncQop"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - sncQop = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("x509CertificatePath"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - x509CertificatePath = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("logonGroup"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - logonGroup = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("subscriberName"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - subscriberName = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("encryptedCredential"u8)) - { - encryptedCredential = property0.Value.GetString(); - continue; - } - } - continue; - } - additionalPropertiesDictionary.Add(property.Name, JsonSerializer.Deserialize>(property.Value.GetRawText())); - } - additionalProperties = additionalPropertiesDictionary; - return new SapOdpLinkedService(type, connectVia.Value, description.Value, Optional.ToDictionary(parameters), Optional.ToList(annotations), additionalProperties, server.Value, systemNumber.Value, clientId.Value, language.Value, systemId.Value, userName.Value, password, messageServer.Value, messageServerService.Value, sncMode.Value, sncMyName.Value, sncPartnerName.Value, sncLibraryPath.Value, sncQop.Value, x509CertificatePath.Value, logonGroup.Value, subscriberName.Value, encryptedCredential.Value); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SapOdpLinkedService.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SapOdpLinkedService.cs deleted file mode 100644 index 0a0c06e4..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SapOdpLinkedService.cs +++ /dev/null @@ -1,103 +0,0 @@ -// - -#nullable disable - -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// SAP ODP Linked Service. - public partial class SapOdpLinkedService : DataFactoryLinkedServiceProperties - { - /// Initializes a new instance of SapOdpLinkedService. - public SapOdpLinkedService() - { - LinkedServiceType = "SapOdp"; - } - - /// Initializes a new instance of SapOdpLinkedService. - /// Type of linked service. - /// The integration runtime reference. - /// Linked service description. - /// Parameters for linked service. - /// List of tags that can be used for describing the linked service. - /// Additional Properties. - /// Host name of the SAP instance where the table is located. Type: string (or Expression with resultType string). - /// System number of the SAP system where the table is located. (Usually a two-digit decimal number represented as a string.) Type: string (or Expression with resultType string). - /// Client ID of the client on the SAP system where the table is located. (Usually a three-digit decimal number represented as a string) Type: string (or Expression with resultType string). - /// Language of the SAP system where the table is located. The default value is EN. Type: string (or Expression with resultType string). - /// SystemID of the SAP system where the table is located. Type: string (or Expression with resultType string). - /// Username to access the SAP server where the table is located. Type: string (or Expression with resultType string). - /// Password to access the SAP server where the table is located. - /// The hostname of the SAP Message Server. Type: string (or Expression with resultType string). - /// The service name or port number of the Message Server. Type: string (or Expression with resultType string). - /// SNC activation indicator to access the SAP server where the table is located. Must be either 0 (off) or 1 (on). Type: string (or Expression with resultType string). - /// Initiator's SNC name to access the SAP server where the table is located. Type: string (or Expression with resultType string). - /// Communication partner's SNC name to access the SAP server where the table is located. Type: string (or Expression with resultType string). - /// External security product's library to access the SAP server where the table is located. Type: string (or Expression with resultType string). - /// SNC Quality of Protection. Allowed value include: 1, 2, 3, 8, 9. Type: string (or Expression with resultType string). - /// SNC X509 certificate file path. Type: string (or Expression with resultType string). - /// The Logon Group for the SAP System. Type: string (or Expression with resultType string). - /// The subscriber name. Type: string (or Expression with resultType string). - /// The encrypted credential used for authentication. Credentials are encrypted using the integration runtime credential manager. Type: string. - internal SapOdpLinkedService(string linkedServiceType, IntegrationRuntimeReference connectVia, string description, IDictionary parameters, IList annotations, IDictionary> additionalProperties, DataFactoryElement server, DataFactoryElement systemNumber, DataFactoryElement clientId, DataFactoryElement language, DataFactoryElement systemId, DataFactoryElement userName, DataFactorySecretBaseDefinition password, DataFactoryElement messageServer, DataFactoryElement messageServerService, DataFactoryElement sncMode, DataFactoryElement sncMyName, DataFactoryElement sncPartnerName, DataFactoryElement sncLibraryPath, DataFactoryElement sncQop, DataFactoryElement x509CertificatePath, DataFactoryElement logonGroup, DataFactoryElement subscriberName, string encryptedCredential) : base(linkedServiceType, connectVia, description, parameters, annotations, additionalProperties) - { - Server = server; - SystemNumber = systemNumber; - ClientId = clientId; - Language = language; - SystemId = systemId; - UserName = userName; - Password = password; - MessageServer = messageServer; - MessageServerService = messageServerService; - SncMode = sncMode; - SncMyName = sncMyName; - SncPartnerName = sncPartnerName; - SncLibraryPath = sncLibraryPath; - SncQop = sncQop; - X509CertificatePath = x509CertificatePath; - LogonGroup = logonGroup; - SubscriberName = subscriberName; - EncryptedCredential = encryptedCredential; - LinkedServiceType = linkedServiceType ?? "SapOdp"; - } - - /// Host name of the SAP instance where the table is located. Type: string (or Expression with resultType string). - public DataFactoryElement Server { get; set; } - /// System number of the SAP system where the table is located. (Usually a two-digit decimal number represented as a string.) Type: string (or Expression with resultType string). - public DataFactoryElement SystemNumber { get; set; } - /// Client ID of the client on the SAP system where the table is located. (Usually a three-digit decimal number represented as a string) Type: string (or Expression with resultType string). - public DataFactoryElement ClientId { get; set; } - /// Language of the SAP system where the table is located. The default value is EN. Type: string (or Expression with resultType string). - public DataFactoryElement Language { get; set; } - /// SystemID of the SAP system where the table is located. Type: string (or Expression with resultType string). - public DataFactoryElement SystemId { get; set; } - /// Username to access the SAP server where the table is located. Type: string (or Expression with resultType string). - public DataFactoryElement UserName { get; set; } - /// Password to access the SAP server where the table is located. - public DataFactorySecretBaseDefinition Password { get; set; } - /// The hostname of the SAP Message Server. Type: string (or Expression with resultType string). - public DataFactoryElement MessageServer { get; set; } - /// The service name or port number of the Message Server. Type: string (or Expression with resultType string). - public DataFactoryElement MessageServerService { get; set; } - /// SNC activation indicator to access the SAP server where the table is located. Must be either 0 (off) or 1 (on). Type: string (or Expression with resultType string). - public DataFactoryElement SncMode { get; set; } - /// Initiator's SNC name to access the SAP server where the table is located. Type: string (or Expression with resultType string). - public DataFactoryElement SncMyName { get; set; } - /// Communication partner's SNC name to access the SAP server where the table is located. Type: string (or Expression with resultType string). - public DataFactoryElement SncPartnerName { get; set; } - /// External security product's library to access the SAP server where the table is located. Type: string (or Expression with resultType string). - public DataFactoryElement SncLibraryPath { get; set; } - /// SNC Quality of Protection. Allowed value include: 1, 2, 3, 8, 9. Type: string (or Expression with resultType string). - public DataFactoryElement SncQop { get; set; } - /// SNC X509 certificate file path. Type: string (or Expression with resultType string). - public DataFactoryElement X509CertificatePath { get; set; } - /// The Logon Group for the SAP System. Type: string (or Expression with resultType string). - public DataFactoryElement LogonGroup { get; set; } - /// The subscriber name. Type: string (or Expression with resultType string). - public DataFactoryElement SubscriberName { get; set; } - /// The encrypted credential used for authentication. Credentials are encrypted using the integration runtime credential manager. Type: string. - public string EncryptedCredential { get; set; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SapOdpResourceDataset.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SapOdpResourceDataset.Serialization.cs deleted file mode 100644 index 97dabee0..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SapOdpResourceDataset.Serialization.cs +++ /dev/null @@ -1,213 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class SapOdpResourceDataset : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - writer.WritePropertyName("type"u8); - writer.WriteStringValue(DatasetType); - if (Optional.IsDefined(Description)) - { - writer.WritePropertyName("description"u8); - writer.WriteStringValue(Description); - } - if (Optional.IsDefined(Structure)) - { - writer.WritePropertyName("structure"u8); - JsonSerializer.Serialize(writer, Structure); - } - if (Optional.IsDefined(Schema)) - { - writer.WritePropertyName("schema"u8); - JsonSerializer.Serialize(writer, Schema); - } - writer.WritePropertyName("linkedServiceName"u8); - JsonSerializer.Serialize(writer, LinkedServiceName); if (Optional.IsCollectionDefined(Parameters)) - { - writer.WritePropertyName("parameters"u8); - writer.WriteStartObject(); - foreach (var item in Parameters) - { - writer.WritePropertyName(item.Key); - writer.WriteObjectValue(item.Value); - } - writer.WriteEndObject(); - } - if (Optional.IsCollectionDefined(Annotations)) - { - writer.WritePropertyName("annotations"u8); - writer.WriteStartArray(); - foreach (var item in Annotations) - { - if (item == null) - { - writer.WriteNullValue(); - continue; - } -#if NET6_0_OR_GREATER - writer.WriteRawValue(item); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.ToString()).RootElement); -#endif - } - writer.WriteEndArray(); - } - if (Optional.IsDefined(Folder)) - { - writer.WritePropertyName("folder"u8); - writer.WriteObjectValue(Folder); - } - writer.WritePropertyName("typeProperties"u8); - writer.WriteStartObject(); - writer.WritePropertyName("context"u8); - JsonSerializer.Serialize(writer, Context); - writer.WritePropertyName("objectName"u8); - JsonSerializer.Serialize(writer, ObjectName); - writer.WriteEndObject(); - foreach (var item in AdditionalProperties) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.Value.ToString()).RootElement); -#endif - } - writer.WriteEndObject(); - } - - internal static SapOdpResourceDataset DeserializeSapOdpResourceDataset(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - string type = default; - Optional description = default; - Optional>> structure = default; - Optional>> schema = default; - DataFactoryLinkedServiceReference linkedServiceName = default; - Optional> parameters = default; - Optional> annotations = default; - Optional folder = default; - DataFactoryElement context = default; - DataFactoryElement objectName = default; - IDictionary> additionalProperties = default; - Dictionary> additionalPropertiesDictionary = new Dictionary>(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("type"u8)) - { - type = property.Value.GetString(); - continue; - } - if (property.NameEquals("description"u8)) - { - description = property.Value.GetString(); - continue; - } - if (property.NameEquals("structure"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - structure = JsonSerializer.Deserialize>>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("schema"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - schema = JsonSerializer.Deserialize>>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("linkedServiceName"u8)) - { - linkedServiceName = JsonSerializer.Deserialize(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("parameters"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - Dictionary dictionary = new Dictionary(); - foreach (var property0 in property.Value.EnumerateObject()) - { - dictionary.Add(property0.Name, EntityParameterSpecification.DeserializeEntityParameterSpecification(property0.Value)); - } - parameters = dictionary; - continue; - } - if (property.NameEquals("annotations"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - if (item.ValueKind == JsonValueKind.Null) - { - array.Add(null); - } - else - { - array.Add(BinaryData.FromString(item.GetRawText())); - } - } - annotations = array; - continue; - } - if (property.NameEquals("folder"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - folder = DatasetFolder.DeserializeDatasetFolder(property.Value); - continue; - } - if (property.NameEquals("typeProperties"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - foreach (var property0 in property.Value.EnumerateObject()) - { - if (property0.NameEquals("context"u8)) - { - context = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("objectName"u8)) - { - objectName = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - } - continue; - } - additionalPropertiesDictionary.Add(property.Name, JsonSerializer.Deserialize>(property.Value.GetRawText())); - } - additionalProperties = additionalPropertiesDictionary; - return new SapOdpResourceDataset(type, description.Value, structure.Value, schema.Value, linkedServiceName, Optional.ToDictionary(parameters), Optional.ToList(annotations), folder.Value, additionalProperties, context, objectName); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SapOdpResourceDataset.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SapOdpResourceDataset.cs deleted file mode 100644 index 776ef7a2..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SapOdpResourceDataset.cs +++ /dev/null @@ -1,53 +0,0 @@ -// - -#nullable disable - -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// SAP ODP Resource properties. - public partial class SapOdpResourceDataset : DataFactoryDatasetProperties - { - /// Initializes a new instance of SapOdpResourceDataset. - /// Linked service reference. - /// The context of the SAP ODP Object. Type: string (or Expression with resultType string). - /// The name of the SAP ODP Object. Type: string (or Expression with resultType string). - /// , or is null. - public SapOdpResourceDataset(DataFactoryLinkedServiceReference linkedServiceName, DataFactoryElement context, DataFactoryElement objectName) : base(linkedServiceName) - { - Argument.AssertNotNull(linkedServiceName, nameof(linkedServiceName)); - Argument.AssertNotNull(context, nameof(context)); - Argument.AssertNotNull(objectName, nameof(objectName)); - - Context = context; - ObjectName = objectName; - DatasetType = "SapOdpResource"; - } - - /// Initializes a new instance of SapOdpResourceDataset. - /// Type of dataset. - /// Dataset description. - /// Columns that define the structure of the dataset. Type: array (or Expression with resultType array), itemType: DatasetDataElement. - /// Columns that define the physical type schema of the dataset. Type: array (or Expression with resultType array), itemType: DatasetSchemaDataElement. - /// Linked service reference. - /// Parameters for dataset. - /// List of tags that can be used for describing the Dataset. - /// The folder that this Dataset is in. If not specified, Dataset will appear at the root level. - /// Additional Properties. - /// The context of the SAP ODP Object. Type: string (or Expression with resultType string). - /// The name of the SAP ODP Object. Type: string (or Expression with resultType string). - internal SapOdpResourceDataset(string datasetType, string description, DataFactoryElement> structure, DataFactoryElement> schema, DataFactoryLinkedServiceReference linkedServiceName, IDictionary parameters, IList annotations, DatasetFolder folder, IDictionary> additionalProperties, DataFactoryElement context, DataFactoryElement objectName) : base(datasetType, description, structure, schema, linkedServiceName, parameters, annotations, folder, additionalProperties) - { - Context = context; - ObjectName = objectName; - DatasetType = datasetType ?? "SapOdpResource"; - } - - /// The context of the SAP ODP Object. Type: string (or Expression with resultType string). - public DataFactoryElement Context { get; set; } - /// The name of the SAP ODP Object. Type: string (or Expression with resultType string). - public DataFactoryElement ObjectName { get; set; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SapOdpSource.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SapOdpSource.Serialization.cs deleted file mode 100644 index 8597e7c9..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SapOdpSource.Serialization.cs +++ /dev/null @@ -1,214 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class SapOdpSource : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - if (Optional.IsDefined(ExtractionMode)) - { - writer.WritePropertyName("extractionMode"u8); - JsonSerializer.Serialize(writer, ExtractionMode); - } - if (Optional.IsDefined(SubscriberProcess)) - { - writer.WritePropertyName("subscriberProcess"u8); - JsonSerializer.Serialize(writer, SubscriberProcess); - } - if (Optional.IsDefined(Selection)) - { - writer.WritePropertyName("selection"u8); -#if NET6_0_OR_GREATER - writer.WriteRawValue(Selection); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(Selection.ToString()).RootElement); -#endif - } - if (Optional.IsDefined(Projection)) - { - writer.WritePropertyName("projection"u8); -#if NET6_0_OR_GREATER - writer.WriteRawValue(Projection); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(Projection.ToString()).RootElement); -#endif - } - if (Optional.IsDefined(QueryTimeout)) - { - writer.WritePropertyName("queryTimeout"u8); - JsonSerializer.Serialize(writer, QueryTimeout); - } - if (Optional.IsDefined(AdditionalColumns)) - { - writer.WritePropertyName("additionalColumns"u8); -#if NET6_0_OR_GREATER - writer.WriteRawValue(AdditionalColumns); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(AdditionalColumns.ToString()).RootElement); -#endif - } - writer.WritePropertyName("type"u8); - writer.WriteStringValue(CopySourceType); - if (Optional.IsDefined(SourceRetryCount)) - { - writer.WritePropertyName("sourceRetryCount"u8); - JsonSerializer.Serialize(writer, SourceRetryCount); - } - if (Optional.IsDefined(SourceRetryWait)) - { - writer.WritePropertyName("sourceRetryWait"u8); - JsonSerializer.Serialize(writer, SourceRetryWait); - } - if (Optional.IsDefined(MaxConcurrentConnections)) - { - writer.WritePropertyName("maxConcurrentConnections"u8); - JsonSerializer.Serialize(writer, MaxConcurrentConnections); - } - if (Optional.IsDefined(DisableMetricsCollection)) - { - writer.WritePropertyName("disableMetricsCollection"u8); - JsonSerializer.Serialize(writer, DisableMetricsCollection); - } - foreach (var item in AdditionalProperties) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.Value.ToString()).RootElement); -#endif - } - writer.WriteEndObject(); - } - - internal static SapOdpSource DeserializeSapOdpSource(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - Optional> extractionMode = default; - Optional> subscriberProcess = default; - Optional selection = default; - Optional projection = default; - Optional> queryTimeout = default; - Optional additionalColumns = default; - string type = default; - Optional> sourceRetryCount = default; - Optional> sourceRetryWait = default; - Optional> maxConcurrentConnections = default; - Optional> disableMetricsCollection = default; - IDictionary> additionalProperties = default; - Dictionary> additionalPropertiesDictionary = new Dictionary>(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("extractionMode"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - extractionMode = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("subscriberProcess"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - subscriberProcess = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("selection"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - selection = BinaryData.FromString(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("projection"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - projection = BinaryData.FromString(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("queryTimeout"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - queryTimeout = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("additionalColumns"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - additionalColumns = BinaryData.FromString(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("type"u8)) - { - type = property.Value.GetString(); - continue; - } - if (property.NameEquals("sourceRetryCount"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - sourceRetryCount = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("sourceRetryWait"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - sourceRetryWait = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("maxConcurrentConnections"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - maxConcurrentConnections = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("disableMetricsCollection"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - disableMetricsCollection = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - additionalPropertiesDictionary.Add(property.Name, JsonSerializer.Deserialize>(property.Value.GetRawText())); - } - additionalProperties = additionalPropertiesDictionary; - return new SapOdpSource(type, sourceRetryCount.Value, sourceRetryWait.Value, maxConcurrentConnections.Value, disableMetricsCollection.Value, additionalProperties, queryTimeout.Value, additionalColumns.Value, extractionMode.Value, subscriberProcess.Value, selection.Value, projection.Value); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SapOdpSource.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SapOdpSource.cs deleted file mode 100644 index 39641ac6..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SapOdpSource.cs +++ /dev/null @@ -1,107 +0,0 @@ -// - -#nullable disable - -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// A copy activity source for SAP ODP source. - public partial class SapOdpSource : TabularSource - { - /// Initializes a new instance of SapOdpSource. - public SapOdpSource() - { - CopySourceType = "SapOdpSource"; - } - - /// Initializes a new instance of SapOdpSource. - /// Copy source type. - /// Source retry count. Type: integer (or Expression with resultType integer). - /// Source retry wait. Type: string (or Expression with resultType string), pattern: ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). - /// The maximum concurrent connection count for the source data store. Type: integer (or Expression with resultType integer). - /// If true, disable data store metrics collection. Default is false. Type: boolean (or Expression with resultType boolean). - /// Additional Properties. - /// 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). - /// The extraction mode. Allowed value include: Full, Delta and Recovery. The default value is Full. Type: string (or Expression with resultType string). - /// The subscriber process to manage the delta process. Type: string (or Expression with resultType string). - /// Specifies the selection conditions from source data. Type: array of objects(selection) (or Expression with resultType array of objects). - /// Specifies the columns to be selected from source data. Type: array of objects(projection) (or Expression with resultType array of objects). - internal SapOdpSource(string copySourceType, DataFactoryElement sourceRetryCount, DataFactoryElement sourceRetryWait, DataFactoryElement maxConcurrentConnections, DataFactoryElement disableMetricsCollection, IDictionary> additionalProperties, DataFactoryElement queryTimeout, BinaryData additionalColumns, DataFactoryElement extractionMode, DataFactoryElement subscriberProcess, BinaryData selection, BinaryData projection) : base(copySourceType, sourceRetryCount, sourceRetryWait, maxConcurrentConnections, disableMetricsCollection, additionalProperties, queryTimeout, additionalColumns) - { - ExtractionMode = extractionMode; - SubscriberProcess = subscriberProcess; - Selection = selection; - Projection = projection; - CopySourceType = copySourceType ?? "SapOdpSource"; - } - - /// The extraction mode. Allowed value include: Full, Delta and Recovery. The default value is Full. Type: string (or Expression with resultType string). - public DataFactoryElement ExtractionMode { get; set; } - /// The subscriber process to manage the delta process. Type: string (or Expression with resultType string). - public DataFactoryElement SubscriberProcess { get; set; } - /// - /// Specifies the selection conditions from source data. Type: array of objects(selection) (or Expression with resultType array of objects). - /// - /// To assign an object to this property use . - /// - /// - /// To assign an already formated json string to this property use . - /// - /// - /// Examples: - /// - /// - /// BinaryData.FromObjectAsJson("foo") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromString("\"foo\"") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromObjectAsJson(new { key = "value" }) - /// Creates a payload of { "key": "value" }. - /// - /// - /// BinaryData.FromString("{\"key\": \"value\"}") - /// Creates a payload of { "key": "value" }. - /// - /// - /// - /// - public BinaryData Selection { get; set; } - /// - /// Specifies the columns to be selected from source data. Type: array of objects(projection) (or Expression with resultType array of objects). - /// - /// To assign an object to this property use . - /// - /// - /// To assign an already formated json string to this property use . - /// - /// - /// Examples: - /// - /// - /// BinaryData.FromObjectAsJson("foo") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromString("\"foo\"") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromObjectAsJson(new { key = "value" }) - /// Creates a payload of { "key": "value" }. - /// - /// - /// BinaryData.FromString("{\"key\": \"value\"}") - /// Creates a payload of { "key": "value" }. - /// - /// - /// - /// - public BinaryData Projection { get; set; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SapOpenHubLinkedService.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SapOpenHubLinkedService.Serialization.cs deleted file mode 100644 index 08f4f5cc..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SapOpenHubLinkedService.Serialization.cs +++ /dev/null @@ -1,321 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class SapOpenHubLinkedService : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - writer.WritePropertyName("type"u8); - writer.WriteStringValue(LinkedServiceType); - if (Optional.IsDefined(ConnectVia)) - { - writer.WritePropertyName("connectVia"u8); - writer.WriteObjectValue(ConnectVia); - } - if (Optional.IsDefined(Description)) - { - writer.WritePropertyName("description"u8); - writer.WriteStringValue(Description); - } - if (Optional.IsCollectionDefined(Parameters)) - { - writer.WritePropertyName("parameters"u8); - writer.WriteStartObject(); - foreach (var item in Parameters) - { - writer.WritePropertyName(item.Key); - writer.WriteObjectValue(item.Value); - } - writer.WriteEndObject(); - } - if (Optional.IsCollectionDefined(Annotations)) - { - writer.WritePropertyName("annotations"u8); - writer.WriteStartArray(); - foreach (var item in Annotations) - { - if (item == null) - { - writer.WriteNullValue(); - continue; - } -#if NET6_0_OR_GREATER - writer.WriteRawValue(item); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.ToString()).RootElement); -#endif - } - writer.WriteEndArray(); - } - writer.WritePropertyName("typeProperties"u8); - writer.WriteStartObject(); - if (Optional.IsDefined(Server)) - { - writer.WritePropertyName("server"u8); - JsonSerializer.Serialize(writer, Server); - } - if (Optional.IsDefined(SystemNumber)) - { - writer.WritePropertyName("systemNumber"u8); - JsonSerializer.Serialize(writer, SystemNumber); - } - if (Optional.IsDefined(ClientId)) - { - writer.WritePropertyName("clientId"u8); - JsonSerializer.Serialize(writer, ClientId); - } - if (Optional.IsDefined(Language)) - { - writer.WritePropertyName("language"u8); - JsonSerializer.Serialize(writer, Language); - } - if (Optional.IsDefined(SystemId)) - { - writer.WritePropertyName("systemId"u8); - JsonSerializer.Serialize(writer, SystemId); - } - if (Optional.IsDefined(UserName)) - { - writer.WritePropertyName("userName"u8); - JsonSerializer.Serialize(writer, UserName); - } - if (Optional.IsDefined(Password)) - { - writer.WritePropertyName("password"u8); - JsonSerializer.Serialize(writer, Password); - } - if (Optional.IsDefined(MessageServer)) - { - writer.WritePropertyName("messageServer"u8); - JsonSerializer.Serialize(writer, MessageServer); - } - if (Optional.IsDefined(MessageServerService)) - { - writer.WritePropertyName("messageServerService"u8); - JsonSerializer.Serialize(writer, MessageServerService); - } - if (Optional.IsDefined(LogonGroup)) - { - writer.WritePropertyName("logonGroup"u8); - JsonSerializer.Serialize(writer, LogonGroup); - } - if (Optional.IsDefined(EncryptedCredential)) - { - writer.WritePropertyName("encryptedCredential"u8); - writer.WriteStringValue(EncryptedCredential); - } - writer.WriteEndObject(); - foreach (var item in AdditionalProperties) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.Value.ToString()).RootElement); -#endif - } - writer.WriteEndObject(); - } - - internal static SapOpenHubLinkedService DeserializeSapOpenHubLinkedService(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - string type = default; - Optional connectVia = default; - Optional description = default; - Optional> parameters = default; - Optional> annotations = default; - Optional> server = default; - Optional> systemNumber = default; - Optional> clientId = default; - Optional> language = default; - Optional> systemId = default; - Optional> userName = default; - Optional password = default; - Optional> messageServer = default; - Optional> messageServerService = default; - Optional> logonGroup = default; - Optional encryptedCredential = default; - IDictionary> additionalProperties = default; - Dictionary> additionalPropertiesDictionary = new Dictionary>(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("type"u8)) - { - type = property.Value.GetString(); - continue; - } - if (property.NameEquals("connectVia"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - connectVia = IntegrationRuntimeReference.DeserializeIntegrationRuntimeReference(property.Value); - continue; - } - if (property.NameEquals("description"u8)) - { - description = property.Value.GetString(); - continue; - } - if (property.NameEquals("parameters"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - Dictionary dictionary = new Dictionary(); - foreach (var property0 in property.Value.EnumerateObject()) - { - dictionary.Add(property0.Name, EntityParameterSpecification.DeserializeEntityParameterSpecification(property0.Value)); - } - parameters = dictionary; - continue; - } - if (property.NameEquals("annotations"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - if (item.ValueKind == JsonValueKind.Null) - { - array.Add(null); - } - else - { - array.Add(BinaryData.FromString(item.GetRawText())); - } - } - annotations = array; - continue; - } - if (property.NameEquals("typeProperties"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - foreach (var property0 in property.Value.EnumerateObject()) - { - if (property0.NameEquals("server"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - server = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("systemNumber"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - systemNumber = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("clientId"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - clientId = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("language"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - language = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("systemId"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - systemId = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("userName"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - userName = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("password"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - password = JsonSerializer.Deserialize(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("messageServer"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - messageServer = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("messageServerService"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - messageServerService = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("logonGroup"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - logonGroup = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("encryptedCredential"u8)) - { - encryptedCredential = property0.Value.GetString(); - continue; - } - } - continue; - } - additionalPropertiesDictionary.Add(property.Name, JsonSerializer.Deserialize>(property.Value.GetRawText())); - } - additionalProperties = additionalPropertiesDictionary; - return new SapOpenHubLinkedService(type, connectVia.Value, description.Value, Optional.ToDictionary(parameters), Optional.ToList(annotations), additionalProperties, server.Value, systemNumber.Value, clientId.Value, language.Value, systemId.Value, userName.Value, password, messageServer.Value, messageServerService.Value, logonGroup.Value, encryptedCredential.Value); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SapOpenHubLinkedService.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SapOpenHubLinkedService.cs deleted file mode 100644 index f20bed90..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SapOpenHubLinkedService.cs +++ /dev/null @@ -1,75 +0,0 @@ -// - -#nullable disable - -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// SAP Business Warehouse Open Hub Destination Linked Service. - public partial class SapOpenHubLinkedService : DataFactoryLinkedServiceProperties - { - /// Initializes a new instance of SapOpenHubLinkedService. - public SapOpenHubLinkedService() - { - LinkedServiceType = "SapOpenHub"; - } - - /// Initializes a new instance of SapOpenHubLinkedService. - /// Type of linked service. - /// The integration runtime reference. - /// Linked service description. - /// Parameters for linked service. - /// List of tags that can be used for describing the linked service. - /// Additional Properties. - /// Host name of the SAP BW instance where the open hub destination is located. Type: string (or Expression with resultType string). - /// System number of the BW system where the open hub destination is located. (Usually a two-digit decimal number represented as a string.) Type: string (or Expression with resultType string). - /// Client ID of the client on the BW system where the open hub destination is located. (Usually a three-digit decimal number represented as a string) Type: string (or Expression with resultType string). - /// Language of the BW system where the open hub destination is located. The default value is EN. Type: string (or Expression with resultType string). - /// SystemID of the SAP system where the table is located. Type: string (or Expression with resultType string). - /// Username to access the SAP BW server where the open hub destination is located. Type: string (or Expression with resultType string). - /// Password to access the SAP BW server where the open hub destination is located. - /// The hostname of the SAP Message Server. Type: string (or Expression with resultType string). - /// The service name or port number of the Message Server. Type: string (or Expression with resultType string). - /// The Logon Group for the SAP System. Type: string (or Expression with resultType string). - /// The encrypted credential used for authentication. Credentials are encrypted using the integration runtime credential manager. Type: string. - internal SapOpenHubLinkedService(string linkedServiceType, IntegrationRuntimeReference connectVia, string description, IDictionary parameters, IList annotations, IDictionary> additionalProperties, DataFactoryElement server, DataFactoryElement systemNumber, DataFactoryElement clientId, DataFactoryElement language, DataFactoryElement systemId, DataFactoryElement userName, DataFactorySecretBaseDefinition password, DataFactoryElement messageServer, DataFactoryElement messageServerService, DataFactoryElement logonGroup, string encryptedCredential) : base(linkedServiceType, connectVia, description, parameters, annotations, additionalProperties) - { - Server = server; - SystemNumber = systemNumber; - ClientId = clientId; - Language = language; - SystemId = systemId; - UserName = userName; - Password = password; - MessageServer = messageServer; - MessageServerService = messageServerService; - LogonGroup = logonGroup; - EncryptedCredential = encryptedCredential; - LinkedServiceType = linkedServiceType ?? "SapOpenHub"; - } - - /// Host name of the SAP BW instance where the open hub destination is located. Type: string (or Expression with resultType string). - public DataFactoryElement Server { get; set; } - /// System number of the BW system where the open hub destination is located. (Usually a two-digit decimal number represented as a string.) Type: string (or Expression with resultType string). - public DataFactoryElement SystemNumber { get; set; } - /// Client ID of the client on the BW system where the open hub destination is located. (Usually a three-digit decimal number represented as a string) Type: string (or Expression with resultType string). - public DataFactoryElement ClientId { get; set; } - /// Language of the BW system where the open hub destination is located. The default value is EN. Type: string (or Expression with resultType string). - public DataFactoryElement Language { get; set; } - /// SystemID of the SAP system where the table is located. Type: string (or Expression with resultType string). - public DataFactoryElement SystemId { get; set; } - /// Username to access the SAP BW server where the open hub destination is located. Type: string (or Expression with resultType string). - public DataFactoryElement UserName { get; set; } - /// Password to access the SAP BW server where the open hub destination is located. - public DataFactorySecretBaseDefinition Password { get; set; } - /// The hostname of the SAP Message Server. Type: string (or Expression with resultType string). - public DataFactoryElement MessageServer { get; set; } - /// The service name or port number of the Message Server. Type: string (or Expression with resultType string). - public DataFactoryElement MessageServerService { get; set; } - /// The Logon Group for the SAP System. Type: string (or Expression with resultType string). - public DataFactoryElement LogonGroup { get; set; } - /// The encrypted credential used for authentication. Credentials are encrypted using the integration runtime credential manager. Type: string. - public string EncryptedCredential { get; set; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SapOpenHubSource.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SapOpenHubSource.Serialization.cs deleted file mode 100644 index 3d0275a9..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SapOpenHubSource.Serialization.cs +++ /dev/null @@ -1,206 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class SapOpenHubSource : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - if (Optional.IsDefined(ExcludeLastRequest)) - { - writer.WritePropertyName("excludeLastRequest"u8); - JsonSerializer.Serialize(writer, ExcludeLastRequest); - } - if (Optional.IsDefined(BaseRequestId)) - { - writer.WritePropertyName("baseRequestId"u8); - JsonSerializer.Serialize(writer, BaseRequestId); - } - if (Optional.IsDefined(CustomRfcReadTableFunctionModule)) - { - writer.WritePropertyName("customRfcReadTableFunctionModule"u8); - JsonSerializer.Serialize(writer, CustomRfcReadTableFunctionModule); - } - if (Optional.IsDefined(SapDataColumnDelimiter)) - { - writer.WritePropertyName("sapDataColumnDelimiter"u8); - JsonSerializer.Serialize(writer, SapDataColumnDelimiter); - } - if (Optional.IsDefined(QueryTimeout)) - { - writer.WritePropertyName("queryTimeout"u8); - JsonSerializer.Serialize(writer, QueryTimeout); - } - if (Optional.IsDefined(AdditionalColumns)) - { - writer.WritePropertyName("additionalColumns"u8); -#if NET6_0_OR_GREATER - writer.WriteRawValue(AdditionalColumns); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(AdditionalColumns.ToString()).RootElement); -#endif - } - writer.WritePropertyName("type"u8); - writer.WriteStringValue(CopySourceType); - if (Optional.IsDefined(SourceRetryCount)) - { - writer.WritePropertyName("sourceRetryCount"u8); - JsonSerializer.Serialize(writer, SourceRetryCount); - } - if (Optional.IsDefined(SourceRetryWait)) - { - writer.WritePropertyName("sourceRetryWait"u8); - JsonSerializer.Serialize(writer, SourceRetryWait); - } - if (Optional.IsDefined(MaxConcurrentConnections)) - { - writer.WritePropertyName("maxConcurrentConnections"u8); - JsonSerializer.Serialize(writer, MaxConcurrentConnections); - } - if (Optional.IsDefined(DisableMetricsCollection)) - { - writer.WritePropertyName("disableMetricsCollection"u8); - JsonSerializer.Serialize(writer, DisableMetricsCollection); - } - foreach (var item in AdditionalProperties) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.Value.ToString()).RootElement); -#endif - } - writer.WriteEndObject(); - } - - internal static SapOpenHubSource DeserializeSapOpenHubSource(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - Optional> excludeLastRequest = default; - Optional> baseRequestId = default; - Optional> customRfcReadTableFunctionModule = default; - Optional> sapDataColumnDelimiter = default; - Optional> queryTimeout = default; - Optional additionalColumns = default; - string type = default; - Optional> sourceRetryCount = default; - Optional> sourceRetryWait = default; - Optional> maxConcurrentConnections = default; - Optional> disableMetricsCollection = default; - IDictionary> additionalProperties = default; - Dictionary> additionalPropertiesDictionary = new Dictionary>(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("excludeLastRequest"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - excludeLastRequest = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("baseRequestId"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - baseRequestId = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("customRfcReadTableFunctionModule"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - customRfcReadTableFunctionModule = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("sapDataColumnDelimiter"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - sapDataColumnDelimiter = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("queryTimeout"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - queryTimeout = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("additionalColumns"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - additionalColumns = BinaryData.FromString(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("type"u8)) - { - type = property.Value.GetString(); - continue; - } - if (property.NameEquals("sourceRetryCount"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - sourceRetryCount = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("sourceRetryWait"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - sourceRetryWait = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("maxConcurrentConnections"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - maxConcurrentConnections = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("disableMetricsCollection"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - disableMetricsCollection = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - additionalPropertiesDictionary.Add(property.Name, JsonSerializer.Deserialize>(property.Value.GetRawText())); - } - additionalProperties = additionalPropertiesDictionary; - return new SapOpenHubSource(type, sourceRetryCount.Value, sourceRetryWait.Value, maxConcurrentConnections.Value, disableMetricsCollection.Value, additionalProperties, queryTimeout.Value, additionalColumns.Value, excludeLastRequest.Value, baseRequestId.Value, customRfcReadTableFunctionModule.Value, sapDataColumnDelimiter.Value); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SapOpenHubSource.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SapOpenHubSource.cs deleted file mode 100644 index 989f7dbb..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SapOpenHubSource.cs +++ /dev/null @@ -1,49 +0,0 @@ -// - -#nullable disable - -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// A copy activity source for SAP Business Warehouse Open Hub Destination source. - public partial class SapOpenHubSource : TabularSource - { - /// Initializes a new instance of SapOpenHubSource. - public SapOpenHubSource() - { - CopySourceType = "SapOpenHubSource"; - } - - /// Initializes a new instance of SapOpenHubSource. - /// Copy source type. - /// Source retry count. Type: integer (or Expression with resultType integer). - /// Source retry wait. Type: string (or Expression with resultType string), pattern: ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). - /// The maximum concurrent connection count for the source data store. Type: integer (or Expression with resultType integer). - /// If true, disable data store metrics collection. Default is false. Type: boolean (or Expression with resultType boolean). - /// Additional Properties. - /// 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). - /// Whether to exclude the records of the last request. The default value is true. Type: boolean (or Expression with resultType boolean). - /// The ID of request for delta loading. Once it is set, only data with requestId larger than the value of this property will be retrieved. The default value is 0. Type: integer (or Expression with resultType integer ). - /// Specifies the custom RFC function module that will be used to read data from SAP Table. Type: string (or Expression with resultType string). - /// The single character that will be used as delimiter passed to SAP RFC as well as splitting the output data retrieved. Type: string (or Expression with resultType string). - internal SapOpenHubSource(string copySourceType, DataFactoryElement sourceRetryCount, DataFactoryElement sourceRetryWait, DataFactoryElement maxConcurrentConnections, DataFactoryElement disableMetricsCollection, IDictionary> additionalProperties, DataFactoryElement queryTimeout, BinaryData additionalColumns, DataFactoryElement excludeLastRequest, DataFactoryElement baseRequestId, DataFactoryElement customRfcReadTableFunctionModule, DataFactoryElement sapDataColumnDelimiter) : base(copySourceType, sourceRetryCount, sourceRetryWait, maxConcurrentConnections, disableMetricsCollection, additionalProperties, queryTimeout, additionalColumns) - { - ExcludeLastRequest = excludeLastRequest; - BaseRequestId = baseRequestId; - CustomRfcReadTableFunctionModule = customRfcReadTableFunctionModule; - SapDataColumnDelimiter = sapDataColumnDelimiter; - CopySourceType = copySourceType ?? "SapOpenHubSource"; - } - - /// Whether to exclude the records of the last request. The default value is true. Type: boolean (or Expression with resultType boolean). - public DataFactoryElement ExcludeLastRequest { get; set; } - /// The ID of request for delta loading. Once it is set, only data with requestId larger than the value of this property will be retrieved. The default value is 0. Type: integer (or Expression with resultType integer ). - public DataFactoryElement BaseRequestId { get; set; } - /// Specifies the custom RFC function module that will be used to read data from SAP Table. Type: string (or Expression with resultType string). - public DataFactoryElement CustomRfcReadTableFunctionModule { get; set; } - /// The single character that will be used as delimiter passed to SAP RFC as well as splitting the output data retrieved. Type: string (or Expression with resultType string). - public DataFactoryElement SapDataColumnDelimiter { get; set; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SapOpenHubTableDataset.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SapOpenHubTableDataset.Serialization.cs deleted file mode 100644 index 34f109f3..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SapOpenHubTableDataset.Serialization.cs +++ /dev/null @@ -1,235 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class SapOpenHubTableDataset : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - writer.WritePropertyName("type"u8); - writer.WriteStringValue(DatasetType); - if (Optional.IsDefined(Description)) - { - writer.WritePropertyName("description"u8); - writer.WriteStringValue(Description); - } - if (Optional.IsDefined(Structure)) - { - writer.WritePropertyName("structure"u8); - JsonSerializer.Serialize(writer, Structure); - } - if (Optional.IsDefined(Schema)) - { - writer.WritePropertyName("schema"u8); - JsonSerializer.Serialize(writer, Schema); - } - writer.WritePropertyName("linkedServiceName"u8); - JsonSerializer.Serialize(writer, LinkedServiceName); if (Optional.IsCollectionDefined(Parameters)) - { - writer.WritePropertyName("parameters"u8); - writer.WriteStartObject(); - foreach (var item in Parameters) - { - writer.WritePropertyName(item.Key); - writer.WriteObjectValue(item.Value); - } - writer.WriteEndObject(); - } - if (Optional.IsCollectionDefined(Annotations)) - { - writer.WritePropertyName("annotations"u8); - writer.WriteStartArray(); - foreach (var item in Annotations) - { - if (item == null) - { - writer.WriteNullValue(); - continue; - } -#if NET6_0_OR_GREATER - writer.WriteRawValue(item); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.ToString()).RootElement); -#endif - } - writer.WriteEndArray(); - } - if (Optional.IsDefined(Folder)) - { - writer.WritePropertyName("folder"u8); - writer.WriteObjectValue(Folder); - } - writer.WritePropertyName("typeProperties"u8); - writer.WriteStartObject(); - writer.WritePropertyName("openHubDestinationName"u8); - JsonSerializer.Serialize(writer, OpenHubDestinationName); - if (Optional.IsDefined(ExcludeLastRequest)) - { - writer.WritePropertyName("excludeLastRequest"u8); - JsonSerializer.Serialize(writer, ExcludeLastRequest); - } - if (Optional.IsDefined(BaseRequestId)) - { - writer.WritePropertyName("baseRequestId"u8); - JsonSerializer.Serialize(writer, BaseRequestId); - } - writer.WriteEndObject(); - foreach (var item in AdditionalProperties) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.Value.ToString()).RootElement); -#endif - } - writer.WriteEndObject(); - } - - internal static SapOpenHubTableDataset DeserializeSapOpenHubTableDataset(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - string type = default; - Optional description = default; - Optional>> structure = default; - Optional>> schema = default; - DataFactoryLinkedServiceReference linkedServiceName = default; - Optional> parameters = default; - Optional> annotations = default; - Optional folder = default; - DataFactoryElement openHubDestinationName = default; - Optional> excludeLastRequest = default; - Optional> baseRequestId = default; - IDictionary> additionalProperties = default; - Dictionary> additionalPropertiesDictionary = new Dictionary>(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("type"u8)) - { - type = property.Value.GetString(); - continue; - } - if (property.NameEquals("description"u8)) - { - description = property.Value.GetString(); - continue; - } - if (property.NameEquals("structure"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - structure = JsonSerializer.Deserialize>>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("schema"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - schema = JsonSerializer.Deserialize>>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("linkedServiceName"u8)) - { - linkedServiceName = JsonSerializer.Deserialize(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("parameters"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - Dictionary dictionary = new Dictionary(); - foreach (var property0 in property.Value.EnumerateObject()) - { - dictionary.Add(property0.Name, EntityParameterSpecification.DeserializeEntityParameterSpecification(property0.Value)); - } - parameters = dictionary; - continue; - } - if (property.NameEquals("annotations"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - if (item.ValueKind == JsonValueKind.Null) - { - array.Add(null); - } - else - { - array.Add(BinaryData.FromString(item.GetRawText())); - } - } - annotations = array; - continue; - } - if (property.NameEquals("folder"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - folder = DatasetFolder.DeserializeDatasetFolder(property.Value); - continue; - } - if (property.NameEquals("typeProperties"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - foreach (var property0 in property.Value.EnumerateObject()) - { - if (property0.NameEquals("openHubDestinationName"u8)) - { - openHubDestinationName = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("excludeLastRequest"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - excludeLastRequest = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("baseRequestId"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - baseRequestId = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - } - continue; - } - additionalPropertiesDictionary.Add(property.Name, JsonSerializer.Deserialize>(property.Value.GetRawText())); - } - additionalProperties = additionalPropertiesDictionary; - return new SapOpenHubTableDataset(type, description.Value, structure.Value, schema.Value, linkedServiceName, Optional.ToDictionary(parameters), Optional.ToList(annotations), folder.Value, additionalProperties, openHubDestinationName, excludeLastRequest.Value, baseRequestId.Value); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SapOpenHubTableDataset.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SapOpenHubTableDataset.cs deleted file mode 100644 index e776bb77..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SapOpenHubTableDataset.cs +++ /dev/null @@ -1,54 +0,0 @@ -// - -#nullable disable - -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// Sap Business Warehouse Open Hub Destination Table properties. - public partial class SapOpenHubTableDataset : DataFactoryDatasetProperties - { - /// Initializes a new instance of SapOpenHubTableDataset. - /// Linked service reference. - /// The name of the Open Hub Destination with destination type as Database Table. Type: string (or Expression with resultType string). - /// or is null. - public SapOpenHubTableDataset(DataFactoryLinkedServiceReference linkedServiceName, DataFactoryElement openHubDestinationName) : base(linkedServiceName) - { - Argument.AssertNotNull(linkedServiceName, nameof(linkedServiceName)); - Argument.AssertNotNull(openHubDestinationName, nameof(openHubDestinationName)); - - OpenHubDestinationName = openHubDestinationName; - DatasetType = "SapOpenHubTable"; - } - - /// Initializes a new instance of SapOpenHubTableDataset. - /// Type of dataset. - /// Dataset description. - /// Columns that define the structure of the dataset. Type: array (or Expression with resultType array), itemType: DatasetDataElement. - /// Columns that define the physical type schema of the dataset. Type: array (or Expression with resultType array), itemType: DatasetSchemaDataElement. - /// Linked service reference. - /// Parameters for dataset. - /// List of tags that can be used for describing the Dataset. - /// The folder that this Dataset is in. If not specified, Dataset will appear at the root level. - /// Additional Properties. - /// The name of the Open Hub Destination with destination type as Database Table. Type: string (or Expression with resultType string). - /// Whether to exclude the records of the last request. The default value is true. Type: boolean (or Expression with resultType boolean). - /// The ID of request for delta loading. Once it is set, only data with requestId larger than the value of this property will be retrieved. The default value is 0. Type: integer (or Expression with resultType integer ). - internal SapOpenHubTableDataset(string datasetType, string description, DataFactoryElement> structure, DataFactoryElement> schema, DataFactoryLinkedServiceReference linkedServiceName, IDictionary parameters, IList annotations, DatasetFolder folder, IDictionary> additionalProperties, DataFactoryElement openHubDestinationName, DataFactoryElement excludeLastRequest, DataFactoryElement baseRequestId) : base(datasetType, description, structure, schema, linkedServiceName, parameters, annotations, folder, additionalProperties) - { - OpenHubDestinationName = openHubDestinationName; - ExcludeLastRequest = excludeLastRequest; - BaseRequestId = baseRequestId; - DatasetType = datasetType ?? "SapOpenHubTable"; - } - - /// The name of the Open Hub Destination with destination type as Database Table. Type: string (or Expression with resultType string). - public DataFactoryElement OpenHubDestinationName { get; set; } - /// Whether to exclude the records of the last request. The default value is true. Type: boolean (or Expression with resultType boolean). - public DataFactoryElement ExcludeLastRequest { get; set; } - /// The ID of request for delta loading. Once it is set, only data with requestId larger than the value of this property will be retrieved. The default value is 0. Type: integer (or Expression with resultType integer ). - public DataFactoryElement BaseRequestId { get; set; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SapTableLinkedService.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SapTableLinkedService.Serialization.cs deleted file mode 100644 index a74992fd..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SapTableLinkedService.Serialization.cs +++ /dev/null @@ -1,396 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class SapTableLinkedService : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - writer.WritePropertyName("type"u8); - writer.WriteStringValue(LinkedServiceType); - if (Optional.IsDefined(ConnectVia)) - { - writer.WritePropertyName("connectVia"u8); - writer.WriteObjectValue(ConnectVia); - } - if (Optional.IsDefined(Description)) - { - writer.WritePropertyName("description"u8); - writer.WriteStringValue(Description); - } - if (Optional.IsCollectionDefined(Parameters)) - { - writer.WritePropertyName("parameters"u8); - writer.WriteStartObject(); - foreach (var item in Parameters) - { - writer.WritePropertyName(item.Key); - writer.WriteObjectValue(item.Value); - } - writer.WriteEndObject(); - } - if (Optional.IsCollectionDefined(Annotations)) - { - writer.WritePropertyName("annotations"u8); - writer.WriteStartArray(); - foreach (var item in Annotations) - { - if (item == null) - { - writer.WriteNullValue(); - continue; - } -#if NET6_0_OR_GREATER - writer.WriteRawValue(item); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.ToString()).RootElement); -#endif - } - writer.WriteEndArray(); - } - writer.WritePropertyName("typeProperties"u8); - writer.WriteStartObject(); - if (Optional.IsDefined(Server)) - { - writer.WritePropertyName("server"u8); - JsonSerializer.Serialize(writer, Server); - } - if (Optional.IsDefined(SystemNumber)) - { - writer.WritePropertyName("systemNumber"u8); - JsonSerializer.Serialize(writer, SystemNumber); - } - if (Optional.IsDefined(ClientId)) - { - writer.WritePropertyName("clientId"u8); - JsonSerializer.Serialize(writer, ClientId); - } - if (Optional.IsDefined(Language)) - { - writer.WritePropertyName("language"u8); - JsonSerializer.Serialize(writer, Language); - } - if (Optional.IsDefined(SystemId)) - { - writer.WritePropertyName("systemId"u8); - JsonSerializer.Serialize(writer, SystemId); - } - if (Optional.IsDefined(UserName)) - { - writer.WritePropertyName("userName"u8); - JsonSerializer.Serialize(writer, UserName); - } - if (Optional.IsDefined(Password)) - { - writer.WritePropertyName("password"u8); - JsonSerializer.Serialize(writer, Password); - } - if (Optional.IsDefined(MessageServer)) - { - writer.WritePropertyName("messageServer"u8); - JsonSerializer.Serialize(writer, MessageServer); - } - if (Optional.IsDefined(MessageServerService)) - { - writer.WritePropertyName("messageServerService"u8); - JsonSerializer.Serialize(writer, MessageServerService); - } - if (Optional.IsDefined(SncMode)) - { - writer.WritePropertyName("sncMode"u8); - JsonSerializer.Serialize(writer, SncMode); - } - if (Optional.IsDefined(SncMyName)) - { - writer.WritePropertyName("sncMyName"u8); - JsonSerializer.Serialize(writer, SncMyName); - } - if (Optional.IsDefined(SncPartnerName)) - { - writer.WritePropertyName("sncPartnerName"u8); - JsonSerializer.Serialize(writer, SncPartnerName); - } - if (Optional.IsDefined(SncLibraryPath)) - { - writer.WritePropertyName("sncLibraryPath"u8); - JsonSerializer.Serialize(writer, SncLibraryPath); - } - if (Optional.IsDefined(SncQop)) - { - writer.WritePropertyName("sncQop"u8); - JsonSerializer.Serialize(writer, SncQop); - } - if (Optional.IsDefined(LogonGroup)) - { - writer.WritePropertyName("logonGroup"u8); - JsonSerializer.Serialize(writer, LogonGroup); - } - if (Optional.IsDefined(EncryptedCredential)) - { - writer.WritePropertyName("encryptedCredential"u8); - writer.WriteStringValue(EncryptedCredential); - } - writer.WriteEndObject(); - foreach (var item in AdditionalProperties) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.Value.ToString()).RootElement); -#endif - } - writer.WriteEndObject(); - } - - internal static SapTableLinkedService DeserializeSapTableLinkedService(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - string type = default; - Optional connectVia = default; - Optional description = default; - Optional> parameters = default; - Optional> annotations = default; - Optional> server = default; - Optional> systemNumber = default; - Optional> clientId = default; - Optional> language = default; - Optional> systemId = default; - Optional> userName = default; - Optional password = default; - Optional> messageServer = default; - Optional> messageServerService = default; - Optional> sncMode = default; - Optional> sncMyName = default; - Optional> sncPartnerName = default; - Optional> sncLibraryPath = default; - Optional> sncQop = default; - Optional> logonGroup = default; - Optional encryptedCredential = default; - IDictionary> additionalProperties = default; - Dictionary> additionalPropertiesDictionary = new Dictionary>(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("type"u8)) - { - type = property.Value.GetString(); - continue; - } - if (property.NameEquals("connectVia"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - connectVia = IntegrationRuntimeReference.DeserializeIntegrationRuntimeReference(property.Value); - continue; - } - if (property.NameEquals("description"u8)) - { - description = property.Value.GetString(); - continue; - } - if (property.NameEquals("parameters"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - Dictionary dictionary = new Dictionary(); - foreach (var property0 in property.Value.EnumerateObject()) - { - dictionary.Add(property0.Name, EntityParameterSpecification.DeserializeEntityParameterSpecification(property0.Value)); - } - parameters = dictionary; - continue; - } - if (property.NameEquals("annotations"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - if (item.ValueKind == JsonValueKind.Null) - { - array.Add(null); - } - else - { - array.Add(BinaryData.FromString(item.GetRawText())); - } - } - annotations = array; - continue; - } - if (property.NameEquals("typeProperties"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - foreach (var property0 in property.Value.EnumerateObject()) - { - if (property0.NameEquals("server"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - server = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("systemNumber"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - systemNumber = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("clientId"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - clientId = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("language"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - language = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("systemId"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - systemId = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("userName"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - userName = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("password"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - password = JsonSerializer.Deserialize(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("messageServer"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - messageServer = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("messageServerService"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - messageServerService = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("sncMode"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - sncMode = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("sncMyName"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - sncMyName = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("sncPartnerName"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - sncPartnerName = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("sncLibraryPath"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - sncLibraryPath = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("sncQop"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - sncQop = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("logonGroup"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - logonGroup = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("encryptedCredential"u8)) - { - encryptedCredential = property0.Value.GetString(); - continue; - } - } - continue; - } - additionalPropertiesDictionary.Add(property.Name, JsonSerializer.Deserialize>(property.Value.GetRawText())); - } - additionalProperties = additionalPropertiesDictionary; - return new SapTableLinkedService(type, connectVia.Value, description.Value, Optional.ToDictionary(parameters), Optional.ToList(annotations), additionalProperties, server.Value, systemNumber.Value, clientId.Value, language.Value, systemId.Value, userName.Value, password, messageServer.Value, messageServerService.Value, sncMode.Value, sncMyName.Value, sncPartnerName.Value, sncLibraryPath.Value, sncQop.Value, logonGroup.Value, encryptedCredential.Value); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SapTableLinkedService.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SapTableLinkedService.cs deleted file mode 100644 index 88d01a13..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SapTableLinkedService.cs +++ /dev/null @@ -1,95 +0,0 @@ -// - -#nullable disable - -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// SAP Table Linked Service. - public partial class SapTableLinkedService : DataFactoryLinkedServiceProperties - { - /// Initializes a new instance of SapTableLinkedService. - public SapTableLinkedService() - { - LinkedServiceType = "SapTable"; - } - - /// Initializes a new instance of SapTableLinkedService. - /// Type of linked service. - /// The integration runtime reference. - /// Linked service description. - /// Parameters for linked service. - /// List of tags that can be used for describing the linked service. - /// Additional Properties. - /// Host name of the SAP instance where the table is located. Type: string (or Expression with resultType string). - /// System number of the SAP system where the table is located. (Usually a two-digit decimal number represented as a string.) Type: string (or Expression with resultType string). - /// Client ID of the client on the SAP system where the table is located. (Usually a three-digit decimal number represented as a string) Type: string (or Expression with resultType string). - /// Language of the SAP system where the table is located. The default value is EN. Type: string (or Expression with resultType string). - /// SystemID of the SAP system where the table is located. Type: string (or Expression with resultType string). - /// Username to access the SAP server where the table is located. Type: string (or Expression with resultType string). - /// Password to access the SAP server where the table is located. - /// The hostname of the SAP Message Server. Type: string (or Expression with resultType string). - /// The service name or port number of the Message Server. Type: string (or Expression with resultType string). - /// SNC activation indicator to access the SAP server where the table is located. Must be either 0 (off) or 1 (on). Type: string (or Expression with resultType string). - /// Initiator's SNC name to access the SAP server where the table is located. Type: string (or Expression with resultType string). - /// Communication partner's SNC name to access the SAP server where the table is located. Type: string (or Expression with resultType string). - /// External security product's library to access the SAP server where the table is located. Type: string (or Expression with resultType string). - /// SNC Quality of Protection. Allowed value include: 1, 2, 3, 8, 9. Type: string (or Expression with resultType string). - /// The Logon Group for the SAP System. Type: string (or Expression with resultType string). - /// The encrypted credential used for authentication. Credentials are encrypted using the integration runtime credential manager. Type: string. - internal SapTableLinkedService(string linkedServiceType, IntegrationRuntimeReference connectVia, string description, IDictionary parameters, IList annotations, IDictionary> additionalProperties, DataFactoryElement server, DataFactoryElement systemNumber, DataFactoryElement clientId, DataFactoryElement language, DataFactoryElement systemId, DataFactoryElement userName, DataFactorySecretBaseDefinition password, DataFactoryElement messageServer, DataFactoryElement messageServerService, DataFactoryElement sncMode, DataFactoryElement sncMyName, DataFactoryElement sncPartnerName, DataFactoryElement sncLibraryPath, DataFactoryElement sncQop, DataFactoryElement logonGroup, string encryptedCredential) : base(linkedServiceType, connectVia, description, parameters, annotations, additionalProperties) - { - Server = server; - SystemNumber = systemNumber; - ClientId = clientId; - Language = language; - SystemId = systemId; - UserName = userName; - Password = password; - MessageServer = messageServer; - MessageServerService = messageServerService; - SncMode = sncMode; - SncMyName = sncMyName; - SncPartnerName = sncPartnerName; - SncLibraryPath = sncLibraryPath; - SncQop = sncQop; - LogonGroup = logonGroup; - EncryptedCredential = encryptedCredential; - LinkedServiceType = linkedServiceType ?? "SapTable"; - } - - /// Host name of the SAP instance where the table is located. Type: string (or Expression with resultType string). - public DataFactoryElement Server { get; set; } - /// System number of the SAP system where the table is located. (Usually a two-digit decimal number represented as a string.) Type: string (or Expression with resultType string). - public DataFactoryElement SystemNumber { get; set; } - /// Client ID of the client on the SAP system where the table is located. (Usually a three-digit decimal number represented as a string) Type: string (or Expression with resultType string). - public DataFactoryElement ClientId { get; set; } - /// Language of the SAP system where the table is located. The default value is EN. Type: string (or Expression with resultType string). - public DataFactoryElement Language { get; set; } - /// SystemID of the SAP system where the table is located. Type: string (or Expression with resultType string). - public DataFactoryElement SystemId { get; set; } - /// Username to access the SAP server where the table is located. Type: string (or Expression with resultType string). - public DataFactoryElement UserName { get; set; } - /// Password to access the SAP server where the table is located. - public DataFactorySecretBaseDefinition Password { get; set; } - /// The hostname of the SAP Message Server. Type: string (or Expression with resultType string). - public DataFactoryElement MessageServer { get; set; } - /// The service name or port number of the Message Server. Type: string (or Expression with resultType string). - public DataFactoryElement MessageServerService { get; set; } - /// SNC activation indicator to access the SAP server where the table is located. Must be either 0 (off) or 1 (on). Type: string (or Expression with resultType string). - public DataFactoryElement SncMode { get; set; } - /// Initiator's SNC name to access the SAP server where the table is located. Type: string (or Expression with resultType string). - public DataFactoryElement SncMyName { get; set; } - /// Communication partner's SNC name to access the SAP server where the table is located. Type: string (or Expression with resultType string). - public DataFactoryElement SncPartnerName { get; set; } - /// External security product's library to access the SAP server where the table is located. Type: string (or Expression with resultType string). - public DataFactoryElement SncLibraryPath { get; set; } - /// SNC Quality of Protection. Allowed value include: 1, 2, 3, 8, 9. Type: string (or Expression with resultType string). - public DataFactoryElement SncQop { get; set; } - /// The Logon Group for the SAP System. Type: string (or Expression with resultType string). - public DataFactoryElement LogonGroup { get; set; } - /// The encrypted credential used for authentication. Credentials are encrypted using the integration runtime credential manager. Type: string. - public string EncryptedCredential { get; set; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SapTablePartitionSettings.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SapTablePartitionSettings.Serialization.cs deleted file mode 100644 index c5d7481f..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SapTablePartitionSettings.Serialization.cs +++ /dev/null @@ -1,91 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class SapTablePartitionSettings : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - if (Optional.IsDefined(PartitionColumnName)) - { - writer.WritePropertyName("partitionColumnName"u8); - JsonSerializer.Serialize(writer, PartitionColumnName); - } - if (Optional.IsDefined(PartitionUpperBound)) - { - writer.WritePropertyName("partitionUpperBound"u8); - JsonSerializer.Serialize(writer, PartitionUpperBound); - } - if (Optional.IsDefined(PartitionLowerBound)) - { - writer.WritePropertyName("partitionLowerBound"u8); - JsonSerializer.Serialize(writer, PartitionLowerBound); - } - if (Optional.IsDefined(MaxPartitionsNumber)) - { - writer.WritePropertyName("maxPartitionsNumber"u8); - JsonSerializer.Serialize(writer, MaxPartitionsNumber); - } - writer.WriteEndObject(); - } - - internal static SapTablePartitionSettings DeserializeSapTablePartitionSettings(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - Optional> partitionColumnName = default; - Optional> partitionUpperBound = default; - Optional> partitionLowerBound = default; - Optional> maxPartitionsNumber = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("partitionColumnName"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - partitionColumnName = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("partitionUpperBound"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - partitionUpperBound = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("partitionLowerBound"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - partitionLowerBound = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("maxPartitionsNumber"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - maxPartitionsNumber = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - } - return new SapTablePartitionSettings(partitionColumnName.Value, partitionUpperBound.Value, partitionLowerBound.Value, maxPartitionsNumber.Value); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SapTablePartitionSettings.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SapTablePartitionSettings.cs deleted file mode 100644 index ee4b00a4..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SapTablePartitionSettings.cs +++ /dev/null @@ -1,39 +0,0 @@ -// - -#nullable disable - -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// The settings that will be leveraged for SAP table source partitioning. - public partial class SapTablePartitionSettings - { - /// Initializes a new instance of SapTablePartitionSettings. - public SapTablePartitionSettings() - { - } - - /// Initializes a new instance of SapTablePartitionSettings. - /// The name of the column that will be used for proceeding range partitioning. Type: string (or Expression with resultType string). - /// The maximum value of column specified in partitionColumnName that will be used for proceeding range partitioning. Type: string (or Expression with resultType string). - /// The minimum value of column specified in partitionColumnName that will be used for proceeding range partitioning. Type: string (or Expression with resultType string). - /// The maximum value of partitions the table will be split into. Type: integer (or Expression with resultType string). - internal SapTablePartitionSettings(DataFactoryElement partitionColumnName, DataFactoryElement partitionUpperBound, DataFactoryElement partitionLowerBound, DataFactoryElement maxPartitionsNumber) - { - PartitionColumnName = partitionColumnName; - PartitionUpperBound = partitionUpperBound; - PartitionLowerBound = partitionLowerBound; - MaxPartitionsNumber = maxPartitionsNumber; - } - - /// The name of the column that will be used for proceeding range partitioning. Type: string (or Expression with resultType string). - public DataFactoryElement PartitionColumnName { get; set; } - /// The maximum value of column specified in partitionColumnName that will be used for proceeding range partitioning. Type: string (or Expression with resultType string). - public DataFactoryElement PartitionUpperBound { get; set; } - /// The minimum value of column specified in partitionColumnName that will be used for proceeding range partitioning. Type: string (or Expression with resultType string). - public DataFactoryElement PartitionLowerBound { get; set; } - /// The maximum value of partitions the table will be split into. Type: integer (or Expression with resultType string). - public DataFactoryElement MaxPartitionsNumber { get; set; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SapTableResourceDataset.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SapTableResourceDataset.Serialization.cs deleted file mode 100644 index 12283850..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SapTableResourceDataset.Serialization.cs +++ /dev/null @@ -1,205 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class SapTableResourceDataset : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - writer.WritePropertyName("type"u8); - writer.WriteStringValue(DatasetType); - if (Optional.IsDefined(Description)) - { - writer.WritePropertyName("description"u8); - writer.WriteStringValue(Description); - } - if (Optional.IsDefined(Structure)) - { - writer.WritePropertyName("structure"u8); - JsonSerializer.Serialize(writer, Structure); - } - if (Optional.IsDefined(Schema)) - { - writer.WritePropertyName("schema"u8); - JsonSerializer.Serialize(writer, Schema); - } - writer.WritePropertyName("linkedServiceName"u8); - JsonSerializer.Serialize(writer, LinkedServiceName); if (Optional.IsCollectionDefined(Parameters)) - { - writer.WritePropertyName("parameters"u8); - writer.WriteStartObject(); - foreach (var item in Parameters) - { - writer.WritePropertyName(item.Key); - writer.WriteObjectValue(item.Value); - } - writer.WriteEndObject(); - } - if (Optional.IsCollectionDefined(Annotations)) - { - writer.WritePropertyName("annotations"u8); - writer.WriteStartArray(); - foreach (var item in Annotations) - { - if (item == null) - { - writer.WriteNullValue(); - continue; - } -#if NET6_0_OR_GREATER - writer.WriteRawValue(item); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.ToString()).RootElement); -#endif - } - writer.WriteEndArray(); - } - if (Optional.IsDefined(Folder)) - { - writer.WritePropertyName("folder"u8); - writer.WriteObjectValue(Folder); - } - writer.WritePropertyName("typeProperties"u8); - writer.WriteStartObject(); - writer.WritePropertyName("tableName"u8); - JsonSerializer.Serialize(writer, TableName); - writer.WriteEndObject(); - foreach (var item in AdditionalProperties) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.Value.ToString()).RootElement); -#endif - } - writer.WriteEndObject(); - } - - internal static SapTableResourceDataset DeserializeSapTableResourceDataset(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - string type = default; - Optional description = default; - Optional>> structure = default; - Optional>> schema = default; - DataFactoryLinkedServiceReference linkedServiceName = default; - Optional> parameters = default; - Optional> annotations = default; - Optional folder = default; - DataFactoryElement tableName = default; - IDictionary> additionalProperties = default; - Dictionary> additionalPropertiesDictionary = new Dictionary>(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("type"u8)) - { - type = property.Value.GetString(); - continue; - } - if (property.NameEquals("description"u8)) - { - description = property.Value.GetString(); - continue; - } - if (property.NameEquals("structure"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - structure = JsonSerializer.Deserialize>>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("schema"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - schema = JsonSerializer.Deserialize>>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("linkedServiceName"u8)) - { - linkedServiceName = JsonSerializer.Deserialize(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("parameters"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - Dictionary dictionary = new Dictionary(); - foreach (var property0 in property.Value.EnumerateObject()) - { - dictionary.Add(property0.Name, EntityParameterSpecification.DeserializeEntityParameterSpecification(property0.Value)); - } - parameters = dictionary; - continue; - } - if (property.NameEquals("annotations"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - if (item.ValueKind == JsonValueKind.Null) - { - array.Add(null); - } - else - { - array.Add(BinaryData.FromString(item.GetRawText())); - } - } - annotations = array; - continue; - } - if (property.NameEquals("folder"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - folder = DatasetFolder.DeserializeDatasetFolder(property.Value); - continue; - } - if (property.NameEquals("typeProperties"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - foreach (var property0 in property.Value.EnumerateObject()) - { - if (property0.NameEquals("tableName"u8)) - { - tableName = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - } - continue; - } - additionalPropertiesDictionary.Add(property.Name, JsonSerializer.Deserialize>(property.Value.GetRawText())); - } - additionalProperties = additionalPropertiesDictionary; - return new SapTableResourceDataset(type, description.Value, structure.Value, schema.Value, linkedServiceName, Optional.ToDictionary(parameters), Optional.ToList(annotations), folder.Value, additionalProperties, tableName); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SapTableResourceDataset.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SapTableResourceDataset.cs deleted file mode 100644 index 4634df55..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SapTableResourceDataset.cs +++ /dev/null @@ -1,46 +0,0 @@ -// - -#nullable disable - -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// SAP Table Resource properties. - public partial class SapTableResourceDataset : DataFactoryDatasetProperties - { - /// Initializes a new instance of SapTableResourceDataset. - /// Linked service reference. - /// The name of the SAP Table. Type: string (or Expression with resultType string). - /// or is null. - public SapTableResourceDataset(DataFactoryLinkedServiceReference linkedServiceName, DataFactoryElement tableName) : base(linkedServiceName) - { - Argument.AssertNotNull(linkedServiceName, nameof(linkedServiceName)); - Argument.AssertNotNull(tableName, nameof(tableName)); - - TableName = tableName; - DatasetType = "SapTableResource"; - } - - /// Initializes a new instance of SapTableResourceDataset. - /// Type of dataset. - /// Dataset description. - /// Columns that define the structure of the dataset. Type: array (or Expression with resultType array), itemType: DatasetDataElement. - /// Columns that define the physical type schema of the dataset. Type: array (or Expression with resultType array), itemType: DatasetSchemaDataElement. - /// Linked service reference. - /// Parameters for dataset. - /// List of tags that can be used for describing the Dataset. - /// The folder that this Dataset is in. If not specified, Dataset will appear at the root level. - /// Additional Properties. - /// The name of the SAP Table. Type: string (or Expression with resultType string). - internal SapTableResourceDataset(string datasetType, string description, DataFactoryElement> structure, DataFactoryElement> schema, DataFactoryLinkedServiceReference linkedServiceName, IDictionary parameters, IList annotations, DatasetFolder folder, IDictionary> additionalProperties, DataFactoryElement tableName) : base(datasetType, description, structure, schema, linkedServiceName, parameters, annotations, folder, additionalProperties) - { - TableName = tableName; - DatasetType = datasetType ?? "SapTableResource"; - } - - /// The name of the SAP Table. Type: string (or Expression with resultType string). - public DataFactoryElement TableName { get; set; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SapTableSource.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SapTableSource.Serialization.cs deleted file mode 100644 index a655d97c..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SapTableSource.Serialization.cs +++ /dev/null @@ -1,285 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class SapTableSource : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - if (Optional.IsDefined(RowCount)) - { - writer.WritePropertyName("rowCount"u8); - JsonSerializer.Serialize(writer, RowCount); - } - if (Optional.IsDefined(RowSkips)) - { - writer.WritePropertyName("rowSkips"u8); - JsonSerializer.Serialize(writer, RowSkips); - } - if (Optional.IsDefined(RfcTableFields)) - { - writer.WritePropertyName("rfcTableFields"u8); - JsonSerializer.Serialize(writer, RfcTableFields); - } - if (Optional.IsDefined(RfcTableOptions)) - { - writer.WritePropertyName("rfcTableOptions"u8); - JsonSerializer.Serialize(writer, RfcTableOptions); - } - if (Optional.IsDefined(BatchSize)) - { - writer.WritePropertyName("batchSize"u8); - JsonSerializer.Serialize(writer, BatchSize); - } - if (Optional.IsDefined(CustomRfcReadTableFunctionModule)) - { - writer.WritePropertyName("customRfcReadTableFunctionModule"u8); - JsonSerializer.Serialize(writer, CustomRfcReadTableFunctionModule); - } - if (Optional.IsDefined(SapDataColumnDelimiter)) - { - writer.WritePropertyName("sapDataColumnDelimiter"u8); - JsonSerializer.Serialize(writer, SapDataColumnDelimiter); - } - if (Optional.IsDefined(PartitionOption)) - { - writer.WritePropertyName("partitionOption"u8); -#if NET6_0_OR_GREATER - writer.WriteRawValue(PartitionOption); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(PartitionOption.ToString()).RootElement); -#endif - } - if (Optional.IsDefined(PartitionSettings)) - { - writer.WritePropertyName("partitionSettings"u8); - writer.WriteObjectValue(PartitionSettings); - } - if (Optional.IsDefined(QueryTimeout)) - { - writer.WritePropertyName("queryTimeout"u8); - JsonSerializer.Serialize(writer, QueryTimeout); - } - if (Optional.IsDefined(AdditionalColumns)) - { - writer.WritePropertyName("additionalColumns"u8); -#if NET6_0_OR_GREATER - writer.WriteRawValue(AdditionalColumns); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(AdditionalColumns.ToString()).RootElement); -#endif - } - writer.WritePropertyName("type"u8); - writer.WriteStringValue(CopySourceType); - if (Optional.IsDefined(SourceRetryCount)) - { - writer.WritePropertyName("sourceRetryCount"u8); - JsonSerializer.Serialize(writer, SourceRetryCount); - } - if (Optional.IsDefined(SourceRetryWait)) - { - writer.WritePropertyName("sourceRetryWait"u8); - JsonSerializer.Serialize(writer, SourceRetryWait); - } - if (Optional.IsDefined(MaxConcurrentConnections)) - { - writer.WritePropertyName("maxConcurrentConnections"u8); - JsonSerializer.Serialize(writer, MaxConcurrentConnections); - } - if (Optional.IsDefined(DisableMetricsCollection)) - { - writer.WritePropertyName("disableMetricsCollection"u8); - JsonSerializer.Serialize(writer, DisableMetricsCollection); - } - foreach (var item in AdditionalProperties) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.Value.ToString()).RootElement); -#endif - } - writer.WriteEndObject(); - } - - internal static SapTableSource DeserializeSapTableSource(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - Optional> rowCount = default; - Optional> rowSkips = default; - Optional> rfcTableFields = default; - Optional> rfcTableOptions = default; - Optional> batchSize = default; - Optional> customRfcReadTableFunctionModule = default; - Optional> sapDataColumnDelimiter = default; - Optional partitionOption = default; - Optional partitionSettings = default; - Optional> queryTimeout = default; - Optional additionalColumns = default; - string type = default; - Optional> sourceRetryCount = default; - Optional> sourceRetryWait = default; - Optional> maxConcurrentConnections = default; - Optional> disableMetricsCollection = default; - IDictionary> additionalProperties = default; - Dictionary> additionalPropertiesDictionary = new Dictionary>(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("rowCount"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - rowCount = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("rowSkips"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - rowSkips = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("rfcTableFields"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - rfcTableFields = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("rfcTableOptions"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - rfcTableOptions = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("batchSize"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - batchSize = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("customRfcReadTableFunctionModule"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - customRfcReadTableFunctionModule = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("sapDataColumnDelimiter"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - sapDataColumnDelimiter = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("partitionOption"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - partitionOption = BinaryData.FromString(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("partitionSettings"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - partitionSettings = SapTablePartitionSettings.DeserializeSapTablePartitionSettings(property.Value); - continue; - } - if (property.NameEquals("queryTimeout"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - queryTimeout = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("additionalColumns"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - additionalColumns = BinaryData.FromString(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("type"u8)) - { - type = property.Value.GetString(); - continue; - } - if (property.NameEquals("sourceRetryCount"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - sourceRetryCount = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("sourceRetryWait"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - sourceRetryWait = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("maxConcurrentConnections"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - maxConcurrentConnections = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("disableMetricsCollection"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - disableMetricsCollection = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - additionalPropertiesDictionary.Add(property.Name, JsonSerializer.Deserialize>(property.Value.GetRawText())); - } - additionalProperties = additionalPropertiesDictionary; - return new SapTableSource(type, sourceRetryCount.Value, sourceRetryWait.Value, maxConcurrentConnections.Value, disableMetricsCollection.Value, additionalProperties, queryTimeout.Value, additionalColumns.Value, rowCount.Value, rowSkips.Value, rfcTableFields.Value, rfcTableOptions.Value, batchSize.Value, customRfcReadTableFunctionModule.Value, sapDataColumnDelimiter.Value, partitionOption.Value, partitionSettings.Value); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SapTableSource.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SapTableSource.cs deleted file mode 100644 index 7246ff27..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SapTableSource.cs +++ /dev/null @@ -1,98 +0,0 @@ -// - -#nullable disable - -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// A copy activity source for SAP Table source. - public partial class SapTableSource : TabularSource - { - /// Initializes a new instance of SapTableSource. - public SapTableSource() - { - CopySourceType = "SapTableSource"; - } - - /// Initializes a new instance of SapTableSource. - /// Copy source type. - /// Source retry count. Type: integer (or Expression with resultType integer). - /// Source retry wait. Type: string (or Expression with resultType string), pattern: ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). - /// The maximum concurrent connection count for the source data store. Type: integer (or Expression with resultType integer). - /// If true, disable data store metrics collection. Default is false. Type: boolean (or Expression with resultType boolean). - /// Additional Properties. - /// 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). - /// The number of rows to be retrieved. Type: integer(or Expression with resultType integer). - /// The number of rows that will be skipped. Type: integer (or Expression with resultType integer). - /// The fields of the SAP table that will be retrieved. For example, column0, column1. Type: string (or Expression with resultType string). - /// The options for the filtering of the SAP Table. For example, COLUMN0 EQ SOME VALUE. Type: string (or Expression with resultType string). - /// Specifies the maximum number of rows that will be retrieved at a time when retrieving data from SAP Table. Type: integer (or Expression with resultType integer). - /// Specifies the custom RFC function module that will be used to read data from SAP Table. Type: string (or Expression with resultType string). - /// The single character that will be used as delimiter passed to SAP RFC as well as splitting the output data retrieved. Type: string (or Expression with resultType string). - /// The partition mechanism that will be used for SAP table read in parallel. Possible values include: "None", "PartitionOnInt", "PartitionOnCalendarYear", "PartitionOnCalendarMonth", "PartitionOnCalendarDate", "PartitionOnTime". - /// The settings that will be leveraged for SAP table source partitioning. - internal SapTableSource(string copySourceType, DataFactoryElement sourceRetryCount, DataFactoryElement sourceRetryWait, DataFactoryElement maxConcurrentConnections, DataFactoryElement disableMetricsCollection, IDictionary> additionalProperties, DataFactoryElement queryTimeout, BinaryData additionalColumns, DataFactoryElement rowCount, DataFactoryElement rowSkips, DataFactoryElement rfcTableFields, DataFactoryElement rfcTableOptions, DataFactoryElement batchSize, DataFactoryElement customRfcReadTableFunctionModule, DataFactoryElement sapDataColumnDelimiter, BinaryData partitionOption, SapTablePartitionSettings partitionSettings) : base(copySourceType, sourceRetryCount, sourceRetryWait, maxConcurrentConnections, disableMetricsCollection, additionalProperties, queryTimeout, additionalColumns) - { - RowCount = rowCount; - RowSkips = rowSkips; - RfcTableFields = rfcTableFields; - RfcTableOptions = rfcTableOptions; - BatchSize = batchSize; - CustomRfcReadTableFunctionModule = customRfcReadTableFunctionModule; - SapDataColumnDelimiter = sapDataColumnDelimiter; - PartitionOption = partitionOption; - PartitionSettings = partitionSettings; - CopySourceType = copySourceType ?? "SapTableSource"; - } - - /// The number of rows to be retrieved. Type: integer(or Expression with resultType integer). - public DataFactoryElement RowCount { get; set; } - /// The number of rows that will be skipped. Type: integer (or Expression with resultType integer). - public DataFactoryElement RowSkips { get; set; } - /// The fields of the SAP table that will be retrieved. For example, column0, column1. Type: string (or Expression with resultType string). - public DataFactoryElement RfcTableFields { get; set; } - /// The options for the filtering of the SAP Table. For example, COLUMN0 EQ SOME VALUE. Type: string (or Expression with resultType string). - public DataFactoryElement RfcTableOptions { get; set; } - /// Specifies the maximum number of rows that will be retrieved at a time when retrieving data from SAP Table. Type: integer (or Expression with resultType integer). - public DataFactoryElement BatchSize { get; set; } - /// Specifies the custom RFC function module that will be used to read data from SAP Table. Type: string (or Expression with resultType string). - public DataFactoryElement CustomRfcReadTableFunctionModule { get; set; } - /// The single character that will be used as delimiter passed to SAP RFC as well as splitting the output data retrieved. Type: string (or Expression with resultType string). - public DataFactoryElement SapDataColumnDelimiter { get; set; } - /// - /// The partition mechanism that will be used for SAP table read in parallel. Possible values include: "None", "PartitionOnInt", "PartitionOnCalendarYear", "PartitionOnCalendarMonth", "PartitionOnCalendarDate", "PartitionOnTime". - /// - /// To assign an object to this property use . - /// - /// - /// To assign an already formated json string to this property use . - /// - /// - /// Examples: - /// - /// - /// BinaryData.FromObjectAsJson("foo") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromString("\"foo\"") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromObjectAsJson(new { key = "value" }) - /// Creates a payload of { "key": "value" }. - /// - /// - /// BinaryData.FromString("{\"key\": \"value\"}") - /// Creates a payload of { "key": "value" }. - /// - /// - /// - /// - public BinaryData PartitionOption { get; set; } - /// The settings that will be leveraged for SAP table source partitioning. - public SapTablePartitionSettings PartitionSettings { get; set; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/ScheduleTriggerRecurrence.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/ScheduleTriggerRecurrence.Serialization.cs deleted file mode 100644 index e0ac32da..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/ScheduleTriggerRecurrence.Serialization.cs +++ /dev/null @@ -1,130 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class ScheduleTriggerRecurrence : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - if (Optional.IsDefined(Frequency)) - { - writer.WritePropertyName("frequency"u8); - writer.WriteStringValue(Frequency.Value.ToString()); - } - if (Optional.IsDefined(Interval)) - { - writer.WritePropertyName("interval"u8); - writer.WriteNumberValue(Interval.Value); - } - if (Optional.IsDefined(StartOn)) - { - writer.WritePropertyName("startTime"u8); - writer.WriteStringValue(StartOn.Value, "O"); - } - if (Optional.IsDefined(EndOn)) - { - writer.WritePropertyName("endTime"u8); - writer.WriteStringValue(EndOn.Value, "O"); - } - if (Optional.IsDefined(TimeZone)) - { - writer.WritePropertyName("timeZone"u8); - writer.WriteStringValue(TimeZone); - } - if (Optional.IsDefined(Schedule)) - { - writer.WritePropertyName("schedule"u8); - writer.WriteObjectValue(Schedule); - } - foreach (var item in AdditionalProperties) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.Value.ToString()).RootElement); -#endif - } - writer.WriteEndObject(); - } - - internal static ScheduleTriggerRecurrence DeserializeScheduleTriggerRecurrence(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - Optional frequency = default; - Optional interval = default; - Optional startTime = default; - Optional endTime = default; - Optional timeZone = default; - Optional schedule = default; - IDictionary> additionalProperties = default; - Dictionary> additionalPropertiesDictionary = new Dictionary>(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("frequency"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - frequency = new DataFactoryRecurrenceFrequency(property.Value.GetString()); - continue; - } - if (property.NameEquals("interval"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - interval = property.Value.GetInt32(); - continue; - } - if (property.NameEquals("startTime"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - startTime = property.Value.GetDateTimeOffset("O"); - continue; - } - if (property.NameEquals("endTime"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - endTime = property.Value.GetDateTimeOffset("O"); - continue; - } - if (property.NameEquals("timeZone"u8)) - { - timeZone = property.Value.GetString(); - continue; - } - if (property.NameEquals("schedule"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - schedule = DataFactoryRecurrenceSchedule.DeserializeDataFactoryRecurrenceSchedule(property.Value); - continue; - } - additionalPropertiesDictionary.Add(property.Name, JsonSerializer.Deserialize>(property.Value.GetRawText())); - } - additionalProperties = additionalPropertiesDictionary; - return new ScheduleTriggerRecurrence(Optional.ToNullable(frequency), Optional.ToNullable(interval), Optional.ToNullable(startTime), Optional.ToNullable(endTime), timeZone.Value, schedule.Value, additionalProperties); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/ScheduleTriggerRecurrence.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/ScheduleTriggerRecurrence.cs deleted file mode 100644 index 7ad1c47b..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/ScheduleTriggerRecurrence.cs +++ /dev/null @@ -1,82 +0,0 @@ -// - -#nullable disable - -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// The workflow trigger recurrence. - public partial class ScheduleTriggerRecurrence - { - /// Initializes a new instance of ScheduleTriggerRecurrence. - public ScheduleTriggerRecurrence() - { - AdditionalProperties = new ChangeTrackingDictionary>(); - } - - /// Initializes a new instance of ScheduleTriggerRecurrence. - /// The frequency. - /// The interval. - /// The start time. - /// The end time. - /// The time zone. - /// The recurrence schedule. - /// Additional Properties. - internal ScheduleTriggerRecurrence(DataFactoryRecurrenceFrequency? frequency, int? interval, DateTimeOffset? startOn, DateTimeOffset? endOn, string timeZone, DataFactoryRecurrenceSchedule schedule, IDictionary> additionalProperties) - { - Frequency = frequency; - Interval = interval; - StartOn = startOn; - EndOn = endOn; - TimeZone = timeZone; - Schedule = schedule; - AdditionalProperties = additionalProperties; - } - - /// The frequency. - public DataFactoryRecurrenceFrequency? Frequency { get; set; } - /// The interval. - public int? Interval { get; set; } - /// The start time. - public DateTimeOffset? StartOn { get; set; } - /// The end time. - public DateTimeOffset? EndOn { get; set; } - /// The time zone. - public string TimeZone { get; set; } - /// The recurrence schedule. - public DataFactoryRecurrenceSchedule Schedule { get; set; } - /// - /// Additional Properties - /// - /// To assign an object to the value of this property use . - /// - /// - /// To assign an already formated json string to this property use . - /// - /// - /// Examples: - /// - /// - /// BinaryData.FromObjectAsJson("foo") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromString("\"foo\"") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromObjectAsJson(new { key = "value" }) - /// Creates a payload of { "key": "value" }. - /// - /// - /// BinaryData.FromString("{\"key\": \"value\"}") - /// Creates a payload of { "key": "value" }. - /// - /// - /// - /// - public IDictionary> AdditionalProperties { get; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/ScriptActivityLogDestination.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/ScriptActivityLogDestination.cs deleted file mode 100644 index 8387995a..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/ScriptActivityLogDestination.cs +++ /dev/null @@ -1,47 +0,0 @@ -// - -#nullable disable - -using System.ComponentModel; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// The destination of logs. Type: string. - public readonly partial struct ScriptActivityLogDestination : IEquatable - { - private readonly string _value; - - /// Initializes a new instance of . - /// is null. - public ScriptActivityLogDestination(string value) - { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } - - private const string ActivityOutputValue = "ActivityOutput"; - private const string ExternalStoreValue = "ExternalStore"; - - /// ActivityOutput. - public static ScriptActivityLogDestination ActivityOutput { get; } = new ScriptActivityLogDestination(ActivityOutputValue); - /// ExternalStore. - public static ScriptActivityLogDestination ExternalStore { get; } = new ScriptActivityLogDestination(ExternalStoreValue); - /// Determines if two values are the same. - public static bool operator ==(ScriptActivityLogDestination left, ScriptActivityLogDestination right) => left.Equals(right); - /// Determines if two values are not the same. - public static bool operator !=(ScriptActivityLogDestination left, ScriptActivityLogDestination right) => !left.Equals(right); - /// Converts a string to a . - public static implicit operator ScriptActivityLogDestination(string value) => new ScriptActivityLogDestination(value); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override bool Equals(object obj) => obj is ScriptActivityLogDestination other && Equals(other); - /// - public bool Equals(ScriptActivityLogDestination other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override int GetHashCode() => _value?.GetHashCode() ?? 0; - /// - public override string ToString() => _value; - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/ScriptActivityParameter.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/ScriptActivityParameter.Serialization.cs deleted file mode 100644 index 0499851d..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/ScriptActivityParameter.Serialization.cs +++ /dev/null @@ -1,106 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class ScriptActivityParameter : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - if (Optional.IsDefined(Name)) - { - writer.WritePropertyName("name"u8); - JsonSerializer.Serialize(writer, Name); - } - if (Optional.IsDefined(ParameterType)) - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ParameterType.Value.ToString()); - } - if (Optional.IsDefined(Value)) - { - writer.WritePropertyName("value"u8); - JsonSerializer.Serialize(writer, Value); - } - if (Optional.IsDefined(Direction)) - { - writer.WritePropertyName("direction"u8); - writer.WriteStringValue(Direction.Value.ToString()); - } - if (Optional.IsDefined(Size)) - { - writer.WritePropertyName("size"u8); - writer.WriteNumberValue(Size.Value); - } - writer.WriteEndObject(); - } - - internal static ScriptActivityParameter DeserializeScriptActivityParameter(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - Optional> name = default; - Optional type = default; - Optional> value = default; - Optional direction = default; - Optional size = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("name"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - name = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("type"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - type = new ScriptActivityParameterType(property.Value.GetString()); - continue; - } - if (property.NameEquals("value"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - value = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("direction"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - direction = new ScriptActivityParameterDirection(property.Value.GetString()); - continue; - } - if (property.NameEquals("size"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - size = property.Value.GetInt32(); - continue; - } - } - return new ScriptActivityParameter(name.Value, Optional.ToNullable(type), value.Value, Optional.ToNullable(direction), Optional.ToNullable(size)); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/ScriptActivityParameter.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/ScriptActivityParameter.cs deleted file mode 100644 index c715d536..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/ScriptActivityParameter.cs +++ /dev/null @@ -1,43 +0,0 @@ -// - -#nullable disable - -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// Parameters of a script block. - public partial class ScriptActivityParameter - { - /// Initializes a new instance of ScriptActivityParameter. - public ScriptActivityParameter() - { - } - - /// Initializes a new instance of ScriptActivityParameter. - /// The name of the parameter. Type: string (or Expression with resultType string). - /// The type of the parameter. - /// The value of the parameter. Type: string (or Expression with resultType string). - /// The direction of the parameter. - /// The size of the output direction parameter. - internal ScriptActivityParameter(DataFactoryElement name, ScriptActivityParameterType? parameterType, DataFactoryElement value, ScriptActivityParameterDirection? direction, int? size) - { - Name = name; - ParameterType = parameterType; - Value = value; - Direction = direction; - Size = size; - } - - /// The name of the parameter. Type: string (or Expression with resultType string). - public DataFactoryElement Name { get; set; } - /// The type of the parameter. - public ScriptActivityParameterType? ParameterType { get; set; } - /// The value of the parameter. Type: string (or Expression with resultType string). - public DataFactoryElement Value { get; set; } - /// The direction of the parameter. - public ScriptActivityParameterDirection? Direction { get; set; } - /// The size of the output direction parameter. - public int? Size { get; set; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/ScriptActivityParameterDirection.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/ScriptActivityParameterDirection.cs deleted file mode 100644 index a35dcb0f..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/ScriptActivityParameterDirection.cs +++ /dev/null @@ -1,50 +0,0 @@ -// - -#nullable disable - -using System.ComponentModel; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// The direction of the parameter. - public readonly partial struct ScriptActivityParameterDirection : IEquatable - { - private readonly string _value; - - /// Initializes a new instance of . - /// is null. - public ScriptActivityParameterDirection(string value) - { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } - - private const string InputValue = "Input"; - private const string OutputValue = "Output"; - private const string InputOutputValue = "InputOutput"; - - /// Input. - public static ScriptActivityParameterDirection Input { get; } = new ScriptActivityParameterDirection(InputValue); - /// Output. - public static ScriptActivityParameterDirection Output { get; } = new ScriptActivityParameterDirection(OutputValue); - /// InputOutput. - public static ScriptActivityParameterDirection InputOutput { get; } = new ScriptActivityParameterDirection(InputOutputValue); - /// Determines if two values are the same. - public static bool operator ==(ScriptActivityParameterDirection left, ScriptActivityParameterDirection right) => left.Equals(right); - /// Determines if two values are not the same. - public static bool operator !=(ScriptActivityParameterDirection left, ScriptActivityParameterDirection right) => !left.Equals(right); - /// Converts a string to a . - public static implicit operator ScriptActivityParameterDirection(string value) => new ScriptActivityParameterDirection(value); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override bool Equals(object obj) => obj is ScriptActivityParameterDirection other && Equals(other); - /// - public bool Equals(ScriptActivityParameterDirection other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override int GetHashCode() => _value?.GetHashCode() ?? 0; - /// - public override string ToString() => _value; - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/ScriptActivityParameterType.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/ScriptActivityParameterType.cs deleted file mode 100644 index 90f69454..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/ScriptActivityParameterType.cs +++ /dev/null @@ -1,77 +0,0 @@ -// - -#nullable disable - -using System.ComponentModel; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// The type of the parameter. - public readonly partial struct ScriptActivityParameterType : IEquatable - { - private readonly string _value; - - /// Initializes a new instance of . - /// is null. - public ScriptActivityParameterType(string value) - { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } - - private const string BooleanValue = "Boolean"; - private const string DateTimeValue = "DateTime"; - private const string DateTimeOffsetValue = "DateTimeOffset"; - private const string DecimalValue = "Decimal"; - private const string DoubleValue = "Double"; - private const string GuidValue = "Guid"; - private const string Int16Value = "Int16"; - private const string Int32Value = "Int32"; - private const string Int64Value = "Int64"; - private const string SingleValue = "Single"; - private const string StringValue = "String"; - private const string TimeSpanValue = "Timespan"; - - /// Boolean. - public static ScriptActivityParameterType Boolean { get; } = new ScriptActivityParameterType(BooleanValue); - /// DateTime. - public static ScriptActivityParameterType DateTime { get; } = new ScriptActivityParameterType(DateTimeValue); - /// DateTimeOffset. - public static ScriptActivityParameterType DateTimeOffset { get; } = new ScriptActivityParameterType(DateTimeOffsetValue); - /// Decimal. - public static ScriptActivityParameterType Decimal { get; } = new ScriptActivityParameterType(DecimalValue); - /// Double. - public static ScriptActivityParameterType Double { get; } = new ScriptActivityParameterType(DoubleValue); - /// Guid. - public static ScriptActivityParameterType Guid { get; } = new ScriptActivityParameterType(GuidValue); - /// Int16. - public static ScriptActivityParameterType Int16 { get; } = new ScriptActivityParameterType(Int16Value); - /// Int32. - public static ScriptActivityParameterType Int32 { get; } = new ScriptActivityParameterType(Int32Value); - /// Int64. - public static ScriptActivityParameterType Int64 { get; } = new ScriptActivityParameterType(Int64Value); - /// Single. - public static ScriptActivityParameterType Single { get; } = new ScriptActivityParameterType(SingleValue); - /// String. - public static ScriptActivityParameterType String { get; } = new ScriptActivityParameterType(StringValue); - /// Timespan. - public static ScriptActivityParameterType TimeSpan { get; } = new ScriptActivityParameterType(TimeSpanValue); - /// Determines if two values are the same. - public static bool operator ==(ScriptActivityParameterType left, ScriptActivityParameterType right) => left.Equals(right); - /// Determines if two values are not the same. - public static bool operator !=(ScriptActivityParameterType left, ScriptActivityParameterType right) => !left.Equals(right); - /// Converts a string to a . - public static implicit operator ScriptActivityParameterType(string value) => new ScriptActivityParameterType(value); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override bool Equals(object obj) => obj is ScriptActivityParameterType other && Equals(other); - /// - public bool Equals(ScriptActivityParameterType other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override int GetHashCode() => _value?.GetHashCode() ?? 0; - /// - public override string ToString() => _value; - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/ScriptActivityScriptBlock.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/ScriptActivityScriptBlock.Serialization.cs deleted file mode 100644 index 51dc0f3d..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/ScriptActivityScriptBlock.Serialization.cs +++ /dev/null @@ -1,72 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class ScriptActivityScriptBlock : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - writer.WritePropertyName("text"u8); - JsonSerializer.Serialize(writer, Text); - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ScriptType.ToString()); - if (Optional.IsCollectionDefined(Parameters)) - { - writer.WritePropertyName("parameters"u8); - writer.WriteStartArray(); - foreach (var item in Parameters) - { - writer.WriteObjectValue(item); - } - writer.WriteEndArray(); - } - writer.WriteEndObject(); - } - - internal static ScriptActivityScriptBlock DeserializeScriptActivityScriptBlock(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - DataFactoryElement text = default; - DataFactoryScriptType type = default; - Optional> parameters = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("text"u8)) - { - text = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("type"u8)) - { - type = new DataFactoryScriptType(property.Value.GetString()); - continue; - } - if (property.NameEquals("parameters"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - array.Add(ScriptActivityParameter.DeserializeScriptActivityParameter(item)); - } - parameters = array; - continue; - } - } - return new ScriptActivityScriptBlock(text, type, Optional.ToList(parameters)); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/ScriptActivityScriptBlock.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/ScriptActivityScriptBlock.cs deleted file mode 100644 index 32851366..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/ScriptActivityScriptBlock.cs +++ /dev/null @@ -1,44 +0,0 @@ -// - -#nullable disable - -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// Script block of scripts. - public partial class ScriptActivityScriptBlock - { - /// Initializes a new instance of ScriptActivityScriptBlock. - /// The query text. Type: string (or Expression with resultType string). - /// The type of the query. Type: string. - /// is null. - public ScriptActivityScriptBlock(DataFactoryElement text, DataFactoryScriptType scriptType) - { - Argument.AssertNotNull(text, nameof(text)); - - Text = text; - ScriptType = scriptType; - Parameters = new ChangeTrackingList(); - } - - /// Initializes a new instance of ScriptActivityScriptBlock. - /// The query text. Type: string (or Expression with resultType string). - /// The type of the query. Type: string. - /// Array of script parameters. Type: array. - internal ScriptActivityScriptBlock(DataFactoryElement text, DataFactoryScriptType scriptType, IList parameters) - { - Text = text; - ScriptType = scriptType; - Parameters = parameters; - } - - /// The query text. Type: string (or Expression with resultType string). - public DataFactoryElement Text { get; set; } - /// The type of the query. Type: string. - public DataFactoryScriptType ScriptType { get; set; } - /// Array of script parameters. Type: array. - public IList Parameters { get; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/ScriptActivityTypeLogSettings.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/ScriptActivityTypeLogSettings.Serialization.cs deleted file mode 100644 index 7bf5f758..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/ScriptActivityTypeLogSettings.Serialization.cs +++ /dev/null @@ -1,53 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class ScriptActivityTypeLogSettings : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - writer.WritePropertyName("logDestination"u8); - writer.WriteStringValue(LogDestination.ToString()); - if (Optional.IsDefined(LogLocationSettings)) - { - writer.WritePropertyName("logLocationSettings"u8); - writer.WriteObjectValue(LogLocationSettings); - } - writer.WriteEndObject(); - } - - internal static ScriptActivityTypeLogSettings DeserializeScriptActivityTypeLogSettings(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - ScriptActivityLogDestination logDestination = default; - Optional logLocationSettings = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("logDestination"u8)) - { - logDestination = new ScriptActivityLogDestination(property.Value.GetString()); - continue; - } - if (property.NameEquals("logLocationSettings"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - logLocationSettings = LogLocationSettings.DeserializeLogLocationSettings(property.Value); - continue; - } - } - return new ScriptActivityTypeLogSettings(logDestination, logLocationSettings.Value); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/ScriptActivityTypeLogSettings.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/ScriptActivityTypeLogSettings.cs deleted file mode 100644 index 44834482..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/ScriptActivityTypeLogSettings.cs +++ /dev/null @@ -1,31 +0,0 @@ -// - -#nullable disable - -namespace AzureDataFactory.TestingFramework.Models -{ - /// Log settings of script activity. - public partial class ScriptActivityTypeLogSettings - { - /// Initializes a new instance of ScriptActivityTypeLogSettings. - /// The destination of logs. Type: string. - public ScriptActivityTypeLogSettings(ScriptActivityLogDestination logDestination) - { - LogDestination = logDestination; - } - - /// Initializes a new instance of ScriptActivityTypeLogSettings. - /// The destination of logs. Type: string. - /// Log location settings customer needs to provide when enabling log. - internal ScriptActivityTypeLogSettings(ScriptActivityLogDestination logDestination, LogLocationSettings logLocationSettings) - { - LogDestination = logDestination; - LogLocationSettings = logLocationSettings; - } - - /// The destination of logs. Type: string. - public ScriptActivityLogDestination LogDestination { get; set; } - /// Log location settings customer needs to provide when enabling log. - public LogLocationSettings LogLocationSettings { get; set; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SecureInputOutputPolicy.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SecureInputOutputPolicy.Serialization.cs deleted file mode 100644 index 66e68673..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SecureInputOutputPolicy.Serialization.cs +++ /dev/null @@ -1,60 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class SecureInputOutputPolicy : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - if (Optional.IsDefined(IsSecureInputEnabled)) - { - writer.WritePropertyName("secureInput"u8); - writer.WriteBooleanValue(IsSecureInputEnabled.Value); - } - if (Optional.IsDefined(IsSecureOutputEnabled)) - { - writer.WritePropertyName("secureOutput"u8); - writer.WriteBooleanValue(IsSecureOutputEnabled.Value); - } - writer.WriteEndObject(); - } - - internal static SecureInputOutputPolicy DeserializeSecureInputOutputPolicy(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - Optional secureInput = default; - Optional secureOutput = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("secureInput"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - secureInput = property.Value.GetBoolean(); - continue; - } - if (property.NameEquals("secureOutput"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - secureOutput = property.Value.GetBoolean(); - continue; - } - } - return new SecureInputOutputPolicy(Optional.ToNullable(secureInput), Optional.ToNullable(secureOutput)); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SecureInputOutputPolicy.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SecureInputOutputPolicy.cs deleted file mode 100644 index e8ff58be..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SecureInputOutputPolicy.cs +++ /dev/null @@ -1,29 +0,0 @@ -// - -#nullable disable - -namespace AzureDataFactory.TestingFramework.Models -{ - /// Execution policy for an activity that supports secure input and output. - public partial class SecureInputOutputPolicy - { - /// Initializes a new instance of SecureInputOutputPolicy. - public SecureInputOutputPolicy() - { - } - - /// Initializes a new instance of SecureInputOutputPolicy. - /// When set to true, Input from activity is considered as secure and will not be logged to monitoring. - /// When set to true, Output from activity is considered as secure and will not be logged to monitoring. - internal SecureInputOutputPolicy(bool? isSecureInputEnabled, bool? isSecureOutputEnabled) - { - IsSecureInputEnabled = isSecureInputEnabled; - IsSecureOutputEnabled = isSecureOutputEnabled; - } - - /// When set to true, Input from activity is considered as secure and will not be logged to monitoring. - public bool? IsSecureInputEnabled { get; set; } - /// When set to true, Output from activity is considered as secure and will not be logged to monitoring. - public bool? IsSecureOutputEnabled { get; set; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SelfDependencyTumblingWindowTriggerReference.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SelfDependencyTumblingWindowTriggerReference.Serialization.cs deleted file mode 100644 index 8bcb9644..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SelfDependencyTumblingWindowTriggerReference.Serialization.cs +++ /dev/null @@ -1,57 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class SelfDependencyTumblingWindowTriggerReference : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - writer.WritePropertyName("offset"u8); - writer.WriteStringValue(Offset); - if (Optional.IsDefined(Size)) - { - writer.WritePropertyName("size"u8); - writer.WriteStringValue(Size); - } - writer.WritePropertyName("type"u8); - writer.WriteStringValue(DependencyReferenceType); - writer.WriteEndObject(); - } - - internal static SelfDependencyTumblingWindowTriggerReference DeserializeSelfDependencyTumblingWindowTriggerReference(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - string offset = default; - Optional size = default; - string type = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("offset"u8)) - { - offset = property.Value.GetString(); - continue; - } - if (property.NameEquals("size"u8)) - { - size = property.Value.GetString(); - continue; - } - if (property.NameEquals("type"u8)) - { - type = property.Value.GetString(); - continue; - } - } - return new SelfDependencyTumblingWindowTriggerReference(type, offset, size.Value); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SelfDependencyTumblingWindowTriggerReference.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SelfDependencyTumblingWindowTriggerReference.cs deleted file mode 100644 index 0a0d2e81..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SelfDependencyTumblingWindowTriggerReference.cs +++ /dev/null @@ -1,39 +0,0 @@ -// - -#nullable disable - -using Azure.Core; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// Self referenced tumbling window trigger dependency. - public partial class SelfDependencyTumblingWindowTriggerReference : DependencyReference - { - /// Initializes a new instance of SelfDependencyTumblingWindowTriggerReference. - /// Timespan applied to the start time of a tumbling window when evaluating dependency. - /// is null. - public SelfDependencyTumblingWindowTriggerReference(string offset) - { - Argument.AssertNotNull(offset, nameof(offset)); - - Offset = offset; - DependencyReferenceType = "SelfDependencyTumblingWindowTriggerReference"; - } - - /// Initializes a new instance of SelfDependencyTumblingWindowTriggerReference. - /// The type of dependency reference. - /// Timespan applied to the start time of a tumbling window when evaluating dependency. - /// The size of the window when evaluating the dependency. If undefined the frequency of the tumbling window will be used. - internal SelfDependencyTumblingWindowTriggerReference(string dependencyReferenceType, string offset, string size) : base(dependencyReferenceType) - { - Offset = offset; - Size = size; - DependencyReferenceType = dependencyReferenceType ?? "SelfDependencyTumblingWindowTriggerReference"; - } - - /// Timespan applied to the start time of a tumbling window when evaluating dependency. - public string Offset { get; set; } - /// The size of the window when evaluating the dependency. If undefined the frequency of the tumbling window will be used. - public string Size { get; set; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SelfHostedIntegrationRuntime.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SelfHostedIntegrationRuntime.Serialization.cs deleted file mode 100644 index d62ca248..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SelfHostedIntegrationRuntime.Serialization.cs +++ /dev/null @@ -1,93 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class SelfHostedIntegrationRuntime : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - writer.WritePropertyName("type"u8); - writer.WriteStringValue(IntegrationRuntimeType.ToString()); - if (Optional.IsDefined(Description)) - { - writer.WritePropertyName("description"u8); - writer.WriteStringValue(Description); - } - writer.WritePropertyName("typeProperties"u8); - writer.WriteStartObject(); - if (Optional.IsDefined(LinkedInfo)) - { - writer.WritePropertyName("linkedInfo"u8); - writer.WriteObjectValue(LinkedInfo); - } - writer.WriteEndObject(); - foreach (var item in AdditionalProperties) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.Value.ToString()).RootElement); -#endif - } - writer.WriteEndObject(); - } - - internal static SelfHostedIntegrationRuntime DeserializeSelfHostedIntegrationRuntime(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - IntegrationRuntimeType type = default; - Optional description = default; - Optional linkedInfo = default; - IDictionary> additionalProperties = default; - Dictionary> additionalPropertiesDictionary = new Dictionary>(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("type"u8)) - { - type = new IntegrationRuntimeType(property.Value.GetString()); - continue; - } - if (property.NameEquals("description"u8)) - { - description = property.Value.GetString(); - continue; - } - if (property.NameEquals("typeProperties"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - foreach (var property0 in property.Value.EnumerateObject()) - { - if (property0.NameEquals("linkedInfo"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - linkedInfo = LinkedIntegrationRuntimeType.DeserializeLinkedIntegrationRuntimeType(property0.Value); - continue; - } - } - continue; - } - additionalPropertiesDictionary.Add(property.Name, JsonSerializer.Deserialize>(property.Value.GetRawText())); - } - additionalProperties = additionalPropertiesDictionary; - return new SelfHostedIntegrationRuntime(type, description.Value, additionalProperties, linkedInfo.Value); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SelfHostedIntegrationRuntime.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SelfHostedIntegrationRuntime.cs deleted file mode 100644 index 94712729..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SelfHostedIntegrationRuntime.cs +++ /dev/null @@ -1,40 +0,0 @@ -// - -#nullable disable - -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// Self-hosted integration runtime. - public partial class SelfHostedIntegrationRuntime : DataFactoryIntegrationRuntimeProperties - { - /// Initializes a new instance of SelfHostedIntegrationRuntime. - public SelfHostedIntegrationRuntime() - { - IntegrationRuntimeType = IntegrationRuntimeType.SelfHosted; - } - - /// Initializes a new instance of SelfHostedIntegrationRuntime. - /// Type of integration runtime. - /// Integration runtime description. - /// Additional Properties. - /// - /// The base definition of a linked integration runtime. - /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. - /// The available derived classes include and . - /// - internal SelfHostedIntegrationRuntime(IntegrationRuntimeType integrationRuntimeType, string description, IDictionary> additionalProperties, LinkedIntegrationRuntimeType linkedInfo) : base(integrationRuntimeType, description, additionalProperties) - { - LinkedInfo = linkedInfo; - IntegrationRuntimeType = integrationRuntimeType; - } - - /// - /// The base definition of a linked integration runtime. - /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. - /// The available derived classes include and . - /// - public LinkedIntegrationRuntimeType LinkedInfo { get; set; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SelfHostedIntegrationRuntimeNode.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SelfHostedIntegrationRuntimeNode.Serialization.cs deleted file mode 100644 index 8fbfa6f9..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SelfHostedIntegrationRuntimeNode.Serialization.cs +++ /dev/null @@ -1,198 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class SelfHostedIntegrationRuntimeNode - { - internal static SelfHostedIntegrationRuntimeNode DeserializeSelfHostedIntegrationRuntimeNode(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - Optional nodeName = default; - Optional machineName = default; - Optional hostServiceUri = default; - Optional status = default; - Optional> capabilities = default; - Optional versionStatus = default; - Optional version = default; - Optional registerTime = default; - Optional lastConnectTime = default; - Optional expiryTime = default; - Optional lastStartTime = default; - Optional lastStopTime = default; - Optional lastUpdateResult = default; - Optional lastStartUpdateTime = default; - Optional lastEndUpdateTime = default; - Optional isActiveDispatcher = default; - Optional concurrentJobsLimit = default; - Optional maxConcurrentJobs = default; - IReadOnlyDictionary> additionalProperties = default; - Dictionary> additionalPropertiesDictionary = new Dictionary>(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("nodeName"u8)) - { - nodeName = property.Value.GetString(); - continue; - } - if (property.NameEquals("machineName"u8)) - { - machineName = property.Value.GetString(); - continue; - } - if (property.NameEquals("hostServiceUri"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - hostServiceUri = new Uri(property.Value.GetString()); - continue; - } - if (property.NameEquals("status"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - status = new SelfHostedIntegrationRuntimeNodeStatus(property.Value.GetString()); - continue; - } - if (property.NameEquals("capabilities"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - Dictionary dictionary = new Dictionary(); - foreach (var property0 in property.Value.EnumerateObject()) - { - dictionary.Add(property0.Name, property0.Value.GetString()); - } - capabilities = dictionary; - continue; - } - if (property.NameEquals("versionStatus"u8)) - { - versionStatus = property.Value.GetString(); - continue; - } - if (property.NameEquals("version"u8)) - { - version = property.Value.GetString(); - continue; - } - if (property.NameEquals("registerTime"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - registerTime = property.Value.GetDateTimeOffset("O"); - continue; - } - if (property.NameEquals("lastConnectTime"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - lastConnectTime = property.Value.GetDateTimeOffset("O"); - continue; - } - if (property.NameEquals("expiryTime"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - expiryTime = property.Value.GetDateTimeOffset("O"); - continue; - } - if (property.NameEquals("lastStartTime"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - lastStartTime = property.Value.GetDateTimeOffset("O"); - continue; - } - if (property.NameEquals("lastStopTime"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - lastStopTime = property.Value.GetDateTimeOffset("O"); - continue; - } - if (property.NameEquals("lastUpdateResult"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - lastUpdateResult = new IntegrationRuntimeUpdateResult(property.Value.GetString()); - continue; - } - if (property.NameEquals("lastStartUpdateTime"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - lastStartUpdateTime = property.Value.GetDateTimeOffset("O"); - continue; - } - if (property.NameEquals("lastEndUpdateTime"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - lastEndUpdateTime = property.Value.GetDateTimeOffset("O"); - continue; - } - if (property.NameEquals("isActiveDispatcher"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - isActiveDispatcher = property.Value.GetBoolean(); - continue; - } - if (property.NameEquals("concurrentJobsLimit"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - concurrentJobsLimit = property.Value.GetInt32(); - continue; - } - if (property.NameEquals("maxConcurrentJobs"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - maxConcurrentJobs = property.Value.GetInt32(); - continue; - } - additionalPropertiesDictionary.Add(property.Name, JsonSerializer.Deserialize>(property.Value.GetRawText())); - } - additionalProperties = additionalPropertiesDictionary; - return new SelfHostedIntegrationRuntimeNode(nodeName.Value, machineName.Value, hostServiceUri.Value, Optional.ToNullable(status), Optional.ToDictionary(capabilities), versionStatus.Value, version.Value, Optional.ToNullable(registerTime), Optional.ToNullable(lastConnectTime), Optional.ToNullable(expiryTime), Optional.ToNullable(lastStartTime), Optional.ToNullable(lastStopTime), Optional.ToNullable(lastUpdateResult), Optional.ToNullable(lastStartUpdateTime), Optional.ToNullable(lastEndUpdateTime), Optional.ToNullable(isActiveDispatcher), Optional.ToNullable(concurrentJobsLimit), Optional.ToNullable(maxConcurrentJobs), additionalProperties); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SelfHostedIntegrationRuntimeNode.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SelfHostedIntegrationRuntimeNode.cs deleted file mode 100644 index e7ce138f..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SelfHostedIntegrationRuntimeNode.cs +++ /dev/null @@ -1,131 +0,0 @@ -// - -#nullable disable - -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// Properties of Self-hosted integration runtime node. - public partial class SelfHostedIntegrationRuntimeNode - { - /// Initializes a new instance of SelfHostedIntegrationRuntimeNode. - internal SelfHostedIntegrationRuntimeNode() - { - Capabilities = new ChangeTrackingDictionary(); - AdditionalProperties = new ChangeTrackingDictionary>(); - } - - /// Initializes a new instance of SelfHostedIntegrationRuntimeNode. - /// Name of the integration runtime node. - /// Machine name of the integration runtime node. - /// URI for the host machine of the integration runtime. - /// Status of the integration runtime node. - /// The integration runtime capabilities dictionary. - /// Status of the integration runtime node version. - /// Version of the integration runtime node. - /// The time at which the integration runtime node was registered in ISO8601 format. - /// The most recent time at which the integration runtime was connected in ISO8601 format. - /// The time at which the integration runtime will expire in ISO8601 format. - /// The time the node last started up. - /// The integration runtime node last stop time. - /// The result of the last integration runtime node update. - /// The last time for the integration runtime node update start. - /// The last time for the integration runtime node update end. - /// Indicates whether this node is the active dispatcher for integration runtime requests. - /// Maximum concurrent jobs on the integration runtime node. - /// The maximum concurrent jobs in this integration runtime. - /// Additional Properties. - internal SelfHostedIntegrationRuntimeNode(string nodeName, string machineName, Uri hostServiceUri, SelfHostedIntegrationRuntimeNodeStatus? status, IReadOnlyDictionary capabilities, string versionStatus, string version, DateTimeOffset? registerOn, DateTimeOffset? lastConnectOn, DateTimeOffset? expireOn, DateTimeOffset? lastStartOn, DateTimeOffset? lastStopOn, IntegrationRuntimeUpdateResult? lastUpdateResult, DateTimeOffset? lastStartUpdateOn, DateTimeOffset? lastEndUpdateOn, bool? isActiveDispatcher, int? concurrentJobsLimit, int? maxConcurrentJobs, IReadOnlyDictionary> additionalProperties) - { - NodeName = nodeName; - MachineName = machineName; - HostServiceUri = hostServiceUri; - Status = status; - Capabilities = capabilities; - VersionStatus = versionStatus; - Version = version; - RegisterOn = registerOn; - LastConnectOn = lastConnectOn; - ExpireOn = expireOn; - LastStartOn = lastStartOn; - LastStopOn = lastStopOn; - LastUpdateResult = lastUpdateResult; - LastStartUpdateOn = lastStartUpdateOn; - LastEndUpdateOn = lastEndUpdateOn; - IsActiveDispatcher = isActiveDispatcher; - ConcurrentJobsLimit = concurrentJobsLimit; - MaxConcurrentJobs = maxConcurrentJobs; - AdditionalProperties = additionalProperties; - } - - /// Name of the integration runtime node. - public string NodeName { get; } - /// Machine name of the integration runtime node. - public string MachineName { get; } - /// URI for the host machine of the integration runtime. - public Uri HostServiceUri { get; } - /// Status of the integration runtime node. - public SelfHostedIntegrationRuntimeNodeStatus? Status { get; } - /// The integration runtime capabilities dictionary. - public IReadOnlyDictionary Capabilities { get; } - /// Status of the integration runtime node version. - public string VersionStatus { get; } - /// Version of the integration runtime node. - public string Version { get; } - /// The time at which the integration runtime node was registered in ISO8601 format. - public DateTimeOffset? RegisterOn { get; } - /// The most recent time at which the integration runtime was connected in ISO8601 format. - public DateTimeOffset? LastConnectOn { get; } - /// The time at which the integration runtime will expire in ISO8601 format. - public DateTimeOffset? ExpireOn { get; } - /// The time the node last started up. - public DateTimeOffset? LastStartOn { get; } - /// The integration runtime node last stop time. - public DateTimeOffset? LastStopOn { get; } - /// The result of the last integration runtime node update. - public IntegrationRuntimeUpdateResult? LastUpdateResult { get; } - /// The last time for the integration runtime node update start. - public DateTimeOffset? LastStartUpdateOn { get; } - /// The last time for the integration runtime node update end. - public DateTimeOffset? LastEndUpdateOn { get; } - /// Indicates whether this node is the active dispatcher for integration runtime requests. - public bool? IsActiveDispatcher { get; } - /// Maximum concurrent jobs on the integration runtime node. - public int? ConcurrentJobsLimit { get; } - /// The maximum concurrent jobs in this integration runtime. - public int? MaxConcurrentJobs { get; } - /// - /// Additional Properties - /// - /// To assign an object to the value of this property use . - /// - /// - /// To assign an already formated json string to this property use . - /// - /// - /// Examples: - /// - /// - /// BinaryData.FromObjectAsJson("foo") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromString("\"foo\"") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromObjectAsJson(new { key = "value" }) - /// Creates a payload of { "key": "value" }. - /// - /// - /// BinaryData.FromString("{\"key\": \"value\"}") - /// Creates a payload of { "key": "value" }. - /// - /// - /// - /// - public IReadOnlyDictionary> AdditionalProperties { get; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SelfHostedIntegrationRuntimeNodeStatus.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SelfHostedIntegrationRuntimeNodeStatus.cs deleted file mode 100644 index 996a52a3..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SelfHostedIntegrationRuntimeNodeStatus.cs +++ /dev/null @@ -1,62 +0,0 @@ -// - -#nullable disable - -using System.ComponentModel; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// Status of the integration runtime node. - public readonly partial struct SelfHostedIntegrationRuntimeNodeStatus : IEquatable - { - private readonly string _value; - - /// Initializes a new instance of . - /// is null. - public SelfHostedIntegrationRuntimeNodeStatus(string value) - { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } - - private const string NeedRegistrationValue = "NeedRegistration"; - private const string OnlineValue = "Online"; - private const string LimitedValue = "Limited"; - private const string OfflineValue = "Offline"; - private const string UpgradingValue = "Upgrading"; - private const string InitializingValue = "Initializing"; - private const string InitializeFailedValue = "InitializeFailed"; - - /// NeedRegistration. - public static SelfHostedIntegrationRuntimeNodeStatus NeedRegistration { get; } = new SelfHostedIntegrationRuntimeNodeStatus(NeedRegistrationValue); - /// Online. - public static SelfHostedIntegrationRuntimeNodeStatus Online { get; } = new SelfHostedIntegrationRuntimeNodeStatus(OnlineValue); - /// Limited. - public static SelfHostedIntegrationRuntimeNodeStatus Limited { get; } = new SelfHostedIntegrationRuntimeNodeStatus(LimitedValue); - /// Offline. - public static SelfHostedIntegrationRuntimeNodeStatus Offline { get; } = new SelfHostedIntegrationRuntimeNodeStatus(OfflineValue); - /// Upgrading. - public static SelfHostedIntegrationRuntimeNodeStatus Upgrading { get; } = new SelfHostedIntegrationRuntimeNodeStatus(UpgradingValue); - /// Initializing. - public static SelfHostedIntegrationRuntimeNodeStatus Initializing { get; } = new SelfHostedIntegrationRuntimeNodeStatus(InitializingValue); - /// InitializeFailed. - public static SelfHostedIntegrationRuntimeNodeStatus InitializeFailed { get; } = new SelfHostedIntegrationRuntimeNodeStatus(InitializeFailedValue); - /// Determines if two values are the same. - public static bool operator ==(SelfHostedIntegrationRuntimeNodeStatus left, SelfHostedIntegrationRuntimeNodeStatus right) => left.Equals(right); - /// Determines if two values are not the same. - public static bool operator !=(SelfHostedIntegrationRuntimeNodeStatus left, SelfHostedIntegrationRuntimeNodeStatus right) => !left.Equals(right); - /// Converts a string to a . - public static implicit operator SelfHostedIntegrationRuntimeNodeStatus(string value) => new SelfHostedIntegrationRuntimeNodeStatus(value); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override bool Equals(object obj) => obj is SelfHostedIntegrationRuntimeNodeStatus other && Equals(other); - /// - public bool Equals(SelfHostedIntegrationRuntimeNodeStatus other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override int GetHashCode() => _value?.GetHashCode() ?? 0; - /// - public override string ToString() => _value; - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SelfHostedIntegrationRuntimeStatus.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SelfHostedIntegrationRuntimeStatus.Serialization.cs deleted file mode 100644 index 204d56bd..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SelfHostedIntegrationRuntimeStatus.Serialization.cs +++ /dev/null @@ -1,234 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class SelfHostedIntegrationRuntimeStatus - { - internal static SelfHostedIntegrationRuntimeStatus DeserializeSelfHostedIntegrationRuntimeStatus(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - IntegrationRuntimeType type = default; - Optional dataFactoryName = default; - Optional state = default; - Optional createTime = default; - Optional taskQueueId = default; - Optional internalChannelEncryption = default; - Optional version = default; - Optional> nodes = default; - Optional scheduledUpdateDate = default; - Optional updateDelayOffset = default; - Optional localTimeZoneOffset = default; - Optional> capabilities = default; - Optional> serviceUrls = default; - Optional autoUpdate = default; - Optional versionStatus = default; - Optional> links = default; - Optional pushedVersion = default; - Optional latestVersion = default; - Optional autoUpdateEta = default; - IReadOnlyDictionary> additionalProperties = default; - Dictionary> additionalPropertiesDictionary = new Dictionary>(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("type"u8)) - { - type = new IntegrationRuntimeType(property.Value.GetString()); - continue; - } - if (property.NameEquals("dataFactoryName"u8)) - { - dataFactoryName = property.Value.GetString(); - continue; - } - if (property.NameEquals("state"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - state = new IntegrationRuntimeState(property.Value.GetString()); - continue; - } - if (property.NameEquals("typeProperties"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - foreach (var property0 in property.Value.EnumerateObject()) - { - if (property0.NameEquals("createTime"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - createTime = property0.Value.GetDateTimeOffset("O"); - continue; - } - if (property0.NameEquals("taskQueueId"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - taskQueueId = property0.Value.GetGuid(); - continue; - } - if (property0.NameEquals("internalChannelEncryption"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - internalChannelEncryption = new IntegrationRuntimeInternalChannelEncryptionMode(property0.Value.GetString()); - continue; - } - if (property0.NameEquals("version"u8)) - { - version = property0.Value.GetString(); - continue; - } - if (property0.NameEquals("nodes"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property0.Value.EnumerateArray()) - { - array.Add(SelfHostedIntegrationRuntimeNode.DeserializeSelfHostedIntegrationRuntimeNode(item)); - } - nodes = array; - continue; - } - if (property0.NameEquals("scheduledUpdateDate"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - scheduledUpdateDate = property0.Value.GetDateTimeOffset("O"); - continue; - } - if (property0.NameEquals("updateDelayOffset"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - updateDelayOffset = property0.Value.GetTimeSpan("P"); - continue; - } - if (property0.NameEquals("localTimeZoneOffset"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - localTimeZoneOffset = property0.Value.GetTimeSpan("P"); - continue; - } - if (property0.NameEquals("capabilities"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - Dictionary dictionary = new Dictionary(); - foreach (var property1 in property0.Value.EnumerateObject()) - { - dictionary.Add(property1.Name, property1.Value.GetString()); - } - capabilities = dictionary; - continue; - } - if (property0.NameEquals("serviceUrls"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property0.Value.EnumerateArray()) - { - if (item.ValueKind == JsonValueKind.Null) - { - array.Add(null); - } - else - { - array.Add(new Uri(item.GetString())); - } - } - serviceUrls = array; - continue; - } - if (property0.NameEquals("autoUpdate"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - autoUpdate = new IntegrationRuntimeAutoUpdateState(property0.Value.GetString()); - continue; - } - if (property0.NameEquals("versionStatus"u8)) - { - versionStatus = property0.Value.GetString(); - continue; - } - if (property0.NameEquals("links"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property0.Value.EnumerateArray()) - { - array.Add(LinkedIntegrationRuntime.DeserializeLinkedIntegrationRuntime(item)); - } - links = array; - continue; - } - if (property0.NameEquals("pushedVersion"u8)) - { - pushedVersion = property0.Value.GetString(); - continue; - } - if (property0.NameEquals("latestVersion"u8)) - { - latestVersion = property0.Value.GetString(); - continue; - } - if (property0.NameEquals("autoUpdateETA"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - autoUpdateEta = property0.Value.GetDateTimeOffset("O"); - continue; - } - } - continue; - } - additionalPropertiesDictionary.Add(property.Name, JsonSerializer.Deserialize>(property.Value.GetRawText())); - } - additionalProperties = additionalPropertiesDictionary; - return new SelfHostedIntegrationRuntimeStatus(type, dataFactoryName.Value, Optional.ToNullable(state), additionalProperties, Optional.ToNullable(createTime), Optional.ToNullable(taskQueueId), Optional.ToNullable(internalChannelEncryption), version.Value, Optional.ToList(nodes), Optional.ToNullable(scheduledUpdateDate), Optional.ToNullable(updateDelayOffset), Optional.ToNullable(localTimeZoneOffset), Optional.ToDictionary(capabilities), Optional.ToList(serviceUrls), Optional.ToNullable(autoUpdate), versionStatus.Value, Optional.ToList(links), pushedVersion.Value, latestVersion.Value, Optional.ToNullable(autoUpdateEta)); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SelfHostedIntegrationRuntimeStatus.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SelfHostedIntegrationRuntimeStatus.cs deleted file mode 100644 index c0a6151e..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SelfHostedIntegrationRuntimeStatus.cs +++ /dev/null @@ -1,98 +0,0 @@ -// - -#nullable disable - -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// Self-hosted integration runtime status. - public partial class SelfHostedIntegrationRuntimeStatus : IntegrationRuntimeStatus - { - /// Initializes a new instance of SelfHostedIntegrationRuntimeStatus. - internal SelfHostedIntegrationRuntimeStatus() - { - Nodes = new ChangeTrackingList(); - Capabilities = new ChangeTrackingDictionary(); - ServiceUris = new ChangeTrackingList(); - Links = new ChangeTrackingList(); - RuntimeType = IntegrationRuntimeType.SelfHosted; - } - - /// Initializes a new instance of SelfHostedIntegrationRuntimeStatus. - /// Type of integration runtime. - /// The data factory name which the integration runtime belong to. - /// The state of integration runtime. - /// Additional Properties. - /// The time at which the integration runtime was created, in ISO8601 format. - /// The task queue id of the integration runtime. - /// It is used to set the encryption mode for node-node communication channel (when more than 2 self-hosted integration runtime nodes exist). - /// Version of the integration runtime. - /// The list of nodes for this integration runtime. - /// The date at which the integration runtime will be scheduled to update, in ISO8601 format. - /// The time in the date scheduled by service to update the integration runtime, e.g., PT03H is 3 hours. - /// The local time zone offset in hours. - /// Object with additional information about integration runtime capabilities. - /// The URLs for the services used in integration runtime backend service. - /// Whether Self-hosted integration runtime auto update has been turned on. - /// Status of the integration runtime version. - /// The list of linked integration runtimes that are created to share with this integration runtime. - /// The version that the integration runtime is going to update to. - /// The latest version on download center. - /// The estimated time when the self-hosted integration runtime will be updated. - internal SelfHostedIntegrationRuntimeStatus(IntegrationRuntimeType runtimeType, string dataFactoryName, IntegrationRuntimeState? state, IReadOnlyDictionary> additionalProperties, DateTimeOffset? createdOn, Guid? taskQueueId, IntegrationRuntimeInternalChannelEncryptionMode? internalChannelEncryption, string version, IReadOnlyList nodes, DateTimeOffset? scheduledUpdateOn, TimeSpan? updateDelayOffset, TimeSpan? localTimeZoneOffset, IReadOnlyDictionary capabilities, IReadOnlyList serviceUris, IntegrationRuntimeAutoUpdateState? autoUpdate, string versionStatus, IReadOnlyList links, string pushedVersion, string latestVersion, DateTimeOffset? autoUpdateEta) : base(runtimeType, dataFactoryName, state, additionalProperties) - { - CreatedOn = createdOn; - TaskQueueId = taskQueueId; - InternalChannelEncryption = internalChannelEncryption; - Version = version; - Nodes = nodes; - ScheduledUpdateOn = scheduledUpdateOn; - UpdateDelayOffset = updateDelayOffset; - LocalTimeZoneOffset = localTimeZoneOffset; - Capabilities = capabilities; - ServiceUris = serviceUris; - AutoUpdate = autoUpdate; - VersionStatus = versionStatus; - Links = links; - PushedVersion = pushedVersion; - LatestVersion = latestVersion; - AutoUpdateEta = autoUpdateEta; - RuntimeType = runtimeType; - } - - /// The time at which the integration runtime was created, in ISO8601 format. - public DateTimeOffset? CreatedOn { get; } - /// The task queue id of the integration runtime. - public Guid? TaskQueueId { get; } - /// It is used to set the encryption mode for node-node communication channel (when more than 2 self-hosted integration runtime nodes exist). - public IntegrationRuntimeInternalChannelEncryptionMode? InternalChannelEncryption { get; } - /// Version of the integration runtime. - public string Version { get; } - /// The list of nodes for this integration runtime. - public IReadOnlyList Nodes { get; } - /// The date at which the integration runtime will be scheduled to update, in ISO8601 format. - public DateTimeOffset? ScheduledUpdateOn { get; } - /// The time in the date scheduled by service to update the integration runtime, e.g., PT03H is 3 hours. - public TimeSpan? UpdateDelayOffset { get; } - /// The local time zone offset in hours. - public TimeSpan? LocalTimeZoneOffset { get; } - /// Object with additional information about integration runtime capabilities. - public IReadOnlyDictionary Capabilities { get; } - /// The URLs for the services used in integration runtime backend service. - public IReadOnlyList ServiceUris { get; } - /// Whether Self-hosted integration runtime auto update has been turned on. - public IntegrationRuntimeAutoUpdateState? AutoUpdate { get; } - /// Status of the integration runtime version. - public string VersionStatus { get; } - /// The list of linked integration runtimes that are created to share with this integration runtime. - public IReadOnlyList Links { get; } - /// The version that the integration runtime is going to update to. - public string PushedVersion { get; } - /// The latest version on download center. - public string LatestVersion { get; } - /// The estimated time when the self-hosted integration runtime will be updated. - public DateTimeOffset? AutoUpdateEta { get; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/ServiceNowAuthenticationType.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/ServiceNowAuthenticationType.cs deleted file mode 100644 index 164629de..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/ServiceNowAuthenticationType.cs +++ /dev/null @@ -1,47 +0,0 @@ -// - -#nullable disable - -using System.ComponentModel; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// The authentication type to use. - public readonly partial struct ServiceNowAuthenticationType : IEquatable - { - private readonly string _value; - - /// Initializes a new instance of . - /// is null. - public ServiceNowAuthenticationType(string value) - { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } - - private const string BasicValue = "Basic"; - private const string OAuth2Value = "OAuth2"; - - /// Basic. - public static ServiceNowAuthenticationType Basic { get; } = new ServiceNowAuthenticationType(BasicValue); - /// OAuth2. - public static ServiceNowAuthenticationType OAuth2 { get; } = new ServiceNowAuthenticationType(OAuth2Value); - /// Determines if two values are the same. - public static bool operator ==(ServiceNowAuthenticationType left, ServiceNowAuthenticationType right) => left.Equals(right); - /// Determines if two values are not the same. - public static bool operator !=(ServiceNowAuthenticationType left, ServiceNowAuthenticationType right) => !left.Equals(right); - /// Converts a string to a . - public static implicit operator ServiceNowAuthenticationType(string value) => new ServiceNowAuthenticationType(value); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override bool Equals(object obj) => obj is ServiceNowAuthenticationType other && Equals(other); - /// - public bool Equals(ServiceNowAuthenticationType other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override int GetHashCode() => _value?.GetHashCode() ?? 0; - /// - public override string ToString() => _value; - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/ServiceNowLinkedService.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/ServiceNowLinkedService.Serialization.cs deleted file mode 100644 index 96413c8d..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/ServiceNowLinkedService.Serialization.cs +++ /dev/null @@ -1,296 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class ServiceNowLinkedService : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - writer.WritePropertyName("type"u8); - writer.WriteStringValue(LinkedServiceType); - if (Optional.IsDefined(ConnectVia)) - { - writer.WritePropertyName("connectVia"u8); - writer.WriteObjectValue(ConnectVia); - } - if (Optional.IsDefined(Description)) - { - writer.WritePropertyName("description"u8); - writer.WriteStringValue(Description); - } - if (Optional.IsCollectionDefined(Parameters)) - { - writer.WritePropertyName("parameters"u8); - writer.WriteStartObject(); - foreach (var item in Parameters) - { - writer.WritePropertyName(item.Key); - writer.WriteObjectValue(item.Value); - } - writer.WriteEndObject(); - } - if (Optional.IsCollectionDefined(Annotations)) - { - writer.WritePropertyName("annotations"u8); - writer.WriteStartArray(); - foreach (var item in Annotations) - { - if (item == null) - { - writer.WriteNullValue(); - continue; - } -#if NET6_0_OR_GREATER - writer.WriteRawValue(item); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.ToString()).RootElement); -#endif - } - writer.WriteEndArray(); - } - writer.WritePropertyName("typeProperties"u8); - writer.WriteStartObject(); - writer.WritePropertyName("endpoint"u8); -#if NET6_0_OR_GREATER - writer.WriteRawValue(Endpoint); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(Endpoint.ToString()).RootElement); -#endif - writer.WritePropertyName("authenticationType"u8); - writer.WriteStringValue(AuthenticationType.ToString()); - if (Optional.IsDefined(Username)) - { - writer.WritePropertyName("username"u8); - JsonSerializer.Serialize(writer, Username); - } - if (Optional.IsDefined(Password)) - { - writer.WritePropertyName("password"u8); - JsonSerializer.Serialize(writer, Password); - } - if (Optional.IsDefined(ClientId)) - { - writer.WritePropertyName("clientId"u8); - JsonSerializer.Serialize(writer, ClientId); - } - if (Optional.IsDefined(ClientSecret)) - { - writer.WritePropertyName("clientSecret"u8); - JsonSerializer.Serialize(writer, ClientSecret); - } - if (Optional.IsDefined(UseEncryptedEndpoints)) - { - writer.WritePropertyName("useEncryptedEndpoints"u8); - JsonSerializer.Serialize(writer, UseEncryptedEndpoints); - } - if (Optional.IsDefined(UseHostVerification)) - { - writer.WritePropertyName("useHostVerification"u8); - JsonSerializer.Serialize(writer, UseHostVerification); - } - if (Optional.IsDefined(UsePeerVerification)) - { - writer.WritePropertyName("usePeerVerification"u8); - JsonSerializer.Serialize(writer, UsePeerVerification); - } - if (Optional.IsDefined(EncryptedCredential)) - { - writer.WritePropertyName("encryptedCredential"u8); - writer.WriteStringValue(EncryptedCredential); - } - writer.WriteEndObject(); - foreach (var item in AdditionalProperties) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.Value.ToString()).RootElement); -#endif - } - writer.WriteEndObject(); - } - - internal static ServiceNowLinkedService DeserializeServiceNowLinkedService(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - string type = default; - Optional connectVia = default; - Optional description = default; - Optional> parameters = default; - Optional> annotations = default; - BinaryData endpoint = default; - ServiceNowAuthenticationType authenticationType = default; - Optional> username = default; - Optional password = default; - Optional> clientId = default; - Optional clientSecret = default; - Optional> useEncryptedEndpoints = default; - Optional> useHostVerification = default; - Optional> usePeerVerification = default; - Optional encryptedCredential = default; - IDictionary> additionalProperties = default; - Dictionary> additionalPropertiesDictionary = new Dictionary>(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("type"u8)) - { - type = property.Value.GetString(); - continue; - } - if (property.NameEquals("connectVia"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - connectVia = IntegrationRuntimeReference.DeserializeIntegrationRuntimeReference(property.Value); - continue; - } - if (property.NameEquals("description"u8)) - { - description = property.Value.GetString(); - continue; - } - if (property.NameEquals("parameters"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - Dictionary dictionary = new Dictionary(); - foreach (var property0 in property.Value.EnumerateObject()) - { - dictionary.Add(property0.Name, EntityParameterSpecification.DeserializeEntityParameterSpecification(property0.Value)); - } - parameters = dictionary; - continue; - } - if (property.NameEquals("annotations"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - if (item.ValueKind == JsonValueKind.Null) - { - array.Add(null); - } - else - { - array.Add(BinaryData.FromString(item.GetRawText())); - } - } - annotations = array; - continue; - } - if (property.NameEquals("typeProperties"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - foreach (var property0 in property.Value.EnumerateObject()) - { - if (property0.NameEquals("endpoint"u8)) - { - endpoint = BinaryData.FromString(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("authenticationType"u8)) - { - authenticationType = new ServiceNowAuthenticationType(property0.Value.GetString()); - continue; - } - if (property0.NameEquals("username"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - username = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("password"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - password = JsonSerializer.Deserialize(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("clientId"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - clientId = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("clientSecret"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - clientSecret = JsonSerializer.Deserialize(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("useEncryptedEndpoints"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - useEncryptedEndpoints = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("useHostVerification"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - useHostVerification = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("usePeerVerification"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - usePeerVerification = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("encryptedCredential"u8)) - { - encryptedCredential = property0.Value.GetString(); - continue; - } - } - continue; - } - additionalPropertiesDictionary.Add(property.Name, JsonSerializer.Deserialize>(property.Value.GetRawText())); - } - additionalProperties = additionalPropertiesDictionary; - return new ServiceNowLinkedService(type, connectVia.Value, description.Value, Optional.ToDictionary(parameters), Optional.ToList(annotations), additionalProperties, endpoint, authenticationType, username.Value, password, clientId.Value, clientSecret, useEncryptedEndpoints.Value, useHostVerification.Value, usePeerVerification.Value, encryptedCredential.Value); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/ServiceNowLinkedService.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/ServiceNowLinkedService.cs deleted file mode 100644 index 30a95829..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/ServiceNowLinkedService.cs +++ /dev/null @@ -1,108 +0,0 @@ -// - -#nullable disable - -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// ServiceNow server linked service. - public partial class ServiceNowLinkedService : DataFactoryLinkedServiceProperties - { - /// Initializes a new instance of ServiceNowLinkedService. - /// The endpoint of the ServiceNow server. (i.e. <instance>.service-now.com). - /// The authentication type to use. - /// is null. - public ServiceNowLinkedService(BinaryData endpoint, ServiceNowAuthenticationType authenticationType) - { - Argument.AssertNotNull(endpoint, nameof(endpoint)); - - Endpoint = endpoint; - AuthenticationType = authenticationType; - LinkedServiceType = "ServiceNow"; - } - - /// Initializes a new instance of ServiceNowLinkedService. - /// Type of linked service. - /// The integration runtime reference. - /// Linked service description. - /// Parameters for linked service. - /// List of tags that can be used for describing the linked service. - /// Additional Properties. - /// The endpoint of the ServiceNow server. (i.e. <instance>.service-now.com). - /// The authentication type to use. - /// The user name used to connect to the ServiceNow server for Basic and OAuth2 authentication. - /// The password corresponding to the user name for Basic and OAuth2 authentication. - /// The client id for OAuth2 authentication. - /// The client secret for OAuth2 authentication. - /// Specifies whether the data source endpoints are encrypted using HTTPS. The default value is true. - /// 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. - /// Specifies whether to verify the identity of the server when connecting over SSL. The default value is true. - /// The encrypted credential used for authentication. Credentials are encrypted using the integration runtime credential manager. Type: string. - internal ServiceNowLinkedService(string linkedServiceType, IntegrationRuntimeReference connectVia, string description, IDictionary parameters, IList annotations, IDictionary> additionalProperties, BinaryData endpoint, ServiceNowAuthenticationType authenticationType, DataFactoryElement username, DataFactorySecretBaseDefinition password, DataFactoryElement clientId, DataFactorySecretBaseDefinition clientSecret, DataFactoryElement useEncryptedEndpoints, DataFactoryElement useHostVerification, DataFactoryElement usePeerVerification, string encryptedCredential) : base(linkedServiceType, connectVia, description, parameters, annotations, additionalProperties) - { - Endpoint = endpoint; - AuthenticationType = authenticationType; - Username = username; - Password = password; - ClientId = clientId; - ClientSecret = clientSecret; - UseEncryptedEndpoints = useEncryptedEndpoints; - UseHostVerification = useHostVerification; - UsePeerVerification = usePeerVerification; - EncryptedCredential = encryptedCredential; - LinkedServiceType = linkedServiceType ?? "ServiceNow"; - } - - /// - /// The endpoint of the ServiceNow server. (i.e. <instance>.service-now.com) - /// - /// To assign an object to this property use . - /// - /// - /// To assign an already formated json string to this property use . - /// - /// - /// Examples: - /// - /// - /// BinaryData.FromObjectAsJson("foo") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromString("\"foo\"") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromObjectAsJson(new { key = "value" }) - /// Creates a payload of { "key": "value" }. - /// - /// - /// BinaryData.FromString("{\"key\": \"value\"}") - /// Creates a payload of { "key": "value" }. - /// - /// - /// - /// - public BinaryData Endpoint { get; set; } - /// The authentication type to use. - public ServiceNowAuthenticationType AuthenticationType { get; set; } - /// The user name used to connect to the ServiceNow server for Basic and OAuth2 authentication. - public DataFactoryElement Username { get; set; } - /// The password corresponding to the user name for Basic and OAuth2 authentication. - public DataFactorySecretBaseDefinition Password { get; set; } - /// The client id for OAuth2 authentication. - public DataFactoryElement ClientId { get; set; } - /// The client secret for OAuth2 authentication. - public DataFactorySecretBaseDefinition ClientSecret { get; set; } - /// Specifies whether the data source endpoints are encrypted using HTTPS. The default value is true. - public DataFactoryElement UseEncryptedEndpoints { get; set; } - /// 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. - public DataFactoryElement UseHostVerification { get; set; } - /// Specifies whether to verify the identity of the server when connecting over SSL. The default value is true. - public DataFactoryElement UsePeerVerification { get; set; } - /// The encrypted credential used for authentication. Credentials are encrypted using the integration runtime credential manager. Type: string. - public string EncryptedCredential { get; set; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/ServiceNowObjectDataset.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/ServiceNowObjectDataset.Serialization.cs deleted file mode 100644 index b66ce7f4..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/ServiceNowObjectDataset.Serialization.cs +++ /dev/null @@ -1,212 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class ServiceNowObjectDataset : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - writer.WritePropertyName("type"u8); - writer.WriteStringValue(DatasetType); - if (Optional.IsDefined(Description)) - { - writer.WritePropertyName("description"u8); - writer.WriteStringValue(Description); - } - if (Optional.IsDefined(Structure)) - { - writer.WritePropertyName("structure"u8); - JsonSerializer.Serialize(writer, Structure); - } - if (Optional.IsDefined(Schema)) - { - writer.WritePropertyName("schema"u8); - JsonSerializer.Serialize(writer, Schema); - } - writer.WritePropertyName("linkedServiceName"u8); - JsonSerializer.Serialize(writer, LinkedServiceName); if (Optional.IsCollectionDefined(Parameters)) - { - writer.WritePropertyName("parameters"u8); - writer.WriteStartObject(); - foreach (var item in Parameters) - { - writer.WritePropertyName(item.Key); - writer.WriteObjectValue(item.Value); - } - writer.WriteEndObject(); - } - if (Optional.IsCollectionDefined(Annotations)) - { - writer.WritePropertyName("annotations"u8); - writer.WriteStartArray(); - foreach (var item in Annotations) - { - if (item == null) - { - writer.WriteNullValue(); - continue; - } -#if NET6_0_OR_GREATER - writer.WriteRawValue(item); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.ToString()).RootElement); -#endif - } - writer.WriteEndArray(); - } - if (Optional.IsDefined(Folder)) - { - writer.WritePropertyName("folder"u8); - writer.WriteObjectValue(Folder); - } - writer.WritePropertyName("typeProperties"u8); - writer.WriteStartObject(); - if (Optional.IsDefined(TableName)) - { - writer.WritePropertyName("tableName"u8); - JsonSerializer.Serialize(writer, TableName); - } - writer.WriteEndObject(); - foreach (var item in AdditionalProperties) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.Value.ToString()).RootElement); -#endif - } - writer.WriteEndObject(); - } - - internal static ServiceNowObjectDataset DeserializeServiceNowObjectDataset(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - string type = default; - Optional description = default; - Optional>> structure = default; - Optional>> schema = default; - DataFactoryLinkedServiceReference linkedServiceName = default; - Optional> parameters = default; - Optional> annotations = default; - Optional folder = default; - Optional> tableName = default; - IDictionary> additionalProperties = default; - Dictionary> additionalPropertiesDictionary = new Dictionary>(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("type"u8)) - { - type = property.Value.GetString(); - continue; - } - if (property.NameEquals("description"u8)) - { - description = property.Value.GetString(); - continue; - } - if (property.NameEquals("structure"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - structure = JsonSerializer.Deserialize>>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("schema"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - schema = JsonSerializer.Deserialize>>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("linkedServiceName"u8)) - { - linkedServiceName = JsonSerializer.Deserialize(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("parameters"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - Dictionary dictionary = new Dictionary(); - foreach (var property0 in property.Value.EnumerateObject()) - { - dictionary.Add(property0.Name, EntityParameterSpecification.DeserializeEntityParameterSpecification(property0.Value)); - } - parameters = dictionary; - continue; - } - if (property.NameEquals("annotations"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - if (item.ValueKind == JsonValueKind.Null) - { - array.Add(null); - } - else - { - array.Add(BinaryData.FromString(item.GetRawText())); - } - } - annotations = array; - continue; - } - if (property.NameEquals("folder"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - folder = DatasetFolder.DeserializeDatasetFolder(property.Value); - continue; - } - if (property.NameEquals("typeProperties"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - foreach (var property0 in property.Value.EnumerateObject()) - { - if (property0.NameEquals("tableName"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - tableName = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - } - continue; - } - additionalPropertiesDictionary.Add(property.Name, JsonSerializer.Deserialize>(property.Value.GetRawText())); - } - additionalProperties = additionalPropertiesDictionary; - return new ServiceNowObjectDataset(type, description.Value, structure.Value, schema.Value, linkedServiceName, Optional.ToDictionary(parameters), Optional.ToList(annotations), folder.Value, additionalProperties, tableName.Value); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/ServiceNowObjectDataset.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/ServiceNowObjectDataset.cs deleted file mode 100644 index 28809c89..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/ServiceNowObjectDataset.cs +++ /dev/null @@ -1,43 +0,0 @@ -// - -#nullable disable - -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// ServiceNow server dataset. - public partial class ServiceNowObjectDataset : DataFactoryDatasetProperties - { - /// Initializes a new instance of ServiceNowObjectDataset. - /// Linked service reference. - /// is null. - public ServiceNowObjectDataset(DataFactoryLinkedServiceReference linkedServiceName) : base(linkedServiceName) - { - Argument.AssertNotNull(linkedServiceName, nameof(linkedServiceName)); - - DatasetType = "ServiceNowObject"; - } - - /// Initializes a new instance of ServiceNowObjectDataset. - /// Type of dataset. - /// Dataset description. - /// Columns that define the structure of the dataset. Type: array (or Expression with resultType array), itemType: DatasetDataElement. - /// Columns that define the physical type schema of the dataset. Type: array (or Expression with resultType array), itemType: DatasetSchemaDataElement. - /// Linked service reference. - /// Parameters for dataset. - /// List of tags that can be used for describing the Dataset. - /// The folder that this Dataset is in. If not specified, Dataset will appear at the root level. - /// Additional Properties. - /// The table name. Type: string (or Expression with resultType string). - internal ServiceNowObjectDataset(string datasetType, string description, DataFactoryElement> structure, DataFactoryElement> schema, DataFactoryLinkedServiceReference linkedServiceName, IDictionary parameters, IList annotations, DatasetFolder folder, IDictionary> additionalProperties, DataFactoryElement tableName) : base(datasetType, description, structure, schema, linkedServiceName, parameters, annotations, folder, additionalProperties) - { - TableName = tableName; - DatasetType = datasetType ?? "ServiceNowObject"; - } - - /// The table name. Type: string (or Expression with resultType string). - public DataFactoryElement TableName { get; set; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/ServiceNowSource.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/ServiceNowSource.Serialization.cs deleted file mode 100644 index 45cb4fda..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/ServiceNowSource.Serialization.cs +++ /dev/null @@ -1,161 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class ServiceNowSource : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - if (Optional.IsDefined(Query)) - { - writer.WritePropertyName("query"u8); - JsonSerializer.Serialize(writer, Query); - } - if (Optional.IsDefined(QueryTimeout)) - { - writer.WritePropertyName("queryTimeout"u8); - JsonSerializer.Serialize(writer, QueryTimeout); - } - if (Optional.IsDefined(AdditionalColumns)) - { - writer.WritePropertyName("additionalColumns"u8); -#if NET6_0_OR_GREATER - writer.WriteRawValue(AdditionalColumns); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(AdditionalColumns.ToString()).RootElement); -#endif - } - writer.WritePropertyName("type"u8); - writer.WriteStringValue(CopySourceType); - if (Optional.IsDefined(SourceRetryCount)) - { - writer.WritePropertyName("sourceRetryCount"u8); - JsonSerializer.Serialize(writer, SourceRetryCount); - } - if (Optional.IsDefined(SourceRetryWait)) - { - writer.WritePropertyName("sourceRetryWait"u8); - JsonSerializer.Serialize(writer, SourceRetryWait); - } - if (Optional.IsDefined(MaxConcurrentConnections)) - { - writer.WritePropertyName("maxConcurrentConnections"u8); - JsonSerializer.Serialize(writer, MaxConcurrentConnections); - } - if (Optional.IsDefined(DisableMetricsCollection)) - { - writer.WritePropertyName("disableMetricsCollection"u8); - JsonSerializer.Serialize(writer, DisableMetricsCollection); - } - foreach (var item in AdditionalProperties) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.Value.ToString()).RootElement); -#endif - } - writer.WriteEndObject(); - } - - internal static ServiceNowSource DeserializeServiceNowSource(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - Optional> query = default; - Optional> queryTimeout = default; - Optional additionalColumns = default; - string type = default; - Optional> sourceRetryCount = default; - Optional> sourceRetryWait = default; - Optional> maxConcurrentConnections = default; - Optional> disableMetricsCollection = default; - IDictionary> additionalProperties = default; - Dictionary> additionalPropertiesDictionary = new Dictionary>(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("query"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - query = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("queryTimeout"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - queryTimeout = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("additionalColumns"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - additionalColumns = BinaryData.FromString(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("type"u8)) - { - type = property.Value.GetString(); - continue; - } - if (property.NameEquals("sourceRetryCount"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - sourceRetryCount = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("sourceRetryWait"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - sourceRetryWait = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("maxConcurrentConnections"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - maxConcurrentConnections = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("disableMetricsCollection"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - disableMetricsCollection = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - additionalPropertiesDictionary.Add(property.Name, JsonSerializer.Deserialize>(property.Value.GetRawText())); - } - additionalProperties = additionalPropertiesDictionary; - return new ServiceNowSource(type, sourceRetryCount.Value, sourceRetryWait.Value, maxConcurrentConnections.Value, disableMetricsCollection.Value, additionalProperties, queryTimeout.Value, additionalColumns.Value, query.Value); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/ServiceNowSource.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/ServiceNowSource.cs deleted file mode 100644 index 4c8099be..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/ServiceNowSource.cs +++ /dev/null @@ -1,37 +0,0 @@ -// - -#nullable disable - -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// A copy activity ServiceNow server source. - public partial class ServiceNowSource : TabularSource - { - /// Initializes a new instance of ServiceNowSource. - public ServiceNowSource() - { - CopySourceType = "ServiceNowSource"; - } - - /// Initializes a new instance of ServiceNowSource. - /// Copy source type. - /// Source retry count. Type: integer (or Expression with resultType integer). - /// Source retry wait. Type: string (or Expression with resultType string), pattern: ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). - /// The maximum concurrent connection count for the source data store. Type: integer (or Expression with resultType integer). - /// If true, disable data store metrics collection. Default is false. Type: boolean (or Expression with resultType boolean). - /// Additional Properties. - /// 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). - /// A query to retrieve data from source. Type: string (or Expression with resultType string). - internal ServiceNowSource(string copySourceType, DataFactoryElement sourceRetryCount, DataFactoryElement sourceRetryWait, DataFactoryElement maxConcurrentConnections, DataFactoryElement disableMetricsCollection, IDictionary> additionalProperties, DataFactoryElement queryTimeout, BinaryData additionalColumns, DataFactoryElement query) : base(copySourceType, sourceRetryCount, sourceRetryWait, maxConcurrentConnections, disableMetricsCollection, additionalProperties, queryTimeout, additionalColumns) - { - Query = query; - CopySourceType = copySourceType ?? "ServiceNowSource"; - } - - /// A query to retrieve data from source. Type: string (or Expression with resultType string). - public DataFactoryElement Query { get; set; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/ServicePrincipalCredential.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/ServicePrincipalCredential.Serialization.cs deleted file mode 100644 index d4478cc1..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/ServicePrincipalCredential.Serialization.cs +++ /dev/null @@ -1,172 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class ServicePrincipalCredential : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - writer.WritePropertyName("type"u8); - writer.WriteStringValue(CredentialType); - if (Optional.IsDefined(Description)) - { - writer.WritePropertyName("description"u8); - writer.WriteStringValue(Description); - } - if (Optional.IsCollectionDefined(Annotations)) - { - writer.WritePropertyName("annotations"u8); - writer.WriteStartArray(); - foreach (var item in Annotations) - { - if (item == null) - { - writer.WriteNullValue(); - continue; - } -#if NET6_0_OR_GREATER - writer.WriteRawValue(item); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.ToString()).RootElement); -#endif - } - writer.WriteEndArray(); - } - writer.WritePropertyName("typeProperties"u8); - writer.WriteStartObject(); - if (Optional.IsDefined(ServicePrincipalId)) - { - writer.WritePropertyName("servicePrincipalId"u8); -#if NET6_0_OR_GREATER - writer.WriteRawValue(ServicePrincipalId); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(ServicePrincipalId.ToString()).RootElement); -#endif - } - if (Optional.IsDefined(ServicePrincipalKey)) - { - writer.WritePropertyName("servicePrincipalKey"u8); - JsonSerializer.Serialize(writer, ServicePrincipalKey); - } - if (Optional.IsDefined(Tenant)) - { - writer.WritePropertyName("tenant"u8); -#if NET6_0_OR_GREATER - writer.WriteRawValue(Tenant); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(Tenant.ToString()).RootElement); -#endif - } - writer.WriteEndObject(); - foreach (var item in AdditionalProperties) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.Value.ToString()).RootElement); -#endif - } - writer.WriteEndObject(); - } - - internal static ServicePrincipalCredential DeserializeServicePrincipalCredential(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - string type = default; - Optional description = default; - Optional> annotations = default; - Optional servicePrincipalId = default; - Optional servicePrincipalKey = default; - Optional tenant = default; - IDictionary> additionalProperties = default; - Dictionary> additionalPropertiesDictionary = new Dictionary>(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("type"u8)) - { - type = property.Value.GetString(); - continue; - } - if (property.NameEquals("description"u8)) - { - description = property.Value.GetString(); - continue; - } - if (property.NameEquals("annotations"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - if (item.ValueKind == JsonValueKind.Null) - { - array.Add(null); - } - else - { - array.Add(BinaryData.FromString(item.GetRawText())); - } - } - annotations = array; - continue; - } - if (property.NameEquals("typeProperties"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - foreach (var property0 in property.Value.EnumerateObject()) - { - if (property0.NameEquals("servicePrincipalId"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - servicePrincipalId = BinaryData.FromString(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("servicePrincipalKey"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - servicePrincipalKey = JsonSerializer.Deserialize(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("tenant"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - tenant = BinaryData.FromString(property0.Value.GetRawText()); - continue; - } - } - continue; - } - additionalPropertiesDictionary.Add(property.Name, JsonSerializer.Deserialize>(property.Value.GetRawText())); - } - additionalProperties = additionalPropertiesDictionary; - return new ServicePrincipalCredential(type, description.Value, Optional.ToList(annotations), additionalProperties, servicePrincipalId.Value, servicePrincipalKey, tenant.Value); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/ServicePrincipalCredential.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/ServicePrincipalCredential.cs deleted file mode 100644 index 5b3e11f7..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/ServicePrincipalCredential.cs +++ /dev/null @@ -1,99 +0,0 @@ -// - -#nullable disable - -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// Service principal credential. - public partial class ServicePrincipalCredential : DataFactoryCredential - { - /// Initializes a new instance of ServicePrincipalCredential. - public ServicePrincipalCredential() - { - CredentialType = "ServicePrincipal"; - } - - /// Initializes a new instance of ServicePrincipalCredential. - /// Type of credential. - /// Credential description. - /// List of tags that can be used for describing the Credential. - /// Additional Properties. - /// The app ID of the service principal used to authenticate. - /// The key of the service principal used to authenticate. - /// The ID of the tenant to which the service principal belongs. - internal ServicePrincipalCredential(string credentialType, string description, IList annotations, IDictionary> additionalProperties, BinaryData servicePrincipalId, DataFactoryKeyVaultSecretReference servicePrincipalKey, BinaryData tenant) : base(credentialType, description, annotations, additionalProperties) - { - ServicePrincipalId = servicePrincipalId; - ServicePrincipalKey = servicePrincipalKey; - Tenant = tenant; - CredentialType = credentialType ?? "ServicePrincipal"; - } - - /// - /// The app ID of the service principal used to authenticate - /// - /// To assign an object to this property use . - /// - /// - /// To assign an already formated json string to this property use . - /// - /// - /// Examples: - /// - /// - /// BinaryData.FromObjectAsJson("foo") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromString("\"foo\"") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromObjectAsJson(new { key = "value" }) - /// Creates a payload of { "key": "value" }. - /// - /// - /// BinaryData.FromString("{\"key\": \"value\"}") - /// Creates a payload of { "key": "value" }. - /// - /// - /// - /// - public BinaryData ServicePrincipalId { get; set; } - /// The key of the service principal used to authenticate. - public DataFactoryKeyVaultSecretReference ServicePrincipalKey { get; set; } - /// - /// The ID of the tenant to which the service principal belongs - /// - /// To assign an object to this property use . - /// - /// - /// To assign an already formated json string to this property use . - /// - /// - /// Examples: - /// - /// - /// BinaryData.FromObjectAsJson("foo") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromString("\"foo\"") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromObjectAsJson(new { key = "value" }) - /// Creates a payload of { "key": "value" }. - /// - /// - /// BinaryData.FromString("{\"key\": \"value\"}") - /// Creates a payload of { "key": "value" }. - /// - /// - /// - /// - public BinaryData Tenant { get; set; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SetVariableActivity.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SetVariableActivity.Serialization.cs deleted file mode 100644 index 3be70b5b..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SetVariableActivity.Serialization.cs +++ /dev/null @@ -1,233 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class SetVariableActivity : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - if (Optional.IsDefined(Policy)) - { - writer.WritePropertyName("policy"u8); - writer.WriteObjectValue(Policy); - } - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ActivityType); - if (Optional.IsDefined(Description)) - { - writer.WritePropertyName("description"u8); - writer.WriteStringValue(Description); - } - if (Optional.IsDefined(State)) - { - writer.WritePropertyName("state"u8); - writer.WriteStringValue(State.Value.ToString()); - } - if (Optional.IsDefined(OnInactiveMarkAs)) - { - writer.WritePropertyName("onInactiveMarkAs"u8); - writer.WriteStringValue(OnInactiveMarkAs.Value.ToString()); - } - if (Optional.IsCollectionDefined(DependsOn)) - { - writer.WritePropertyName("dependsOn"u8); - writer.WriteStartArray(); - foreach (var item in DependsOn) - { - writer.WriteObjectValue(item); - } - writer.WriteEndArray(); - } - if (Optional.IsCollectionDefined(UserProperties)) - { - writer.WritePropertyName("userProperties"u8); - writer.WriteStartArray(); - foreach (var item in UserProperties) - { - writer.WriteObjectValue(item); - } - writer.WriteEndArray(); - } - writer.WritePropertyName("typeProperties"u8); - writer.WriteStartObject(); - if (Optional.IsDefined(VariableName)) - { - writer.WritePropertyName("variableName"u8); - writer.WriteStringValue(VariableName); - } - if (Optional.IsDefined(Value)) - { - writer.WritePropertyName("value"u8); - JsonSerializer.Serialize(writer, Value); - } - if (Optional.IsDefined(SetSystemVariable)) - { - writer.WritePropertyName("setSystemVariable"u8); - writer.WriteBooleanValue(SetSystemVariable.Value); - } - writer.WriteEndObject(); - foreach (var item in AdditionalProperties) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.Value.ToString()).RootElement); -#endif - } - writer.WriteEndObject(); - } - - internal static SetVariableActivity DeserializeSetVariableActivity(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - Optional policy = default; - string name = default; - string type = default; - Optional description = default; - Optional state = default; - Optional onInactiveMarkAs = default; - Optional> dependsOn = default; - Optional> userProperties = default; - Optional variableName = default; - Optional> value = default; - Optional>> pipelineReturnValues = default; - Optional setSystemVariable = default; - IDictionary> additionalProperties = default; - Dictionary> additionalPropertiesDictionary = new Dictionary>(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("policy"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - policy = SecureInputOutputPolicy.DeserializeSecureInputOutputPolicy(property.Value); - continue; - } - if (property.NameEquals("name"u8)) - { - name = property.Value.GetString(); - continue; - } - if (property.NameEquals("type"u8)) - { - type = property.Value.GetString(); - continue; - } - if (property.NameEquals("description"u8)) - { - description = property.Value.GetString(); - continue; - } - if (property.NameEquals("state"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - state = new PipelineActivityState(property.Value.GetString()); - continue; - } - if (property.NameEquals("onInactiveMarkAs"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - onInactiveMarkAs = new ActivityOnInactiveMarkAs(property.Value.GetString()); - continue; - } - if (property.NameEquals("dependsOn"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - array.Add(PipelineActivityDependency.DeserializePipelineActivityDependency(item)); - } - dependsOn = array; - continue; - } - if (property.NameEquals("userProperties"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - array.Add(PipelineActivityUserProperty.DeserializePipelineActivityUserProperty(item)); - } - userProperties = array; - continue; - } - if (property.NameEquals("typeProperties"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - foreach (var property0 in property.Value.EnumerateObject()) - { - if (property0.NameEquals("variableName"u8)) - { - variableName = property0.Value.GetString(); - continue; - } - if (property0.NameEquals("value"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - - if (property0.Value.ValueKind == JsonValueKind.Array) - { - pipelineReturnValues = new Dictionary>(); - foreach (var item in property0.Value.EnumerateArray()) - pipelineReturnValues.Value.Add(item.GetProperty("key"u8).GetString(), JsonSerializer.Deserialize>(item.GetProperty("value"u8).GetRawText())); - - continue; - } - - value = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("setSystemVariable"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - setSystemVariable = property0.Value.GetBoolean(); - continue; - } - } - continue; - } - additionalPropertiesDictionary.Add(property.Name, JsonSerializer.Deserialize>(property.Value.GetRawText())); - } - additionalProperties = additionalPropertiesDictionary; - return new SetVariableActivity(name, type, description.Value, Optional.ToNullable(state), Optional.ToNullable(onInactiveMarkAs), Optional.ToList(dependsOn), Optional.ToList(userProperties), additionalProperties, policy.Value, variableName.Value, value.Value, pipelineReturnValues.Value, Optional.ToNullable(setSystemVariable)); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SetVariableActivity.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SetVariableActivity.cs deleted file mode 100644 index 2ee30295..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SetVariableActivity.cs +++ /dev/null @@ -1,57 +0,0 @@ -// - -#nullable disable - -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// Set value for a Variable. - public partial class SetVariableActivity : ControlActivity - { - /// Initializes a new instance of SetVariableActivity. - /// Activity name. - /// is null. - public SetVariableActivity(string name) : base(name) - { - Argument.AssertNotNull(name, nameof(name)); - - ActivityType = "SetVariable"; - } - - /// Initializes a new instance of SetVariableActivity. - /// Activity name. - /// Type of activity. - /// Activity description. - /// Activity state. This is an optional property and if not provided, the state will be Active by default. - /// 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. - /// Activity depends on condition. - /// Activity user properties. - /// Additional Properties. - /// Activity policy. - /// Name of the variable whose value needs to be set. - /// Value to be set. Could be a static value or Expression. - /// If set to true, it sets the pipeline run return value. - internal SetVariableActivity(string name, string activityType, string description, PipelineActivityState? state, ActivityOnInactiveMarkAs? onInactiveMarkAs, IList dependsOn, IList userProperties, IDictionary> additionalProperties, SecureInputOutputPolicy policy, string variableName, DataFactoryElement value, Dictionary> pipelineReturnValues, bool? setSystemVariable) : base(name, activityType, description, state, onInactiveMarkAs, dependsOn, userProperties, additionalProperties) - { - Policy = policy; - VariableName = variableName; - Value = value; - PipelineReturnValues = pipelineReturnValues; - SetSystemVariable = setSystemVariable; - ActivityType = activityType ?? "SetVariable"; - } - - /// Activity policy. - public SecureInputOutputPolicy Policy { get; set; } - /// Name of the variable whose value needs to be set. - public string VariableName { get; set; } - /// Value to be set. Could be a static value or Expression. - public DataFactoryElement Value { get; set; } - /// Value to be set. Could be a static value or Expression. - public Dictionary> PipelineReturnValues { get; set; } - /// If set to true, it sets the pipeline run return value. - public bool? SetSystemVariable { get; set; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SftpAuthenticationType.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SftpAuthenticationType.cs deleted file mode 100644 index 83de1813..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SftpAuthenticationType.cs +++ /dev/null @@ -1,50 +0,0 @@ -// - -#nullable disable - -using System.ComponentModel; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// The authentication type to be used to connect to the FTP server. - public readonly partial struct SftpAuthenticationType : IEquatable - { - private readonly string _value; - - /// Initializes a new instance of . - /// is null. - public SftpAuthenticationType(string value) - { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } - - private const string BasicValue = "Basic"; - private const string SshPublicKeyValue = "SshPublicKey"; - private const string MultiFactorValue = "MultiFactor"; - - /// Basic. - public static SftpAuthenticationType Basic { get; } = new SftpAuthenticationType(BasicValue); - /// SshPublicKey. - public static SftpAuthenticationType SshPublicKey { get; } = new SftpAuthenticationType(SshPublicKeyValue); - /// MultiFactor. - public static SftpAuthenticationType MultiFactor { get; } = new SftpAuthenticationType(MultiFactorValue); - /// Determines if two values are the same. - public static bool operator ==(SftpAuthenticationType left, SftpAuthenticationType right) => left.Equals(right); - /// Determines if two values are not the same. - public static bool operator !=(SftpAuthenticationType left, SftpAuthenticationType right) => !left.Equals(right); - /// Converts a string to a . - public static implicit operator SftpAuthenticationType(string value) => new SftpAuthenticationType(value); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override bool Equals(object obj) => obj is SftpAuthenticationType other && Equals(other); - /// - public bool Equals(SftpAuthenticationType other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override int GetHashCode() => _value?.GetHashCode() ?? 0; - /// - public override string ToString() => _value; - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SftpLocation.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SftpLocation.Serialization.cs deleted file mode 100644 index 871ec765..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SftpLocation.Serialization.cs +++ /dev/null @@ -1,82 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class SftpLocation : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - writer.WritePropertyName("type"u8); - writer.WriteStringValue(DatasetLocationType); - if (Optional.IsDefined(FolderPath)) - { - writer.WritePropertyName("folderPath"u8); - JsonSerializer.Serialize(writer, FolderPath); - } - if (Optional.IsDefined(FileName)) - { - writer.WritePropertyName("fileName"u8); - JsonSerializer.Serialize(writer, FileName); - } - foreach (var item in AdditionalProperties) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.Value.ToString()).RootElement); -#endif - } - writer.WriteEndObject(); - } - - internal static SftpLocation DeserializeSftpLocation(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - string type = default; - Optional> folderPath = default; - Optional> fileName = default; - IDictionary> additionalProperties = default; - Dictionary> additionalPropertiesDictionary = new Dictionary>(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("type"u8)) - { - type = property.Value.GetString(); - continue; - } - if (property.NameEquals("folderPath"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - folderPath = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("fileName"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - fileName = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - additionalPropertiesDictionary.Add(property.Name, JsonSerializer.Deserialize>(property.Value.GetRawText())); - } - additionalProperties = additionalPropertiesDictionary; - return new SftpLocation(type, folderPath.Value, fileName.Value, additionalProperties); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SftpLocation.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SftpLocation.cs deleted file mode 100644 index 15031c2e..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SftpLocation.cs +++ /dev/null @@ -1,28 +0,0 @@ -// - -#nullable disable - -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// The location of SFTP dataset. - public partial class SftpLocation : DatasetLocation - { - /// Initializes a new instance of SftpLocation. - public SftpLocation() - { - DatasetLocationType = "SftpLocation"; - } - - /// Initializes a new instance of SftpLocation. - /// Type of dataset storage location. - /// Specify the folder path of dataset. Type: string (or Expression with resultType string). - /// Specify the file name of dataset. Type: string (or Expression with resultType string). - /// Additional Properties. - internal SftpLocation(string datasetLocationType, DataFactoryElement folderPath, DataFactoryElement fileName, IDictionary> additionalProperties) : base(datasetLocationType, folderPath, fileName, additionalProperties) - { - DatasetLocationType = datasetLocationType ?? "SftpLocation"; - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SftpReadSettings.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SftpReadSettings.Serialization.cs deleted file mode 100644 index fa12f6b3..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SftpReadSettings.Serialization.cs +++ /dev/null @@ -1,232 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class SftpReadSettings : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - if (Optional.IsDefined(Recursive)) - { - writer.WritePropertyName("recursive"u8); - JsonSerializer.Serialize(writer, Recursive); - } - if (Optional.IsDefined(WildcardFolderPath)) - { - writer.WritePropertyName("wildcardFolderPath"u8); - JsonSerializer.Serialize(writer, WildcardFolderPath); - } - if (Optional.IsDefined(WildcardFileName)) - { - writer.WritePropertyName("wildcardFileName"u8); - JsonSerializer.Serialize(writer, WildcardFileName); - } - if (Optional.IsDefined(EnablePartitionDiscovery)) - { - writer.WritePropertyName("enablePartitionDiscovery"u8); - JsonSerializer.Serialize(writer, EnablePartitionDiscovery); - } - if (Optional.IsDefined(PartitionRootPath)) - { - writer.WritePropertyName("partitionRootPath"u8); - JsonSerializer.Serialize(writer, PartitionRootPath); - } - if (Optional.IsDefined(FileListPath)) - { - writer.WritePropertyName("fileListPath"u8); - JsonSerializer.Serialize(writer, FileListPath); - } - if (Optional.IsDefined(DeleteFilesAfterCompletion)) - { - writer.WritePropertyName("deleteFilesAfterCompletion"u8); - JsonSerializer.Serialize(writer, DeleteFilesAfterCompletion); - } - if (Optional.IsDefined(ModifiedDatetimeStart)) - { - writer.WritePropertyName("modifiedDatetimeStart"u8); - JsonSerializer.Serialize(writer, ModifiedDatetimeStart); - } - if (Optional.IsDefined(ModifiedDatetimeEnd)) - { - writer.WritePropertyName("modifiedDatetimeEnd"u8); - JsonSerializer.Serialize(writer, ModifiedDatetimeEnd); - } - if (Optional.IsDefined(DisableChunking)) - { - writer.WritePropertyName("disableChunking"u8); - JsonSerializer.Serialize(writer, DisableChunking); - } - writer.WritePropertyName("type"u8); - writer.WriteStringValue(StoreReadSettingsType); - if (Optional.IsDefined(MaxConcurrentConnections)) - { - writer.WritePropertyName("maxConcurrentConnections"u8); - JsonSerializer.Serialize(writer, MaxConcurrentConnections); - } - if (Optional.IsDefined(DisableMetricsCollection)) - { - writer.WritePropertyName("disableMetricsCollection"u8); - JsonSerializer.Serialize(writer, DisableMetricsCollection); - } - foreach (var item in AdditionalProperties) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.Value.ToString()).RootElement); -#endif - } - writer.WriteEndObject(); - } - - internal static SftpReadSettings DeserializeSftpReadSettings(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - Optional> recursive = default; - Optional> wildcardFolderPath = default; - Optional> wildcardFileName = default; - Optional> enablePartitionDiscovery = default; - Optional> partitionRootPath = default; - Optional> fileListPath = default; - Optional> deleteFilesAfterCompletion = default; - Optional> modifiedDatetimeStart = default; - Optional> modifiedDatetimeEnd = default; - Optional> disableChunking = default; - string type = default; - Optional> maxConcurrentConnections = default; - Optional> disableMetricsCollection = default; - IDictionary> additionalProperties = default; - Dictionary> additionalPropertiesDictionary = new Dictionary>(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("recursive"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - recursive = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("wildcardFolderPath"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - wildcardFolderPath = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("wildcardFileName"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - wildcardFileName = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("enablePartitionDiscovery"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - enablePartitionDiscovery = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("partitionRootPath"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - partitionRootPath = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("fileListPath"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - fileListPath = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("deleteFilesAfterCompletion"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - deleteFilesAfterCompletion = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("modifiedDatetimeStart"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - modifiedDatetimeStart = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("modifiedDatetimeEnd"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - modifiedDatetimeEnd = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("disableChunking"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - disableChunking = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("type"u8)) - { - type = property.Value.GetString(); - continue; - } - if (property.NameEquals("maxConcurrentConnections"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - maxConcurrentConnections = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("disableMetricsCollection"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - disableMetricsCollection = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - additionalPropertiesDictionary.Add(property.Name, JsonSerializer.Deserialize>(property.Value.GetRawText())); - } - additionalProperties = additionalPropertiesDictionary; - return new SftpReadSettings(type, maxConcurrentConnections.Value, disableMetricsCollection.Value, additionalProperties, recursive.Value, wildcardFolderPath.Value, wildcardFileName.Value, enablePartitionDiscovery.Value, partitionRootPath.Value, fileListPath.Value, deleteFilesAfterCompletion.Value, modifiedDatetimeStart.Value, modifiedDatetimeEnd.Value, disableChunking.Value); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SftpReadSettings.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SftpReadSettings.cs deleted file mode 100644 index de254a13..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SftpReadSettings.cs +++ /dev/null @@ -1,69 +0,0 @@ -// - -#nullable disable - -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// Sftp read settings. - public partial class SftpReadSettings : StoreReadSettings - { - /// Initializes a new instance of SftpReadSettings. - public SftpReadSettings() - { - StoreReadSettingsType = "SftpReadSettings"; - } - - /// Initializes a new instance of SftpReadSettings. - /// The read setting type. - /// The maximum concurrent connection count for the source data store. Type: integer (or Expression with resultType integer). - /// If true, disable data store metrics collection. Default is false. Type: boolean (or Expression with resultType boolean). - /// Additional Properties. - /// If true, files under the folder path will be read recursively. Default is true. Type: boolean (or Expression with resultType boolean). - /// Sftp wildcardFolderPath. Type: string (or Expression with resultType string). - /// Sftp wildcardFileName. Type: string (or Expression with resultType string). - /// Indicates whether to enable partition discovery. Type: boolean (or Expression with resultType boolean). - /// Specify the root path where partition discovery starts from. Type: string (or Expression with resultType string). - /// Point to a text file that lists each file (relative path to the path configured in the dataset) that you want to copy. Type: string (or Expression with resultType string). - /// Indicates whether the source files need to be deleted after copy completion. Default is false. Type: boolean (or Expression with resultType boolean). - /// The start of file's modified datetime. Type: string (or Expression with resultType string). - /// The end of file's modified datetime. Type: string (or Expression with resultType string). - /// If true, disable parallel reading within each file. Default is false. Type: boolean (or Expression with resultType boolean). - internal SftpReadSettings(string storeReadSettingsType, DataFactoryElement maxConcurrentConnections, DataFactoryElement disableMetricsCollection, IDictionary> additionalProperties, DataFactoryElement recursive, DataFactoryElement wildcardFolderPath, DataFactoryElement wildcardFileName, DataFactoryElement enablePartitionDiscovery, DataFactoryElement partitionRootPath, DataFactoryElement fileListPath, DataFactoryElement deleteFilesAfterCompletion, DataFactoryElement modifiedDatetimeStart, DataFactoryElement modifiedDatetimeEnd, DataFactoryElement disableChunking) : base(storeReadSettingsType, maxConcurrentConnections, disableMetricsCollection, additionalProperties) - { - Recursive = recursive; - WildcardFolderPath = wildcardFolderPath; - WildcardFileName = wildcardFileName; - EnablePartitionDiscovery = enablePartitionDiscovery; - PartitionRootPath = partitionRootPath; - FileListPath = fileListPath; - DeleteFilesAfterCompletion = deleteFilesAfterCompletion; - ModifiedDatetimeStart = modifiedDatetimeStart; - ModifiedDatetimeEnd = modifiedDatetimeEnd; - DisableChunking = disableChunking; - StoreReadSettingsType = storeReadSettingsType ?? "SftpReadSettings"; - } - - /// If true, files under the folder path will be read recursively. Default is true. Type: boolean (or Expression with resultType boolean). - public DataFactoryElement Recursive { get; set; } - /// Sftp wildcardFolderPath. Type: string (or Expression with resultType string). - public DataFactoryElement WildcardFolderPath { get; set; } - /// Sftp wildcardFileName. Type: string (or Expression with resultType string). - public DataFactoryElement WildcardFileName { get; set; } - /// Indicates whether to enable partition discovery. Type: boolean (or Expression with resultType boolean). - public DataFactoryElement EnablePartitionDiscovery { get; set; } - /// Specify the root path where partition discovery starts from. Type: string (or Expression with resultType string). - public DataFactoryElement PartitionRootPath { get; set; } - /// Point to a text file that lists each file (relative path to the path configured in the dataset) that you want to copy. Type: string (or Expression with resultType string). - public DataFactoryElement FileListPath { get; set; } - /// Indicates whether the source files need to be deleted after copy completion. Default is false. Type: boolean (or Expression with resultType boolean). - public DataFactoryElement DeleteFilesAfterCompletion { get; set; } - /// The start of file's modified datetime. Type: string (or Expression with resultType string). - public DataFactoryElement ModifiedDatetimeStart { get; set; } - /// The end of file's modified datetime. Type: string (or Expression with resultType string). - public DataFactoryElement ModifiedDatetimeEnd { get; set; } - /// If true, disable parallel reading within each file. Default is false. Type: boolean (or Expression with resultType boolean). - public DataFactoryElement DisableChunking { get; set; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SftpServerLinkedService.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SftpServerLinkedService.Serialization.cs deleted file mode 100644 index 4ffff361..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SftpServerLinkedService.Serialization.cs +++ /dev/null @@ -1,314 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class SftpServerLinkedService : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - writer.WritePropertyName("type"u8); - writer.WriteStringValue(LinkedServiceType); - if (Optional.IsDefined(ConnectVia)) - { - writer.WritePropertyName("connectVia"u8); - writer.WriteObjectValue(ConnectVia); - } - if (Optional.IsDefined(Description)) - { - writer.WritePropertyName("description"u8); - writer.WriteStringValue(Description); - } - if (Optional.IsCollectionDefined(Parameters)) - { - writer.WritePropertyName("parameters"u8); - writer.WriteStartObject(); - foreach (var item in Parameters) - { - writer.WritePropertyName(item.Key); - writer.WriteObjectValue(item.Value); - } - writer.WriteEndObject(); - } - if (Optional.IsCollectionDefined(Annotations)) - { - writer.WritePropertyName("annotations"u8); - writer.WriteStartArray(); - foreach (var item in Annotations) - { - if (item == null) - { - writer.WriteNullValue(); - continue; - } -#if NET6_0_OR_GREATER - writer.WriteRawValue(item); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.ToString()).RootElement); -#endif - } - writer.WriteEndArray(); - } - writer.WritePropertyName("typeProperties"u8); - writer.WriteStartObject(); - writer.WritePropertyName("host"u8); - JsonSerializer.Serialize(writer, Host); - if (Optional.IsDefined(Port)) - { - writer.WritePropertyName("port"u8); - JsonSerializer.Serialize(writer, Port); - } - if (Optional.IsDefined(AuthenticationType)) - { - writer.WritePropertyName("authenticationType"u8); - writer.WriteStringValue(AuthenticationType.Value.ToString()); - } - if (Optional.IsDefined(UserName)) - { - writer.WritePropertyName("userName"u8); - JsonSerializer.Serialize(writer, UserName); - } - if (Optional.IsDefined(Password)) - { - writer.WritePropertyName("password"u8); - JsonSerializer.Serialize(writer, Password); - } - if (Optional.IsDefined(EncryptedCredential)) - { - writer.WritePropertyName("encryptedCredential"u8); - writer.WriteStringValue(EncryptedCredential); - } - if (Optional.IsDefined(PrivateKeyPath)) - { - writer.WritePropertyName("privateKeyPath"u8); - JsonSerializer.Serialize(writer, PrivateKeyPath); - } - if (Optional.IsDefined(PrivateKeyContent)) - { - writer.WritePropertyName("privateKeyContent"u8); - JsonSerializer.Serialize(writer, PrivateKeyContent); - } - if (Optional.IsDefined(PassPhrase)) - { - writer.WritePropertyName("passPhrase"u8); - JsonSerializer.Serialize(writer, PassPhrase); - } - if (Optional.IsDefined(SkipHostKeyValidation)) - { - writer.WritePropertyName("skipHostKeyValidation"u8); - JsonSerializer.Serialize(writer, SkipHostKeyValidation); - } - if (Optional.IsDefined(HostKeyFingerprint)) - { - writer.WritePropertyName("hostKeyFingerprint"u8); - JsonSerializer.Serialize(writer, HostKeyFingerprint); - } - writer.WriteEndObject(); - foreach (var item in AdditionalProperties) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.Value.ToString()).RootElement); -#endif - } - writer.WriteEndObject(); - } - - internal static SftpServerLinkedService DeserializeSftpServerLinkedService(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - string type = default; - Optional connectVia = default; - Optional description = default; - Optional> parameters = default; - Optional> annotations = default; - DataFactoryElement host = default; - Optional> port = default; - Optional authenticationType = default; - Optional> userName = default; - Optional password = default; - Optional encryptedCredential = default; - Optional> privateKeyPath = default; - Optional privateKeyContent = default; - Optional passPhrase = default; - Optional> skipHostKeyValidation = default; - Optional> hostKeyFingerprint = default; - IDictionary> additionalProperties = default; - Dictionary> additionalPropertiesDictionary = new Dictionary>(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("type"u8)) - { - type = property.Value.GetString(); - continue; - } - if (property.NameEquals("connectVia"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - connectVia = IntegrationRuntimeReference.DeserializeIntegrationRuntimeReference(property.Value); - continue; - } - if (property.NameEquals("description"u8)) - { - description = property.Value.GetString(); - continue; - } - if (property.NameEquals("parameters"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - Dictionary dictionary = new Dictionary(); - foreach (var property0 in property.Value.EnumerateObject()) - { - dictionary.Add(property0.Name, EntityParameterSpecification.DeserializeEntityParameterSpecification(property0.Value)); - } - parameters = dictionary; - continue; - } - if (property.NameEquals("annotations"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - if (item.ValueKind == JsonValueKind.Null) - { - array.Add(null); - } - else - { - array.Add(BinaryData.FromString(item.GetRawText())); - } - } - annotations = array; - continue; - } - if (property.NameEquals("typeProperties"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - foreach (var property0 in property.Value.EnumerateObject()) - { - if (property0.NameEquals("host"u8)) - { - host = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("port"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - port = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("authenticationType"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - authenticationType = new SftpAuthenticationType(property0.Value.GetString()); - continue; - } - if (property0.NameEquals("userName"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - userName = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("password"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - password = JsonSerializer.Deserialize(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("encryptedCredential"u8)) - { - encryptedCredential = property0.Value.GetString(); - continue; - } - if (property0.NameEquals("privateKeyPath"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - privateKeyPath = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("privateKeyContent"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - privateKeyContent = JsonSerializer.Deserialize(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("passPhrase"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - passPhrase = JsonSerializer.Deserialize(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("skipHostKeyValidation"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - skipHostKeyValidation = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("hostKeyFingerprint"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - hostKeyFingerprint = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - } - continue; - } - additionalPropertiesDictionary.Add(property.Name, JsonSerializer.Deserialize>(property.Value.GetRawText())); - } - additionalProperties = additionalPropertiesDictionary; - return new SftpServerLinkedService(type, connectVia.Value, description.Value, Optional.ToDictionary(parameters), Optional.ToList(annotations), additionalProperties, host, port.Value, Optional.ToNullable(authenticationType), userName.Value, password, encryptedCredential.Value, privateKeyPath.Value, privateKeyContent, passPhrase, skipHostKeyValidation.Value, hostKeyFingerprint.Value); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SftpServerLinkedService.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SftpServerLinkedService.cs deleted file mode 100644 index b7a174bc..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SftpServerLinkedService.cs +++ /dev/null @@ -1,81 +0,0 @@ -// - -#nullable disable - -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// A linked service for an SSH File Transfer Protocol (SFTP) server. - public partial class SftpServerLinkedService : DataFactoryLinkedServiceProperties - { - /// Initializes a new instance of SftpServerLinkedService. - /// The SFTP server host name. Type: string (or Expression with resultType string). - /// is null. - public SftpServerLinkedService(DataFactoryElement host) - { - Argument.AssertNotNull(host, nameof(host)); - - Host = host; - LinkedServiceType = "Sftp"; - } - - /// Initializes a new instance of SftpServerLinkedService. - /// Type of linked service. - /// The integration runtime reference. - /// Linked service description. - /// Parameters for linked service. - /// List of tags that can be used for describing the linked service. - /// Additional Properties. - /// The SFTP server host name. Type: string (or Expression with resultType string). - /// The TCP port number that the SFTP server uses to listen for client connections. Default value is 22. Type: integer (or Expression with resultType integer), minimum: 0. - /// The authentication type to be used to connect to the FTP server. - /// The username used to log on to the SFTP server. Type: string (or Expression with resultType string). - /// Password to logon the SFTP server for Basic authentication. - /// The encrypted credential used for authentication. Credentials are encrypted using the integration runtime credential manager. Type: string. - /// The SSH private key file path for SshPublicKey authentication. Only valid for on-premises copy. For on-premises copy with SshPublicKey authentication, either PrivateKeyPath or PrivateKeyContent should be specified. SSH private key should be OpenSSH format. Type: string (or Expression with resultType string). - /// Base64 encoded SSH private key content for SshPublicKey authentication. For on-premises copy with SshPublicKey authentication, either PrivateKeyPath or PrivateKeyContent should be specified. SSH private key should be OpenSSH format. - /// The password to decrypt the SSH private key if the SSH private key is encrypted. - /// If true, skip the SSH host key validation. Default value is false. Type: boolean (or Expression with resultType boolean). - /// The host key finger-print of the SFTP server. When SkipHostKeyValidation is false, HostKeyFingerprint should be specified. Type: string (or Expression with resultType string). - internal SftpServerLinkedService(string linkedServiceType, IntegrationRuntimeReference connectVia, string description, IDictionary parameters, IList annotations, IDictionary> additionalProperties, DataFactoryElement host, DataFactoryElement port, SftpAuthenticationType? authenticationType, DataFactoryElement userName, DataFactorySecretBaseDefinition password, string encryptedCredential, DataFactoryElement privateKeyPath, DataFactorySecretBaseDefinition privateKeyContent, DataFactorySecretBaseDefinition passPhrase, DataFactoryElement skipHostKeyValidation, DataFactoryElement hostKeyFingerprint) : base(linkedServiceType, connectVia, description, parameters, annotations, additionalProperties) - { - Host = host; - Port = port; - AuthenticationType = authenticationType; - UserName = userName; - Password = password; - EncryptedCredential = encryptedCredential; - PrivateKeyPath = privateKeyPath; - PrivateKeyContent = privateKeyContent; - PassPhrase = passPhrase; - SkipHostKeyValidation = skipHostKeyValidation; - HostKeyFingerprint = hostKeyFingerprint; - LinkedServiceType = linkedServiceType ?? "Sftp"; - } - - /// The SFTP server host name. Type: string (or Expression with resultType string). - public DataFactoryElement Host { get; set; } - /// The TCP port number that the SFTP server uses to listen for client connections. Default value is 22. Type: integer (or Expression with resultType integer), minimum: 0. - public DataFactoryElement Port { get; set; } - /// The authentication type to be used to connect to the FTP server. - public SftpAuthenticationType? AuthenticationType { get; set; } - /// The username used to log on to the SFTP server. Type: string (or Expression with resultType string). - public DataFactoryElement UserName { get; set; } - /// Password to logon the SFTP server for Basic authentication. - public DataFactorySecretBaseDefinition Password { get; set; } - /// The encrypted credential used for authentication. Credentials are encrypted using the integration runtime credential manager. Type: string. - public string EncryptedCredential { get; set; } - /// The SSH private key file path for SshPublicKey authentication. Only valid for on-premises copy. For on-premises copy with SshPublicKey authentication, either PrivateKeyPath or PrivateKeyContent should be specified. SSH private key should be OpenSSH format. Type: string (or Expression with resultType string). - public DataFactoryElement PrivateKeyPath { get; set; } - /// Base64 encoded SSH private key content for SshPublicKey authentication. For on-premises copy with SshPublicKey authentication, either PrivateKeyPath or PrivateKeyContent should be specified. SSH private key should be OpenSSH format. - public DataFactorySecretBaseDefinition PrivateKeyContent { get; set; } - /// The password to decrypt the SSH private key if the SSH private key is encrypted. - public DataFactorySecretBaseDefinition PassPhrase { get; set; } - /// If true, skip the SSH host key validation. Default value is false. Type: boolean (or Expression with resultType boolean). - public DataFactoryElement SkipHostKeyValidation { get; set; } - /// The host key finger-print of the SFTP server. When SkipHostKeyValidation is false, HostKeyFingerprint should be specified. Type: string (or Expression with resultType string). - public DataFactoryElement HostKeyFingerprint { get; set; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SftpWriteSettings.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SftpWriteSettings.Serialization.cs deleted file mode 100644 index f716a9fa..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SftpWriteSettings.Serialization.cs +++ /dev/null @@ -1,131 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class SftpWriteSettings : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - if (Optional.IsDefined(OperationTimeout)) - { - writer.WritePropertyName("operationTimeout"u8); - JsonSerializer.Serialize(writer, OperationTimeout); - } - if (Optional.IsDefined(UseTempFileRename)) - { - writer.WritePropertyName("useTempFileRename"u8); - JsonSerializer.Serialize(writer, UseTempFileRename); - } - writer.WritePropertyName("type"u8); - writer.WriteStringValue(StoreWriteSettingsType); - if (Optional.IsDefined(MaxConcurrentConnections)) - { - writer.WritePropertyName("maxConcurrentConnections"u8); - JsonSerializer.Serialize(writer, MaxConcurrentConnections); - } - if (Optional.IsDefined(DisableMetricsCollection)) - { - writer.WritePropertyName("disableMetricsCollection"u8); - JsonSerializer.Serialize(writer, DisableMetricsCollection); - } - if (Optional.IsDefined(CopyBehavior)) - { - writer.WritePropertyName("copyBehavior"u8); -#if NET6_0_OR_GREATER - writer.WriteRawValue(CopyBehavior); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(CopyBehavior.ToString()).RootElement); -#endif - } - foreach (var item in AdditionalProperties) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.Value.ToString()).RootElement); -#endif - } - writer.WriteEndObject(); - } - - internal static SftpWriteSettings DeserializeSftpWriteSettings(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - Optional> operationTimeout = default; - Optional> useTempFileRename = default; - string type = default; - Optional> maxConcurrentConnections = default; - Optional> disableMetricsCollection = default; - Optional copyBehavior = default; - IDictionary> additionalProperties = default; - Dictionary> additionalPropertiesDictionary = new Dictionary>(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("operationTimeout"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - operationTimeout = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("useTempFileRename"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - useTempFileRename = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("type"u8)) - { - type = property.Value.GetString(); - continue; - } - if (property.NameEquals("maxConcurrentConnections"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - maxConcurrentConnections = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("disableMetricsCollection"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - disableMetricsCollection = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("copyBehavior"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - copyBehavior = BinaryData.FromString(property.Value.GetRawText()); - continue; - } - additionalPropertiesDictionary.Add(property.Name, JsonSerializer.Deserialize>(property.Value.GetRawText())); - } - additionalProperties = additionalPropertiesDictionary; - return new SftpWriteSettings(type, maxConcurrentConnections.Value, disableMetricsCollection.Value, copyBehavior.Value, additionalProperties, operationTimeout.Value, useTempFileRename.Value); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SftpWriteSettings.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SftpWriteSettings.cs deleted file mode 100644 index 448fbe8c..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SftpWriteSettings.cs +++ /dev/null @@ -1,38 +0,0 @@ -// - -#nullable disable - -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// Sftp write settings. - public partial class SftpWriteSettings : StoreWriteSettings - { - /// Initializes a new instance of SftpWriteSettings. - public SftpWriteSettings() - { - StoreWriteSettingsType = "SftpWriteSettings"; - } - - /// Initializes a new instance of SftpWriteSettings. - /// The write setting type. - /// The maximum concurrent connection count for the source data store. Type: integer (or Expression with resultType integer). - /// If true, disable data store metrics collection. Default is false. Type: boolean (or Expression with resultType boolean). - /// The type of copy behavior for copy sink. - /// Additional Properties. - /// Specifies the timeout for writing each chunk to SFTP server. Default value: 01:00:00 (one hour). Type: string (or Expression with resultType string). - /// Upload to temporary file(s) and rename. Disable this option if your SFTP server doesn't support rename operation. Type: boolean (or Expression with resultType boolean). - internal SftpWriteSettings(string storeWriteSettingsType, DataFactoryElement maxConcurrentConnections, DataFactoryElement disableMetricsCollection, BinaryData copyBehavior, IDictionary> additionalProperties, DataFactoryElement operationTimeout, DataFactoryElement useTempFileRename) : base(storeWriteSettingsType, maxConcurrentConnections, disableMetricsCollection, copyBehavior, additionalProperties) - { - OperationTimeout = operationTimeout; - UseTempFileRename = useTempFileRename; - StoreWriteSettingsType = storeWriteSettingsType ?? "SftpWriteSettings"; - } - - /// Specifies the timeout for writing each chunk to SFTP server. Default value: 01:00:00 (one hour). Type: string (or Expression with resultType string). - public DataFactoryElement OperationTimeout { get; set; } - /// Upload to temporary file(s) and rename. Disable this option if your SFTP server doesn't support rename operation. Type: boolean (or Expression with resultType boolean). - public DataFactoryElement UseTempFileRename { get; set; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SharePointOnlineListLinkedService.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SharePointOnlineListLinkedService.Serialization.cs deleted file mode 100644 index 67aa025e..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SharePointOnlineListLinkedService.Serialization.cs +++ /dev/null @@ -1,202 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class SharePointOnlineListLinkedService : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - writer.WritePropertyName("type"u8); - writer.WriteStringValue(LinkedServiceType); - if (Optional.IsDefined(ConnectVia)) - { - writer.WritePropertyName("connectVia"u8); - writer.WriteObjectValue(ConnectVia); - } - if (Optional.IsDefined(Description)) - { - writer.WritePropertyName("description"u8); - writer.WriteStringValue(Description); - } - if (Optional.IsCollectionDefined(Parameters)) - { - writer.WritePropertyName("parameters"u8); - writer.WriteStartObject(); - foreach (var item in Parameters) - { - writer.WritePropertyName(item.Key); - writer.WriteObjectValue(item.Value); - } - writer.WriteEndObject(); - } - if (Optional.IsCollectionDefined(Annotations)) - { - writer.WritePropertyName("annotations"u8); - writer.WriteStartArray(); - foreach (var item in Annotations) - { - if (item == null) - { - writer.WriteNullValue(); - continue; - } -#if NET6_0_OR_GREATER - writer.WriteRawValue(item); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.ToString()).RootElement); -#endif - } - writer.WriteEndArray(); - } - writer.WritePropertyName("typeProperties"u8); - writer.WriteStartObject(); - writer.WritePropertyName("siteUrl"u8); - JsonSerializer.Serialize(writer, SiteUri); - writer.WritePropertyName("tenantId"u8); - JsonSerializer.Serialize(writer, TenantId); - writer.WritePropertyName("servicePrincipalId"u8); - JsonSerializer.Serialize(writer, ServicePrincipalId); - writer.WritePropertyName("servicePrincipalKey"u8); - JsonSerializer.Serialize(writer, ServicePrincipalKey); if (Optional.IsDefined(EncryptedCredential)) - { - writer.WritePropertyName("encryptedCredential"u8); - writer.WriteStringValue(EncryptedCredential); - } - writer.WriteEndObject(); - foreach (var item in AdditionalProperties) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.Value.ToString()).RootElement); -#endif - } - writer.WriteEndObject(); - } - - internal static SharePointOnlineListLinkedService DeserializeSharePointOnlineListLinkedService(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - string type = default; - Optional connectVia = default; - Optional description = default; - Optional> parameters = default; - Optional> annotations = default; - DataFactoryElement siteUrl = default; - DataFactoryElement tenantId = default; - DataFactoryElement servicePrincipalId = default; - DataFactorySecretBaseDefinition servicePrincipalKey = default; - Optional encryptedCredential = default; - IDictionary> additionalProperties = default; - Dictionary> additionalPropertiesDictionary = new Dictionary>(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("type"u8)) - { - type = property.Value.GetString(); - continue; - } - if (property.NameEquals("connectVia"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - connectVia = IntegrationRuntimeReference.DeserializeIntegrationRuntimeReference(property.Value); - continue; - } - if (property.NameEquals("description"u8)) - { - description = property.Value.GetString(); - continue; - } - if (property.NameEquals("parameters"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - Dictionary dictionary = new Dictionary(); - foreach (var property0 in property.Value.EnumerateObject()) - { - dictionary.Add(property0.Name, EntityParameterSpecification.DeserializeEntityParameterSpecification(property0.Value)); - } - parameters = dictionary; - continue; - } - if (property.NameEquals("annotations"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - if (item.ValueKind == JsonValueKind.Null) - { - array.Add(null); - } - else - { - array.Add(BinaryData.FromString(item.GetRawText())); - } - } - annotations = array; - continue; - } - if (property.NameEquals("typeProperties"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - foreach (var property0 in property.Value.EnumerateObject()) - { - if (property0.NameEquals("siteUrl"u8)) - { - siteUrl = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("tenantId"u8)) - { - tenantId = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("servicePrincipalId"u8)) - { - servicePrincipalId = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("servicePrincipalKey"u8)) - { - servicePrincipalKey = JsonSerializer.Deserialize(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("encryptedCredential"u8)) - { - encryptedCredential = property0.Value.GetString(); - continue; - } - } - continue; - } - additionalPropertiesDictionary.Add(property.Name, JsonSerializer.Deserialize>(property.Value.GetRawText())); - } - additionalProperties = additionalPropertiesDictionary; - return new SharePointOnlineListLinkedService(type, connectVia.Value, description.Value, Optional.ToDictionary(parameters), Optional.ToList(annotations), additionalProperties, siteUrl, tenantId, servicePrincipalId, servicePrincipalKey, encryptedCredential.Value); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SharePointOnlineListLinkedService.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SharePointOnlineListLinkedService.cs deleted file mode 100644 index e6cf94da..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SharePointOnlineListLinkedService.cs +++ /dev/null @@ -1,66 +0,0 @@ -// - -#nullable disable - -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// SharePoint Online List linked service. - public partial class SharePointOnlineListLinkedService : DataFactoryLinkedServiceProperties - { - /// Initializes a new instance of SharePointOnlineListLinkedService. - /// The URL of the SharePoint Online site. For example, https://contoso.sharepoint.com/sites/siteName. Type: string (or Expression with resultType string). - /// The tenant ID under which your application resides. You can find it from Azure portal Active Directory overview page. Type: string (or Expression with resultType string). - /// The application (client) ID of your application registered in Azure Active Directory. Make sure to grant SharePoint site permission to this application. Type: string (or Expression with resultType string). - /// The client secret of your application registered in Azure Active Directory. Type: string (or Expression with resultType string). - /// , , or is null. - public SharePointOnlineListLinkedService(DataFactoryElement siteUri, DataFactoryElement tenantId, DataFactoryElement servicePrincipalId, DataFactorySecretBaseDefinition servicePrincipalKey) - { - Argument.AssertNotNull(siteUri, nameof(siteUri)); - Argument.AssertNotNull(tenantId, nameof(tenantId)); - Argument.AssertNotNull(servicePrincipalId, nameof(servicePrincipalId)); - Argument.AssertNotNull(servicePrincipalKey, nameof(servicePrincipalKey)); - - SiteUri = siteUri; - TenantId = tenantId; - ServicePrincipalId = servicePrincipalId; - ServicePrincipalKey = servicePrincipalKey; - LinkedServiceType = "SharePointOnlineList"; - } - - /// Initializes a new instance of SharePointOnlineListLinkedService. - /// Type of linked service. - /// The integration runtime reference. - /// Linked service description. - /// Parameters for linked service. - /// List of tags that can be used for describing the linked service. - /// Additional Properties. - /// The URL of the SharePoint Online site. For example, https://contoso.sharepoint.com/sites/siteName. Type: string (or Expression with resultType string). - /// The tenant ID under which your application resides. You can find it from Azure portal Active Directory overview page. Type: string (or Expression with resultType string). - /// The application (client) ID of your application registered in Azure Active Directory. Make sure to grant SharePoint site permission to this application. Type: string (or Expression with resultType string). - /// The client secret of your application registered in Azure Active Directory. Type: string (or Expression with resultType string). - /// The encrypted credential used for authentication. Credentials are encrypted using the integration runtime credential manager. Type: string. - internal SharePointOnlineListLinkedService(string linkedServiceType, IntegrationRuntimeReference connectVia, string description, IDictionary parameters, IList annotations, IDictionary> additionalProperties, DataFactoryElement siteUri, DataFactoryElement tenantId, DataFactoryElement servicePrincipalId, DataFactorySecretBaseDefinition servicePrincipalKey, string encryptedCredential) : base(linkedServiceType, connectVia, description, parameters, annotations, additionalProperties) - { - SiteUri = siteUri; - TenantId = tenantId; - ServicePrincipalId = servicePrincipalId; - ServicePrincipalKey = servicePrincipalKey; - EncryptedCredential = encryptedCredential; - LinkedServiceType = linkedServiceType ?? "SharePointOnlineList"; - } - - /// The URL of the SharePoint Online site. For example, https://contoso.sharepoint.com/sites/siteName. Type: string (or Expression with resultType string). - public DataFactoryElement SiteUri { get; set; } - /// The tenant ID under which your application resides. You can find it from Azure portal Active Directory overview page. Type: string (or Expression with resultType string). - public DataFactoryElement TenantId { get; set; } - /// The application (client) ID of your application registered in Azure Active Directory. Make sure to grant SharePoint site permission to this application. Type: string (or Expression with resultType string). - public DataFactoryElement ServicePrincipalId { get; set; } - /// The client secret of your application registered in Azure Active Directory. Type: string (or Expression with resultType string). - public DataFactorySecretBaseDefinition ServicePrincipalKey { get; set; } - /// The encrypted credential used for authentication. Credentials are encrypted using the integration runtime credential manager. Type: string. - public string EncryptedCredential { get; set; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SharePointOnlineListResourceDataset.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SharePointOnlineListResourceDataset.Serialization.cs deleted file mode 100644 index 8449dbfe..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SharePointOnlineListResourceDataset.Serialization.cs +++ /dev/null @@ -1,212 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class SharePointOnlineListResourceDataset : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - writer.WritePropertyName("type"u8); - writer.WriteStringValue(DatasetType); - if (Optional.IsDefined(Description)) - { - writer.WritePropertyName("description"u8); - writer.WriteStringValue(Description); - } - if (Optional.IsDefined(Structure)) - { - writer.WritePropertyName("structure"u8); - JsonSerializer.Serialize(writer, Structure); - } - if (Optional.IsDefined(Schema)) - { - writer.WritePropertyName("schema"u8); - JsonSerializer.Serialize(writer, Schema); - } - writer.WritePropertyName("linkedServiceName"u8); - JsonSerializer.Serialize(writer, LinkedServiceName); if (Optional.IsCollectionDefined(Parameters)) - { - writer.WritePropertyName("parameters"u8); - writer.WriteStartObject(); - foreach (var item in Parameters) - { - writer.WritePropertyName(item.Key); - writer.WriteObjectValue(item.Value); - } - writer.WriteEndObject(); - } - if (Optional.IsCollectionDefined(Annotations)) - { - writer.WritePropertyName("annotations"u8); - writer.WriteStartArray(); - foreach (var item in Annotations) - { - if (item == null) - { - writer.WriteNullValue(); - continue; - } -#if NET6_0_OR_GREATER - writer.WriteRawValue(item); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.ToString()).RootElement); -#endif - } - writer.WriteEndArray(); - } - if (Optional.IsDefined(Folder)) - { - writer.WritePropertyName("folder"u8); - writer.WriteObjectValue(Folder); - } - writer.WritePropertyName("typeProperties"u8); - writer.WriteStartObject(); - if (Optional.IsDefined(ListName)) - { - writer.WritePropertyName("listName"u8); - JsonSerializer.Serialize(writer, ListName); - } - writer.WriteEndObject(); - foreach (var item in AdditionalProperties) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.Value.ToString()).RootElement); -#endif - } - writer.WriteEndObject(); - } - - internal static SharePointOnlineListResourceDataset DeserializeSharePointOnlineListResourceDataset(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - string type = default; - Optional description = default; - Optional>> structure = default; - Optional>> schema = default; - DataFactoryLinkedServiceReference linkedServiceName = default; - Optional> parameters = default; - Optional> annotations = default; - Optional folder = default; - Optional> listName = default; - IDictionary> additionalProperties = default; - Dictionary> additionalPropertiesDictionary = new Dictionary>(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("type"u8)) - { - type = property.Value.GetString(); - continue; - } - if (property.NameEquals("description"u8)) - { - description = property.Value.GetString(); - continue; - } - if (property.NameEquals("structure"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - structure = JsonSerializer.Deserialize>>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("schema"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - schema = JsonSerializer.Deserialize>>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("linkedServiceName"u8)) - { - linkedServiceName = JsonSerializer.Deserialize(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("parameters"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - Dictionary dictionary = new Dictionary(); - foreach (var property0 in property.Value.EnumerateObject()) - { - dictionary.Add(property0.Name, EntityParameterSpecification.DeserializeEntityParameterSpecification(property0.Value)); - } - parameters = dictionary; - continue; - } - if (property.NameEquals("annotations"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - if (item.ValueKind == JsonValueKind.Null) - { - array.Add(null); - } - else - { - array.Add(BinaryData.FromString(item.GetRawText())); - } - } - annotations = array; - continue; - } - if (property.NameEquals("folder"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - folder = DatasetFolder.DeserializeDatasetFolder(property.Value); - continue; - } - if (property.NameEquals("typeProperties"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - foreach (var property0 in property.Value.EnumerateObject()) - { - if (property0.NameEquals("listName"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - listName = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - } - continue; - } - additionalPropertiesDictionary.Add(property.Name, JsonSerializer.Deserialize>(property.Value.GetRawText())); - } - additionalProperties = additionalPropertiesDictionary; - return new SharePointOnlineListResourceDataset(type, description.Value, structure.Value, schema.Value, linkedServiceName, Optional.ToDictionary(parameters), Optional.ToList(annotations), folder.Value, additionalProperties, listName.Value); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SharePointOnlineListResourceDataset.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SharePointOnlineListResourceDataset.cs deleted file mode 100644 index ed89abbe..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SharePointOnlineListResourceDataset.cs +++ /dev/null @@ -1,43 +0,0 @@ -// - -#nullable disable - -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// The sharepoint online list resource dataset. - public partial class SharePointOnlineListResourceDataset : DataFactoryDatasetProperties - { - /// Initializes a new instance of SharePointOnlineListResourceDataset. - /// Linked service reference. - /// is null. - public SharePointOnlineListResourceDataset(DataFactoryLinkedServiceReference linkedServiceName) : base(linkedServiceName) - { - Argument.AssertNotNull(linkedServiceName, nameof(linkedServiceName)); - - DatasetType = "SharePointOnlineListResource"; - } - - /// Initializes a new instance of SharePointOnlineListResourceDataset. - /// Type of dataset. - /// Dataset description. - /// Columns that define the structure of the dataset. Type: array (or Expression with resultType array), itemType: DatasetDataElement. - /// Columns that define the physical type schema of the dataset. Type: array (or Expression with resultType array), itemType: DatasetSchemaDataElement. - /// Linked service reference. - /// Parameters for dataset. - /// List of tags that can be used for describing the Dataset. - /// The folder that this Dataset is in. If not specified, Dataset will appear at the root level. - /// Additional Properties. - /// The name of the SharePoint Online list. Type: string (or Expression with resultType string). - internal SharePointOnlineListResourceDataset(string datasetType, string description, DataFactoryElement> structure, DataFactoryElement> schema, DataFactoryLinkedServiceReference linkedServiceName, IDictionary parameters, IList annotations, DatasetFolder folder, IDictionary> additionalProperties, DataFactoryElement listName) : base(datasetType, description, structure, schema, linkedServiceName, parameters, annotations, folder, additionalProperties) - { - ListName = listName; - DatasetType = datasetType ?? "SharePointOnlineListResource"; - } - - /// The name of the SharePoint Online list. Type: string (or Expression with resultType string). - public DataFactoryElement ListName { get; set; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SharePointOnlineListSource.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SharePointOnlineListSource.Serialization.cs deleted file mode 100644 index 92b3e812..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SharePointOnlineListSource.Serialization.cs +++ /dev/null @@ -1,142 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class SharePointOnlineListSource : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - if (Optional.IsDefined(Query)) - { - writer.WritePropertyName("query"u8); - JsonSerializer.Serialize(writer, Query); - } - if (Optional.IsDefined(HttpRequestTimeout)) - { - writer.WritePropertyName("httpRequestTimeout"u8); - JsonSerializer.Serialize(writer, HttpRequestTimeout); - } - writer.WritePropertyName("type"u8); - writer.WriteStringValue(CopySourceType); - if (Optional.IsDefined(SourceRetryCount)) - { - writer.WritePropertyName("sourceRetryCount"u8); - JsonSerializer.Serialize(writer, SourceRetryCount); - } - if (Optional.IsDefined(SourceRetryWait)) - { - writer.WritePropertyName("sourceRetryWait"u8); - JsonSerializer.Serialize(writer, SourceRetryWait); - } - if (Optional.IsDefined(MaxConcurrentConnections)) - { - writer.WritePropertyName("maxConcurrentConnections"u8); - JsonSerializer.Serialize(writer, MaxConcurrentConnections); - } - if (Optional.IsDefined(DisableMetricsCollection)) - { - writer.WritePropertyName("disableMetricsCollection"u8); - JsonSerializer.Serialize(writer, DisableMetricsCollection); - } - foreach (var item in AdditionalProperties) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.Value.ToString()).RootElement); -#endif - } - writer.WriteEndObject(); - } - - internal static SharePointOnlineListSource DeserializeSharePointOnlineListSource(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - Optional> query = default; - Optional> httpRequestTimeout = default; - string type = default; - Optional> sourceRetryCount = default; - Optional> sourceRetryWait = default; - Optional> maxConcurrentConnections = default; - Optional> disableMetricsCollection = default; - IDictionary> additionalProperties = default; - Dictionary> additionalPropertiesDictionary = new Dictionary>(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("query"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - query = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("httpRequestTimeout"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - httpRequestTimeout = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("type"u8)) - { - type = property.Value.GetString(); - continue; - } - if (property.NameEquals("sourceRetryCount"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - sourceRetryCount = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("sourceRetryWait"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - sourceRetryWait = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("maxConcurrentConnections"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - maxConcurrentConnections = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("disableMetricsCollection"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - disableMetricsCollection = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - additionalPropertiesDictionary.Add(property.Name, JsonSerializer.Deserialize>(property.Value.GetRawText())); - } - additionalProperties = additionalPropertiesDictionary; - return new SharePointOnlineListSource(type, sourceRetryCount.Value, sourceRetryWait.Value, maxConcurrentConnections.Value, disableMetricsCollection.Value, additionalProperties, query.Value, httpRequestTimeout.Value); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SharePointOnlineListSource.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SharePointOnlineListSource.cs deleted file mode 100644 index b58f9eee..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SharePointOnlineListSource.cs +++ /dev/null @@ -1,39 +0,0 @@ -// - -#nullable disable - -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// A copy activity source for sharePoint online list source. - public partial class SharePointOnlineListSource : CopyActivitySource - { - /// Initializes a new instance of SharePointOnlineListSource. - public SharePointOnlineListSource() - { - CopySourceType = "SharePointOnlineListSource"; - } - - /// Initializes a new instance of SharePointOnlineListSource. - /// Copy source type. - /// Source retry count. Type: integer (or Expression with resultType integer). - /// Source retry wait. Type: string (or Expression with resultType string), pattern: ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). - /// The maximum concurrent connection count for the source data store. Type: integer (or Expression with resultType integer). - /// If true, disable data store metrics collection. Default is false. Type: boolean (or Expression with resultType boolean). - /// Additional Properties. - /// The OData query to filter the data in SharePoint Online list. For example, "$top=1". Type: string (or Expression with resultType string). - /// The wait time to get a response from SharePoint Online. Default value is 5 minutes (00:05:00). Type: string (or Expression with resultType string), pattern: ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). - internal SharePointOnlineListSource(string copySourceType, DataFactoryElement sourceRetryCount, DataFactoryElement sourceRetryWait, DataFactoryElement maxConcurrentConnections, DataFactoryElement disableMetricsCollection, IDictionary> additionalProperties, DataFactoryElement query, DataFactoryElement httpRequestTimeout) : base(copySourceType, sourceRetryCount, sourceRetryWait, maxConcurrentConnections, disableMetricsCollection, additionalProperties) - { - Query = query; - HttpRequestTimeout = httpRequestTimeout; - CopySourceType = copySourceType ?? "SharePointOnlineListSource"; - } - - /// The OData query to filter the data in SharePoint Online list. For example, "$top=1". Type: string (or Expression with resultType string). - public DataFactoryElement Query { get; set; } - /// The wait time to get a response from SharePoint Online. Default value is 5 minutes (00:05:00). Type: string (or Expression with resultType string), pattern: ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). - public DataFactoryElement HttpRequestTimeout { get; set; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/ShopifyLinkedService.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/ShopifyLinkedService.Serialization.cs deleted file mode 100644 index 1905a15b..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/ShopifyLinkedService.Serialization.cs +++ /dev/null @@ -1,239 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class ShopifyLinkedService : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - writer.WritePropertyName("type"u8); - writer.WriteStringValue(LinkedServiceType); - if (Optional.IsDefined(ConnectVia)) - { - writer.WritePropertyName("connectVia"u8); - writer.WriteObjectValue(ConnectVia); - } - if (Optional.IsDefined(Description)) - { - writer.WritePropertyName("description"u8); - writer.WriteStringValue(Description); - } - if (Optional.IsCollectionDefined(Parameters)) - { - writer.WritePropertyName("parameters"u8); - writer.WriteStartObject(); - foreach (var item in Parameters) - { - writer.WritePropertyName(item.Key); - writer.WriteObjectValue(item.Value); - } - writer.WriteEndObject(); - } - if (Optional.IsCollectionDefined(Annotations)) - { - writer.WritePropertyName("annotations"u8); - writer.WriteStartArray(); - foreach (var item in Annotations) - { - if (item == null) - { - writer.WriteNullValue(); - continue; - } -#if NET6_0_OR_GREATER - writer.WriteRawValue(item); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.ToString()).RootElement); -#endif - } - writer.WriteEndArray(); - } - writer.WritePropertyName("typeProperties"u8); - writer.WriteStartObject(); - writer.WritePropertyName("host"u8); - JsonSerializer.Serialize(writer, Host); - if (Optional.IsDefined(AccessToken)) - { - writer.WritePropertyName("accessToken"u8); - JsonSerializer.Serialize(writer, AccessToken); - } - if (Optional.IsDefined(UseEncryptedEndpoints)) - { - writer.WritePropertyName("useEncryptedEndpoints"u8); - JsonSerializer.Serialize(writer, UseEncryptedEndpoints); - } - if (Optional.IsDefined(UseHostVerification)) - { - writer.WritePropertyName("useHostVerification"u8); - JsonSerializer.Serialize(writer, UseHostVerification); - } - if (Optional.IsDefined(UsePeerVerification)) - { - writer.WritePropertyName("usePeerVerification"u8); - JsonSerializer.Serialize(writer, UsePeerVerification); - } - if (Optional.IsDefined(EncryptedCredential)) - { - writer.WritePropertyName("encryptedCredential"u8); - writer.WriteStringValue(EncryptedCredential); - } - writer.WriteEndObject(); - foreach (var item in AdditionalProperties) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.Value.ToString()).RootElement); -#endif - } - writer.WriteEndObject(); - } - - internal static ShopifyLinkedService DeserializeShopifyLinkedService(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - string type = default; - Optional connectVia = default; - Optional description = default; - Optional> parameters = default; - Optional> annotations = default; - DataFactoryElement host = default; - Optional accessToken = default; - Optional> useEncryptedEndpoints = default; - Optional> useHostVerification = default; - Optional> usePeerVerification = default; - Optional encryptedCredential = default; - IDictionary> additionalProperties = default; - Dictionary> additionalPropertiesDictionary = new Dictionary>(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("type"u8)) - { - type = property.Value.GetString(); - continue; - } - if (property.NameEquals("connectVia"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - connectVia = IntegrationRuntimeReference.DeserializeIntegrationRuntimeReference(property.Value); - continue; - } - if (property.NameEquals("description"u8)) - { - description = property.Value.GetString(); - continue; - } - if (property.NameEquals("parameters"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - Dictionary dictionary = new Dictionary(); - foreach (var property0 in property.Value.EnumerateObject()) - { - dictionary.Add(property0.Name, EntityParameterSpecification.DeserializeEntityParameterSpecification(property0.Value)); - } - parameters = dictionary; - continue; - } - if (property.NameEquals("annotations"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - if (item.ValueKind == JsonValueKind.Null) - { - array.Add(null); - } - else - { - array.Add(BinaryData.FromString(item.GetRawText())); - } - } - annotations = array; - continue; - } - if (property.NameEquals("typeProperties"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - foreach (var property0 in property.Value.EnumerateObject()) - { - if (property0.NameEquals("host"u8)) - { - host = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("accessToken"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - accessToken = JsonSerializer.Deserialize(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("useEncryptedEndpoints"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - useEncryptedEndpoints = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("useHostVerification"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - useHostVerification = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("usePeerVerification"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - usePeerVerification = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("encryptedCredential"u8)) - { - encryptedCredential = property0.Value.GetString(); - continue; - } - } - continue; - } - additionalPropertiesDictionary.Add(property.Name, JsonSerializer.Deserialize>(property.Value.GetRawText())); - } - additionalProperties = additionalPropertiesDictionary; - return new ShopifyLinkedService(type, connectVia.Value, description.Value, Optional.ToDictionary(parameters), Optional.ToList(annotations), additionalProperties, host, accessToken, useEncryptedEndpoints.Value, useHostVerification.Value, usePeerVerification.Value, encryptedCredential.Value); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/ShopifyLinkedService.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/ShopifyLinkedService.cs deleted file mode 100644 index 07050e8c..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/ShopifyLinkedService.cs +++ /dev/null @@ -1,61 +0,0 @@ -// - -#nullable disable - -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// Shopify Service linked service. - public partial class ShopifyLinkedService : DataFactoryLinkedServiceProperties - { - /// Initializes a new instance of ShopifyLinkedService. - /// The endpoint of the Shopify server. (i.e. mystore.myshopify.com). - /// is null. - public ShopifyLinkedService(DataFactoryElement host) - { - Argument.AssertNotNull(host, nameof(host)); - - Host = host; - LinkedServiceType = "Shopify"; - } - - /// Initializes a new instance of ShopifyLinkedService. - /// Type of linked service. - /// The integration runtime reference. - /// Linked service description. - /// Parameters for linked service. - /// List of tags that can be used for describing the linked service. - /// Additional Properties. - /// The endpoint of the Shopify server. (i.e. mystore.myshopify.com). - /// The API access token that can be used to access Shopify’s data. The token won't expire if it is offline mode. - /// Specifies whether the data source endpoints are encrypted using HTTPS. The default value is true. - /// 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. - /// Specifies whether to verify the identity of the server when connecting over SSL. The default value is true. - /// The encrypted credential used for authentication. Credentials are encrypted using the integration runtime credential manager. Type: string. - internal ShopifyLinkedService(string linkedServiceType, IntegrationRuntimeReference connectVia, string description, IDictionary parameters, IList annotations, IDictionary> additionalProperties, DataFactoryElement host, DataFactorySecretBaseDefinition accessToken, DataFactoryElement useEncryptedEndpoints, DataFactoryElement useHostVerification, DataFactoryElement usePeerVerification, string encryptedCredential) : base(linkedServiceType, connectVia, description, parameters, annotations, additionalProperties) - { - Host = host; - AccessToken = accessToken; - UseEncryptedEndpoints = useEncryptedEndpoints; - UseHostVerification = useHostVerification; - UsePeerVerification = usePeerVerification; - EncryptedCredential = encryptedCredential; - LinkedServiceType = linkedServiceType ?? "Shopify"; - } - - /// The endpoint of the Shopify server. (i.e. mystore.myshopify.com). - public DataFactoryElement Host { get; set; } - /// The API access token that can be used to access Shopify’s data. The token won't expire if it is offline mode. - public DataFactorySecretBaseDefinition AccessToken { get; set; } - /// Specifies whether the data source endpoints are encrypted using HTTPS. The default value is true. - public DataFactoryElement UseEncryptedEndpoints { get; set; } - /// 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. - public DataFactoryElement UseHostVerification { get; set; } - /// Specifies whether to verify the identity of the server when connecting over SSL. The default value is true. - public DataFactoryElement UsePeerVerification { get; set; } - /// The encrypted credential used for authentication. Credentials are encrypted using the integration runtime credential manager. Type: string. - public string EncryptedCredential { get; set; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/ShopifyObjectDataset.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/ShopifyObjectDataset.Serialization.cs deleted file mode 100644 index d4b23988..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/ShopifyObjectDataset.Serialization.cs +++ /dev/null @@ -1,212 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class ShopifyObjectDataset : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - writer.WritePropertyName("type"u8); - writer.WriteStringValue(DatasetType); - if (Optional.IsDefined(Description)) - { - writer.WritePropertyName("description"u8); - writer.WriteStringValue(Description); - } - if (Optional.IsDefined(Structure)) - { - writer.WritePropertyName("structure"u8); - JsonSerializer.Serialize(writer, Structure); - } - if (Optional.IsDefined(Schema)) - { - writer.WritePropertyName("schema"u8); - JsonSerializer.Serialize(writer, Schema); - } - writer.WritePropertyName("linkedServiceName"u8); - JsonSerializer.Serialize(writer, LinkedServiceName); if (Optional.IsCollectionDefined(Parameters)) - { - writer.WritePropertyName("parameters"u8); - writer.WriteStartObject(); - foreach (var item in Parameters) - { - writer.WritePropertyName(item.Key); - writer.WriteObjectValue(item.Value); - } - writer.WriteEndObject(); - } - if (Optional.IsCollectionDefined(Annotations)) - { - writer.WritePropertyName("annotations"u8); - writer.WriteStartArray(); - foreach (var item in Annotations) - { - if (item == null) - { - writer.WriteNullValue(); - continue; - } -#if NET6_0_OR_GREATER - writer.WriteRawValue(item); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.ToString()).RootElement); -#endif - } - writer.WriteEndArray(); - } - if (Optional.IsDefined(Folder)) - { - writer.WritePropertyName("folder"u8); - writer.WriteObjectValue(Folder); - } - writer.WritePropertyName("typeProperties"u8); - writer.WriteStartObject(); - if (Optional.IsDefined(TableName)) - { - writer.WritePropertyName("tableName"u8); - JsonSerializer.Serialize(writer, TableName); - } - writer.WriteEndObject(); - foreach (var item in AdditionalProperties) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.Value.ToString()).RootElement); -#endif - } - writer.WriteEndObject(); - } - - internal static ShopifyObjectDataset DeserializeShopifyObjectDataset(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - string type = default; - Optional description = default; - Optional>> structure = default; - Optional>> schema = default; - DataFactoryLinkedServiceReference linkedServiceName = default; - Optional> parameters = default; - Optional> annotations = default; - Optional folder = default; - Optional> tableName = default; - IDictionary> additionalProperties = default; - Dictionary> additionalPropertiesDictionary = new Dictionary>(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("type"u8)) - { - type = property.Value.GetString(); - continue; - } - if (property.NameEquals("description"u8)) - { - description = property.Value.GetString(); - continue; - } - if (property.NameEquals("structure"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - structure = JsonSerializer.Deserialize>>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("schema"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - schema = JsonSerializer.Deserialize>>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("linkedServiceName"u8)) - { - linkedServiceName = JsonSerializer.Deserialize(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("parameters"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - Dictionary dictionary = new Dictionary(); - foreach (var property0 in property.Value.EnumerateObject()) - { - dictionary.Add(property0.Name, EntityParameterSpecification.DeserializeEntityParameterSpecification(property0.Value)); - } - parameters = dictionary; - continue; - } - if (property.NameEquals("annotations"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - if (item.ValueKind == JsonValueKind.Null) - { - array.Add(null); - } - else - { - array.Add(BinaryData.FromString(item.GetRawText())); - } - } - annotations = array; - continue; - } - if (property.NameEquals("folder"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - folder = DatasetFolder.DeserializeDatasetFolder(property.Value); - continue; - } - if (property.NameEquals("typeProperties"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - foreach (var property0 in property.Value.EnumerateObject()) - { - if (property0.NameEquals("tableName"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - tableName = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - } - continue; - } - additionalPropertiesDictionary.Add(property.Name, JsonSerializer.Deserialize>(property.Value.GetRawText())); - } - additionalProperties = additionalPropertiesDictionary; - return new ShopifyObjectDataset(type, description.Value, structure.Value, schema.Value, linkedServiceName, Optional.ToDictionary(parameters), Optional.ToList(annotations), folder.Value, additionalProperties, tableName.Value); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/ShopifyObjectDataset.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/ShopifyObjectDataset.cs deleted file mode 100644 index da051456..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/ShopifyObjectDataset.cs +++ /dev/null @@ -1,43 +0,0 @@ -// - -#nullable disable - -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// Shopify Service dataset. - public partial class ShopifyObjectDataset : DataFactoryDatasetProperties - { - /// Initializes a new instance of ShopifyObjectDataset. - /// Linked service reference. - /// is null. - public ShopifyObjectDataset(DataFactoryLinkedServiceReference linkedServiceName) : base(linkedServiceName) - { - Argument.AssertNotNull(linkedServiceName, nameof(linkedServiceName)); - - DatasetType = "ShopifyObject"; - } - - /// Initializes a new instance of ShopifyObjectDataset. - /// Type of dataset. - /// Dataset description. - /// Columns that define the structure of the dataset. Type: array (or Expression with resultType array), itemType: DatasetDataElement. - /// Columns that define the physical type schema of the dataset. Type: array (or Expression with resultType array), itemType: DatasetSchemaDataElement. - /// Linked service reference. - /// Parameters for dataset. - /// List of tags that can be used for describing the Dataset. - /// The folder that this Dataset is in. If not specified, Dataset will appear at the root level. - /// Additional Properties. - /// The table name. Type: string (or Expression with resultType string). - internal ShopifyObjectDataset(string datasetType, string description, DataFactoryElement> structure, DataFactoryElement> schema, DataFactoryLinkedServiceReference linkedServiceName, IDictionary parameters, IList annotations, DatasetFolder folder, IDictionary> additionalProperties, DataFactoryElement tableName) : base(datasetType, description, structure, schema, linkedServiceName, parameters, annotations, folder, additionalProperties) - { - TableName = tableName; - DatasetType = datasetType ?? "ShopifyObject"; - } - - /// The table name. Type: string (or Expression with resultType string). - public DataFactoryElement TableName { get; set; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/ShopifySource.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/ShopifySource.Serialization.cs deleted file mode 100644 index 6cb0f5f2..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/ShopifySource.Serialization.cs +++ /dev/null @@ -1,161 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class ShopifySource : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - if (Optional.IsDefined(Query)) - { - writer.WritePropertyName("query"u8); - JsonSerializer.Serialize(writer, Query); - } - if (Optional.IsDefined(QueryTimeout)) - { - writer.WritePropertyName("queryTimeout"u8); - JsonSerializer.Serialize(writer, QueryTimeout); - } - if (Optional.IsDefined(AdditionalColumns)) - { - writer.WritePropertyName("additionalColumns"u8); -#if NET6_0_OR_GREATER - writer.WriteRawValue(AdditionalColumns); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(AdditionalColumns.ToString()).RootElement); -#endif - } - writer.WritePropertyName("type"u8); - writer.WriteStringValue(CopySourceType); - if (Optional.IsDefined(SourceRetryCount)) - { - writer.WritePropertyName("sourceRetryCount"u8); - JsonSerializer.Serialize(writer, SourceRetryCount); - } - if (Optional.IsDefined(SourceRetryWait)) - { - writer.WritePropertyName("sourceRetryWait"u8); - JsonSerializer.Serialize(writer, SourceRetryWait); - } - if (Optional.IsDefined(MaxConcurrentConnections)) - { - writer.WritePropertyName("maxConcurrentConnections"u8); - JsonSerializer.Serialize(writer, MaxConcurrentConnections); - } - if (Optional.IsDefined(DisableMetricsCollection)) - { - writer.WritePropertyName("disableMetricsCollection"u8); - JsonSerializer.Serialize(writer, DisableMetricsCollection); - } - foreach (var item in AdditionalProperties) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.Value.ToString()).RootElement); -#endif - } - writer.WriteEndObject(); - } - - internal static ShopifySource DeserializeShopifySource(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - Optional> query = default; - Optional> queryTimeout = default; - Optional additionalColumns = default; - string type = default; - Optional> sourceRetryCount = default; - Optional> sourceRetryWait = default; - Optional> maxConcurrentConnections = default; - Optional> disableMetricsCollection = default; - IDictionary> additionalProperties = default; - Dictionary> additionalPropertiesDictionary = new Dictionary>(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("query"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - query = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("queryTimeout"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - queryTimeout = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("additionalColumns"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - additionalColumns = BinaryData.FromString(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("type"u8)) - { - type = property.Value.GetString(); - continue; - } - if (property.NameEquals("sourceRetryCount"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - sourceRetryCount = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("sourceRetryWait"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - sourceRetryWait = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("maxConcurrentConnections"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - maxConcurrentConnections = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("disableMetricsCollection"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - disableMetricsCollection = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - additionalPropertiesDictionary.Add(property.Name, JsonSerializer.Deserialize>(property.Value.GetRawText())); - } - additionalProperties = additionalPropertiesDictionary; - return new ShopifySource(type, sourceRetryCount.Value, sourceRetryWait.Value, maxConcurrentConnections.Value, disableMetricsCollection.Value, additionalProperties, queryTimeout.Value, additionalColumns.Value, query.Value); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/ShopifySource.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/ShopifySource.cs deleted file mode 100644 index af62df1e..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/ShopifySource.cs +++ /dev/null @@ -1,37 +0,0 @@ -// - -#nullable disable - -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// A copy activity Shopify Service source. - public partial class ShopifySource : TabularSource - { - /// Initializes a new instance of ShopifySource. - public ShopifySource() - { - CopySourceType = "ShopifySource"; - } - - /// Initializes a new instance of ShopifySource. - /// Copy source type. - /// Source retry count. Type: integer (or Expression with resultType integer). - /// Source retry wait. Type: string (or Expression with resultType string), pattern: ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). - /// The maximum concurrent connection count for the source data store. Type: integer (or Expression with resultType integer). - /// If true, disable data store metrics collection. Default is false. Type: boolean (or Expression with resultType boolean). - /// Additional Properties. - /// 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). - /// A query to retrieve data from source. Type: string (or Expression with resultType string). - internal ShopifySource(string copySourceType, DataFactoryElement sourceRetryCount, DataFactoryElement sourceRetryWait, DataFactoryElement maxConcurrentConnections, DataFactoryElement disableMetricsCollection, IDictionary> additionalProperties, DataFactoryElement queryTimeout, BinaryData additionalColumns, DataFactoryElement query) : base(copySourceType, sourceRetryCount, sourceRetryWait, maxConcurrentConnections, disableMetricsCollection, additionalProperties, queryTimeout, additionalColumns) - { - Query = query; - CopySourceType = copySourceType ?? "ShopifySource"; - } - - /// A query to retrieve data from source. Type: string (or Expression with resultType string). - public DataFactoryElement Query { get; set; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SkipErrorFile.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SkipErrorFile.Serialization.cs deleted file mode 100644 index 4906fc4d..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SkipErrorFile.Serialization.cs +++ /dev/null @@ -1,61 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class SkipErrorFile : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - if (Optional.IsDefined(FileMissing)) - { - writer.WritePropertyName("fileMissing"u8); - JsonSerializer.Serialize(writer, FileMissing); - } - if (Optional.IsDefined(DataInconsistency)) - { - writer.WritePropertyName("dataInconsistency"u8); - JsonSerializer.Serialize(writer, DataInconsistency); - } - writer.WriteEndObject(); - } - - internal static SkipErrorFile DeserializeSkipErrorFile(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - Optional> fileMissing = default; - Optional> dataInconsistency = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("fileMissing"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - fileMissing = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("dataInconsistency"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - dataInconsistency = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - } - return new SkipErrorFile(fileMissing.Value, dataInconsistency.Value); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SkipErrorFile.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SkipErrorFile.cs deleted file mode 100644 index 49e88580..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SkipErrorFile.cs +++ /dev/null @@ -1,31 +0,0 @@ -// - -#nullable disable - -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// Skip error file. - public partial class SkipErrorFile - { - /// Initializes a new instance of SkipErrorFile. - public SkipErrorFile() - { - } - - /// Initializes a new instance of SkipErrorFile. - /// Skip if file is deleted by other client during copy. Default is true. Type: boolean (or Expression with resultType boolean). - /// Skip if source/sink file changed by other concurrent write. Default is false. Type: boolean (or Expression with resultType boolean). - internal SkipErrorFile(DataFactoryElement fileMissing, DataFactoryElement dataInconsistency) - { - FileMissing = fileMissing; - DataInconsistency = dataInconsistency; - } - - /// Skip if file is deleted by other client during copy. Default is true. Type: boolean (or Expression with resultType boolean). - public DataFactoryElement FileMissing { get; set; } - /// Skip if source/sink file changed by other concurrent write. Default is false. Type: boolean (or Expression with resultType boolean). - public DataFactoryElement DataInconsistency { get; set; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SmartsheetLinkedService.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SmartsheetLinkedService.Serialization.cs deleted file mode 100644 index 4144d4d6..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SmartsheetLinkedService.Serialization.cs +++ /dev/null @@ -1,178 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class SmartsheetLinkedService : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - writer.WritePropertyName("type"u8); - writer.WriteStringValue(LinkedServiceType); - if (Optional.IsDefined(ConnectVia)) - { - writer.WritePropertyName("connectVia"u8); - writer.WriteObjectValue(ConnectVia); - } - if (Optional.IsDefined(Description)) - { - writer.WritePropertyName("description"u8); - writer.WriteStringValue(Description); - } - if (Optional.IsCollectionDefined(Parameters)) - { - writer.WritePropertyName("parameters"u8); - writer.WriteStartObject(); - foreach (var item in Parameters) - { - writer.WritePropertyName(item.Key); - writer.WriteObjectValue(item.Value); - } - writer.WriteEndObject(); - } - if (Optional.IsCollectionDefined(Annotations)) - { - writer.WritePropertyName("annotations"u8); - writer.WriteStartArray(); - foreach (var item in Annotations) - { - if (item == null) - { - writer.WriteNullValue(); - continue; - } -#if NET6_0_OR_GREATER - writer.WriteRawValue(item); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.ToString()).RootElement); -#endif - } - writer.WriteEndArray(); - } - writer.WritePropertyName("typeProperties"u8); - writer.WriteStartObject(); - writer.WritePropertyName("apiToken"u8); - JsonSerializer.Serialize(writer, ApiToken); if (Optional.IsDefined(EncryptedCredential)) - { - writer.WritePropertyName("encryptedCredential"u8); - writer.WriteStringValue(EncryptedCredential); - } - writer.WriteEndObject(); - foreach (var item in AdditionalProperties) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.Value.ToString()).RootElement); -#endif - } - writer.WriteEndObject(); - } - - internal static SmartsheetLinkedService DeserializeSmartsheetLinkedService(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - string type = default; - Optional connectVia = default; - Optional description = default; - Optional> parameters = default; - Optional> annotations = default; - DataFactorySecretBaseDefinition apiToken = default; - Optional encryptedCredential = default; - IDictionary> additionalProperties = default; - Dictionary> additionalPropertiesDictionary = new Dictionary>(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("type"u8)) - { - type = property.Value.GetString(); - continue; - } - if (property.NameEquals("connectVia"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - connectVia = IntegrationRuntimeReference.DeserializeIntegrationRuntimeReference(property.Value); - continue; - } - if (property.NameEquals("description"u8)) - { - description = property.Value.GetString(); - continue; - } - if (property.NameEquals("parameters"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - Dictionary dictionary = new Dictionary(); - foreach (var property0 in property.Value.EnumerateObject()) - { - dictionary.Add(property0.Name, EntityParameterSpecification.DeserializeEntityParameterSpecification(property0.Value)); - } - parameters = dictionary; - continue; - } - if (property.NameEquals("annotations"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - if (item.ValueKind == JsonValueKind.Null) - { - array.Add(null); - } - else - { - array.Add(BinaryData.FromString(item.GetRawText())); - } - } - annotations = array; - continue; - } - if (property.NameEquals("typeProperties"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - foreach (var property0 in property.Value.EnumerateObject()) - { - if (property0.NameEquals("apiToken"u8)) - { - apiToken = JsonSerializer.Deserialize(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("encryptedCredential"u8)) - { - encryptedCredential = property0.Value.GetString(); - continue; - } - } - continue; - } - additionalPropertiesDictionary.Add(property.Name, JsonSerializer.Deserialize>(property.Value.GetRawText())); - } - additionalProperties = additionalPropertiesDictionary; - return new SmartsheetLinkedService(type, connectVia.Value, description.Value, Optional.ToDictionary(parameters), Optional.ToList(annotations), additionalProperties, apiToken, encryptedCredential.Value); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SmartsheetLinkedService.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SmartsheetLinkedService.cs deleted file mode 100644 index 59769240..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SmartsheetLinkedService.cs +++ /dev/null @@ -1,45 +0,0 @@ -// - -#nullable disable - -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// Linked service for Smartsheet. - public partial class SmartsheetLinkedService : DataFactoryLinkedServiceProperties - { - /// Initializes a new instance of SmartsheetLinkedService. - /// The api token for the Smartsheet source. - /// is null. - public SmartsheetLinkedService(DataFactorySecretBaseDefinition apiToken) - { - Argument.AssertNotNull(apiToken, nameof(apiToken)); - - ApiToken = apiToken; - LinkedServiceType = "Smartsheet"; - } - - /// Initializes a new instance of SmartsheetLinkedService. - /// Type of linked service. - /// The integration runtime reference. - /// Linked service description. - /// Parameters for linked service. - /// List of tags that can be used for describing the linked service. - /// Additional Properties. - /// The api token for the Smartsheet source. - /// The encrypted credential used for authentication. Credentials are encrypted using the integration runtime credential manager. Type: string. - internal SmartsheetLinkedService(string linkedServiceType, IntegrationRuntimeReference connectVia, string description, IDictionary parameters, IList annotations, IDictionary> additionalProperties, DataFactorySecretBaseDefinition apiToken, string encryptedCredential) : base(linkedServiceType, connectVia, description, parameters, annotations, additionalProperties) - { - ApiToken = apiToken; - EncryptedCredential = encryptedCredential; - LinkedServiceType = linkedServiceType ?? "Smartsheet"; - } - - /// The api token for the Smartsheet source. - public DataFactorySecretBaseDefinition ApiToken { get; set; } - /// The encrypted credential used for authentication. Credentials are encrypted using the integration runtime credential manager. Type: string. - public string EncryptedCredential { get; set; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SnowflakeDataset.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SnowflakeDataset.Serialization.cs deleted file mode 100644 index ee076ac9..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SnowflakeDataset.Serialization.cs +++ /dev/null @@ -1,227 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class SnowflakeDataset : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - writer.WritePropertyName("type"u8); - writer.WriteStringValue(DatasetType); - if (Optional.IsDefined(Description)) - { - writer.WritePropertyName("description"u8); - writer.WriteStringValue(Description); - } - if (Optional.IsDefined(Structure)) - { - writer.WritePropertyName("structure"u8); - JsonSerializer.Serialize(writer, Structure); - } - if (Optional.IsDefined(Schema)) - { - writer.WritePropertyName("schema"u8); - JsonSerializer.Serialize(writer, Schema); - } - writer.WritePropertyName("linkedServiceName"u8); - JsonSerializer.Serialize(writer, LinkedServiceName); if (Optional.IsCollectionDefined(Parameters)) - { - writer.WritePropertyName("parameters"u8); - writer.WriteStartObject(); - foreach (var item in Parameters) - { - writer.WritePropertyName(item.Key); - writer.WriteObjectValue(item.Value); - } - writer.WriteEndObject(); - } - if (Optional.IsCollectionDefined(Annotations)) - { - writer.WritePropertyName("annotations"u8); - writer.WriteStartArray(); - foreach (var item in Annotations) - { - if (item == null) - { - writer.WriteNullValue(); - continue; - } -#if NET6_0_OR_GREATER - writer.WriteRawValue(item); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.ToString()).RootElement); -#endif - } - writer.WriteEndArray(); - } - if (Optional.IsDefined(Folder)) - { - writer.WritePropertyName("folder"u8); - writer.WriteObjectValue(Folder); - } - writer.WritePropertyName("typeProperties"u8); - writer.WriteStartObject(); - if (Optional.IsDefined(SchemaTypePropertiesSchema)) - { - writer.WritePropertyName("schema"u8); - JsonSerializer.Serialize(writer, SchemaTypePropertiesSchema); - } - if (Optional.IsDefined(Table)) - { - writer.WritePropertyName("table"u8); - JsonSerializer.Serialize(writer, Table); - } - writer.WriteEndObject(); - foreach (var item in AdditionalProperties) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.Value.ToString()).RootElement); -#endif - } - writer.WriteEndObject(); - } - - internal static SnowflakeDataset DeserializeSnowflakeDataset(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - string type = default; - Optional description = default; - Optional>> structure = default; - Optional>> schema = default; - DataFactoryLinkedServiceReference linkedServiceName = default; - Optional> parameters = default; - Optional> annotations = default; - Optional folder = default; - Optional> schema0 = default; - Optional> table = default; - IDictionary> additionalProperties = default; - Dictionary> additionalPropertiesDictionary = new Dictionary>(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("type"u8)) - { - type = property.Value.GetString(); - continue; - } - if (property.NameEquals("description"u8)) - { - description = property.Value.GetString(); - continue; - } - if (property.NameEquals("structure"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - structure = JsonSerializer.Deserialize>>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("schema"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - schema = JsonSerializer.Deserialize>>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("linkedServiceName"u8)) - { - linkedServiceName = JsonSerializer.Deserialize(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("parameters"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - Dictionary dictionary = new Dictionary(); - foreach (var property0 in property.Value.EnumerateObject()) - { - dictionary.Add(property0.Name, EntityParameterSpecification.DeserializeEntityParameterSpecification(property0.Value)); - } - parameters = dictionary; - continue; - } - if (property.NameEquals("annotations"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - if (item.ValueKind == JsonValueKind.Null) - { - array.Add(null); - } - else - { - array.Add(BinaryData.FromString(item.GetRawText())); - } - } - annotations = array; - continue; - } - if (property.NameEquals("folder"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - folder = DatasetFolder.DeserializeDatasetFolder(property.Value); - continue; - } - if (property.NameEquals("typeProperties"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - foreach (var property0 in property.Value.EnumerateObject()) - { - if (property0.NameEquals("schema"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - schema0 = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("table"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - table = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - } - continue; - } - additionalPropertiesDictionary.Add(property.Name, JsonSerializer.Deserialize>(property.Value.GetRawText())); - } - additionalProperties = additionalPropertiesDictionary; - return new SnowflakeDataset(type, description.Value, structure.Value, schema.Value, linkedServiceName, Optional.ToDictionary(parameters), Optional.ToList(annotations), folder.Value, additionalProperties, schema0.Value, table.Value); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SnowflakeDataset.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SnowflakeDataset.cs deleted file mode 100644 index b5b186da..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SnowflakeDataset.cs +++ /dev/null @@ -1,47 +0,0 @@ -// - -#nullable disable - -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// The snowflake dataset. - public partial class SnowflakeDataset : DataFactoryDatasetProperties - { - /// Initializes a new instance of SnowflakeDataset. - /// Linked service reference. - /// is null. - public SnowflakeDataset(DataFactoryLinkedServiceReference linkedServiceName) : base(linkedServiceName) - { - Argument.AssertNotNull(linkedServiceName, nameof(linkedServiceName)); - - DatasetType = "SnowflakeTable"; - } - - /// Initializes a new instance of SnowflakeDataset. - /// Type of dataset. - /// Dataset description. - /// Columns that define the structure of the dataset. Type: array (or Expression with resultType array), itemType: DatasetDataElement. - /// Columns that define the physical type schema of the dataset. Type: array (or Expression with resultType array), itemType: DatasetSchemaDataElement. - /// Linked service reference. - /// Parameters for dataset. - /// List of tags that can be used for describing the Dataset. - /// The folder that this Dataset is in. If not specified, Dataset will appear at the root level. - /// Additional Properties. - /// The schema name of the Snowflake database. Type: string (or Expression with resultType string). - /// The table name of the Snowflake database. Type: string (or Expression with resultType string). - internal SnowflakeDataset(string datasetType, string description, DataFactoryElement> structure, DataFactoryElement> schema, DataFactoryLinkedServiceReference linkedServiceName, IDictionary parameters, IList annotations, DatasetFolder folder, IDictionary> additionalProperties, DataFactoryElement schemaTypePropertiesSchema, DataFactoryElement table) : base(datasetType, description, structure, schema, linkedServiceName, parameters, annotations, folder, additionalProperties) - { - SchemaTypePropertiesSchema = schemaTypePropertiesSchema; - Table = table; - DatasetType = datasetType ?? "SnowflakeTable"; - } - - /// The schema name of the Snowflake database. Type: string (or Expression with resultType string). - public DataFactoryElement SchemaTypePropertiesSchema { get; set; } - /// The table name of the Snowflake database. Type: string (or Expression with resultType string). - public DataFactoryElement Table { get; set; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SnowflakeExportCopyCommand.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SnowflakeExportCopyCommand.Serialization.cs deleted file mode 100644 index ea7f2f66..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SnowflakeExportCopyCommand.Serialization.cs +++ /dev/null @@ -1,136 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class SnowflakeExportCopyCommand : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - if (Optional.IsCollectionDefined(AdditionalCopyOptions)) - { - writer.WritePropertyName("additionalCopyOptions"u8); - writer.WriteStartObject(); - foreach (var item in AdditionalCopyOptions) - { - writer.WritePropertyName(item.Key); - if (item.Value == null) - { - writer.WriteNullValue(); - continue; - } -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.Value.ToString()).RootElement); -#endif - } - writer.WriteEndObject(); - } - if (Optional.IsCollectionDefined(AdditionalFormatOptions)) - { - writer.WritePropertyName("additionalFormatOptions"u8); - writer.WriteStartObject(); - foreach (var item in AdditionalFormatOptions) - { - writer.WritePropertyName(item.Key); - if (item.Value == null) - { - writer.WriteNullValue(); - continue; - } -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.Value.ToString()).RootElement); -#endif - } - writer.WriteEndObject(); - } - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ExportSettingsType); - foreach (var item in AdditionalProperties) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.Value.ToString()).RootElement); -#endif - } - writer.WriteEndObject(); - } - - internal static SnowflakeExportCopyCommand DeserializeSnowflakeExportCopyCommand(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - Optional>> additionalCopyOptions = default; - Optional>> additionalFormatOptions = default; - string type = default; - IDictionary> additionalProperties = default; - Dictionary> additionalPropertiesDictionary = new Dictionary>(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("additionalCopyOptions"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - Dictionary> dictionary = new Dictionary>(); - foreach (var property0 in property.Value.EnumerateObject()) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - dictionary.Add(property0.Name, null); - } - else - { - dictionary.Add(property0.Name, JsonSerializer.Deserialize>(property0.Value.GetRawText())); - } - } - additionalCopyOptions = dictionary; - continue; - } - if (property.NameEquals("additionalFormatOptions"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - Dictionary> dictionary = new Dictionary>(); - foreach (var property0 in property.Value.EnumerateObject()) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - dictionary.Add(property0.Name, null); - } - else - { - dictionary.Add(property0.Name, JsonSerializer.Deserialize>(property0.Value.GetRawText())); - } - } - additionalFormatOptions = dictionary; - continue; - } - if (property.NameEquals("type"u8)) - { - type = property.Value.GetString(); - continue; - } - additionalPropertiesDictionary.Add(property.Name, JsonSerializer.Deserialize>(property.Value.GetRawText())); - } - additionalProperties = additionalPropertiesDictionary; - return new SnowflakeExportCopyCommand(type, additionalProperties, Optional.ToDictionary(additionalCopyOptions), Optional.ToDictionary(additionalFormatOptions)); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SnowflakeExportCopyCommand.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SnowflakeExportCopyCommand.cs deleted file mode 100644 index 7daf7238..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SnowflakeExportCopyCommand.cs +++ /dev/null @@ -1,96 +0,0 @@ -// - -#nullable disable - -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// Snowflake export command settings. - public partial class SnowflakeExportCopyCommand : ExportSettings - { - /// Initializes a new instance of SnowflakeExportCopyCommand. - public SnowflakeExportCopyCommand() - { - AdditionalCopyOptions = new ChangeTrackingDictionary>(); - AdditionalFormatOptions = new ChangeTrackingDictionary>(); - ExportSettingsType = "SnowflakeExportCopyCommand"; - } - - /// Initializes a new instance of SnowflakeExportCopyCommand. - /// The export setting type. - /// Additional Properties. - /// Additional copy options directly passed to snowflake Copy Command. Type: key value pairs (value should be string type) (or Expression with resultType object). Example: "additionalCopyOptions": { "DATE_FORMAT": "MM/DD/YYYY", "TIME_FORMAT": "'HH24:MI:SS.FF'" }. - /// Additional format options directly passed to snowflake Copy Command. Type: key value pairs (value should be string type) (or Expression with resultType object). Example: "additionalFormatOptions": { "OVERWRITE": "TRUE", "MAX_FILE_SIZE": "'FALSE'" }. - internal SnowflakeExportCopyCommand(string exportSettingsType, IDictionary> additionalProperties, IDictionary> additionalCopyOptions, IDictionary> additionalFormatOptions) : base(exportSettingsType, additionalProperties) - { - AdditionalCopyOptions = additionalCopyOptions; - AdditionalFormatOptions = additionalFormatOptions; - ExportSettingsType = exportSettingsType ?? "SnowflakeExportCopyCommand"; - } - - /// - /// Additional copy options directly passed to snowflake Copy Command. Type: key value pairs (value should be string type) (or Expression with resultType object). Example: "additionalCopyOptions": { "DATE_FORMAT": "MM/DD/YYYY", "TIME_FORMAT": "'HH24:MI:SS.FF'" } - /// - /// To assign an object to the value of this property use . - /// - /// - /// To assign an already formated json string to this property use . - /// - /// - /// Examples: - /// - /// - /// BinaryData.FromObjectAsJson("foo") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromString("\"foo\"") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromObjectAsJson(new { key = "value" }) - /// Creates a payload of { "key": "value" }. - /// - /// - /// BinaryData.FromString("{\"key\": \"value\"}") - /// Creates a payload of { "key": "value" }. - /// - /// - /// - /// - public IDictionary> AdditionalCopyOptions { get; } - /// - /// Additional format options directly passed to snowflake Copy Command. Type: key value pairs (value should be string type) (or Expression with resultType object). Example: "additionalFormatOptions": { "OVERWRITE": "TRUE", "MAX_FILE_SIZE": "'FALSE'" } - /// - /// To assign an object to the value of this property use . - /// - /// - /// To assign an already formated json string to this property use . - /// - /// - /// Examples: - /// - /// - /// BinaryData.FromObjectAsJson("foo") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromString("\"foo\"") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromObjectAsJson(new { key = "value" }) - /// Creates a payload of { "key": "value" }. - /// - /// - /// BinaryData.FromString("{\"key\": \"value\"}") - /// Creates a payload of { "key": "value" }. - /// - /// - /// - /// - public IDictionary> AdditionalFormatOptions { get; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SnowflakeImportCopyCommand.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SnowflakeImportCopyCommand.Serialization.cs deleted file mode 100644 index ce28ce2c..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SnowflakeImportCopyCommand.Serialization.cs +++ /dev/null @@ -1,136 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class SnowflakeImportCopyCommand : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - if (Optional.IsCollectionDefined(AdditionalCopyOptions)) - { - writer.WritePropertyName("additionalCopyOptions"u8); - writer.WriteStartObject(); - foreach (var item in AdditionalCopyOptions) - { - writer.WritePropertyName(item.Key); - if (item.Value == null) - { - writer.WriteNullValue(); - continue; - } -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.Value.ToString()).RootElement); -#endif - } - writer.WriteEndObject(); - } - if (Optional.IsCollectionDefined(AdditionalFormatOptions)) - { - writer.WritePropertyName("additionalFormatOptions"u8); - writer.WriteStartObject(); - foreach (var item in AdditionalFormatOptions) - { - writer.WritePropertyName(item.Key); - if (item.Value == null) - { - writer.WriteNullValue(); - continue; - } -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.Value.ToString()).RootElement); -#endif - } - writer.WriteEndObject(); - } - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ImportSettingsType); - foreach (var item in AdditionalProperties) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.Value.ToString()).RootElement); -#endif - } - writer.WriteEndObject(); - } - - internal static SnowflakeImportCopyCommand DeserializeSnowflakeImportCopyCommand(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - Optional>> additionalCopyOptions = default; - Optional>> additionalFormatOptions = default; - string type = default; - IDictionary> additionalProperties = default; - Dictionary> additionalPropertiesDictionary = new Dictionary>(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("additionalCopyOptions"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - Dictionary> dictionary = new Dictionary>(); - foreach (var property0 in property.Value.EnumerateObject()) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - dictionary.Add(property0.Name, null); - } - else - { - dictionary.Add(property0.Name, JsonSerializer.Deserialize>(property0.Value.GetRawText())); - } - } - additionalCopyOptions = dictionary; - continue; - } - if (property.NameEquals("additionalFormatOptions"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - Dictionary> dictionary = new Dictionary>(); - foreach (var property0 in property.Value.EnumerateObject()) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - dictionary.Add(property0.Name, null); - } - else - { - dictionary.Add(property0.Name, JsonSerializer.Deserialize>(property0.Value.GetRawText())); - } - } - additionalFormatOptions = dictionary; - continue; - } - if (property.NameEquals("type"u8)) - { - type = property.Value.GetString(); - continue; - } - additionalPropertiesDictionary.Add(property.Name, JsonSerializer.Deserialize>(property.Value.GetRawText())); - } - additionalProperties = additionalPropertiesDictionary; - return new SnowflakeImportCopyCommand(type, additionalProperties, Optional.ToDictionary(additionalCopyOptions), Optional.ToDictionary(additionalFormatOptions)); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SnowflakeImportCopyCommand.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SnowflakeImportCopyCommand.cs deleted file mode 100644 index 56a6e790..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SnowflakeImportCopyCommand.cs +++ /dev/null @@ -1,96 +0,0 @@ -// - -#nullable disable - -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// Snowflake import command settings. - public partial class SnowflakeImportCopyCommand : ImportSettings - { - /// Initializes a new instance of SnowflakeImportCopyCommand. - public SnowflakeImportCopyCommand() - { - AdditionalCopyOptions = new ChangeTrackingDictionary>(); - AdditionalFormatOptions = new ChangeTrackingDictionary>(); - ImportSettingsType = "SnowflakeImportCopyCommand"; - } - - /// Initializes a new instance of SnowflakeImportCopyCommand. - /// The import setting type. - /// Additional Properties. - /// Additional copy options directly passed to snowflake Copy Command. Type: key value pairs (value should be string type) (or Expression with resultType object). Example: "additionalCopyOptions": { "DATE_FORMAT": "MM/DD/YYYY", "TIME_FORMAT": "'HH24:MI:SS.FF'" }. - /// Additional format options directly passed to snowflake Copy Command. Type: key value pairs (value should be string type) (or Expression with resultType object). Example: "additionalFormatOptions": { "FORCE": "TRUE", "LOAD_UNCERTAIN_FILES": "'FALSE'" }. - internal SnowflakeImportCopyCommand(string importSettingsType, IDictionary> additionalProperties, IDictionary> additionalCopyOptions, IDictionary> additionalFormatOptions) : base(importSettingsType, additionalProperties) - { - AdditionalCopyOptions = additionalCopyOptions; - AdditionalFormatOptions = additionalFormatOptions; - ImportSettingsType = importSettingsType ?? "SnowflakeImportCopyCommand"; - } - - /// - /// Additional copy options directly passed to snowflake Copy Command. Type: key value pairs (value should be string type) (or Expression with resultType object). Example: "additionalCopyOptions": { "DATE_FORMAT": "MM/DD/YYYY", "TIME_FORMAT": "'HH24:MI:SS.FF'" } - /// - /// To assign an object to the value of this property use . - /// - /// - /// To assign an already formated json string to this property use . - /// - /// - /// Examples: - /// - /// - /// BinaryData.FromObjectAsJson("foo") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromString("\"foo\"") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromObjectAsJson(new { key = "value" }) - /// Creates a payload of { "key": "value" }. - /// - /// - /// BinaryData.FromString("{\"key\": \"value\"}") - /// Creates a payload of { "key": "value" }. - /// - /// - /// - /// - public IDictionary> AdditionalCopyOptions { get; } - /// - /// Additional format options directly passed to snowflake Copy Command. Type: key value pairs (value should be string type) (or Expression with resultType object). Example: "additionalFormatOptions": { "FORCE": "TRUE", "LOAD_UNCERTAIN_FILES": "'FALSE'" } - /// - /// To assign an object to the value of this property use . - /// - /// - /// To assign an already formated json string to this property use . - /// - /// - /// Examples: - /// - /// - /// BinaryData.FromObjectAsJson("foo") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromString("\"foo\"") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromObjectAsJson(new { key = "value" }) - /// Creates a payload of { "key": "value" }. - /// - /// - /// BinaryData.FromString("{\"key\": \"value\"}") - /// Creates a payload of { "key": "value" }. - /// - /// - /// - /// - public IDictionary> AdditionalFormatOptions { get; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SnowflakeLinkedService.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SnowflakeLinkedService.Serialization.cs deleted file mode 100644 index 5b5298f1..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SnowflakeLinkedService.Serialization.cs +++ /dev/null @@ -1,198 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class SnowflakeLinkedService : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - writer.WritePropertyName("type"u8); - writer.WriteStringValue(LinkedServiceType); - if (Optional.IsDefined(ConnectVia)) - { - writer.WritePropertyName("connectVia"u8); - writer.WriteObjectValue(ConnectVia); - } - if (Optional.IsDefined(Description)) - { - writer.WritePropertyName("description"u8); - writer.WriteStringValue(Description); - } - if (Optional.IsCollectionDefined(Parameters)) - { - writer.WritePropertyName("parameters"u8); - writer.WriteStartObject(); - foreach (var item in Parameters) - { - writer.WritePropertyName(item.Key); - writer.WriteObjectValue(item.Value); - } - writer.WriteEndObject(); - } - if (Optional.IsCollectionDefined(Annotations)) - { - writer.WritePropertyName("annotations"u8); - writer.WriteStartArray(); - foreach (var item in Annotations) - { - if (item == null) - { - writer.WriteNullValue(); - continue; - } -#if NET6_0_OR_GREATER - writer.WriteRawValue(item); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.ToString()).RootElement); -#endif - } - writer.WriteEndArray(); - } - writer.WritePropertyName("typeProperties"u8); - writer.WriteStartObject(); - writer.WritePropertyName("connectionString"u8); -#if NET6_0_OR_GREATER - writer.WriteRawValue(ConnectionString); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(ConnectionString.ToString()).RootElement); -#endif - if (Optional.IsDefined(Password)) - { - writer.WritePropertyName("password"u8); - JsonSerializer.Serialize(writer, Password); - } - if (Optional.IsDefined(EncryptedCredential)) - { - writer.WritePropertyName("encryptedCredential"u8); - writer.WriteStringValue(EncryptedCredential); - } - writer.WriteEndObject(); - foreach (var item in AdditionalProperties) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.Value.ToString()).RootElement); -#endif - } - writer.WriteEndObject(); - } - - internal static SnowflakeLinkedService DeserializeSnowflakeLinkedService(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - string type = default; - Optional connectVia = default; - Optional description = default; - Optional> parameters = default; - Optional> annotations = default; - BinaryData connectionString = default; - Optional password = default; - Optional encryptedCredential = default; - IDictionary> additionalProperties = default; - Dictionary> additionalPropertiesDictionary = new Dictionary>(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("type"u8)) - { - type = property.Value.GetString(); - continue; - } - if (property.NameEquals("connectVia"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - connectVia = IntegrationRuntimeReference.DeserializeIntegrationRuntimeReference(property.Value); - continue; - } - if (property.NameEquals("description"u8)) - { - description = property.Value.GetString(); - continue; - } - if (property.NameEquals("parameters"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - Dictionary dictionary = new Dictionary(); - foreach (var property0 in property.Value.EnumerateObject()) - { - dictionary.Add(property0.Name, EntityParameterSpecification.DeserializeEntityParameterSpecification(property0.Value)); - } - parameters = dictionary; - continue; - } - if (property.NameEquals("annotations"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - if (item.ValueKind == JsonValueKind.Null) - { - array.Add(null); - } - else - { - array.Add(BinaryData.FromString(item.GetRawText())); - } - } - annotations = array; - continue; - } - if (property.NameEquals("typeProperties"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - foreach (var property0 in property.Value.EnumerateObject()) - { - if (property0.NameEquals("connectionString"u8)) - { - connectionString = BinaryData.FromString(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("password"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - password = JsonSerializer.Deserialize(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("encryptedCredential"u8)) - { - encryptedCredential = property0.Value.GetString(); - continue; - } - } - continue; - } - additionalPropertiesDictionary.Add(property.Name, JsonSerializer.Deserialize>(property.Value.GetRawText())); - } - additionalProperties = additionalPropertiesDictionary; - return new SnowflakeLinkedService(type, connectVia.Value, description.Value, Optional.ToDictionary(parameters), Optional.ToList(annotations), additionalProperties, connectionString, password, encryptedCredential.Value); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SnowflakeLinkedService.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SnowflakeLinkedService.cs deleted file mode 100644 index 38a6c39a..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SnowflakeLinkedService.cs +++ /dev/null @@ -1,78 +0,0 @@ -// - -#nullable disable - -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// Snowflake linked service. - public partial class SnowflakeLinkedService : DataFactoryLinkedServiceProperties - { - /// Initializes a new instance of SnowflakeLinkedService. - /// The connection string of snowflake. Type: string, SecureString. - /// is null. - public SnowflakeLinkedService(BinaryData connectionString) - { - Argument.AssertNotNull(connectionString, nameof(connectionString)); - - ConnectionString = connectionString; - LinkedServiceType = "Snowflake"; - } - - /// Initializes a new instance of SnowflakeLinkedService. - /// Type of linked service. - /// The integration runtime reference. - /// Linked service description. - /// Parameters for linked service. - /// List of tags that can be used for describing the linked service. - /// Additional Properties. - /// The connection string of snowflake. Type: string, SecureString. - /// The Azure key vault secret reference of password in connection string. - /// The encrypted credential used for authentication. Credentials are encrypted using the integration runtime credential manager. Type: string. - internal SnowflakeLinkedService(string linkedServiceType, IntegrationRuntimeReference connectVia, string description, IDictionary parameters, IList annotations, IDictionary> additionalProperties, BinaryData connectionString, DataFactoryKeyVaultSecretReference password, string encryptedCredential) : base(linkedServiceType, connectVia, description, parameters, annotations, additionalProperties) - { - ConnectionString = connectionString; - Password = password; - EncryptedCredential = encryptedCredential; - LinkedServiceType = linkedServiceType ?? "Snowflake"; - } - - /// - /// The connection string of snowflake. Type: string, SecureString. - /// - /// To assign an object to this property use . - /// - /// - /// To assign an already formated json string to this property use . - /// - /// - /// Examples: - /// - /// - /// BinaryData.FromObjectAsJson("foo") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromString("\"foo\"") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromObjectAsJson(new { key = "value" }) - /// Creates a payload of { "key": "value" }. - /// - /// - /// BinaryData.FromString("{\"key\": \"value\"}") - /// Creates a payload of { "key": "value" }. - /// - /// - /// - /// - public BinaryData ConnectionString { get; set; } - /// The Azure key vault secret reference of password in connection string. - public DataFactoryKeyVaultSecretReference Password { get; set; } - /// The encrypted credential used for authentication. Credentials are encrypted using the integration runtime credential manager. Type: string. - public string EncryptedCredential { get; set; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SnowflakeSink.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SnowflakeSink.Serialization.cs deleted file mode 100644 index d406e477..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SnowflakeSink.Serialization.cs +++ /dev/null @@ -1,172 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class SnowflakeSink : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - if (Optional.IsDefined(PreCopyScript)) - { - writer.WritePropertyName("preCopyScript"u8); - JsonSerializer.Serialize(writer, PreCopyScript); - } - if (Optional.IsDefined(ImportSettings)) - { - writer.WritePropertyName("importSettings"u8); - writer.WriteObjectValue(ImportSettings); - } - writer.WritePropertyName("type"u8); - writer.WriteStringValue(CopySinkType); - if (Optional.IsDefined(WriteBatchSize)) - { - writer.WritePropertyName("writeBatchSize"u8); - JsonSerializer.Serialize(writer, WriteBatchSize); - } - if (Optional.IsDefined(WriteBatchTimeout)) - { - writer.WritePropertyName("writeBatchTimeout"u8); - JsonSerializer.Serialize(writer, WriteBatchTimeout); - } - if (Optional.IsDefined(SinkRetryCount)) - { - writer.WritePropertyName("sinkRetryCount"u8); - JsonSerializer.Serialize(writer, SinkRetryCount); - } - if (Optional.IsDefined(SinkRetryWait)) - { - writer.WritePropertyName("sinkRetryWait"u8); - JsonSerializer.Serialize(writer, SinkRetryWait); - } - if (Optional.IsDefined(MaxConcurrentConnections)) - { - writer.WritePropertyName("maxConcurrentConnections"u8); - JsonSerializer.Serialize(writer, MaxConcurrentConnections); - } - if (Optional.IsDefined(DisableMetricsCollection)) - { - writer.WritePropertyName("disableMetricsCollection"u8); - JsonSerializer.Serialize(writer, DisableMetricsCollection); - } - foreach (var item in AdditionalProperties) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.Value.ToString()).RootElement); -#endif - } - writer.WriteEndObject(); - } - - internal static SnowflakeSink DeserializeSnowflakeSink(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - Optional> preCopyScript = default; - Optional importSettings = default; - string type = default; - Optional> writeBatchSize = default; - Optional> writeBatchTimeout = default; - Optional> sinkRetryCount = default; - Optional> sinkRetryWait = default; - Optional> maxConcurrentConnections = default; - Optional> disableMetricsCollection = default; - IDictionary> additionalProperties = default; - Dictionary> additionalPropertiesDictionary = new Dictionary>(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("preCopyScript"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - preCopyScript = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("importSettings"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - importSettings = SnowflakeImportCopyCommand.DeserializeSnowflakeImportCopyCommand(property.Value); - continue; - } - if (property.NameEquals("type"u8)) - { - type = property.Value.GetString(); - continue; - } - if (property.NameEquals("writeBatchSize"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - writeBatchSize = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("writeBatchTimeout"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - writeBatchTimeout = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("sinkRetryCount"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - sinkRetryCount = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("sinkRetryWait"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - sinkRetryWait = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("maxConcurrentConnections"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - maxConcurrentConnections = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("disableMetricsCollection"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - disableMetricsCollection = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - additionalPropertiesDictionary.Add(property.Name, JsonSerializer.Deserialize>(property.Value.GetRawText())); - } - additionalProperties = additionalPropertiesDictionary; - return new SnowflakeSink(type, writeBatchSize.Value, writeBatchTimeout.Value, sinkRetryCount.Value, sinkRetryWait.Value, maxConcurrentConnections.Value, disableMetricsCollection.Value, additionalProperties, preCopyScript.Value, importSettings.Value); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SnowflakeSink.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SnowflakeSink.cs deleted file mode 100644 index 8f595521..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SnowflakeSink.cs +++ /dev/null @@ -1,41 +0,0 @@ -// - -#nullable disable - -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// A copy activity snowflake sink. - public partial class SnowflakeSink : CopySink - { - /// Initializes a new instance of SnowflakeSink. - public SnowflakeSink() - { - CopySinkType = "SnowflakeSink"; - } - - /// Initializes a new instance of SnowflakeSink. - /// Copy sink type. - /// Write batch size. Type: integer (or Expression with resultType integer), minimum: 0. - /// Write batch timeout. Type: string (or Expression with resultType string), pattern: ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). - /// Sink retry count. Type: integer (or Expression with resultType integer). - /// Sink retry wait. Type: string (or Expression with resultType string), pattern: ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). - /// The maximum concurrent connection count for the sink data store. Type: integer (or Expression with resultType integer). - /// If true, disable data store metrics collection. Default is false. Type: boolean (or Expression with resultType boolean). - /// Additional Properties. - /// SQL pre-copy script. Type: string (or Expression with resultType string). - /// Snowflake import settings. - internal SnowflakeSink(string copySinkType, DataFactoryElement writeBatchSize, DataFactoryElement writeBatchTimeout, DataFactoryElement sinkRetryCount, DataFactoryElement sinkRetryWait, DataFactoryElement maxConcurrentConnections, DataFactoryElement disableMetricsCollection, IDictionary> additionalProperties, DataFactoryElement preCopyScript, SnowflakeImportCopyCommand importSettings) : base(copySinkType, writeBatchSize, writeBatchTimeout, sinkRetryCount, sinkRetryWait, maxConcurrentConnections, disableMetricsCollection, additionalProperties) - { - PreCopyScript = preCopyScript; - ImportSettings = importSettings; - CopySinkType = copySinkType ?? "SnowflakeSink"; - } - - /// SQL pre-copy script. Type: string (or Expression with resultType string). - public DataFactoryElement PreCopyScript { get; set; } - /// Snowflake import settings. - public SnowflakeImportCopyCommand ImportSettings { get; set; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SnowflakeSource.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SnowflakeSource.Serialization.cs deleted file mode 100644 index ef109c3b..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SnowflakeSource.Serialization.cs +++ /dev/null @@ -1,135 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class SnowflakeSource : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - if (Optional.IsDefined(Query)) - { - writer.WritePropertyName("query"u8); - JsonSerializer.Serialize(writer, Query); - } - writer.WritePropertyName("exportSettings"u8); - writer.WriteObjectValue(ExportSettings); - writer.WritePropertyName("type"u8); - writer.WriteStringValue(CopySourceType); - if (Optional.IsDefined(SourceRetryCount)) - { - writer.WritePropertyName("sourceRetryCount"u8); - JsonSerializer.Serialize(writer, SourceRetryCount); - } - if (Optional.IsDefined(SourceRetryWait)) - { - writer.WritePropertyName("sourceRetryWait"u8); - JsonSerializer.Serialize(writer, SourceRetryWait); - } - if (Optional.IsDefined(MaxConcurrentConnections)) - { - writer.WritePropertyName("maxConcurrentConnections"u8); - JsonSerializer.Serialize(writer, MaxConcurrentConnections); - } - if (Optional.IsDefined(DisableMetricsCollection)) - { - writer.WritePropertyName("disableMetricsCollection"u8); - JsonSerializer.Serialize(writer, DisableMetricsCollection); - } - foreach (var item in AdditionalProperties) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.Value.ToString()).RootElement); -#endif - } - writer.WriteEndObject(); - } - - internal static SnowflakeSource DeserializeSnowflakeSource(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - Optional> query = default; - SnowflakeExportCopyCommand exportSettings = default; - string type = default; - Optional> sourceRetryCount = default; - Optional> sourceRetryWait = default; - Optional> maxConcurrentConnections = default; - Optional> disableMetricsCollection = default; - IDictionary> additionalProperties = default; - Dictionary> additionalPropertiesDictionary = new Dictionary>(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("query"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - query = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("exportSettings"u8)) - { - exportSettings = SnowflakeExportCopyCommand.DeserializeSnowflakeExportCopyCommand(property.Value); - continue; - } - if (property.NameEquals("type"u8)) - { - type = property.Value.GetString(); - continue; - } - if (property.NameEquals("sourceRetryCount"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - sourceRetryCount = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("sourceRetryWait"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - sourceRetryWait = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("maxConcurrentConnections"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - maxConcurrentConnections = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("disableMetricsCollection"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - disableMetricsCollection = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - additionalPropertiesDictionary.Add(property.Name, JsonSerializer.Deserialize>(property.Value.GetRawText())); - } - additionalProperties = additionalPropertiesDictionary; - return new SnowflakeSource(type, sourceRetryCount.Value, sourceRetryWait.Value, maxConcurrentConnections.Value, disableMetricsCollection.Value, additionalProperties, query.Value, exportSettings); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SnowflakeSource.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SnowflakeSource.cs deleted file mode 100644 index 8fe2862b..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SnowflakeSource.cs +++ /dev/null @@ -1,45 +0,0 @@ -// - -#nullable disable - -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// A copy activity snowflake source. - public partial class SnowflakeSource : CopyActivitySource - { - /// Initializes a new instance of SnowflakeSource. - /// Snowflake export settings. - /// is null. - public SnowflakeSource(SnowflakeExportCopyCommand exportSettings) - { - Argument.AssertNotNull(exportSettings, nameof(exportSettings)); - - ExportSettings = exportSettings; - CopySourceType = "SnowflakeSource"; - } - - /// Initializes a new instance of SnowflakeSource. - /// Copy source type. - /// Source retry count. Type: integer (or Expression with resultType integer). - /// Source retry wait. Type: string (or Expression with resultType string), pattern: ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). - /// The maximum concurrent connection count for the source data store. Type: integer (or Expression with resultType integer). - /// If true, disable data store metrics collection. Default is false. Type: boolean (or Expression with resultType boolean). - /// Additional Properties. - /// Snowflake Sql query. Type: string (or Expression with resultType string). - /// Snowflake export settings. - internal SnowflakeSource(string copySourceType, DataFactoryElement sourceRetryCount, DataFactoryElement sourceRetryWait, DataFactoryElement maxConcurrentConnections, DataFactoryElement disableMetricsCollection, IDictionary> additionalProperties, DataFactoryElement query, SnowflakeExportCopyCommand exportSettings) : base(copySourceType, sourceRetryCount, sourceRetryWait, maxConcurrentConnections, disableMetricsCollection, additionalProperties) - { - Query = query; - ExportSettings = exportSettings; - CopySourceType = copySourceType ?? "SnowflakeSource"; - } - - /// Snowflake Sql query. Type: string (or Expression with resultType string). - public DataFactoryElement Query { get; set; } - /// Snowflake export settings. - public SnowflakeExportCopyCommand ExportSettings { get; set; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SparkAuthenticationType.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SparkAuthenticationType.cs deleted file mode 100644 index 24b7586a..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SparkAuthenticationType.cs +++ /dev/null @@ -1,53 +0,0 @@ -// - -#nullable disable - -using System.ComponentModel; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// The authentication method used to access the Spark server. - public readonly partial struct SparkAuthenticationType : IEquatable - { - private readonly string _value; - - /// Initializes a new instance of . - /// is null. - public SparkAuthenticationType(string value) - { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } - - private const string AnonymousValue = "Anonymous"; - private const string UsernameValue = "Username"; - private const string UsernameAndPasswordValue = "UsernameAndPassword"; - private const string WindowsAzureHDInsightServiceValue = "WindowsAzureHDInsightService"; - - /// Anonymous. - public static SparkAuthenticationType Anonymous { get; } = new SparkAuthenticationType(AnonymousValue); - /// Username. - public static SparkAuthenticationType Username { get; } = new SparkAuthenticationType(UsernameValue); - /// UsernameAndPassword. - public static SparkAuthenticationType UsernameAndPassword { get; } = new SparkAuthenticationType(UsernameAndPasswordValue); - /// WindowsAzureHDInsightService. - public static SparkAuthenticationType WindowsAzureHDInsightService { get; } = new SparkAuthenticationType(WindowsAzureHDInsightServiceValue); - /// Determines if two values are the same. - public static bool operator ==(SparkAuthenticationType left, SparkAuthenticationType right) => left.Equals(right); - /// Determines if two values are not the same. - public static bool operator !=(SparkAuthenticationType left, SparkAuthenticationType right) => !left.Equals(right); - /// Converts a string to a . - public static implicit operator SparkAuthenticationType(string value) => new SparkAuthenticationType(value); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override bool Equals(object obj) => obj is SparkAuthenticationType other && Equals(other); - /// - public bool Equals(SparkAuthenticationType other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override int GetHashCode() => _value?.GetHashCode() ?? 0; - /// - public override string ToString() => _value; - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SparkConfigurationParametrizationReference.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SparkConfigurationParametrizationReference.Serialization.cs deleted file mode 100644 index 9287e142..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SparkConfigurationParametrizationReference.Serialization.cs +++ /dev/null @@ -1,47 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class SparkConfigurationParametrizationReference : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ReferenceType.ToString()); - writer.WritePropertyName("referenceName"u8); - JsonSerializer.Serialize(writer, ReferenceName); - writer.WriteEndObject(); - } - - internal static SparkConfigurationParametrizationReference DeserializeSparkConfigurationParametrizationReference(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - SparkConfigurationReferenceType type = default; - DataFactoryElement referenceName = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("type"u8)) - { - type = new SparkConfigurationReferenceType(property.Value.GetString()); - continue; - } - if (property.NameEquals("referenceName"u8)) - { - referenceName = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - } - return new SparkConfigurationParametrizationReference(type, referenceName); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SparkConfigurationParametrizationReference.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SparkConfigurationParametrizationReference.cs deleted file mode 100644 index fc60d6b9..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SparkConfigurationParametrizationReference.cs +++ /dev/null @@ -1,30 +0,0 @@ -// - -#nullable disable - -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// Spark configuration reference. - public partial class SparkConfigurationParametrizationReference - { - /// Initializes a new instance of SparkConfigurationParametrizationReference. - /// Spark configuration reference type. - /// Reference spark configuration name. Type: string (or Expression with resultType string). - /// is null. - public SparkConfigurationParametrizationReference(SparkConfigurationReferenceType referenceType, DataFactoryElement referenceName) - { - Argument.AssertNotNull(referenceName, nameof(referenceName)); - - ReferenceType = referenceType; - ReferenceName = referenceName; - } - - /// Spark configuration reference type. - public SparkConfigurationReferenceType ReferenceType { get; set; } - /// Reference spark configuration name. Type: string (or Expression with resultType string). - public DataFactoryElement ReferenceName { get; set; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SparkConfigurationReferenceType.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SparkConfigurationReferenceType.cs deleted file mode 100644 index c2e3841b..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SparkConfigurationReferenceType.cs +++ /dev/null @@ -1,44 +0,0 @@ -// - -#nullable disable - -using System.ComponentModel; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// Spark configuration reference type. - public readonly partial struct SparkConfigurationReferenceType : IEquatable - { - private readonly string _value; - - /// Initializes a new instance of . - /// is null. - public SparkConfigurationReferenceType(string value) - { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } - - private const string SparkConfigurationReferenceValue = "SparkConfigurationReference"; - - /// SparkConfigurationReference. - public static SparkConfigurationReferenceType SparkConfigurationReference { get; } = new SparkConfigurationReferenceType(SparkConfigurationReferenceValue); - /// Determines if two values are the same. - public static bool operator ==(SparkConfigurationReferenceType left, SparkConfigurationReferenceType right) => left.Equals(right); - /// Determines if two values are not the same. - public static bool operator !=(SparkConfigurationReferenceType left, SparkConfigurationReferenceType right) => !left.Equals(right); - /// Converts a string to a . - public static implicit operator SparkConfigurationReferenceType(string value) => new SparkConfigurationReferenceType(value); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override bool Equals(object obj) => obj is SparkConfigurationReferenceType other && Equals(other); - /// - public bool Equals(SparkConfigurationReferenceType other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override int GetHashCode() => _value?.GetHashCode() ?? 0; - /// - public override string ToString() => _value; - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SparkJobReferenceType.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SparkJobReferenceType.cs deleted file mode 100644 index 87211193..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SparkJobReferenceType.cs +++ /dev/null @@ -1,44 +0,0 @@ -// - -#nullable disable - -using System.ComponentModel; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// Synapse spark job reference type. - public readonly partial struct SparkJobReferenceType : IEquatable - { - private readonly string _value; - - /// Initializes a new instance of . - /// is null. - public SparkJobReferenceType(string value) - { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } - - private const string SparkJobDefinitionReferenceValue = "SparkJobDefinitionReference"; - - /// SparkJobDefinitionReference. - public static SparkJobReferenceType SparkJobDefinitionReference { get; } = new SparkJobReferenceType(SparkJobDefinitionReferenceValue); - /// Determines if two values are the same. - public static bool operator ==(SparkJobReferenceType left, SparkJobReferenceType right) => left.Equals(right); - /// Determines if two values are not the same. - public static bool operator !=(SparkJobReferenceType left, SparkJobReferenceType right) => !left.Equals(right); - /// Converts a string to a . - public static implicit operator SparkJobReferenceType(string value) => new SparkJobReferenceType(value); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override bool Equals(object obj) => obj is SparkJobReferenceType other && Equals(other); - /// - public bool Equals(SparkJobReferenceType other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override int GetHashCode() => _value?.GetHashCode() ?? 0; - /// - public override string ToString() => _value; - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SparkLinkedService.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SparkLinkedService.Serialization.cs deleted file mode 100644 index abd3d2fc..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SparkLinkedService.Serialization.cs +++ /dev/null @@ -1,345 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class SparkLinkedService : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - writer.WritePropertyName("type"u8); - writer.WriteStringValue(LinkedServiceType); - if (Optional.IsDefined(ConnectVia)) - { - writer.WritePropertyName("connectVia"u8); - writer.WriteObjectValue(ConnectVia); - } - if (Optional.IsDefined(Description)) - { - writer.WritePropertyName("description"u8); - writer.WriteStringValue(Description); - } - if (Optional.IsCollectionDefined(Parameters)) - { - writer.WritePropertyName("parameters"u8); - writer.WriteStartObject(); - foreach (var item in Parameters) - { - writer.WritePropertyName(item.Key); - writer.WriteObjectValue(item.Value); - } - writer.WriteEndObject(); - } - if (Optional.IsCollectionDefined(Annotations)) - { - writer.WritePropertyName("annotations"u8); - writer.WriteStartArray(); - foreach (var item in Annotations) - { - if (item == null) - { - writer.WriteNullValue(); - continue; - } -#if NET6_0_OR_GREATER - writer.WriteRawValue(item); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.ToString()).RootElement); -#endif - } - writer.WriteEndArray(); - } - writer.WritePropertyName("typeProperties"u8); - writer.WriteStartObject(); - writer.WritePropertyName("host"u8); - JsonSerializer.Serialize(writer, Host); - writer.WritePropertyName("port"u8); - JsonSerializer.Serialize(writer, Port); - if (Optional.IsDefined(ServerType)) - { - writer.WritePropertyName("serverType"u8); - writer.WriteStringValue(ServerType.Value.ToString()); - } - if (Optional.IsDefined(ThriftTransportProtocol)) - { - writer.WritePropertyName("thriftTransportProtocol"u8); - writer.WriteStringValue(ThriftTransportProtocol.Value.ToString()); - } - writer.WritePropertyName("authenticationType"u8); - writer.WriteStringValue(AuthenticationType.ToString()); - if (Optional.IsDefined(Username)) - { - writer.WritePropertyName("username"u8); - JsonSerializer.Serialize(writer, Username); - } - if (Optional.IsDefined(Password)) - { - writer.WritePropertyName("password"u8); - JsonSerializer.Serialize(writer, Password); - } - if (Optional.IsDefined(HttpPath)) - { - writer.WritePropertyName("httpPath"u8); - JsonSerializer.Serialize(writer, HttpPath); - } - if (Optional.IsDefined(EnableSsl)) - { - writer.WritePropertyName("enableSsl"u8); - JsonSerializer.Serialize(writer, EnableSsl); - } - if (Optional.IsDefined(TrustedCertPath)) - { - writer.WritePropertyName("trustedCertPath"u8); - JsonSerializer.Serialize(writer, TrustedCertPath); - } - if (Optional.IsDefined(UseSystemTrustStore)) - { - writer.WritePropertyName("useSystemTrustStore"u8); - JsonSerializer.Serialize(writer, UseSystemTrustStore); - } - if (Optional.IsDefined(AllowHostNameCNMismatch)) - { - writer.WritePropertyName("allowHostNameCNMismatch"u8); - JsonSerializer.Serialize(writer, AllowHostNameCNMismatch); - } - if (Optional.IsDefined(AllowSelfSignedServerCert)) - { - writer.WritePropertyName("allowSelfSignedServerCert"u8); - JsonSerializer.Serialize(writer, AllowSelfSignedServerCert); - } - if (Optional.IsDefined(EncryptedCredential)) - { - writer.WritePropertyName("encryptedCredential"u8); - writer.WriteStringValue(EncryptedCredential); - } - writer.WriteEndObject(); - foreach (var item in AdditionalProperties) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.Value.ToString()).RootElement); -#endif - } - writer.WriteEndObject(); - } - - internal static SparkLinkedService DeserializeSparkLinkedService(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - string type = default; - Optional connectVia = default; - Optional description = default; - Optional> parameters = default; - Optional> annotations = default; - DataFactoryElement host = default; - DataFactoryElement port = default; - Optional serverType = default; - Optional thriftTransportProtocol = default; - SparkAuthenticationType authenticationType = default; - Optional> username = default; - Optional password = default; - Optional> httpPath = default; - Optional> enableSsl = default; - Optional> trustedCertPath = default; - Optional> useSystemTrustStore = default; - Optional> allowHostNameCNMismatch = default; - Optional> allowSelfSignedServerCert = default; - Optional encryptedCredential = default; - IDictionary> additionalProperties = default; - Dictionary> additionalPropertiesDictionary = new Dictionary>(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("type"u8)) - { - type = property.Value.GetString(); - continue; - } - if (property.NameEquals("connectVia"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - connectVia = IntegrationRuntimeReference.DeserializeIntegrationRuntimeReference(property.Value); - continue; - } - if (property.NameEquals("description"u8)) - { - description = property.Value.GetString(); - continue; - } - if (property.NameEquals("parameters"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - Dictionary dictionary = new Dictionary(); - foreach (var property0 in property.Value.EnumerateObject()) - { - dictionary.Add(property0.Name, EntityParameterSpecification.DeserializeEntityParameterSpecification(property0.Value)); - } - parameters = dictionary; - continue; - } - if (property.NameEquals("annotations"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - if (item.ValueKind == JsonValueKind.Null) - { - array.Add(null); - } - else - { - array.Add(BinaryData.FromString(item.GetRawText())); - } - } - annotations = array; - continue; - } - if (property.NameEquals("typeProperties"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - foreach (var property0 in property.Value.EnumerateObject()) - { - if (property0.NameEquals("host"u8)) - { - host = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("port"u8)) - { - port = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("serverType"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - serverType = new SparkServerType(property0.Value.GetString()); - continue; - } - if (property0.NameEquals("thriftTransportProtocol"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - thriftTransportProtocol = new SparkThriftTransportProtocol(property0.Value.GetString()); - continue; - } - if (property0.NameEquals("authenticationType"u8)) - { - authenticationType = new SparkAuthenticationType(property0.Value.GetString()); - continue; - } - if (property0.NameEquals("username"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - username = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("password"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - password = JsonSerializer.Deserialize(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("httpPath"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - httpPath = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("enableSsl"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - enableSsl = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("trustedCertPath"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - trustedCertPath = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("useSystemTrustStore"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - useSystemTrustStore = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("allowHostNameCNMismatch"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - allowHostNameCNMismatch = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("allowSelfSignedServerCert"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - allowSelfSignedServerCert = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("encryptedCredential"u8)) - { - encryptedCredential = property0.Value.GetString(); - continue; - } - } - continue; - } - additionalPropertiesDictionary.Add(property.Name, JsonSerializer.Deserialize>(property.Value.GetRawText())); - } - additionalProperties = additionalPropertiesDictionary; - return new SparkLinkedService(type, connectVia.Value, description.Value, Optional.ToDictionary(parameters), Optional.ToList(annotations), additionalProperties, host, port, Optional.ToNullable(serverType), Optional.ToNullable(thriftTransportProtocol), authenticationType, username.Value, password, httpPath.Value, enableSsl.Value, trustedCertPath.Value, useSystemTrustStore.Value, allowHostNameCNMismatch.Value, allowSelfSignedServerCert.Value, encryptedCredential.Value); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SparkLinkedService.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SparkLinkedService.cs deleted file mode 100644 index 2bbccf51..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SparkLinkedService.cs +++ /dev/null @@ -1,98 +0,0 @@ -// - -#nullable disable - -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// Spark Server linked service. - public partial class SparkLinkedService : DataFactoryLinkedServiceProperties - { - /// Initializes a new instance of SparkLinkedService. - /// IP address or host name of the Spark server. - /// The TCP port that the Spark server uses to listen for client connections. - /// The authentication method used to access the Spark server. - /// or is null. - public SparkLinkedService(DataFactoryElement host, DataFactoryElement port, SparkAuthenticationType authenticationType) - { - Argument.AssertNotNull(host, nameof(host)); - Argument.AssertNotNull(port, nameof(port)); - - Host = host; - Port = port; - AuthenticationType = authenticationType; - LinkedServiceType = "Spark"; - } - - /// Initializes a new instance of SparkLinkedService. - /// Type of linked service. - /// The integration runtime reference. - /// Linked service description. - /// Parameters for linked service. - /// List of tags that can be used for describing the linked service. - /// Additional Properties. - /// IP address or host name of the Spark server. - /// The TCP port that the Spark server uses to listen for client connections. - /// The type of Spark server. - /// The transport protocol to use in the Thrift layer. - /// The authentication method used to access the Spark server. - /// The user name that you use to access Spark Server. - /// The password corresponding to the user name that you provided in the Username field. - /// The partial URL corresponding to the Spark server. - /// Specifies whether the connections to the server are encrypted using SSL. The default value is false. - /// The full path of the .pem file containing trusted CA certificates for verifying the server when connecting over SSL. This property can only be set when using SSL on self-hosted IR. The default value is the cacerts.pem file installed with the IR. - /// Specifies whether to use a CA certificate from the system trust store or from a specified PEM file. The default value is false. - /// Specifies whether to require a CA-issued SSL certificate name to match the host name of the server when connecting over SSL. The default value is false. - /// Specifies whether to allow self-signed certificates from the server. The default value is false. - /// The encrypted credential used for authentication. Credentials are encrypted using the integration runtime credential manager. Type: string. - internal SparkLinkedService(string linkedServiceType, IntegrationRuntimeReference connectVia, string description, IDictionary parameters, IList annotations, IDictionary> additionalProperties, DataFactoryElement host, DataFactoryElement port, SparkServerType? serverType, SparkThriftTransportProtocol? thriftTransportProtocol, SparkAuthenticationType authenticationType, DataFactoryElement username, DataFactorySecretBaseDefinition password, DataFactoryElement httpPath, DataFactoryElement enableSsl, DataFactoryElement trustedCertPath, DataFactoryElement useSystemTrustStore, DataFactoryElement allowHostNameCNMismatch, DataFactoryElement allowSelfSignedServerCert, string encryptedCredential) : base(linkedServiceType, connectVia, description, parameters, annotations, additionalProperties) - { - Host = host; - Port = port; - ServerType = serverType; - ThriftTransportProtocol = thriftTransportProtocol; - AuthenticationType = authenticationType; - Username = username; - Password = password; - HttpPath = httpPath; - EnableSsl = enableSsl; - TrustedCertPath = trustedCertPath; - UseSystemTrustStore = useSystemTrustStore; - AllowHostNameCNMismatch = allowHostNameCNMismatch; - AllowSelfSignedServerCert = allowSelfSignedServerCert; - EncryptedCredential = encryptedCredential; - LinkedServiceType = linkedServiceType ?? "Spark"; - } - - /// IP address or host name of the Spark server. - public DataFactoryElement Host { get; set; } - /// The TCP port that the Spark server uses to listen for client connections. - public DataFactoryElement Port { get; set; } - /// The type of Spark server. - public SparkServerType? ServerType { get; set; } - /// The transport protocol to use in the Thrift layer. - public SparkThriftTransportProtocol? ThriftTransportProtocol { get; set; } - /// The authentication method used to access the Spark server. - public SparkAuthenticationType AuthenticationType { get; set; } - /// The user name that you use to access Spark Server. - public DataFactoryElement Username { get; set; } - /// The password corresponding to the user name that you provided in the Username field. - public DataFactorySecretBaseDefinition Password { get; set; } - /// The partial URL corresponding to the Spark server. - public DataFactoryElement HttpPath { get; set; } - /// Specifies whether the connections to the server are encrypted using SSL. The default value is false. - public DataFactoryElement EnableSsl { get; set; } - /// The full path of the .pem file containing trusted CA certificates for verifying the server when connecting over SSL. This property can only be set when using SSL on self-hosted IR. The default value is the cacerts.pem file installed with the IR. - public DataFactoryElement TrustedCertPath { get; set; } - /// Specifies whether to use a CA certificate from the system trust store or from a specified PEM file. The default value is false. - public DataFactoryElement UseSystemTrustStore { get; set; } - /// Specifies whether to require a CA-issued SSL certificate name to match the host name of the server when connecting over SSL. The default value is false. - public DataFactoryElement AllowHostNameCNMismatch { get; set; } - /// Specifies whether to allow self-signed certificates from the server. The default value is false. - public DataFactoryElement AllowSelfSignedServerCert { get; set; } - /// The encrypted credential used for authentication. Credentials are encrypted using the integration runtime credential manager. Type: string. - public string EncryptedCredential { get; set; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SparkObjectDataset.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SparkObjectDataset.Serialization.cs deleted file mode 100644 index f147571d..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SparkObjectDataset.Serialization.cs +++ /dev/null @@ -1,246 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class SparkObjectDataset : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - writer.WritePropertyName("type"u8); - writer.WriteStringValue(DatasetType); - if (Optional.IsDefined(Description)) - { - writer.WritePropertyName("description"u8); - writer.WriteStringValue(Description); - } - if (Optional.IsDefined(Structure)) - { - writer.WritePropertyName("structure"u8); - JsonSerializer.Serialize(writer, Structure); - } - if (Optional.IsDefined(Schema)) - { - writer.WritePropertyName("schema"u8); - JsonSerializer.Serialize(writer, Schema); - } - writer.WritePropertyName("linkedServiceName"u8); - JsonSerializer.Serialize(writer, LinkedServiceName); if (Optional.IsCollectionDefined(Parameters)) - { - writer.WritePropertyName("parameters"u8); - writer.WriteStartObject(); - foreach (var item in Parameters) - { - writer.WritePropertyName(item.Key); - writer.WriteObjectValue(item.Value); - } - writer.WriteEndObject(); - } - if (Optional.IsCollectionDefined(Annotations)) - { - writer.WritePropertyName("annotations"u8); - writer.WriteStartArray(); - foreach (var item in Annotations) - { - if (item == null) - { - writer.WriteNullValue(); - continue; - } -#if NET6_0_OR_GREATER - writer.WriteRawValue(item); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.ToString()).RootElement); -#endif - } - writer.WriteEndArray(); - } - if (Optional.IsDefined(Folder)) - { - writer.WritePropertyName("folder"u8); - writer.WriteObjectValue(Folder); - } - writer.WritePropertyName("typeProperties"u8); - writer.WriteStartObject(); - if (Optional.IsDefined(TableName)) - { - writer.WritePropertyName("tableName"u8); -#if NET6_0_OR_GREATER - writer.WriteRawValue(TableName); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(TableName.ToString()).RootElement); -#endif - } - if (Optional.IsDefined(Table)) - { - writer.WritePropertyName("table"u8); - JsonSerializer.Serialize(writer, Table); - } - if (Optional.IsDefined(SchemaTypePropertiesSchema)) - { - writer.WritePropertyName("schema"u8); - JsonSerializer.Serialize(writer, SchemaTypePropertiesSchema); - } - writer.WriteEndObject(); - foreach (var item in AdditionalProperties) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.Value.ToString()).RootElement); -#endif - } - writer.WriteEndObject(); - } - - internal static SparkObjectDataset DeserializeSparkObjectDataset(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - string type = default; - Optional description = default; - Optional>> structure = default; - Optional>> schema = default; - DataFactoryLinkedServiceReference linkedServiceName = default; - Optional> parameters = default; - Optional> annotations = default; - Optional folder = default; - Optional tableName = default; - Optional> table = default; - Optional> schema0 = default; - IDictionary> additionalProperties = default; - Dictionary> additionalPropertiesDictionary = new Dictionary>(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("type"u8)) - { - type = property.Value.GetString(); - continue; - } - if (property.NameEquals("description"u8)) - { - description = property.Value.GetString(); - continue; - } - if (property.NameEquals("structure"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - structure = JsonSerializer.Deserialize>>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("schema"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - schema = JsonSerializer.Deserialize>>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("linkedServiceName"u8)) - { - linkedServiceName = JsonSerializer.Deserialize(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("parameters"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - Dictionary dictionary = new Dictionary(); - foreach (var property0 in property.Value.EnumerateObject()) - { - dictionary.Add(property0.Name, EntityParameterSpecification.DeserializeEntityParameterSpecification(property0.Value)); - } - parameters = dictionary; - continue; - } - if (property.NameEquals("annotations"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - if (item.ValueKind == JsonValueKind.Null) - { - array.Add(null); - } - else - { - array.Add(BinaryData.FromString(item.GetRawText())); - } - } - annotations = array; - continue; - } - if (property.NameEquals("folder"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - folder = DatasetFolder.DeserializeDatasetFolder(property.Value); - continue; - } - if (property.NameEquals("typeProperties"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - foreach (var property0 in property.Value.EnumerateObject()) - { - if (property0.NameEquals("tableName"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - tableName = BinaryData.FromString(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("table"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - table = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("schema"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - schema0 = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - } - continue; - } - additionalPropertiesDictionary.Add(property.Name, JsonSerializer.Deserialize>(property.Value.GetRawText())); - } - additionalProperties = additionalPropertiesDictionary; - return new SparkObjectDataset(type, description.Value, structure.Value, schema.Value, linkedServiceName, Optional.ToDictionary(parameters), Optional.ToList(annotations), folder.Value, additionalProperties, tableName.Value, table.Value, schema0.Value); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SparkObjectDataset.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SparkObjectDataset.cs deleted file mode 100644 index b562675a..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SparkObjectDataset.cs +++ /dev/null @@ -1,80 +0,0 @@ -// - -#nullable disable - -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// Spark Server dataset. - public partial class SparkObjectDataset : DataFactoryDatasetProperties - { - /// Initializes a new instance of SparkObjectDataset. - /// Linked service reference. - /// is null. - public SparkObjectDataset(DataFactoryLinkedServiceReference linkedServiceName) : base(linkedServiceName) - { - Argument.AssertNotNull(linkedServiceName, nameof(linkedServiceName)); - - DatasetType = "SparkObject"; - } - - /// Initializes a new instance of SparkObjectDataset. - /// Type of dataset. - /// Dataset description. - /// Columns that define the structure of the dataset. Type: array (or Expression with resultType array), itemType: DatasetDataElement. - /// Columns that define the physical type schema of the dataset. Type: array (or Expression with resultType array), itemType: DatasetSchemaDataElement. - /// Linked service reference. - /// Parameters for dataset. - /// List of tags that can be used for describing the Dataset. - /// The folder that this Dataset is in. If not specified, Dataset will appear at the root level. - /// Additional Properties. - /// This property will be retired. Please consider using schema + table properties instead. - /// The table name of the Spark. Type: string (or Expression with resultType string). - /// The schema name of the Spark. Type: string (or Expression with resultType string). - internal SparkObjectDataset(string datasetType, string description, DataFactoryElement> structure, DataFactoryElement> schema, DataFactoryLinkedServiceReference linkedServiceName, IDictionary parameters, IList annotations, DatasetFolder folder, IDictionary> additionalProperties, BinaryData tableName, DataFactoryElement table, DataFactoryElement schemaTypePropertiesSchema) : base(datasetType, description, structure, schema, linkedServiceName, parameters, annotations, folder, additionalProperties) - { - TableName = tableName; - Table = table; - SchemaTypePropertiesSchema = schemaTypePropertiesSchema; - DatasetType = datasetType ?? "SparkObject"; - } - - /// - /// This property will be retired. Please consider using schema + table properties instead. - /// - /// To assign an object to this property use . - /// - /// - /// To assign an already formated json string to this property use . - /// - /// - /// Examples: - /// - /// - /// BinaryData.FromObjectAsJson("foo") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromString("\"foo\"") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromObjectAsJson(new { key = "value" }) - /// Creates a payload of { "key": "value" }. - /// - /// - /// BinaryData.FromString("{\"key\": \"value\"}") - /// Creates a payload of { "key": "value" }. - /// - /// - /// - /// - public BinaryData TableName { get; set; } - /// The table name of the Spark. Type: string (or Expression with resultType string). - public DataFactoryElement Table { get; set; } - /// The schema name of the Spark. Type: string (or Expression with resultType string). - public DataFactoryElement SchemaTypePropertiesSchema { get; set; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SparkServerType.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SparkServerType.cs deleted file mode 100644 index e0ab4eb3..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SparkServerType.cs +++ /dev/null @@ -1,50 +0,0 @@ -// - -#nullable disable - -using System.ComponentModel; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// The type of Spark server. - public readonly partial struct SparkServerType : IEquatable - { - private readonly string _value; - - /// Initializes a new instance of . - /// is null. - public SparkServerType(string value) - { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } - - private const string SharkServerValue = "SharkServer"; - private const string SharkServer2Value = "SharkServer2"; - private const string SparkThriftServerValue = "SparkThriftServer"; - - /// SharkServer. - public static SparkServerType SharkServer { get; } = new SparkServerType(SharkServerValue); - /// SharkServer2. - public static SparkServerType SharkServer2 { get; } = new SparkServerType(SharkServer2Value); - /// SparkThriftServer. - public static SparkServerType SparkThriftServer { get; } = new SparkServerType(SparkThriftServerValue); - /// Determines if two values are the same. - public static bool operator ==(SparkServerType left, SparkServerType right) => left.Equals(right); - /// Determines if two values are not the same. - public static bool operator !=(SparkServerType left, SparkServerType right) => !left.Equals(right); - /// Converts a string to a . - public static implicit operator SparkServerType(string value) => new SparkServerType(value); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override bool Equals(object obj) => obj is SparkServerType other && Equals(other); - /// - public bool Equals(SparkServerType other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override int GetHashCode() => _value?.GetHashCode() ?? 0; - /// - public override string ToString() => _value; - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SparkSource.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SparkSource.Serialization.cs deleted file mode 100644 index 65d4ebf4..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SparkSource.Serialization.cs +++ /dev/null @@ -1,161 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class SparkSource : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - if (Optional.IsDefined(Query)) - { - writer.WritePropertyName("query"u8); - JsonSerializer.Serialize(writer, Query); - } - if (Optional.IsDefined(QueryTimeout)) - { - writer.WritePropertyName("queryTimeout"u8); - JsonSerializer.Serialize(writer, QueryTimeout); - } - if (Optional.IsDefined(AdditionalColumns)) - { - writer.WritePropertyName("additionalColumns"u8); -#if NET6_0_OR_GREATER - writer.WriteRawValue(AdditionalColumns); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(AdditionalColumns.ToString()).RootElement); -#endif - } - writer.WritePropertyName("type"u8); - writer.WriteStringValue(CopySourceType); - if (Optional.IsDefined(SourceRetryCount)) - { - writer.WritePropertyName("sourceRetryCount"u8); - JsonSerializer.Serialize(writer, SourceRetryCount); - } - if (Optional.IsDefined(SourceRetryWait)) - { - writer.WritePropertyName("sourceRetryWait"u8); - JsonSerializer.Serialize(writer, SourceRetryWait); - } - if (Optional.IsDefined(MaxConcurrentConnections)) - { - writer.WritePropertyName("maxConcurrentConnections"u8); - JsonSerializer.Serialize(writer, MaxConcurrentConnections); - } - if (Optional.IsDefined(DisableMetricsCollection)) - { - writer.WritePropertyName("disableMetricsCollection"u8); - JsonSerializer.Serialize(writer, DisableMetricsCollection); - } - foreach (var item in AdditionalProperties) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.Value.ToString()).RootElement); -#endif - } - writer.WriteEndObject(); - } - - internal static SparkSource DeserializeSparkSource(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - Optional> query = default; - Optional> queryTimeout = default; - Optional additionalColumns = default; - string type = default; - Optional> sourceRetryCount = default; - Optional> sourceRetryWait = default; - Optional> maxConcurrentConnections = default; - Optional> disableMetricsCollection = default; - IDictionary> additionalProperties = default; - Dictionary> additionalPropertiesDictionary = new Dictionary>(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("query"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - query = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("queryTimeout"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - queryTimeout = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("additionalColumns"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - additionalColumns = BinaryData.FromString(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("type"u8)) - { - type = property.Value.GetString(); - continue; - } - if (property.NameEquals("sourceRetryCount"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - sourceRetryCount = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("sourceRetryWait"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - sourceRetryWait = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("maxConcurrentConnections"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - maxConcurrentConnections = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("disableMetricsCollection"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - disableMetricsCollection = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - additionalPropertiesDictionary.Add(property.Name, JsonSerializer.Deserialize>(property.Value.GetRawText())); - } - additionalProperties = additionalPropertiesDictionary; - return new SparkSource(type, sourceRetryCount.Value, sourceRetryWait.Value, maxConcurrentConnections.Value, disableMetricsCollection.Value, additionalProperties, queryTimeout.Value, additionalColumns.Value, query.Value); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SparkSource.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SparkSource.cs deleted file mode 100644 index 2793b732..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SparkSource.cs +++ /dev/null @@ -1,37 +0,0 @@ -// - -#nullable disable - -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// A copy activity Spark Server source. - public partial class SparkSource : TabularSource - { - /// Initializes a new instance of SparkSource. - public SparkSource() - { - CopySourceType = "SparkSource"; - } - - /// Initializes a new instance of SparkSource. - /// Copy source type. - /// Source retry count. Type: integer (or Expression with resultType integer). - /// Source retry wait. Type: string (or Expression with resultType string), pattern: ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). - /// The maximum concurrent connection count for the source data store. Type: integer (or Expression with resultType integer). - /// If true, disable data store metrics collection. Default is false. Type: boolean (or Expression with resultType boolean). - /// Additional Properties. - /// 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). - /// A query to retrieve data from source. Type: string (or Expression with resultType string). - internal SparkSource(string copySourceType, DataFactoryElement sourceRetryCount, DataFactoryElement sourceRetryWait, DataFactoryElement maxConcurrentConnections, DataFactoryElement disableMetricsCollection, IDictionary> additionalProperties, DataFactoryElement queryTimeout, BinaryData additionalColumns, DataFactoryElement query) : base(copySourceType, sourceRetryCount, sourceRetryWait, maxConcurrentConnections, disableMetricsCollection, additionalProperties, queryTimeout, additionalColumns) - { - Query = query; - CopySourceType = copySourceType ?? "SparkSource"; - } - - /// A query to retrieve data from source. Type: string (or Expression with resultType string). - public DataFactoryElement Query { get; set; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SparkThriftTransportProtocol.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SparkThriftTransportProtocol.cs deleted file mode 100644 index f7a16503..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SparkThriftTransportProtocol.cs +++ /dev/null @@ -1,50 +0,0 @@ -// - -#nullable disable - -using System.ComponentModel; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// The transport protocol to use in the Thrift layer. - public readonly partial struct SparkThriftTransportProtocol : IEquatable - { - private readonly string _value; - - /// Initializes a new instance of . - /// is null. - public SparkThriftTransportProtocol(string value) - { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } - - private const string BinaryValue = "Binary"; - private const string SaslValue = "SASL"; - private const string HttpValue = "HTTP "; - - /// Binary. - public static SparkThriftTransportProtocol Binary { get; } = new SparkThriftTransportProtocol(BinaryValue); - /// SASL. - public static SparkThriftTransportProtocol Sasl { get; } = new SparkThriftTransportProtocol(SaslValue); - /// HTTP. - public static SparkThriftTransportProtocol Http { get; } = new SparkThriftTransportProtocol(HttpValue); - /// Determines if two values are the same. - public static bool operator ==(SparkThriftTransportProtocol left, SparkThriftTransportProtocol right) => left.Equals(right); - /// Determines if two values are not the same. - public static bool operator !=(SparkThriftTransportProtocol left, SparkThriftTransportProtocol right) => !left.Equals(right); - /// Converts a string to a . - public static implicit operator SparkThriftTransportProtocol(string value) => new SparkThriftTransportProtocol(value); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override bool Equals(object obj) => obj is SparkThriftTransportProtocol other && Equals(other); - /// - public bool Equals(SparkThriftTransportProtocol other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override int GetHashCode() => _value?.GetHashCode() ?? 0; - /// - public override string ToString() => _value; - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SqlAlwaysEncryptedAkvAuthType.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SqlAlwaysEncryptedAkvAuthType.cs deleted file mode 100644 index eb17e993..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SqlAlwaysEncryptedAkvAuthType.cs +++ /dev/null @@ -1,50 +0,0 @@ -// - -#nullable disable - -using System.ComponentModel; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// Sql always encrypted AKV authentication type. Type: string. - public readonly partial struct SqlAlwaysEncryptedAkvAuthType : IEquatable - { - private readonly string _value; - - /// Initializes a new instance of . - /// is null. - public SqlAlwaysEncryptedAkvAuthType(string value) - { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } - - private const string ServicePrincipalValue = "ServicePrincipal"; - private const string ManagedIdentityValue = "ManagedIdentity"; - private const string UserAssignedManagedIdentityValue = "UserAssignedManagedIdentity"; - - /// ServicePrincipal. - public static SqlAlwaysEncryptedAkvAuthType ServicePrincipal { get; } = new SqlAlwaysEncryptedAkvAuthType(ServicePrincipalValue); - /// ManagedIdentity. - public static SqlAlwaysEncryptedAkvAuthType ManagedIdentity { get; } = new SqlAlwaysEncryptedAkvAuthType(ManagedIdentityValue); - /// UserAssignedManagedIdentity. - public static SqlAlwaysEncryptedAkvAuthType UserAssignedManagedIdentity { get; } = new SqlAlwaysEncryptedAkvAuthType(UserAssignedManagedIdentityValue); - /// Determines if two values are the same. - public static bool operator ==(SqlAlwaysEncryptedAkvAuthType left, SqlAlwaysEncryptedAkvAuthType right) => left.Equals(right); - /// Determines if two values are not the same. - public static bool operator !=(SqlAlwaysEncryptedAkvAuthType left, SqlAlwaysEncryptedAkvAuthType right) => !left.Equals(right); - /// Converts a string to a . - public static implicit operator SqlAlwaysEncryptedAkvAuthType(string value) => new SqlAlwaysEncryptedAkvAuthType(value); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override bool Equals(object obj) => obj is SqlAlwaysEncryptedAkvAuthType other && Equals(other); - /// - public bool Equals(SqlAlwaysEncryptedAkvAuthType other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override int GetHashCode() => _value?.GetHashCode() ?? 0; - /// - public override string ToString() => _value; - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SqlAlwaysEncryptedProperties.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SqlAlwaysEncryptedProperties.Serialization.cs deleted file mode 100644 index 39bd3c14..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SqlAlwaysEncryptedProperties.Serialization.cs +++ /dev/null @@ -1,84 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class SqlAlwaysEncryptedProperties : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - writer.WritePropertyName("alwaysEncryptedAkvAuthType"u8); - writer.WriteStringValue(AlwaysEncryptedAkvAuthType.ToString()); - if (Optional.IsDefined(ServicePrincipalId)) - { - writer.WritePropertyName("servicePrincipalId"u8); - JsonSerializer.Serialize(writer, ServicePrincipalId); - } - if (Optional.IsDefined(ServicePrincipalKey)) - { - writer.WritePropertyName("servicePrincipalKey"u8); - JsonSerializer.Serialize(writer, ServicePrincipalKey); - } - if (Optional.IsDefined(Credential)) - { - writer.WritePropertyName("credential"u8); - writer.WriteObjectValue(Credential); - } - writer.WriteEndObject(); - } - - internal static SqlAlwaysEncryptedProperties DeserializeSqlAlwaysEncryptedProperties(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - SqlAlwaysEncryptedAkvAuthType alwaysEncryptedAkvAuthType = default; - Optional> servicePrincipalId = default; - Optional servicePrincipalKey = default; - Optional credential = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("alwaysEncryptedAkvAuthType"u8)) - { - alwaysEncryptedAkvAuthType = new SqlAlwaysEncryptedAkvAuthType(property.Value.GetString()); - continue; - } - if (property.NameEquals("servicePrincipalId"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - servicePrincipalId = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("servicePrincipalKey"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - servicePrincipalKey = JsonSerializer.Deserialize(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("credential"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - credential = DataFactoryCredentialReference.DeserializeDataFactoryCredentialReference(property.Value); - continue; - } - } - return new SqlAlwaysEncryptedProperties(alwaysEncryptedAkvAuthType, servicePrincipalId.Value, servicePrincipalKey, credential.Value); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SqlAlwaysEncryptedProperties.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SqlAlwaysEncryptedProperties.cs deleted file mode 100644 index 9367799d..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SqlAlwaysEncryptedProperties.cs +++ /dev/null @@ -1,41 +0,0 @@ -// - -#nullable disable - -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// Sql always encrypted properties. - public partial class SqlAlwaysEncryptedProperties - { - /// Initializes a new instance of SqlAlwaysEncryptedProperties. - /// Sql always encrypted AKV authentication type. Type: string. - public SqlAlwaysEncryptedProperties(SqlAlwaysEncryptedAkvAuthType alwaysEncryptedAkvAuthType) - { - AlwaysEncryptedAkvAuthType = alwaysEncryptedAkvAuthType; - } - - /// Initializes a new instance of SqlAlwaysEncryptedProperties. - /// Sql always encrypted AKV authentication type. Type: string. - /// The client ID of the application in Azure Active Directory used for Azure Key Vault authentication. Type: string (or Expression with resultType string). - /// The key of the service principal used to authenticate against Azure Key Vault. - /// The credential reference containing authentication information. - internal SqlAlwaysEncryptedProperties(SqlAlwaysEncryptedAkvAuthType alwaysEncryptedAkvAuthType, DataFactoryElement servicePrincipalId, DataFactorySecretBaseDefinition servicePrincipalKey, DataFactoryCredentialReference credential) - { - AlwaysEncryptedAkvAuthType = alwaysEncryptedAkvAuthType; - ServicePrincipalId = servicePrincipalId; - ServicePrincipalKey = servicePrincipalKey; - Credential = credential; - } - - /// Sql always encrypted AKV authentication type. Type: string. - public SqlAlwaysEncryptedAkvAuthType AlwaysEncryptedAkvAuthType { get; set; } - /// The client ID of the application in Azure Active Directory used for Azure Key Vault authentication. Type: string (or Expression with resultType string). - public DataFactoryElement ServicePrincipalId { get; set; } - /// The key of the service principal used to authenticate against Azure Key Vault. - public DataFactorySecretBaseDefinition ServicePrincipalKey { get; set; } - /// The credential reference containing authentication information. - public DataFactoryCredentialReference Credential { get; set; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SqlDWSink.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SqlDWSink.Serialization.cs deleted file mode 100644 index ceb495b2..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SqlDWSink.Serialization.cs +++ /dev/null @@ -1,281 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class SqlDWSink : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - if (Optional.IsDefined(PreCopyScript)) - { - writer.WritePropertyName("preCopyScript"u8); - JsonSerializer.Serialize(writer, PreCopyScript); - } - if (Optional.IsDefined(AllowPolyBase)) - { - writer.WritePropertyName("allowPolyBase"u8); - JsonSerializer.Serialize(writer, AllowPolyBase); - } - if (Optional.IsDefined(PolyBaseSettings)) - { - writer.WritePropertyName("polyBaseSettings"u8); - writer.WriteObjectValue(PolyBaseSettings); - } - if (Optional.IsDefined(AllowCopyCommand)) - { - writer.WritePropertyName("allowCopyCommand"u8); - JsonSerializer.Serialize(writer, AllowCopyCommand); - } - if (Optional.IsDefined(CopyCommandSettings)) - { - writer.WritePropertyName("copyCommandSettings"u8); - writer.WriteObjectValue(CopyCommandSettings); - } - if (Optional.IsDefined(TableOption)) - { - writer.WritePropertyName("tableOption"u8); - JsonSerializer.Serialize(writer, TableOption); - } - if (Optional.IsDefined(SqlWriterUseTableLock)) - { - writer.WritePropertyName("sqlWriterUseTableLock"u8); - JsonSerializer.Serialize(writer, SqlWriterUseTableLock); - } - if (Optional.IsDefined(WriteBehavior)) - { - writer.WritePropertyName("writeBehavior"u8); -#if NET6_0_OR_GREATER - writer.WriteRawValue(WriteBehavior); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(WriteBehavior.ToString()).RootElement); -#endif - } - if (Optional.IsDefined(UpsertSettings)) - { - writer.WritePropertyName("upsertSettings"u8); - writer.WriteObjectValue(UpsertSettings); - } - writer.WritePropertyName("type"u8); - writer.WriteStringValue(CopySinkType); - if (Optional.IsDefined(WriteBatchSize)) - { - writer.WritePropertyName("writeBatchSize"u8); - JsonSerializer.Serialize(writer, WriteBatchSize); - } - if (Optional.IsDefined(WriteBatchTimeout)) - { - writer.WritePropertyName("writeBatchTimeout"u8); - JsonSerializer.Serialize(writer, WriteBatchTimeout); - } - if (Optional.IsDefined(SinkRetryCount)) - { - writer.WritePropertyName("sinkRetryCount"u8); - JsonSerializer.Serialize(writer, SinkRetryCount); - } - if (Optional.IsDefined(SinkRetryWait)) - { - writer.WritePropertyName("sinkRetryWait"u8); - JsonSerializer.Serialize(writer, SinkRetryWait); - } - if (Optional.IsDefined(MaxConcurrentConnections)) - { - writer.WritePropertyName("maxConcurrentConnections"u8); - JsonSerializer.Serialize(writer, MaxConcurrentConnections); - } - if (Optional.IsDefined(DisableMetricsCollection)) - { - writer.WritePropertyName("disableMetricsCollection"u8); - JsonSerializer.Serialize(writer, DisableMetricsCollection); - } - foreach (var item in AdditionalProperties) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.Value.ToString()).RootElement); -#endif - } - writer.WriteEndObject(); - } - - internal static SqlDWSink DeserializeSqlDWSink(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - Optional> preCopyScript = default; - Optional> allowPolyBase = default; - Optional polyBaseSettings = default; - Optional> allowCopyCommand = default; - Optional copyCommandSettings = default; - Optional> tableOption = default; - Optional> sqlWriterUseTableLock = default; - Optional writeBehavior = default; - Optional upsertSettings = default; - string type = default; - Optional> writeBatchSize = default; - Optional> writeBatchTimeout = default; - Optional> sinkRetryCount = default; - Optional> sinkRetryWait = default; - Optional> maxConcurrentConnections = default; - Optional> disableMetricsCollection = default; - IDictionary> additionalProperties = default; - Dictionary> additionalPropertiesDictionary = new Dictionary>(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("preCopyScript"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - preCopyScript = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("allowPolyBase"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - allowPolyBase = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("polyBaseSettings"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - polyBaseSettings = PolybaseSettings.DeserializePolybaseSettings(property.Value); - continue; - } - if (property.NameEquals("allowCopyCommand"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - allowCopyCommand = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("copyCommandSettings"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - copyCommandSettings = DWCopyCommandSettings.DeserializeDWCopyCommandSettings(property.Value); - continue; - } - if (property.NameEquals("tableOption"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - tableOption = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("sqlWriterUseTableLock"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - sqlWriterUseTableLock = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("writeBehavior"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - writeBehavior = BinaryData.FromString(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("upsertSettings"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - upsertSettings = SqlDWUpsertSettings.DeserializeSqlDWUpsertSettings(property.Value); - continue; - } - if (property.NameEquals("type"u8)) - { - type = property.Value.GetString(); - continue; - } - if (property.NameEquals("writeBatchSize"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - writeBatchSize = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("writeBatchTimeout"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - writeBatchTimeout = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("sinkRetryCount"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - sinkRetryCount = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("sinkRetryWait"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - sinkRetryWait = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("maxConcurrentConnections"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - maxConcurrentConnections = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("disableMetricsCollection"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - disableMetricsCollection = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - additionalPropertiesDictionary.Add(property.Name, JsonSerializer.Deserialize>(property.Value.GetRawText())); - } - additionalProperties = additionalPropertiesDictionary; - return new SqlDWSink(type, writeBatchSize.Value, writeBatchTimeout.Value, sinkRetryCount.Value, sinkRetryWait.Value, maxConcurrentConnections.Value, disableMetricsCollection.Value, additionalProperties, preCopyScript.Value, allowPolyBase.Value, polyBaseSettings.Value, allowCopyCommand.Value, copyCommandSettings.Value, tableOption.Value, sqlWriterUseTableLock.Value, writeBehavior.Value, upsertSettings.Value); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SqlDWSink.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SqlDWSink.cs deleted file mode 100644 index 91b1c1af..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SqlDWSink.cs +++ /dev/null @@ -1,98 +0,0 @@ -// - -#nullable disable - -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// A copy activity SQL Data Warehouse sink. - public partial class SqlDWSink : CopySink - { - /// Initializes a new instance of SqlDWSink. - public SqlDWSink() - { - CopySinkType = "SqlDWSink"; - } - - /// Initializes a new instance of SqlDWSink. - /// Copy sink type. - /// Write batch size. Type: integer (or Expression with resultType integer), minimum: 0. - /// Write batch timeout. Type: string (or Expression with resultType string), pattern: ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). - /// Sink retry count. Type: integer (or Expression with resultType integer). - /// Sink retry wait. Type: string (or Expression with resultType string), pattern: ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). - /// The maximum concurrent connection count for the sink data store. Type: integer (or Expression with resultType integer). - /// If true, disable data store metrics collection. Default is false. Type: boolean (or Expression with resultType boolean). - /// Additional Properties. - /// SQL pre-copy script. Type: string (or Expression with resultType string). - /// Indicates to use PolyBase to copy data into SQL Data Warehouse when applicable. Type: boolean (or Expression with resultType boolean). - /// Specifies PolyBase-related settings when allowPolyBase is true. - /// Indicates to use Copy Command to copy data into SQL Data Warehouse. Type: boolean (or Expression with resultType boolean). - /// Specifies Copy Command related settings when allowCopyCommand is true. - /// The option to handle sink table, such as autoCreate. For now only 'autoCreate' value is supported. Type: string (or Expression with resultType string). - /// Whether to use table lock during bulk copy. Type: boolean (or Expression with resultType boolean). - /// Write behavior when copying data into azure SQL DW. Type: SqlDWWriteBehaviorEnum (or Expression with resultType SqlDWWriteBehaviorEnum). - /// SQL DW upsert settings. - internal SqlDWSink(string copySinkType, DataFactoryElement writeBatchSize, DataFactoryElement writeBatchTimeout, DataFactoryElement sinkRetryCount, DataFactoryElement sinkRetryWait, DataFactoryElement maxConcurrentConnections, DataFactoryElement disableMetricsCollection, IDictionary> additionalProperties, DataFactoryElement preCopyScript, DataFactoryElement allowPolyBase, PolybaseSettings polyBaseSettings, DataFactoryElement allowCopyCommand, DWCopyCommandSettings copyCommandSettings, DataFactoryElement tableOption, DataFactoryElement sqlWriterUseTableLock, BinaryData writeBehavior, SqlDWUpsertSettings upsertSettings) : base(copySinkType, writeBatchSize, writeBatchTimeout, sinkRetryCount, sinkRetryWait, maxConcurrentConnections, disableMetricsCollection, additionalProperties) - { - PreCopyScript = preCopyScript; - AllowPolyBase = allowPolyBase; - PolyBaseSettings = polyBaseSettings; - AllowCopyCommand = allowCopyCommand; - CopyCommandSettings = copyCommandSettings; - TableOption = tableOption; - SqlWriterUseTableLock = sqlWriterUseTableLock; - WriteBehavior = writeBehavior; - UpsertSettings = upsertSettings; - CopySinkType = copySinkType ?? "SqlDWSink"; - } - - /// SQL pre-copy script. Type: string (or Expression with resultType string). - public DataFactoryElement PreCopyScript { get; set; } - /// Indicates to use PolyBase to copy data into SQL Data Warehouse when applicable. Type: boolean (or Expression with resultType boolean). - public DataFactoryElement AllowPolyBase { get; set; } - /// Specifies PolyBase-related settings when allowPolyBase is true. - public PolybaseSettings PolyBaseSettings { get; set; } - /// Indicates to use Copy Command to copy data into SQL Data Warehouse. Type: boolean (or Expression with resultType boolean). - public DataFactoryElement AllowCopyCommand { get; set; } - /// Specifies Copy Command related settings when allowCopyCommand is true. - public DWCopyCommandSettings CopyCommandSettings { get; set; } - /// The option to handle sink table, such as autoCreate. For now only 'autoCreate' value is supported. Type: string (or Expression with resultType string). - public DataFactoryElement TableOption { get; set; } - /// Whether to use table lock during bulk copy. Type: boolean (or Expression with resultType boolean). - public DataFactoryElement SqlWriterUseTableLock { get; set; } - /// - /// Write behavior when copying data into azure SQL DW. Type: SqlDWWriteBehaviorEnum (or Expression with resultType SqlDWWriteBehaviorEnum) - /// - /// To assign an object to this property use . - /// - /// - /// To assign an already formated json string to this property use . - /// - /// - /// Examples: - /// - /// - /// BinaryData.FromObjectAsJson("foo") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromString("\"foo\"") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromObjectAsJson(new { key = "value" }) - /// Creates a payload of { "key": "value" }. - /// - /// - /// BinaryData.FromString("{\"key\": \"value\"}") - /// Creates a payload of { "key": "value" }. - /// - /// - /// - /// - public BinaryData WriteBehavior { get; set; } - /// SQL DW upsert settings. - public SqlDWUpsertSettings UpsertSettings { get; set; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SqlDWSource.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SqlDWSource.Serialization.cs deleted file mode 100644 index df8930e0..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SqlDWSource.Serialization.cs +++ /dev/null @@ -1,244 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class SqlDWSource : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - if (Optional.IsDefined(SqlReaderQuery)) - { - writer.WritePropertyName("sqlReaderQuery"u8); - JsonSerializer.Serialize(writer, SqlReaderQuery); - } - if (Optional.IsDefined(SqlReaderStoredProcedureName)) - { - writer.WritePropertyName("sqlReaderStoredProcedureName"u8); - JsonSerializer.Serialize(writer, SqlReaderStoredProcedureName); - } - if (Optional.IsDefined(StoredProcedureParameters)) - { - writer.WritePropertyName("storedProcedureParameters"u8); -#if NET6_0_OR_GREATER - writer.WriteRawValue(StoredProcedureParameters); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(StoredProcedureParameters.ToString()).RootElement); -#endif - } - if (Optional.IsDefined(IsolationLevel)) - { - writer.WritePropertyName("isolationLevel"u8); - JsonSerializer.Serialize(writer, IsolationLevel); - } - if (Optional.IsDefined(PartitionOption)) - { - writer.WritePropertyName("partitionOption"u8); -#if NET6_0_OR_GREATER - writer.WriteRawValue(PartitionOption); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(PartitionOption.ToString()).RootElement); -#endif - } - if (Optional.IsDefined(PartitionSettings)) - { - writer.WritePropertyName("partitionSettings"u8); - writer.WriteObjectValue(PartitionSettings); - } - if (Optional.IsDefined(QueryTimeout)) - { - writer.WritePropertyName("queryTimeout"u8); - JsonSerializer.Serialize(writer, QueryTimeout); - } - if (Optional.IsDefined(AdditionalColumns)) - { - writer.WritePropertyName("additionalColumns"u8); -#if NET6_0_OR_GREATER - writer.WriteRawValue(AdditionalColumns); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(AdditionalColumns.ToString()).RootElement); -#endif - } - writer.WritePropertyName("type"u8); - writer.WriteStringValue(CopySourceType); - if (Optional.IsDefined(SourceRetryCount)) - { - writer.WritePropertyName("sourceRetryCount"u8); - JsonSerializer.Serialize(writer, SourceRetryCount); - } - if (Optional.IsDefined(SourceRetryWait)) - { - writer.WritePropertyName("sourceRetryWait"u8); - JsonSerializer.Serialize(writer, SourceRetryWait); - } - if (Optional.IsDefined(MaxConcurrentConnections)) - { - writer.WritePropertyName("maxConcurrentConnections"u8); - JsonSerializer.Serialize(writer, MaxConcurrentConnections); - } - if (Optional.IsDefined(DisableMetricsCollection)) - { - writer.WritePropertyName("disableMetricsCollection"u8); - JsonSerializer.Serialize(writer, DisableMetricsCollection); - } - foreach (var item in AdditionalProperties) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.Value.ToString()).RootElement); -#endif - } - writer.WriteEndObject(); - } - - internal static SqlDWSource DeserializeSqlDWSource(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - Optional> sqlReaderQuery = default; - Optional> sqlReaderStoredProcedureName = default; - Optional storedProcedureParameters = default; - Optional> isolationLevel = default; - Optional partitionOption = default; - Optional partitionSettings = default; - Optional> queryTimeout = default; - Optional additionalColumns = default; - string type = default; - Optional> sourceRetryCount = default; - Optional> sourceRetryWait = default; - Optional> maxConcurrentConnections = default; - Optional> disableMetricsCollection = default; - IDictionary> additionalProperties = default; - Dictionary> additionalPropertiesDictionary = new Dictionary>(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("sqlReaderQuery"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - sqlReaderQuery = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("sqlReaderStoredProcedureName"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - sqlReaderStoredProcedureName = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("storedProcedureParameters"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - storedProcedureParameters = BinaryData.FromString(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("isolationLevel"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - isolationLevel = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("partitionOption"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - partitionOption = BinaryData.FromString(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("partitionSettings"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - partitionSettings = SqlPartitionSettings.DeserializeSqlPartitionSettings(property.Value); - continue; - } - if (property.NameEquals("queryTimeout"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - queryTimeout = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("additionalColumns"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - additionalColumns = BinaryData.FromString(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("type"u8)) - { - type = property.Value.GetString(); - continue; - } - if (property.NameEquals("sourceRetryCount"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - sourceRetryCount = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("sourceRetryWait"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - sourceRetryWait = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("maxConcurrentConnections"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - maxConcurrentConnections = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("disableMetricsCollection"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - disableMetricsCollection = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - additionalPropertiesDictionary.Add(property.Name, JsonSerializer.Deserialize>(property.Value.GetRawText())); - } - additionalProperties = additionalPropertiesDictionary; - return new SqlDWSource(type, sourceRetryCount.Value, sourceRetryWait.Value, maxConcurrentConnections.Value, disableMetricsCollection.Value, additionalProperties, queryTimeout.Value, additionalColumns.Value, sqlReaderQuery.Value, sqlReaderStoredProcedureName.Value, storedProcedureParameters.Value, isolationLevel.Value, partitionOption.Value, partitionSettings.Value); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SqlDWSource.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SqlDWSource.cs deleted file mode 100644 index b0c13448..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SqlDWSource.cs +++ /dev/null @@ -1,115 +0,0 @@ -// - -#nullable disable - -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// A copy activity SQL Data Warehouse source. - public partial class SqlDWSource : TabularSource - { - /// Initializes a new instance of SqlDWSource. - public SqlDWSource() - { - CopySourceType = "SqlDWSource"; - } - - /// Initializes a new instance of SqlDWSource. - /// Copy source type. - /// Source retry count. Type: integer (or Expression with resultType integer). - /// Source retry wait. Type: string (or Expression with resultType string), pattern: ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). - /// The maximum concurrent connection count for the source data store. Type: integer (or Expression with resultType integer). - /// If true, disable data store metrics collection. Default is false. Type: boolean (or Expression with resultType boolean). - /// Additional Properties. - /// 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). - /// SQL Data Warehouse reader query. Type: string (or Expression with resultType string). - /// Name of the stored procedure for a SQL Data Warehouse source. This cannot be used at the same time as SqlReaderQuery. Type: string (or Expression with resultType string). - /// Value and type setting for stored procedure parameters. Example: "{Parameter1: {value: "1", type: "int"}}". Type: object (or Expression with resultType object), itemType: StoredProcedureParameter. - /// Specifies the transaction locking behavior for the SQL source. Allowed values: ReadCommitted/ReadUncommitted/RepeatableRead/Serializable/Snapshot. The default value is ReadCommitted. Type: string (or Expression with resultType string). - /// The partition mechanism that will be used for Sql read in parallel. Possible values include: "None", "PhysicalPartitionsOfTable", "DynamicRange". - /// The settings that will be leveraged for Sql source partitioning. - internal SqlDWSource(string copySourceType, DataFactoryElement sourceRetryCount, DataFactoryElement sourceRetryWait, DataFactoryElement maxConcurrentConnections, DataFactoryElement disableMetricsCollection, IDictionary> additionalProperties, DataFactoryElement queryTimeout, BinaryData additionalColumns, DataFactoryElement sqlReaderQuery, DataFactoryElement sqlReaderStoredProcedureName, BinaryData storedProcedureParameters, DataFactoryElement isolationLevel, BinaryData partitionOption, SqlPartitionSettings partitionSettings) : base(copySourceType, sourceRetryCount, sourceRetryWait, maxConcurrentConnections, disableMetricsCollection, additionalProperties, queryTimeout, additionalColumns) - { - SqlReaderQuery = sqlReaderQuery; - SqlReaderStoredProcedureName = sqlReaderStoredProcedureName; - StoredProcedureParameters = storedProcedureParameters; - IsolationLevel = isolationLevel; - PartitionOption = partitionOption; - PartitionSettings = partitionSettings; - CopySourceType = copySourceType ?? "SqlDWSource"; - } - - /// SQL Data Warehouse reader query. Type: string (or Expression with resultType string). - public DataFactoryElement SqlReaderQuery { get; set; } - /// Name of the stored procedure for a SQL Data Warehouse source. This cannot be used at the same time as SqlReaderQuery. Type: string (or Expression with resultType string). - public DataFactoryElement SqlReaderStoredProcedureName { get; set; } - /// - /// Value and type setting for stored procedure parameters. Example: "{Parameter1: {value: "1", type: "int"}}". Type: object (or Expression with resultType object), itemType: StoredProcedureParameter. - /// - /// To assign an object to this property use . - /// - /// - /// To assign an already formated json string to this property use . - /// - /// - /// Examples: - /// - /// - /// BinaryData.FromObjectAsJson("foo") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromString("\"foo\"") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromObjectAsJson(new { key = "value" }) - /// Creates a payload of { "key": "value" }. - /// - /// - /// BinaryData.FromString("{\"key\": \"value\"}") - /// Creates a payload of { "key": "value" }. - /// - /// - /// - /// - public BinaryData StoredProcedureParameters { get; set; } - /// Specifies the transaction locking behavior for the SQL source. Allowed values: ReadCommitted/ReadUncommitted/RepeatableRead/Serializable/Snapshot. The default value is ReadCommitted. Type: string (or Expression with resultType string). - public DataFactoryElement IsolationLevel { get; set; } - /// - /// The partition mechanism that will be used for Sql read in parallel. Possible values include: "None", "PhysicalPartitionsOfTable", "DynamicRange". - /// - /// To assign an object to this property use . - /// - /// - /// To assign an already formated json string to this property use . - /// - /// - /// Examples: - /// - /// - /// BinaryData.FromObjectAsJson("foo") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromString("\"foo\"") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromObjectAsJson(new { key = "value" }) - /// Creates a payload of { "key": "value" }. - /// - /// - /// BinaryData.FromString("{\"key\": \"value\"}") - /// Creates a payload of { "key": "value" }. - /// - /// - /// - /// - public BinaryData PartitionOption { get; set; } - /// The settings that will be leveraged for Sql source partitioning. - public SqlPartitionSettings PartitionSettings { get; set; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SqlDWUpsertSettings.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SqlDWUpsertSettings.Serialization.cs deleted file mode 100644 index de87d137..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SqlDWUpsertSettings.Serialization.cs +++ /dev/null @@ -1,61 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class SqlDWUpsertSettings : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - if (Optional.IsDefined(InterimSchemaName)) - { - writer.WritePropertyName("interimSchemaName"u8); - JsonSerializer.Serialize(writer, InterimSchemaName); - } - if (Optional.IsDefined(Keys)) - { - writer.WritePropertyName("keys"u8); - JsonSerializer.Serialize(writer, Keys); - } - writer.WriteEndObject(); - } - - internal static SqlDWUpsertSettings DeserializeSqlDWUpsertSettings(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - Optional> interimSchemaName = default; - Optional>> keys = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("interimSchemaName"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - interimSchemaName = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("keys"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - keys = JsonSerializer.Deserialize>>(property.Value.GetRawText()); - continue; - } - } - return new SqlDWUpsertSettings(interimSchemaName.Value, keys.Value); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SqlDWUpsertSettings.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SqlDWUpsertSettings.cs deleted file mode 100644 index 56508173..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SqlDWUpsertSettings.cs +++ /dev/null @@ -1,31 +0,0 @@ -// - -#nullable disable - -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// Sql DW upsert option settings. - public partial class SqlDWUpsertSettings - { - /// Initializes a new instance of SqlDWUpsertSettings. - public SqlDWUpsertSettings() - { - } - - /// Initializes a new instance of SqlDWUpsertSettings. - /// Schema name for interim table. Type: string (or Expression with resultType string). - /// Key column names for unique row identification. Type: array of strings (or Expression with resultType array of strings). - internal SqlDWUpsertSettings(DataFactoryElement interimSchemaName, DataFactoryElement> keys) - { - InterimSchemaName = interimSchemaName; - Keys = keys; - } - - /// Schema name for interim table. Type: string (or Expression with resultType string). - public DataFactoryElement InterimSchemaName { get; set; } - /// Key column names for unique row identification. Type: array of strings (or Expression with resultType array of strings). - public DataFactoryElement> Keys { get; set; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SqlMISink.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SqlMISink.Serialization.cs deleted file mode 100644 index 7b57b8f3..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SqlMISink.Serialization.cs +++ /dev/null @@ -1,285 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class SqlMISink : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - if (Optional.IsDefined(SqlWriterStoredProcedureName)) - { - writer.WritePropertyName("sqlWriterStoredProcedureName"u8); - JsonSerializer.Serialize(writer, SqlWriterStoredProcedureName); - } - if (Optional.IsDefined(SqlWriterTableType)) - { - writer.WritePropertyName("sqlWriterTableType"u8); - JsonSerializer.Serialize(writer, SqlWriterTableType); - } - if (Optional.IsDefined(PreCopyScript)) - { - writer.WritePropertyName("preCopyScript"u8); - JsonSerializer.Serialize(writer, PreCopyScript); - } - if (Optional.IsDefined(StoredProcedureParameters)) - { - writer.WritePropertyName("storedProcedureParameters"u8); -#if NET6_0_OR_GREATER - writer.WriteRawValue(StoredProcedureParameters); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(StoredProcedureParameters.ToString()).RootElement); -#endif - } - if (Optional.IsDefined(StoredProcedureTableTypeParameterName)) - { - writer.WritePropertyName("storedProcedureTableTypeParameterName"u8); - JsonSerializer.Serialize(writer, StoredProcedureTableTypeParameterName); - } - if (Optional.IsDefined(TableOption)) - { - writer.WritePropertyName("tableOption"u8); - JsonSerializer.Serialize(writer, TableOption); - } - if (Optional.IsDefined(SqlWriterUseTableLock)) - { - writer.WritePropertyName("sqlWriterUseTableLock"u8); - JsonSerializer.Serialize(writer, SqlWriterUseTableLock); - } - if (Optional.IsDefined(WriteBehavior)) - { - writer.WritePropertyName("writeBehavior"u8); -#if NET6_0_OR_GREATER - writer.WriteRawValue(WriteBehavior); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(WriteBehavior.ToString()).RootElement); -#endif - } - if (Optional.IsDefined(UpsertSettings)) - { - writer.WritePropertyName("upsertSettings"u8); - writer.WriteObjectValue(UpsertSettings); - } - writer.WritePropertyName("type"u8); - writer.WriteStringValue(CopySinkType); - if (Optional.IsDefined(WriteBatchSize)) - { - writer.WritePropertyName("writeBatchSize"u8); - JsonSerializer.Serialize(writer, WriteBatchSize); - } - if (Optional.IsDefined(WriteBatchTimeout)) - { - writer.WritePropertyName("writeBatchTimeout"u8); - JsonSerializer.Serialize(writer, WriteBatchTimeout); - } - if (Optional.IsDefined(SinkRetryCount)) - { - writer.WritePropertyName("sinkRetryCount"u8); - JsonSerializer.Serialize(writer, SinkRetryCount); - } - if (Optional.IsDefined(SinkRetryWait)) - { - writer.WritePropertyName("sinkRetryWait"u8); - JsonSerializer.Serialize(writer, SinkRetryWait); - } - if (Optional.IsDefined(MaxConcurrentConnections)) - { - writer.WritePropertyName("maxConcurrentConnections"u8); - JsonSerializer.Serialize(writer, MaxConcurrentConnections); - } - if (Optional.IsDefined(DisableMetricsCollection)) - { - writer.WritePropertyName("disableMetricsCollection"u8); - JsonSerializer.Serialize(writer, DisableMetricsCollection); - } - foreach (var item in AdditionalProperties) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.Value.ToString()).RootElement); -#endif - } - writer.WriteEndObject(); - } - - internal static SqlMISink DeserializeSqlMISink(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - Optional> sqlWriterStoredProcedureName = default; - Optional> sqlWriterTableType = default; - Optional> preCopyScript = default; - Optional storedProcedureParameters = default; - Optional> storedProcedureTableTypeParameterName = default; - Optional> tableOption = default; - Optional> sqlWriterUseTableLock = default; - Optional writeBehavior = default; - Optional upsertSettings = default; - string type = default; - Optional> writeBatchSize = default; - Optional> writeBatchTimeout = default; - Optional> sinkRetryCount = default; - Optional> sinkRetryWait = default; - Optional> maxConcurrentConnections = default; - Optional> disableMetricsCollection = default; - IDictionary> additionalProperties = default; - Dictionary> additionalPropertiesDictionary = new Dictionary>(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("sqlWriterStoredProcedureName"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - sqlWriterStoredProcedureName = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("sqlWriterTableType"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - sqlWriterTableType = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("preCopyScript"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - preCopyScript = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("storedProcedureParameters"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - storedProcedureParameters = BinaryData.FromString(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("storedProcedureTableTypeParameterName"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - storedProcedureTableTypeParameterName = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("tableOption"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - tableOption = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("sqlWriterUseTableLock"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - sqlWriterUseTableLock = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("writeBehavior"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - writeBehavior = BinaryData.FromString(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("upsertSettings"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - upsertSettings = SqlUpsertSettings.DeserializeSqlUpsertSettings(property.Value); - continue; - } - if (property.NameEquals("type"u8)) - { - type = property.Value.GetString(); - continue; - } - if (property.NameEquals("writeBatchSize"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - writeBatchSize = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("writeBatchTimeout"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - writeBatchTimeout = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("sinkRetryCount"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - sinkRetryCount = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("sinkRetryWait"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - sinkRetryWait = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("maxConcurrentConnections"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - maxConcurrentConnections = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("disableMetricsCollection"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - disableMetricsCollection = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - additionalPropertiesDictionary.Add(property.Name, JsonSerializer.Deserialize>(property.Value.GetRawText())); - } - additionalProperties = additionalPropertiesDictionary; - return new SqlMISink(type, writeBatchSize.Value, writeBatchTimeout.Value, sinkRetryCount.Value, sinkRetryWait.Value, maxConcurrentConnections.Value, disableMetricsCollection.Value, additionalProperties, sqlWriterStoredProcedureName.Value, sqlWriterTableType.Value, preCopyScript.Value, storedProcedureParameters.Value, storedProcedureTableTypeParameterName.Value, tableOption.Value, sqlWriterUseTableLock.Value, writeBehavior.Value, upsertSettings.Value); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SqlMISink.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SqlMISink.cs deleted file mode 100644 index 994088ed..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SqlMISink.cs +++ /dev/null @@ -1,127 +0,0 @@ -// - -#nullable disable - -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// A copy activity Azure SQL Managed Instance sink. - public partial class SqlMISink : CopySink - { - /// Initializes a new instance of SqlMISink. - public SqlMISink() - { - CopySinkType = "SqlMISink"; - } - - /// Initializes a new instance of SqlMISink. - /// Copy sink type. - /// Write batch size. Type: integer (or Expression with resultType integer), minimum: 0. - /// Write batch timeout. Type: string (or Expression with resultType string), pattern: ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). - /// Sink retry count. Type: integer (or Expression with resultType integer). - /// Sink retry wait. Type: string (or Expression with resultType string), pattern: ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). - /// The maximum concurrent connection count for the sink data store. Type: integer (or Expression with resultType integer). - /// If true, disable data store metrics collection. Default is false. Type: boolean (or Expression with resultType boolean). - /// Additional Properties. - /// SQL writer stored procedure name. Type: string (or Expression with resultType string). - /// SQL writer table type. Type: string (or Expression with resultType string). - /// SQL pre-copy script. Type: string (or Expression with resultType string). - /// SQL stored procedure parameters. - /// The stored procedure parameter name of the table type. Type: string (or Expression with resultType string). - /// The option to handle sink table, such as autoCreate. For now only 'autoCreate' value is supported. Type: string (or Expression with resultType string). - /// Whether to use table lock during bulk copy. Type: boolean (or Expression with resultType boolean). - /// White behavior when copying data into azure SQL MI. Type: SqlWriteBehaviorEnum (or Expression with resultType SqlWriteBehaviorEnum). - /// SQL upsert settings. - internal SqlMISink(string copySinkType, DataFactoryElement writeBatchSize, DataFactoryElement writeBatchTimeout, DataFactoryElement sinkRetryCount, DataFactoryElement sinkRetryWait, DataFactoryElement maxConcurrentConnections, DataFactoryElement disableMetricsCollection, IDictionary> additionalProperties, DataFactoryElement sqlWriterStoredProcedureName, DataFactoryElement sqlWriterTableType, DataFactoryElement preCopyScript, BinaryData storedProcedureParameters, DataFactoryElement storedProcedureTableTypeParameterName, DataFactoryElement tableOption, DataFactoryElement sqlWriterUseTableLock, BinaryData writeBehavior, SqlUpsertSettings upsertSettings) : base(copySinkType, writeBatchSize, writeBatchTimeout, sinkRetryCount, sinkRetryWait, maxConcurrentConnections, disableMetricsCollection, additionalProperties) - { - SqlWriterStoredProcedureName = sqlWriterStoredProcedureName; - SqlWriterTableType = sqlWriterTableType; - PreCopyScript = preCopyScript; - StoredProcedureParameters = storedProcedureParameters; - StoredProcedureTableTypeParameterName = storedProcedureTableTypeParameterName; - TableOption = tableOption; - SqlWriterUseTableLock = sqlWriterUseTableLock; - WriteBehavior = writeBehavior; - UpsertSettings = upsertSettings; - CopySinkType = copySinkType ?? "SqlMISink"; - } - - /// SQL writer stored procedure name. Type: string (or Expression with resultType string). - public DataFactoryElement SqlWriterStoredProcedureName { get; set; } - /// SQL writer table type. Type: string (or Expression with resultType string). - public DataFactoryElement SqlWriterTableType { get; set; } - /// SQL pre-copy script. Type: string (or Expression with resultType string). - public DataFactoryElement PreCopyScript { get; set; } - /// - /// SQL stored procedure parameters. - /// - /// To assign an object to this property use . - /// - /// - /// To assign an already formated json string to this property use . - /// - /// - /// Examples: - /// - /// - /// BinaryData.FromObjectAsJson("foo") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromString("\"foo\"") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromObjectAsJson(new { key = "value" }) - /// Creates a payload of { "key": "value" }. - /// - /// - /// BinaryData.FromString("{\"key\": \"value\"}") - /// Creates a payload of { "key": "value" }. - /// - /// - /// - /// - public BinaryData StoredProcedureParameters { get; set; } - /// The stored procedure parameter name of the table type. Type: string (or Expression with resultType string). - public DataFactoryElement StoredProcedureTableTypeParameterName { get; set; } - /// The option to handle sink table, such as autoCreate. For now only 'autoCreate' value is supported. Type: string (or Expression with resultType string). - public DataFactoryElement TableOption { get; set; } - /// Whether to use table lock during bulk copy. Type: boolean (or Expression with resultType boolean). - public DataFactoryElement SqlWriterUseTableLock { get; set; } - /// - /// White behavior when copying data into azure SQL MI. Type: SqlWriteBehaviorEnum (or Expression with resultType SqlWriteBehaviorEnum) - /// - /// To assign an object to this property use . - /// - /// - /// To assign an already formated json string to this property use . - /// - /// - /// Examples: - /// - /// - /// BinaryData.FromObjectAsJson("foo") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromString("\"foo\"") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromObjectAsJson(new { key = "value" }) - /// Creates a payload of { "key": "value" }. - /// - /// - /// BinaryData.FromString("{\"key\": \"value\"}") - /// Creates a payload of { "key": "value" }. - /// - /// - /// - /// - public BinaryData WriteBehavior { get; set; } - /// SQL upsert settings. - public SqlUpsertSettings UpsertSettings { get; set; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SqlMISource.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SqlMISource.Serialization.cs deleted file mode 100644 index 2b187011..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SqlMISource.Serialization.cs +++ /dev/null @@ -1,263 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class SqlMISource : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - if (Optional.IsDefined(SqlReaderQuery)) - { - writer.WritePropertyName("sqlReaderQuery"u8); - JsonSerializer.Serialize(writer, SqlReaderQuery); - } - if (Optional.IsDefined(SqlReaderStoredProcedureName)) - { - writer.WritePropertyName("sqlReaderStoredProcedureName"u8); - JsonSerializer.Serialize(writer, SqlReaderStoredProcedureName); - } - if (Optional.IsDefined(StoredProcedureParameters)) - { - writer.WritePropertyName("storedProcedureParameters"u8); -#if NET6_0_OR_GREATER - writer.WriteRawValue(StoredProcedureParameters); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(StoredProcedureParameters.ToString()).RootElement); -#endif - } - if (Optional.IsDefined(IsolationLevel)) - { - writer.WritePropertyName("isolationLevel"u8); - JsonSerializer.Serialize(writer, IsolationLevel); - } - if (Optional.IsDefined(ProduceAdditionalTypes)) - { - writer.WritePropertyName("produceAdditionalTypes"u8); -#if NET6_0_OR_GREATER - writer.WriteRawValue(ProduceAdditionalTypes); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(ProduceAdditionalTypes.ToString()).RootElement); -#endif - } - if (Optional.IsDefined(PartitionOption)) - { - writer.WritePropertyName("partitionOption"u8); -#if NET6_0_OR_GREATER - writer.WriteRawValue(PartitionOption); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(PartitionOption.ToString()).RootElement); -#endif - } - if (Optional.IsDefined(PartitionSettings)) - { - writer.WritePropertyName("partitionSettings"u8); - writer.WriteObjectValue(PartitionSettings); - } - if (Optional.IsDefined(QueryTimeout)) - { - writer.WritePropertyName("queryTimeout"u8); - JsonSerializer.Serialize(writer, QueryTimeout); - } - if (Optional.IsDefined(AdditionalColumns)) - { - writer.WritePropertyName("additionalColumns"u8); -#if NET6_0_OR_GREATER - writer.WriteRawValue(AdditionalColumns); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(AdditionalColumns.ToString()).RootElement); -#endif - } - writer.WritePropertyName("type"u8); - writer.WriteStringValue(CopySourceType); - if (Optional.IsDefined(SourceRetryCount)) - { - writer.WritePropertyName("sourceRetryCount"u8); - JsonSerializer.Serialize(writer, SourceRetryCount); - } - if (Optional.IsDefined(SourceRetryWait)) - { - writer.WritePropertyName("sourceRetryWait"u8); - JsonSerializer.Serialize(writer, SourceRetryWait); - } - if (Optional.IsDefined(MaxConcurrentConnections)) - { - writer.WritePropertyName("maxConcurrentConnections"u8); - JsonSerializer.Serialize(writer, MaxConcurrentConnections); - } - if (Optional.IsDefined(DisableMetricsCollection)) - { - writer.WritePropertyName("disableMetricsCollection"u8); - JsonSerializer.Serialize(writer, DisableMetricsCollection); - } - foreach (var item in AdditionalProperties) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.Value.ToString()).RootElement); -#endif - } - writer.WriteEndObject(); - } - - internal static SqlMISource DeserializeSqlMISource(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - Optional> sqlReaderQuery = default; - Optional> sqlReaderStoredProcedureName = default; - Optional storedProcedureParameters = default; - Optional> isolationLevel = default; - Optional produceAdditionalTypes = default; - Optional partitionOption = default; - Optional partitionSettings = default; - Optional> queryTimeout = default; - Optional additionalColumns = default; - string type = default; - Optional> sourceRetryCount = default; - Optional> sourceRetryWait = default; - Optional> maxConcurrentConnections = default; - Optional> disableMetricsCollection = default; - IDictionary> additionalProperties = default; - Dictionary> additionalPropertiesDictionary = new Dictionary>(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("sqlReaderQuery"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - sqlReaderQuery = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("sqlReaderStoredProcedureName"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - sqlReaderStoredProcedureName = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("storedProcedureParameters"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - storedProcedureParameters = BinaryData.FromString(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("isolationLevel"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - isolationLevel = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("produceAdditionalTypes"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - produceAdditionalTypes = BinaryData.FromString(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("partitionOption"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - partitionOption = BinaryData.FromString(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("partitionSettings"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - partitionSettings = SqlPartitionSettings.DeserializeSqlPartitionSettings(property.Value); - continue; - } - if (property.NameEquals("queryTimeout"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - queryTimeout = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("additionalColumns"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - additionalColumns = BinaryData.FromString(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("type"u8)) - { - type = property.Value.GetString(); - continue; - } - if (property.NameEquals("sourceRetryCount"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - sourceRetryCount = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("sourceRetryWait"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - sourceRetryWait = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("maxConcurrentConnections"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - maxConcurrentConnections = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("disableMetricsCollection"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - disableMetricsCollection = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - additionalPropertiesDictionary.Add(property.Name, JsonSerializer.Deserialize>(property.Value.GetRawText())); - } - additionalProperties = additionalPropertiesDictionary; - return new SqlMISource(type, sourceRetryCount.Value, sourceRetryWait.Value, maxConcurrentConnections.Value, disableMetricsCollection.Value, additionalProperties, queryTimeout.Value, additionalColumns.Value, sqlReaderQuery.Value, sqlReaderStoredProcedureName.Value, storedProcedureParameters.Value, isolationLevel.Value, produceAdditionalTypes.Value, partitionOption.Value, partitionSettings.Value); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SqlMISource.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SqlMISource.cs deleted file mode 100644 index fdf9433f..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SqlMISource.cs +++ /dev/null @@ -1,148 +0,0 @@ -// - -#nullable disable - -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// A copy activity Azure SQL Managed Instance source. - public partial class SqlMISource : TabularSource - { - /// Initializes a new instance of SqlMISource. - public SqlMISource() - { - CopySourceType = "SqlMISource"; - } - - /// Initializes a new instance of SqlMISource. - /// Copy source type. - /// Source retry count. Type: integer (or Expression with resultType integer). - /// Source retry wait. Type: string (or Expression with resultType string), pattern: ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). - /// The maximum concurrent connection count for the source data store. Type: integer (or Expression with resultType integer). - /// If true, disable data store metrics collection. Default is false. Type: boolean (or Expression with resultType boolean). - /// Additional Properties. - /// 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). - /// SQL reader query. Type: string (or Expression with resultType string). - /// Name of the stored procedure for a Azure SQL Managed Instance source. This cannot be used at the same time as SqlReaderQuery. Type: string (or Expression with resultType string). - /// Value and type setting for stored procedure parameters. Example: "{Parameter1: {value: "1", type: "int"}}". - /// Specifies the transaction locking behavior for the SQL source. Allowed values: ReadCommitted/ReadUncommitted/RepeatableRead/Serializable/Snapshot. The default value is ReadCommitted. Type: string (or Expression with resultType string). - /// Which additional types to produce. - /// The partition mechanism that will be used for Sql read in parallel. Possible values include: "None", "PhysicalPartitionsOfTable", "DynamicRange". - /// The settings that will be leveraged for Sql source partitioning. - internal SqlMISource(string copySourceType, DataFactoryElement sourceRetryCount, DataFactoryElement sourceRetryWait, DataFactoryElement maxConcurrentConnections, DataFactoryElement disableMetricsCollection, IDictionary> additionalProperties, DataFactoryElement queryTimeout, BinaryData additionalColumns, DataFactoryElement sqlReaderQuery, DataFactoryElement sqlReaderStoredProcedureName, BinaryData storedProcedureParameters, DataFactoryElement isolationLevel, BinaryData produceAdditionalTypes, BinaryData partitionOption, SqlPartitionSettings partitionSettings) : base(copySourceType, sourceRetryCount, sourceRetryWait, maxConcurrentConnections, disableMetricsCollection, additionalProperties, queryTimeout, additionalColumns) - { - SqlReaderQuery = sqlReaderQuery; - SqlReaderStoredProcedureName = sqlReaderStoredProcedureName; - StoredProcedureParameters = storedProcedureParameters; - IsolationLevel = isolationLevel; - ProduceAdditionalTypes = produceAdditionalTypes; - PartitionOption = partitionOption; - PartitionSettings = partitionSettings; - CopySourceType = copySourceType ?? "SqlMISource"; - } - - /// SQL reader query. Type: string (or Expression with resultType string). - public DataFactoryElement SqlReaderQuery { get; set; } - /// Name of the stored procedure for a Azure SQL Managed Instance source. This cannot be used at the same time as SqlReaderQuery. Type: string (or Expression with resultType string). - public DataFactoryElement SqlReaderStoredProcedureName { get; set; } - /// - /// Value and type setting for stored procedure parameters. Example: "{Parameter1: {value: "1", type: "int"}}". - /// - /// To assign an object to this property use . - /// - /// - /// To assign an already formated json string to this property use . - /// - /// - /// Examples: - /// - /// - /// BinaryData.FromObjectAsJson("foo") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromString("\"foo\"") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromObjectAsJson(new { key = "value" }) - /// Creates a payload of { "key": "value" }. - /// - /// - /// BinaryData.FromString("{\"key\": \"value\"}") - /// Creates a payload of { "key": "value" }. - /// - /// - /// - /// - public BinaryData StoredProcedureParameters { get; set; } - /// Specifies the transaction locking behavior for the SQL source. Allowed values: ReadCommitted/ReadUncommitted/RepeatableRead/Serializable/Snapshot. The default value is ReadCommitted. Type: string (or Expression with resultType string). - public DataFactoryElement IsolationLevel { get; set; } - /// - /// Which additional types to produce. - /// - /// To assign an object to this property use . - /// - /// - /// To assign an already formated json string to this property use . - /// - /// - /// Examples: - /// - /// - /// BinaryData.FromObjectAsJson("foo") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromString("\"foo\"") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromObjectAsJson(new { key = "value" }) - /// Creates a payload of { "key": "value" }. - /// - /// - /// BinaryData.FromString("{\"key\": \"value\"}") - /// Creates a payload of { "key": "value" }. - /// - /// - /// - /// - public BinaryData ProduceAdditionalTypes { get; set; } - /// - /// The partition mechanism that will be used for Sql read in parallel. Possible values include: "None", "PhysicalPartitionsOfTable", "DynamicRange". - /// - /// To assign an object to this property use . - /// - /// - /// To assign an already formated json string to this property use . - /// - /// - /// Examples: - /// - /// - /// BinaryData.FromObjectAsJson("foo") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromString("\"foo\"") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromObjectAsJson(new { key = "value" }) - /// Creates a payload of { "key": "value" }. - /// - /// - /// BinaryData.FromString("{\"key\": \"value\"}") - /// Creates a payload of { "key": "value" }. - /// - /// - /// - /// - public BinaryData PartitionOption { get; set; } - /// The settings that will be leveraged for Sql source partitioning. - public SqlPartitionSettings PartitionSettings { get; set; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SqlPartitionSettings.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SqlPartitionSettings.Serialization.cs deleted file mode 100644 index 90b9dc34..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SqlPartitionSettings.Serialization.cs +++ /dev/null @@ -1,76 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class SqlPartitionSettings : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - if (Optional.IsDefined(PartitionColumnName)) - { - writer.WritePropertyName("partitionColumnName"u8); - JsonSerializer.Serialize(writer, PartitionColumnName); - } - if (Optional.IsDefined(PartitionUpperBound)) - { - writer.WritePropertyName("partitionUpperBound"u8); - JsonSerializer.Serialize(writer, PartitionUpperBound); - } - if (Optional.IsDefined(PartitionLowerBound)) - { - writer.WritePropertyName("partitionLowerBound"u8); - JsonSerializer.Serialize(writer, PartitionLowerBound); - } - writer.WriteEndObject(); - } - - internal static SqlPartitionSettings DeserializeSqlPartitionSettings(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - Optional> partitionColumnName = default; - Optional> partitionUpperBound = default; - Optional> partitionLowerBound = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("partitionColumnName"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - partitionColumnName = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("partitionUpperBound"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - partitionUpperBound = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("partitionLowerBound"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - partitionLowerBound = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - } - return new SqlPartitionSettings(partitionColumnName.Value, partitionUpperBound.Value, partitionLowerBound.Value); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SqlPartitionSettings.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SqlPartitionSettings.cs deleted file mode 100644 index 513174d5..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SqlPartitionSettings.cs +++ /dev/null @@ -1,35 +0,0 @@ -// - -#nullable disable - -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// The settings that will be leveraged for Sql source partitioning. - public partial class SqlPartitionSettings - { - /// Initializes a new instance of SqlPartitionSettings. - public SqlPartitionSettings() - { - } - - /// Initializes a new instance of SqlPartitionSettings. - /// The name of the column in integer or datetime type that will be used for proceeding partitioning. If not specified, the primary key of the table is auto-detected and used as the partition column. Type: string (or Expression with resultType string). - /// The maximum value of the partition column for partition range splitting. This value is used to decide the partition stride, not for filtering the rows in table. All rows in the table or query result will be partitioned and copied. Type: string (or Expression with resultType string). - /// The minimum value of the partition column for partition range splitting. This value is used to decide the partition stride, not for filtering the rows in table. All rows in the table or query result will be partitioned and copied. Type: string (or Expression with resultType string). - internal SqlPartitionSettings(DataFactoryElement partitionColumnName, DataFactoryElement partitionUpperBound, DataFactoryElement partitionLowerBound) - { - PartitionColumnName = partitionColumnName; - PartitionUpperBound = partitionUpperBound; - PartitionLowerBound = partitionLowerBound; - } - - /// The name of the column in integer or datetime type that will be used for proceeding partitioning. If not specified, the primary key of the table is auto-detected and used as the partition column. Type: string (or Expression with resultType string). - public DataFactoryElement PartitionColumnName { get; set; } - /// The maximum value of the partition column for partition range splitting. This value is used to decide the partition stride, not for filtering the rows in table. All rows in the table or query result will be partitioned and copied. Type: string (or Expression with resultType string). - public DataFactoryElement PartitionUpperBound { get; set; } - /// The minimum value of the partition column for partition range splitting. This value is used to decide the partition stride, not for filtering the rows in table. All rows in the table or query result will be partitioned and copied. Type: string (or Expression with resultType string). - public DataFactoryElement PartitionLowerBound { get; set; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SqlServerLinkedService.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SqlServerLinkedService.Serialization.cs deleted file mode 100644 index 08300610..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SqlServerLinkedService.Serialization.cs +++ /dev/null @@ -1,224 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class SqlServerLinkedService : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - writer.WritePropertyName("type"u8); - writer.WriteStringValue(LinkedServiceType); - if (Optional.IsDefined(ConnectVia)) - { - writer.WritePropertyName("connectVia"u8); - writer.WriteObjectValue(ConnectVia); - } - if (Optional.IsDefined(Description)) - { - writer.WritePropertyName("description"u8); - writer.WriteStringValue(Description); - } - if (Optional.IsCollectionDefined(Parameters)) - { - writer.WritePropertyName("parameters"u8); - writer.WriteStartObject(); - foreach (var item in Parameters) - { - writer.WritePropertyName(item.Key); - writer.WriteObjectValue(item.Value); - } - writer.WriteEndObject(); - } - if (Optional.IsCollectionDefined(Annotations)) - { - writer.WritePropertyName("annotations"u8); - writer.WriteStartArray(); - foreach (var item in Annotations) - { - if (item == null) - { - writer.WriteNullValue(); - continue; - } -#if NET6_0_OR_GREATER - writer.WriteRawValue(item); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.ToString()).RootElement); -#endif - } - writer.WriteEndArray(); - } - writer.WritePropertyName("typeProperties"u8); - writer.WriteStartObject(); - writer.WritePropertyName("connectionString"u8); - JsonSerializer.Serialize(writer, ConnectionString); - if (Optional.IsDefined(UserName)) - { - writer.WritePropertyName("userName"u8); - JsonSerializer.Serialize(writer, UserName); - } - if (Optional.IsDefined(Password)) - { - writer.WritePropertyName("password"u8); - JsonSerializer.Serialize(writer, Password); - } - if (Optional.IsDefined(EncryptedCredential)) - { - writer.WritePropertyName("encryptedCredential"u8); - writer.WriteStringValue(EncryptedCredential); - } - if (Optional.IsDefined(AlwaysEncryptedSettings)) - { - writer.WritePropertyName("alwaysEncryptedSettings"u8); - writer.WriteObjectValue(AlwaysEncryptedSettings); - } - writer.WriteEndObject(); - foreach (var item in AdditionalProperties) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.Value.ToString()).RootElement); -#endif - } - writer.WriteEndObject(); - } - - internal static SqlServerLinkedService DeserializeSqlServerLinkedService(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - string type = default; - Optional connectVia = default; - Optional description = default; - Optional> parameters = default; - Optional> annotations = default; - DataFactoryElement connectionString = default; - Optional> userName = default; - Optional password = default; - Optional encryptedCredential = default; - Optional alwaysEncryptedSettings = default; - IDictionary> additionalProperties = default; - Dictionary> additionalPropertiesDictionary = new Dictionary>(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("type"u8)) - { - type = property.Value.GetString(); - continue; - } - if (property.NameEquals("connectVia"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - connectVia = IntegrationRuntimeReference.DeserializeIntegrationRuntimeReference(property.Value); - continue; - } - if (property.NameEquals("description"u8)) - { - description = property.Value.GetString(); - continue; - } - if (property.NameEquals("parameters"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - Dictionary dictionary = new Dictionary(); - foreach (var property0 in property.Value.EnumerateObject()) - { - dictionary.Add(property0.Name, EntityParameterSpecification.DeserializeEntityParameterSpecification(property0.Value)); - } - parameters = dictionary; - continue; - } - if (property.NameEquals("annotations"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - if (item.ValueKind == JsonValueKind.Null) - { - array.Add(null); - } - else - { - array.Add(BinaryData.FromString(item.GetRawText())); - } - } - annotations = array; - continue; - } - if (property.NameEquals("typeProperties"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - foreach (var property0 in property.Value.EnumerateObject()) - { - if (property0.NameEquals("connectionString"u8)) - { - connectionString = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("userName"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - userName = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("password"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - password = JsonSerializer.Deserialize(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("encryptedCredential"u8)) - { - encryptedCredential = property0.Value.GetString(); - continue; - } - if (property0.NameEquals("alwaysEncryptedSettings"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - alwaysEncryptedSettings = SqlAlwaysEncryptedProperties.DeserializeSqlAlwaysEncryptedProperties(property0.Value); - continue; - } - } - continue; - } - additionalPropertiesDictionary.Add(property.Name, JsonSerializer.Deserialize>(property.Value.GetRawText())); - } - additionalProperties = additionalPropertiesDictionary; - return new SqlServerLinkedService(type, connectVia.Value, description.Value, Optional.ToDictionary(parameters), Optional.ToList(annotations), additionalProperties, connectionString, userName.Value, password, encryptedCredential.Value, alwaysEncryptedSettings.Value); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SqlServerLinkedService.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SqlServerLinkedService.cs deleted file mode 100644 index 97166f9f..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SqlServerLinkedService.cs +++ /dev/null @@ -1,57 +0,0 @@ -// - -#nullable disable - -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// SQL Server linked service. - public partial class SqlServerLinkedService : DataFactoryLinkedServiceProperties - { - /// Initializes a new instance of SqlServerLinkedService. - /// The connection string. Type: string, SecureString or AzureKeyVaultSecretReference. - /// is null. - public SqlServerLinkedService(DataFactoryElement connectionString) - { - Argument.AssertNotNull(connectionString, nameof(connectionString)); - - ConnectionString = connectionString; - LinkedServiceType = "SqlServer"; - } - - /// Initializes a new instance of SqlServerLinkedService. - /// Type of linked service. - /// The integration runtime reference. - /// Linked service description. - /// Parameters for linked service. - /// List of tags that can be used for describing the linked service. - /// Additional Properties. - /// The connection string. Type: string, SecureString or AzureKeyVaultSecretReference. - /// The on-premises Windows authentication user name. Type: string (or Expression with resultType string). - /// The on-premises Windows authentication password. - /// The encrypted credential used for authentication. Credentials are encrypted using the integration runtime credential manager. Type: string. - /// Sql always encrypted properties. - internal SqlServerLinkedService(string linkedServiceType, IntegrationRuntimeReference connectVia, string description, IDictionary parameters, IList annotations, IDictionary> additionalProperties, DataFactoryElement connectionString, DataFactoryElement userName, DataFactorySecretBaseDefinition password, string encryptedCredential, SqlAlwaysEncryptedProperties alwaysEncryptedSettings) : base(linkedServiceType, connectVia, description, parameters, annotations, additionalProperties) - { - ConnectionString = connectionString; - UserName = userName; - Password = password; - EncryptedCredential = encryptedCredential; - AlwaysEncryptedSettings = alwaysEncryptedSettings; - LinkedServiceType = linkedServiceType ?? "SqlServer"; - } - - /// The connection string. Type: string, SecureString or AzureKeyVaultSecretReference. - public DataFactoryElement ConnectionString { get; set; } - /// The on-premises Windows authentication user name. Type: string (or Expression with resultType string). - public DataFactoryElement UserName { get; set; } - /// The on-premises Windows authentication password. - public DataFactorySecretBaseDefinition Password { get; set; } - /// The encrypted credential used for authentication. Credentials are encrypted using the integration runtime credential manager. Type: string. - public string EncryptedCredential { get; set; } - /// Sql always encrypted properties. - public SqlAlwaysEncryptedProperties AlwaysEncryptedSettings { get; set; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SqlServerSink.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SqlServerSink.Serialization.cs deleted file mode 100644 index d7b6dc0d..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SqlServerSink.Serialization.cs +++ /dev/null @@ -1,285 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class SqlServerSink : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - if (Optional.IsDefined(SqlWriterStoredProcedureName)) - { - writer.WritePropertyName("sqlWriterStoredProcedureName"u8); - JsonSerializer.Serialize(writer, SqlWriterStoredProcedureName); - } - if (Optional.IsDefined(SqlWriterTableType)) - { - writer.WritePropertyName("sqlWriterTableType"u8); - JsonSerializer.Serialize(writer, SqlWriterTableType); - } - if (Optional.IsDefined(PreCopyScript)) - { - writer.WritePropertyName("preCopyScript"u8); - JsonSerializer.Serialize(writer, PreCopyScript); - } - if (Optional.IsDefined(StoredProcedureParameters)) - { - writer.WritePropertyName("storedProcedureParameters"u8); -#if NET6_0_OR_GREATER - writer.WriteRawValue(StoredProcedureParameters); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(StoredProcedureParameters.ToString()).RootElement); -#endif - } - if (Optional.IsDefined(StoredProcedureTableTypeParameterName)) - { - writer.WritePropertyName("storedProcedureTableTypeParameterName"u8); - JsonSerializer.Serialize(writer, StoredProcedureTableTypeParameterName); - } - if (Optional.IsDefined(TableOption)) - { - writer.WritePropertyName("tableOption"u8); - JsonSerializer.Serialize(writer, TableOption); - } - if (Optional.IsDefined(SqlWriterUseTableLock)) - { - writer.WritePropertyName("sqlWriterUseTableLock"u8); - JsonSerializer.Serialize(writer, SqlWriterUseTableLock); - } - if (Optional.IsDefined(WriteBehavior)) - { - writer.WritePropertyName("writeBehavior"u8); -#if NET6_0_OR_GREATER - writer.WriteRawValue(WriteBehavior); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(WriteBehavior.ToString()).RootElement); -#endif - } - if (Optional.IsDefined(UpsertSettings)) - { - writer.WritePropertyName("upsertSettings"u8); - writer.WriteObjectValue(UpsertSettings); - } - writer.WritePropertyName("type"u8); - writer.WriteStringValue(CopySinkType); - if (Optional.IsDefined(WriteBatchSize)) - { - writer.WritePropertyName("writeBatchSize"u8); - JsonSerializer.Serialize(writer, WriteBatchSize); - } - if (Optional.IsDefined(WriteBatchTimeout)) - { - writer.WritePropertyName("writeBatchTimeout"u8); - JsonSerializer.Serialize(writer, WriteBatchTimeout); - } - if (Optional.IsDefined(SinkRetryCount)) - { - writer.WritePropertyName("sinkRetryCount"u8); - JsonSerializer.Serialize(writer, SinkRetryCount); - } - if (Optional.IsDefined(SinkRetryWait)) - { - writer.WritePropertyName("sinkRetryWait"u8); - JsonSerializer.Serialize(writer, SinkRetryWait); - } - if (Optional.IsDefined(MaxConcurrentConnections)) - { - writer.WritePropertyName("maxConcurrentConnections"u8); - JsonSerializer.Serialize(writer, MaxConcurrentConnections); - } - if (Optional.IsDefined(DisableMetricsCollection)) - { - writer.WritePropertyName("disableMetricsCollection"u8); - JsonSerializer.Serialize(writer, DisableMetricsCollection); - } - foreach (var item in AdditionalProperties) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.Value.ToString()).RootElement); -#endif - } - writer.WriteEndObject(); - } - - internal static SqlServerSink DeserializeSqlServerSink(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - Optional> sqlWriterStoredProcedureName = default; - Optional> sqlWriterTableType = default; - Optional> preCopyScript = default; - Optional storedProcedureParameters = default; - Optional> storedProcedureTableTypeParameterName = default; - Optional> tableOption = default; - Optional> sqlWriterUseTableLock = default; - Optional writeBehavior = default; - Optional upsertSettings = default; - string type = default; - Optional> writeBatchSize = default; - Optional> writeBatchTimeout = default; - Optional> sinkRetryCount = default; - Optional> sinkRetryWait = default; - Optional> maxConcurrentConnections = default; - Optional> disableMetricsCollection = default; - IDictionary> additionalProperties = default; - Dictionary> additionalPropertiesDictionary = new Dictionary>(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("sqlWriterStoredProcedureName"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - sqlWriterStoredProcedureName = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("sqlWriterTableType"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - sqlWriterTableType = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("preCopyScript"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - preCopyScript = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("storedProcedureParameters"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - storedProcedureParameters = BinaryData.FromString(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("storedProcedureTableTypeParameterName"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - storedProcedureTableTypeParameterName = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("tableOption"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - tableOption = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("sqlWriterUseTableLock"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - sqlWriterUseTableLock = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("writeBehavior"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - writeBehavior = BinaryData.FromString(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("upsertSettings"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - upsertSettings = SqlUpsertSettings.DeserializeSqlUpsertSettings(property.Value); - continue; - } - if (property.NameEquals("type"u8)) - { - type = property.Value.GetString(); - continue; - } - if (property.NameEquals("writeBatchSize"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - writeBatchSize = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("writeBatchTimeout"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - writeBatchTimeout = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("sinkRetryCount"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - sinkRetryCount = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("sinkRetryWait"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - sinkRetryWait = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("maxConcurrentConnections"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - maxConcurrentConnections = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("disableMetricsCollection"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - disableMetricsCollection = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - additionalPropertiesDictionary.Add(property.Name, JsonSerializer.Deserialize>(property.Value.GetRawText())); - } - additionalProperties = additionalPropertiesDictionary; - return new SqlServerSink(type, writeBatchSize.Value, writeBatchTimeout.Value, sinkRetryCount.Value, sinkRetryWait.Value, maxConcurrentConnections.Value, disableMetricsCollection.Value, additionalProperties, sqlWriterStoredProcedureName.Value, sqlWriterTableType.Value, preCopyScript.Value, storedProcedureParameters.Value, storedProcedureTableTypeParameterName.Value, tableOption.Value, sqlWriterUseTableLock.Value, writeBehavior.Value, upsertSettings.Value); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SqlServerSink.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SqlServerSink.cs deleted file mode 100644 index 6e91c19d..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SqlServerSink.cs +++ /dev/null @@ -1,127 +0,0 @@ -// - -#nullable disable - -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// A copy activity SQL server sink. - public partial class SqlServerSink : CopySink - { - /// Initializes a new instance of SqlServerSink. - public SqlServerSink() - { - CopySinkType = "SqlServerSink"; - } - - /// Initializes a new instance of SqlServerSink. - /// Copy sink type. - /// Write batch size. Type: integer (or Expression with resultType integer), minimum: 0. - /// Write batch timeout. Type: string (or Expression with resultType string), pattern: ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). - /// Sink retry count. Type: integer (or Expression with resultType integer). - /// Sink retry wait. Type: string (or Expression with resultType string), pattern: ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). - /// The maximum concurrent connection count for the sink data store. Type: integer (or Expression with resultType integer). - /// If true, disable data store metrics collection. Default is false. Type: boolean (or Expression with resultType boolean). - /// Additional Properties. - /// SQL writer stored procedure name. Type: string (or Expression with resultType string). - /// SQL writer table type. Type: string (or Expression with resultType string). - /// SQL pre-copy script. Type: string (or Expression with resultType string). - /// SQL stored procedure parameters. - /// The stored procedure parameter name of the table type. Type: string (or Expression with resultType string). - /// The option to handle sink table, such as autoCreate. For now only 'autoCreate' value is supported. Type: string (or Expression with resultType string). - /// Whether to use table lock during bulk copy. Type: boolean (or Expression with resultType boolean). - /// Write behavior when copying data into sql server. Type: SqlWriteBehaviorEnum (or Expression with resultType SqlWriteBehaviorEnum). - /// SQL upsert settings. - internal SqlServerSink(string copySinkType, DataFactoryElement writeBatchSize, DataFactoryElement writeBatchTimeout, DataFactoryElement sinkRetryCount, DataFactoryElement sinkRetryWait, DataFactoryElement maxConcurrentConnections, DataFactoryElement disableMetricsCollection, IDictionary> additionalProperties, DataFactoryElement sqlWriterStoredProcedureName, DataFactoryElement sqlWriterTableType, DataFactoryElement preCopyScript, BinaryData storedProcedureParameters, DataFactoryElement storedProcedureTableTypeParameterName, DataFactoryElement tableOption, DataFactoryElement sqlWriterUseTableLock, BinaryData writeBehavior, SqlUpsertSettings upsertSettings) : base(copySinkType, writeBatchSize, writeBatchTimeout, sinkRetryCount, sinkRetryWait, maxConcurrentConnections, disableMetricsCollection, additionalProperties) - { - SqlWriterStoredProcedureName = sqlWriterStoredProcedureName; - SqlWriterTableType = sqlWriterTableType; - PreCopyScript = preCopyScript; - StoredProcedureParameters = storedProcedureParameters; - StoredProcedureTableTypeParameterName = storedProcedureTableTypeParameterName; - TableOption = tableOption; - SqlWriterUseTableLock = sqlWriterUseTableLock; - WriteBehavior = writeBehavior; - UpsertSettings = upsertSettings; - CopySinkType = copySinkType ?? "SqlServerSink"; - } - - /// SQL writer stored procedure name. Type: string (or Expression with resultType string). - public DataFactoryElement SqlWriterStoredProcedureName { get; set; } - /// SQL writer table type. Type: string (or Expression with resultType string). - public DataFactoryElement SqlWriterTableType { get; set; } - /// SQL pre-copy script. Type: string (or Expression with resultType string). - public DataFactoryElement PreCopyScript { get; set; } - /// - /// SQL stored procedure parameters. - /// - /// To assign an object to this property use . - /// - /// - /// To assign an already formated json string to this property use . - /// - /// - /// Examples: - /// - /// - /// BinaryData.FromObjectAsJson("foo") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromString("\"foo\"") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromObjectAsJson(new { key = "value" }) - /// Creates a payload of { "key": "value" }. - /// - /// - /// BinaryData.FromString("{\"key\": \"value\"}") - /// Creates a payload of { "key": "value" }. - /// - /// - /// - /// - public BinaryData StoredProcedureParameters { get; set; } - /// The stored procedure parameter name of the table type. Type: string (or Expression with resultType string). - public DataFactoryElement StoredProcedureTableTypeParameterName { get; set; } - /// The option to handle sink table, such as autoCreate. For now only 'autoCreate' value is supported. Type: string (or Expression with resultType string). - public DataFactoryElement TableOption { get; set; } - /// Whether to use table lock during bulk copy. Type: boolean (or Expression with resultType boolean). - public DataFactoryElement SqlWriterUseTableLock { get; set; } - /// - /// Write behavior when copying data into sql server. Type: SqlWriteBehaviorEnum (or Expression with resultType SqlWriteBehaviorEnum) - /// - /// To assign an object to this property use . - /// - /// - /// To assign an already formated json string to this property use . - /// - /// - /// Examples: - /// - /// - /// BinaryData.FromObjectAsJson("foo") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromString("\"foo\"") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromObjectAsJson(new { key = "value" }) - /// Creates a payload of { "key": "value" }. - /// - /// - /// BinaryData.FromString("{\"key\": \"value\"}") - /// Creates a payload of { "key": "value" }. - /// - /// - /// - /// - public BinaryData WriteBehavior { get; set; } - /// SQL upsert settings. - public SqlUpsertSettings UpsertSettings { get; set; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SqlServerSource.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SqlServerSource.Serialization.cs deleted file mode 100644 index cc56fede..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SqlServerSource.Serialization.cs +++ /dev/null @@ -1,263 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class SqlServerSource : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - if (Optional.IsDefined(SqlReaderQuery)) - { - writer.WritePropertyName("sqlReaderQuery"u8); - JsonSerializer.Serialize(writer, SqlReaderQuery); - } - if (Optional.IsDefined(SqlReaderStoredProcedureName)) - { - writer.WritePropertyName("sqlReaderStoredProcedureName"u8); - JsonSerializer.Serialize(writer, SqlReaderStoredProcedureName); - } - if (Optional.IsDefined(StoredProcedureParameters)) - { - writer.WritePropertyName("storedProcedureParameters"u8); -#if NET6_0_OR_GREATER - writer.WriteRawValue(StoredProcedureParameters); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(StoredProcedureParameters.ToString()).RootElement); -#endif - } - if (Optional.IsDefined(IsolationLevel)) - { - writer.WritePropertyName("isolationLevel"u8); - JsonSerializer.Serialize(writer, IsolationLevel); - } - if (Optional.IsDefined(ProduceAdditionalTypes)) - { - writer.WritePropertyName("produceAdditionalTypes"u8); -#if NET6_0_OR_GREATER - writer.WriteRawValue(ProduceAdditionalTypes); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(ProduceAdditionalTypes.ToString()).RootElement); -#endif - } - if (Optional.IsDefined(PartitionOption)) - { - writer.WritePropertyName("partitionOption"u8); -#if NET6_0_OR_GREATER - writer.WriteRawValue(PartitionOption); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(PartitionOption.ToString()).RootElement); -#endif - } - if (Optional.IsDefined(PartitionSettings)) - { - writer.WritePropertyName("partitionSettings"u8); - writer.WriteObjectValue(PartitionSettings); - } - if (Optional.IsDefined(QueryTimeout)) - { - writer.WritePropertyName("queryTimeout"u8); - JsonSerializer.Serialize(writer, QueryTimeout); - } - if (Optional.IsDefined(AdditionalColumns)) - { - writer.WritePropertyName("additionalColumns"u8); -#if NET6_0_OR_GREATER - writer.WriteRawValue(AdditionalColumns); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(AdditionalColumns.ToString()).RootElement); -#endif - } - writer.WritePropertyName("type"u8); - writer.WriteStringValue(CopySourceType); - if (Optional.IsDefined(SourceRetryCount)) - { - writer.WritePropertyName("sourceRetryCount"u8); - JsonSerializer.Serialize(writer, SourceRetryCount); - } - if (Optional.IsDefined(SourceRetryWait)) - { - writer.WritePropertyName("sourceRetryWait"u8); - JsonSerializer.Serialize(writer, SourceRetryWait); - } - if (Optional.IsDefined(MaxConcurrentConnections)) - { - writer.WritePropertyName("maxConcurrentConnections"u8); - JsonSerializer.Serialize(writer, MaxConcurrentConnections); - } - if (Optional.IsDefined(DisableMetricsCollection)) - { - writer.WritePropertyName("disableMetricsCollection"u8); - JsonSerializer.Serialize(writer, DisableMetricsCollection); - } - foreach (var item in AdditionalProperties) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.Value.ToString()).RootElement); -#endif - } - writer.WriteEndObject(); - } - - internal static SqlServerSource DeserializeSqlServerSource(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - Optional> sqlReaderQuery = default; - Optional> sqlReaderStoredProcedureName = default; - Optional storedProcedureParameters = default; - Optional> isolationLevel = default; - Optional produceAdditionalTypes = default; - Optional partitionOption = default; - Optional partitionSettings = default; - Optional> queryTimeout = default; - Optional additionalColumns = default; - string type = default; - Optional> sourceRetryCount = default; - Optional> sourceRetryWait = default; - Optional> maxConcurrentConnections = default; - Optional> disableMetricsCollection = default; - IDictionary> additionalProperties = default; - Dictionary> additionalPropertiesDictionary = new Dictionary>(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("sqlReaderQuery"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - sqlReaderQuery = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("sqlReaderStoredProcedureName"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - sqlReaderStoredProcedureName = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("storedProcedureParameters"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - storedProcedureParameters = BinaryData.FromString(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("isolationLevel"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - isolationLevel = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("produceAdditionalTypes"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - produceAdditionalTypes = BinaryData.FromString(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("partitionOption"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - partitionOption = BinaryData.FromString(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("partitionSettings"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - partitionSettings = SqlPartitionSettings.DeserializeSqlPartitionSettings(property.Value); - continue; - } - if (property.NameEquals("queryTimeout"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - queryTimeout = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("additionalColumns"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - additionalColumns = BinaryData.FromString(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("type"u8)) - { - type = property.Value.GetString(); - continue; - } - if (property.NameEquals("sourceRetryCount"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - sourceRetryCount = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("sourceRetryWait"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - sourceRetryWait = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("maxConcurrentConnections"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - maxConcurrentConnections = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("disableMetricsCollection"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - disableMetricsCollection = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - additionalPropertiesDictionary.Add(property.Name, JsonSerializer.Deserialize>(property.Value.GetRawText())); - } - additionalProperties = additionalPropertiesDictionary; - return new SqlServerSource(type, sourceRetryCount.Value, sourceRetryWait.Value, maxConcurrentConnections.Value, disableMetricsCollection.Value, additionalProperties, queryTimeout.Value, additionalColumns.Value, sqlReaderQuery.Value, sqlReaderStoredProcedureName.Value, storedProcedureParameters.Value, isolationLevel.Value, produceAdditionalTypes.Value, partitionOption.Value, partitionSettings.Value); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SqlServerSource.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SqlServerSource.cs deleted file mode 100644 index 2dd146c4..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SqlServerSource.cs +++ /dev/null @@ -1,148 +0,0 @@ -// - -#nullable disable - -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// A copy activity SQL server source. - public partial class SqlServerSource : TabularSource - { - /// Initializes a new instance of SqlServerSource. - public SqlServerSource() - { - CopySourceType = "SqlServerSource"; - } - - /// Initializes a new instance of SqlServerSource. - /// Copy source type. - /// Source retry count. Type: integer (or Expression with resultType integer). - /// Source retry wait. Type: string (or Expression with resultType string), pattern: ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). - /// The maximum concurrent connection count for the source data store. Type: integer (or Expression with resultType integer). - /// If true, disable data store metrics collection. Default is false. Type: boolean (or Expression with resultType boolean). - /// Additional Properties. - /// 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). - /// SQL reader query. Type: string (or Expression with resultType string). - /// Name of the stored procedure for a SQL Database source. This cannot be used at the same time as SqlReaderQuery. Type: string (or Expression with resultType string). - /// Value and type setting for stored procedure parameters. Example: "{Parameter1: {value: "1", type: "int"}}". - /// Specifies the transaction locking behavior for the SQL source. Allowed values: ReadCommitted/ReadUncommitted/RepeatableRead/Serializable/Snapshot. The default value is ReadCommitted. Type: string (or Expression with resultType string). - /// Which additional types to produce. - /// The partition mechanism that will be used for Sql read in parallel. Possible values include: "None", "PhysicalPartitionsOfTable", "DynamicRange". - /// The settings that will be leveraged for Sql source partitioning. - internal SqlServerSource(string copySourceType, DataFactoryElement sourceRetryCount, DataFactoryElement sourceRetryWait, DataFactoryElement maxConcurrentConnections, DataFactoryElement disableMetricsCollection, IDictionary> additionalProperties, DataFactoryElement queryTimeout, BinaryData additionalColumns, DataFactoryElement sqlReaderQuery, DataFactoryElement sqlReaderStoredProcedureName, BinaryData storedProcedureParameters, DataFactoryElement isolationLevel, BinaryData produceAdditionalTypes, BinaryData partitionOption, SqlPartitionSettings partitionSettings) : base(copySourceType, sourceRetryCount, sourceRetryWait, maxConcurrentConnections, disableMetricsCollection, additionalProperties, queryTimeout, additionalColumns) - { - SqlReaderQuery = sqlReaderQuery; - SqlReaderStoredProcedureName = sqlReaderStoredProcedureName; - StoredProcedureParameters = storedProcedureParameters; - IsolationLevel = isolationLevel; - ProduceAdditionalTypes = produceAdditionalTypes; - PartitionOption = partitionOption; - PartitionSettings = partitionSettings; - CopySourceType = copySourceType ?? "SqlServerSource"; - } - - /// SQL reader query. Type: string (or Expression with resultType string). - public DataFactoryElement SqlReaderQuery { get; set; } - /// Name of the stored procedure for a SQL Database source. This cannot be used at the same time as SqlReaderQuery. Type: string (or Expression with resultType string). - public DataFactoryElement SqlReaderStoredProcedureName { get; set; } - /// - /// Value and type setting for stored procedure parameters. Example: "{Parameter1: {value: "1", type: "int"}}". - /// - /// To assign an object to this property use . - /// - /// - /// To assign an already formated json string to this property use . - /// - /// - /// Examples: - /// - /// - /// BinaryData.FromObjectAsJson("foo") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromString("\"foo\"") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromObjectAsJson(new { key = "value" }) - /// Creates a payload of { "key": "value" }. - /// - /// - /// BinaryData.FromString("{\"key\": \"value\"}") - /// Creates a payload of { "key": "value" }. - /// - /// - /// - /// - public BinaryData StoredProcedureParameters { get; set; } - /// Specifies the transaction locking behavior for the SQL source. Allowed values: ReadCommitted/ReadUncommitted/RepeatableRead/Serializable/Snapshot. The default value is ReadCommitted. Type: string (or Expression with resultType string). - public DataFactoryElement IsolationLevel { get; set; } - /// - /// Which additional types to produce. - /// - /// To assign an object to this property use . - /// - /// - /// To assign an already formated json string to this property use . - /// - /// - /// Examples: - /// - /// - /// BinaryData.FromObjectAsJson("foo") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromString("\"foo\"") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromObjectAsJson(new { key = "value" }) - /// Creates a payload of { "key": "value" }. - /// - /// - /// BinaryData.FromString("{\"key\": \"value\"}") - /// Creates a payload of { "key": "value" }. - /// - /// - /// - /// - public BinaryData ProduceAdditionalTypes { get; set; } - /// - /// The partition mechanism that will be used for Sql read in parallel. Possible values include: "None", "PhysicalPartitionsOfTable", "DynamicRange". - /// - /// To assign an object to this property use . - /// - /// - /// To assign an already formated json string to this property use . - /// - /// - /// Examples: - /// - /// - /// BinaryData.FromObjectAsJson("foo") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromString("\"foo\"") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromObjectAsJson(new { key = "value" }) - /// Creates a payload of { "key": "value" }. - /// - /// - /// BinaryData.FromString("{\"key\": \"value\"}") - /// Creates a payload of { "key": "value" }. - /// - /// - /// - /// - public BinaryData PartitionOption { get; set; } - /// The settings that will be leveraged for Sql source partitioning. - public SqlPartitionSettings PartitionSettings { get; set; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SqlServerStoredProcedureActivity.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SqlServerStoredProcedureActivity.Serialization.cs deleted file mode 100644 index 9866d6a9..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SqlServerStoredProcedureActivity.Serialization.cs +++ /dev/null @@ -1,223 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class SqlServerStoredProcedureActivity : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - if (Optional.IsDefined(LinkedServiceName)) - { - writer.WritePropertyName("linkedServiceName"u8); - JsonSerializer.Serialize(writer, LinkedServiceName); - } - if (Optional.IsDefined(Policy)) - { - writer.WritePropertyName("policy"u8); - writer.WriteObjectValue(Policy); - } - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ActivityType); - if (Optional.IsDefined(Description)) - { - writer.WritePropertyName("description"u8); - writer.WriteStringValue(Description); - } - if (Optional.IsDefined(State)) - { - writer.WritePropertyName("state"u8); - writer.WriteStringValue(State.Value.ToString()); - } - if (Optional.IsDefined(OnInactiveMarkAs)) - { - writer.WritePropertyName("onInactiveMarkAs"u8); - writer.WriteStringValue(OnInactiveMarkAs.Value.ToString()); - } - if (Optional.IsCollectionDefined(DependsOn)) - { - writer.WritePropertyName("dependsOn"u8); - writer.WriteStartArray(); - foreach (var item in DependsOn) - { - writer.WriteObjectValue(item); - } - writer.WriteEndArray(); - } - if (Optional.IsCollectionDefined(UserProperties)) - { - writer.WritePropertyName("userProperties"u8); - writer.WriteStartArray(); - foreach (var item in UserProperties) - { - writer.WriteObjectValue(item); - } - writer.WriteEndArray(); - } - writer.WritePropertyName("typeProperties"u8); - writer.WriteStartObject(); - writer.WritePropertyName("storedProcedureName"u8); - JsonSerializer.Serialize(writer, StoredProcedureName); - if (Optional.IsDefined(StoredProcedureParameters)) - { - writer.WritePropertyName("storedProcedureParameters"u8); -#if NET6_0_OR_GREATER - writer.WriteRawValue(StoredProcedureParameters); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(StoredProcedureParameters.ToString()).RootElement); -#endif - } - writer.WriteEndObject(); - foreach (var item in AdditionalProperties) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.Value.ToString()).RootElement); -#endif - } - writer.WriteEndObject(); - } - - internal static SqlServerStoredProcedureActivity DeserializeSqlServerStoredProcedureActivity(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - Optional linkedServiceName = default; - Optional policy = default; - string name = default; - string type = default; - Optional description = default; - Optional state = default; - Optional onInactiveMarkAs = default; - Optional> dependsOn = default; - Optional> userProperties = default; - DataFactoryElement storedProcedureName = default; - Optional storedProcedureParameters = default; - IDictionary> additionalProperties = default; - Dictionary> additionalPropertiesDictionary = new Dictionary>(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("linkedServiceName"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - linkedServiceName = JsonSerializer.Deserialize(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("policy"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - policy = PipelineActivityPolicy.DeserializePipelineActivityPolicy(property.Value); - continue; - } - if (property.NameEquals("name"u8)) - { - name = property.Value.GetString(); - continue; - } - if (property.NameEquals("type"u8)) - { - type = property.Value.GetString(); - continue; - } - if (property.NameEquals("description"u8)) - { - description = property.Value.GetString(); - continue; - } - if (property.NameEquals("state"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - state = new PipelineActivityState(property.Value.GetString()); - continue; - } - if (property.NameEquals("onInactiveMarkAs"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - onInactiveMarkAs = new ActivityOnInactiveMarkAs(property.Value.GetString()); - continue; - } - if (property.NameEquals("dependsOn"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - array.Add(PipelineActivityDependency.DeserializePipelineActivityDependency(item)); - } - dependsOn = array; - continue; - } - if (property.NameEquals("userProperties"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - array.Add(PipelineActivityUserProperty.DeserializePipelineActivityUserProperty(item)); - } - userProperties = array; - continue; - } - if (property.NameEquals("typeProperties"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - foreach (var property0 in property.Value.EnumerateObject()) - { - if (property0.NameEquals("storedProcedureName"u8)) - { - storedProcedureName = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("storedProcedureParameters"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - storedProcedureParameters = BinaryData.FromString(property0.Value.GetRawText()); - continue; - } - } - continue; - } - additionalPropertiesDictionary.Add(property.Name, JsonSerializer.Deserialize>(property.Value.GetRawText())); - } - additionalProperties = additionalPropertiesDictionary; - return new SqlServerStoredProcedureActivity(name, type, description.Value, Optional.ToNullable(state), Optional.ToNullable(onInactiveMarkAs), Optional.ToList(dependsOn), Optional.ToList(userProperties), additionalProperties, linkedServiceName, policy.Value, storedProcedureName, storedProcedureParameters.Value); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SqlServerStoredProcedureActivity.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SqlServerStoredProcedureActivity.cs deleted file mode 100644 index 34e7cbea..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SqlServerStoredProcedureActivity.cs +++ /dev/null @@ -1,80 +0,0 @@ -// - -#nullable disable - -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// SQL stored procedure activity type. - public partial class SqlServerStoredProcedureActivity : ExecutionActivity - { - /// Initializes a new instance of SqlServerStoredProcedureActivity. - /// Activity name. - /// Stored procedure name. Type: string (or Expression with resultType string). - /// or is null. - public SqlServerStoredProcedureActivity(string name, DataFactoryElement storedProcedureName) : base(name) - { - Argument.AssertNotNull(name, nameof(name)); - Argument.AssertNotNull(storedProcedureName, nameof(storedProcedureName)); - - StoredProcedureName = storedProcedureName; - ActivityType = "SqlServerStoredProcedure"; - } - - /// Initializes a new instance of SqlServerStoredProcedureActivity. - /// Activity name. - /// Type of activity. - /// Activity description. - /// Activity state. This is an optional property and if not provided, the state will be Active by default. - /// 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. - /// Activity depends on condition. - /// Activity user properties. - /// Additional Properties. - /// Linked service reference. - /// Activity policy. - /// Stored procedure name. Type: string (or Expression with resultType string). - /// Value and type setting for stored procedure parameters. Example: "{Parameter1: {value: "1", type: "int"}}". - internal SqlServerStoredProcedureActivity(string name, string activityType, string description, PipelineActivityState? state, ActivityOnInactiveMarkAs? onInactiveMarkAs, IList dependsOn, IList userProperties, IDictionary> additionalProperties, DataFactoryLinkedServiceReference linkedServiceName, PipelineActivityPolicy policy, DataFactoryElement storedProcedureName, BinaryData storedProcedureParameters) : base(name, activityType, description, state, onInactiveMarkAs, dependsOn, userProperties, additionalProperties, linkedServiceName, policy) - { - StoredProcedureName = storedProcedureName; - StoredProcedureParameters = storedProcedureParameters; - ActivityType = activityType ?? "SqlServerStoredProcedure"; - } - - /// Stored procedure name. Type: string (or Expression with resultType string). - public DataFactoryElement StoredProcedureName { get; set; } - /// - /// Value and type setting for stored procedure parameters. Example: "{Parameter1: {value: "1", type: "int"}}". - /// - /// To assign an object to this property use . - /// - /// - /// To assign an already formated json string to this property use . - /// - /// - /// Examples: - /// - /// - /// BinaryData.FromObjectAsJson("foo") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromString("\"foo\"") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromObjectAsJson(new { key = "value" }) - /// Creates a payload of { "key": "value" }. - /// - /// - /// BinaryData.FromString("{\"key\": \"value\"}") - /// Creates a payload of { "key": "value" }. - /// - /// - /// - /// - public BinaryData StoredProcedureParameters { get; set; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SqlServerTableDataset.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SqlServerTableDataset.Serialization.cs deleted file mode 100644 index 90d9feda..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SqlServerTableDataset.Serialization.cs +++ /dev/null @@ -1,246 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class SqlServerTableDataset : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - writer.WritePropertyName("type"u8); - writer.WriteStringValue(DatasetType); - if (Optional.IsDefined(Description)) - { - writer.WritePropertyName("description"u8); - writer.WriteStringValue(Description); - } - if (Optional.IsDefined(Structure)) - { - writer.WritePropertyName("structure"u8); - JsonSerializer.Serialize(writer, Structure); - } - if (Optional.IsDefined(Schema)) - { - writer.WritePropertyName("schema"u8); - JsonSerializer.Serialize(writer, Schema); - } - writer.WritePropertyName("linkedServiceName"u8); - JsonSerializer.Serialize(writer, LinkedServiceName); if (Optional.IsCollectionDefined(Parameters)) - { - writer.WritePropertyName("parameters"u8); - writer.WriteStartObject(); - foreach (var item in Parameters) - { - writer.WritePropertyName(item.Key); - writer.WriteObjectValue(item.Value); - } - writer.WriteEndObject(); - } - if (Optional.IsCollectionDefined(Annotations)) - { - writer.WritePropertyName("annotations"u8); - writer.WriteStartArray(); - foreach (var item in Annotations) - { - if (item == null) - { - writer.WriteNullValue(); - continue; - } -#if NET6_0_OR_GREATER - writer.WriteRawValue(item); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.ToString()).RootElement); -#endif - } - writer.WriteEndArray(); - } - if (Optional.IsDefined(Folder)) - { - writer.WritePropertyName("folder"u8); - writer.WriteObjectValue(Folder); - } - writer.WritePropertyName("typeProperties"u8); - writer.WriteStartObject(); - if (Optional.IsDefined(TableName)) - { - writer.WritePropertyName("tableName"u8); -#if NET6_0_OR_GREATER - writer.WriteRawValue(TableName); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(TableName.ToString()).RootElement); -#endif - } - if (Optional.IsDefined(SchemaTypePropertiesSchema)) - { - writer.WritePropertyName("schema"u8); - JsonSerializer.Serialize(writer, SchemaTypePropertiesSchema); - } - if (Optional.IsDefined(Table)) - { - writer.WritePropertyName("table"u8); - JsonSerializer.Serialize(writer, Table); - } - writer.WriteEndObject(); - foreach (var item in AdditionalProperties) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.Value.ToString()).RootElement); -#endif - } - writer.WriteEndObject(); - } - - internal static SqlServerTableDataset DeserializeSqlServerTableDataset(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - string type = default; - Optional description = default; - Optional>> structure = default; - Optional>> schema = default; - DataFactoryLinkedServiceReference linkedServiceName = default; - Optional> parameters = default; - Optional> annotations = default; - Optional folder = default; - Optional tableName = default; - Optional> schema0 = default; - Optional> table = default; - IDictionary> additionalProperties = default; - Dictionary> additionalPropertiesDictionary = new Dictionary>(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("type"u8)) - { - type = property.Value.GetString(); - continue; - } - if (property.NameEquals("description"u8)) - { - description = property.Value.GetString(); - continue; - } - if (property.NameEquals("structure"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - structure = JsonSerializer.Deserialize>>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("schema"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - schema = JsonSerializer.Deserialize>>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("linkedServiceName"u8)) - { - linkedServiceName = JsonSerializer.Deserialize(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("parameters"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - Dictionary dictionary = new Dictionary(); - foreach (var property0 in property.Value.EnumerateObject()) - { - dictionary.Add(property0.Name, EntityParameterSpecification.DeserializeEntityParameterSpecification(property0.Value)); - } - parameters = dictionary; - continue; - } - if (property.NameEquals("annotations"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - if (item.ValueKind == JsonValueKind.Null) - { - array.Add(null); - } - else - { - array.Add(BinaryData.FromString(item.GetRawText())); - } - } - annotations = array; - continue; - } - if (property.NameEquals("folder"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - folder = DatasetFolder.DeserializeDatasetFolder(property.Value); - continue; - } - if (property.NameEquals("typeProperties"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - foreach (var property0 in property.Value.EnumerateObject()) - { - if (property0.NameEquals("tableName"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - tableName = BinaryData.FromString(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("schema"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - schema0 = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("table"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - table = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - } - continue; - } - additionalPropertiesDictionary.Add(property.Name, JsonSerializer.Deserialize>(property.Value.GetRawText())); - } - additionalProperties = additionalPropertiesDictionary; - return new SqlServerTableDataset(type, description.Value, structure.Value, schema.Value, linkedServiceName, Optional.ToDictionary(parameters), Optional.ToList(annotations), folder.Value, additionalProperties, tableName.Value, schema0.Value, table.Value); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SqlServerTableDataset.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SqlServerTableDataset.cs deleted file mode 100644 index 299794de..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SqlServerTableDataset.cs +++ /dev/null @@ -1,80 +0,0 @@ -// - -#nullable disable - -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// The on-premises SQL Server dataset. - public partial class SqlServerTableDataset : DataFactoryDatasetProperties - { - /// Initializes a new instance of SqlServerTableDataset. - /// Linked service reference. - /// is null. - public SqlServerTableDataset(DataFactoryLinkedServiceReference linkedServiceName) : base(linkedServiceName) - { - Argument.AssertNotNull(linkedServiceName, nameof(linkedServiceName)); - - DatasetType = "SqlServerTable"; - } - - /// Initializes a new instance of SqlServerTableDataset. - /// Type of dataset. - /// Dataset description. - /// Columns that define the structure of the dataset. Type: array (or Expression with resultType array), itemType: DatasetDataElement. - /// Columns that define the physical type schema of the dataset. Type: array (or Expression with resultType array), itemType: DatasetSchemaDataElement. - /// Linked service reference. - /// Parameters for dataset. - /// List of tags that can be used for describing the Dataset. - /// The folder that this Dataset is in. If not specified, Dataset will appear at the root level. - /// Additional Properties. - /// This property will be retired. Please consider using schema + table properties instead. - /// The schema name of the SQL Server dataset. Type: string (or Expression with resultType string). - /// The table name of the SQL Server dataset. Type: string (or Expression with resultType string). - internal SqlServerTableDataset(string datasetType, string description, DataFactoryElement> structure, DataFactoryElement> schema, DataFactoryLinkedServiceReference linkedServiceName, IDictionary parameters, IList annotations, DatasetFolder folder, IDictionary> additionalProperties, BinaryData tableName, DataFactoryElement schemaTypePropertiesSchema, DataFactoryElement table) : base(datasetType, description, structure, schema, linkedServiceName, parameters, annotations, folder, additionalProperties) - { - TableName = tableName; - SchemaTypePropertiesSchema = schemaTypePropertiesSchema; - Table = table; - DatasetType = datasetType ?? "SqlServerTable"; - } - - /// - /// This property will be retired. Please consider using schema + table properties instead. - /// - /// To assign an object to this property use . - /// - /// - /// To assign an already formated json string to this property use . - /// - /// - /// Examples: - /// - /// - /// BinaryData.FromObjectAsJson("foo") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromString("\"foo\"") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromObjectAsJson(new { key = "value" }) - /// Creates a payload of { "key": "value" }. - /// - /// - /// BinaryData.FromString("{\"key\": \"value\"}") - /// Creates a payload of { "key": "value" }. - /// - /// - /// - /// - public BinaryData TableName { get; set; } - /// The schema name of the SQL Server dataset. Type: string (or Expression with resultType string). - public DataFactoryElement SchemaTypePropertiesSchema { get; set; } - /// The table name of the SQL Server dataset. Type: string (or Expression with resultType string). - public DataFactoryElement Table { get; set; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SqlSink.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SqlSink.Serialization.cs deleted file mode 100644 index 6189140d..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SqlSink.Serialization.cs +++ /dev/null @@ -1,285 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class SqlSink : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - if (Optional.IsDefined(SqlWriterStoredProcedureName)) - { - writer.WritePropertyName("sqlWriterStoredProcedureName"u8); - JsonSerializer.Serialize(writer, SqlWriterStoredProcedureName); - } - if (Optional.IsDefined(SqlWriterTableType)) - { - writer.WritePropertyName("sqlWriterTableType"u8); - JsonSerializer.Serialize(writer, SqlWriterTableType); - } - if (Optional.IsDefined(PreCopyScript)) - { - writer.WritePropertyName("preCopyScript"u8); - JsonSerializer.Serialize(writer, PreCopyScript); - } - if (Optional.IsDefined(StoredProcedureParameters)) - { - writer.WritePropertyName("storedProcedureParameters"u8); -#if NET6_0_OR_GREATER - writer.WriteRawValue(StoredProcedureParameters); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(StoredProcedureParameters.ToString()).RootElement); -#endif - } - if (Optional.IsDefined(StoredProcedureTableTypeParameterName)) - { - writer.WritePropertyName("storedProcedureTableTypeParameterName"u8); - JsonSerializer.Serialize(writer, StoredProcedureTableTypeParameterName); - } - if (Optional.IsDefined(TableOption)) - { - writer.WritePropertyName("tableOption"u8); - JsonSerializer.Serialize(writer, TableOption); - } - if (Optional.IsDefined(SqlWriterUseTableLock)) - { - writer.WritePropertyName("sqlWriterUseTableLock"u8); - JsonSerializer.Serialize(writer, SqlWriterUseTableLock); - } - if (Optional.IsDefined(WriteBehavior)) - { - writer.WritePropertyName("writeBehavior"u8); -#if NET6_0_OR_GREATER - writer.WriteRawValue(WriteBehavior); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(WriteBehavior.ToString()).RootElement); -#endif - } - if (Optional.IsDefined(UpsertSettings)) - { - writer.WritePropertyName("upsertSettings"u8); - writer.WriteObjectValue(UpsertSettings); - } - writer.WritePropertyName("type"u8); - writer.WriteStringValue(CopySinkType); - if (Optional.IsDefined(WriteBatchSize)) - { - writer.WritePropertyName("writeBatchSize"u8); - JsonSerializer.Serialize(writer, WriteBatchSize); - } - if (Optional.IsDefined(WriteBatchTimeout)) - { - writer.WritePropertyName("writeBatchTimeout"u8); - JsonSerializer.Serialize(writer, WriteBatchTimeout); - } - if (Optional.IsDefined(SinkRetryCount)) - { - writer.WritePropertyName("sinkRetryCount"u8); - JsonSerializer.Serialize(writer, SinkRetryCount); - } - if (Optional.IsDefined(SinkRetryWait)) - { - writer.WritePropertyName("sinkRetryWait"u8); - JsonSerializer.Serialize(writer, SinkRetryWait); - } - if (Optional.IsDefined(MaxConcurrentConnections)) - { - writer.WritePropertyName("maxConcurrentConnections"u8); - JsonSerializer.Serialize(writer, MaxConcurrentConnections); - } - if (Optional.IsDefined(DisableMetricsCollection)) - { - writer.WritePropertyName("disableMetricsCollection"u8); - JsonSerializer.Serialize(writer, DisableMetricsCollection); - } - foreach (var item in AdditionalProperties) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.Value.ToString()).RootElement); -#endif - } - writer.WriteEndObject(); - } - - internal static SqlSink DeserializeSqlSink(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - Optional> sqlWriterStoredProcedureName = default; - Optional> sqlWriterTableType = default; - Optional> preCopyScript = default; - Optional storedProcedureParameters = default; - Optional> storedProcedureTableTypeParameterName = default; - Optional> tableOption = default; - Optional> sqlWriterUseTableLock = default; - Optional writeBehavior = default; - Optional upsertSettings = default; - string type = default; - Optional> writeBatchSize = default; - Optional> writeBatchTimeout = default; - Optional> sinkRetryCount = default; - Optional> sinkRetryWait = default; - Optional> maxConcurrentConnections = default; - Optional> disableMetricsCollection = default; - IDictionary> additionalProperties = default; - Dictionary> additionalPropertiesDictionary = new Dictionary>(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("sqlWriterStoredProcedureName"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - sqlWriterStoredProcedureName = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("sqlWriterTableType"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - sqlWriterTableType = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("preCopyScript"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - preCopyScript = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("storedProcedureParameters"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - storedProcedureParameters = BinaryData.FromString(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("storedProcedureTableTypeParameterName"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - storedProcedureTableTypeParameterName = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("tableOption"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - tableOption = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("sqlWriterUseTableLock"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - sqlWriterUseTableLock = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("writeBehavior"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - writeBehavior = BinaryData.FromString(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("upsertSettings"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - upsertSettings = SqlUpsertSettings.DeserializeSqlUpsertSettings(property.Value); - continue; - } - if (property.NameEquals("type"u8)) - { - type = property.Value.GetString(); - continue; - } - if (property.NameEquals("writeBatchSize"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - writeBatchSize = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("writeBatchTimeout"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - writeBatchTimeout = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("sinkRetryCount"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - sinkRetryCount = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("sinkRetryWait"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - sinkRetryWait = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("maxConcurrentConnections"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - maxConcurrentConnections = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("disableMetricsCollection"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - disableMetricsCollection = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - additionalPropertiesDictionary.Add(property.Name, JsonSerializer.Deserialize>(property.Value.GetRawText())); - } - additionalProperties = additionalPropertiesDictionary; - return new SqlSink(type, writeBatchSize.Value, writeBatchTimeout.Value, sinkRetryCount.Value, sinkRetryWait.Value, maxConcurrentConnections.Value, disableMetricsCollection.Value, additionalProperties, sqlWriterStoredProcedureName.Value, sqlWriterTableType.Value, preCopyScript.Value, storedProcedureParameters.Value, storedProcedureTableTypeParameterName.Value, tableOption.Value, sqlWriterUseTableLock.Value, writeBehavior.Value, upsertSettings.Value); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SqlSink.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SqlSink.cs deleted file mode 100644 index 2d576846..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SqlSink.cs +++ /dev/null @@ -1,127 +0,0 @@ -// - -#nullable disable - -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// A copy activity SQL sink. - public partial class SqlSink : CopySink - { - /// Initializes a new instance of SqlSink. - public SqlSink() - { - CopySinkType = "SqlSink"; - } - - /// Initializes a new instance of SqlSink. - /// Copy sink type. - /// Write batch size. Type: integer (or Expression with resultType integer), minimum: 0. - /// Write batch timeout. Type: string (or Expression with resultType string), pattern: ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). - /// Sink retry count. Type: integer (or Expression with resultType integer). - /// Sink retry wait. Type: string (or Expression with resultType string), pattern: ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). - /// The maximum concurrent connection count for the sink data store. Type: integer (or Expression with resultType integer). - /// If true, disable data store metrics collection. Default is false. Type: boolean (or Expression with resultType boolean). - /// Additional Properties. - /// SQL writer stored procedure name. Type: string (or Expression with resultType string). - /// SQL writer table type. Type: string (or Expression with resultType string). - /// SQL pre-copy script. Type: string (or Expression with resultType string). - /// SQL stored procedure parameters. - /// The stored procedure parameter name of the table type. Type: string (or Expression with resultType string). - /// The option to handle sink table, such as autoCreate. For now only 'autoCreate' value is supported. Type: string (or Expression with resultType string). - /// Whether to use table lock during bulk copy. Type: boolean (or Expression with resultType boolean). - /// Write behavior when copying data into sql. Type: SqlWriteBehaviorEnum (or Expression with resultType SqlWriteBehaviorEnum). - /// SQL upsert settings. - internal SqlSink(string copySinkType, DataFactoryElement writeBatchSize, DataFactoryElement writeBatchTimeout, DataFactoryElement sinkRetryCount, DataFactoryElement sinkRetryWait, DataFactoryElement maxConcurrentConnections, DataFactoryElement disableMetricsCollection, IDictionary> additionalProperties, DataFactoryElement sqlWriterStoredProcedureName, DataFactoryElement sqlWriterTableType, DataFactoryElement preCopyScript, BinaryData storedProcedureParameters, DataFactoryElement storedProcedureTableTypeParameterName, DataFactoryElement tableOption, DataFactoryElement sqlWriterUseTableLock, BinaryData writeBehavior, SqlUpsertSettings upsertSettings) : base(copySinkType, writeBatchSize, writeBatchTimeout, sinkRetryCount, sinkRetryWait, maxConcurrentConnections, disableMetricsCollection, additionalProperties) - { - SqlWriterStoredProcedureName = sqlWriterStoredProcedureName; - SqlWriterTableType = sqlWriterTableType; - PreCopyScript = preCopyScript; - StoredProcedureParameters = storedProcedureParameters; - StoredProcedureTableTypeParameterName = storedProcedureTableTypeParameterName; - TableOption = tableOption; - SqlWriterUseTableLock = sqlWriterUseTableLock; - WriteBehavior = writeBehavior; - UpsertSettings = upsertSettings; - CopySinkType = copySinkType ?? "SqlSink"; - } - - /// SQL writer stored procedure name. Type: string (or Expression with resultType string). - public DataFactoryElement SqlWriterStoredProcedureName { get; set; } - /// SQL writer table type. Type: string (or Expression with resultType string). - public DataFactoryElement SqlWriterTableType { get; set; } - /// SQL pre-copy script. Type: string (or Expression with resultType string). - public DataFactoryElement PreCopyScript { get; set; } - /// - /// SQL stored procedure parameters. - /// - /// To assign an object to this property use . - /// - /// - /// To assign an already formated json string to this property use . - /// - /// - /// Examples: - /// - /// - /// BinaryData.FromObjectAsJson("foo") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromString("\"foo\"") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromObjectAsJson(new { key = "value" }) - /// Creates a payload of { "key": "value" }. - /// - /// - /// BinaryData.FromString("{\"key\": \"value\"}") - /// Creates a payload of { "key": "value" }. - /// - /// - /// - /// - public BinaryData StoredProcedureParameters { get; set; } - /// The stored procedure parameter name of the table type. Type: string (or Expression with resultType string). - public DataFactoryElement StoredProcedureTableTypeParameterName { get; set; } - /// The option to handle sink table, such as autoCreate. For now only 'autoCreate' value is supported. Type: string (or Expression with resultType string). - public DataFactoryElement TableOption { get; set; } - /// Whether to use table lock during bulk copy. Type: boolean (or Expression with resultType boolean). - public DataFactoryElement SqlWriterUseTableLock { get; set; } - /// - /// Write behavior when copying data into sql. Type: SqlWriteBehaviorEnum (or Expression with resultType SqlWriteBehaviorEnum) - /// - /// To assign an object to this property use . - /// - /// - /// To assign an already formated json string to this property use . - /// - /// - /// Examples: - /// - /// - /// BinaryData.FromObjectAsJson("foo") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromString("\"foo\"") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromObjectAsJson(new { key = "value" }) - /// Creates a payload of { "key": "value" }. - /// - /// - /// BinaryData.FromString("{\"key\": \"value\"}") - /// Creates a payload of { "key": "value" }. - /// - /// - /// - /// - public BinaryData WriteBehavior { get; set; } - /// SQL upsert settings. - public SqlUpsertSettings UpsertSettings { get; set; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SqlSource.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SqlSource.Serialization.cs deleted file mode 100644 index 54119bb7..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SqlSource.Serialization.cs +++ /dev/null @@ -1,244 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class SqlSource : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - if (Optional.IsDefined(SqlReaderQuery)) - { - writer.WritePropertyName("sqlReaderQuery"u8); - JsonSerializer.Serialize(writer, SqlReaderQuery); - } - if (Optional.IsDefined(SqlReaderStoredProcedureName)) - { - writer.WritePropertyName("sqlReaderStoredProcedureName"u8); - JsonSerializer.Serialize(writer, SqlReaderStoredProcedureName); - } - if (Optional.IsDefined(StoredProcedureParameters)) - { - writer.WritePropertyName("storedProcedureParameters"u8); -#if NET6_0_OR_GREATER - writer.WriteRawValue(StoredProcedureParameters); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(StoredProcedureParameters.ToString()).RootElement); -#endif - } - if (Optional.IsDefined(IsolationLevel)) - { - writer.WritePropertyName("isolationLevel"u8); - JsonSerializer.Serialize(writer, IsolationLevel); - } - if (Optional.IsDefined(PartitionOption)) - { - writer.WritePropertyName("partitionOption"u8); -#if NET6_0_OR_GREATER - writer.WriteRawValue(PartitionOption); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(PartitionOption.ToString()).RootElement); -#endif - } - if (Optional.IsDefined(PartitionSettings)) - { - writer.WritePropertyName("partitionSettings"u8); - writer.WriteObjectValue(PartitionSettings); - } - if (Optional.IsDefined(QueryTimeout)) - { - writer.WritePropertyName("queryTimeout"u8); - JsonSerializer.Serialize(writer, QueryTimeout); - } - if (Optional.IsDefined(AdditionalColumns)) - { - writer.WritePropertyName("additionalColumns"u8); -#if NET6_0_OR_GREATER - writer.WriteRawValue(AdditionalColumns); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(AdditionalColumns.ToString()).RootElement); -#endif - } - writer.WritePropertyName("type"u8); - writer.WriteStringValue(CopySourceType); - if (Optional.IsDefined(SourceRetryCount)) - { - writer.WritePropertyName("sourceRetryCount"u8); - JsonSerializer.Serialize(writer, SourceRetryCount); - } - if (Optional.IsDefined(SourceRetryWait)) - { - writer.WritePropertyName("sourceRetryWait"u8); - JsonSerializer.Serialize(writer, SourceRetryWait); - } - if (Optional.IsDefined(MaxConcurrentConnections)) - { - writer.WritePropertyName("maxConcurrentConnections"u8); - JsonSerializer.Serialize(writer, MaxConcurrentConnections); - } - if (Optional.IsDefined(DisableMetricsCollection)) - { - writer.WritePropertyName("disableMetricsCollection"u8); - JsonSerializer.Serialize(writer, DisableMetricsCollection); - } - foreach (var item in AdditionalProperties) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.Value.ToString()).RootElement); -#endif - } - writer.WriteEndObject(); - } - - internal static SqlSource DeserializeSqlSource(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - Optional> sqlReaderQuery = default; - Optional> sqlReaderStoredProcedureName = default; - Optional storedProcedureParameters = default; - Optional> isolationLevel = default; - Optional partitionOption = default; - Optional partitionSettings = default; - Optional> queryTimeout = default; - Optional additionalColumns = default; - string type = default; - Optional> sourceRetryCount = default; - Optional> sourceRetryWait = default; - Optional> maxConcurrentConnections = default; - Optional> disableMetricsCollection = default; - IDictionary> additionalProperties = default; - Dictionary> additionalPropertiesDictionary = new Dictionary>(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("sqlReaderQuery"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - sqlReaderQuery = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("sqlReaderStoredProcedureName"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - sqlReaderStoredProcedureName = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("storedProcedureParameters"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - storedProcedureParameters = BinaryData.FromString(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("isolationLevel"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - isolationLevel = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("partitionOption"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - partitionOption = BinaryData.FromString(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("partitionSettings"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - partitionSettings = SqlPartitionSettings.DeserializeSqlPartitionSettings(property.Value); - continue; - } - if (property.NameEquals("queryTimeout"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - queryTimeout = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("additionalColumns"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - additionalColumns = BinaryData.FromString(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("type"u8)) - { - type = property.Value.GetString(); - continue; - } - if (property.NameEquals("sourceRetryCount"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - sourceRetryCount = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("sourceRetryWait"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - sourceRetryWait = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("maxConcurrentConnections"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - maxConcurrentConnections = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("disableMetricsCollection"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - disableMetricsCollection = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - additionalPropertiesDictionary.Add(property.Name, JsonSerializer.Deserialize>(property.Value.GetRawText())); - } - additionalProperties = additionalPropertiesDictionary; - return new SqlSource(type, sourceRetryCount.Value, sourceRetryWait.Value, maxConcurrentConnections.Value, disableMetricsCollection.Value, additionalProperties, queryTimeout.Value, additionalColumns.Value, sqlReaderQuery.Value, sqlReaderStoredProcedureName.Value, storedProcedureParameters.Value, isolationLevel.Value, partitionOption.Value, partitionSettings.Value); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SqlSource.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SqlSource.cs deleted file mode 100644 index ff6932f4..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SqlSource.cs +++ /dev/null @@ -1,115 +0,0 @@ -// - -#nullable disable - -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// A copy activity SQL source. - public partial class SqlSource : TabularSource - { - /// Initializes a new instance of SqlSource. - public SqlSource() - { - CopySourceType = "SqlSource"; - } - - /// Initializes a new instance of SqlSource. - /// Copy source type. - /// Source retry count. Type: integer (or Expression with resultType integer). - /// Source retry wait. Type: string (or Expression with resultType string), pattern: ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). - /// The maximum concurrent connection count for the source data store. Type: integer (or Expression with resultType integer). - /// If true, disable data store metrics collection. Default is false. Type: boolean (or Expression with resultType boolean). - /// Additional Properties. - /// 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). - /// SQL reader query. Type: string (or Expression with resultType string). - /// Name of the stored procedure for a SQL Database source. This cannot be used at the same time as SqlReaderQuery. Type: string (or Expression with resultType string). - /// Value and type setting for stored procedure parameters. Example: "{Parameter1: {value: "1", type: "int"}}". - /// Specifies the transaction locking behavior for the SQL source. Allowed values: ReadCommitted/ReadUncommitted/RepeatableRead/Serializable/Snapshot. The default value is ReadCommitted. Type: string (or Expression with resultType string). - /// The partition mechanism that will be used for Sql read in parallel. Possible values include: "None", "PhysicalPartitionsOfTable", "DynamicRange". - /// The settings that will be leveraged for Sql source partitioning. - internal SqlSource(string copySourceType, DataFactoryElement sourceRetryCount, DataFactoryElement sourceRetryWait, DataFactoryElement maxConcurrentConnections, DataFactoryElement disableMetricsCollection, IDictionary> additionalProperties, DataFactoryElement queryTimeout, BinaryData additionalColumns, DataFactoryElement sqlReaderQuery, DataFactoryElement sqlReaderStoredProcedureName, BinaryData storedProcedureParameters, DataFactoryElement isolationLevel, BinaryData partitionOption, SqlPartitionSettings partitionSettings) : base(copySourceType, sourceRetryCount, sourceRetryWait, maxConcurrentConnections, disableMetricsCollection, additionalProperties, queryTimeout, additionalColumns) - { - SqlReaderQuery = sqlReaderQuery; - SqlReaderStoredProcedureName = sqlReaderStoredProcedureName; - StoredProcedureParameters = storedProcedureParameters; - IsolationLevel = isolationLevel; - PartitionOption = partitionOption; - PartitionSettings = partitionSettings; - CopySourceType = copySourceType ?? "SqlSource"; - } - - /// SQL reader query. Type: string (or Expression with resultType string). - public DataFactoryElement SqlReaderQuery { get; set; } - /// Name of the stored procedure for a SQL Database source. This cannot be used at the same time as SqlReaderQuery. Type: string (or Expression with resultType string). - public DataFactoryElement SqlReaderStoredProcedureName { get; set; } - /// - /// Value and type setting for stored procedure parameters. Example: "{Parameter1: {value: "1", type: "int"}}". - /// - /// To assign an object to this property use . - /// - /// - /// To assign an already formated json string to this property use . - /// - /// - /// Examples: - /// - /// - /// BinaryData.FromObjectAsJson("foo") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromString("\"foo\"") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromObjectAsJson(new { key = "value" }) - /// Creates a payload of { "key": "value" }. - /// - /// - /// BinaryData.FromString("{\"key\": \"value\"}") - /// Creates a payload of { "key": "value" }. - /// - /// - /// - /// - public BinaryData StoredProcedureParameters { get; set; } - /// Specifies the transaction locking behavior for the SQL source. Allowed values: ReadCommitted/ReadUncommitted/RepeatableRead/Serializable/Snapshot. The default value is ReadCommitted. Type: string (or Expression with resultType string). - public DataFactoryElement IsolationLevel { get; set; } - /// - /// The partition mechanism that will be used for Sql read in parallel. Possible values include: "None", "PhysicalPartitionsOfTable", "DynamicRange". - /// - /// To assign an object to this property use . - /// - /// - /// To assign an already formated json string to this property use . - /// - /// - /// Examples: - /// - /// - /// BinaryData.FromObjectAsJson("foo") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromString("\"foo\"") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromObjectAsJson(new { key = "value" }) - /// Creates a payload of { "key": "value" }. - /// - /// - /// BinaryData.FromString("{\"key\": \"value\"}") - /// Creates a payload of { "key": "value" }. - /// - /// - /// - /// - public BinaryData PartitionOption { get; set; } - /// The settings that will be leveraged for Sql source partitioning. - public SqlPartitionSettings PartitionSettings { get; set; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SqlUpsertSettings.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SqlUpsertSettings.Serialization.cs deleted file mode 100644 index 29229698..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SqlUpsertSettings.Serialization.cs +++ /dev/null @@ -1,76 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class SqlUpsertSettings : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - if (Optional.IsDefined(UseTempDB)) - { - writer.WritePropertyName("useTempDB"u8); - JsonSerializer.Serialize(writer, UseTempDB); - } - if (Optional.IsDefined(InterimSchemaName)) - { - writer.WritePropertyName("interimSchemaName"u8); - JsonSerializer.Serialize(writer, InterimSchemaName); - } - if (Optional.IsDefined(Keys)) - { - writer.WritePropertyName("keys"u8); - JsonSerializer.Serialize(writer, Keys); - } - writer.WriteEndObject(); - } - - internal static SqlUpsertSettings DeserializeSqlUpsertSettings(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - Optional> useTempDB = default; - Optional> interimSchemaName = default; - Optional>> keys = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("useTempDB"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - useTempDB = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("interimSchemaName"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - interimSchemaName = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("keys"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - keys = JsonSerializer.Deserialize>>(property.Value.GetRawText()); - continue; - } - } - return new SqlUpsertSettings(useTempDB.Value, interimSchemaName.Value, keys.Value); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SqlUpsertSettings.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SqlUpsertSettings.cs deleted file mode 100644 index decd2f79..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SqlUpsertSettings.cs +++ /dev/null @@ -1,35 +0,0 @@ -// - -#nullable disable - -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// Sql upsert option settings. - public partial class SqlUpsertSettings - { - /// Initializes a new instance of SqlUpsertSettings. - public SqlUpsertSettings() - { - } - - /// Initializes a new instance of SqlUpsertSettings. - /// Specifies whether to use temp db for upsert interim table. Type: boolean (or Expression with resultType boolean). - /// Schema name for interim table. Type: string (or Expression with resultType string). - /// Key column names for unique row identification. Type: array of strings (or Expression with resultType array of strings). - internal SqlUpsertSettings(DataFactoryElement useTempDB, DataFactoryElement interimSchemaName, DataFactoryElement> keys) - { - UseTempDB = useTempDB; - InterimSchemaName = interimSchemaName; - Keys = keys; - } - - /// Specifies whether to use temp db for upsert interim table. Type: boolean (or Expression with resultType boolean). - public DataFactoryElement UseTempDB { get; set; } - /// Schema name for interim table. Type: string (or Expression with resultType string). - public DataFactoryElement InterimSchemaName { get; set; } - /// Key column names for unique row identification. Type: array of strings (or Expression with resultType array of strings). - public DataFactoryElement> Keys { get; set; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SquareLinkedService.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SquareLinkedService.Serialization.cs deleted file mode 100644 index e726b86a..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SquareLinkedService.Serialization.cs +++ /dev/null @@ -1,295 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class SquareLinkedService : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - writer.WritePropertyName("type"u8); - writer.WriteStringValue(LinkedServiceType); - if (Optional.IsDefined(ConnectVia)) - { - writer.WritePropertyName("connectVia"u8); - writer.WriteObjectValue(ConnectVia); - } - if (Optional.IsDefined(Description)) - { - writer.WritePropertyName("description"u8); - writer.WriteStringValue(Description); - } - if (Optional.IsCollectionDefined(Parameters)) - { - writer.WritePropertyName("parameters"u8); - writer.WriteStartObject(); - foreach (var item in Parameters) - { - writer.WritePropertyName(item.Key); - writer.WriteObjectValue(item.Value); - } - writer.WriteEndObject(); - } - if (Optional.IsCollectionDefined(Annotations)) - { - writer.WritePropertyName("annotations"u8); - writer.WriteStartArray(); - foreach (var item in Annotations) - { - if (item == null) - { - writer.WriteNullValue(); - continue; - } -#if NET6_0_OR_GREATER - writer.WriteRawValue(item); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.ToString()).RootElement); -#endif - } - writer.WriteEndArray(); - } - writer.WritePropertyName("typeProperties"u8); - writer.WriteStartObject(); - if (Optional.IsDefined(ConnectionProperties)) - { - writer.WritePropertyName("connectionProperties"u8); -#if NET6_0_OR_GREATER - writer.WriteRawValue(ConnectionProperties); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(ConnectionProperties.ToString()).RootElement); -#endif - } - if (Optional.IsDefined(Host)) - { - writer.WritePropertyName("host"u8); - JsonSerializer.Serialize(writer, Host); - } - if (Optional.IsDefined(ClientId)) - { - writer.WritePropertyName("clientId"u8); - JsonSerializer.Serialize(writer, ClientId); - } - if (Optional.IsDefined(ClientSecret)) - { - writer.WritePropertyName("clientSecret"u8); - JsonSerializer.Serialize(writer, ClientSecret); - } - if (Optional.IsDefined(RedirectUri)) - { - writer.WritePropertyName("redirectUri"u8); - JsonSerializer.Serialize(writer, RedirectUri); - } - if (Optional.IsDefined(UseEncryptedEndpoints)) - { - writer.WritePropertyName("useEncryptedEndpoints"u8); - JsonSerializer.Serialize(writer, UseEncryptedEndpoints); - } - if (Optional.IsDefined(UseHostVerification)) - { - writer.WritePropertyName("useHostVerification"u8); - JsonSerializer.Serialize(writer, UseHostVerification); - } - if (Optional.IsDefined(UsePeerVerification)) - { - writer.WritePropertyName("usePeerVerification"u8); - JsonSerializer.Serialize(writer, UsePeerVerification); - } - if (Optional.IsDefined(EncryptedCredential)) - { - writer.WritePropertyName("encryptedCredential"u8); - writer.WriteStringValue(EncryptedCredential); - } - writer.WriteEndObject(); - foreach (var item in AdditionalProperties) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.Value.ToString()).RootElement); -#endif - } - writer.WriteEndObject(); - } - - internal static SquareLinkedService DeserializeSquareLinkedService(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - string type = default; - Optional connectVia = default; - Optional description = default; - Optional> parameters = default; - Optional> annotations = default; - Optional connectionProperties = default; - Optional> host = default; - Optional> clientId = default; - Optional clientSecret = default; - Optional> redirectUri = default; - Optional> useEncryptedEndpoints = default; - Optional> useHostVerification = default; - Optional> usePeerVerification = default; - Optional encryptedCredential = default; - IDictionary> additionalProperties = default; - Dictionary> additionalPropertiesDictionary = new Dictionary>(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("type"u8)) - { - type = property.Value.GetString(); - continue; - } - if (property.NameEquals("connectVia"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - connectVia = IntegrationRuntimeReference.DeserializeIntegrationRuntimeReference(property.Value); - continue; - } - if (property.NameEquals("description"u8)) - { - description = property.Value.GetString(); - continue; - } - if (property.NameEquals("parameters"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - Dictionary dictionary = new Dictionary(); - foreach (var property0 in property.Value.EnumerateObject()) - { - dictionary.Add(property0.Name, EntityParameterSpecification.DeserializeEntityParameterSpecification(property0.Value)); - } - parameters = dictionary; - continue; - } - if (property.NameEquals("annotations"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - if (item.ValueKind == JsonValueKind.Null) - { - array.Add(null); - } - else - { - array.Add(BinaryData.FromString(item.GetRawText())); - } - } - annotations = array; - continue; - } - if (property.NameEquals("typeProperties"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - foreach (var property0 in property.Value.EnumerateObject()) - { - if (property0.NameEquals("connectionProperties"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - connectionProperties = BinaryData.FromString(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("host"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - host = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("clientId"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - clientId = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("clientSecret"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - clientSecret = JsonSerializer.Deserialize(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("redirectUri"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - redirectUri = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("useEncryptedEndpoints"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - useEncryptedEndpoints = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("useHostVerification"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - useHostVerification = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("usePeerVerification"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - usePeerVerification = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("encryptedCredential"u8)) - { - encryptedCredential = property0.Value.GetString(); - continue; - } - } - continue; - } - additionalPropertiesDictionary.Add(property.Name, JsonSerializer.Deserialize>(property.Value.GetRawText())); - } - additionalProperties = additionalPropertiesDictionary; - return new SquareLinkedService(type, connectVia.Value, description.Value, Optional.ToDictionary(parameters), Optional.ToList(annotations), additionalProperties, connectionProperties.Value, host.Value, clientId.Value, clientSecret, redirectUri.Value, useEncryptedEndpoints.Value, useHostVerification.Value, usePeerVerification.Value, encryptedCredential.Value); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SquareLinkedService.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SquareLinkedService.cs deleted file mode 100644 index 0981d87d..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SquareLinkedService.cs +++ /dev/null @@ -1,96 +0,0 @@ -// - -#nullable disable - -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// Square Service linked service. - public partial class SquareLinkedService : DataFactoryLinkedServiceProperties - { - /// Initializes a new instance of SquareLinkedService. - public SquareLinkedService() - { - LinkedServiceType = "Square"; - } - - /// Initializes a new instance of SquareLinkedService. - /// Type of linked service. - /// The integration runtime reference. - /// Linked service description. - /// Parameters for linked service. - /// List of tags that can be used for describing the linked service. - /// Additional Properties. - /// Properties used to connect to Square. It is mutually exclusive with any other properties in the linked service. Type: object. - /// The URL of the Square instance. (i.e. mystore.mysquare.com). - /// The client ID associated with your Square application. - /// The client secret associated with your Square application. - /// The redirect URL assigned in the Square application dashboard. (i.e. http://localhost:2500). - /// Specifies whether the data source endpoints are encrypted using HTTPS. The default value is true. - /// 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. - /// Specifies whether to verify the identity of the server when connecting over SSL. The default value is true. - /// The encrypted credential used for authentication. Credentials are encrypted using the integration runtime credential manager. Type: string. - internal SquareLinkedService(string linkedServiceType, IntegrationRuntimeReference connectVia, string description, IDictionary parameters, IList annotations, IDictionary> additionalProperties, BinaryData connectionProperties, DataFactoryElement host, DataFactoryElement clientId, DataFactorySecretBaseDefinition clientSecret, DataFactoryElement redirectUri, DataFactoryElement useEncryptedEndpoints, DataFactoryElement useHostVerification, DataFactoryElement usePeerVerification, string encryptedCredential) : base(linkedServiceType, connectVia, description, parameters, annotations, additionalProperties) - { - ConnectionProperties = connectionProperties; - Host = host; - ClientId = clientId; - ClientSecret = clientSecret; - RedirectUri = redirectUri; - UseEncryptedEndpoints = useEncryptedEndpoints; - UseHostVerification = useHostVerification; - UsePeerVerification = usePeerVerification; - EncryptedCredential = encryptedCredential; - LinkedServiceType = linkedServiceType ?? "Square"; - } - - /// - /// Properties used to connect to Square. It is mutually exclusive with any other properties in the linked service. Type: object. - /// - /// To assign an object to this property use . - /// - /// - /// To assign an already formated json string to this property use . - /// - /// - /// Examples: - /// - /// - /// BinaryData.FromObjectAsJson("foo") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromString("\"foo\"") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromObjectAsJson(new { key = "value" }) - /// Creates a payload of { "key": "value" }. - /// - /// - /// BinaryData.FromString("{\"key\": \"value\"}") - /// Creates a payload of { "key": "value" }. - /// - /// - /// - /// - public BinaryData ConnectionProperties { get; set; } - /// The URL of the Square instance. (i.e. mystore.mysquare.com). - public DataFactoryElement Host { get; set; } - /// The client ID associated with your Square application. - public DataFactoryElement ClientId { get; set; } - /// The client secret associated with your Square application. - public DataFactorySecretBaseDefinition ClientSecret { get; set; } - /// The redirect URL assigned in the Square application dashboard. (i.e. http://localhost:2500). - public DataFactoryElement RedirectUri { get; set; } - /// Specifies whether the data source endpoints are encrypted using HTTPS. The default value is true. - public DataFactoryElement UseEncryptedEndpoints { get; set; } - /// 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. - public DataFactoryElement UseHostVerification { get; set; } - /// Specifies whether to verify the identity of the server when connecting over SSL. The default value is true. - public DataFactoryElement UsePeerVerification { get; set; } - /// The encrypted credential used for authentication. Credentials are encrypted using the integration runtime credential manager. Type: string. - public string EncryptedCredential { get; set; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SquareObjectDataset.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SquareObjectDataset.Serialization.cs deleted file mode 100644 index 4e372681..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SquareObjectDataset.Serialization.cs +++ /dev/null @@ -1,212 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class SquareObjectDataset : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - writer.WritePropertyName("type"u8); - writer.WriteStringValue(DatasetType); - if (Optional.IsDefined(Description)) - { - writer.WritePropertyName("description"u8); - writer.WriteStringValue(Description); - } - if (Optional.IsDefined(Structure)) - { - writer.WritePropertyName("structure"u8); - JsonSerializer.Serialize(writer, Structure); - } - if (Optional.IsDefined(Schema)) - { - writer.WritePropertyName("schema"u8); - JsonSerializer.Serialize(writer, Schema); - } - writer.WritePropertyName("linkedServiceName"u8); - JsonSerializer.Serialize(writer, LinkedServiceName); if (Optional.IsCollectionDefined(Parameters)) - { - writer.WritePropertyName("parameters"u8); - writer.WriteStartObject(); - foreach (var item in Parameters) - { - writer.WritePropertyName(item.Key); - writer.WriteObjectValue(item.Value); - } - writer.WriteEndObject(); - } - if (Optional.IsCollectionDefined(Annotations)) - { - writer.WritePropertyName("annotations"u8); - writer.WriteStartArray(); - foreach (var item in Annotations) - { - if (item == null) - { - writer.WriteNullValue(); - continue; - } -#if NET6_0_OR_GREATER - writer.WriteRawValue(item); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.ToString()).RootElement); -#endif - } - writer.WriteEndArray(); - } - if (Optional.IsDefined(Folder)) - { - writer.WritePropertyName("folder"u8); - writer.WriteObjectValue(Folder); - } - writer.WritePropertyName("typeProperties"u8); - writer.WriteStartObject(); - if (Optional.IsDefined(TableName)) - { - writer.WritePropertyName("tableName"u8); - JsonSerializer.Serialize(writer, TableName); - } - writer.WriteEndObject(); - foreach (var item in AdditionalProperties) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.Value.ToString()).RootElement); -#endif - } - writer.WriteEndObject(); - } - - internal static SquareObjectDataset DeserializeSquareObjectDataset(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - string type = default; - Optional description = default; - Optional>> structure = default; - Optional>> schema = default; - DataFactoryLinkedServiceReference linkedServiceName = default; - Optional> parameters = default; - Optional> annotations = default; - Optional folder = default; - Optional> tableName = default; - IDictionary> additionalProperties = default; - Dictionary> additionalPropertiesDictionary = new Dictionary>(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("type"u8)) - { - type = property.Value.GetString(); - continue; - } - if (property.NameEquals("description"u8)) - { - description = property.Value.GetString(); - continue; - } - if (property.NameEquals("structure"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - structure = JsonSerializer.Deserialize>>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("schema"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - schema = JsonSerializer.Deserialize>>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("linkedServiceName"u8)) - { - linkedServiceName = JsonSerializer.Deserialize(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("parameters"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - Dictionary dictionary = new Dictionary(); - foreach (var property0 in property.Value.EnumerateObject()) - { - dictionary.Add(property0.Name, EntityParameterSpecification.DeserializeEntityParameterSpecification(property0.Value)); - } - parameters = dictionary; - continue; - } - if (property.NameEquals("annotations"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - if (item.ValueKind == JsonValueKind.Null) - { - array.Add(null); - } - else - { - array.Add(BinaryData.FromString(item.GetRawText())); - } - } - annotations = array; - continue; - } - if (property.NameEquals("folder"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - folder = DatasetFolder.DeserializeDatasetFolder(property.Value); - continue; - } - if (property.NameEquals("typeProperties"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - foreach (var property0 in property.Value.EnumerateObject()) - { - if (property0.NameEquals("tableName"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - tableName = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - } - continue; - } - additionalPropertiesDictionary.Add(property.Name, JsonSerializer.Deserialize>(property.Value.GetRawText())); - } - additionalProperties = additionalPropertiesDictionary; - return new SquareObjectDataset(type, description.Value, structure.Value, schema.Value, linkedServiceName, Optional.ToDictionary(parameters), Optional.ToList(annotations), folder.Value, additionalProperties, tableName.Value); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SquareObjectDataset.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SquareObjectDataset.cs deleted file mode 100644 index dbde1b85..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SquareObjectDataset.cs +++ /dev/null @@ -1,43 +0,0 @@ -// - -#nullable disable - -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// Square Service dataset. - public partial class SquareObjectDataset : DataFactoryDatasetProperties - { - /// Initializes a new instance of SquareObjectDataset. - /// Linked service reference. - /// is null. - public SquareObjectDataset(DataFactoryLinkedServiceReference linkedServiceName) : base(linkedServiceName) - { - Argument.AssertNotNull(linkedServiceName, nameof(linkedServiceName)); - - DatasetType = "SquareObject"; - } - - /// Initializes a new instance of SquareObjectDataset. - /// Type of dataset. - /// Dataset description. - /// Columns that define the structure of the dataset. Type: array (or Expression with resultType array), itemType: DatasetDataElement. - /// Columns that define the physical type schema of the dataset. Type: array (or Expression with resultType array), itemType: DatasetSchemaDataElement. - /// Linked service reference. - /// Parameters for dataset. - /// List of tags that can be used for describing the Dataset. - /// The folder that this Dataset is in. If not specified, Dataset will appear at the root level. - /// Additional Properties. - /// The table name. Type: string (or Expression with resultType string). - internal SquareObjectDataset(string datasetType, string description, DataFactoryElement> structure, DataFactoryElement> schema, DataFactoryLinkedServiceReference linkedServiceName, IDictionary parameters, IList annotations, DatasetFolder folder, IDictionary> additionalProperties, DataFactoryElement tableName) : base(datasetType, description, structure, schema, linkedServiceName, parameters, annotations, folder, additionalProperties) - { - TableName = tableName; - DatasetType = datasetType ?? "SquareObject"; - } - - /// The table name. Type: string (or Expression with resultType string). - public DataFactoryElement TableName { get; set; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SquareSource.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SquareSource.Serialization.cs deleted file mode 100644 index 74835297..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SquareSource.Serialization.cs +++ /dev/null @@ -1,161 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class SquareSource : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - if (Optional.IsDefined(Query)) - { - writer.WritePropertyName("query"u8); - JsonSerializer.Serialize(writer, Query); - } - if (Optional.IsDefined(QueryTimeout)) - { - writer.WritePropertyName("queryTimeout"u8); - JsonSerializer.Serialize(writer, QueryTimeout); - } - if (Optional.IsDefined(AdditionalColumns)) - { - writer.WritePropertyName("additionalColumns"u8); -#if NET6_0_OR_GREATER - writer.WriteRawValue(AdditionalColumns); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(AdditionalColumns.ToString()).RootElement); -#endif - } - writer.WritePropertyName("type"u8); - writer.WriteStringValue(CopySourceType); - if (Optional.IsDefined(SourceRetryCount)) - { - writer.WritePropertyName("sourceRetryCount"u8); - JsonSerializer.Serialize(writer, SourceRetryCount); - } - if (Optional.IsDefined(SourceRetryWait)) - { - writer.WritePropertyName("sourceRetryWait"u8); - JsonSerializer.Serialize(writer, SourceRetryWait); - } - if (Optional.IsDefined(MaxConcurrentConnections)) - { - writer.WritePropertyName("maxConcurrentConnections"u8); - JsonSerializer.Serialize(writer, MaxConcurrentConnections); - } - if (Optional.IsDefined(DisableMetricsCollection)) - { - writer.WritePropertyName("disableMetricsCollection"u8); - JsonSerializer.Serialize(writer, DisableMetricsCollection); - } - foreach (var item in AdditionalProperties) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.Value.ToString()).RootElement); -#endif - } - writer.WriteEndObject(); - } - - internal static SquareSource DeserializeSquareSource(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - Optional> query = default; - Optional> queryTimeout = default; - Optional additionalColumns = default; - string type = default; - Optional> sourceRetryCount = default; - Optional> sourceRetryWait = default; - Optional> maxConcurrentConnections = default; - Optional> disableMetricsCollection = default; - IDictionary> additionalProperties = default; - Dictionary> additionalPropertiesDictionary = new Dictionary>(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("query"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - query = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("queryTimeout"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - queryTimeout = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("additionalColumns"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - additionalColumns = BinaryData.FromString(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("type"u8)) - { - type = property.Value.GetString(); - continue; - } - if (property.NameEquals("sourceRetryCount"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - sourceRetryCount = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("sourceRetryWait"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - sourceRetryWait = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("maxConcurrentConnections"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - maxConcurrentConnections = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("disableMetricsCollection"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - disableMetricsCollection = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - additionalPropertiesDictionary.Add(property.Name, JsonSerializer.Deserialize>(property.Value.GetRawText())); - } - additionalProperties = additionalPropertiesDictionary; - return new SquareSource(type, sourceRetryCount.Value, sourceRetryWait.Value, maxConcurrentConnections.Value, disableMetricsCollection.Value, additionalProperties, queryTimeout.Value, additionalColumns.Value, query.Value); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SquareSource.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SquareSource.cs deleted file mode 100644 index 346a3d97..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SquareSource.cs +++ /dev/null @@ -1,37 +0,0 @@ -// - -#nullable disable - -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// A copy activity Square Service source. - public partial class SquareSource : TabularSource - { - /// Initializes a new instance of SquareSource. - public SquareSource() - { - CopySourceType = "SquareSource"; - } - - /// Initializes a new instance of SquareSource. - /// Copy source type. - /// Source retry count. Type: integer (or Expression with resultType integer). - /// Source retry wait. Type: string (or Expression with resultType string), pattern: ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). - /// The maximum concurrent connection count for the source data store. Type: integer (or Expression with resultType integer). - /// If true, disable data store metrics collection. Default is false. Type: boolean (or Expression with resultType boolean). - /// Additional Properties. - /// 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). - /// A query to retrieve data from source. Type: string (or Expression with resultType string). - internal SquareSource(string copySourceType, DataFactoryElement sourceRetryCount, DataFactoryElement sourceRetryWait, DataFactoryElement maxConcurrentConnections, DataFactoryElement disableMetricsCollection, IDictionary> additionalProperties, DataFactoryElement queryTimeout, BinaryData additionalColumns, DataFactoryElement query) : base(copySourceType, sourceRetryCount, sourceRetryWait, maxConcurrentConnections, disableMetricsCollection, additionalProperties, queryTimeout, additionalColumns) - { - Query = query; - CopySourceType = copySourceType ?? "SquareSource"; - } - - /// A query to retrieve data from source. Type: string (or Expression with resultType string). - public DataFactoryElement Query { get; set; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SsisAccessCredential.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SsisAccessCredential.Serialization.cs deleted file mode 100644 index 6bf6a504..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SsisAccessCredential.Serialization.cs +++ /dev/null @@ -1,54 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class SsisAccessCredential : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - writer.WritePropertyName("domain"u8); - JsonSerializer.Serialize(writer, Domain); - writer.WritePropertyName("userName"u8); - JsonSerializer.Serialize(writer, UserName); - writer.WritePropertyName("password"u8); - JsonSerializer.Serialize(writer, Password); writer.WriteEndObject(); - } - - internal static SsisAccessCredential DeserializeSsisAccessCredential(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - DataFactoryElement domain = default; - DataFactoryElement userName = default; - DataFactorySecretBaseDefinition password = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("domain"u8)) - { - domain = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("userName"u8)) - { - userName = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("password"u8)) - { - password = JsonSerializer.Deserialize(property.Value.GetRawText()); - continue; - } - } - return new SsisAccessCredential(domain, userName, password); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SsisAccessCredential.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SsisAccessCredential.cs deleted file mode 100644 index b8ce577b..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SsisAccessCredential.cs +++ /dev/null @@ -1,36 +0,0 @@ -// - -#nullable disable - -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// SSIS access credential. - public partial class SsisAccessCredential - { - /// Initializes a new instance of SsisAccessCredential. - /// Domain for windows authentication. Type: string (or Expression with resultType string). - /// UseName for windows authentication. Type: string (or Expression with resultType string). - /// Password for windows authentication. - /// , or is null. - public SsisAccessCredential(DataFactoryElement domain, DataFactoryElement userName, DataFactorySecretBaseDefinition password) - { - Argument.AssertNotNull(domain, nameof(domain)); - Argument.AssertNotNull(userName, nameof(userName)); - Argument.AssertNotNull(password, nameof(password)); - - Domain = domain; - UserName = userName; - Password = password; - } - - /// Domain for windows authentication. Type: string (or Expression with resultType string). - public DataFactoryElement Domain { get; set; } - /// UseName for windows authentication. Type: string (or Expression with resultType string). - public DataFactoryElement UserName { get; set; } - /// Password for windows authentication. - public DataFactorySecretBaseDefinition Password { get; set; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SsisChildPackage.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SsisChildPackage.Serialization.cs deleted file mode 100644 index bb8e3f3b..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SsisChildPackage.Serialization.cs +++ /dev/null @@ -1,69 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class SsisChildPackage : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - writer.WritePropertyName("packagePath"u8); - JsonSerializer.Serialize(writer, PackagePath); - if (Optional.IsDefined(PackageName)) - { - writer.WritePropertyName("packageName"u8); - writer.WriteStringValue(PackageName); - } - writer.WritePropertyName("packageContent"u8); - JsonSerializer.Serialize(writer, PackageContent); - if (Optional.IsDefined(PackageLastModifiedDate)) - { - writer.WritePropertyName("packageLastModifiedDate"u8); - writer.WriteStringValue(PackageLastModifiedDate); - } - writer.WriteEndObject(); - } - - internal static SsisChildPackage DeserializeSsisChildPackage(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - DataFactoryElement packagePath = default; - Optional packageName = default; - DataFactoryElement packageContent = default; - Optional packageLastModifiedDate = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("packagePath"u8)) - { - packagePath = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("packageName"u8)) - { - packageName = property.Value.GetString(); - continue; - } - if (property.NameEquals("packageContent"u8)) - { - packageContent = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("packageLastModifiedDate"u8)) - { - packageLastModifiedDate = property.Value.GetString(); - continue; - } - } - return new SsisChildPackage(packagePath, packageName.Value, packageContent, packageLastModifiedDate.Value); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SsisChildPackage.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SsisChildPackage.cs deleted file mode 100644 index 2d049f11..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SsisChildPackage.cs +++ /dev/null @@ -1,48 +0,0 @@ -// - -#nullable disable - -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// SSIS embedded child package. - public partial class SsisChildPackage - { - /// Initializes a new instance of SsisChildPackage. - /// Path for embedded child package. Type: string (or Expression with resultType string). - /// Content for embedded child package. Type: string (or Expression with resultType string). - /// or is null. - public SsisChildPackage(DataFactoryElement packagePath, DataFactoryElement packageContent) - { - Argument.AssertNotNull(packagePath, nameof(packagePath)); - Argument.AssertNotNull(packageContent, nameof(packageContent)); - - PackagePath = packagePath; - PackageContent = packageContent; - } - - /// Initializes a new instance of SsisChildPackage. - /// Path for embedded child package. Type: string (or Expression with resultType string). - /// Name for embedded child package. - /// Content for embedded child package. Type: string (or Expression with resultType string). - /// Last modified date for embedded child package. - internal SsisChildPackage(DataFactoryElement packagePath, string packageName, DataFactoryElement packageContent, string packageLastModifiedDate) - { - PackagePath = packagePath; - PackageName = packageName; - PackageContent = packageContent; - PackageLastModifiedDate = packageLastModifiedDate; - } - - /// Path for embedded child package. Type: string (or Expression with resultType string). - public DataFactoryElement PackagePath { get; set; } - /// Name for embedded child package. - public string PackageName { get; set; } - /// Content for embedded child package. Type: string (or Expression with resultType string). - public DataFactoryElement PackageContent { get; set; } - /// Last modified date for embedded child package. - public string PackageLastModifiedDate { get; set; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SsisEnvironment.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SsisEnvironment.Serialization.cs deleted file mode 100644 index 3d33d570..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SsisEnvironment.Serialization.cs +++ /dev/null @@ -1,77 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class SsisEnvironment - { - internal static SsisEnvironment DeserializeSsisEnvironment(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - Optional folderId = default; - Optional> variables = default; - SsisObjectMetadataType type = default; - Optional id = default; - Optional name = default; - Optional description = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("folderId"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - folderId = property.Value.GetInt64(); - continue; - } - if (property.NameEquals("variables"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - array.Add(SsisVariable.DeserializeSsisVariable(item)); - } - variables = array; - continue; - } - if (property.NameEquals("type"u8)) - { - type = new SsisObjectMetadataType(property.Value.GetString()); - continue; - } - if (property.NameEquals("id"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - id = property.Value.GetInt64(); - continue; - } - if (property.NameEquals("name"u8)) - { - name = property.Value.GetString(); - continue; - } - if (property.NameEquals("description"u8)) - { - description = property.Value.GetString(); - continue; - } - } - return new SsisEnvironment(type, Optional.ToNullable(id), name.Value, description.Value, Optional.ToNullable(folderId), Optional.ToList(variables)); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SsisEnvironment.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SsisEnvironment.cs deleted file mode 100644 index 0cbd1cef..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SsisEnvironment.cs +++ /dev/null @@ -1,38 +0,0 @@ -// - -#nullable disable - -using Azure.Core; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// Ssis environment. - public partial class SsisEnvironment : SsisObjectMetadata - { - /// Initializes a new instance of SsisEnvironment. - internal SsisEnvironment() - { - Variables = new ChangeTrackingList(); - MetadataType = SsisObjectMetadataType.Environment; - } - - /// Initializes a new instance of SsisEnvironment. - /// Type of metadata. - /// Metadata id. - /// Metadata name. - /// Metadata description. - /// Folder id which contains environment. - /// Variable in environment. - internal SsisEnvironment(SsisObjectMetadataType metadataType, long? id, string name, string description, long? folderId, IReadOnlyList variables) : base(metadataType, id, name, description) - { - FolderId = folderId; - Variables = variables; - MetadataType = metadataType; - } - - /// Folder id which contains environment. - public long? FolderId { get; } - /// Variable in environment. - public IReadOnlyList Variables { get; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SsisEnvironmentReference.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SsisEnvironmentReference.Serialization.cs deleted file mode 100644 index 49de8d15..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SsisEnvironmentReference.Serialization.cs +++ /dev/null @@ -1,52 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class SsisEnvironmentReference - { - internal static SsisEnvironmentReference DeserializeSsisEnvironmentReference(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - Optional id = default; - Optional environmentFolderName = default; - Optional environmentName = default; - Optional referenceType = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("id"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - id = property.Value.GetInt64(); - continue; - } - if (property.NameEquals("environmentFolderName"u8)) - { - environmentFolderName = property.Value.GetString(); - continue; - } - if (property.NameEquals("environmentName"u8)) - { - environmentName = property.Value.GetString(); - continue; - } - if (property.NameEquals("referenceType"u8)) - { - referenceType = property.Value.GetString(); - continue; - } - } - return new SsisEnvironmentReference(Optional.ToNullable(id), environmentFolderName.Value, environmentName.Value, referenceType.Value); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SsisEnvironmentReference.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SsisEnvironmentReference.cs deleted file mode 100644 index 1a7a761e..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SsisEnvironmentReference.cs +++ /dev/null @@ -1,37 +0,0 @@ -// - -#nullable disable - -namespace AzureDataFactory.TestingFramework.Models -{ - /// Ssis environment reference. - public partial class SsisEnvironmentReference - { - /// Initializes a new instance of SsisEnvironmentReference. - internal SsisEnvironmentReference() - { - } - - /// Initializes a new instance of SsisEnvironmentReference. - /// Environment reference id. - /// Environment folder name. - /// Environment name. - /// Reference type. - internal SsisEnvironmentReference(long? id, string environmentFolderName, string environmentName, string referenceType) - { - Id = id; - EnvironmentFolderName = environmentFolderName; - EnvironmentName = environmentName; - ReferenceType = referenceType; - } - - /// Environment reference id. - public long? Id { get; } - /// Environment folder name. - public string EnvironmentFolderName { get; } - /// Environment name. - public string EnvironmentName { get; } - /// Reference type. - public string ReferenceType { get; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SsisExecutionCredential.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SsisExecutionCredential.Serialization.cs deleted file mode 100644 index 8ef41d65..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SsisExecutionCredential.Serialization.cs +++ /dev/null @@ -1,54 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class SsisExecutionCredential : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - writer.WritePropertyName("domain"u8); - JsonSerializer.Serialize(writer, Domain); - writer.WritePropertyName("userName"u8); - JsonSerializer.Serialize(writer, UserName); - writer.WritePropertyName("password"u8); - JsonSerializer.Serialize(writer, Password); writer.WriteEndObject(); - } - - internal static SsisExecutionCredential DeserializeSsisExecutionCredential(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - DataFactoryElement domain = default; - DataFactoryElement userName = default; - DataFactorySecretString password = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("domain"u8)) - { - domain = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("userName"u8)) - { - userName = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("password"u8)) - { - password = JsonSerializer.Deserialize(property.Value.GetRawText()); - continue; - } - } - return new SsisExecutionCredential(domain, userName, password); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SsisExecutionCredential.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SsisExecutionCredential.cs deleted file mode 100644 index a7d310b3..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SsisExecutionCredential.cs +++ /dev/null @@ -1,36 +0,0 @@ -// - -#nullable disable - -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// SSIS package execution credential. - public partial class SsisExecutionCredential - { - /// Initializes a new instance of SsisExecutionCredential. - /// Domain for windows authentication. Type: string (or Expression with resultType string). - /// UseName for windows authentication. Type: string (or Expression with resultType string). - /// Password for windows authentication. - /// , or is null. - public SsisExecutionCredential(DataFactoryElement domain, DataFactoryElement userName, DataFactorySecretString password) - { - Argument.AssertNotNull(domain, nameof(domain)); - Argument.AssertNotNull(userName, nameof(userName)); - Argument.AssertNotNull(password, nameof(password)); - - Domain = domain; - UserName = userName; - Password = password; - } - - /// Domain for windows authentication. Type: string (or Expression with resultType string). - public DataFactoryElement Domain { get; set; } - /// UseName for windows authentication. Type: string (or Expression with resultType string). - public DataFactoryElement UserName { get; set; } - /// Password for windows authentication. - public DataFactorySecretString Password { get; set; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SsisExecutionParameter.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SsisExecutionParameter.Serialization.cs deleted file mode 100644 index 039268ea..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SsisExecutionParameter.Serialization.cs +++ /dev/null @@ -1,39 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class SsisExecutionParameter : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - writer.WritePropertyName("value"u8); - JsonSerializer.Serialize(writer, Value); - writer.WriteEndObject(); - } - - internal static SsisExecutionParameter DeserializeSsisExecutionParameter(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - DataFactoryElement value = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("value"u8)) - { - value = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - } - return new SsisExecutionParameter(value); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SsisExecutionParameter.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SsisExecutionParameter.cs deleted file mode 100644 index f40f1ee4..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SsisExecutionParameter.cs +++ /dev/null @@ -1,26 +0,0 @@ -// - -#nullable disable - -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// SSIS execution parameter. - public partial class SsisExecutionParameter - { - /// Initializes a new instance of SsisExecutionParameter. - /// SSIS package execution parameter value. Type: string (or Expression with resultType string). - /// is null. - public SsisExecutionParameter(DataFactoryElement value) - { - Argument.AssertNotNull(value, nameof(value)); - - Value = value; - } - - /// SSIS package execution parameter value. Type: string (or Expression with resultType string). - public DataFactoryElement Value { get; set; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SsisFolder.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SsisFolder.Serialization.cs deleted file mode 100644 index 9e4076fb..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SsisFolder.Serialization.cs +++ /dev/null @@ -1,52 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class SsisFolder - { - internal static SsisFolder DeserializeSsisFolder(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - SsisObjectMetadataType type = default; - Optional id = default; - Optional name = default; - Optional description = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("type"u8)) - { - type = new SsisObjectMetadataType(property.Value.GetString()); - continue; - } - if (property.NameEquals("id"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - id = property.Value.GetInt64(); - continue; - } - if (property.NameEquals("name"u8)) - { - name = property.Value.GetString(); - continue; - } - if (property.NameEquals("description"u8)) - { - description = property.Value.GetString(); - continue; - } - } - return new SsisFolder(type, Optional.ToNullable(id), name.Value, description.Value); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SsisFolder.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SsisFolder.cs deleted file mode 100644 index 14c450b0..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SsisFolder.cs +++ /dev/null @@ -1,26 +0,0 @@ -// - -#nullable disable - -namespace AzureDataFactory.TestingFramework.Models -{ - /// Ssis folder. - public partial class SsisFolder : SsisObjectMetadata - { - /// Initializes a new instance of SsisFolder. - internal SsisFolder() - { - MetadataType = SsisObjectMetadataType.Folder; - } - - /// Initializes a new instance of SsisFolder. - /// Type of metadata. - /// Metadata id. - /// Metadata name. - /// Metadata description. - internal SsisFolder(SsisObjectMetadataType metadataType, long? id, string name, string description) : base(metadataType, id, name, description) - { - MetadataType = metadataType; - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SsisLogLocation.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SsisLogLocation.Serialization.cs deleted file mode 100644 index d06a39c6..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SsisLogLocation.Serialization.cs +++ /dev/null @@ -1,92 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class SsisLogLocation : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - writer.WritePropertyName("logPath"u8); - JsonSerializer.Serialize(writer, LogPath); - writer.WritePropertyName("type"u8); - writer.WriteStringValue(LocationType.ToString()); - writer.WritePropertyName("typeProperties"u8); - writer.WriteStartObject(); - if (Optional.IsDefined(AccessCredential)) - { - writer.WritePropertyName("accessCredential"u8); - writer.WriteObjectValue(AccessCredential); - } - if (Optional.IsDefined(LogRefreshInterval)) - { - writer.WritePropertyName("logRefreshInterval"u8); - JsonSerializer.Serialize(writer, LogRefreshInterval); - } - writer.WriteEndObject(); - writer.WriteEndObject(); - } - - internal static SsisLogLocation DeserializeSsisLogLocation(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - DataFactoryElement logPath = default; - SsisLogLocationType type = default; - Optional accessCredential = default; - Optional> logRefreshInterval = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("logPath"u8)) - { - logPath = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("type"u8)) - { - type = new SsisLogLocationType(property.Value.GetString()); - continue; - } - if (property.NameEquals("typeProperties"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - foreach (var property0 in property.Value.EnumerateObject()) - { - if (property0.NameEquals("accessCredential"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - accessCredential = SsisAccessCredential.DeserializeSsisAccessCredential(property0.Value); - continue; - } - if (property0.NameEquals("logRefreshInterval"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - logRefreshInterval = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - } - continue; - } - } - return new SsisLogLocation(logPath, type, accessCredential.Value, logRefreshInterval.Value); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SsisLogLocation.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SsisLogLocation.cs deleted file mode 100644 index 08e24696..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SsisLogLocation.cs +++ /dev/null @@ -1,47 +0,0 @@ -// - -#nullable disable - -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// SSIS package execution log location. - public partial class SsisLogLocation - { - /// Initializes a new instance of SsisLogLocation. - /// The SSIS package execution log path. Type: string (or Expression with resultType string). - /// The type of SSIS log location. - /// is null. - public SsisLogLocation(DataFactoryElement logPath, SsisLogLocationType locationType) - { - Argument.AssertNotNull(logPath, nameof(logPath)); - - LogPath = logPath; - LocationType = locationType; - } - - /// Initializes a new instance of SsisLogLocation. - /// The SSIS package execution log path. Type: string (or Expression with resultType string). - /// The type of SSIS log location. - /// The package execution log access credential. - /// Specifies the interval to refresh log. The default interval is 5 minutes. Type: string (or Expression with resultType string), pattern: ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). - internal SsisLogLocation(DataFactoryElement logPath, SsisLogLocationType locationType, SsisAccessCredential accessCredential, DataFactoryElement logRefreshInterval) - { - LogPath = logPath; - LocationType = locationType; - AccessCredential = accessCredential; - LogRefreshInterval = logRefreshInterval; - } - - /// The SSIS package execution log path. Type: string (or Expression with resultType string). - public DataFactoryElement LogPath { get; set; } - /// The type of SSIS log location. - public SsisLogLocationType LocationType { get; set; } - /// The package execution log access credential. - public SsisAccessCredential AccessCredential { get; set; } - /// Specifies the interval to refresh log. The default interval is 5 minutes. Type: string (or Expression with resultType string), pattern: ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). - public DataFactoryElement LogRefreshInterval { get; set; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SsisLogLocationType.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SsisLogLocationType.cs deleted file mode 100644 index b91c27a0..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SsisLogLocationType.cs +++ /dev/null @@ -1,44 +0,0 @@ -// - -#nullable disable - -using System.ComponentModel; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// The type of SSIS log location. - public readonly partial struct SsisLogLocationType : IEquatable - { - private readonly string _value; - - /// Initializes a new instance of . - /// is null. - public SsisLogLocationType(string value) - { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } - - private const string FileValue = "File"; - - /// File. - public static SsisLogLocationType File { get; } = new SsisLogLocationType(FileValue); - /// Determines if two values are the same. - public static bool operator ==(SsisLogLocationType left, SsisLogLocationType right) => left.Equals(right); - /// Determines if two values are not the same. - public static bool operator !=(SsisLogLocationType left, SsisLogLocationType right) => !left.Equals(right); - /// Converts a string to a . - public static implicit operator SsisLogLocationType(string value) => new SsisLogLocationType(value); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override bool Equals(object obj) => obj is SsisLogLocationType other && Equals(other); - /// - public bool Equals(SsisLogLocationType other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override int GetHashCode() => _value?.GetHashCode() ?? 0; - /// - public override string ToString() => _value; - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SsisObjectMetadata.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SsisObjectMetadata.Serialization.cs deleted file mode 100644 index 3fc9a1fc..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SsisObjectMetadata.Serialization.cs +++ /dev/null @@ -1,30 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class SsisObjectMetadata - { - internal static SsisObjectMetadata DeserializeSsisObjectMetadata(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - if (element.TryGetProperty("type", out JsonElement discriminator)) - { - switch (discriminator.GetString()) - { - case "Environment": return SsisEnvironment.DeserializeSsisEnvironment(element); - case "Folder": return SsisFolder.DeserializeSsisFolder(element); - case "Package": return SsisPackage.DeserializeSsisPackage(element); - case "Project": return SsisProject.DeserializeSsisProject(element); - } - } - return UnknownSsisObjectMetadata.DeserializeUnknownSsisObjectMetadata(element); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SsisObjectMetadata.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SsisObjectMetadata.cs deleted file mode 100644 index e7f76fd0..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SsisObjectMetadata.cs +++ /dev/null @@ -1,41 +0,0 @@ -// - -#nullable disable - -namespace AzureDataFactory.TestingFramework.Models -{ - /// - /// SSIS object metadata. - /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. - /// The available derived classes include , , and . - /// - public abstract partial class SsisObjectMetadata - { - /// Initializes a new instance of SsisObjectMetadata. - protected SsisObjectMetadata() - { - } - - /// Initializes a new instance of SsisObjectMetadata. - /// Type of metadata. - /// Metadata id. - /// Metadata name. - /// Metadata description. - internal SsisObjectMetadata(SsisObjectMetadataType metadataType, long? id, string name, string description) - { - MetadataType = metadataType; - Id = id; - Name = name; - Description = description; - } - - /// Type of metadata. - internal SsisObjectMetadataType MetadataType { get; set; } - /// Metadata id. - public long? Id { get; } - /// Metadata name. - public string Name { get; } - /// Metadata description. - public string Description { get; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SsisObjectMetadataListResult.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SsisObjectMetadataListResult.Serialization.cs deleted file mode 100644 index cdbf1eb7..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SsisObjectMetadataListResult.Serialization.cs +++ /dev/null @@ -1,45 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; - -namespace AzureDataFactory.TestingFramework.Models -{ - internal partial class SsisObjectMetadataListResult - { - internal static SsisObjectMetadataListResult DeserializeSsisObjectMetadataListResult(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - Optional> value = default; - Optional nextLink = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("value"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - array.Add(SsisObjectMetadata.DeserializeSsisObjectMetadata(item)); - } - value = array; - continue; - } - if (property.NameEquals("nextLink"u8)) - { - nextLink = property.Value.GetString(); - continue; - } - } - return new SsisObjectMetadataListResult(Optional.ToList(value), nextLink.Value); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SsisObjectMetadataListResult.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SsisObjectMetadataListResult.cs deleted file mode 100644 index a7ec50e9..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SsisObjectMetadataListResult.cs +++ /dev/null @@ -1,40 +0,0 @@ -// - -#nullable disable - -using Azure.Core; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// A list of SSIS object metadata. - internal partial class SsisObjectMetadataListResult - { - /// Initializes a new instance of SsisObjectMetadataListResult. - internal SsisObjectMetadataListResult() - { - Value = new ChangeTrackingList(); - } - - /// Initializes a new instance of SsisObjectMetadataListResult. - /// - /// List of SSIS object metadata. - /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. - /// The available derived classes include , , and . - /// - /// The link to the next page of results, if any remaining results exist. - internal SsisObjectMetadataListResult(IReadOnlyList value, string nextLink) - { - Value = value; - NextLink = nextLink; - } - - /// - /// List of SSIS object metadata. - /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. - /// The available derived classes include , , and . - /// - public IReadOnlyList Value { get; } - /// The link to the next page of results, if any remaining results exist. - public string NextLink { get; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SsisObjectMetadataStatusResult.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SsisObjectMetadataStatusResult.Serialization.cs deleted file mode 100644 index 7c836789..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SsisObjectMetadataStatusResult.Serialization.cs +++ /dev/null @@ -1,48 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class SsisObjectMetadataStatusResult - { - internal static SsisObjectMetadataStatusResult DeserializeSsisObjectMetadataStatusResult(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - Optional status = default; - Optional name = default; - Optional properties = default; - Optional error = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("status"u8)) - { - status = property.Value.GetString(); - continue; - } - if (property.NameEquals("name"u8)) - { - name = property.Value.GetString(); - continue; - } - if (property.NameEquals("properties"u8)) - { - properties = property.Value.GetString(); - continue; - } - if (property.NameEquals("error"u8)) - { - error = property.Value.GetString(); - continue; - } - } - return new SsisObjectMetadataStatusResult(status.Value, name.Value, properties.Value, error.Value); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SsisObjectMetadataStatusResult.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SsisObjectMetadataStatusResult.cs deleted file mode 100644 index a0740781..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SsisObjectMetadataStatusResult.cs +++ /dev/null @@ -1,37 +0,0 @@ -// - -#nullable disable - -namespace AzureDataFactory.TestingFramework.Models -{ - /// The status of the operation. - public partial class SsisObjectMetadataStatusResult - { - /// Initializes a new instance of SsisObjectMetadataStatusResult. - internal SsisObjectMetadataStatusResult() - { - } - - /// Initializes a new instance of SsisObjectMetadataStatusResult. - /// The status of the operation. - /// The operation name. - /// The operation properties. - /// The operation error message. - internal SsisObjectMetadataStatusResult(string status, string name, string properties, string error) - { - Status = status; - Name = name; - Properties = properties; - Error = error; - } - - /// The status of the operation. - public string Status { get; } - /// The operation name. - public string Name { get; } - /// The operation properties. - public string Properties { get; } - /// The operation error message. - public string Error { get; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SsisObjectMetadataType.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SsisObjectMetadataType.cs deleted file mode 100644 index fca5d3db..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SsisObjectMetadataType.cs +++ /dev/null @@ -1,53 +0,0 @@ -// - -#nullable disable - -using System.ComponentModel; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// The type of SSIS object metadata. - internal readonly partial struct SsisObjectMetadataType : IEquatable - { - private readonly string _value; - - /// Initializes a new instance of . - /// is null. - public SsisObjectMetadataType(string value) - { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } - - private const string FolderValue = "Folder"; - private const string ProjectValue = "Project"; - private const string PackageValue = "Package"; - private const string EnvironmentValue = "Environment"; - - /// Folder. - public static SsisObjectMetadataType Folder { get; } = new SsisObjectMetadataType(FolderValue); - /// Project. - public static SsisObjectMetadataType Project { get; } = new SsisObjectMetadataType(ProjectValue); - /// Package. - public static SsisObjectMetadataType Package { get; } = new SsisObjectMetadataType(PackageValue); - /// Environment. - public static SsisObjectMetadataType Environment { get; } = new SsisObjectMetadataType(EnvironmentValue); - /// Determines if two values are the same. - public static bool operator ==(SsisObjectMetadataType left, SsisObjectMetadataType right) => left.Equals(right); - /// Determines if two values are not the same. - public static bool operator !=(SsisObjectMetadataType left, SsisObjectMetadataType right) => !left.Equals(right); - /// Converts a string to a . - public static implicit operator SsisObjectMetadataType(string value) => new SsisObjectMetadataType(value); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override bool Equals(object obj) => obj is SsisObjectMetadataType other && Equals(other); - /// - public bool Equals(SsisObjectMetadataType other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override int GetHashCode() => _value?.GetHashCode() ?? 0; - /// - public override string ToString() => _value; - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SsisPackage.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SsisPackage.Serialization.cs deleted file mode 100644 index 0c58501d..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SsisPackage.Serialization.cs +++ /dev/null @@ -1,97 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class SsisPackage - { - internal static SsisPackage DeserializeSsisPackage(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - Optional folderId = default; - Optional projectVersion = default; - Optional projectId = default; - Optional> parameters = default; - SsisObjectMetadataType type = default; - Optional id = default; - Optional name = default; - Optional description = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("folderId"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - folderId = property.Value.GetInt64(); - continue; - } - if (property.NameEquals("projectVersion"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - projectVersion = property.Value.GetInt64(); - continue; - } - if (property.NameEquals("projectId"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - projectId = property.Value.GetInt64(); - continue; - } - if (property.NameEquals("parameters"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - array.Add(SsisParameterInfo.DeserializeSsisParameterInfo(item)); - } - parameters = array; - continue; - } - if (property.NameEquals("type"u8)) - { - type = new SsisObjectMetadataType(property.Value.GetString()); - continue; - } - if (property.NameEquals("id"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - id = property.Value.GetInt64(); - continue; - } - if (property.NameEquals("name"u8)) - { - name = property.Value.GetString(); - continue; - } - if (property.NameEquals("description"u8)) - { - description = property.Value.GetString(); - continue; - } - } - return new SsisPackage(type, Optional.ToNullable(id), name.Value, description.Value, Optional.ToNullable(folderId), Optional.ToNullable(projectVersion), Optional.ToNullable(projectId), Optional.ToList(parameters)); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SsisPackage.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SsisPackage.cs deleted file mode 100644 index 3d9b73aa..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SsisPackage.cs +++ /dev/null @@ -1,46 +0,0 @@ -// - -#nullable disable - -using Azure.Core; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// Ssis Package. - public partial class SsisPackage : SsisObjectMetadata - { - /// Initializes a new instance of SsisPackage. - internal SsisPackage() - { - Parameters = new ChangeTrackingList(); - MetadataType = SsisObjectMetadataType.Package; - } - - /// Initializes a new instance of SsisPackage. - /// Type of metadata. - /// Metadata id. - /// Metadata name. - /// Metadata description. - /// Folder id which contains package. - /// Project version which contains package. - /// Project id which contains package. - /// Parameters in package. - internal SsisPackage(SsisObjectMetadataType metadataType, long? id, string name, string description, long? folderId, long? projectVersion, long? projectId, IReadOnlyList parameters) : base(metadataType, id, name, description) - { - FolderId = folderId; - ProjectVersion = projectVersion; - ProjectId = projectId; - Parameters = parameters; - MetadataType = metadataType; - } - - /// Folder id which contains package. - public long? FolderId { get; } - /// Project version which contains package. - public long? ProjectVersion { get; } - /// Project id which contains package. - public long? ProjectId { get; } - /// Parameters in package. - public IReadOnlyList Parameters { get; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SsisPackageLocation.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SsisPackageLocation.Serialization.cs deleted file mode 100644 index 322a5972..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SsisPackageLocation.Serialization.cs +++ /dev/null @@ -1,198 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class SsisPackageLocation : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - if (Optional.IsDefined(PackagePath)) - { - writer.WritePropertyName("packagePath"u8); - JsonSerializer.Serialize(writer, PackagePath); - } - if (Optional.IsDefined(LocationType)) - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(LocationType.Value.ToString()); - } - writer.WritePropertyName("typeProperties"u8); - writer.WriteStartObject(); - if (Optional.IsDefined(PackagePassword)) - { - writer.WritePropertyName("packagePassword"u8); - JsonSerializer.Serialize(writer, PackagePassword); - } - if (Optional.IsDefined(AccessCredential)) - { - writer.WritePropertyName("accessCredential"u8); - writer.WriteObjectValue(AccessCredential); - } - if (Optional.IsDefined(ConfigurationPath)) - { - writer.WritePropertyName("configurationPath"u8); - JsonSerializer.Serialize(writer, ConfigurationPath); - } - if (Optional.IsDefined(ConfigurationAccessCredential)) - { - writer.WritePropertyName("configurationAccessCredential"u8); - writer.WriteObjectValue(ConfigurationAccessCredential); - } - if (Optional.IsDefined(PackageName)) - { - writer.WritePropertyName("packageName"u8); - writer.WriteStringValue(PackageName); - } - if (Optional.IsDefined(PackageContent)) - { - writer.WritePropertyName("packageContent"u8); - JsonSerializer.Serialize(writer, PackageContent); - } - if (Optional.IsDefined(PackageLastModifiedDate)) - { - writer.WritePropertyName("packageLastModifiedDate"u8); - writer.WriteStringValue(PackageLastModifiedDate); - } - if (Optional.IsCollectionDefined(ChildPackages)) - { - writer.WritePropertyName("childPackages"u8); - writer.WriteStartArray(); - foreach (var item in ChildPackages) - { - writer.WriteObjectValue(item); - } - writer.WriteEndArray(); - } - writer.WriteEndObject(); - writer.WriteEndObject(); - } - - internal static SsisPackageLocation DeserializeSsisPackageLocation(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - Optional> packagePath = default; - Optional type = default; - Optional packagePassword = default; - Optional accessCredential = default; - Optional> configurationPath = default; - Optional configurationAccessCredential = default; - Optional packageName = default; - Optional> packageContent = default; - Optional packageLastModifiedDate = default; - Optional> childPackages = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("packagePath"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - packagePath = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("type"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - type = new SsisPackageLocationType(property.Value.GetString()); - continue; - } - if (property.NameEquals("typeProperties"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - foreach (var property0 in property.Value.EnumerateObject()) - { - if (property0.NameEquals("packagePassword"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - packagePassword = JsonSerializer.Deserialize(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("accessCredential"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - accessCredential = SsisAccessCredential.DeserializeSsisAccessCredential(property0.Value); - continue; - } - if (property0.NameEquals("configurationPath"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - configurationPath = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("configurationAccessCredential"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - configurationAccessCredential = SsisAccessCredential.DeserializeSsisAccessCredential(property0.Value); - continue; - } - if (property0.NameEquals("packageName"u8)) - { - packageName = property0.Value.GetString(); - continue; - } - if (property0.NameEquals("packageContent"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - packageContent = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("packageLastModifiedDate"u8)) - { - packageLastModifiedDate = property0.Value.GetString(); - continue; - } - if (property0.NameEquals("childPackages"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property0.Value.EnumerateArray()) - { - array.Add(SsisChildPackage.DeserializeSsisChildPackage(item)); - } - childPackages = array; - continue; - } - } - continue; - } - } - return new SsisPackageLocation(packagePath.Value, Optional.ToNullable(type), packagePassword, accessCredential.Value, configurationPath.Value, configurationAccessCredential.Value, packageName.Value, packageContent.Value, packageLastModifiedDate.Value, Optional.ToList(childPackages)); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SsisPackageLocation.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SsisPackageLocation.cs deleted file mode 100644 index 9584db81..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SsisPackageLocation.cs +++ /dev/null @@ -1,65 +0,0 @@ -// - -#nullable disable - -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// SSIS package location. - public partial class SsisPackageLocation - { - /// Initializes a new instance of SsisPackageLocation. - public SsisPackageLocation() - { - ChildPackages = new ChangeTrackingList(); - } - - /// Initializes a new instance of SsisPackageLocation. - /// The SSIS package path. Type: string (or Expression with resultType string). - /// The type of SSIS package location. - /// Password of the package. - /// The package access credential. - /// The configuration file of the package execution. Type: string (or Expression with resultType string). - /// The configuration file access credential. - /// The package name. - /// The embedded package content. Type: string (or Expression with resultType string). - /// The embedded package last modified date. - /// The embedded child package list. - internal SsisPackageLocation(DataFactoryElement packagePath, SsisPackageLocationType? locationType, DataFactorySecretBaseDefinition packagePassword, SsisAccessCredential accessCredential, DataFactoryElement configurationPath, SsisAccessCredential configurationAccessCredential, string packageName, DataFactoryElement packageContent, string packageLastModifiedDate, IList childPackages) - { - PackagePath = packagePath; - LocationType = locationType; - PackagePassword = packagePassword; - AccessCredential = accessCredential; - ConfigurationPath = configurationPath; - ConfigurationAccessCredential = configurationAccessCredential; - PackageName = packageName; - PackageContent = packageContent; - PackageLastModifiedDate = packageLastModifiedDate; - ChildPackages = childPackages; - } - - /// The SSIS package path. Type: string (or Expression with resultType string). - public DataFactoryElement PackagePath { get; set; } - /// The type of SSIS package location. - public SsisPackageLocationType? LocationType { get; set; } - /// Password of the package. - public DataFactorySecretBaseDefinition PackagePassword { get; set; } - /// The package access credential. - public SsisAccessCredential AccessCredential { get; set; } - /// The configuration file of the package execution. Type: string (or Expression with resultType string). - public DataFactoryElement ConfigurationPath { get; set; } - /// The configuration file access credential. - public SsisAccessCredential ConfigurationAccessCredential { get; set; } - /// The package name. - public string PackageName { get; set; } - /// The embedded package content. Type: string (or Expression with resultType string). - public DataFactoryElement PackageContent { get; set; } - /// The embedded package last modified date. - public string PackageLastModifiedDate { get; set; } - /// The embedded child package list. - public IList ChildPackages { get; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SsisPackageLocationType.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SsisPackageLocationType.cs deleted file mode 100644 index 139fa78f..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SsisPackageLocationType.cs +++ /dev/null @@ -1,53 +0,0 @@ -// - -#nullable disable - -using System.ComponentModel; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// The type of SSIS package location. - public readonly partial struct SsisPackageLocationType : IEquatable - { - private readonly string _value; - - /// Initializes a new instance of . - /// is null. - public SsisPackageLocationType(string value) - { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } - - private const string SsisDBValue = "SSISDB"; - private const string FileValue = "File"; - private const string InlinePackageValue = "InlinePackage"; - private const string PackageStoreValue = "PackageStore"; - - /// SSISDB. - public static SsisPackageLocationType SsisDB { get; } = new SsisPackageLocationType(SsisDBValue); - /// File. - public static SsisPackageLocationType File { get; } = new SsisPackageLocationType(FileValue); - /// InlinePackage. - public static SsisPackageLocationType InlinePackage { get; } = new SsisPackageLocationType(InlinePackageValue); - /// PackageStore. - public static SsisPackageLocationType PackageStore { get; } = new SsisPackageLocationType(PackageStoreValue); - /// Determines if two values are the same. - public static bool operator ==(SsisPackageLocationType left, SsisPackageLocationType right) => left.Equals(right); - /// Determines if two values are not the same. - public static bool operator !=(SsisPackageLocationType left, SsisPackageLocationType right) => !left.Equals(right); - /// Converts a string to a . - public static implicit operator SsisPackageLocationType(string value) => new SsisPackageLocationType(value); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override bool Equals(object obj) => obj is SsisPackageLocationType other && Equals(other); - /// - public bool Equals(SsisPackageLocationType other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override int GetHashCode() => _value?.GetHashCode() ?? 0; - /// - public override string ToString() => _value; - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SsisParameterInfo.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SsisParameterInfo.Serialization.cs deleted file mode 100644 index 29ebd3c5..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SsisParameterInfo.Serialization.cs +++ /dev/null @@ -1,112 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class SsisParameterInfo - { - internal static SsisParameterInfo DeserializeSsisParameterInfo(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - Optional id = default; - Optional name = default; - Optional description = default; - Optional dataType = default; - Optional required = default; - Optional sensitive = default; - Optional designDefaultValue = default; - Optional defaultValue = default; - Optional sensitiveDefaultValue = default; - Optional valueType = default; - Optional valueSet = default; - Optional variable = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("id"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - id = property.Value.GetInt64(); - continue; - } - if (property.NameEquals("name"u8)) - { - name = property.Value.GetString(); - continue; - } - if (property.NameEquals("description"u8)) - { - description = property.Value.GetString(); - continue; - } - if (property.NameEquals("dataType"u8)) - { - dataType = property.Value.GetString(); - continue; - } - if (property.NameEquals("required"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - required = property.Value.GetBoolean(); - continue; - } - if (property.NameEquals("sensitive"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - sensitive = property.Value.GetBoolean(); - continue; - } - if (property.NameEquals("designDefaultValue"u8)) - { - designDefaultValue = property.Value.GetString(); - continue; - } - if (property.NameEquals("defaultValue"u8)) - { - defaultValue = property.Value.GetString(); - continue; - } - if (property.NameEquals("sensitiveDefaultValue"u8)) - { - sensitiveDefaultValue = property.Value.GetString(); - continue; - } - if (property.NameEquals("valueType"u8)) - { - valueType = property.Value.GetString(); - continue; - } - if (property.NameEquals("valueSet"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - valueSet = property.Value.GetBoolean(); - continue; - } - if (property.NameEquals("variable"u8)) - { - variable = property.Value.GetString(); - continue; - } - } - return new SsisParameterInfo(Optional.ToNullable(id), name.Value, description.Value, dataType.Value, Optional.ToNullable(required), Optional.ToNullable(sensitive), designDefaultValue.Value, defaultValue.Value, sensitiveDefaultValue.Value, valueType.Value, Optional.ToNullable(valueSet), variable.Value); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SsisParameterInfo.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SsisParameterInfo.cs deleted file mode 100644 index 5e1f8974..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SsisParameterInfo.cs +++ /dev/null @@ -1,69 +0,0 @@ -// - -#nullable disable - -namespace AzureDataFactory.TestingFramework.Models -{ - /// Ssis parameter. - public partial class SsisParameterInfo - { - /// Initializes a new instance of SsisParameterInfo. - internal SsisParameterInfo() - { - } - - /// Initializes a new instance of SsisParameterInfo. - /// Parameter id. - /// Parameter name. - /// Parameter description. - /// Parameter type. - /// Whether parameter is required. - /// Whether parameter is sensitive. - /// Design default value of parameter. - /// Default value of parameter. - /// Default sensitive value of parameter. - /// Parameter value type. - /// Parameter value set. - /// Parameter reference variable. - internal SsisParameterInfo(long? id, string name, string description, string dataType, bool? isRequired, bool? isSensitive, string designDefaultValue, string defaultValue, string sensitiveDefaultValue, string valueType, bool? hasValueSet, string variable) - { - Id = id; - Name = name; - Description = description; - DataType = dataType; - IsRequired = isRequired; - IsSensitive = isSensitive; - DesignDefaultValue = designDefaultValue; - DefaultValue = defaultValue; - SensitiveDefaultValue = sensitiveDefaultValue; - ValueType = valueType; - HasValueSet = hasValueSet; - Variable = variable; - } - - /// Parameter id. - public long? Id { get; } - /// Parameter name. - public string Name { get; } - /// Parameter description. - public string Description { get; } - /// Parameter type. - public string DataType { get; } - /// Whether parameter is required. - public bool? IsRequired { get; } - /// Whether parameter is sensitive. - public bool? IsSensitive { get; } - /// Design default value of parameter. - public string DesignDefaultValue { get; } - /// Default value of parameter. - public string DefaultValue { get; } - /// Default sensitive value of parameter. - public string SensitiveDefaultValue { get; } - /// Parameter value type. - public string ValueType { get; } - /// Parameter value set. - public bool? HasValueSet { get; } - /// Parameter reference variable. - public string Variable { get; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SsisProject.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SsisProject.Serialization.cs deleted file mode 100644 index 6bc3d179..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SsisProject.Serialization.cs +++ /dev/null @@ -1,102 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class SsisProject - { - internal static SsisProject DeserializeSsisProject(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - Optional folderId = default; - Optional version = default; - Optional> environmentRefs = default; - Optional> parameters = default; - SsisObjectMetadataType type = default; - Optional id = default; - Optional name = default; - Optional description = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("folderId"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - folderId = property.Value.GetInt64(); - continue; - } - if (property.NameEquals("version"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - version = property.Value.GetInt64(); - continue; - } - if (property.NameEquals("environmentRefs"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - array.Add(SsisEnvironmentReference.DeserializeSsisEnvironmentReference(item)); - } - environmentRefs = array; - continue; - } - if (property.NameEquals("parameters"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - array.Add(SsisParameterInfo.DeserializeSsisParameterInfo(item)); - } - parameters = array; - continue; - } - if (property.NameEquals("type"u8)) - { - type = new SsisObjectMetadataType(property.Value.GetString()); - continue; - } - if (property.NameEquals("id"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - id = property.Value.GetInt64(); - continue; - } - if (property.NameEquals("name"u8)) - { - name = property.Value.GetString(); - continue; - } - if (property.NameEquals("description"u8)) - { - description = property.Value.GetString(); - continue; - } - } - return new SsisProject(type, Optional.ToNullable(id), name.Value, description.Value, Optional.ToNullable(folderId), Optional.ToNullable(version), Optional.ToList(environmentRefs), Optional.ToList(parameters)); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SsisProject.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SsisProject.cs deleted file mode 100644 index d6b29bc3..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SsisProject.cs +++ /dev/null @@ -1,47 +0,0 @@ -// - -#nullable disable - -using Azure.Core; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// Ssis project. - public partial class SsisProject : SsisObjectMetadata - { - /// Initializes a new instance of SsisProject. - internal SsisProject() - { - EnvironmentRefs = new ChangeTrackingList(); - Parameters = new ChangeTrackingList(); - MetadataType = SsisObjectMetadataType.Project; - } - - /// Initializes a new instance of SsisProject. - /// Type of metadata. - /// Metadata id. - /// Metadata name. - /// Metadata description. - /// Folder id which contains project. - /// Project version. - /// Environment reference in project. - /// Parameters in project. - internal SsisProject(SsisObjectMetadataType metadataType, long? id, string name, string description, long? folderId, long? version, IReadOnlyList environmentRefs, IReadOnlyList parameters) : base(metadataType, id, name, description) - { - FolderId = folderId; - Version = version; - EnvironmentRefs = environmentRefs; - Parameters = parameters; - MetadataType = metadataType; - } - - /// Folder id which contains project. - public long? FolderId { get; } - /// Project version. - public long? Version { get; } - /// Environment reference in project. - public IReadOnlyList EnvironmentRefs { get; } - /// Parameters in project. - public IReadOnlyList Parameters { get; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SsisPropertyOverride.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SsisPropertyOverride.Serialization.cs deleted file mode 100644 index 89c376c6..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SsisPropertyOverride.Serialization.cs +++ /dev/null @@ -1,54 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class SsisPropertyOverride : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - writer.WritePropertyName("value"u8); - JsonSerializer.Serialize(writer, Value); - if (Optional.IsDefined(IsSensitive)) - { - writer.WritePropertyName("isSensitive"u8); - writer.WriteBooleanValue(IsSensitive.Value); - } - writer.WriteEndObject(); - } - - internal static SsisPropertyOverride DeserializeSsisPropertyOverride(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - DataFactoryElement value = default; - Optional isSensitive = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("value"u8)) - { - value = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("isSensitive"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - isSensitive = property.Value.GetBoolean(); - continue; - } - } - return new SsisPropertyOverride(value, Optional.ToNullable(isSensitive)); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SsisPropertyOverride.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SsisPropertyOverride.cs deleted file mode 100644 index ed93cef7..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SsisPropertyOverride.cs +++ /dev/null @@ -1,37 +0,0 @@ -// - -#nullable disable - -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// SSIS property override. - public partial class SsisPropertyOverride - { - /// Initializes a new instance of SsisPropertyOverride. - /// SSIS package property override value. Type: string (or Expression with resultType string). - /// is null. - public SsisPropertyOverride(DataFactoryElement value) - { - Argument.AssertNotNull(value, nameof(value)); - - Value = value; - } - - /// Initializes a new instance of SsisPropertyOverride. - /// SSIS package property override value. Type: string (or Expression with resultType string). - /// Whether SSIS package property override value is sensitive data. Value will be encrypted in SSISDB if it is true. - internal SsisPropertyOverride(DataFactoryElement value, bool? isSensitive) - { - Value = value; - IsSensitive = isSensitive; - } - - /// SSIS package property override value. Type: string (or Expression with resultType string). - public DataFactoryElement Value { get; set; } - /// Whether SSIS package property override value is sensitive data. Value will be encrypted in SSISDB if it is true. - public bool? IsSensitive { get; set; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SsisVariable.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SsisVariable.Serialization.cs deleted file mode 100644 index 0f88ec7d..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SsisVariable.Serialization.cs +++ /dev/null @@ -1,74 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class SsisVariable - { - internal static SsisVariable DeserializeSsisVariable(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - Optional id = default; - Optional name = default; - Optional description = default; - Optional dataType = default; - Optional sensitive = default; - Optional value = default; - Optional sensitiveValue = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("id"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - id = property.Value.GetInt64(); - continue; - } - if (property.NameEquals("name"u8)) - { - name = property.Value.GetString(); - continue; - } - if (property.NameEquals("description"u8)) - { - description = property.Value.GetString(); - continue; - } - if (property.NameEquals("dataType"u8)) - { - dataType = property.Value.GetString(); - continue; - } - if (property.NameEquals("sensitive"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - sensitive = property.Value.GetBoolean(); - continue; - } - if (property.NameEquals("value"u8)) - { - value = property.Value.GetString(); - continue; - } - if (property.NameEquals("sensitiveValue"u8)) - { - sensitiveValue = property.Value.GetString(); - continue; - } - } - return new SsisVariable(Optional.ToNullable(id), name.Value, description.Value, dataType.Value, Optional.ToNullable(sensitive), value.Value, sensitiveValue.Value); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SsisVariable.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SsisVariable.cs deleted file mode 100644 index 24b1d633..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SsisVariable.cs +++ /dev/null @@ -1,49 +0,0 @@ -// - -#nullable disable - -namespace AzureDataFactory.TestingFramework.Models -{ - /// Ssis variable. - public partial class SsisVariable - { - /// Initializes a new instance of SsisVariable. - internal SsisVariable() - { - } - - /// Initializes a new instance of SsisVariable. - /// Variable id. - /// Variable name. - /// Variable description. - /// Variable type. - /// Whether variable is sensitive. - /// Variable value. - /// Variable sensitive value. - internal SsisVariable(long? id, string name, string description, string dataType, bool? isSensitive, string value, string sensitiveValue) - { - Id = id; - Name = name; - Description = description; - DataType = dataType; - IsSensitive = isSensitive; - Value = value; - SensitiveValue = sensitiveValue; - } - - /// Variable id. - public long? Id { get; } - /// Variable name. - public string Name { get; } - /// Variable description. - public string Description { get; } - /// Variable type. - public string DataType { get; } - /// Whether variable is sensitive. - public bool? IsSensitive { get; } - /// Variable value. - public string Value { get; } - /// Variable sensitive value. - public string SensitiveValue { get; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/StagingSettings.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/StagingSettings.Serialization.cs deleted file mode 100644 index 16eb1819..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/StagingSettings.Serialization.cs +++ /dev/null @@ -1,81 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class StagingSettings : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - writer.WritePropertyName("linkedServiceName"u8); - JsonSerializer.Serialize(writer, LinkedServiceName); if (Optional.IsDefined(Path)) - { - writer.WritePropertyName("path"u8); - JsonSerializer.Serialize(writer, Path); - } - if (Optional.IsDefined(EnableCompression)) - { - writer.WritePropertyName("enableCompression"u8); - JsonSerializer.Serialize(writer, EnableCompression); - } - foreach (var item in AdditionalProperties) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.Value.ToString()).RootElement); -#endif - } - writer.WriteEndObject(); - } - - internal static StagingSettings DeserializeStagingSettings(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - DataFactoryLinkedServiceReference linkedServiceName = default; - Optional> path = default; - Optional> enableCompression = default; - IDictionary> additionalProperties = default; - Dictionary> additionalPropertiesDictionary = new Dictionary>(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("linkedServiceName"u8)) - { - linkedServiceName = JsonSerializer.Deserialize(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("path"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - path = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("enableCompression"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - enableCompression = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - additionalPropertiesDictionary.Add(property.Name, JsonSerializer.Deserialize>(property.Value.GetRawText())); - } - additionalProperties = additionalPropertiesDictionary; - return new StagingSettings(linkedServiceName, path.Value, enableCompression.Value, additionalProperties); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/StagingSettings.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/StagingSettings.cs deleted file mode 100644 index d9a3f085..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/StagingSettings.cs +++ /dev/null @@ -1,75 +0,0 @@ -// - -#nullable disable - -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// Staging settings. - public partial class StagingSettings - { - /// Initializes a new instance of StagingSettings. - /// Staging linked service reference. - /// is null. - public StagingSettings(DataFactoryLinkedServiceReference linkedServiceName) - { - Argument.AssertNotNull(linkedServiceName, nameof(linkedServiceName)); - - LinkedServiceName = linkedServiceName; - AdditionalProperties = new ChangeTrackingDictionary>(); - } - - /// Initializes a new instance of StagingSettings. - /// Staging linked service reference. - /// The path to storage for storing the interim data. Type: string (or Expression with resultType string). - /// Specifies whether to use compression when copying data via an interim staging. Default value is false. Type: boolean (or Expression with resultType boolean). - /// Additional Properties. - internal StagingSettings(DataFactoryLinkedServiceReference linkedServiceName, DataFactoryElement path, DataFactoryElement enableCompression, IDictionary> additionalProperties) - { - LinkedServiceName = linkedServiceName; - Path = path; - EnableCompression = enableCompression; - AdditionalProperties = additionalProperties; - } - - /// Staging linked service reference. - public DataFactoryLinkedServiceReference LinkedServiceName { get; set; } - /// The path to storage for storing the interim data. Type: string (or Expression with resultType string). - public DataFactoryElement Path { get; set; } - /// Specifies whether to use compression when copying data via an interim staging. Default value is false. Type: boolean (or Expression with resultType boolean). - public DataFactoryElement EnableCompression { get; set; } - /// - /// Additional Properties - /// - /// To assign an object to the value of this property use . - /// - /// - /// To assign an already formated json string to this property use . - /// - /// - /// Examples: - /// - /// - /// BinaryData.FromObjectAsJson("foo") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromString("\"foo\"") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromObjectAsJson(new { key = "value" }) - /// Creates a payload of { "key": "value" }. - /// - /// - /// BinaryData.FromString("{\"key\": \"value\"}") - /// Creates a payload of { "key": "value" }. - /// - /// - /// - /// - public IDictionary> AdditionalProperties { get; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/StoreReadSettings.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/StoreReadSettings.Serialization.cs deleted file mode 100644 index fdac97d9..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/StoreReadSettings.Serialization.cs +++ /dev/null @@ -1,67 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class StoreReadSettings : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - writer.WritePropertyName("type"u8); - writer.WriteStringValue(StoreReadSettingsType); - if (Optional.IsDefined(MaxConcurrentConnections)) - { - writer.WritePropertyName("maxConcurrentConnections"u8); - JsonSerializer.Serialize(writer, MaxConcurrentConnections); - } - if (Optional.IsDefined(DisableMetricsCollection)) - { - writer.WritePropertyName("disableMetricsCollection"u8); - JsonSerializer.Serialize(writer, DisableMetricsCollection); - } - foreach (var item in AdditionalProperties) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.Value.ToString()).RootElement); -#endif - } - writer.WriteEndObject(); - } - - internal static StoreReadSettings DeserializeStoreReadSettings(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - if (element.TryGetProperty("type", out JsonElement discriminator)) - { - switch (discriminator.GetString()) - { - case "AmazonS3CompatibleReadSettings": return AmazonS3CompatibleReadSettings.DeserializeAmazonS3CompatibleReadSettings(element); - case "AmazonS3ReadSettings": return AmazonS3ReadSettings.DeserializeAmazonS3ReadSettings(element); - case "AzureBlobFSReadSettings": return AzureBlobFSReadSettings.DeserializeAzureBlobFSReadSettings(element); - case "AzureBlobStorageReadSettings": return AzureBlobStorageReadSettings.DeserializeAzureBlobStorageReadSettings(element); - case "AzureDataLakeStoreReadSettings": return AzureDataLakeStoreReadSettings.DeserializeAzureDataLakeStoreReadSettings(element); - case "AzureFileStorageReadSettings": return AzureFileStorageReadSettings.DeserializeAzureFileStorageReadSettings(element); - case "FileServerReadSettings": return FileServerReadSettings.DeserializeFileServerReadSettings(element); - case "FtpReadSettings": return FtpReadSettings.DeserializeFtpReadSettings(element); - case "GoogleCloudStorageReadSettings": return GoogleCloudStorageReadSettings.DeserializeGoogleCloudStorageReadSettings(element); - case "HdfsReadSettings": return HdfsReadSettings.DeserializeHdfsReadSettings(element); - case "HttpReadSettings": return HttpReadSettings.DeserializeHttpReadSettings(element); - case "OracleCloudStorageReadSettings": return OracleCloudStorageReadSettings.DeserializeOracleCloudStorageReadSettings(element); - case "SftpReadSettings": return SftpReadSettings.DeserializeSftpReadSettings(element); - } - } - return UnknownStoreReadSettings.DeserializeUnknownStoreReadSettings(element); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/StoreReadSettings.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/StoreReadSettings.cs deleted file mode 100644 index d8585eb4..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/StoreReadSettings.cs +++ /dev/null @@ -1,74 +0,0 @@ -// - -#nullable disable - -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// - /// Connector read setting. - /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. - /// The available derived classes include , , , , , , , , , , , and . - /// - public partial class StoreReadSettings - { - /// Initializes a new instance of StoreReadSettings. - public StoreReadSettings() - { - AdditionalProperties = new ChangeTrackingDictionary>(); - } - - /// Initializes a new instance of StoreReadSettings. - /// The read setting type. - /// The maximum concurrent connection count for the source data store. Type: integer (or Expression with resultType integer). - /// If true, disable data store metrics collection. Default is false. Type: boolean (or Expression with resultType boolean). - /// Additional Properties. - internal StoreReadSettings(string storeReadSettingsType, DataFactoryElement maxConcurrentConnections, DataFactoryElement disableMetricsCollection, IDictionary> additionalProperties) - { - StoreReadSettingsType = storeReadSettingsType; - MaxConcurrentConnections = maxConcurrentConnections; - DisableMetricsCollection = disableMetricsCollection; - AdditionalProperties = additionalProperties; - } - - /// The read setting type. - internal string StoreReadSettingsType { get; set; } - /// The maximum concurrent connection count for the source data store. Type: integer (or Expression with resultType integer). - public DataFactoryElement MaxConcurrentConnections { get; set; } - /// If true, disable data store metrics collection. Default is false. Type: boolean (or Expression with resultType boolean). - public DataFactoryElement DisableMetricsCollection { get; set; } - /// - /// Additional Properties - /// - /// To assign an object to the value of this property use . - /// - /// - /// To assign an already formated json string to this property use . - /// - /// - /// Examples: - /// - /// - /// BinaryData.FromObjectAsJson("foo") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromString("\"foo\"") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromObjectAsJson(new { key = "value" }) - /// Creates a payload of { "key": "value" }. - /// - /// - /// BinaryData.FromString("{\"key\": \"value\"}") - /// Creates a payload of { "key": "value" }. - /// - /// - /// - /// - public IDictionary> AdditionalProperties { get; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/StoreWriteSettings.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/StoreWriteSettings.Serialization.cs deleted file mode 100644 index d3ed8993..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/StoreWriteSettings.Serialization.cs +++ /dev/null @@ -1,69 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class StoreWriteSettings : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - writer.WritePropertyName("type"u8); - writer.WriteStringValue(StoreWriteSettingsType); - if (Optional.IsDefined(MaxConcurrentConnections)) - { - writer.WritePropertyName("maxConcurrentConnections"u8); - JsonSerializer.Serialize(writer, MaxConcurrentConnections); - } - if (Optional.IsDefined(DisableMetricsCollection)) - { - writer.WritePropertyName("disableMetricsCollection"u8); - JsonSerializer.Serialize(writer, DisableMetricsCollection); - } - if (Optional.IsDefined(CopyBehavior)) - { - writer.WritePropertyName("copyBehavior"u8); -#if NET6_0_OR_GREATER - writer.WriteRawValue(CopyBehavior); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(CopyBehavior.ToString()).RootElement); -#endif - } - foreach (var item in AdditionalProperties) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.Value.ToString()).RootElement); -#endif - } - writer.WriteEndObject(); - } - - internal static StoreWriteSettings DeserializeStoreWriteSettings(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - if (element.TryGetProperty("type", out JsonElement discriminator)) - { - switch (discriminator.GetString()) - { - case "AzureBlobFSWriteSettings": return AzureBlobFSWriteSettings.DeserializeAzureBlobFSWriteSettings(element); - case "AzureBlobStorageWriteSettings": return AzureBlobStorageWriteSettings.DeserializeAzureBlobStorageWriteSettings(element); - case "AzureDataLakeStoreWriteSettings": return AzureDataLakeStoreWriteSettings.DeserializeAzureDataLakeStoreWriteSettings(element); - case "AzureFileStorageWriteSettings": return AzureFileStorageWriteSettings.DeserializeAzureFileStorageWriteSettings(element); - case "FileServerWriteSettings": return FileServerWriteSettings.DeserializeFileServerWriteSettings(element); - case "SftpWriteSettings": return SftpWriteSettings.DeserializeSftpWriteSettings(element); - } - } - return UnknownStoreWriteSettings.DeserializeUnknownStoreWriteSettings(element); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/StoreWriteSettings.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/StoreWriteSettings.cs deleted file mode 100644 index 54ecf7e2..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/StoreWriteSettings.cs +++ /dev/null @@ -1,107 +0,0 @@ -// - -#nullable disable - -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// - /// Connector write settings. - /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. - /// The available derived classes include , , , , and . - /// - public partial class StoreWriteSettings - { - /// Initializes a new instance of StoreWriteSettings. - public StoreWriteSettings() - { - AdditionalProperties = new ChangeTrackingDictionary>(); - } - - /// Initializes a new instance of StoreWriteSettings. - /// The write setting type. - /// The maximum concurrent connection count for the source data store. Type: integer (or Expression with resultType integer). - /// If true, disable data store metrics collection. Default is false. Type: boolean (or Expression with resultType boolean). - /// The type of copy behavior for copy sink. - /// Additional Properties. - internal StoreWriteSettings(string storeWriteSettingsType, DataFactoryElement maxConcurrentConnections, DataFactoryElement disableMetricsCollection, BinaryData copyBehavior, IDictionary> additionalProperties) - { - StoreWriteSettingsType = storeWriteSettingsType; - MaxConcurrentConnections = maxConcurrentConnections; - DisableMetricsCollection = disableMetricsCollection; - CopyBehavior = copyBehavior; - AdditionalProperties = additionalProperties; - } - - /// The write setting type. - internal string StoreWriteSettingsType { get; set; } - /// The maximum concurrent connection count for the source data store. Type: integer (or Expression with resultType integer). - public DataFactoryElement MaxConcurrentConnections { get; set; } - /// If true, disable data store metrics collection. Default is false. Type: boolean (or Expression with resultType boolean). - public DataFactoryElement DisableMetricsCollection { get; set; } - /// - /// The type of copy behavior for copy sink. - /// - /// To assign an object to this property use . - /// - /// - /// To assign an already formated json string to this property use . - /// - /// - /// Examples: - /// - /// - /// BinaryData.FromObjectAsJson("foo") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromString("\"foo\"") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromObjectAsJson(new { key = "value" }) - /// Creates a payload of { "key": "value" }. - /// - /// - /// BinaryData.FromString("{\"key\": \"value\"}") - /// Creates a payload of { "key": "value" }. - /// - /// - /// - /// - public BinaryData CopyBehavior { get; set; } - /// - /// Additional Properties - /// - /// To assign an object to the value of this property use . - /// - /// - /// To assign an already formated json string to this property use . - /// - /// - /// Examples: - /// - /// - /// BinaryData.FromObjectAsJson("foo") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromString("\"foo\"") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromObjectAsJson(new { key = "value" }) - /// Creates a payload of { "key": "value" }. - /// - /// - /// BinaryData.FromString("{\"key\": \"value\"}") - /// Creates a payload of { "key": "value" }. - /// - /// - /// - /// - public IDictionary> AdditionalProperties { get; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SwitchActivity.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SwitchActivity.Serialization.cs deleted file mode 100644 index b4fb2f76..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SwitchActivity.Serialization.cs +++ /dev/null @@ -1,224 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class SwitchActivity : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ActivityType); - if (Optional.IsDefined(Description)) - { - writer.WritePropertyName("description"u8); - writer.WriteStringValue(Description); - } - if (Optional.IsDefined(State)) - { - writer.WritePropertyName("state"u8); - writer.WriteStringValue(State.Value.ToString()); - } - if (Optional.IsDefined(OnInactiveMarkAs)) - { - writer.WritePropertyName("onInactiveMarkAs"u8); - writer.WriteStringValue(OnInactiveMarkAs.Value.ToString()); - } - if (Optional.IsCollectionDefined(DependsOn)) - { - writer.WritePropertyName("dependsOn"u8); - writer.WriteStartArray(); - foreach (var item in DependsOn) - { - writer.WriteObjectValue(item); - } - writer.WriteEndArray(); - } - if (Optional.IsCollectionDefined(UserProperties)) - { - writer.WritePropertyName("userProperties"u8); - writer.WriteStartArray(); - foreach (var item in UserProperties) - { - writer.WriteObjectValue(item); - } - writer.WriteEndArray(); - } - writer.WritePropertyName("typeProperties"u8); - writer.WriteStartObject(); - writer.WritePropertyName("on"u8); - writer.WriteObjectValue(On); - if (Optional.IsCollectionDefined(Cases)) - { - writer.WritePropertyName("cases"u8); - writer.WriteStartArray(); - foreach (var item in Cases) - { - writer.WriteObjectValue(item); - } - writer.WriteEndArray(); - } - if (Optional.IsCollectionDefined(DefaultActivities)) - { - writer.WritePropertyName("defaultActivities"u8); - writer.WriteStartArray(); - foreach (var item in DefaultActivities) - { - writer.WriteObjectValue(item); - } - writer.WriteEndArray(); - } - writer.WriteEndObject(); - foreach (var item in AdditionalProperties) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.Value.ToString()).RootElement); -#endif - } - writer.WriteEndObject(); - } - - internal static SwitchActivity DeserializeSwitchActivity(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - string name = default; - string type = default; - Optional description = default; - Optional state = default; - Optional onInactiveMarkAs = default; - Optional> dependsOn = default; - Optional> userProperties = default; - DataFactoryExpression @on = default; - Optional> cases = default; - Optional> defaultActivities = default; - IDictionary> additionalProperties = default; - Dictionary> additionalPropertiesDictionary = new Dictionary>(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("name"u8)) - { - name = property.Value.GetString(); - continue; - } - if (property.NameEquals("type"u8)) - { - type = property.Value.GetString(); - continue; - } - if (property.NameEquals("description"u8)) - { - description = property.Value.GetString(); - continue; - } - if (property.NameEquals("state"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - state = new PipelineActivityState(property.Value.GetString()); - continue; - } - if (property.NameEquals("onInactiveMarkAs"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - onInactiveMarkAs = new ActivityOnInactiveMarkAs(property.Value.GetString()); - continue; - } - if (property.NameEquals("dependsOn"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - array.Add(PipelineActivityDependency.DeserializePipelineActivityDependency(item)); - } - dependsOn = array; - continue; - } - if (property.NameEquals("userProperties"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - array.Add(PipelineActivityUserProperty.DeserializePipelineActivityUserProperty(item)); - } - userProperties = array; - continue; - } - if (property.NameEquals("typeProperties"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - foreach (var property0 in property.Value.EnumerateObject()) - { - if (property0.NameEquals("on"u8)) - { - @on = DataFactoryExpression.DeserializeDataFactoryExpression(property0.Value); - continue; - } - if (property0.NameEquals("cases"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property0.Value.EnumerateArray()) - { - array.Add(SwitchCaseActivity.DeserializeSwitchCaseActivity(item)); - } - cases = array; - continue; - } - if (property0.NameEquals("defaultActivities"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property0.Value.EnumerateArray()) - { - array.Add(DeserializePipelineActivity(item)); - } - defaultActivities = array; - continue; - } - } - continue; - } - additionalPropertiesDictionary.Add(property.Name, JsonSerializer.Deserialize>(property.Value.GetRawText())); - } - additionalProperties = additionalPropertiesDictionary; - return new SwitchActivity(name, type, description.Value, Optional.ToNullable(state), Optional.ToNullable(onInactiveMarkAs), Optional.ToList(dependsOn), Optional.ToList(userProperties), additionalProperties, @on, Optional.ToList(cases), Optional.ToList(defaultActivities)); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SwitchActivity.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SwitchActivity.cs deleted file mode 100644 index 1ff5dd47..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SwitchActivity.cs +++ /dev/null @@ -1,63 +0,0 @@ -// - -#nullable disable - -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// This activity evaluates an expression and executes activities under the cases property that correspond to the expression evaluation expected in the equals property. - public partial class SwitchActivity : ControlActivity - { - /// Initializes a new instance of SwitchActivity. - /// Activity name. - /// An expression that would evaluate to a string or integer. This is used to determine the block of activities in cases that will be executed. - /// or is null. - public SwitchActivity(string name, DataFactoryExpression @on) : base(name) - { - Argument.AssertNotNull(name, nameof(name)); - Argument.AssertNotNull(@on, nameof(@on)); - - On = @on; - Cases = new ChangeTrackingList(); - DefaultActivities = new ChangeTrackingList(); - ActivityType = "Switch"; - } - - /// Initializes a new instance of SwitchActivity. - /// Activity name. - /// Type of activity. - /// Activity description. - /// Activity state. This is an optional property and if not provided, the state will be Active by default. - /// 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. - /// Activity depends on condition. - /// Activity user properties. - /// Additional Properties. - /// An expression that would evaluate to a string or integer. This is used to determine the block of activities in cases that will be executed. - /// List of cases that correspond to expected values of the 'on' property. This is an optional property and if not provided, the activity will execute activities provided in defaultActivities. - /// - /// List of activities to execute if no case condition is satisfied. This is an optional property and if not provided, the activity will exit without any action. - /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. - /// The available derived classes include , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , and . - /// - internal SwitchActivity(string name, string activityType, string description, PipelineActivityState? state, ActivityOnInactiveMarkAs? onInactiveMarkAs, IList dependsOn, IList userProperties, IDictionary> additionalProperties, DataFactoryExpression @on, IList cases, IList defaultActivities) : base(name, activityType, description, state, onInactiveMarkAs, dependsOn, userProperties, additionalProperties) - { - On = @on; - Cases = cases; - DefaultActivities = defaultActivities; - ActivityType = activityType ?? "Switch"; - } - - /// An expression that would evaluate to a string or integer. This is used to determine the block of activities in cases that will be executed. - public DataFactoryExpression On { get; set; } - /// List of cases that correspond to expected values of the 'on' property. This is an optional property and if not provided, the activity will execute activities provided in defaultActivities. - public IList Cases { get; } - /// - /// List of activities to execute if no case condition is satisfied. This is an optional property and if not provided, the activity will exit without any action. - /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. - /// The available derived classes include , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , and . - /// - public IList DefaultActivities { get; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SwitchCaseActivity.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SwitchCaseActivity.Serialization.cs deleted file mode 100644 index a0b420a3..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SwitchCaseActivity.Serialization.cs +++ /dev/null @@ -1,66 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class SwitchCaseActivity : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - if (Optional.IsDefined(Value)) - { - writer.WritePropertyName("value"u8); - writer.WriteStringValue(Value); - } - if (Optional.IsCollectionDefined(Activities)) - { - writer.WritePropertyName("activities"u8); - writer.WriteStartArray(); - foreach (var item in Activities) - { - writer.WriteObjectValue(item); - } - writer.WriteEndArray(); - } - writer.WriteEndObject(); - } - - internal static SwitchCaseActivity DeserializeSwitchCaseActivity(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - Optional value = default; - Optional> activities = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("value"u8)) - { - value = property.Value.GetString(); - continue; - } - if (property.NameEquals("activities"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - array.Add(PipelineActivity.DeserializePipelineActivity(item)); - } - activities = array; - continue; - } - } - return new SwitchCaseActivity(value.Value, Optional.ToList(activities)); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SwitchCaseActivity.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SwitchCaseActivity.cs deleted file mode 100644 index 1e689cfc..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SwitchCaseActivity.cs +++ /dev/null @@ -1,40 +0,0 @@ -// - -#nullable disable - -using Azure.Core; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// Switch cases with have a value and corresponding activities. - public partial class SwitchCaseActivity - { - /// Initializes a new instance of SwitchCaseActivity. - public SwitchCaseActivity() - { - Activities = new ChangeTrackingList(); - } - - /// Initializes a new instance of SwitchCaseActivity. - /// Expected value that satisfies the expression result of the 'on' property. - /// - /// List of activities to execute for satisfied case condition. - /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. - /// The available derived classes include , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , and . - /// - internal SwitchCaseActivity(string value, IList activities) - { - Value = value; - Activities = activities; - } - - /// Expected value that satisfies the expression result of the 'on' property. - public string Value { get; set; } - /// - /// List of activities to execute for satisfied case condition. - /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. - /// The available derived classes include , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , and . - /// - public IList Activities { get; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SybaseAuthenticationType.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SybaseAuthenticationType.cs deleted file mode 100644 index 85d969b1..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SybaseAuthenticationType.cs +++ /dev/null @@ -1,47 +0,0 @@ -// - -#nullable disable - -using System.ComponentModel; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// AuthenticationType to be used for connection. - public readonly partial struct SybaseAuthenticationType : IEquatable - { - private readonly string _value; - - /// Initializes a new instance of . - /// is null. - public SybaseAuthenticationType(string value) - { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } - - private const string BasicValue = "Basic"; - private const string WindowsValue = "Windows"; - - /// Basic. - public static SybaseAuthenticationType Basic { get; } = new SybaseAuthenticationType(BasicValue); - /// Windows. - public static SybaseAuthenticationType Windows { get; } = new SybaseAuthenticationType(WindowsValue); - /// Determines if two values are the same. - public static bool operator ==(SybaseAuthenticationType left, SybaseAuthenticationType right) => left.Equals(right); - /// Determines if two values are not the same. - public static bool operator !=(SybaseAuthenticationType left, SybaseAuthenticationType right) => !left.Equals(right); - /// Converts a string to a . - public static implicit operator SybaseAuthenticationType(string value) => new SybaseAuthenticationType(value); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override bool Equals(object obj) => obj is SybaseAuthenticationType other && Equals(other); - /// - public bool Equals(SybaseAuthenticationType other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override int GetHashCode() => _value?.GetHashCode() ?? 0; - /// - public override string ToString() => _value; - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SybaseLinkedService.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SybaseLinkedService.Serialization.cs deleted file mode 100644 index 242b3f80..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SybaseLinkedService.Serialization.cs +++ /dev/null @@ -1,247 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class SybaseLinkedService : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - writer.WritePropertyName("type"u8); - writer.WriteStringValue(LinkedServiceType); - if (Optional.IsDefined(ConnectVia)) - { - writer.WritePropertyName("connectVia"u8); - writer.WriteObjectValue(ConnectVia); - } - if (Optional.IsDefined(Description)) - { - writer.WritePropertyName("description"u8); - writer.WriteStringValue(Description); - } - if (Optional.IsCollectionDefined(Parameters)) - { - writer.WritePropertyName("parameters"u8); - writer.WriteStartObject(); - foreach (var item in Parameters) - { - writer.WritePropertyName(item.Key); - writer.WriteObjectValue(item.Value); - } - writer.WriteEndObject(); - } - if (Optional.IsCollectionDefined(Annotations)) - { - writer.WritePropertyName("annotations"u8); - writer.WriteStartArray(); - foreach (var item in Annotations) - { - if (item == null) - { - writer.WriteNullValue(); - continue; - } -#if NET6_0_OR_GREATER - writer.WriteRawValue(item); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.ToString()).RootElement); -#endif - } - writer.WriteEndArray(); - } - writer.WritePropertyName("typeProperties"u8); - writer.WriteStartObject(); - writer.WritePropertyName("server"u8); - JsonSerializer.Serialize(writer, Server); - writer.WritePropertyName("database"u8); - JsonSerializer.Serialize(writer, Database); - if (Optional.IsDefined(Schema)) - { - writer.WritePropertyName("schema"u8); - JsonSerializer.Serialize(writer, Schema); - } - if (Optional.IsDefined(AuthenticationType)) - { - writer.WritePropertyName("authenticationType"u8); - writer.WriteStringValue(AuthenticationType.Value.ToString()); - } - if (Optional.IsDefined(Username)) - { - writer.WritePropertyName("username"u8); - JsonSerializer.Serialize(writer, Username); - } - if (Optional.IsDefined(Password)) - { - writer.WritePropertyName("password"u8); - JsonSerializer.Serialize(writer, Password); - } - if (Optional.IsDefined(EncryptedCredential)) - { - writer.WritePropertyName("encryptedCredential"u8); - writer.WriteStringValue(EncryptedCredential); - } - writer.WriteEndObject(); - foreach (var item in AdditionalProperties) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.Value.ToString()).RootElement); -#endif - } - writer.WriteEndObject(); - } - - internal static SybaseLinkedService DeserializeSybaseLinkedService(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - string type = default; - Optional connectVia = default; - Optional description = default; - Optional> parameters = default; - Optional> annotations = default; - DataFactoryElement server = default; - DataFactoryElement database = default; - Optional> schema = default; - Optional authenticationType = default; - Optional> username = default; - Optional password = default; - Optional encryptedCredential = default; - IDictionary> additionalProperties = default; - Dictionary> additionalPropertiesDictionary = new Dictionary>(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("type"u8)) - { - type = property.Value.GetString(); - continue; - } - if (property.NameEquals("connectVia"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - connectVia = IntegrationRuntimeReference.DeserializeIntegrationRuntimeReference(property.Value); - continue; - } - if (property.NameEquals("description"u8)) - { - description = property.Value.GetString(); - continue; - } - if (property.NameEquals("parameters"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - Dictionary dictionary = new Dictionary(); - foreach (var property0 in property.Value.EnumerateObject()) - { - dictionary.Add(property0.Name, EntityParameterSpecification.DeserializeEntityParameterSpecification(property0.Value)); - } - parameters = dictionary; - continue; - } - if (property.NameEquals("annotations"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - if (item.ValueKind == JsonValueKind.Null) - { - array.Add(null); - } - else - { - array.Add(BinaryData.FromString(item.GetRawText())); - } - } - annotations = array; - continue; - } - if (property.NameEquals("typeProperties"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - foreach (var property0 in property.Value.EnumerateObject()) - { - if (property0.NameEquals("server"u8)) - { - server = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("database"u8)) - { - database = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("schema"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - schema = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("authenticationType"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - authenticationType = new SybaseAuthenticationType(property0.Value.GetString()); - continue; - } - if (property0.NameEquals("username"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - username = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("password"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - password = JsonSerializer.Deserialize(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("encryptedCredential"u8)) - { - encryptedCredential = property0.Value.GetString(); - continue; - } - } - continue; - } - additionalPropertiesDictionary.Add(property.Name, JsonSerializer.Deserialize>(property.Value.GetRawText())); - } - additionalProperties = additionalPropertiesDictionary; - return new SybaseLinkedService(type, connectVia.Value, description.Value, Optional.ToDictionary(parameters), Optional.ToList(annotations), additionalProperties, server, database, schema.Value, Optional.ToNullable(authenticationType), username.Value, password, encryptedCredential.Value); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SybaseLinkedService.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SybaseLinkedService.cs deleted file mode 100644 index ca83a85b..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SybaseLinkedService.cs +++ /dev/null @@ -1,68 +0,0 @@ -// - -#nullable disable - -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// Linked service for Sybase data source. - public partial class SybaseLinkedService : DataFactoryLinkedServiceProperties - { - /// Initializes a new instance of SybaseLinkedService. - /// Server name for connection. Type: string (or Expression with resultType string). - /// Database name for connection. Type: string (or Expression with resultType string). - /// or is null. - public SybaseLinkedService(DataFactoryElement server, DataFactoryElement database) - { - Argument.AssertNotNull(server, nameof(server)); - Argument.AssertNotNull(database, nameof(database)); - - Server = server; - Database = database; - LinkedServiceType = "Sybase"; - } - - /// Initializes a new instance of SybaseLinkedService. - /// Type of linked service. - /// The integration runtime reference. - /// Linked service description. - /// Parameters for linked service. - /// List of tags that can be used for describing the linked service. - /// Additional Properties. - /// Server name for connection. Type: string (or Expression with resultType string). - /// Database name for connection. Type: string (or Expression with resultType string). - /// Schema name for connection. Type: string (or Expression with resultType string). - /// AuthenticationType to be used for connection. - /// Username for authentication. Type: string (or Expression with resultType string). - /// Password for authentication. - /// The encrypted credential used for authentication. Credentials are encrypted using the integration runtime credential manager. Type: string. - internal SybaseLinkedService(string linkedServiceType, IntegrationRuntimeReference connectVia, string description, IDictionary parameters, IList annotations, IDictionary> additionalProperties, DataFactoryElement server, DataFactoryElement database, DataFactoryElement schema, SybaseAuthenticationType? authenticationType, DataFactoryElement username, DataFactorySecretBaseDefinition password, string encryptedCredential) : base(linkedServiceType, connectVia, description, parameters, annotations, additionalProperties) - { - Server = server; - Database = database; - Schema = schema; - AuthenticationType = authenticationType; - Username = username; - Password = password; - EncryptedCredential = encryptedCredential; - LinkedServiceType = linkedServiceType ?? "Sybase"; - } - - /// Server name for connection. Type: string (or Expression with resultType string). - public DataFactoryElement Server { get; set; } - /// Database name for connection. Type: string (or Expression with resultType string). - public DataFactoryElement Database { get; set; } - /// Schema name for connection. Type: string (or Expression with resultType string). - public DataFactoryElement Schema { get; set; } - /// AuthenticationType to be used for connection. - public SybaseAuthenticationType? AuthenticationType { get; set; } - /// Username for authentication. Type: string (or Expression with resultType string). - public DataFactoryElement Username { get; set; } - /// Password for authentication. - public DataFactorySecretBaseDefinition Password { get; set; } - /// The encrypted credential used for authentication. Credentials are encrypted using the integration runtime credential manager. Type: string. - public string EncryptedCredential { get; set; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SybaseSource.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SybaseSource.Serialization.cs deleted file mode 100644 index 11101c1a..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SybaseSource.Serialization.cs +++ /dev/null @@ -1,161 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class SybaseSource : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - if (Optional.IsDefined(Query)) - { - writer.WritePropertyName("query"u8); - JsonSerializer.Serialize(writer, Query); - } - if (Optional.IsDefined(QueryTimeout)) - { - writer.WritePropertyName("queryTimeout"u8); - JsonSerializer.Serialize(writer, QueryTimeout); - } - if (Optional.IsDefined(AdditionalColumns)) - { - writer.WritePropertyName("additionalColumns"u8); -#if NET6_0_OR_GREATER - writer.WriteRawValue(AdditionalColumns); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(AdditionalColumns.ToString()).RootElement); -#endif - } - writer.WritePropertyName("type"u8); - writer.WriteStringValue(CopySourceType); - if (Optional.IsDefined(SourceRetryCount)) - { - writer.WritePropertyName("sourceRetryCount"u8); - JsonSerializer.Serialize(writer, SourceRetryCount); - } - if (Optional.IsDefined(SourceRetryWait)) - { - writer.WritePropertyName("sourceRetryWait"u8); - JsonSerializer.Serialize(writer, SourceRetryWait); - } - if (Optional.IsDefined(MaxConcurrentConnections)) - { - writer.WritePropertyName("maxConcurrentConnections"u8); - JsonSerializer.Serialize(writer, MaxConcurrentConnections); - } - if (Optional.IsDefined(DisableMetricsCollection)) - { - writer.WritePropertyName("disableMetricsCollection"u8); - JsonSerializer.Serialize(writer, DisableMetricsCollection); - } - foreach (var item in AdditionalProperties) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.Value.ToString()).RootElement); -#endif - } - writer.WriteEndObject(); - } - - internal static SybaseSource DeserializeSybaseSource(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - Optional> query = default; - Optional> queryTimeout = default; - Optional additionalColumns = default; - string type = default; - Optional> sourceRetryCount = default; - Optional> sourceRetryWait = default; - Optional> maxConcurrentConnections = default; - Optional> disableMetricsCollection = default; - IDictionary> additionalProperties = default; - Dictionary> additionalPropertiesDictionary = new Dictionary>(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("query"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - query = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("queryTimeout"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - queryTimeout = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("additionalColumns"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - additionalColumns = BinaryData.FromString(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("type"u8)) - { - type = property.Value.GetString(); - continue; - } - if (property.NameEquals("sourceRetryCount"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - sourceRetryCount = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("sourceRetryWait"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - sourceRetryWait = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("maxConcurrentConnections"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - maxConcurrentConnections = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("disableMetricsCollection"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - disableMetricsCollection = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - additionalPropertiesDictionary.Add(property.Name, JsonSerializer.Deserialize>(property.Value.GetRawText())); - } - additionalProperties = additionalPropertiesDictionary; - return new SybaseSource(type, sourceRetryCount.Value, sourceRetryWait.Value, maxConcurrentConnections.Value, disableMetricsCollection.Value, additionalProperties, queryTimeout.Value, additionalColumns.Value, query.Value); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SybaseSource.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SybaseSource.cs deleted file mode 100644 index 36d3b452..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SybaseSource.cs +++ /dev/null @@ -1,37 +0,0 @@ -// - -#nullable disable - -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// A copy activity source for Sybase databases. - public partial class SybaseSource : TabularSource - { - /// Initializes a new instance of SybaseSource. - public SybaseSource() - { - CopySourceType = "SybaseSource"; - } - - /// Initializes a new instance of SybaseSource. - /// Copy source type. - /// Source retry count. Type: integer (or Expression with resultType integer). - /// Source retry wait. Type: string (or Expression with resultType string), pattern: ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). - /// The maximum concurrent connection count for the source data store. Type: integer (or Expression with resultType integer). - /// If true, disable data store metrics collection. Default is false. Type: boolean (or Expression with resultType boolean). - /// Additional Properties. - /// 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). - /// Database query. Type: string (or Expression with resultType string). - internal SybaseSource(string copySourceType, DataFactoryElement sourceRetryCount, DataFactoryElement sourceRetryWait, DataFactoryElement maxConcurrentConnections, DataFactoryElement disableMetricsCollection, IDictionary> additionalProperties, DataFactoryElement queryTimeout, BinaryData additionalColumns, DataFactoryElement query) : base(copySourceType, sourceRetryCount, sourceRetryWait, maxConcurrentConnections, disableMetricsCollection, additionalProperties, queryTimeout, additionalColumns) - { - Query = query; - CopySourceType = copySourceType ?? "SybaseSource"; - } - - /// Database query. Type: string (or Expression with resultType string). - public DataFactoryElement Query { get; set; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SybaseTableDataset.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SybaseTableDataset.Serialization.cs deleted file mode 100644 index 49d2cf33..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SybaseTableDataset.Serialization.cs +++ /dev/null @@ -1,212 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class SybaseTableDataset : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - writer.WritePropertyName("type"u8); - writer.WriteStringValue(DatasetType); - if (Optional.IsDefined(Description)) - { - writer.WritePropertyName("description"u8); - writer.WriteStringValue(Description); - } - if (Optional.IsDefined(Structure)) - { - writer.WritePropertyName("structure"u8); - JsonSerializer.Serialize(writer, Structure); - } - if (Optional.IsDefined(Schema)) - { - writer.WritePropertyName("schema"u8); - JsonSerializer.Serialize(writer, Schema); - } - writer.WritePropertyName("linkedServiceName"u8); - JsonSerializer.Serialize(writer, LinkedServiceName); if (Optional.IsCollectionDefined(Parameters)) - { - writer.WritePropertyName("parameters"u8); - writer.WriteStartObject(); - foreach (var item in Parameters) - { - writer.WritePropertyName(item.Key); - writer.WriteObjectValue(item.Value); - } - writer.WriteEndObject(); - } - if (Optional.IsCollectionDefined(Annotations)) - { - writer.WritePropertyName("annotations"u8); - writer.WriteStartArray(); - foreach (var item in Annotations) - { - if (item == null) - { - writer.WriteNullValue(); - continue; - } -#if NET6_0_OR_GREATER - writer.WriteRawValue(item); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.ToString()).RootElement); -#endif - } - writer.WriteEndArray(); - } - if (Optional.IsDefined(Folder)) - { - writer.WritePropertyName("folder"u8); - writer.WriteObjectValue(Folder); - } - writer.WritePropertyName("typeProperties"u8); - writer.WriteStartObject(); - if (Optional.IsDefined(TableName)) - { - writer.WritePropertyName("tableName"u8); - JsonSerializer.Serialize(writer, TableName); - } - writer.WriteEndObject(); - foreach (var item in AdditionalProperties) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.Value.ToString()).RootElement); -#endif - } - writer.WriteEndObject(); - } - - internal static SybaseTableDataset DeserializeSybaseTableDataset(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - string type = default; - Optional description = default; - Optional>> structure = default; - Optional>> schema = default; - DataFactoryLinkedServiceReference linkedServiceName = default; - Optional> parameters = default; - Optional> annotations = default; - Optional folder = default; - Optional> tableName = default; - IDictionary> additionalProperties = default; - Dictionary> additionalPropertiesDictionary = new Dictionary>(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("type"u8)) - { - type = property.Value.GetString(); - continue; - } - if (property.NameEquals("description"u8)) - { - description = property.Value.GetString(); - continue; - } - if (property.NameEquals("structure"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - structure = JsonSerializer.Deserialize>>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("schema"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - schema = JsonSerializer.Deserialize>>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("linkedServiceName"u8)) - { - linkedServiceName = JsonSerializer.Deserialize(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("parameters"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - Dictionary dictionary = new Dictionary(); - foreach (var property0 in property.Value.EnumerateObject()) - { - dictionary.Add(property0.Name, EntityParameterSpecification.DeserializeEntityParameterSpecification(property0.Value)); - } - parameters = dictionary; - continue; - } - if (property.NameEquals("annotations"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - if (item.ValueKind == JsonValueKind.Null) - { - array.Add(null); - } - else - { - array.Add(BinaryData.FromString(item.GetRawText())); - } - } - annotations = array; - continue; - } - if (property.NameEquals("folder"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - folder = DatasetFolder.DeserializeDatasetFolder(property.Value); - continue; - } - if (property.NameEquals("typeProperties"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - foreach (var property0 in property.Value.EnumerateObject()) - { - if (property0.NameEquals("tableName"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - tableName = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - } - continue; - } - additionalPropertiesDictionary.Add(property.Name, JsonSerializer.Deserialize>(property.Value.GetRawText())); - } - additionalProperties = additionalPropertiesDictionary; - return new SybaseTableDataset(type, description.Value, structure.Value, schema.Value, linkedServiceName, Optional.ToDictionary(parameters), Optional.ToList(annotations), folder.Value, additionalProperties, tableName.Value); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SybaseTableDataset.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SybaseTableDataset.cs deleted file mode 100644 index 07a3fdae..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SybaseTableDataset.cs +++ /dev/null @@ -1,43 +0,0 @@ -// - -#nullable disable - -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// The Sybase table dataset. - public partial class SybaseTableDataset : DataFactoryDatasetProperties - { - /// Initializes a new instance of SybaseTableDataset. - /// Linked service reference. - /// is null. - public SybaseTableDataset(DataFactoryLinkedServiceReference linkedServiceName) : base(linkedServiceName) - { - Argument.AssertNotNull(linkedServiceName, nameof(linkedServiceName)); - - DatasetType = "SybaseTable"; - } - - /// Initializes a new instance of SybaseTableDataset. - /// Type of dataset. - /// Dataset description. - /// Columns that define the structure of the dataset. Type: array (or Expression with resultType array), itemType: DatasetDataElement. - /// Columns that define the physical type schema of the dataset. Type: array (or Expression with resultType array), itemType: DatasetSchemaDataElement. - /// Linked service reference. - /// Parameters for dataset. - /// List of tags that can be used for describing the Dataset. - /// The folder that this Dataset is in. If not specified, Dataset will appear at the root level. - /// Additional Properties. - /// The Sybase table name. Type: string (or Expression with resultType string). - internal SybaseTableDataset(string datasetType, string description, DataFactoryElement> structure, DataFactoryElement> schema, DataFactoryLinkedServiceReference linkedServiceName, IDictionary parameters, IList annotations, DatasetFolder folder, IDictionary> additionalProperties, DataFactoryElement tableName) : base(datasetType, description, structure, schema, linkedServiceName, parameters, annotations, folder, additionalProperties) - { - TableName = tableName; - DatasetType = datasetType ?? "SybaseTable"; - } - - /// The Sybase table name. Type: string (or Expression with resultType string). - public DataFactoryElement TableName { get; set; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SynapseNotebookActivity.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SynapseNotebookActivity.Serialization.cs deleted file mode 100644 index 8477d054..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SynapseNotebookActivity.Serialization.cs +++ /dev/null @@ -1,381 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class SynapseNotebookActivity : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - if (Optional.IsDefined(LinkedServiceName)) - { - writer.WritePropertyName("linkedServiceName"u8); - JsonSerializer.Serialize(writer, LinkedServiceName); - } - if (Optional.IsDefined(Policy)) - { - writer.WritePropertyName("policy"u8); - writer.WriteObjectValue(Policy); - } - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ActivityType); - if (Optional.IsDefined(Description)) - { - writer.WritePropertyName("description"u8); - writer.WriteStringValue(Description); - } - if (Optional.IsDefined(State)) - { - writer.WritePropertyName("state"u8); - writer.WriteStringValue(State.Value.ToString()); - } - if (Optional.IsDefined(OnInactiveMarkAs)) - { - writer.WritePropertyName("onInactiveMarkAs"u8); - writer.WriteStringValue(OnInactiveMarkAs.Value.ToString()); - } - if (Optional.IsCollectionDefined(DependsOn)) - { - writer.WritePropertyName("dependsOn"u8); - writer.WriteStartArray(); - foreach (var item in DependsOn) - { - writer.WriteObjectValue(item); - } - writer.WriteEndArray(); - } - if (Optional.IsCollectionDefined(UserProperties)) - { - writer.WritePropertyName("userProperties"u8); - writer.WriteStartArray(); - foreach (var item in UserProperties) - { - writer.WriteObjectValue(item); - } - writer.WriteEndArray(); - } - writer.WritePropertyName("typeProperties"u8); - writer.WriteStartObject(); - writer.WritePropertyName("notebook"u8); - writer.WriteObjectValue(Notebook); - if (Optional.IsDefined(SparkPool)) - { - writer.WritePropertyName("sparkPool"u8); - writer.WriteObjectValue(SparkPool); - } - if (Optional.IsCollectionDefined(Parameters)) - { - writer.WritePropertyName("parameters"u8); - writer.WriteStartObject(); - foreach (var item in Parameters) - { - writer.WritePropertyName(item.Key); - writer.WriteObjectValue(item.Value); - } - writer.WriteEndObject(); - } - if (Optional.IsDefined(ExecutorSize)) - { - writer.WritePropertyName("executorSize"u8); - JsonSerializer.Serialize(writer, ExecutorSize); - } - if (Optional.IsDefined(Conf)) - { - writer.WritePropertyName("conf"u8); -#if NET6_0_OR_GREATER - writer.WriteRawValue(Conf); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(Conf.ToString()).RootElement); -#endif - } - if (Optional.IsDefined(DriverSize)) - { - writer.WritePropertyName("driverSize"u8); - JsonSerializer.Serialize(writer, DriverSize); - } - if (Optional.IsDefined(NumExecutors)) - { - writer.WritePropertyName("numExecutors"u8); - JsonSerializer.Serialize(writer, NumExecutors); - } - if (Optional.IsDefined(ConfigurationType)) - { - writer.WritePropertyName("configurationType"u8); - writer.WriteStringValue(ConfigurationType.Value.ToString()); - } - if (Optional.IsDefined(TargetSparkConfiguration)) - { - writer.WritePropertyName("targetSparkConfiguration"u8); - writer.WriteObjectValue(TargetSparkConfiguration); - } - if (Optional.IsCollectionDefined(SparkConfig)) - { - writer.WritePropertyName("sparkConfig"u8); - writer.WriteStartObject(); - foreach (var item in SparkConfig) - { - writer.WritePropertyName(item.Key); - if (item.Value == null) - { - writer.WriteNullValue(); - continue; - } -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.Value.ToString()).RootElement); -#endif - } - writer.WriteEndObject(); - } - writer.WriteEndObject(); - foreach (var item in AdditionalProperties) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.Value.ToString()).RootElement); -#endif - } - writer.WriteEndObject(); - } - - internal static SynapseNotebookActivity DeserializeSynapseNotebookActivity(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - Optional linkedServiceName = default; - Optional policy = default; - string name = default; - string type = default; - Optional description = default; - Optional state = default; - Optional onInactiveMarkAs = default; - Optional> dependsOn = default; - Optional> userProperties = default; - SynapseNotebookReference notebook = default; - Optional sparkPool = default; - Optional> parameters = default; - Optional> executorSize = default; - Optional conf = default; - Optional> driverSize = default; - Optional> numExecutors = default; - Optional configurationType = default; - Optional targetSparkConfiguration = default; - Optional>> sparkConfig = default; - IDictionary> additionalProperties = default; - Dictionary> additionalPropertiesDictionary = new Dictionary>(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("linkedServiceName"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - linkedServiceName = JsonSerializer.Deserialize(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("policy"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - policy = PipelineActivityPolicy.DeserializePipelineActivityPolicy(property.Value); - continue; - } - if (property.NameEquals("name"u8)) - { - name = property.Value.GetString(); - continue; - } - if (property.NameEquals("type"u8)) - { - type = property.Value.GetString(); - continue; - } - if (property.NameEquals("description"u8)) - { - description = property.Value.GetString(); - continue; - } - if (property.NameEquals("state"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - state = new PipelineActivityState(property.Value.GetString()); - continue; - } - if (property.NameEquals("onInactiveMarkAs"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - onInactiveMarkAs = new ActivityOnInactiveMarkAs(property.Value.GetString()); - continue; - } - if (property.NameEquals("dependsOn"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - array.Add(PipelineActivityDependency.DeserializePipelineActivityDependency(item)); - } - dependsOn = array; - continue; - } - if (property.NameEquals("userProperties"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - array.Add(PipelineActivityUserProperty.DeserializePipelineActivityUserProperty(item)); - } - userProperties = array; - continue; - } - if (property.NameEquals("typeProperties"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - foreach (var property0 in property.Value.EnumerateObject()) - { - if (property0.NameEquals("notebook"u8)) - { - notebook = SynapseNotebookReference.DeserializeSynapseNotebookReference(property0.Value); - continue; - } - if (property0.NameEquals("sparkPool"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - sparkPool = BigDataPoolParametrizationReference.DeserializeBigDataPoolParametrizationReference(property0.Value); - continue; - } - if (property0.NameEquals("parameters"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - Dictionary dictionary = new Dictionary(); - foreach (var property1 in property0.Value.EnumerateObject()) - { - dictionary.Add(property1.Name, NotebookParameter.DeserializeNotebookParameter(property1.Value)); - } - parameters = dictionary; - continue; - } - if (property0.NameEquals("executorSize"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - executorSize = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("conf"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - conf = BinaryData.FromString(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("driverSize"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - driverSize = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("numExecutors"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - numExecutors = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("configurationType"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - configurationType = new DataFactorySparkConfigurationType(property0.Value.GetString()); - continue; - } - if (property0.NameEquals("targetSparkConfiguration"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - targetSparkConfiguration = SparkConfigurationParametrizationReference.DeserializeSparkConfigurationParametrizationReference(property0.Value); - continue; - } - if (property0.NameEquals("sparkConfig"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - Dictionary> dictionary = new Dictionary>(); - foreach (var property1 in property0.Value.EnumerateObject()) - { - if (property1.Value.ValueKind == JsonValueKind.Null) - { - dictionary.Add(property1.Name, null); - } - else - { - dictionary.Add(property1.Name, JsonSerializer.Deserialize>(property1.Value.GetRawText())); - } - } - sparkConfig = dictionary; - continue; - } - } - continue; - } - additionalPropertiesDictionary.Add(property.Name, JsonSerializer.Deserialize>(property.Value.GetRawText())); - } - additionalProperties = additionalPropertiesDictionary; - return new SynapseNotebookActivity(name, type, description.Value, Optional.ToNullable(state), Optional.ToNullable(onInactiveMarkAs), Optional.ToList(dependsOn), Optional.ToList(userProperties), additionalProperties, linkedServiceName, policy.Value, notebook, sparkPool.Value, Optional.ToDictionary(parameters), executorSize.Value, conf.Value, driverSize.Value, numExecutors.Value, Optional.ToNullable(configurationType), targetSparkConfiguration.Value, Optional.ToDictionary(sparkConfig)); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SynapseNotebookActivity.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SynapseNotebookActivity.cs deleted file mode 100644 index fb371c45..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SynapseNotebookActivity.cs +++ /dev/null @@ -1,143 +0,0 @@ -// - -#nullable disable - -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// Execute Synapse notebook activity. - public partial class SynapseNotebookActivity : ExecutionActivity - { - /// Initializes a new instance of SynapseNotebookActivity. - /// Activity name. - /// Synapse notebook reference. - /// or is null. - public SynapseNotebookActivity(string name, SynapseNotebookReference notebook) : base(name) - { - Argument.AssertNotNull(name, nameof(name)); - Argument.AssertNotNull(notebook, nameof(notebook)); - - Notebook = notebook; - Parameters = new ChangeTrackingDictionary(); - SparkConfig = new ChangeTrackingDictionary>(); - ActivityType = "SynapseNotebook"; - } - - /// Initializes a new instance of SynapseNotebookActivity. - /// Activity name. - /// Type of activity. - /// Activity description. - /// Activity state. This is an optional property and if not provided, the state will be Active by default. - /// 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. - /// Activity depends on condition. - /// Activity user properties. - /// Additional Properties. - /// Linked service reference. - /// Activity policy. - /// Synapse notebook reference. - /// The name of the big data pool which will be used to execute the notebook. - /// Notebook parameters. - /// Number of core and memory to be used for executors allocated in the specified Spark pool for the session, which will be used for overriding 'executorCores' and 'executorMemory' of the notebook you provide. Type: string (or Expression with resultType string). - /// Spark configuration properties, which will override the 'conf' of the notebook you provide. - /// Number of core and memory to be used for driver allocated in the specified Spark pool for the session, which will be used for overriding 'driverCores' and 'driverMemory' of the notebook you provide. Type: string (or Expression with resultType string). - /// Number of executors to launch for this session, which will override the 'numExecutors' of the notebook you provide. Type: integer (or Expression with resultType integer). - /// The type of the spark config. - /// The spark configuration of the spark job. - /// Spark configuration property. - internal SynapseNotebookActivity(string name, string activityType, string description, PipelineActivityState? state, ActivityOnInactiveMarkAs? onInactiveMarkAs, IList dependsOn, IList userProperties, IDictionary> additionalProperties, DataFactoryLinkedServiceReference linkedServiceName, PipelineActivityPolicy policy, SynapseNotebookReference notebook, BigDataPoolParametrizationReference sparkPool, IDictionary parameters, DataFactoryElement executorSize, BinaryData conf, DataFactoryElement driverSize, DataFactoryElement numExecutors, DataFactorySparkConfigurationType? configurationType, SparkConfigurationParametrizationReference targetSparkConfiguration, IDictionary> sparkConfig) : base(name, activityType, description, state, onInactiveMarkAs, dependsOn, userProperties, additionalProperties, linkedServiceName, policy) - { - Notebook = notebook; - SparkPool = sparkPool; - Parameters = parameters; - ExecutorSize = executorSize; - Conf = conf; - DriverSize = driverSize; - NumExecutors = numExecutors; - ConfigurationType = configurationType; - TargetSparkConfiguration = targetSparkConfiguration; - SparkConfig = sparkConfig; - ActivityType = activityType ?? "SynapseNotebook"; - } - - /// Synapse notebook reference. - public SynapseNotebookReference Notebook { get; set; } - /// The name of the big data pool which will be used to execute the notebook. - public BigDataPoolParametrizationReference SparkPool { get; set; } - /// Notebook parameters. - public IDictionary Parameters { get; } - /// Number of core and memory to be used for executors allocated in the specified Spark pool for the session, which will be used for overriding 'executorCores' and 'executorMemory' of the notebook you provide. Type: string (or Expression with resultType string). - public DataFactoryElement ExecutorSize { get; set; } - /// - /// Spark configuration properties, which will override the 'conf' of the notebook you provide. - /// - /// To assign an object to this property use . - /// - /// - /// To assign an already formated json string to this property use . - /// - /// - /// Examples: - /// - /// - /// BinaryData.FromObjectAsJson("foo") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromString("\"foo\"") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromObjectAsJson(new { key = "value" }) - /// Creates a payload of { "key": "value" }. - /// - /// - /// BinaryData.FromString("{\"key\": \"value\"}") - /// Creates a payload of { "key": "value" }. - /// - /// - /// - /// - public BinaryData Conf { get; set; } - /// Number of core and memory to be used for driver allocated in the specified Spark pool for the session, which will be used for overriding 'driverCores' and 'driverMemory' of the notebook you provide. Type: string (or Expression with resultType string). - public DataFactoryElement DriverSize { get; set; } - /// Number of executors to launch for this session, which will override the 'numExecutors' of the notebook you provide. Type: integer (or Expression with resultType integer). - public DataFactoryElement NumExecutors { get; set; } - /// The type of the spark config. - public DataFactorySparkConfigurationType? ConfigurationType { get; set; } - /// The spark configuration of the spark job. - public SparkConfigurationParametrizationReference TargetSparkConfiguration { get; set; } - /// - /// Spark configuration property. - /// - /// To assign an object to the value of this property use . - /// - /// - /// To assign an already formated json string to this property use . - /// - /// - /// Examples: - /// - /// - /// BinaryData.FromObjectAsJson("foo") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromString("\"foo\"") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromObjectAsJson(new { key = "value" }) - /// Creates a payload of { "key": "value" }. - /// - /// - /// BinaryData.FromString("{\"key\": \"value\"}") - /// Creates a payload of { "key": "value" }. - /// - /// - /// - /// - public IDictionary> SparkConfig { get; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SynapseNotebookReference.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SynapseNotebookReference.Serialization.cs deleted file mode 100644 index aa690747..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SynapseNotebookReference.Serialization.cs +++ /dev/null @@ -1,47 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class SynapseNotebookReference : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - writer.WritePropertyName("type"u8); - writer.WriteStringValue(NotebookReferenceType.ToString()); - writer.WritePropertyName("referenceName"u8); - JsonSerializer.Serialize(writer, ReferenceName); - writer.WriteEndObject(); - } - - internal static SynapseNotebookReference DeserializeSynapseNotebookReference(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - NotebookReferenceType type = default; - DataFactoryElement referenceName = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("type"u8)) - { - type = new NotebookReferenceType(property.Value.GetString()); - continue; - } - if (property.NameEquals("referenceName"u8)) - { - referenceName = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - } - return new SynapseNotebookReference(type, referenceName); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SynapseNotebookReference.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SynapseNotebookReference.cs deleted file mode 100644 index 1eb319ea..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SynapseNotebookReference.cs +++ /dev/null @@ -1,30 +0,0 @@ -// - -#nullable disable - -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// Synapse notebook reference type. - public partial class SynapseNotebookReference - { - /// Initializes a new instance of SynapseNotebookReference. - /// Synapse notebook reference type. - /// Reference notebook name. Type: string (or Expression with resultType string). - /// is null. - public SynapseNotebookReference(NotebookReferenceType notebookReferenceType, DataFactoryElement referenceName) - { - Argument.AssertNotNull(referenceName, nameof(referenceName)); - - NotebookReferenceType = notebookReferenceType; - ReferenceName = referenceName; - } - - /// Synapse notebook reference type. - public NotebookReferenceType NotebookReferenceType { get; set; } - /// Reference notebook name. Type: string (or Expression with resultType string). - public DataFactoryElement ReferenceName { get; set; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SynapseSparkJobDefinitionActivity.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SynapseSparkJobDefinitionActivity.Serialization.cs deleted file mode 100644 index b58fec83..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SynapseSparkJobDefinitionActivity.Serialization.cs +++ /dev/null @@ -1,564 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class SynapseSparkJobDefinitionActivity : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - if (Optional.IsDefined(LinkedServiceName)) - { - writer.WritePropertyName("linkedServiceName"u8); - JsonSerializer.Serialize(writer, LinkedServiceName); - } - if (Optional.IsDefined(Policy)) - { - writer.WritePropertyName("policy"u8); - writer.WriteObjectValue(Policy); - } - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ActivityType); - if (Optional.IsDefined(Description)) - { - writer.WritePropertyName("description"u8); - writer.WriteStringValue(Description); - } - if (Optional.IsDefined(State)) - { - writer.WritePropertyName("state"u8); - writer.WriteStringValue(State.Value.ToString()); - } - if (Optional.IsDefined(OnInactiveMarkAs)) - { - writer.WritePropertyName("onInactiveMarkAs"u8); - writer.WriteStringValue(OnInactiveMarkAs.Value.ToString()); - } - if (Optional.IsCollectionDefined(DependsOn)) - { - writer.WritePropertyName("dependsOn"u8); - writer.WriteStartArray(); - foreach (var item in DependsOn) - { - writer.WriteObjectValue(item); - } - writer.WriteEndArray(); - } - if (Optional.IsCollectionDefined(UserProperties)) - { - writer.WritePropertyName("userProperties"u8); - writer.WriteStartArray(); - foreach (var item in UserProperties) - { - writer.WriteObjectValue(item); - } - writer.WriteEndArray(); - } - writer.WritePropertyName("typeProperties"u8); - writer.WriteStartObject(); - writer.WritePropertyName("sparkJob"u8); - writer.WriteObjectValue(SparkJob); - if (Optional.IsCollectionDefined(Arguments)) - { - writer.WritePropertyName("args"u8); - writer.WriteStartArray(); - foreach (var item in Arguments) - { - if (item == null) - { - writer.WriteNullValue(); - continue; - } -#if NET6_0_OR_GREATER - writer.WriteRawValue(item); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.ToString()).RootElement); -#endif - } - writer.WriteEndArray(); - } - if (Optional.IsDefined(File)) - { - writer.WritePropertyName("file"u8); - JsonSerializer.Serialize(writer, File); - } - if (Optional.IsDefined(ScanFolder)) - { - writer.WritePropertyName("scanFolder"u8); - JsonSerializer.Serialize(writer, ScanFolder); - } - if (Optional.IsDefined(ClassName)) - { - writer.WritePropertyName("className"u8); - JsonSerializer.Serialize(writer, ClassName); - } - if (Optional.IsCollectionDefined(Files)) - { - writer.WritePropertyName("files"u8); - writer.WriteStartArray(); - foreach (var item in Files) - { - if (item == null) - { - writer.WriteNullValue(); - continue; - } -#if NET6_0_OR_GREATER - writer.WriteRawValue(item); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.ToString()).RootElement); -#endif - } - writer.WriteEndArray(); - } - if (Optional.IsCollectionDefined(PythonCodeReference)) - { - writer.WritePropertyName("pythonCodeReference"u8); - writer.WriteStartArray(); - foreach (var item in PythonCodeReference) - { - if (item == null) - { - writer.WriteNullValue(); - continue; - } -#if NET6_0_OR_GREATER - writer.WriteRawValue(item); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.ToString()).RootElement); -#endif - } - writer.WriteEndArray(); - } - if (Optional.IsCollectionDefined(FilesV2)) - { - writer.WritePropertyName("filesV2"u8); - writer.WriteStartArray(); - foreach (var item in FilesV2) - { - if (item == null) - { - writer.WriteNullValue(); - continue; - } -#if NET6_0_OR_GREATER - writer.WriteRawValue(item); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.ToString()).RootElement); -#endif - } - writer.WriteEndArray(); - } - if (Optional.IsDefined(TargetBigDataPool)) - { - writer.WritePropertyName("targetBigDataPool"u8); - writer.WriteObjectValue(TargetBigDataPool); - } - if (Optional.IsDefined(ExecutorSize)) - { - writer.WritePropertyName("executorSize"u8); - JsonSerializer.Serialize(writer, ExecutorSize); - } - if (Optional.IsDefined(Conf)) - { - writer.WritePropertyName("conf"u8); -#if NET6_0_OR_GREATER - writer.WriteRawValue(Conf); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(Conf.ToString()).RootElement); -#endif - } - if (Optional.IsDefined(DriverSize)) - { - writer.WritePropertyName("driverSize"u8); - JsonSerializer.Serialize(writer, DriverSize); - } - if (Optional.IsDefined(NumExecutors)) - { - writer.WritePropertyName("numExecutors"u8); - JsonSerializer.Serialize(writer, NumExecutors); - } - if (Optional.IsDefined(ConfigurationType)) - { - writer.WritePropertyName("configurationType"u8); - writer.WriteStringValue(ConfigurationType.Value.ToString()); - } - if (Optional.IsDefined(TargetSparkConfiguration)) - { - writer.WritePropertyName("targetSparkConfiguration"u8); - writer.WriteObjectValue(TargetSparkConfiguration); - } - if (Optional.IsCollectionDefined(SparkConfig)) - { - writer.WritePropertyName("sparkConfig"u8); - writer.WriteStartObject(); - foreach (var item in SparkConfig) - { - writer.WritePropertyName(item.Key); - if (item.Value == null) - { - writer.WriteNullValue(); - continue; - } -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.Value.ToString()).RootElement); -#endif - } - writer.WriteEndObject(); - } - writer.WriteEndObject(); - foreach (var item in AdditionalProperties) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.Value.ToString()).RootElement); -#endif - } - writer.WriteEndObject(); - } - - internal static SynapseSparkJobDefinitionActivity DeserializeSynapseSparkJobDefinitionActivity(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - Optional linkedServiceName = default; - Optional policy = default; - string name = default; - string type = default; - Optional description = default; - Optional state = default; - Optional onInactiveMarkAs = default; - Optional> dependsOn = default; - Optional> userProperties = default; - SynapseSparkJobReference sparkJob = default; - Optional> args = default; - Optional> file = default; - Optional> scanFolder = default; - Optional> className = default; - Optional> files = default; - Optional> pythonCodeReference = default; - Optional> filesV2 = default; - Optional targetBigDataPool = default; - Optional> executorSize = default; - Optional conf = default; - Optional> driverSize = default; - Optional> numExecutors = default; - Optional configurationType = default; - Optional targetSparkConfiguration = default; - Optional>> sparkConfig = default; - IDictionary> additionalProperties = default; - Dictionary> additionalPropertiesDictionary = new Dictionary>(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("linkedServiceName"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - linkedServiceName = JsonSerializer.Deserialize(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("policy"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - policy = PipelineActivityPolicy.DeserializePipelineActivityPolicy(property.Value); - continue; - } - if (property.NameEquals("name"u8)) - { - name = property.Value.GetString(); - continue; - } - if (property.NameEquals("type"u8)) - { - type = property.Value.GetString(); - continue; - } - if (property.NameEquals("description"u8)) - { - description = property.Value.GetString(); - continue; - } - if (property.NameEquals("state"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - state = new PipelineActivityState(property.Value.GetString()); - continue; - } - if (property.NameEquals("onInactiveMarkAs"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - onInactiveMarkAs = new ActivityOnInactiveMarkAs(property.Value.GetString()); - continue; - } - if (property.NameEquals("dependsOn"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - array.Add(PipelineActivityDependency.DeserializePipelineActivityDependency(item)); - } - dependsOn = array; - continue; - } - if (property.NameEquals("userProperties"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - array.Add(PipelineActivityUserProperty.DeserializePipelineActivityUserProperty(item)); - } - userProperties = array; - continue; - } - if (property.NameEquals("typeProperties"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - foreach (var property0 in property.Value.EnumerateObject()) - { - if (property0.NameEquals("sparkJob"u8)) - { - sparkJob = SynapseSparkJobReference.DeserializeSynapseSparkJobReference(property0.Value); - continue; - } - if (property0.NameEquals("args"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property0.Value.EnumerateArray()) - { - if (item.ValueKind == JsonValueKind.Null) - { - array.Add(null); - } - else - { - array.Add(BinaryData.FromString(item.GetRawText())); - } - } - args = array; - continue; - } - if (property0.NameEquals("file"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - file = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("scanFolder"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - scanFolder = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("className"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - className = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("files"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property0.Value.EnumerateArray()) - { - if (item.ValueKind == JsonValueKind.Null) - { - array.Add(null); - } - else - { - array.Add(BinaryData.FromString(item.GetRawText())); - } - } - files = array; - continue; - } - if (property0.NameEquals("pythonCodeReference"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property0.Value.EnumerateArray()) - { - if (item.ValueKind == JsonValueKind.Null) - { - array.Add(null); - } - else - { - array.Add(BinaryData.FromString(item.GetRawText())); - } - } - pythonCodeReference = array; - continue; - } - if (property0.NameEquals("filesV2"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property0.Value.EnumerateArray()) - { - if (item.ValueKind == JsonValueKind.Null) - { - array.Add(null); - } - else - { - array.Add(BinaryData.FromString(item.GetRawText())); - } - } - filesV2 = array; - continue; - } - if (property0.NameEquals("targetBigDataPool"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - targetBigDataPool = BigDataPoolParametrizationReference.DeserializeBigDataPoolParametrizationReference(property0.Value); - continue; - } - if (property0.NameEquals("executorSize"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - executorSize = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("conf"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - conf = BinaryData.FromString(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("driverSize"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - driverSize = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("numExecutors"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - numExecutors = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("configurationType"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - configurationType = new DataFactorySparkConfigurationType(property0.Value.GetString()); - continue; - } - if (property0.NameEquals("targetSparkConfiguration"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - targetSparkConfiguration = SparkConfigurationParametrizationReference.DeserializeSparkConfigurationParametrizationReference(property0.Value); - continue; - } - if (property0.NameEquals("sparkConfig"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - Dictionary> dictionary = new Dictionary>(); - foreach (var property1 in property0.Value.EnumerateObject()) - { - if (property1.Value.ValueKind == JsonValueKind.Null) - { - dictionary.Add(property1.Name, null); - } - else - { - dictionary.Add(property1.Name, JsonSerializer.Deserialize>(property1.Value.GetRawText())); - } - } - sparkConfig = dictionary; - continue; - } - } - continue; - } - additionalPropertiesDictionary.Add(property.Name, JsonSerializer.Deserialize>(property.Value.GetRawText())); - } - additionalProperties = additionalPropertiesDictionary; - return new SynapseSparkJobDefinitionActivity(name, type, description.Value, Optional.ToNullable(state), Optional.ToNullable(onInactiveMarkAs), Optional.ToList(dependsOn), Optional.ToList(userProperties), additionalProperties, linkedServiceName, policy.Value, sparkJob, Optional.ToList(args), file.Value, scanFolder.Value, className.Value, Optional.ToList(files), Optional.ToList(pythonCodeReference), Optional.ToList(filesV2), targetBigDataPool.Value, executorSize.Value, conf.Value, driverSize.Value, numExecutors.Value, Optional.ToNullable(configurationType), targetSparkConfiguration.Value, Optional.ToDictionary(sparkConfig)); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SynapseSparkJobDefinitionActivity.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SynapseSparkJobDefinitionActivity.cs deleted file mode 100644 index dfc428cd..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SynapseSparkJobDefinitionActivity.cs +++ /dev/null @@ -1,286 +0,0 @@ -// - -#nullable disable - -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// Execute spark job activity. - public partial class SynapseSparkJobDefinitionActivity : ExecutionActivity - { - /// Initializes a new instance of SynapseSparkJobDefinitionActivity. - /// Activity name. - /// Synapse spark job reference. - /// or is null. - public SynapseSparkJobDefinitionActivity(string name, SynapseSparkJobReference sparkJob) : base(name) - { - Argument.AssertNotNull(name, nameof(name)); - Argument.AssertNotNull(sparkJob, nameof(sparkJob)); - - SparkJob = sparkJob; - Arguments = new ChangeTrackingList(); - Files = new ChangeTrackingList(); - PythonCodeReference = new ChangeTrackingList(); - FilesV2 = new ChangeTrackingList(); - SparkConfig = new ChangeTrackingDictionary>(); - ActivityType = "SparkJob"; - } - - /// Initializes a new instance of SynapseSparkJobDefinitionActivity. - /// Activity name. - /// Type of activity. - /// Activity description. - /// Activity state. This is an optional property and if not provided, the state will be Active by default. - /// 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. - /// Activity depends on condition. - /// Activity user properties. - /// Additional Properties. - /// Linked service reference. - /// Activity policy. - /// Synapse spark job reference. - /// User specified arguments to SynapseSparkJobDefinitionActivity. - /// The main file used for the job, which will override the 'file' of the spark job definition you provide. Type: string (or Expression with resultType string). - /// Scanning subfolders from the root folder of the main definition file, these files will be added as reference files. The folders named 'jars', 'pyFiles', 'files' or 'archives' will be scanned, and the folders name are case sensitive. Type: boolean (or Expression with resultType boolean). - /// The fully-qualified identifier or the main class that is in the main definition file, which will override the 'className' of the spark job definition you provide. Type: string (or Expression with resultType string). - /// (Deprecated. Please use pythonCodeReference and filesV2) Additional files used for reference in the main definition file, which will override the 'files' of the spark job definition you provide. - /// Additional python code files used for reference in the main definition file, which will override the 'pyFiles' of the spark job definition you provide. - /// Additional files used for reference in the main definition file, which will override the 'jars' and 'files' of the spark job definition you provide. - /// The name of the big data pool which will be used to execute the spark batch job, which will override the 'targetBigDataPool' of the spark job definition you provide. - /// Number of core and memory to be used for executors allocated in the specified Spark pool for the job, which will be used for overriding 'executorCores' and 'executorMemory' of the spark job definition you provide. Type: string (or Expression with resultType string). - /// Spark configuration properties, which will override the 'conf' of the spark job definition you provide. - /// Number of core and memory to be used for driver allocated in the specified Spark pool for the job, which will be used for overriding 'driverCores' and 'driverMemory' of the spark job definition you provide. Type: string (or Expression with resultType string). - /// Number of executors to launch for this job, which will override the 'numExecutors' of the spark job definition you provide. Type: integer (or Expression with resultType integer). - /// The type of the spark config. - /// The spark configuration of the spark job. - /// Spark configuration property. - internal SynapseSparkJobDefinitionActivity(string name, string activityType, string description, PipelineActivityState? state, ActivityOnInactiveMarkAs? onInactiveMarkAs, IList dependsOn, IList userProperties, IDictionary> additionalProperties, DataFactoryLinkedServiceReference linkedServiceName, PipelineActivityPolicy policy, SynapseSparkJobReference sparkJob, IList arguments, DataFactoryElement file, DataFactoryElement scanFolder, DataFactoryElement className, IList files, IList pythonCodeReference, IList filesV2, BigDataPoolParametrizationReference targetBigDataPool, DataFactoryElement executorSize, BinaryData conf, DataFactoryElement driverSize, DataFactoryElement numExecutors, DataFactorySparkConfigurationType? configurationType, SparkConfigurationParametrizationReference targetSparkConfiguration, IDictionary> sparkConfig) : base(name, activityType, description, state, onInactiveMarkAs, dependsOn, userProperties, additionalProperties, linkedServiceName, policy) - { - SparkJob = sparkJob; - Arguments = arguments; - File = file; - ScanFolder = scanFolder; - ClassName = className; - Files = files; - PythonCodeReference = pythonCodeReference; - FilesV2 = filesV2; - TargetBigDataPool = targetBigDataPool; - ExecutorSize = executorSize; - Conf = conf; - DriverSize = driverSize; - NumExecutors = numExecutors; - ConfigurationType = configurationType; - TargetSparkConfiguration = targetSparkConfiguration; - SparkConfig = sparkConfig; - ActivityType = activityType ?? "SparkJob"; - } - - /// Synapse spark job reference. - public SynapseSparkJobReference SparkJob { get; set; } - /// - /// User specified arguments to SynapseSparkJobDefinitionActivity. - /// - /// To assign an object to the element of this property use . - /// - /// - /// To assign an already formated json string to this property use . - /// - /// - /// Examples: - /// - /// - /// BinaryData.FromObjectAsJson("foo") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromString("\"foo\"") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromObjectAsJson(new { key = "value" }) - /// Creates a payload of { "key": "value" }. - /// - /// - /// BinaryData.FromString("{\"key\": \"value\"}") - /// Creates a payload of { "key": "value" }. - /// - /// - /// - /// - public IList Arguments { get; } - /// The main file used for the job, which will override the 'file' of the spark job definition you provide. Type: string (or Expression with resultType string). - public DataFactoryElement File { get; set; } - /// Scanning subfolders from the root folder of the main definition file, these files will be added as reference files. The folders named 'jars', 'pyFiles', 'files' or 'archives' will be scanned, and the folders name are case sensitive. Type: boolean (or Expression with resultType boolean). - public DataFactoryElement ScanFolder { get; set; } - /// The fully-qualified identifier or the main class that is in the main definition file, which will override the 'className' of the spark job definition you provide. Type: string (or Expression with resultType string). - public DataFactoryElement ClassName { get; set; } - /// - /// (Deprecated. Please use pythonCodeReference and filesV2) Additional files used for reference in the main definition file, which will override the 'files' of the spark job definition you provide. - /// - /// To assign an object to the element of this property use . - /// - /// - /// To assign an already formated json string to this property use . - /// - /// - /// Examples: - /// - /// - /// BinaryData.FromObjectAsJson("foo") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromString("\"foo\"") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromObjectAsJson(new { key = "value" }) - /// Creates a payload of { "key": "value" }. - /// - /// - /// BinaryData.FromString("{\"key\": \"value\"}") - /// Creates a payload of { "key": "value" }. - /// - /// - /// - /// - public IList Files { get; } - /// - /// Additional python code files used for reference in the main definition file, which will override the 'pyFiles' of the spark job definition you provide. - /// - /// To assign an object to the element of this property use . - /// - /// - /// To assign an already formated json string to this property use . - /// - /// - /// Examples: - /// - /// - /// BinaryData.FromObjectAsJson("foo") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromString("\"foo\"") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromObjectAsJson(new { key = "value" }) - /// Creates a payload of { "key": "value" }. - /// - /// - /// BinaryData.FromString("{\"key\": \"value\"}") - /// Creates a payload of { "key": "value" }. - /// - /// - /// - /// - public IList PythonCodeReference { get; } - /// - /// Additional files used for reference in the main definition file, which will override the 'jars' and 'files' of the spark job definition you provide. - /// - /// To assign an object to the element of this property use . - /// - /// - /// To assign an already formated json string to this property use . - /// - /// - /// Examples: - /// - /// - /// BinaryData.FromObjectAsJson("foo") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromString("\"foo\"") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromObjectAsJson(new { key = "value" }) - /// Creates a payload of { "key": "value" }. - /// - /// - /// BinaryData.FromString("{\"key\": \"value\"}") - /// Creates a payload of { "key": "value" }. - /// - /// - /// - /// - public IList FilesV2 { get; } - /// The name of the big data pool which will be used to execute the spark batch job, which will override the 'targetBigDataPool' of the spark job definition you provide. - public BigDataPoolParametrizationReference TargetBigDataPool { get; set; } - /// Number of core and memory to be used for executors allocated in the specified Spark pool for the job, which will be used for overriding 'executorCores' and 'executorMemory' of the spark job definition you provide. Type: string (or Expression with resultType string). - public DataFactoryElement ExecutorSize { get; set; } - /// - /// Spark configuration properties, which will override the 'conf' of the spark job definition you provide. - /// - /// To assign an object to this property use . - /// - /// - /// To assign an already formated json string to this property use . - /// - /// - /// Examples: - /// - /// - /// BinaryData.FromObjectAsJson("foo") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromString("\"foo\"") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromObjectAsJson(new { key = "value" }) - /// Creates a payload of { "key": "value" }. - /// - /// - /// BinaryData.FromString("{\"key\": \"value\"}") - /// Creates a payload of { "key": "value" }. - /// - /// - /// - /// - public BinaryData Conf { get; set; } - /// Number of core and memory to be used for driver allocated in the specified Spark pool for the job, which will be used for overriding 'driverCores' and 'driverMemory' of the spark job definition you provide. Type: string (or Expression with resultType string). - public DataFactoryElement DriverSize { get; set; } - /// Number of executors to launch for this job, which will override the 'numExecutors' of the spark job definition you provide. Type: integer (or Expression with resultType integer). - public DataFactoryElement NumExecutors { get; set; } - /// The type of the spark config. - public DataFactorySparkConfigurationType? ConfigurationType { get; set; } - /// The spark configuration of the spark job. - public SparkConfigurationParametrizationReference TargetSparkConfiguration { get; set; } - /// - /// Spark configuration property. - /// - /// To assign an object to the value of this property use . - /// - /// - /// To assign an already formated json string to this property use . - /// - /// - /// Examples: - /// - /// - /// BinaryData.FromObjectAsJson("foo") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromString("\"foo\"") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromObjectAsJson(new { key = "value" }) - /// Creates a payload of { "key": "value" }. - /// - /// - /// BinaryData.FromString("{\"key\": \"value\"}") - /// Creates a payload of { "key": "value" }. - /// - /// - /// - /// - public IDictionary> SparkConfig { get; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SynapseSparkJobReference.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SynapseSparkJobReference.Serialization.cs deleted file mode 100644 index 500b82bb..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SynapseSparkJobReference.Serialization.cs +++ /dev/null @@ -1,50 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class SynapseSparkJobReference : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - writer.WritePropertyName("type"u8); - writer.WriteStringValue(SparkJobReferenceType.ToString()); - writer.WritePropertyName("referenceName"u8); -#if NET6_0_OR_GREATER - writer.WriteRawValue(ReferenceName); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(ReferenceName.ToString()).RootElement); -#endif - writer.WriteEndObject(); - } - - internal static SynapseSparkJobReference DeserializeSynapseSparkJobReference(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - SparkJobReferenceType type = default; - BinaryData referenceName = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("type"u8)) - { - type = new SparkJobReferenceType(property.Value.GetString()); - continue; - } - if (property.NameEquals("referenceName"u8)) - { - referenceName = BinaryData.FromString(property.Value.GetRawText()); - continue; - } - } - return new SynapseSparkJobReference(type, referenceName); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SynapseSparkJobReference.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SynapseSparkJobReference.cs deleted file mode 100644 index adf4eec2..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/SynapseSparkJobReference.cs +++ /dev/null @@ -1,58 +0,0 @@ -// - -#nullable disable - -using Azure.Core; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// Synapse spark job reference type. - public partial class SynapseSparkJobReference - { - /// Initializes a new instance of SynapseSparkJobReference. - /// Synapse spark job reference type. - /// Reference spark job name. Expression with resultType string. - /// is null. - public SynapseSparkJobReference(SparkJobReferenceType sparkJobReferenceType, BinaryData referenceName) - { - Argument.AssertNotNull(referenceName, nameof(referenceName)); - - SparkJobReferenceType = sparkJobReferenceType; - ReferenceName = referenceName; - } - - /// Synapse spark job reference type. - public SparkJobReferenceType SparkJobReferenceType { get; set; } - /// - /// Reference spark job name. Expression with resultType string. - /// - /// To assign an object to this property use . - /// - /// - /// To assign an already formated json string to this property use . - /// - /// - /// Examples: - /// - /// - /// BinaryData.FromObjectAsJson("foo") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromString("\"foo\"") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromObjectAsJson(new { key = "value" }) - /// Creates a payload of { "key": "value" }. - /// - /// - /// BinaryData.FromString("{\"key\": \"value\"}") - /// Creates a payload of { "key": "value" }. - /// - /// - /// - /// - public BinaryData ReferenceName { get; set; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/TabularSource.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/TabularSource.Serialization.cs deleted file mode 100644 index 6e4c4890..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/TabularSource.Serialization.cs +++ /dev/null @@ -1,211 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class TabularSource : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - if (Optional.IsDefined(QueryTimeout)) - { - writer.WritePropertyName("queryTimeout"u8); - JsonSerializer.Serialize(writer, QueryTimeout); - } - if (Optional.IsDefined(AdditionalColumns)) - { - writer.WritePropertyName("additionalColumns"u8); -#if NET6_0_OR_GREATER - writer.WriteRawValue(AdditionalColumns); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(AdditionalColumns.ToString()).RootElement); -#endif - } - writer.WritePropertyName("type"u8); - writer.WriteStringValue(CopySourceType); - if (Optional.IsDefined(SourceRetryCount)) - { - writer.WritePropertyName("sourceRetryCount"u8); - JsonSerializer.Serialize(writer, SourceRetryCount); - } - if (Optional.IsDefined(SourceRetryWait)) - { - writer.WritePropertyName("sourceRetryWait"u8); - JsonSerializer.Serialize(writer, SourceRetryWait); - } - if (Optional.IsDefined(MaxConcurrentConnections)) - { - writer.WritePropertyName("maxConcurrentConnections"u8); - JsonSerializer.Serialize(writer, MaxConcurrentConnections); - } - if (Optional.IsDefined(DisableMetricsCollection)) - { - writer.WritePropertyName("disableMetricsCollection"u8); - JsonSerializer.Serialize(writer, DisableMetricsCollection); - } - foreach (var item in AdditionalProperties) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.Value.ToString()).RootElement); -#endif - } - writer.WriteEndObject(); - } - - internal static TabularSource DeserializeTabularSource(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - if (element.TryGetProperty("type", out JsonElement discriminator)) - { - switch (discriminator.GetString()) - { - case "AmazonMWSSource": return AmazonMwsSource.DeserializeAmazonMwsSource(element); - case "AmazonRdsForSqlServerSource": return AmazonRdsForSqlServerSource.DeserializeAmazonRdsForSqlServerSource(element); - case "AmazonRedshiftSource": return AmazonRedshiftSource.DeserializeAmazonRedshiftSource(element); - case "AzureMariaDBSource": return AzureMariaDBSource.DeserializeAzureMariaDBSource(element); - case "AzureMySqlSource": return AzureMySqlSource.DeserializeAzureMySqlSource(element); - case "AzurePostgreSqlSource": return AzurePostgreSqlSource.DeserializeAzurePostgreSqlSource(element); - case "AzureSqlSource": return AzureSqlSource.DeserializeAzureSqlSource(element); - case "AzureTableSource": return AzureTableSource.DeserializeAzureTableSource(element); - case "CassandraSource": return CassandraSource.DeserializeCassandraSource(element); - case "ConcurSource": return ConcurSource.DeserializeConcurSource(element); - case "CouchbaseSource": return CouchbaseSource.DeserializeCouchbaseSource(element); - case "Db2Source": return Db2Source.DeserializeDb2Source(element); - case "DrillSource": return DrillSource.DeserializeDrillSource(element); - case "DynamicsAXSource": return DynamicsAXSource.DeserializeDynamicsAXSource(element); - case "EloquaSource": return EloquaSource.DeserializeEloquaSource(element); - case "GoogleAdWordsSource": return GoogleAdWordsSource.DeserializeGoogleAdWordsSource(element); - case "GoogleBigQuerySource": return GoogleBigQuerySource.DeserializeGoogleBigQuerySource(element); - case "GreenplumSource": return GreenplumSource.DeserializeGreenplumSource(element); - case "HBaseSource": return HBaseSource.DeserializeHBaseSource(element); - case "HiveSource": return HiveSource.DeserializeHiveSource(element); - case "HubspotSource": return HubspotSource.DeserializeHubspotSource(element); - case "ImpalaSource": return ImpalaSource.DeserializeImpalaSource(element); - case "InformixSource": return InformixSource.DeserializeInformixSource(element); - case "JiraSource": return JiraSource.DeserializeJiraSource(element); - case "MagentoSource": return MagentoSource.DeserializeMagentoSource(element); - case "MariaDBSource": return MariaDBSource.DeserializeMariaDBSource(element); - case "MarketoSource": return MarketoSource.DeserializeMarketoSource(element); - case "MySqlSource": return MySqlSource.DeserializeMySqlSource(element); - case "NetezzaSource": return NetezzaSource.DeserializeNetezzaSource(element); - case "OdbcSource": return OdbcSource.DeserializeOdbcSource(element); - case "OracleServiceCloudSource": return OracleServiceCloudSource.DeserializeOracleServiceCloudSource(element); - case "PaypalSource": return PaypalSource.DeserializePaypalSource(element); - case "PhoenixSource": return PhoenixSource.DeserializePhoenixSource(element); - case "PostgreSqlSource": return PostgreSqlSource.DeserializePostgreSqlSource(element); - case "PrestoSource": return PrestoSource.DeserializePrestoSource(element); - case "QuickBooksSource": return QuickBooksSource.DeserializeQuickBooksSource(element); - case "ResponsysSource": return ResponsysSource.DeserializeResponsysSource(element); - case "SalesforceMarketingCloudSource": return SalesforceMarketingCloudSource.DeserializeSalesforceMarketingCloudSource(element); - case "SalesforceSource": return SalesforceSource.DeserializeSalesforceSource(element); - case "SapBwSource": return SapBWSource.DeserializeSapBWSource(element); - case "SapCloudForCustomerSource": return SapCloudForCustomerSource.DeserializeSapCloudForCustomerSource(element); - case "SapEccSource": return SapEccSource.DeserializeSapEccSource(element); - case "SapHanaSource": return SapHanaSource.DeserializeSapHanaSource(element); - case "SapOdpSource": return SapOdpSource.DeserializeSapOdpSource(element); - case "SapOpenHubSource": return SapOpenHubSource.DeserializeSapOpenHubSource(element); - case "SapTableSource": return SapTableSource.DeserializeSapTableSource(element); - case "ServiceNowSource": return ServiceNowSource.DeserializeServiceNowSource(element); - case "ShopifySource": return ShopifySource.DeserializeShopifySource(element); - case "SparkSource": return SparkSource.DeserializeSparkSource(element); - case "SqlDWSource": return SqlDWSource.DeserializeSqlDWSource(element); - case "SqlMISource": return SqlMISource.DeserializeSqlMISource(element); - case "SqlServerSource": return SqlServerSource.DeserializeSqlServerSource(element); - case "SqlSource": return SqlSource.DeserializeSqlSource(element); - case "SquareSource": return SquareSource.DeserializeSquareSource(element); - case "SybaseSource": return SybaseSource.DeserializeSybaseSource(element); - case "TeradataSource": return TeradataSource.DeserializeTeradataSource(element); - case "VerticaSource": return VerticaSource.DeserializeVerticaSource(element); - case "XeroSource": return XeroSource.DeserializeXeroSource(element); - case "ZohoSource": return ZohoSource.DeserializeZohoSource(element); - } - } - Optional> queryTimeout = default; - Optional additionalColumns = default; - string type = "TabularSource"; - Optional> sourceRetryCount = default; - Optional> sourceRetryWait = default; - Optional> maxConcurrentConnections = default; - Optional> disableMetricsCollection = default; - IDictionary> additionalProperties = default; - Dictionary> additionalPropertiesDictionary = new Dictionary>(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("queryTimeout"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - queryTimeout = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("additionalColumns"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - additionalColumns = BinaryData.FromString(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("type"u8)) - { - type = property.Value.GetString(); - continue; - } - if (property.NameEquals("sourceRetryCount"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - sourceRetryCount = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("sourceRetryWait"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - sourceRetryWait = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("maxConcurrentConnections"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - maxConcurrentConnections = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("disableMetricsCollection"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - disableMetricsCollection = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - additionalPropertiesDictionary.Add(property.Name, JsonSerializer.Deserialize>(property.Value.GetRawText())); - } - additionalProperties = additionalPropertiesDictionary; - return new TabularSource(type, sourceRetryCount.Value, sourceRetryWait.Value, maxConcurrentConnections.Value, disableMetricsCollection.Value, additionalProperties, queryTimeout.Value, additionalColumns.Value); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/TabularSource.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/TabularSource.cs deleted file mode 100644 index 9c9ac66d..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/TabularSource.cs +++ /dev/null @@ -1,72 +0,0 @@ -// - -#nullable disable - -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// - /// Copy activity sources of tabular type. - /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. - /// The available derived classes include , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , and . - /// - public partial class TabularSource : CopyActivitySource - { - /// Initializes a new instance of TabularSource. - public TabularSource() - { - CopySourceType = "TabularSource"; - } - - /// Initializes a new instance of TabularSource. - /// Copy source type. - /// Source retry count. Type: integer (or Expression with resultType integer). - /// Source retry wait. Type: string (or Expression with resultType string), pattern: ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). - /// The maximum concurrent connection count for the source data store. Type: integer (or Expression with resultType integer). - /// If true, disable data store metrics collection. Default is false. Type: boolean (or Expression with resultType boolean). - /// Additional Properties. - /// 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). - internal TabularSource(string copySourceType, DataFactoryElement sourceRetryCount, DataFactoryElement sourceRetryWait, DataFactoryElement maxConcurrentConnections, DataFactoryElement disableMetricsCollection, IDictionary> additionalProperties, DataFactoryElement queryTimeout, BinaryData additionalColumns) : base(copySourceType, sourceRetryCount, sourceRetryWait, maxConcurrentConnections, disableMetricsCollection, additionalProperties) - { - QueryTimeout = queryTimeout; - AdditionalColumns = additionalColumns; - CopySourceType = copySourceType ?? "TabularSource"; - } - - /// Query timeout. Type: string (or Expression with resultType string), pattern: ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). - public DataFactoryElement QueryTimeout { get; set; } - /// - /// Specifies the additional columns to be added to source data. Type: array of objects(AdditionalColumns) (or Expression with resultType array of objects). - /// - /// To assign an object to this property use . - /// - /// - /// To assign an already formated json string to this property use . - /// - /// - /// Examples: - /// - /// - /// BinaryData.FromObjectAsJson("foo") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromString("\"foo\"") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromObjectAsJson(new { key = "value" }) - /// Creates a payload of { "key": "value" }. - /// - /// - /// BinaryData.FromString("{\"key\": \"value\"}") - /// Creates a payload of { "key": "value" }. - /// - /// - /// - /// - public BinaryData AdditionalColumns { get; set; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/TarGzipReadSettings.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/TarGzipReadSettings.Serialization.cs deleted file mode 100644 index 65415d77..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/TarGzipReadSettings.Serialization.cs +++ /dev/null @@ -1,67 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class TarGzipReadSettings : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - if (Optional.IsDefined(PreserveCompressionFileNameAsFolder)) - { - writer.WritePropertyName("preserveCompressionFileNameAsFolder"u8); - JsonSerializer.Serialize(writer, PreserveCompressionFileNameAsFolder); - } - writer.WritePropertyName("type"u8); - writer.WriteStringValue(CompressionReadSettingsType); - foreach (var item in AdditionalProperties) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.Value.ToString()).RootElement); -#endif - } - writer.WriteEndObject(); - } - - internal static TarGzipReadSettings DeserializeTarGzipReadSettings(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - Optional> preserveCompressionFileNameAsFolder = default; - string type = default; - IDictionary> additionalProperties = default; - Dictionary> additionalPropertiesDictionary = new Dictionary>(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("preserveCompressionFileNameAsFolder"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - preserveCompressionFileNameAsFolder = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("type"u8)) - { - type = property.Value.GetString(); - continue; - } - additionalPropertiesDictionary.Add(property.Name, JsonSerializer.Deserialize>(property.Value.GetRawText())); - } - additionalProperties = additionalPropertiesDictionary; - return new TarGzipReadSettings(type, additionalProperties, preserveCompressionFileNameAsFolder.Value); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/TarGzipReadSettings.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/TarGzipReadSettings.cs deleted file mode 100644 index a3f8fdc4..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/TarGzipReadSettings.cs +++ /dev/null @@ -1,31 +0,0 @@ -// - -#nullable disable - -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// The TarGZip compression read settings. - public partial class TarGzipReadSettings : CompressionReadSettings - { - /// Initializes a new instance of TarGzipReadSettings. - public TarGzipReadSettings() - { - CompressionReadSettingsType = "TarGZipReadSettings"; - } - - /// Initializes a new instance of TarGzipReadSettings. - /// The Compression setting type. - /// Additional Properties. - /// Preserve the compression file name as folder path. Type: boolean (or Expression with resultType boolean). - internal TarGzipReadSettings(string compressionReadSettingsType, IDictionary> additionalProperties, DataFactoryElement preserveCompressionFileNameAsFolder) : base(compressionReadSettingsType, additionalProperties) - { - PreserveCompressionFileNameAsFolder = preserveCompressionFileNameAsFolder; - CompressionReadSettingsType = compressionReadSettingsType ?? "TarGZipReadSettings"; - } - - /// Preserve the compression file name as folder path. Type: boolean (or Expression with resultType boolean). - public DataFactoryElement PreserveCompressionFileNameAsFolder { get; set; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/TarReadSettings.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/TarReadSettings.Serialization.cs deleted file mode 100644 index b76a7842..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/TarReadSettings.Serialization.cs +++ /dev/null @@ -1,67 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class TarReadSettings : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - if (Optional.IsDefined(PreserveCompressionFileNameAsFolder)) - { - writer.WritePropertyName("preserveCompressionFileNameAsFolder"u8); - JsonSerializer.Serialize(writer, PreserveCompressionFileNameAsFolder); - } - writer.WritePropertyName("type"u8); - writer.WriteStringValue(CompressionReadSettingsType); - foreach (var item in AdditionalProperties) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.Value.ToString()).RootElement); -#endif - } - writer.WriteEndObject(); - } - - internal static TarReadSettings DeserializeTarReadSettings(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - Optional> preserveCompressionFileNameAsFolder = default; - string type = default; - IDictionary> additionalProperties = default; - Dictionary> additionalPropertiesDictionary = new Dictionary>(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("preserveCompressionFileNameAsFolder"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - preserveCompressionFileNameAsFolder = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("type"u8)) - { - type = property.Value.GetString(); - continue; - } - additionalPropertiesDictionary.Add(property.Name, JsonSerializer.Deserialize>(property.Value.GetRawText())); - } - additionalProperties = additionalPropertiesDictionary; - return new TarReadSettings(type, additionalProperties, preserveCompressionFileNameAsFolder.Value); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/TarReadSettings.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/TarReadSettings.cs deleted file mode 100644 index 8b68aae9..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/TarReadSettings.cs +++ /dev/null @@ -1,31 +0,0 @@ -// - -#nullable disable - -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// The Tar compression read settings. - public partial class TarReadSettings : CompressionReadSettings - { - /// Initializes a new instance of TarReadSettings. - public TarReadSettings() - { - CompressionReadSettingsType = "TarReadSettings"; - } - - /// Initializes a new instance of TarReadSettings. - /// The Compression setting type. - /// Additional Properties. - /// Preserve the compression file name as folder path. Type: boolean (or Expression with resultType boolean). - internal TarReadSettings(string compressionReadSettingsType, IDictionary> additionalProperties, DataFactoryElement preserveCompressionFileNameAsFolder) : base(compressionReadSettingsType, additionalProperties) - { - PreserveCompressionFileNameAsFolder = preserveCompressionFileNameAsFolder; - CompressionReadSettingsType = compressionReadSettingsType ?? "TarReadSettings"; - } - - /// Preserve the compression file name as folder path. Type: boolean (or Expression with resultType boolean). - public DataFactoryElement PreserveCompressionFileNameAsFolder { get; set; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/TeamDeskAuthenticationType.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/TeamDeskAuthenticationType.cs deleted file mode 100644 index 6f2700a5..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/TeamDeskAuthenticationType.cs +++ /dev/null @@ -1,47 +0,0 @@ -// - -#nullable disable - -using System.ComponentModel; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// The authentication type to use. - public readonly partial struct TeamDeskAuthenticationType : IEquatable - { - private readonly string _value; - - /// Initializes a new instance of . - /// is null. - public TeamDeskAuthenticationType(string value) - { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } - - private const string BasicValue = "Basic"; - private const string TokenValue = "Token"; - - /// Basic. - public static TeamDeskAuthenticationType Basic { get; } = new TeamDeskAuthenticationType(BasicValue); - /// Token. - public static TeamDeskAuthenticationType Token { get; } = new TeamDeskAuthenticationType(TokenValue); - /// Determines if two values are the same. - public static bool operator ==(TeamDeskAuthenticationType left, TeamDeskAuthenticationType right) => left.Equals(right); - /// Determines if two values are not the same. - public static bool operator !=(TeamDeskAuthenticationType left, TeamDeskAuthenticationType right) => !left.Equals(right); - /// Converts a string to a . - public static implicit operator TeamDeskAuthenticationType(string value) => new TeamDeskAuthenticationType(value); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override bool Equals(object obj) => obj is TeamDeskAuthenticationType other && Equals(other); - /// - public bool Equals(TeamDeskAuthenticationType other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override int GetHashCode() => _value?.GetHashCode() ?? 0; - /// - public override string ToString() => _value; - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/TeamDeskLinkedService.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/TeamDeskLinkedService.Serialization.cs deleted file mode 100644 index 1f2d7390..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/TeamDeskLinkedService.Serialization.cs +++ /dev/null @@ -1,232 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class TeamDeskLinkedService : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - writer.WritePropertyName("type"u8); - writer.WriteStringValue(LinkedServiceType); - if (Optional.IsDefined(ConnectVia)) - { - writer.WritePropertyName("connectVia"u8); - writer.WriteObjectValue(ConnectVia); - } - if (Optional.IsDefined(Description)) - { - writer.WritePropertyName("description"u8); - writer.WriteStringValue(Description); - } - if (Optional.IsCollectionDefined(Parameters)) - { - writer.WritePropertyName("parameters"u8); - writer.WriteStartObject(); - foreach (var item in Parameters) - { - writer.WritePropertyName(item.Key); - writer.WriteObjectValue(item.Value); - } - writer.WriteEndObject(); - } - if (Optional.IsCollectionDefined(Annotations)) - { - writer.WritePropertyName("annotations"u8); - writer.WriteStartArray(); - foreach (var item in Annotations) - { - if (item == null) - { - writer.WriteNullValue(); - continue; - } -#if NET6_0_OR_GREATER - writer.WriteRawValue(item); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.ToString()).RootElement); -#endif - } - writer.WriteEndArray(); - } - writer.WritePropertyName("typeProperties"u8); - writer.WriteStartObject(); - writer.WritePropertyName("authenticationType"u8); - writer.WriteStringValue(AuthenticationType.ToString()); - writer.WritePropertyName("url"u8); - JsonSerializer.Serialize(writer, Uri); - if (Optional.IsDefined(UserName)) - { - writer.WritePropertyName("userName"u8); - JsonSerializer.Serialize(writer, UserName); - } - if (Optional.IsDefined(Password)) - { - writer.WritePropertyName("password"u8); - JsonSerializer.Serialize(writer, Password); - } - if (Optional.IsDefined(ApiToken)) - { - writer.WritePropertyName("apiToken"u8); - JsonSerializer.Serialize(writer, ApiToken); - } - if (Optional.IsDefined(EncryptedCredential)) - { - writer.WritePropertyName("encryptedCredential"u8); - writer.WriteStringValue(EncryptedCredential); - } - writer.WriteEndObject(); - foreach (var item in AdditionalProperties) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.Value.ToString()).RootElement); -#endif - } - writer.WriteEndObject(); - } - - internal static TeamDeskLinkedService DeserializeTeamDeskLinkedService(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - string type = default; - Optional connectVia = default; - Optional description = default; - Optional> parameters = default; - Optional> annotations = default; - TeamDeskAuthenticationType authenticationType = default; - DataFactoryElement url = default; - Optional> userName = default; - Optional password = default; - Optional apiToken = default; - Optional encryptedCredential = default; - IDictionary> additionalProperties = default; - Dictionary> additionalPropertiesDictionary = new Dictionary>(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("type"u8)) - { - type = property.Value.GetString(); - continue; - } - if (property.NameEquals("connectVia"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - connectVia = IntegrationRuntimeReference.DeserializeIntegrationRuntimeReference(property.Value); - continue; - } - if (property.NameEquals("description"u8)) - { - description = property.Value.GetString(); - continue; - } - if (property.NameEquals("parameters"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - Dictionary dictionary = new Dictionary(); - foreach (var property0 in property.Value.EnumerateObject()) - { - dictionary.Add(property0.Name, EntityParameterSpecification.DeserializeEntityParameterSpecification(property0.Value)); - } - parameters = dictionary; - continue; - } - if (property.NameEquals("annotations"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - if (item.ValueKind == JsonValueKind.Null) - { - array.Add(null); - } - else - { - array.Add(BinaryData.FromString(item.GetRawText())); - } - } - annotations = array; - continue; - } - if (property.NameEquals("typeProperties"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - foreach (var property0 in property.Value.EnumerateObject()) - { - if (property0.NameEquals("authenticationType"u8)) - { - authenticationType = new TeamDeskAuthenticationType(property0.Value.GetString()); - continue; - } - if (property0.NameEquals("url"u8)) - { - url = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("userName"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - userName = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("password"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - password = JsonSerializer.Deserialize(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("apiToken"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - apiToken = JsonSerializer.Deserialize(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("encryptedCredential"u8)) - { - encryptedCredential = property0.Value.GetString(); - continue; - } - } - continue; - } - additionalPropertiesDictionary.Add(property.Name, JsonSerializer.Deserialize>(property.Value.GetRawText())); - } - additionalProperties = additionalPropertiesDictionary; - return new TeamDeskLinkedService(type, connectVia.Value, description.Value, Optional.ToDictionary(parameters), Optional.ToList(annotations), additionalProperties, authenticationType, url, userName.Value, password, apiToken, encryptedCredential.Value); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/TeamDeskLinkedService.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/TeamDeskLinkedService.cs deleted file mode 100644 index 2aec7db7..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/TeamDeskLinkedService.cs +++ /dev/null @@ -1,63 +0,0 @@ -// - -#nullable disable - -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// Linked service for TeamDesk. - public partial class TeamDeskLinkedService : DataFactoryLinkedServiceProperties - { - /// Initializes a new instance of TeamDeskLinkedService. - /// The authentication type to use. - /// The url to connect TeamDesk source. Type: string (or Expression with resultType string). - /// is null. - public TeamDeskLinkedService(TeamDeskAuthenticationType authenticationType, DataFactoryElement uri) - { - Argument.AssertNotNull(uri, nameof(uri)); - - AuthenticationType = authenticationType; - Uri = uri; - LinkedServiceType = "TeamDesk"; - } - - /// Initializes a new instance of TeamDeskLinkedService. - /// Type of linked service. - /// The integration runtime reference. - /// Linked service description. - /// Parameters for linked service. - /// List of tags that can be used for describing the linked service. - /// Additional Properties. - /// The authentication type to use. - /// The url to connect TeamDesk source. Type: string (or Expression with resultType string). - /// The username of the TeamDesk source. Type: string (or Expression with resultType string). - /// The password of the TeamDesk source. - /// The api token for the TeamDesk source. - /// The encrypted credential used for authentication. Credentials are encrypted using the integration runtime credential manager. Type: string. - internal TeamDeskLinkedService(string linkedServiceType, IntegrationRuntimeReference connectVia, string description, IDictionary parameters, IList annotations, IDictionary> additionalProperties, TeamDeskAuthenticationType authenticationType, DataFactoryElement uri, DataFactoryElement userName, DataFactorySecretBaseDefinition password, DataFactorySecretBaseDefinition apiToken, string encryptedCredential) : base(linkedServiceType, connectVia, description, parameters, annotations, additionalProperties) - { - AuthenticationType = authenticationType; - Uri = uri; - UserName = userName; - Password = password; - ApiToken = apiToken; - EncryptedCredential = encryptedCredential; - LinkedServiceType = linkedServiceType ?? "TeamDesk"; - } - - /// The authentication type to use. - public TeamDeskAuthenticationType AuthenticationType { get; set; } - /// The url to connect TeamDesk source. Type: string (or Expression with resultType string). - public DataFactoryElement Uri { get; set; } - /// The username of the TeamDesk source. Type: string (or Expression with resultType string). - public DataFactoryElement UserName { get; set; } - /// The password of the TeamDesk source. - public DataFactorySecretBaseDefinition Password { get; set; } - /// The api token for the TeamDesk source. - public DataFactorySecretBaseDefinition ApiToken { get; set; } - /// The encrypted credential used for authentication. Credentials are encrypted using the integration runtime credential manager. Type: string. - public string EncryptedCredential { get; set; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/TeradataAuthenticationType.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/TeradataAuthenticationType.cs deleted file mode 100644 index b7c2e3d7..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/TeradataAuthenticationType.cs +++ /dev/null @@ -1,47 +0,0 @@ -// - -#nullable disable - -using System.ComponentModel; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// AuthenticationType to be used for connection. - public readonly partial struct TeradataAuthenticationType : IEquatable - { - private readonly string _value; - - /// Initializes a new instance of . - /// is null. - public TeradataAuthenticationType(string value) - { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } - - private const string BasicValue = "Basic"; - private const string WindowsValue = "Windows"; - - /// Basic. - public static TeradataAuthenticationType Basic { get; } = new TeradataAuthenticationType(BasicValue); - /// Windows. - public static TeradataAuthenticationType Windows { get; } = new TeradataAuthenticationType(WindowsValue); - /// Determines if two values are the same. - public static bool operator ==(TeradataAuthenticationType left, TeradataAuthenticationType right) => left.Equals(right); - /// Determines if two values are not the same. - public static bool operator !=(TeradataAuthenticationType left, TeradataAuthenticationType right) => !left.Equals(right); - /// Converts a string to a . - public static implicit operator TeradataAuthenticationType(string value) => new TeradataAuthenticationType(value); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override bool Equals(object obj) => obj is TeradataAuthenticationType other && Equals(other); - /// - public bool Equals(TeradataAuthenticationType other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override int GetHashCode() => _value?.GetHashCode() ?? 0; - /// - public override string ToString() => _value; - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/TeradataLinkedService.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/TeradataLinkedService.Serialization.cs deleted file mode 100644 index a86d7964..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/TeradataLinkedService.Serialization.cs +++ /dev/null @@ -1,250 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class TeradataLinkedService : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - writer.WritePropertyName("type"u8); - writer.WriteStringValue(LinkedServiceType); - if (Optional.IsDefined(ConnectVia)) - { - writer.WritePropertyName("connectVia"u8); - writer.WriteObjectValue(ConnectVia); - } - if (Optional.IsDefined(Description)) - { - writer.WritePropertyName("description"u8); - writer.WriteStringValue(Description); - } - if (Optional.IsCollectionDefined(Parameters)) - { - writer.WritePropertyName("parameters"u8); - writer.WriteStartObject(); - foreach (var item in Parameters) - { - writer.WritePropertyName(item.Key); - writer.WriteObjectValue(item.Value); - } - writer.WriteEndObject(); - } - if (Optional.IsCollectionDefined(Annotations)) - { - writer.WritePropertyName("annotations"u8); - writer.WriteStartArray(); - foreach (var item in Annotations) - { - if (item == null) - { - writer.WriteNullValue(); - continue; - } -#if NET6_0_OR_GREATER - writer.WriteRawValue(item); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.ToString()).RootElement); -#endif - } - writer.WriteEndArray(); - } - writer.WritePropertyName("typeProperties"u8); - writer.WriteStartObject(); - if (Optional.IsDefined(ConnectionString)) - { - writer.WritePropertyName("connectionString"u8); -#if NET6_0_OR_GREATER - writer.WriteRawValue(ConnectionString); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(ConnectionString.ToString()).RootElement); -#endif - } - if (Optional.IsDefined(Server)) - { - writer.WritePropertyName("server"u8); - JsonSerializer.Serialize(writer, Server); - } - if (Optional.IsDefined(AuthenticationType)) - { - writer.WritePropertyName("authenticationType"u8); - writer.WriteStringValue(AuthenticationType.Value.ToString()); - } - if (Optional.IsDefined(Username)) - { - writer.WritePropertyName("username"u8); - JsonSerializer.Serialize(writer, Username); - } - if (Optional.IsDefined(Password)) - { - writer.WritePropertyName("password"u8); - JsonSerializer.Serialize(writer, Password); - } - if (Optional.IsDefined(EncryptedCredential)) - { - writer.WritePropertyName("encryptedCredential"u8); - writer.WriteStringValue(EncryptedCredential); - } - writer.WriteEndObject(); - foreach (var item in AdditionalProperties) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.Value.ToString()).RootElement); -#endif - } - writer.WriteEndObject(); - } - - internal static TeradataLinkedService DeserializeTeradataLinkedService(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - string type = default; - Optional connectVia = default; - Optional description = default; - Optional> parameters = default; - Optional> annotations = default; - Optional connectionString = default; - Optional> server = default; - Optional authenticationType = default; - Optional> username = default; - Optional password = default; - Optional encryptedCredential = default; - IDictionary> additionalProperties = default; - Dictionary> additionalPropertiesDictionary = new Dictionary>(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("type"u8)) - { - type = property.Value.GetString(); - continue; - } - if (property.NameEquals("connectVia"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - connectVia = IntegrationRuntimeReference.DeserializeIntegrationRuntimeReference(property.Value); - continue; - } - if (property.NameEquals("description"u8)) - { - description = property.Value.GetString(); - continue; - } - if (property.NameEquals("parameters"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - Dictionary dictionary = new Dictionary(); - foreach (var property0 in property.Value.EnumerateObject()) - { - dictionary.Add(property0.Name, EntityParameterSpecification.DeserializeEntityParameterSpecification(property0.Value)); - } - parameters = dictionary; - continue; - } - if (property.NameEquals("annotations"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - if (item.ValueKind == JsonValueKind.Null) - { - array.Add(null); - } - else - { - array.Add(BinaryData.FromString(item.GetRawText())); - } - } - annotations = array; - continue; - } - if (property.NameEquals("typeProperties"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - foreach (var property0 in property.Value.EnumerateObject()) - { - if (property0.NameEquals("connectionString"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - connectionString = BinaryData.FromString(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("server"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - server = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("authenticationType"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - authenticationType = new TeradataAuthenticationType(property0.Value.GetString()); - continue; - } - if (property0.NameEquals("username"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - username = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("password"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - password = JsonSerializer.Deserialize(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("encryptedCredential"u8)) - { - encryptedCredential = property0.Value.GetString(); - continue; - } - } - continue; - } - additionalPropertiesDictionary.Add(property.Name, JsonSerializer.Deserialize>(property.Value.GetRawText())); - } - additionalProperties = additionalPropertiesDictionary; - return new TeradataLinkedService(type, connectVia.Value, description.Value, Optional.ToDictionary(parameters), Optional.ToList(annotations), additionalProperties, connectionString.Value, server.Value, Optional.ToNullable(authenticationType), username.Value, password, encryptedCredential.Value); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/TeradataLinkedService.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/TeradataLinkedService.cs deleted file mode 100644 index b391db22..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/TeradataLinkedService.cs +++ /dev/null @@ -1,84 +0,0 @@ -// - -#nullable disable - -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// Linked service for Teradata data source. - public partial class TeradataLinkedService : DataFactoryLinkedServiceProperties - { - /// Initializes a new instance of TeradataLinkedService. - public TeradataLinkedService() - { - LinkedServiceType = "Teradata"; - } - - /// Initializes a new instance of TeradataLinkedService. - /// Type of linked service. - /// The integration runtime reference. - /// Linked service description. - /// Parameters for linked service. - /// List of tags that can be used for describing the linked service. - /// Additional Properties. - /// Teradata ODBC connection string. Type: string, SecureString or AzureKeyVaultSecretReference. - /// Server name for connection. Type: string (or Expression with resultType string). - /// AuthenticationType to be used for connection. - /// Username for authentication. Type: string (or Expression with resultType string). - /// Password for authentication. - /// The encrypted credential used for authentication. Credentials are encrypted using the integration runtime credential manager. Type: string. - internal TeradataLinkedService(string linkedServiceType, IntegrationRuntimeReference connectVia, string description, IDictionary parameters, IList annotations, IDictionary> additionalProperties, BinaryData connectionString, DataFactoryElement server, TeradataAuthenticationType? authenticationType, DataFactoryElement username, DataFactorySecretBaseDefinition password, string encryptedCredential) : base(linkedServiceType, connectVia, description, parameters, annotations, additionalProperties) - { - ConnectionString = connectionString; - Server = server; - AuthenticationType = authenticationType; - Username = username; - Password = password; - EncryptedCredential = encryptedCredential; - LinkedServiceType = linkedServiceType ?? "Teradata"; - } - - /// - /// Teradata ODBC connection string. Type: string, SecureString or AzureKeyVaultSecretReference. - /// - /// To assign an object to this property use . - /// - /// - /// To assign an already formated json string to this property use . - /// - /// - /// Examples: - /// - /// - /// BinaryData.FromObjectAsJson("foo") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromString("\"foo\"") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromObjectAsJson(new { key = "value" }) - /// Creates a payload of { "key": "value" }. - /// - /// - /// BinaryData.FromString("{\"key\": \"value\"}") - /// Creates a payload of { "key": "value" }. - /// - /// - /// - /// - public BinaryData ConnectionString { get; set; } - /// Server name for connection. Type: string (or Expression with resultType string). - public DataFactoryElement Server { get; set; } - /// AuthenticationType to be used for connection. - public TeradataAuthenticationType? AuthenticationType { get; set; } - /// Username for authentication. Type: string (or Expression with resultType string). - public DataFactoryElement Username { get; set; } - /// Password for authentication. - public DataFactorySecretBaseDefinition Password { get; set; } - /// The encrypted credential used for authentication. Credentials are encrypted using the integration runtime credential manager. Type: string. - public string EncryptedCredential { get; set; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/TeradataPartitionSettings.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/TeradataPartitionSettings.Serialization.cs deleted file mode 100644 index 5cfa6f60..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/TeradataPartitionSettings.Serialization.cs +++ /dev/null @@ -1,76 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class TeradataPartitionSettings : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - if (Optional.IsDefined(PartitionColumnName)) - { - writer.WritePropertyName("partitionColumnName"u8); - JsonSerializer.Serialize(writer, PartitionColumnName); - } - if (Optional.IsDefined(PartitionUpperBound)) - { - writer.WritePropertyName("partitionUpperBound"u8); - JsonSerializer.Serialize(writer, PartitionUpperBound); - } - if (Optional.IsDefined(PartitionLowerBound)) - { - writer.WritePropertyName("partitionLowerBound"u8); - JsonSerializer.Serialize(writer, PartitionLowerBound); - } - writer.WriteEndObject(); - } - - internal static TeradataPartitionSettings DeserializeTeradataPartitionSettings(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - Optional> partitionColumnName = default; - Optional> partitionUpperBound = default; - Optional> partitionLowerBound = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("partitionColumnName"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - partitionColumnName = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("partitionUpperBound"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - partitionUpperBound = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("partitionLowerBound"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - partitionLowerBound = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - } - return new TeradataPartitionSettings(partitionColumnName.Value, partitionUpperBound.Value, partitionLowerBound.Value); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/TeradataPartitionSettings.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/TeradataPartitionSettings.cs deleted file mode 100644 index fbac6ad0..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/TeradataPartitionSettings.cs +++ /dev/null @@ -1,35 +0,0 @@ -// - -#nullable disable - -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// The settings that will be leveraged for teradata source partitioning. - public partial class TeradataPartitionSettings - { - /// Initializes a new instance of TeradataPartitionSettings. - public TeradataPartitionSettings() - { - } - - /// Initializes a new instance of TeradataPartitionSettings. - /// The name of the column that will be used for proceeding range or hash partitioning. Type: string (or Expression with resultType string). - /// The maximum value of column specified in partitionColumnName that will be used for proceeding range partitioning. Type: string (or Expression with resultType string). - /// The minimum value of column specified in partitionColumnName that will be used for proceeding range partitioning. Type: string (or Expression with resultType string). - internal TeradataPartitionSettings(DataFactoryElement partitionColumnName, DataFactoryElement partitionUpperBound, DataFactoryElement partitionLowerBound) - { - PartitionColumnName = partitionColumnName; - PartitionUpperBound = partitionUpperBound; - PartitionLowerBound = partitionLowerBound; - } - - /// The name of the column that will be used for proceeding range or hash partitioning. Type: string (or Expression with resultType string). - public DataFactoryElement PartitionColumnName { get; set; } - /// The maximum value of column specified in partitionColumnName that will be used for proceeding range partitioning. Type: string (or Expression with resultType string). - public DataFactoryElement PartitionUpperBound { get; set; } - /// The minimum value of column specified in partitionColumnName that will be used for proceeding range partitioning. Type: string (or Expression with resultType string). - public DataFactoryElement PartitionLowerBound { get; set; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/TeradataSource.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/TeradataSource.Serialization.cs deleted file mode 100644 index e280415a..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/TeradataSource.Serialization.cs +++ /dev/null @@ -1,195 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class TeradataSource : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - if (Optional.IsDefined(Query)) - { - writer.WritePropertyName("query"u8); - JsonSerializer.Serialize(writer, Query); - } - if (Optional.IsDefined(PartitionOption)) - { - writer.WritePropertyName("partitionOption"u8); -#if NET6_0_OR_GREATER - writer.WriteRawValue(PartitionOption); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(PartitionOption.ToString()).RootElement); -#endif - } - if (Optional.IsDefined(PartitionSettings)) - { - writer.WritePropertyName("partitionSettings"u8); - writer.WriteObjectValue(PartitionSettings); - } - if (Optional.IsDefined(QueryTimeout)) - { - writer.WritePropertyName("queryTimeout"u8); - JsonSerializer.Serialize(writer, QueryTimeout); - } - if (Optional.IsDefined(AdditionalColumns)) - { - writer.WritePropertyName("additionalColumns"u8); -#if NET6_0_OR_GREATER - writer.WriteRawValue(AdditionalColumns); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(AdditionalColumns.ToString()).RootElement); -#endif - } - writer.WritePropertyName("type"u8); - writer.WriteStringValue(CopySourceType); - if (Optional.IsDefined(SourceRetryCount)) - { - writer.WritePropertyName("sourceRetryCount"u8); - JsonSerializer.Serialize(writer, SourceRetryCount); - } - if (Optional.IsDefined(SourceRetryWait)) - { - writer.WritePropertyName("sourceRetryWait"u8); - JsonSerializer.Serialize(writer, SourceRetryWait); - } - if (Optional.IsDefined(MaxConcurrentConnections)) - { - writer.WritePropertyName("maxConcurrentConnections"u8); - JsonSerializer.Serialize(writer, MaxConcurrentConnections); - } - if (Optional.IsDefined(DisableMetricsCollection)) - { - writer.WritePropertyName("disableMetricsCollection"u8); - JsonSerializer.Serialize(writer, DisableMetricsCollection); - } - foreach (var item in AdditionalProperties) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.Value.ToString()).RootElement); -#endif - } - writer.WriteEndObject(); - } - - internal static TeradataSource DeserializeTeradataSource(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - Optional> query = default; - Optional partitionOption = default; - Optional partitionSettings = default; - Optional> queryTimeout = default; - Optional additionalColumns = default; - string type = default; - Optional> sourceRetryCount = default; - Optional> sourceRetryWait = default; - Optional> maxConcurrentConnections = default; - Optional> disableMetricsCollection = default; - IDictionary> additionalProperties = default; - Dictionary> additionalPropertiesDictionary = new Dictionary>(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("query"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - query = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("partitionOption"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - partitionOption = BinaryData.FromString(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("partitionSettings"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - partitionSettings = TeradataPartitionSettings.DeserializeTeradataPartitionSettings(property.Value); - continue; - } - if (property.NameEquals("queryTimeout"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - queryTimeout = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("additionalColumns"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - additionalColumns = BinaryData.FromString(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("type"u8)) - { - type = property.Value.GetString(); - continue; - } - if (property.NameEquals("sourceRetryCount"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - sourceRetryCount = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("sourceRetryWait"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - sourceRetryWait = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("maxConcurrentConnections"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - maxConcurrentConnections = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("disableMetricsCollection"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - disableMetricsCollection = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - additionalPropertiesDictionary.Add(property.Name, JsonSerializer.Deserialize>(property.Value.GetRawText())); - } - additionalProperties = additionalPropertiesDictionary; - return new TeradataSource(type, sourceRetryCount.Value, sourceRetryWait.Value, maxConcurrentConnections.Value, disableMetricsCollection.Value, additionalProperties, queryTimeout.Value, additionalColumns.Value, query.Value, partitionOption.Value, partitionSettings.Value); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/TeradataSource.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/TeradataSource.cs deleted file mode 100644 index e7820a69..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/TeradataSource.cs +++ /dev/null @@ -1,74 +0,0 @@ -// - -#nullable disable - -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// A copy activity Teradata source. - public partial class TeradataSource : TabularSource - { - /// Initializes a new instance of TeradataSource. - public TeradataSource() - { - CopySourceType = "TeradataSource"; - } - - /// Initializes a new instance of TeradataSource. - /// Copy source type. - /// Source retry count. Type: integer (or Expression with resultType integer). - /// Source retry wait. Type: string (or Expression with resultType string), pattern: ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). - /// The maximum concurrent connection count for the source data store. Type: integer (or Expression with resultType integer). - /// If true, disable data store metrics collection. Default is false. Type: boolean (or Expression with resultType boolean). - /// Additional Properties. - /// 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). - /// Teradata query. Type: string (or Expression with resultType string). - /// The partition mechanism that will be used for teradata read in parallel. Possible values include: "None", "Hash", "DynamicRange". - /// The settings that will be leveraged for teradata source partitioning. - internal TeradataSource(string copySourceType, DataFactoryElement sourceRetryCount, DataFactoryElement sourceRetryWait, DataFactoryElement maxConcurrentConnections, DataFactoryElement disableMetricsCollection, IDictionary> additionalProperties, DataFactoryElement queryTimeout, BinaryData additionalColumns, DataFactoryElement query, BinaryData partitionOption, TeradataPartitionSettings partitionSettings) : base(copySourceType, sourceRetryCount, sourceRetryWait, maxConcurrentConnections, disableMetricsCollection, additionalProperties, queryTimeout, additionalColumns) - { - Query = query; - PartitionOption = partitionOption; - PartitionSettings = partitionSettings; - CopySourceType = copySourceType ?? "TeradataSource"; - } - - /// Teradata query. Type: string (or Expression with resultType string). - public DataFactoryElement Query { get; set; } - /// - /// The partition mechanism that will be used for teradata read in parallel. Possible values include: "None", "Hash", "DynamicRange". - /// - /// To assign an object to this property use . - /// - /// - /// To assign an already formated json string to this property use . - /// - /// - /// Examples: - /// - /// - /// BinaryData.FromObjectAsJson("foo") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromString("\"foo\"") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromObjectAsJson(new { key = "value" }) - /// Creates a payload of { "key": "value" }. - /// - /// - /// BinaryData.FromString("{\"key\": \"value\"}") - /// Creates a payload of { "key": "value" }. - /// - /// - /// - /// - public BinaryData PartitionOption { get; set; } - /// The settings that will be leveraged for teradata source partitioning. - public TeradataPartitionSettings PartitionSettings { get; set; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/TeradataTableDataset.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/TeradataTableDataset.Serialization.cs deleted file mode 100644 index cd9d3f1f..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/TeradataTableDataset.Serialization.cs +++ /dev/null @@ -1,227 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class TeradataTableDataset : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - writer.WritePropertyName("type"u8); - writer.WriteStringValue(DatasetType); - if (Optional.IsDefined(Description)) - { - writer.WritePropertyName("description"u8); - writer.WriteStringValue(Description); - } - if (Optional.IsDefined(Structure)) - { - writer.WritePropertyName("structure"u8); - JsonSerializer.Serialize(writer, Structure); - } - if (Optional.IsDefined(Schema)) - { - writer.WritePropertyName("schema"u8); - JsonSerializer.Serialize(writer, Schema); - } - writer.WritePropertyName("linkedServiceName"u8); - JsonSerializer.Serialize(writer, LinkedServiceName); if (Optional.IsCollectionDefined(Parameters)) - { - writer.WritePropertyName("parameters"u8); - writer.WriteStartObject(); - foreach (var item in Parameters) - { - writer.WritePropertyName(item.Key); - writer.WriteObjectValue(item.Value); - } - writer.WriteEndObject(); - } - if (Optional.IsCollectionDefined(Annotations)) - { - writer.WritePropertyName("annotations"u8); - writer.WriteStartArray(); - foreach (var item in Annotations) - { - if (item == null) - { - writer.WriteNullValue(); - continue; - } -#if NET6_0_OR_GREATER - writer.WriteRawValue(item); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.ToString()).RootElement); -#endif - } - writer.WriteEndArray(); - } - if (Optional.IsDefined(Folder)) - { - writer.WritePropertyName("folder"u8); - writer.WriteObjectValue(Folder); - } - writer.WritePropertyName("typeProperties"u8); - writer.WriteStartObject(); - if (Optional.IsDefined(Database)) - { - writer.WritePropertyName("database"u8); - JsonSerializer.Serialize(writer, Database); - } - if (Optional.IsDefined(Table)) - { - writer.WritePropertyName("table"u8); - JsonSerializer.Serialize(writer, Table); - } - writer.WriteEndObject(); - foreach (var item in AdditionalProperties) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.Value.ToString()).RootElement); -#endif - } - writer.WriteEndObject(); - } - - internal static TeradataTableDataset DeserializeTeradataTableDataset(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - string type = default; - Optional description = default; - Optional>> structure = default; - Optional>> schema = default; - DataFactoryLinkedServiceReference linkedServiceName = default; - Optional> parameters = default; - Optional> annotations = default; - Optional folder = default; - Optional> database = default; - Optional> table = default; - IDictionary> additionalProperties = default; - Dictionary> additionalPropertiesDictionary = new Dictionary>(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("type"u8)) - { - type = property.Value.GetString(); - continue; - } - if (property.NameEquals("description"u8)) - { - description = property.Value.GetString(); - continue; - } - if (property.NameEquals("structure"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - structure = JsonSerializer.Deserialize>>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("schema"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - schema = JsonSerializer.Deserialize>>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("linkedServiceName"u8)) - { - linkedServiceName = JsonSerializer.Deserialize(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("parameters"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - Dictionary dictionary = new Dictionary(); - foreach (var property0 in property.Value.EnumerateObject()) - { - dictionary.Add(property0.Name, EntityParameterSpecification.DeserializeEntityParameterSpecification(property0.Value)); - } - parameters = dictionary; - continue; - } - if (property.NameEquals("annotations"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - if (item.ValueKind == JsonValueKind.Null) - { - array.Add(null); - } - else - { - array.Add(BinaryData.FromString(item.GetRawText())); - } - } - annotations = array; - continue; - } - if (property.NameEquals("folder"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - folder = DatasetFolder.DeserializeDatasetFolder(property.Value); - continue; - } - if (property.NameEquals("typeProperties"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - foreach (var property0 in property.Value.EnumerateObject()) - { - if (property0.NameEquals("database"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - database = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("table"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - table = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - } - continue; - } - additionalPropertiesDictionary.Add(property.Name, JsonSerializer.Deserialize>(property.Value.GetRawText())); - } - additionalProperties = additionalPropertiesDictionary; - return new TeradataTableDataset(type, description.Value, structure.Value, schema.Value, linkedServiceName, Optional.ToDictionary(parameters), Optional.ToList(annotations), folder.Value, additionalProperties, database.Value, table.Value); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/TeradataTableDataset.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/TeradataTableDataset.cs deleted file mode 100644 index d0bf19ce..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/TeradataTableDataset.cs +++ /dev/null @@ -1,47 +0,0 @@ -// - -#nullable disable - -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// The Teradata database dataset. - public partial class TeradataTableDataset : DataFactoryDatasetProperties - { - /// Initializes a new instance of TeradataTableDataset. - /// Linked service reference. - /// is null. - public TeradataTableDataset(DataFactoryLinkedServiceReference linkedServiceName) : base(linkedServiceName) - { - Argument.AssertNotNull(linkedServiceName, nameof(linkedServiceName)); - - DatasetType = "TeradataTable"; - } - - /// Initializes a new instance of TeradataTableDataset. - /// Type of dataset. - /// Dataset description. - /// Columns that define the structure of the dataset. Type: array (or Expression with resultType array), itemType: DatasetDataElement. - /// Columns that define the physical type schema of the dataset. Type: array (or Expression with resultType array), itemType: DatasetSchemaDataElement. - /// Linked service reference. - /// Parameters for dataset. - /// List of tags that can be used for describing the Dataset. - /// The folder that this Dataset is in. If not specified, Dataset will appear at the root level. - /// Additional Properties. - /// The database name of Teradata. Type: string (or Expression with resultType string). - /// The table name of Teradata. Type: string (or Expression with resultType string). - internal TeradataTableDataset(string datasetType, string description, DataFactoryElement> structure, DataFactoryElement> schema, DataFactoryLinkedServiceReference linkedServiceName, IDictionary parameters, IList annotations, DatasetFolder folder, IDictionary> additionalProperties, DataFactoryElement database, DataFactoryElement table) : base(datasetType, description, structure, schema, linkedServiceName, parameters, annotations, folder, additionalProperties) - { - Database = database; - Table = table; - DatasetType = datasetType ?? "TeradataTable"; - } - - /// The database name of Teradata. Type: string (or Expression with resultType string). - public DataFactoryElement Database { get; set; } - /// The table name of Teradata. Type: string (or Expression with resultType string). - public DataFactoryElement Table { get; set; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/TriggerDependencyReference.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/TriggerDependencyReference.Serialization.cs deleted file mode 100644 index b0fbc8c8..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/TriggerDependencyReference.Serialization.cs +++ /dev/null @@ -1,53 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class TriggerDependencyReference : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - writer.WritePropertyName("referenceTrigger"u8); - writer.WriteObjectValue(ReferenceTrigger); - writer.WritePropertyName("type"u8); - writer.WriteStringValue(DependencyReferenceType); - writer.WriteEndObject(); - } - - internal static TriggerDependencyReference DeserializeTriggerDependencyReference(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - if (element.TryGetProperty("type", out JsonElement discriminator)) - { - switch (discriminator.GetString()) - { - case "TumblingWindowTriggerDependencyReference": return TumblingWindowTriggerDependencyReference.DeserializeTumblingWindowTriggerDependencyReference(element); - } - } - DataFactoryTriggerReference referenceTrigger = default; - string type = "TriggerDependencyReference"; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("referenceTrigger"u8)) - { - referenceTrigger = DataFactoryTriggerReference.DeserializeDataFactoryTriggerReference(property.Value); - continue; - } - if (property.NameEquals("type"u8)) - { - type = property.Value.GetString(); - continue; - } - } - return new TriggerDependencyReference(type, referenceTrigger); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/TriggerDependencyReference.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/TriggerDependencyReference.cs deleted file mode 100644 index 016975c6..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/TriggerDependencyReference.cs +++ /dev/null @@ -1,39 +0,0 @@ -// - -#nullable disable - -using Azure.Core; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// - /// Trigger referenced dependency. - /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. - /// The available derived classes include . - /// - public partial class TriggerDependencyReference : DependencyReference - { - /// Initializes a new instance of TriggerDependencyReference. - /// Referenced trigger. - /// is null. - public TriggerDependencyReference(DataFactoryTriggerReference referenceTrigger) - { - Argument.AssertNotNull(referenceTrigger, nameof(referenceTrigger)); - - ReferenceTrigger = referenceTrigger; - DependencyReferenceType = "TriggerDependencyReference"; - } - - /// Initializes a new instance of TriggerDependencyReference. - /// The type of dependency reference. - /// Referenced trigger. - internal TriggerDependencyReference(string dependencyReferenceType, DataFactoryTriggerReference referenceTrigger) : base(dependencyReferenceType) - { - ReferenceTrigger = referenceTrigger; - DependencyReferenceType = dependencyReferenceType ?? "TriggerDependencyReference"; - } - - /// Referenced trigger. - public DataFactoryTriggerReference ReferenceTrigger { get; set; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/TriggerFilterContent.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/TriggerFilterContent.Serialization.cs deleted file mode 100644 index d1dfcf17..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/TriggerFilterContent.Serialization.cs +++ /dev/null @@ -1,28 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class TriggerFilterContent : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - if (Optional.IsDefined(ContinuationToken)) - { - writer.WritePropertyName("continuationToken"u8); - writer.WriteStringValue(ContinuationToken); - } - if (Optional.IsDefined(ParentTriggerName)) - { - writer.WritePropertyName("parentTriggerName"u8); - writer.WriteStringValue(ParentTriggerName); - } - writer.WriteEndObject(); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/TriggerFilterContent.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/TriggerFilterContent.cs deleted file mode 100644 index ea212151..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/TriggerFilterContent.cs +++ /dev/null @@ -1,20 +0,0 @@ -// - -#nullable disable - -namespace AzureDataFactory.TestingFramework.Models -{ - /// Query parameters for triggers. - public partial class TriggerFilterContent - { - /// Initializes a new instance of TriggerFilterContent. - public TriggerFilterContent() - { - } - - /// The continuation token for getting the next page of results. Null for first page. - public string ContinuationToken { get; set; } - /// The name of the parent TumblingWindowTrigger to get the child rerun triggers. - public string ParentTriggerName { get; set; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/TriggerPipelineReference.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/TriggerPipelineReference.Serialization.cs deleted file mode 100644 index 019791d4..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/TriggerPipelineReference.Serialization.cs +++ /dev/null @@ -1,88 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class TriggerPipelineReference : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - if (Optional.IsDefined(PipelineReference)) - { - writer.WritePropertyName("pipelineReference"u8); - writer.WriteObjectValue(PipelineReference); - } - if (Optional.IsCollectionDefined(Parameters)) - { - writer.WritePropertyName("parameters"u8); - writer.WriteStartObject(); - foreach (var item in Parameters) - { - writer.WritePropertyName(item.Key); - if (item.Value == null) - { - writer.WriteNullValue(); - continue; - } -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.Value.ToString()).RootElement); -#endif - } - writer.WriteEndObject(); - } - writer.WriteEndObject(); - } - - internal static TriggerPipelineReference DeserializeTriggerPipelineReference(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - Optional pipelineReference = default; - Optional>> parameters = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("pipelineReference"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - pipelineReference = DataFactoryPipelineReference.DeserializeDataFactoryPipelineReference(property.Value); - continue; - } - if (property.NameEquals("parameters"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - Dictionary> dictionary = new Dictionary>(); - foreach (var property0 in property.Value.EnumerateObject()) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - dictionary.Add(property0.Name, null); - } - else - { - dictionary.Add(property0.Name, JsonSerializer.Deserialize>(property0.Value.GetRawText())); - } - } - parameters = dictionary; - continue; - } - } - return new TriggerPipelineReference(pipelineReference.Value, Optional.ToDictionary(parameters)); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/TriggerPipelineReference.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/TriggerPipelineReference.cs deleted file mode 100644 index b15d8299..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/TriggerPipelineReference.cs +++ /dev/null @@ -1,62 +0,0 @@ -// - -#nullable disable - -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// Pipeline that needs to be triggered with the given parameters. - public partial class TriggerPipelineReference - { - /// Initializes a new instance of TriggerPipelineReference. - public TriggerPipelineReference() - { - Parameters = new ChangeTrackingDictionary>(); - } - - /// Initializes a new instance of TriggerPipelineReference. - /// Pipeline reference. - /// Pipeline parameters. - internal TriggerPipelineReference(DataFactoryPipelineReference pipelineReference, IDictionary> parameters) - { - PipelineReference = pipelineReference; - Parameters = parameters; - } - - /// Pipeline reference. - public DataFactoryPipelineReference PipelineReference { get; set; } - /// - /// Pipeline parameters. - /// - /// To assign an object to the value of this property use . - /// - /// - /// To assign an already formated json string to this property use . - /// - /// - /// Examples: - /// - /// - /// BinaryData.FromObjectAsJson("foo") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromString("\"foo\"") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromObjectAsJson(new { key = "value" }) - /// Creates a payload of { "key": "value" }. - /// - /// - /// BinaryData.FromString("{\"key\": \"value\"}") - /// Creates a payload of { "key": "value" }. - /// - /// - /// - /// - public IDictionary> Parameters { get; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/TumblingWindowFrequency.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/TumblingWindowFrequency.cs deleted file mode 100644 index 64f05562..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/TumblingWindowFrequency.cs +++ /dev/null @@ -1,50 +0,0 @@ -// - -#nullable disable - -using System.ComponentModel; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// Enumerates possible frequency option for the tumbling window trigger. - public readonly partial struct TumblingWindowFrequency : IEquatable - { - private readonly string _value; - - /// Initializes a new instance of . - /// is null. - public TumblingWindowFrequency(string value) - { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } - - private const string MinuteValue = "Minute"; - private const string HourValue = "Hour"; - private const string MonthValue = "Month"; - - /// Minute. - public static TumblingWindowFrequency Minute { get; } = new TumblingWindowFrequency(MinuteValue); - /// Hour. - public static TumblingWindowFrequency Hour { get; } = new TumblingWindowFrequency(HourValue); - /// Month. - public static TumblingWindowFrequency Month { get; } = new TumblingWindowFrequency(MonthValue); - /// Determines if two values are the same. - public static bool operator ==(TumblingWindowFrequency left, TumblingWindowFrequency right) => left.Equals(right); - /// Determines if two values are not the same. - public static bool operator !=(TumblingWindowFrequency left, TumblingWindowFrequency right) => !left.Equals(right); - /// Converts a string to a . - public static implicit operator TumblingWindowFrequency(string value) => new TumblingWindowFrequency(value); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override bool Equals(object obj) => obj is TumblingWindowFrequency other && Equals(other); - /// - public bool Equals(TumblingWindowFrequency other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override int GetHashCode() => _value?.GetHashCode() ?? 0; - /// - public override string ToString() => _value; - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/TumblingWindowTrigger.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/TumblingWindowTrigger.Serialization.cs deleted file mode 100644 index 610130d2..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/TumblingWindowTrigger.Serialization.cs +++ /dev/null @@ -1,239 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class TumblingWindowTrigger : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - writer.WritePropertyName("pipeline"u8); - writer.WriteObjectValue(Pipeline); - writer.WritePropertyName("type"u8); - writer.WriteStringValue(TriggerType); - if (Optional.IsDefined(Description)) - { - writer.WritePropertyName("description"u8); - writer.WriteStringValue(Description); - } - if (Optional.IsCollectionDefined(Annotations)) - { - writer.WritePropertyName("annotations"u8); - writer.WriteStartArray(); - foreach (var item in Annotations) - { - if (item == null) - { - writer.WriteNullValue(); - continue; - } -#if NET6_0_OR_GREATER - writer.WriteRawValue(item); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.ToString()).RootElement); -#endif - } - writer.WriteEndArray(); - } - writer.WritePropertyName("typeProperties"u8); - writer.WriteStartObject(); - writer.WritePropertyName("frequency"u8); - writer.WriteStringValue(Frequency.ToString()); - writer.WritePropertyName("interval"u8); - writer.WriteNumberValue(Interval); - writer.WritePropertyName("startTime"u8); - writer.WriteStringValue(StartOn, "O"); - if (Optional.IsDefined(EndOn)) - { - writer.WritePropertyName("endTime"u8); - writer.WriteStringValue(EndOn.Value, "O"); - } - if (Optional.IsDefined(Delay)) - { - writer.WritePropertyName("delay"u8); - JsonSerializer.Serialize(writer, Delay); - } - writer.WritePropertyName("maxConcurrency"u8); - writer.WriteNumberValue(MaxConcurrency); - if (Optional.IsDefined(RetryPolicy)) - { - writer.WritePropertyName("retryPolicy"u8); - writer.WriteObjectValue(RetryPolicy); - } - if (Optional.IsCollectionDefined(DependsOn)) - { - writer.WritePropertyName("dependsOn"u8); - writer.WriteStartArray(); - foreach (var item in DependsOn) - { - writer.WriteObjectValue(item); - } - writer.WriteEndArray(); - } - writer.WriteEndObject(); - foreach (var item in AdditionalProperties) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.Value.ToString()).RootElement); -#endif - } - writer.WriteEndObject(); - } - - internal static TumblingWindowTrigger DeserializeTumblingWindowTrigger(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - TriggerPipelineReference pipeline = default; - string type = default; - Optional description = default; - Optional runtimeState = default; - Optional> annotations = default; - TumblingWindowFrequency frequency = default; - int interval = default; - DateTimeOffset startTime = default; - Optional endTime = default; - Optional> delay = default; - int maxConcurrency = default; - Optional retryPolicy = default; - Optional> dependsOn = default; - IDictionary> additionalProperties = default; - Dictionary> additionalPropertiesDictionary = new Dictionary>(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("pipeline"u8)) - { - pipeline = TriggerPipelineReference.DeserializeTriggerPipelineReference(property.Value); - continue; - } - if (property.NameEquals("type"u8)) - { - type = property.Value.GetString(); - continue; - } - if (property.NameEquals("description"u8)) - { - description = property.Value.GetString(); - continue; - } - if (property.NameEquals("runtimeState"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - runtimeState = new DataFactoryTriggerRuntimeState(property.Value.GetString()); - continue; - } - if (property.NameEquals("annotations"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - if (item.ValueKind == JsonValueKind.Null) - { - array.Add(null); - } - else - { - array.Add(BinaryData.FromString(item.GetRawText())); - } - } - annotations = array; - continue; - } - if (property.NameEquals("typeProperties"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - foreach (var property0 in property.Value.EnumerateObject()) - { - if (property0.NameEquals("frequency"u8)) - { - frequency = new TumblingWindowFrequency(property0.Value.GetString()); - continue; - } - if (property0.NameEquals("interval"u8)) - { - interval = property0.Value.GetInt32(); - continue; - } - if (property0.NameEquals("startTime"u8)) - { - startTime = property0.Value.GetDateTimeOffset("O"); - continue; - } - if (property0.NameEquals("endTime"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - endTime = property0.Value.GetDateTimeOffset("O"); - continue; - } - if (property0.NameEquals("delay"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - delay = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("maxConcurrency"u8)) - { - maxConcurrency = property0.Value.GetInt32(); - continue; - } - if (property0.NameEquals("retryPolicy"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - retryPolicy = RetryPolicy.DeserializeRetryPolicy(property0.Value); - continue; - } - if (property0.NameEquals("dependsOn"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property0.Value.EnumerateArray()) - { - array.Add(DependencyReference.DeserializeDependencyReference(item)); - } - dependsOn = array; - continue; - } - } - continue; - } - additionalPropertiesDictionary.Add(property.Name, JsonSerializer.Deserialize>(property.Value.GetRawText())); - } - additionalProperties = additionalPropertiesDictionary; - return new TumblingWindowTrigger(type, description.Value, Optional.ToNullable(runtimeState), Optional.ToList(annotations), additionalProperties, pipeline, frequency, interval, startTime, Optional.ToNullable(endTime), delay.Value, maxConcurrency, retryPolicy.Value, Optional.ToList(dependsOn)); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/TumblingWindowTrigger.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/TumblingWindowTrigger.cs deleted file mode 100644 index aa5ac57e..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/TumblingWindowTrigger.cs +++ /dev/null @@ -1,89 +0,0 @@ -// - -#nullable disable - -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// Trigger that schedules pipeline runs for all fixed time interval windows from a start time without gaps and also supports backfill scenarios (when start time is in the past). - public partial class TumblingWindowTrigger : DataFactoryTriggerProperties - { - /// Initializes a new instance of TumblingWindowTrigger. - /// Pipeline for which runs are created when an event is fired for trigger window that is ready. - /// The frequency of the time windows. - /// The interval of the time windows. The minimum interval allowed is 15 Minutes. - /// The start time for the time period for the trigger during which events are fired for windows that are ready. Only UTC time is currently supported. - /// The max number of parallel time windows (ready for execution) for which a new run is triggered. - /// is null. - public TumblingWindowTrigger(TriggerPipelineReference pipeline, TumblingWindowFrequency frequency, int interval, DateTimeOffset startOn, int maxConcurrency) - { - Argument.AssertNotNull(pipeline, nameof(pipeline)); - - Pipeline = pipeline; - Frequency = frequency; - Interval = interval; - StartOn = startOn; - MaxConcurrency = maxConcurrency; - DependsOn = new ChangeTrackingList(); - TriggerType = "TumblingWindowTrigger"; - } - - /// Initializes a new instance of TumblingWindowTrigger. - /// Trigger type. - /// Trigger description. - /// Indicates if trigger is running or not. Updated when Start/Stop APIs are called on the Trigger. - /// List of tags that can be used for describing the trigger. - /// Additional Properties. - /// Pipeline for which runs are created when an event is fired for trigger window that is ready. - /// The frequency of the time windows. - /// The interval of the time windows. The minimum interval allowed is 15 Minutes. - /// The start time for the time period for the trigger during which events are fired for windows that are ready. Only UTC time is currently supported. - /// The end time for the time period for the trigger during which events are fired for windows that are ready. Only UTC time is currently supported. - /// Specifies how long the trigger waits past due time before triggering new run. It doesn't alter window start and end time. The default is 0. Type: string (or Expression with resultType string), pattern: ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). - /// The max number of parallel time windows (ready for execution) for which a new run is triggered. - /// Retry policy that will be applied for failed pipeline runs. - /// - /// Triggers that this trigger depends on. Only tumbling window triggers are supported. - /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. - /// The available derived classes include , and . - /// - internal TumblingWindowTrigger(string triggerType, string description, DataFactoryTriggerRuntimeState? runtimeState, IList annotations, IDictionary> additionalProperties, TriggerPipelineReference pipeline, TumblingWindowFrequency frequency, int interval, DateTimeOffset startOn, DateTimeOffset? endOn, DataFactoryElement delay, int maxConcurrency, RetryPolicy retryPolicy, IList dependsOn) : base(triggerType, description, runtimeState, annotations, additionalProperties) - { - Pipeline = pipeline; - Frequency = frequency; - Interval = interval; - StartOn = startOn; - EndOn = endOn; - Delay = delay; - MaxConcurrency = maxConcurrency; - RetryPolicy = retryPolicy; - DependsOn = dependsOn; - TriggerType = triggerType ?? "TumblingWindowTrigger"; - } - - /// Pipeline for which runs are created when an event is fired for trigger window that is ready. - public TriggerPipelineReference Pipeline { get; set; } - /// The frequency of the time windows. - public TumblingWindowFrequency Frequency { get; set; } - /// The interval of the time windows. The minimum interval allowed is 15 Minutes. - public int Interval { get; set; } - /// The start time for the time period for the trigger during which events are fired for windows that are ready. Only UTC time is currently supported. - public DateTimeOffset StartOn { get; set; } - /// The end time for the time period for the trigger during which events are fired for windows that are ready. Only UTC time is currently supported. - public DateTimeOffset? EndOn { get; set; } - /// Specifies how long the trigger waits past due time before triggering new run. It doesn't alter window start and end time. The default is 0. Type: string (or Expression with resultType string), pattern: ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). - public DataFactoryElement Delay { get; set; } - /// The max number of parallel time windows (ready for execution) for which a new run is triggered. - public int MaxConcurrency { get; set; } - /// Retry policy that will be applied for failed pipeline runs. - public RetryPolicy RetryPolicy { get; set; } - /// - /// Triggers that this trigger depends on. Only tumbling window triggers are supported. - /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. - /// The available derived classes include , and . - /// - public IList DependsOn { get; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/TumblingWindowTriggerDependencyReference.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/TumblingWindowTriggerDependencyReference.Serialization.cs deleted file mode 100644 index 8015ca35..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/TumblingWindowTriggerDependencyReference.Serialization.cs +++ /dev/null @@ -1,68 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class TumblingWindowTriggerDependencyReference : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - if (Optional.IsDefined(Offset)) - { - writer.WritePropertyName("offset"u8); - writer.WriteStringValue(Offset); - } - if (Optional.IsDefined(Size)) - { - writer.WritePropertyName("size"u8); - writer.WriteStringValue(Size); - } - writer.WritePropertyName("referenceTrigger"u8); - writer.WriteObjectValue(ReferenceTrigger); - writer.WritePropertyName("type"u8); - writer.WriteStringValue(DependencyReferenceType); - writer.WriteEndObject(); - } - - internal static TumblingWindowTriggerDependencyReference DeserializeTumblingWindowTriggerDependencyReference(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - Optional offset = default; - Optional size = default; - DataFactoryTriggerReference referenceTrigger = default; - string type = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("offset"u8)) - { - offset = property.Value.GetString(); - continue; - } - if (property.NameEquals("size"u8)) - { - size = property.Value.GetString(); - continue; - } - if (property.NameEquals("referenceTrigger"u8)) - { - referenceTrigger = DataFactoryTriggerReference.DeserializeDataFactoryTriggerReference(property.Value); - continue; - } - if (property.NameEquals("type"u8)) - { - type = property.Value.GetString(); - continue; - } - } - return new TumblingWindowTriggerDependencyReference(type, referenceTrigger, offset.Value, size.Value); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/TumblingWindowTriggerDependencyReference.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/TumblingWindowTriggerDependencyReference.cs deleted file mode 100644 index c0f9297e..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/TumblingWindowTriggerDependencyReference.cs +++ /dev/null @@ -1,39 +0,0 @@ -// - -#nullable disable - -using Azure.Core; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// Referenced tumbling window trigger dependency. - public partial class TumblingWindowTriggerDependencyReference : TriggerDependencyReference - { - /// Initializes a new instance of TumblingWindowTriggerDependencyReference. - /// Referenced trigger. - /// is null. - public TumblingWindowTriggerDependencyReference(DataFactoryTriggerReference referenceTrigger) : base(referenceTrigger) - { - Argument.AssertNotNull(referenceTrigger, nameof(referenceTrigger)); - - DependencyReferenceType = "TumblingWindowTriggerDependencyReference"; - } - - /// Initializes a new instance of TumblingWindowTriggerDependencyReference. - /// The type of dependency reference. - /// Referenced trigger. - /// Timespan applied to the start time of a tumbling window when evaluating dependency. - /// The size of the window when evaluating the dependency. If undefined the frequency of the tumbling window will be used. - internal TumblingWindowTriggerDependencyReference(string dependencyReferenceType, DataFactoryTriggerReference referenceTrigger, string offset, string size) : base(dependencyReferenceType, referenceTrigger) - { - Offset = offset; - Size = size; - DependencyReferenceType = dependencyReferenceType ?? "TumblingWindowTriggerDependencyReference"; - } - - /// Timespan applied to the start time of a tumbling window when evaluating dependency. - public string Offset { get; set; } - /// The size of the window when evaluating the dependency. If undefined the frequency of the tumbling window will be used. - public string Size { get; set; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/TwilioLinkedService.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/TwilioLinkedService.Serialization.cs deleted file mode 100644 index b275e1e3..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/TwilioLinkedService.Serialization.cs +++ /dev/null @@ -1,175 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class TwilioLinkedService : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - writer.WritePropertyName("type"u8); - writer.WriteStringValue(LinkedServiceType); - if (Optional.IsDefined(ConnectVia)) - { - writer.WritePropertyName("connectVia"u8); - writer.WriteObjectValue(ConnectVia); - } - if (Optional.IsDefined(Description)) - { - writer.WritePropertyName("description"u8); - writer.WriteStringValue(Description); - } - if (Optional.IsCollectionDefined(Parameters)) - { - writer.WritePropertyName("parameters"u8); - writer.WriteStartObject(); - foreach (var item in Parameters) - { - writer.WritePropertyName(item.Key); - writer.WriteObjectValue(item.Value); - } - writer.WriteEndObject(); - } - if (Optional.IsCollectionDefined(Annotations)) - { - writer.WritePropertyName("annotations"u8); - writer.WriteStartArray(); - foreach (var item in Annotations) - { - if (item == null) - { - writer.WriteNullValue(); - continue; - } -#if NET6_0_OR_GREATER - writer.WriteRawValue(item); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.ToString()).RootElement); -#endif - } - writer.WriteEndArray(); - } - writer.WritePropertyName("typeProperties"u8); - writer.WriteStartObject(); - writer.WritePropertyName("userName"u8); - JsonSerializer.Serialize(writer, UserName); - writer.WritePropertyName("password"u8); - JsonSerializer.Serialize(writer, Password); writer.WriteEndObject(); - foreach (var item in AdditionalProperties) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.Value.ToString()).RootElement); -#endif - } - writer.WriteEndObject(); - } - - internal static TwilioLinkedService DeserializeTwilioLinkedService(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - string type = default; - Optional connectVia = default; - Optional description = default; - Optional> parameters = default; - Optional> annotations = default; - DataFactoryElement userName = default; - DataFactorySecretBaseDefinition password = default; - IDictionary> additionalProperties = default; - Dictionary> additionalPropertiesDictionary = new Dictionary>(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("type"u8)) - { - type = property.Value.GetString(); - continue; - } - if (property.NameEquals("connectVia"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - connectVia = IntegrationRuntimeReference.DeserializeIntegrationRuntimeReference(property.Value); - continue; - } - if (property.NameEquals("description"u8)) - { - description = property.Value.GetString(); - continue; - } - if (property.NameEquals("parameters"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - Dictionary dictionary = new Dictionary(); - foreach (var property0 in property.Value.EnumerateObject()) - { - dictionary.Add(property0.Name, EntityParameterSpecification.DeserializeEntityParameterSpecification(property0.Value)); - } - parameters = dictionary; - continue; - } - if (property.NameEquals("annotations"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - if (item.ValueKind == JsonValueKind.Null) - { - array.Add(null); - } - else - { - array.Add(BinaryData.FromString(item.GetRawText())); - } - } - annotations = array; - continue; - } - if (property.NameEquals("typeProperties"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - foreach (var property0 in property.Value.EnumerateObject()) - { - if (property0.NameEquals("userName"u8)) - { - userName = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("password"u8)) - { - password = JsonSerializer.Deserialize(property0.Value.GetRawText()); - continue; - } - } - continue; - } - additionalPropertiesDictionary.Add(property.Name, JsonSerializer.Deserialize>(property.Value.GetRawText())); - } - additionalProperties = additionalPropertiesDictionary; - return new TwilioLinkedService(type, connectVia.Value, description.Value, Optional.ToDictionary(parameters), Optional.ToList(annotations), additionalProperties, userName, password); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/TwilioLinkedService.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/TwilioLinkedService.cs deleted file mode 100644 index fe002c7e..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/TwilioLinkedService.cs +++ /dev/null @@ -1,48 +0,0 @@ -// - -#nullable disable - -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// Linked service for Twilio. - public partial class TwilioLinkedService : DataFactoryLinkedServiceProperties - { - /// Initializes a new instance of TwilioLinkedService. - /// The Account SID of Twilio service. Type: string (or Expression with resultType string). - /// The auth token of Twilio service. - /// or is null. - public TwilioLinkedService(DataFactoryElement userName, DataFactorySecretBaseDefinition password) - { - Argument.AssertNotNull(userName, nameof(userName)); - Argument.AssertNotNull(password, nameof(password)); - - UserName = userName; - Password = password; - LinkedServiceType = "Twilio"; - } - - /// Initializes a new instance of TwilioLinkedService. - /// Type of linked service. - /// The integration runtime reference. - /// Linked service description. - /// Parameters for linked service. - /// List of tags that can be used for describing the linked service. - /// Additional Properties. - /// The Account SID of Twilio service. Type: string (or Expression with resultType string). - /// The auth token of Twilio service. - internal TwilioLinkedService(string linkedServiceType, IntegrationRuntimeReference connectVia, string description, IDictionary parameters, IList annotations, IDictionary> additionalProperties, DataFactoryElement userName, DataFactorySecretBaseDefinition password) : base(linkedServiceType, connectVia, description, parameters, annotations, additionalProperties) - { - UserName = userName; - Password = password; - LinkedServiceType = linkedServiceType ?? "Twilio"; - } - - /// The Account SID of Twilio service. Type: string (or Expression with resultType string). - public DataFactoryElement UserName { get; set; } - /// The auth token of Twilio service. - public DataFactorySecretBaseDefinition Password { get; set; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/UnknownActivity.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/UnknownActivity.Serialization.cs deleted file mode 100644 index d1a67a79..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/UnknownActivity.Serialization.cs +++ /dev/null @@ -1,151 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - internal partial class UnknownActivity : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ActivityType); - if (Optional.IsDefined(Description)) - { - writer.WritePropertyName("description"u8); - writer.WriteStringValue(Description); - } - if (Optional.IsDefined(State)) - { - writer.WritePropertyName("state"u8); - writer.WriteStringValue(State.Value.ToString()); - } - if (Optional.IsDefined(OnInactiveMarkAs)) - { - writer.WritePropertyName("onInactiveMarkAs"u8); - writer.WriteStringValue(OnInactiveMarkAs.Value.ToString()); - } - if (Optional.IsCollectionDefined(DependsOn)) - { - writer.WritePropertyName("dependsOn"u8); - writer.WriteStartArray(); - foreach (var item in DependsOn) - { - writer.WriteObjectValue(item); - } - writer.WriteEndArray(); - } - if (Optional.IsCollectionDefined(UserProperties)) - { - writer.WritePropertyName("userProperties"u8); - writer.WriteStartArray(); - foreach (var item in UserProperties) - { - writer.WriteObjectValue(item); - } - writer.WriteEndArray(); - } - foreach (var item in AdditionalProperties) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.Value.ToString()).RootElement); -#endif - } - writer.WriteEndObject(); - } - - internal static UnknownActivity DeserializeUnknownActivity(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - string name = default; - string type = "Unknown"; - Optional description = default; - Optional state = default; - Optional onInactiveMarkAs = default; - Optional> dependsOn = default; - Optional> userProperties = default; - IDictionary> additionalProperties = default; - Dictionary> additionalPropertiesDictionary = new Dictionary>(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("name"u8)) - { - name = property.Value.GetString(); - continue; - } - if (property.NameEquals("type"u8)) - { - type = property.Value.GetString(); - continue; - } - if (property.NameEquals("description"u8)) - { - description = property.Value.GetString(); - continue; - } - if (property.NameEquals("state"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - state = new PipelineActivityState(property.Value.GetString()); - continue; - } - if (property.NameEquals("onInactiveMarkAs"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - onInactiveMarkAs = new ActivityOnInactiveMarkAs(property.Value.GetString()); - continue; - } - if (property.NameEquals("dependsOn"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - array.Add(PipelineActivityDependency.DeserializePipelineActivityDependency(item)); - } - dependsOn = array; - continue; - } - if (property.NameEquals("userProperties"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - array.Add(PipelineActivityUserProperty.DeserializePipelineActivityUserProperty(item)); - } - userProperties = array; - continue; - } - additionalPropertiesDictionary.Add(property.Name, JsonSerializer.Deserialize>(property.Value.GetRawText())); - } - additionalProperties = additionalPropertiesDictionary; - return new UnknownActivity(name, type, description.Value, Optional.ToNullable(state), Optional.ToNullable(onInactiveMarkAs), Optional.ToList(dependsOn), Optional.ToList(userProperties), additionalProperties); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/UnknownActivity.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/UnknownActivity.cs deleted file mode 100644 index 33935193..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/UnknownActivity.cs +++ /dev/null @@ -1,26 +0,0 @@ -// - -#nullable disable - -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// The UnknownActivity. - internal partial class UnknownActivity : PipelineActivity - { - /// Initializes a new instance of UnknownActivity. - /// Activity name. - /// Type of activity. - /// Activity description. - /// Activity state. This is an optional property and if not provided, the state will be Active by default. - /// 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. - /// Activity depends on condition. - /// Activity user properties. - /// Additional Properties. - internal UnknownActivity(string name, string activityType, string description, PipelineActivityState? state, ActivityOnInactiveMarkAs? onInactiveMarkAs, IList dependsOn, IList userProperties, IDictionary> additionalProperties) : base(name, activityType, description, state, onInactiveMarkAs, dependsOn, userProperties, additionalProperties) - { - ActivityType = activityType ?? "Unknown"; - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/UnknownCompressionReadSettings.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/UnknownCompressionReadSettings.Serialization.cs deleted file mode 100644 index 64d48b93..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/UnknownCompressionReadSettings.Serialization.cs +++ /dev/null @@ -1,52 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - internal partial class UnknownCompressionReadSettings : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - writer.WritePropertyName("type"u8); - writer.WriteStringValue(CompressionReadSettingsType); - foreach (var item in AdditionalProperties) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.Value.ToString()).RootElement); -#endif - } - writer.WriteEndObject(); - } - - internal static UnknownCompressionReadSettings DeserializeUnknownCompressionReadSettings(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - string type = "Unknown"; - IDictionary> additionalProperties = default; - Dictionary> additionalPropertiesDictionary = new Dictionary>(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("type"u8)) - { - type = property.Value.GetString(); - continue; - } - additionalPropertiesDictionary.Add(property.Name, JsonSerializer.Deserialize>(property.Value.GetRawText())); - } - additionalProperties = additionalPropertiesDictionary; - return new UnknownCompressionReadSettings(type, additionalProperties); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/UnknownCompressionReadSettings.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/UnknownCompressionReadSettings.cs deleted file mode 100644 index 70ebb72d..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/UnknownCompressionReadSettings.cs +++ /dev/null @@ -1,20 +0,0 @@ -// - -#nullable disable - -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// The UnknownCompressionReadSettings. - internal partial class UnknownCompressionReadSettings : CompressionReadSettings - { - /// Initializes a new instance of UnknownCompressionReadSettings. - /// The Compression setting type. - /// Additional Properties. - internal UnknownCompressionReadSettings(string compressionReadSettingsType, IDictionary> additionalProperties) : base(compressionReadSettingsType, additionalProperties) - { - CompressionReadSettingsType = compressionReadSettingsType ?? "Unknown"; - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/UnknownCopySink.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/UnknownCopySink.Serialization.cs deleted file mode 100644 index 837bfcaa..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/UnknownCopySink.Serialization.cs +++ /dev/null @@ -1,142 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - internal partial class UnknownCopySink : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - writer.WritePropertyName("type"u8); - writer.WriteStringValue(CopySinkType); - if (Optional.IsDefined(WriteBatchSize)) - { - writer.WritePropertyName("writeBatchSize"u8); - JsonSerializer.Serialize(writer, WriteBatchSize); - } - if (Optional.IsDefined(WriteBatchTimeout)) - { - writer.WritePropertyName("writeBatchTimeout"u8); - JsonSerializer.Serialize(writer, WriteBatchTimeout); - } - if (Optional.IsDefined(SinkRetryCount)) - { - writer.WritePropertyName("sinkRetryCount"u8); - JsonSerializer.Serialize(writer, SinkRetryCount); - } - if (Optional.IsDefined(SinkRetryWait)) - { - writer.WritePropertyName("sinkRetryWait"u8); - JsonSerializer.Serialize(writer, SinkRetryWait); - } - if (Optional.IsDefined(MaxConcurrentConnections)) - { - writer.WritePropertyName("maxConcurrentConnections"u8); - JsonSerializer.Serialize(writer, MaxConcurrentConnections); - } - if (Optional.IsDefined(DisableMetricsCollection)) - { - writer.WritePropertyName("disableMetricsCollection"u8); - JsonSerializer.Serialize(writer, DisableMetricsCollection); - } - foreach (var item in AdditionalProperties) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.Value.ToString()).RootElement); -#endif - } - writer.WriteEndObject(); - } - - internal static UnknownCopySink DeserializeUnknownCopySink(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - string type = "Unknown"; - Optional> writeBatchSize = default; - Optional> writeBatchTimeout = default; - Optional> sinkRetryCount = default; - Optional> sinkRetryWait = default; - Optional> maxConcurrentConnections = default; - Optional> disableMetricsCollection = default; - IDictionary> additionalProperties = default; - Dictionary> additionalPropertiesDictionary = new Dictionary>(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("type"u8)) - { - type = property.Value.GetString(); - continue; - } - if (property.NameEquals("writeBatchSize"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - writeBatchSize = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("writeBatchTimeout"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - writeBatchTimeout = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("sinkRetryCount"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - sinkRetryCount = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("sinkRetryWait"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - sinkRetryWait = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("maxConcurrentConnections"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - maxConcurrentConnections = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("disableMetricsCollection"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - disableMetricsCollection = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - additionalPropertiesDictionary.Add(property.Name, JsonSerializer.Deserialize>(property.Value.GetRawText())); - } - additionalProperties = additionalPropertiesDictionary; - return new UnknownCopySink(type, writeBatchSize.Value, writeBatchTimeout.Value, sinkRetryCount.Value, sinkRetryWait.Value, maxConcurrentConnections.Value, disableMetricsCollection.Value, additionalProperties); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/UnknownCopySink.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/UnknownCopySink.cs deleted file mode 100644 index c8f11123..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/UnknownCopySink.cs +++ /dev/null @@ -1,26 +0,0 @@ -// - -#nullable disable - -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// The UnknownCopySink. - internal partial class UnknownCopySink : CopySink - { - /// Initializes a new instance of UnknownCopySink. - /// Copy sink type. - /// Write batch size. Type: integer (or Expression with resultType integer), minimum: 0. - /// Write batch timeout. Type: string (or Expression with resultType string), pattern: ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). - /// Sink retry count. Type: integer (or Expression with resultType integer). - /// Sink retry wait. Type: string (or Expression with resultType string), pattern: ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). - /// The maximum concurrent connection count for the sink data store. Type: integer (or Expression with resultType integer). - /// If true, disable data store metrics collection. Default is false. Type: boolean (or Expression with resultType boolean). - /// Additional Properties. - internal UnknownCopySink(string copySinkType, DataFactoryElement writeBatchSize, DataFactoryElement writeBatchTimeout, DataFactoryElement sinkRetryCount, DataFactoryElement sinkRetryWait, DataFactoryElement maxConcurrentConnections, DataFactoryElement disableMetricsCollection, IDictionary> additionalProperties) : base(copySinkType, writeBatchSize, writeBatchTimeout, sinkRetryCount, sinkRetryWait, maxConcurrentConnections, disableMetricsCollection, additionalProperties) - { - CopySinkType = copySinkType ?? "Unknown"; - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/UnknownCopySource.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/UnknownCopySource.Serialization.cs deleted file mode 100644 index 97257ea9..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/UnknownCopySource.Serialization.cs +++ /dev/null @@ -1,112 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - internal partial class UnknownCopySource : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - writer.WritePropertyName("type"u8); - writer.WriteStringValue(CopySourceType); - if (Optional.IsDefined(SourceRetryCount)) - { - writer.WritePropertyName("sourceRetryCount"u8); - JsonSerializer.Serialize(writer, SourceRetryCount); - } - if (Optional.IsDefined(SourceRetryWait)) - { - writer.WritePropertyName("sourceRetryWait"u8); - JsonSerializer.Serialize(writer, SourceRetryWait); - } - if (Optional.IsDefined(MaxConcurrentConnections)) - { - writer.WritePropertyName("maxConcurrentConnections"u8); - JsonSerializer.Serialize(writer, MaxConcurrentConnections); - } - if (Optional.IsDefined(DisableMetricsCollection)) - { - writer.WritePropertyName("disableMetricsCollection"u8); - JsonSerializer.Serialize(writer, DisableMetricsCollection); - } - foreach (var item in AdditionalProperties) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.Value.ToString()).RootElement); -#endif - } - writer.WriteEndObject(); - } - - internal static UnknownCopySource DeserializeUnknownCopySource(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - string type = "Unknown"; - Optional> sourceRetryCount = default; - Optional> sourceRetryWait = default; - Optional> maxConcurrentConnections = default; - Optional> disableMetricsCollection = default; - IDictionary> additionalProperties = default; - Dictionary> additionalPropertiesDictionary = new Dictionary>(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("type"u8)) - { - type = property.Value.GetString(); - continue; - } - if (property.NameEquals("sourceRetryCount"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - sourceRetryCount = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("sourceRetryWait"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - sourceRetryWait = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("maxConcurrentConnections"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - maxConcurrentConnections = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("disableMetricsCollection"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - disableMetricsCollection = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - additionalPropertiesDictionary.Add(property.Name, JsonSerializer.Deserialize>(property.Value.GetRawText())); - } - additionalProperties = additionalPropertiesDictionary; - return new UnknownCopySource(type, sourceRetryCount.Value, sourceRetryWait.Value, maxConcurrentConnections.Value, disableMetricsCollection.Value, additionalProperties); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/UnknownCopySource.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/UnknownCopySource.cs deleted file mode 100644 index d27395a7..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/UnknownCopySource.cs +++ /dev/null @@ -1,24 +0,0 @@ -// - -#nullable disable - -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// The UnknownCopySource. - internal partial class UnknownCopySource : CopyActivitySource - { - /// Initializes a new instance of UnknownCopySource. - /// Copy source type. - /// Source retry count. Type: integer (or Expression with resultType integer). - /// Source retry wait. Type: string (or Expression with resultType string), pattern: ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). - /// The maximum concurrent connection count for the source data store. Type: integer (or Expression with resultType integer). - /// If true, disable data store metrics collection. Default is false. Type: boolean (or Expression with resultType boolean). - /// Additional Properties. - internal UnknownCopySource(string copySourceType, DataFactoryElement sourceRetryCount, DataFactoryElement sourceRetryWait, DataFactoryElement maxConcurrentConnections, DataFactoryElement disableMetricsCollection, IDictionary> additionalProperties) : base(copySourceType, sourceRetryCount, sourceRetryWait, maxConcurrentConnections, disableMetricsCollection, additionalProperties) - { - CopySourceType = copySourceType ?? "Unknown"; - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/UnknownCredential.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/UnknownCredential.Serialization.cs deleted file mode 100644 index b1999cda..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/UnknownCredential.Serialization.cs +++ /dev/null @@ -1,104 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - internal partial class UnknownCredential : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - writer.WritePropertyName("type"u8); - writer.WriteStringValue(CredentialType); - if (Optional.IsDefined(Description)) - { - writer.WritePropertyName("description"u8); - writer.WriteStringValue(Description); - } - if (Optional.IsCollectionDefined(Annotations)) - { - writer.WritePropertyName("annotations"u8); - writer.WriteStartArray(); - foreach (var item in Annotations) - { - if (item == null) - { - writer.WriteNullValue(); - continue; - } -#if NET6_0_OR_GREATER - writer.WriteRawValue(item); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.ToString()).RootElement); -#endif - } - writer.WriteEndArray(); - } - foreach (var item in AdditionalProperties) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.Value.ToString()).RootElement); -#endif - } - writer.WriteEndObject(); - } - - internal static UnknownCredential DeserializeUnknownCredential(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - string type = "Unknown"; - Optional description = default; - Optional> annotations = default; - IDictionary> additionalProperties = default; - Dictionary> additionalPropertiesDictionary = new Dictionary>(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("type"u8)) - { - type = property.Value.GetString(); - continue; - } - if (property.NameEquals("description"u8)) - { - description = property.Value.GetString(); - continue; - } - if (property.NameEquals("annotations"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - if (item.ValueKind == JsonValueKind.Null) - { - array.Add(null); - } - else - { - array.Add(BinaryData.FromString(item.GetRawText())); - } - } - annotations = array; - continue; - } - additionalPropertiesDictionary.Add(property.Name, JsonSerializer.Deserialize>(property.Value.GetRawText())); - } - additionalProperties = additionalPropertiesDictionary; - return new UnknownCredential(type, description.Value, Optional.ToList(annotations), additionalProperties); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/UnknownCredential.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/UnknownCredential.cs deleted file mode 100644 index 96f20695..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/UnknownCredential.cs +++ /dev/null @@ -1,22 +0,0 @@ -// - -#nullable disable - -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// The UnknownCredential. - internal partial class UnknownCredential : DataFactoryCredential - { - /// Initializes a new instance of UnknownCredential. - /// Type of credential. - /// Credential description. - /// List of tags that can be used for describing the Credential. - /// Additional Properties. - internal UnknownCredential(string credentialType, string description, IList annotations, IDictionary> additionalProperties) : base(credentialType, description, annotations, additionalProperties) - { - CredentialType = credentialType ?? "Unknown"; - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/UnknownCustomSetupBase.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/UnknownCustomSetupBase.Serialization.cs deleted file mode 100644 index 2b7a5938..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/UnknownCustomSetupBase.Serialization.cs +++ /dev/null @@ -1,38 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; - -namespace AzureDataFactory.TestingFramework.Models -{ - internal partial class UnknownCustomSetupBase : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - writer.WritePropertyName("type"u8); - writer.WriteStringValue(CustomSetupBaseType); - writer.WriteEndObject(); - } - - internal static UnknownCustomSetupBase DeserializeUnknownCustomSetupBase(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - string type = "Unknown"; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("type"u8)) - { - type = property.Value.GetString(); - continue; - } - } - return new UnknownCustomSetupBase(type); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/UnknownCustomSetupBase.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/UnknownCustomSetupBase.cs deleted file mode 100644 index 32eeed54..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/UnknownCustomSetupBase.cs +++ /dev/null @@ -1,17 +0,0 @@ -// - -#nullable disable - -namespace AzureDataFactory.TestingFramework.Models -{ - /// The UnknownCustomSetupBase. - internal partial class UnknownCustomSetupBase : CustomSetupBase - { - /// Initializes a new instance of UnknownCustomSetupBase. - /// The type of custom setup. - internal UnknownCustomSetupBase(string customSetupBaseType) : base(customSetupBaseType) - { - CustomSetupBaseType = customSetupBaseType ?? "Unknown"; - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/UnknownDataFlow.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/UnknownDataFlow.Serialization.cs deleted file mode 100644 index 088cffff..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/UnknownDataFlow.Serialization.cs +++ /dev/null @@ -1,105 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; - -namespace AzureDataFactory.TestingFramework.Models -{ - internal partial class UnknownDataFlow : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - writer.WritePropertyName("type"u8); - writer.WriteStringValue(DataFlowType); - if (Optional.IsDefined(Description)) - { - writer.WritePropertyName("description"u8); - writer.WriteStringValue(Description); - } - if (Optional.IsCollectionDefined(Annotations)) - { - writer.WritePropertyName("annotations"u8); - writer.WriteStartArray(); - foreach (var item in Annotations) - { - if (item == null) - { - writer.WriteNullValue(); - continue; - } -#if NET6_0_OR_GREATER - writer.WriteRawValue(item); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.ToString()).RootElement); -#endif - } - writer.WriteEndArray(); - } - if (Optional.IsDefined(Folder)) - { - writer.WritePropertyName("folder"u8); - writer.WriteObjectValue(Folder); - } - writer.WriteEndObject(); - } - - internal static UnknownDataFlow DeserializeUnknownDataFlow(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - string type = "Unknown"; - Optional description = default; - Optional> annotations = default; - Optional folder = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("type"u8)) - { - type = property.Value.GetString(); - continue; - } - if (property.NameEquals("description"u8)) - { - description = property.Value.GetString(); - continue; - } - if (property.NameEquals("annotations"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - if (item.ValueKind == JsonValueKind.Null) - { - array.Add(null); - } - else - { - array.Add(BinaryData.FromString(item.GetRawText())); - } - } - annotations = array; - continue; - } - if (property.NameEquals("folder"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - folder = DataFlowFolder.DeserializeDataFlowFolder(property.Value); - continue; - } - } - return new UnknownDataFlow(type, description.Value, Optional.ToList(annotations), folder.Value); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/UnknownDataFlow.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/UnknownDataFlow.cs deleted file mode 100644 index 15258739..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/UnknownDataFlow.cs +++ /dev/null @@ -1,20 +0,0 @@ -// - -#nullable disable - -namespace AzureDataFactory.TestingFramework.Models -{ - /// The UnknownDataFlow. - internal partial class UnknownDataFlow : DataFactoryDataFlowProperties - { - /// Initializes a new instance of UnknownDataFlow. - /// Type of data flow. - /// The description of the data flow. - /// List of tags that can be used for describing the data flow. - /// The folder that this data flow is in. If not specified, Data flow will appear at the root level. - internal UnknownDataFlow(string dataFlowType, string description, IList annotations, DataFlowFolder folder) : base(dataFlowType, description, annotations, folder) - { - DataFlowType = dataFlowType ?? "Unknown"; - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/UnknownDataset.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/UnknownDataset.Serialization.cs deleted file mode 100644 index e0bd9a0c..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/UnknownDataset.Serialization.cs +++ /dev/null @@ -1,182 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - internal partial class UnknownDataset : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - writer.WritePropertyName("type"u8); - writer.WriteStringValue(DatasetType); - if (Optional.IsDefined(Description)) - { - writer.WritePropertyName("description"u8); - writer.WriteStringValue(Description); - } - if (Optional.IsDefined(Structure)) - { - writer.WritePropertyName("structure"u8); - JsonSerializer.Serialize(writer, Structure); - } - if (Optional.IsDefined(Schema)) - { - writer.WritePropertyName("schema"u8); - JsonSerializer.Serialize(writer, Schema); - } - writer.WritePropertyName("linkedServiceName"u8); - JsonSerializer.Serialize(writer, LinkedServiceName); if (Optional.IsCollectionDefined(Parameters)) - { - writer.WritePropertyName("parameters"u8); - writer.WriteStartObject(); - foreach (var item in Parameters) - { - writer.WritePropertyName(item.Key); - writer.WriteObjectValue(item.Value); - } - writer.WriteEndObject(); - } - if (Optional.IsCollectionDefined(Annotations)) - { - writer.WritePropertyName("annotations"u8); - writer.WriteStartArray(); - foreach (var item in Annotations) - { - if (item == null) - { - writer.WriteNullValue(); - continue; - } -#if NET6_0_OR_GREATER - writer.WriteRawValue(item); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.ToString()).RootElement); -#endif - } - writer.WriteEndArray(); - } - if (Optional.IsDefined(Folder)) - { - writer.WritePropertyName("folder"u8); - writer.WriteObjectValue(Folder); - } - foreach (var item in AdditionalProperties) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.Value.ToString()).RootElement); -#endif - } - writer.WriteEndObject(); - } - - internal static UnknownDataset DeserializeUnknownDataset(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - string type = "Unknown"; - Optional description = default; - Optional>> structure = default; - Optional>> schema = default; - DataFactoryLinkedServiceReference linkedServiceName = default; - Optional> parameters = default; - Optional> annotations = default; - Optional folder = default; - IDictionary> additionalProperties = default; - Dictionary> additionalPropertiesDictionary = new Dictionary>(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("type"u8)) - { - type = property.Value.GetString(); - continue; - } - if (property.NameEquals("description"u8)) - { - description = property.Value.GetString(); - continue; - } - if (property.NameEquals("structure"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - structure = JsonSerializer.Deserialize>>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("schema"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - schema = JsonSerializer.Deserialize>>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("linkedServiceName"u8)) - { - linkedServiceName = JsonSerializer.Deserialize(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("parameters"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - Dictionary dictionary = new Dictionary(); - foreach (var property0 in property.Value.EnumerateObject()) - { - dictionary.Add(property0.Name, EntityParameterSpecification.DeserializeEntityParameterSpecification(property0.Value)); - } - parameters = dictionary; - continue; - } - if (property.NameEquals("annotations"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - if (item.ValueKind == JsonValueKind.Null) - { - array.Add(null); - } - else - { - array.Add(BinaryData.FromString(item.GetRawText())); - } - } - annotations = array; - continue; - } - if (property.NameEquals("folder"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - folder = DatasetFolder.DeserializeDatasetFolder(property.Value); - continue; - } - additionalPropertiesDictionary.Add(property.Name, JsonSerializer.Deserialize>(property.Value.GetRawText())); - } - additionalProperties = additionalPropertiesDictionary; - return new UnknownDataset(type, description.Value, structure.Value, schema.Value, linkedServiceName, Optional.ToDictionary(parameters), Optional.ToList(annotations), folder.Value, additionalProperties); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/UnknownDataset.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/UnknownDataset.cs deleted file mode 100644 index 9b34164e..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/UnknownDataset.cs +++ /dev/null @@ -1,27 +0,0 @@ -// - -#nullable disable - -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// The UnknownDataset. - internal partial class UnknownDataset : DataFactoryDatasetProperties - { - /// Initializes a new instance of UnknownDataset. - /// Type of dataset. - /// Dataset description. - /// Columns that define the structure of the dataset. Type: array (or Expression with resultType array), itemType: DatasetDataElement. - /// Columns that define the physical type schema of the dataset. Type: array (or Expression with resultType array), itemType: DatasetSchemaDataElement. - /// Linked service reference. - /// Parameters for dataset. - /// List of tags that can be used for describing the Dataset. - /// The folder that this Dataset is in. If not specified, Dataset will appear at the root level. - /// Additional Properties. - internal UnknownDataset(string datasetType, string description, DataFactoryElement> structure, DataFactoryElement> schema, DataFactoryLinkedServiceReference linkedServiceName, IDictionary parameters, IList annotations, DatasetFolder folder, IDictionary> additionalProperties) : base(datasetType, description, structure, schema, linkedServiceName, parameters, annotations, folder, additionalProperties) - { - DatasetType = datasetType ?? "Unknown"; - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/UnknownDatasetLocation.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/UnknownDatasetLocation.Serialization.cs deleted file mode 100644 index be0c1968..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/UnknownDatasetLocation.Serialization.cs +++ /dev/null @@ -1,82 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - internal partial class UnknownDatasetLocation : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - writer.WritePropertyName("type"u8); - writer.WriteStringValue(DatasetLocationType); - if (Optional.IsDefined(FolderPath)) - { - writer.WritePropertyName("folderPath"u8); - JsonSerializer.Serialize(writer, FolderPath); - } - if (Optional.IsDefined(FileName)) - { - writer.WritePropertyName("fileName"u8); - JsonSerializer.Serialize(writer, FileName); - } - foreach (var item in AdditionalProperties) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.Value.ToString()).RootElement); -#endif - } - writer.WriteEndObject(); - } - - internal static UnknownDatasetLocation DeserializeUnknownDatasetLocation(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - string type = "Unknown"; - Optional> folderPath = default; - Optional> fileName = default; - IDictionary> additionalProperties = default; - Dictionary> additionalPropertiesDictionary = new Dictionary>(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("type"u8)) - { - type = property.Value.GetString(); - continue; - } - if (property.NameEquals("folderPath"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - folderPath = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("fileName"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - fileName = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - additionalPropertiesDictionary.Add(property.Name, JsonSerializer.Deserialize>(property.Value.GetRawText())); - } - additionalProperties = additionalPropertiesDictionary; - return new UnknownDatasetLocation(type, folderPath.Value, fileName.Value, additionalProperties); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/UnknownDatasetLocation.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/UnknownDatasetLocation.cs deleted file mode 100644 index 306842e4..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/UnknownDatasetLocation.cs +++ /dev/null @@ -1,22 +0,0 @@ -// - -#nullable disable - -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// The UnknownDatasetLocation. - internal partial class UnknownDatasetLocation : DatasetLocation - { - /// Initializes a new instance of UnknownDatasetLocation. - /// Type of dataset storage location. - /// Specify the folder path of dataset. Type: string (or Expression with resultType string). - /// Specify the file name of dataset. Type: string (or Expression with resultType string). - /// Additional Properties. - internal UnknownDatasetLocation(string datasetLocationType, DataFactoryElement folderPath, DataFactoryElement fileName, IDictionary> additionalProperties) : base(datasetLocationType, folderPath, fileName, additionalProperties) - { - DatasetLocationType = datasetLocationType ?? "Unknown"; - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/UnknownDatasetStorageFormat.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/UnknownDatasetStorageFormat.Serialization.cs deleted file mode 100644 index 038e5fb0..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/UnknownDatasetStorageFormat.Serialization.cs +++ /dev/null @@ -1,82 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - internal partial class UnknownDatasetStorageFormat : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - writer.WritePropertyName("type"u8); - writer.WriteStringValue(DatasetStorageFormatType); - if (Optional.IsDefined(Serializer)) - { - writer.WritePropertyName("serializer"u8); - JsonSerializer.Serialize(writer, Serializer); - } - if (Optional.IsDefined(Deserializer)) - { - writer.WritePropertyName("deserializer"u8); - JsonSerializer.Serialize(writer, Deserializer); - } - foreach (var item in AdditionalProperties) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.Value.ToString()).RootElement); -#endif - } - writer.WriteEndObject(); - } - - internal static UnknownDatasetStorageFormat DeserializeUnknownDatasetStorageFormat(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - string type = "Unknown"; - Optional> serializer = default; - Optional> deserializer = default; - IDictionary> additionalProperties = default; - Dictionary> additionalPropertiesDictionary = new Dictionary>(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("type"u8)) - { - type = property.Value.GetString(); - continue; - } - if (property.NameEquals("serializer"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - serializer = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("deserializer"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - deserializer = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - additionalPropertiesDictionary.Add(property.Name, JsonSerializer.Deserialize>(property.Value.GetRawText())); - } - additionalProperties = additionalPropertiesDictionary; - return new UnknownDatasetStorageFormat(type, serializer.Value, deserializer.Value, additionalProperties); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/UnknownDatasetStorageFormat.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/UnknownDatasetStorageFormat.cs deleted file mode 100644 index d2e4e1fe..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/UnknownDatasetStorageFormat.cs +++ /dev/null @@ -1,22 +0,0 @@ -// - -#nullable disable - -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// The UnknownDatasetStorageFormat. - internal partial class UnknownDatasetStorageFormat : DatasetStorageFormat - { - /// Initializes a new instance of UnknownDatasetStorageFormat. - /// Type of dataset storage format. - /// Serializer. Type: string (or Expression with resultType string). - /// Deserializer. Type: string (or Expression with resultType string). - /// Additional Properties. - internal UnknownDatasetStorageFormat(string datasetStorageFormatType, DataFactoryElement serializer, DataFactoryElement deserializer, IDictionary> additionalProperties) : base(datasetStorageFormatType, serializer, deserializer, additionalProperties) - { - DatasetStorageFormatType = datasetStorageFormatType ?? "Unknown"; - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/UnknownDependencyReference.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/UnknownDependencyReference.Serialization.cs deleted file mode 100644 index 5dbf2389..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/UnknownDependencyReference.Serialization.cs +++ /dev/null @@ -1,38 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; - -namespace AzureDataFactory.TestingFramework.Models -{ - internal partial class UnknownDependencyReference : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - writer.WritePropertyName("type"u8); - writer.WriteStringValue(DependencyReferenceType); - writer.WriteEndObject(); - } - - internal static UnknownDependencyReference DeserializeUnknownDependencyReference(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - string type = "Unknown"; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("type"u8)) - { - type = property.Value.GetString(); - continue; - } - } - return new UnknownDependencyReference(type); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/UnknownDependencyReference.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/UnknownDependencyReference.cs deleted file mode 100644 index b88a334a..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/UnknownDependencyReference.cs +++ /dev/null @@ -1,17 +0,0 @@ -// - -#nullable disable - -namespace AzureDataFactory.TestingFramework.Models -{ - /// The UnknownDependencyReference. - internal partial class UnknownDependencyReference : DependencyReference - { - /// Initializes a new instance of UnknownDependencyReference. - /// The type of dependency reference. - internal UnknownDependencyReference(string dependencyReferenceType) : base(dependencyReferenceType) - { - DependencyReferenceType = dependencyReferenceType ?? "Unknown"; - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/UnknownExportSettings.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/UnknownExportSettings.Serialization.cs deleted file mode 100644 index f1b39747..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/UnknownExportSettings.Serialization.cs +++ /dev/null @@ -1,52 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - internal partial class UnknownExportSettings : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ExportSettingsType); - foreach (var item in AdditionalProperties) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.Value.ToString()).RootElement); -#endif - } - writer.WriteEndObject(); - } - - internal static UnknownExportSettings DeserializeUnknownExportSettings(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - string type = "Unknown"; - IDictionary> additionalProperties = default; - Dictionary> additionalPropertiesDictionary = new Dictionary>(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("type"u8)) - { - type = property.Value.GetString(); - continue; - } - additionalPropertiesDictionary.Add(property.Name, JsonSerializer.Deserialize>(property.Value.GetRawText())); - } - additionalProperties = additionalPropertiesDictionary; - return new UnknownExportSettings(type, additionalProperties); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/UnknownExportSettings.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/UnknownExportSettings.cs deleted file mode 100644 index 174e0e99..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/UnknownExportSettings.cs +++ /dev/null @@ -1,20 +0,0 @@ -// - -#nullable disable - -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// The UnknownExportSettings. - internal partial class UnknownExportSettings : ExportSettings - { - /// Initializes a new instance of UnknownExportSettings. - /// The export setting type. - /// Additional Properties. - internal UnknownExportSettings(string exportSettingsType, IDictionary> additionalProperties) : base(exportSettingsType, additionalProperties) - { - ExportSettingsType = exportSettingsType ?? "Unknown"; - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/UnknownFactoryRepoConfiguration.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/UnknownFactoryRepoConfiguration.Serialization.cs deleted file mode 100644 index cac9d146..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/UnknownFactoryRepoConfiguration.Serialization.cs +++ /dev/null @@ -1,96 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; - -namespace AzureDataFactory.TestingFramework.Models -{ - internal partial class UnknownFactoryRepoConfiguration : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - writer.WritePropertyName("type"u8); - writer.WriteStringValue(FactoryRepoConfigurationType); - writer.WritePropertyName("accountName"u8); - writer.WriteStringValue(AccountName); - writer.WritePropertyName("repositoryName"u8); - writer.WriteStringValue(RepositoryName); - writer.WritePropertyName("collaborationBranch"u8); - writer.WriteStringValue(CollaborationBranch); - writer.WritePropertyName("rootFolder"u8); - writer.WriteStringValue(RootFolder); - if (Optional.IsDefined(LastCommitId)) - { - writer.WritePropertyName("lastCommitId"u8); - writer.WriteStringValue(LastCommitId); - } - if (Optional.IsDefined(DisablePublish)) - { - writer.WritePropertyName("disablePublish"u8); - writer.WriteBooleanValue(DisablePublish.Value); - } - writer.WriteEndObject(); - } - - internal static UnknownFactoryRepoConfiguration DeserializeUnknownFactoryRepoConfiguration(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - string type = "Unknown"; - string accountName = default; - string repositoryName = default; - string collaborationBranch = default; - string rootFolder = default; - Optional lastCommitId = default; - Optional disablePublish = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("type"u8)) - { - type = property.Value.GetString(); - continue; - } - if (property.NameEquals("accountName"u8)) - { - accountName = property.Value.GetString(); - continue; - } - if (property.NameEquals("repositoryName"u8)) - { - repositoryName = property.Value.GetString(); - continue; - } - if (property.NameEquals("collaborationBranch"u8)) - { - collaborationBranch = property.Value.GetString(); - continue; - } - if (property.NameEquals("rootFolder"u8)) - { - rootFolder = property.Value.GetString(); - continue; - } - if (property.NameEquals("lastCommitId"u8)) - { - lastCommitId = property.Value.GetString(); - continue; - } - if (property.NameEquals("disablePublish"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - disablePublish = property.Value.GetBoolean(); - continue; - } - } - return new UnknownFactoryRepoConfiguration(type, accountName, repositoryName, collaborationBranch, rootFolder, lastCommitId.Value, Optional.ToNullable(disablePublish)); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/UnknownFactoryRepoConfiguration.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/UnknownFactoryRepoConfiguration.cs deleted file mode 100644 index f579ae36..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/UnknownFactoryRepoConfiguration.cs +++ /dev/null @@ -1,23 +0,0 @@ -// - -#nullable disable - -namespace AzureDataFactory.TestingFramework.Models -{ - /// The UnknownFactoryRepoConfiguration. - internal partial class UnknownFactoryRepoConfiguration : FactoryRepoConfiguration - { - /// Initializes a new instance of UnknownFactoryRepoConfiguration. - /// Type of repo configuration. - /// Account name. - /// Repository name. - /// Collaboration branch. - /// Root folder. - /// Last commit id. - /// Disable manual publish operation in ADF studio to favor automated publish. - internal UnknownFactoryRepoConfiguration(string factoryRepoConfigurationType, string accountName, string repositoryName, string collaborationBranch, string rootFolder, string lastCommitId, bool? disablePublish) : base(factoryRepoConfigurationType, accountName, repositoryName, collaborationBranch, rootFolder, lastCommitId, disablePublish) - { - FactoryRepoConfigurationType = factoryRepoConfigurationType ?? "Unknown"; - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/UnknownFormatReadSettings.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/UnknownFormatReadSettings.Serialization.cs deleted file mode 100644 index 915a3229..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/UnknownFormatReadSettings.Serialization.cs +++ /dev/null @@ -1,52 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - internal partial class UnknownFormatReadSettings : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - writer.WritePropertyName("type"u8); - writer.WriteStringValue(FormatReadSettingsType); - foreach (var item in AdditionalProperties) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.Value.ToString()).RootElement); -#endif - } - writer.WriteEndObject(); - } - - internal static UnknownFormatReadSettings DeserializeUnknownFormatReadSettings(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - string type = "Unknown"; - IDictionary> additionalProperties = default; - Dictionary> additionalPropertiesDictionary = new Dictionary>(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("type"u8)) - { - type = property.Value.GetString(); - continue; - } - additionalPropertiesDictionary.Add(property.Name, JsonSerializer.Deserialize>(property.Value.GetRawText())); - } - additionalProperties = additionalPropertiesDictionary; - return new UnknownFormatReadSettings(type, additionalProperties); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/UnknownFormatReadSettings.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/UnknownFormatReadSettings.cs deleted file mode 100644 index 019b812c..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/UnknownFormatReadSettings.cs +++ /dev/null @@ -1,20 +0,0 @@ -// - -#nullable disable - -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// The UnknownFormatReadSettings. - internal partial class UnknownFormatReadSettings : FormatReadSettings - { - /// Initializes a new instance of UnknownFormatReadSettings. - /// The read setting type. - /// Additional Properties. - internal UnknownFormatReadSettings(string formatReadSettingsType, IDictionary> additionalProperties) : base(formatReadSettingsType, additionalProperties) - { - FormatReadSettingsType = formatReadSettingsType ?? "Unknown"; - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/UnknownFormatWriteSettings.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/UnknownFormatWriteSettings.Serialization.cs deleted file mode 100644 index 4b9a2a7b..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/UnknownFormatWriteSettings.Serialization.cs +++ /dev/null @@ -1,52 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - internal partial class UnknownFormatWriteSettings : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - writer.WritePropertyName("type"u8); - writer.WriteStringValue(FormatWriteSettingsType); - foreach (var item in AdditionalProperties) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.Value.ToString()).RootElement); -#endif - } - writer.WriteEndObject(); - } - - internal static UnknownFormatWriteSettings DeserializeUnknownFormatWriteSettings(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - string type = "Unknown"; - IDictionary> additionalProperties = default; - Dictionary> additionalPropertiesDictionary = new Dictionary>(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("type"u8)) - { - type = property.Value.GetString(); - continue; - } - additionalPropertiesDictionary.Add(property.Name, JsonSerializer.Deserialize>(property.Value.GetRawText())); - } - additionalProperties = additionalPropertiesDictionary; - return new UnknownFormatWriteSettings(type, additionalProperties); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/UnknownFormatWriteSettings.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/UnknownFormatWriteSettings.cs deleted file mode 100644 index a1ab1a51..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/UnknownFormatWriteSettings.cs +++ /dev/null @@ -1,20 +0,0 @@ -// - -#nullable disable - -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// The UnknownFormatWriteSettings. - internal partial class UnknownFormatWriteSettings : FormatWriteSettings - { - /// Initializes a new instance of UnknownFormatWriteSettings. - /// The write setting type. - /// Additional Properties. - internal UnknownFormatWriteSettings(string formatWriteSettingsType, IDictionary> additionalProperties) : base(formatWriteSettingsType, additionalProperties) - { - FormatWriteSettingsType = formatWriteSettingsType ?? "Unknown"; - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/UnknownImportSettings.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/UnknownImportSettings.Serialization.cs deleted file mode 100644 index f6410e5a..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/UnknownImportSettings.Serialization.cs +++ /dev/null @@ -1,52 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - internal partial class UnknownImportSettings : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ImportSettingsType); - foreach (var item in AdditionalProperties) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.Value.ToString()).RootElement); -#endif - } - writer.WriteEndObject(); - } - - internal static UnknownImportSettings DeserializeUnknownImportSettings(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - string type = "Unknown"; - IDictionary> additionalProperties = default; - Dictionary> additionalPropertiesDictionary = new Dictionary>(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("type"u8)) - { - type = property.Value.GetString(); - continue; - } - additionalPropertiesDictionary.Add(property.Name, JsonSerializer.Deserialize>(property.Value.GetRawText())); - } - additionalProperties = additionalPropertiesDictionary; - return new UnknownImportSettings(type, additionalProperties); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/UnknownImportSettings.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/UnknownImportSettings.cs deleted file mode 100644 index 39fc03e7..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/UnknownImportSettings.cs +++ /dev/null @@ -1,20 +0,0 @@ -// - -#nullable disable - -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// The UnknownImportSettings. - internal partial class UnknownImportSettings : ImportSettings - { - /// Initializes a new instance of UnknownImportSettings. - /// The import setting type. - /// Additional Properties. - internal UnknownImportSettings(string importSettingsType, IDictionary> additionalProperties) : base(importSettingsType, additionalProperties) - { - ImportSettingsType = importSettingsType ?? "Unknown"; - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/UnknownIntegrationRuntime.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/UnknownIntegrationRuntime.Serialization.cs deleted file mode 100644 index 5267fedb..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/UnknownIntegrationRuntime.Serialization.cs +++ /dev/null @@ -1,63 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - internal partial class UnknownIntegrationRuntime : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - writer.WritePropertyName("type"u8); - writer.WriteStringValue(IntegrationRuntimeType.ToString()); - if (Optional.IsDefined(Description)) - { - writer.WritePropertyName("description"u8); - writer.WriteStringValue(Description); - } - foreach (var item in AdditionalProperties) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.Value.ToString()).RootElement); -#endif - } - writer.WriteEndObject(); - } - - internal static UnknownIntegrationRuntime DeserializeUnknownIntegrationRuntime(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - IntegrationRuntimeType type = "Unknown"; - Optional description = default; - IDictionary> additionalProperties = default; - Dictionary> additionalPropertiesDictionary = new Dictionary>(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("type"u8)) - { - type = new IntegrationRuntimeType(property.Value.GetString()); - continue; - } - if (property.NameEquals("description"u8)) - { - description = property.Value.GetString(); - continue; - } - additionalPropertiesDictionary.Add(property.Name, JsonSerializer.Deserialize>(property.Value.GetRawText())); - } - additionalProperties = additionalPropertiesDictionary; - return new UnknownIntegrationRuntime(type, description.Value, additionalProperties); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/UnknownIntegrationRuntime.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/UnknownIntegrationRuntime.cs deleted file mode 100644 index 4055b096..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/UnknownIntegrationRuntime.cs +++ /dev/null @@ -1,21 +0,0 @@ -// - -#nullable disable - -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// The UnknownIntegrationRuntime. - internal partial class UnknownIntegrationRuntime : DataFactoryIntegrationRuntimeProperties - { - /// Initializes a new instance of UnknownIntegrationRuntime. - /// Type of integration runtime. - /// Integration runtime description. - /// Additional Properties. - internal UnknownIntegrationRuntime(IntegrationRuntimeType integrationRuntimeType, string description, IDictionary> additionalProperties) : base(integrationRuntimeType, description, additionalProperties) - { - IntegrationRuntimeType = integrationRuntimeType; - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/UnknownIntegrationRuntimeStatus.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/UnknownIntegrationRuntimeStatus.Serialization.cs deleted file mode 100644 index 51531cd6..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/UnknownIntegrationRuntimeStatus.Serialization.cs +++ /dev/null @@ -1,51 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - internal partial class UnknownIntegrationRuntimeStatus - { - internal static UnknownIntegrationRuntimeStatus DeserializeUnknownIntegrationRuntimeStatus(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - IntegrationRuntimeType type = "Unknown"; - Optional dataFactoryName = default; - Optional state = default; - IReadOnlyDictionary> additionalProperties = default; - Dictionary> additionalPropertiesDictionary = new Dictionary>(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("type"u8)) - { - type = new IntegrationRuntimeType(property.Value.GetString()); - continue; - } - if (property.NameEquals("dataFactoryName"u8)) - { - dataFactoryName = property.Value.GetString(); - continue; - } - if (property.NameEquals("state"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - state = new IntegrationRuntimeState(property.Value.GetString()); - continue; - } - additionalPropertiesDictionary.Add(property.Name, JsonSerializer.Deserialize>(property.Value.GetRawText())); - } - additionalProperties = additionalPropertiesDictionary; - return new UnknownIntegrationRuntimeStatus(type, dataFactoryName.Value, Optional.ToNullable(state), additionalProperties); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/UnknownIntegrationRuntimeStatus.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/UnknownIntegrationRuntimeStatus.cs deleted file mode 100644 index 212fc97e..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/UnknownIntegrationRuntimeStatus.cs +++ /dev/null @@ -1,22 +0,0 @@ -// - -#nullable disable - -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// The UnknownIntegrationRuntimeStatus. - internal partial class UnknownIntegrationRuntimeStatus : IntegrationRuntimeStatus - { - /// Initializes a new instance of UnknownIntegrationRuntimeStatus. - /// Type of integration runtime. - /// The data factory name which the integration runtime belong to. - /// The state of integration runtime. - /// Additional Properties. - internal UnknownIntegrationRuntimeStatus(IntegrationRuntimeType runtimeType, string dataFactoryName, IntegrationRuntimeState? state, IReadOnlyDictionary> additionalProperties) : base(runtimeType, dataFactoryName, state, additionalProperties) - { - RuntimeType = runtimeType; - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/UnknownLinkedIntegrationRuntimeType.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/UnknownLinkedIntegrationRuntimeType.Serialization.cs deleted file mode 100644 index 76dd08de..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/UnknownLinkedIntegrationRuntimeType.Serialization.cs +++ /dev/null @@ -1,38 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; - -namespace AzureDataFactory.TestingFramework.Models -{ - internal partial class UnknownLinkedIntegrationRuntimeType : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - writer.WritePropertyName("authorizationType"u8); - writer.WriteStringValue(AuthorizationType); - writer.WriteEndObject(); - } - - internal static UnknownLinkedIntegrationRuntimeType DeserializeUnknownLinkedIntegrationRuntimeType(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - string authorizationType = "Unknown"; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("authorizationType"u8)) - { - authorizationType = property.Value.GetString(); - continue; - } - } - return new UnknownLinkedIntegrationRuntimeType(authorizationType); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/UnknownLinkedIntegrationRuntimeType.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/UnknownLinkedIntegrationRuntimeType.cs deleted file mode 100644 index 5dcb6172..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/UnknownLinkedIntegrationRuntimeType.cs +++ /dev/null @@ -1,17 +0,0 @@ -// - -#nullable disable - -namespace AzureDataFactory.TestingFramework.Models -{ - /// The UnknownLinkedIntegrationRuntimeType. - internal partial class UnknownLinkedIntegrationRuntimeType : LinkedIntegrationRuntimeType - { - /// Initializes a new instance of UnknownLinkedIntegrationRuntimeType. - /// The authorization type for integration runtime sharing. - internal UnknownLinkedIntegrationRuntimeType(string authorizationType) : base(authorizationType) - { - AuthorizationType = authorizationType ?? "Unknown"; - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/UnknownLinkedService.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/UnknownLinkedService.Serialization.cs deleted file mode 100644 index c31bc754..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/UnknownLinkedService.Serialization.cs +++ /dev/null @@ -1,145 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - internal partial class UnknownLinkedService : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - writer.WritePropertyName("type"u8); - writer.WriteStringValue(LinkedServiceType); - if (Optional.IsDefined(ConnectVia)) - { - writer.WritePropertyName("connectVia"u8); - writer.WriteObjectValue(ConnectVia); - } - if (Optional.IsDefined(Description)) - { - writer.WritePropertyName("description"u8); - writer.WriteStringValue(Description); - } - if (Optional.IsCollectionDefined(Parameters)) - { - writer.WritePropertyName("parameters"u8); - writer.WriteStartObject(); - foreach (var item in Parameters) - { - writer.WritePropertyName(item.Key); - writer.WriteObjectValue(item.Value); - } - writer.WriteEndObject(); - } - if (Optional.IsCollectionDefined(Annotations)) - { - writer.WritePropertyName("annotations"u8); - writer.WriteStartArray(); - foreach (var item in Annotations) - { - if (item == null) - { - writer.WriteNullValue(); - continue; - } -#if NET6_0_OR_GREATER - writer.WriteRawValue(item); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.ToString()).RootElement); -#endif - } - writer.WriteEndArray(); - } - foreach (var item in AdditionalProperties) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.Value.ToString()).RootElement); -#endif - } - writer.WriteEndObject(); - } - - internal static UnknownLinkedService DeserializeUnknownLinkedService(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - string type = "Unknown"; - Optional connectVia = default; - Optional description = default; - Optional> parameters = default; - Optional> annotations = default; - IDictionary> additionalProperties = default; - Dictionary> additionalPropertiesDictionary = new Dictionary>(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("type"u8)) - { - type = property.Value.GetString(); - continue; - } - if (property.NameEquals("connectVia"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - connectVia = IntegrationRuntimeReference.DeserializeIntegrationRuntimeReference(property.Value); - continue; - } - if (property.NameEquals("description"u8)) - { - description = property.Value.GetString(); - continue; - } - if (property.NameEquals("parameters"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - Dictionary dictionary = new Dictionary(); - foreach (var property0 in property.Value.EnumerateObject()) - { - dictionary.Add(property0.Name, EntityParameterSpecification.DeserializeEntityParameterSpecification(property0.Value)); - } - parameters = dictionary; - continue; - } - if (property.NameEquals("annotations"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - if (item.ValueKind == JsonValueKind.Null) - { - array.Add(null); - } - else - { - array.Add(BinaryData.FromString(item.GetRawText())); - } - } - annotations = array; - continue; - } - additionalPropertiesDictionary.Add(property.Name, JsonSerializer.Deserialize>(property.Value.GetRawText())); - } - additionalProperties = additionalPropertiesDictionary; - return new UnknownLinkedService(type, connectVia.Value, description.Value, Optional.ToDictionary(parameters), Optional.ToList(annotations), additionalProperties); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/UnknownLinkedService.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/UnknownLinkedService.cs deleted file mode 100644 index 0926587d..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/UnknownLinkedService.cs +++ /dev/null @@ -1,24 +0,0 @@ -// - -#nullable disable - -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// The UnknownLinkedService. - internal partial class UnknownLinkedService : DataFactoryLinkedServiceProperties - { - /// Initializes a new instance of UnknownLinkedService. - /// Type of linked service. - /// The integration runtime reference. - /// Linked service description. - /// Parameters for linked service. - /// List of tags that can be used for describing the linked service. - /// Additional Properties. - internal UnknownLinkedService(string linkedServiceType, IntegrationRuntimeReference connectVia, string description, IDictionary parameters, IList annotations, IDictionary> additionalProperties) : base(linkedServiceType, connectVia, description, parameters, annotations, additionalProperties) - { - LinkedServiceType = linkedServiceType ?? "Unknown"; - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/UnknownSsisObjectMetadata.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/UnknownSsisObjectMetadata.Serialization.cs deleted file mode 100644 index 2caa5c47..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/UnknownSsisObjectMetadata.Serialization.cs +++ /dev/null @@ -1,52 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; - -namespace AzureDataFactory.TestingFramework.Models -{ - internal partial class UnknownSsisObjectMetadata - { - internal static UnknownSsisObjectMetadata DeserializeUnknownSsisObjectMetadata(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - SsisObjectMetadataType type = "Unknown"; - Optional id = default; - Optional name = default; - Optional description = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("type"u8)) - { - type = new SsisObjectMetadataType(property.Value.GetString()); - continue; - } - if (property.NameEquals("id"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - id = property.Value.GetInt64(); - continue; - } - if (property.NameEquals("name"u8)) - { - name = property.Value.GetString(); - continue; - } - if (property.NameEquals("description"u8)) - { - description = property.Value.GetString(); - continue; - } - } - return new UnknownSsisObjectMetadata(type, Optional.ToNullable(id), name.Value, description.Value); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/UnknownSsisObjectMetadata.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/UnknownSsisObjectMetadata.cs deleted file mode 100644 index 10843ffc..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/UnknownSsisObjectMetadata.cs +++ /dev/null @@ -1,20 +0,0 @@ -// - -#nullable disable - -namespace AzureDataFactory.TestingFramework.Models -{ - /// The UnknownSsisObjectMetadata. - internal partial class UnknownSsisObjectMetadata : SsisObjectMetadata - { - /// Initializes a new instance of UnknownSsisObjectMetadata. - /// Type of metadata. - /// Metadata id. - /// Metadata name. - /// Metadata description. - internal UnknownSsisObjectMetadata(SsisObjectMetadataType metadataType, long? id, string name, string description) : base(metadataType, id, name, description) - { - MetadataType = metadataType; - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/UnknownStoreReadSettings.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/UnknownStoreReadSettings.Serialization.cs deleted file mode 100644 index 06cd27b9..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/UnknownStoreReadSettings.Serialization.cs +++ /dev/null @@ -1,82 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - internal partial class UnknownStoreReadSettings : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - writer.WritePropertyName("type"u8); - writer.WriteStringValue(StoreReadSettingsType); - if (Optional.IsDefined(MaxConcurrentConnections)) - { - writer.WritePropertyName("maxConcurrentConnections"u8); - JsonSerializer.Serialize(writer, MaxConcurrentConnections); - } - if (Optional.IsDefined(DisableMetricsCollection)) - { - writer.WritePropertyName("disableMetricsCollection"u8); - JsonSerializer.Serialize(writer, DisableMetricsCollection); - } - foreach (var item in AdditionalProperties) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.Value.ToString()).RootElement); -#endif - } - writer.WriteEndObject(); - } - - internal static UnknownStoreReadSettings DeserializeUnknownStoreReadSettings(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - string type = "Unknown"; - Optional> maxConcurrentConnections = default; - Optional> disableMetricsCollection = default; - IDictionary> additionalProperties = default; - Dictionary> additionalPropertiesDictionary = new Dictionary>(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("type"u8)) - { - type = property.Value.GetString(); - continue; - } - if (property.NameEquals("maxConcurrentConnections"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - maxConcurrentConnections = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("disableMetricsCollection"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - disableMetricsCollection = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - additionalPropertiesDictionary.Add(property.Name, JsonSerializer.Deserialize>(property.Value.GetRawText())); - } - additionalProperties = additionalPropertiesDictionary; - return new UnknownStoreReadSettings(type, maxConcurrentConnections.Value, disableMetricsCollection.Value, additionalProperties); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/UnknownStoreReadSettings.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/UnknownStoreReadSettings.cs deleted file mode 100644 index 3f273ab9..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/UnknownStoreReadSettings.cs +++ /dev/null @@ -1,22 +0,0 @@ -// - -#nullable disable - -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// The UnknownStoreReadSettings. - internal partial class UnknownStoreReadSettings : StoreReadSettings - { - /// Initializes a new instance of UnknownStoreReadSettings. - /// The read setting type. - /// The maximum concurrent connection count for the source data store. Type: integer (or Expression with resultType integer). - /// If true, disable data store metrics collection. Default is false. Type: boolean (or Expression with resultType boolean). - /// Additional Properties. - internal UnknownStoreReadSettings(string storeReadSettingsType, DataFactoryElement maxConcurrentConnections, DataFactoryElement disableMetricsCollection, IDictionary> additionalProperties) : base(storeReadSettingsType, maxConcurrentConnections, disableMetricsCollection, additionalProperties) - { - StoreReadSettingsType = storeReadSettingsType ?? "Unknown"; - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/UnknownStoreWriteSettings.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/UnknownStoreWriteSettings.Serialization.cs deleted file mode 100644 index 62d9475a..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/UnknownStoreWriteSettings.Serialization.cs +++ /dev/null @@ -1,101 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - internal partial class UnknownStoreWriteSettings : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - writer.WritePropertyName("type"u8); - writer.WriteStringValue(StoreWriteSettingsType); - if (Optional.IsDefined(MaxConcurrentConnections)) - { - writer.WritePropertyName("maxConcurrentConnections"u8); - JsonSerializer.Serialize(writer, MaxConcurrentConnections); - } - if (Optional.IsDefined(DisableMetricsCollection)) - { - writer.WritePropertyName("disableMetricsCollection"u8); - JsonSerializer.Serialize(writer, DisableMetricsCollection); - } - if (Optional.IsDefined(CopyBehavior)) - { - writer.WritePropertyName("copyBehavior"u8); -#if NET6_0_OR_GREATER - writer.WriteRawValue(CopyBehavior); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(CopyBehavior.ToString()).RootElement); -#endif - } - foreach (var item in AdditionalProperties) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.Value.ToString()).RootElement); -#endif - } - writer.WriteEndObject(); - } - - internal static UnknownStoreWriteSettings DeserializeUnknownStoreWriteSettings(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - string type = "Unknown"; - Optional> maxConcurrentConnections = default; - Optional> disableMetricsCollection = default; - Optional copyBehavior = default; - IDictionary> additionalProperties = default; - Dictionary> additionalPropertiesDictionary = new Dictionary>(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("type"u8)) - { - type = property.Value.GetString(); - continue; - } - if (property.NameEquals("maxConcurrentConnections"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - maxConcurrentConnections = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("disableMetricsCollection"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - disableMetricsCollection = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("copyBehavior"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - copyBehavior = BinaryData.FromString(property.Value.GetRawText()); - continue; - } - additionalPropertiesDictionary.Add(property.Name, JsonSerializer.Deserialize>(property.Value.GetRawText())); - } - additionalProperties = additionalPropertiesDictionary; - return new UnknownStoreWriteSettings(type, maxConcurrentConnections.Value, disableMetricsCollection.Value, copyBehavior.Value, additionalProperties); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/UnknownStoreWriteSettings.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/UnknownStoreWriteSettings.cs deleted file mode 100644 index 48e77eec..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/UnknownStoreWriteSettings.cs +++ /dev/null @@ -1,23 +0,0 @@ -// - -#nullable disable - -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// The UnknownStoreWriteSettings. - internal partial class UnknownStoreWriteSettings : StoreWriteSettings - { - /// Initializes a new instance of UnknownStoreWriteSettings. - /// The write setting type. - /// The maximum concurrent connection count for the source data store. Type: integer (or Expression with resultType integer). - /// If true, disable data store metrics collection. Default is false. Type: boolean (or Expression with resultType boolean). - /// The type of copy behavior for copy sink. - /// Additional Properties. - internal UnknownStoreWriteSettings(string storeWriteSettingsType, DataFactoryElement maxConcurrentConnections, DataFactoryElement disableMetricsCollection, BinaryData copyBehavior, IDictionary> additionalProperties) : base(storeWriteSettingsType, maxConcurrentConnections, disableMetricsCollection, copyBehavior, additionalProperties) - { - StoreWriteSettingsType = storeWriteSettingsType ?? "Unknown"; - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/UnknownTrigger.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/UnknownTrigger.Serialization.cs deleted file mode 100644 index bac382d7..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/UnknownTrigger.Serialization.cs +++ /dev/null @@ -1,114 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - internal partial class UnknownTrigger : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - writer.WritePropertyName("type"u8); - writer.WriteStringValue(TriggerType); - if (Optional.IsDefined(Description)) - { - writer.WritePropertyName("description"u8); - writer.WriteStringValue(Description); - } - if (Optional.IsCollectionDefined(Annotations)) - { - writer.WritePropertyName("annotations"u8); - writer.WriteStartArray(); - foreach (var item in Annotations) - { - if (item == null) - { - writer.WriteNullValue(); - continue; - } -#if NET6_0_OR_GREATER - writer.WriteRawValue(item); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.ToString()).RootElement); -#endif - } - writer.WriteEndArray(); - } - foreach (var item in AdditionalProperties) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.Value.ToString()).RootElement); -#endif - } - writer.WriteEndObject(); - } - - internal static UnknownTrigger DeserializeUnknownTrigger(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - string type = "Unknown"; - Optional description = default; - Optional runtimeState = default; - Optional> annotations = default; - IDictionary> additionalProperties = default; - Dictionary> additionalPropertiesDictionary = new Dictionary>(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("type"u8)) - { - type = property.Value.GetString(); - continue; - } - if (property.NameEquals("description"u8)) - { - description = property.Value.GetString(); - continue; - } - if (property.NameEquals("runtimeState"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - runtimeState = new DataFactoryTriggerRuntimeState(property.Value.GetString()); - continue; - } - if (property.NameEquals("annotations"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - if (item.ValueKind == JsonValueKind.Null) - { - array.Add(null); - } - else - { - array.Add(BinaryData.FromString(item.GetRawText())); - } - } - annotations = array; - continue; - } - additionalPropertiesDictionary.Add(property.Name, JsonSerializer.Deserialize>(property.Value.GetRawText())); - } - additionalProperties = additionalPropertiesDictionary; - return new UnknownTrigger(type, description.Value, Optional.ToNullable(runtimeState), Optional.ToList(annotations), additionalProperties); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/UnknownTrigger.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/UnknownTrigger.cs deleted file mode 100644 index e6362f01..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/UnknownTrigger.cs +++ /dev/null @@ -1,23 +0,0 @@ -// - -#nullable disable - -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// The UnknownTrigger. - internal partial class UnknownTrigger : DataFactoryTriggerProperties - { - /// Initializes a new instance of UnknownTrigger. - /// Trigger type. - /// Trigger description. - /// Indicates if trigger is running or not. Updated when Start/Stop APIs are called on the Trigger. - /// List of tags that can be used for describing the trigger. - /// Additional Properties. - internal UnknownTrigger(string triggerType, string description, DataFactoryTriggerRuntimeState? runtimeState, IList annotations, IDictionary> additionalProperties) : base(triggerType, description, runtimeState, annotations, additionalProperties) - { - TriggerType = triggerType ?? "Unknown"; - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/UnknownWebLinkedServiceTypeProperties.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/UnknownWebLinkedServiceTypeProperties.Serialization.cs deleted file mode 100644 index 7e16e00a..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/UnknownWebLinkedServiceTypeProperties.Serialization.cs +++ /dev/null @@ -1,47 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - internal partial class UnknownWebLinkedServiceTypeProperties : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - writer.WritePropertyName("url"u8); - JsonSerializer.Serialize(writer, Uri); - writer.WritePropertyName("authenticationType"u8); - writer.WriteStringValue(AuthenticationType.ToString()); - writer.WriteEndObject(); - } - - internal static UnknownWebLinkedServiceTypeProperties DeserializeUnknownWebLinkedServiceTypeProperties(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - DataFactoryElement url = default; - WebAuthenticationType authenticationType = "Unknown"; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("url"u8)) - { - url = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("authenticationType"u8)) - { - authenticationType = new WebAuthenticationType(property.Value.GetString()); - continue; - } - } - return new UnknownWebLinkedServiceTypeProperties(url, authenticationType); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/UnknownWebLinkedServiceTypeProperties.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/UnknownWebLinkedServiceTypeProperties.cs deleted file mode 100644 index 87268ac4..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/UnknownWebLinkedServiceTypeProperties.cs +++ /dev/null @@ -1,20 +0,0 @@ -// - -#nullable disable - -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// The UnknownWebLinkedServiceTypeProperties. - internal partial class UnknownWebLinkedServiceTypeProperties : WebLinkedServiceTypeProperties - { - /// Initializes a new instance of UnknownWebLinkedServiceTypeProperties. - /// The URL of the web service endpoint, e.g. https://www.microsoft.com . Type: string (or Expression with resultType string). - /// Type of authentication used to connect to the web table source. - internal UnknownWebLinkedServiceTypeProperties(DataFactoryElement uri, WebAuthenticationType authenticationType) : base(uri, authenticationType) - { - AuthenticationType = authenticationType; - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/UntilActivity.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/UntilActivity.Serialization.cs deleted file mode 100644 index f1d2b5af..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/UntilActivity.Serialization.cs +++ /dev/null @@ -1,207 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class UntilActivity : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ActivityType); - if (Optional.IsDefined(Description)) - { - writer.WritePropertyName("description"u8); - writer.WriteStringValue(Description); - } - if (Optional.IsDefined(State)) - { - writer.WritePropertyName("state"u8); - writer.WriteStringValue(State.Value.ToString()); - } - if (Optional.IsDefined(OnInactiveMarkAs)) - { - writer.WritePropertyName("onInactiveMarkAs"u8); - writer.WriteStringValue(OnInactiveMarkAs.Value.ToString()); - } - if (Optional.IsCollectionDefined(DependsOn)) - { - writer.WritePropertyName("dependsOn"u8); - writer.WriteStartArray(); - foreach (var item in DependsOn) - { - writer.WriteObjectValue(item); - } - writer.WriteEndArray(); - } - if (Optional.IsCollectionDefined(UserProperties)) - { - writer.WritePropertyName("userProperties"u8); - writer.WriteStartArray(); - foreach (var item in UserProperties) - { - writer.WriteObjectValue(item); - } - writer.WriteEndArray(); - } - writer.WritePropertyName("typeProperties"u8); - writer.WriteStartObject(); - writer.WritePropertyName("expression"u8); - writer.WriteObjectValue(Expression); - if (Optional.IsDefined(Timeout)) - { - writer.WritePropertyName("timeout"u8); - JsonSerializer.Serialize(writer, Timeout); - } - writer.WritePropertyName("activities"u8); - writer.WriteStartArray(); - foreach (var item in Activities) - { - writer.WriteObjectValue(item); - } - writer.WriteEndArray(); - writer.WriteEndObject(); - foreach (var item in AdditionalProperties) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.Value.ToString()).RootElement); -#endif - } - writer.WriteEndObject(); - } - - internal static UntilActivity DeserializeUntilActivity(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - string name = default; - string type = default; - Optional description = default; - Optional state = default; - Optional onInactiveMarkAs = default; - Optional> dependsOn = default; - Optional> userProperties = default; - DataFactoryExpression expression = default; - Optional> timeout = default; - IList activities = default; - IDictionary> additionalProperties = default; - Dictionary> additionalPropertiesDictionary = new Dictionary>(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("name"u8)) - { - name = property.Value.GetString(); - continue; - } - if (property.NameEquals("type"u8)) - { - type = property.Value.GetString(); - continue; - } - if (property.NameEquals("description"u8)) - { - description = property.Value.GetString(); - continue; - } - if (property.NameEquals("state"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - state = new PipelineActivityState(property.Value.GetString()); - continue; - } - if (property.NameEquals("onInactiveMarkAs"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - onInactiveMarkAs = new ActivityOnInactiveMarkAs(property.Value.GetString()); - continue; - } - if (property.NameEquals("dependsOn"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - array.Add(PipelineActivityDependency.DeserializePipelineActivityDependency(item)); - } - dependsOn = array; - continue; - } - if (property.NameEquals("userProperties"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - array.Add(PipelineActivityUserProperty.DeserializePipelineActivityUserProperty(item)); - } - userProperties = array; - continue; - } - if (property.NameEquals("typeProperties"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - foreach (var property0 in property.Value.EnumerateObject()) - { - if (property0.NameEquals("expression"u8)) - { - expression = DataFactoryExpression.DeserializeDataFactoryExpression(property0.Value); - continue; - } - if (property0.NameEquals("timeout"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - timeout = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("activities"u8)) - { - List array = new List(); - foreach (var item in property0.Value.EnumerateArray()) - { - array.Add(DeserializePipelineActivity(item)); - } - activities = array; - continue; - } - } - continue; - } - additionalPropertiesDictionary.Add(property.Name, JsonSerializer.Deserialize>(property.Value.GetRawText())); - } - additionalProperties = additionalPropertiesDictionary; - return new UntilActivity(name, type, description.Value, Optional.ToNullable(state), Optional.ToNullable(onInactiveMarkAs), Optional.ToList(dependsOn), Optional.ToList(userProperties), additionalProperties, expression, timeout.Value, activities); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/UntilActivity.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/UntilActivity.cs deleted file mode 100644 index 5d98e724..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/UntilActivity.cs +++ /dev/null @@ -1,68 +0,0 @@ -// - -#nullable disable - -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// This activity executes inner activities until the specified boolean expression results to true or timeout is reached, whichever is earlier. - public partial class UntilActivity : ControlActivity - { - /// Initializes a new instance of UntilActivity. - /// Activity name. - /// An expression that would evaluate to Boolean. The loop will continue until this expression evaluates to true. - /// - /// List of activities to execute. - /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. - /// The available derived classes include , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , and . - /// - /// , or is null. - public UntilActivity(string name, DataFactoryExpression expression, IEnumerable activities) : base(name) - { - Argument.AssertNotNull(name, nameof(name)); - Argument.AssertNotNull(expression, nameof(expression)); - Argument.AssertNotNull(activities, nameof(activities)); - - Expression = expression; - Activities = activities.ToList(); - ActivityType = "Until"; - } - - /// Initializes a new instance of UntilActivity. - /// Activity name. - /// Type of activity. - /// Activity description. - /// Activity state. This is an optional property and if not provided, the state will be Active by default. - /// 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. - /// Activity depends on condition. - /// Activity user properties. - /// Additional Properties. - /// An expression that would evaluate to Boolean. The loop will continue until this expression evaluates to true. - /// Specifies the timeout for the activity to run. If there is no value specified, it takes the value of TimeSpan.FromDays(7) which is 1 week as default. Type: string (or Expression with resultType string), pattern: ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). - /// - /// List of activities to execute. - /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. - /// The available derived classes include , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , and . - /// - internal UntilActivity(string name, string activityType, string description, PipelineActivityState? state, ActivityOnInactiveMarkAs? onInactiveMarkAs, IList dependsOn, IList userProperties, IDictionary> additionalProperties, DataFactoryExpression expression, DataFactoryElement timeout, IList activities) : base(name, activityType, description, state, onInactiveMarkAs, dependsOn, userProperties, additionalProperties) - { - Expression = expression; - Timeout = timeout; - Activities = activities; - ActivityType = activityType ?? "Until"; - } - - /// An expression that would evaluate to Boolean. The loop will continue until this expression evaluates to true. - public DataFactoryExpression Expression { get; set; } - /// Specifies the timeout for the activity to run. If there is no value specified, it takes the value of TimeSpan.FromDays(7) which is 1 week as default. Type: string (or Expression with resultType string), pattern: ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). - public DataFactoryElement Timeout { get; set; } - /// - /// List of activities to execute. - /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. - /// The available derived classes include , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , and . - /// - public IList Activities { get; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/UpdateIntegrationRuntimeNodeContent.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/UpdateIntegrationRuntimeNodeContent.Serialization.cs deleted file mode 100644 index 3186e9fe..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/UpdateIntegrationRuntimeNodeContent.Serialization.cs +++ /dev/null @@ -1,23 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class UpdateIntegrationRuntimeNodeContent : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - if (Optional.IsDefined(ConcurrentJobsLimit)) - { - writer.WritePropertyName("concurrentJobsLimit"u8); - writer.WriteNumberValue(ConcurrentJobsLimit.Value); - } - writer.WriteEndObject(); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/UpdateIntegrationRuntimeNodeContent.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/UpdateIntegrationRuntimeNodeContent.cs deleted file mode 100644 index 2ff73b72..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/UpdateIntegrationRuntimeNodeContent.cs +++ /dev/null @@ -1,18 +0,0 @@ -// - -#nullable disable - -namespace AzureDataFactory.TestingFramework.Models -{ - /// Update integration runtime node request. - public partial class UpdateIntegrationRuntimeNodeContent - { - /// Initializes a new instance of UpdateIntegrationRuntimeNodeContent. - public UpdateIntegrationRuntimeNodeContent() - { - } - - /// The number of concurrent jobs permitted to run on the integration runtime node. Values between 1 and maxConcurrentJobs(inclusive) are allowed. - public int? ConcurrentJobsLimit { get; set; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/ValidationActivity.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/ValidationActivity.Serialization.cs deleted file mode 100644 index bfe7563c..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/ValidationActivity.Serialization.cs +++ /dev/null @@ -1,234 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class ValidationActivity : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ActivityType); - if (Optional.IsDefined(Description)) - { - writer.WritePropertyName("description"u8); - writer.WriteStringValue(Description); - } - if (Optional.IsDefined(State)) - { - writer.WritePropertyName("state"u8); - writer.WriteStringValue(State.Value.ToString()); - } - if (Optional.IsDefined(OnInactiveMarkAs)) - { - writer.WritePropertyName("onInactiveMarkAs"u8); - writer.WriteStringValue(OnInactiveMarkAs.Value.ToString()); - } - if (Optional.IsCollectionDefined(DependsOn)) - { - writer.WritePropertyName("dependsOn"u8); - writer.WriteStartArray(); - foreach (var item in DependsOn) - { - writer.WriteObjectValue(item); - } - writer.WriteEndArray(); - } - if (Optional.IsCollectionDefined(UserProperties)) - { - writer.WritePropertyName("userProperties"u8); - writer.WriteStartArray(); - foreach (var item in UserProperties) - { - writer.WriteObjectValue(item); - } - writer.WriteEndArray(); - } - writer.WritePropertyName("typeProperties"u8); - writer.WriteStartObject(); - if (Optional.IsDefined(Timeout)) - { - writer.WritePropertyName("timeout"u8); - JsonSerializer.Serialize(writer, Timeout); - } - if (Optional.IsDefined(Sleep)) - { - writer.WritePropertyName("sleep"u8); - JsonSerializer.Serialize(writer, Sleep); - } - if (Optional.IsDefined(MinimumSize)) - { - writer.WritePropertyName("minimumSize"u8); - JsonSerializer.Serialize(writer, MinimumSize); - } - if (Optional.IsDefined(ChildItems)) - { - writer.WritePropertyName("childItems"u8); - JsonSerializer.Serialize(writer, ChildItems); - } - writer.WritePropertyName("dataset"u8); - writer.WriteObjectValue(Dataset); - writer.WriteEndObject(); - foreach (var item in AdditionalProperties) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.Value.ToString()).RootElement); -#endif - } - writer.WriteEndObject(); - } - - internal static ValidationActivity DeserializeValidationActivity(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - string name = default; - string type = default; - Optional description = default; - Optional state = default; - Optional onInactiveMarkAs = default; - Optional> dependsOn = default; - Optional> userProperties = default; - Optional> timeout = default; - Optional> sleep = default; - Optional> minimumSize = default; - Optional> childItems = default; - DatasetReference dataset = default; - IDictionary> additionalProperties = default; - Dictionary> additionalPropertiesDictionary = new Dictionary>(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("name"u8)) - { - name = property.Value.GetString(); - continue; - } - if (property.NameEquals("type"u8)) - { - type = property.Value.GetString(); - continue; - } - if (property.NameEquals("description"u8)) - { - description = property.Value.GetString(); - continue; - } - if (property.NameEquals("state"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - state = new PipelineActivityState(property.Value.GetString()); - continue; - } - if (property.NameEquals("onInactiveMarkAs"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - onInactiveMarkAs = new ActivityOnInactiveMarkAs(property.Value.GetString()); - continue; - } - if (property.NameEquals("dependsOn"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - array.Add(PipelineActivityDependency.DeserializePipelineActivityDependency(item)); - } - dependsOn = array; - continue; - } - if (property.NameEquals("userProperties"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - array.Add(PipelineActivityUserProperty.DeserializePipelineActivityUserProperty(item)); - } - userProperties = array; - continue; - } - if (property.NameEquals("typeProperties"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - foreach (var property0 in property.Value.EnumerateObject()) - { - if (property0.NameEquals("timeout"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - timeout = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("sleep"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - sleep = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("minimumSize"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - minimumSize = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("childItems"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - childItems = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("dataset"u8)) - { - dataset = DatasetReference.DeserializeDatasetReference(property0.Value); - continue; - } - } - continue; - } - additionalPropertiesDictionary.Add(property.Name, JsonSerializer.Deserialize>(property.Value.GetRawText())); - } - additionalProperties = additionalPropertiesDictionary; - return new ValidationActivity(name, type, description.Value, Optional.ToNullable(state), Optional.ToNullable(onInactiveMarkAs), Optional.ToList(dependsOn), Optional.ToList(userProperties), additionalProperties, timeout.Value, sleep.Value, minimumSize.Value, childItems.Value, dataset); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/ValidationActivity.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/ValidationActivity.cs deleted file mode 100644 index 0c885ddd..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/ValidationActivity.cs +++ /dev/null @@ -1,61 +0,0 @@ -// - -#nullable disable - -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// This activity verifies that an external resource exists. - public partial class ValidationActivity : ControlActivity - { - /// Initializes a new instance of ValidationActivity. - /// Activity name. - /// Validation activity dataset reference. - /// or is null. - public ValidationActivity(string name, DatasetReference dataset) : base(name) - { - Argument.AssertNotNull(name, nameof(name)); - Argument.AssertNotNull(dataset, nameof(dataset)); - - Dataset = dataset; - ActivityType = "Validation"; - } - - /// Initializes a new instance of ValidationActivity. - /// Activity name. - /// Type of activity. - /// Activity description. - /// Activity state. This is an optional property and if not provided, the state will be Active by default. - /// 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. - /// Activity depends on condition. - /// Activity user properties. - /// Additional Properties. - /// Specifies the timeout for the activity to run. If there is no value specified, it takes the value of TimeSpan.FromDays(7) which is 1 week as default. Type: string (or Expression with resultType string), pattern: ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). - /// A delay in seconds between validation attempts. If no value is specified, 10 seconds will be used as the default. Type: integer (or Expression with resultType integer). - /// Can be used if dataset points to a file. The file must be greater than or equal in size to the value specified. Type: integer (or Expression with resultType integer). - /// Can be used if dataset points to a folder. If set to true, the folder must have at least one file. If set to false, the folder must be empty. Type: boolean (or Expression with resultType boolean). - /// Validation activity dataset reference. - internal ValidationActivity(string name, string activityType, string description, PipelineActivityState? state, ActivityOnInactiveMarkAs? onInactiveMarkAs, IList dependsOn, IList userProperties, IDictionary> additionalProperties, DataFactoryElement timeout, DataFactoryElement sleep, DataFactoryElement minimumSize, DataFactoryElement childItems, DatasetReference dataset) : base(name, activityType, description, state, onInactiveMarkAs, dependsOn, userProperties, additionalProperties) - { - Timeout = timeout; - Sleep = sleep; - MinimumSize = minimumSize; - ChildItems = childItems; - Dataset = dataset; - ActivityType = activityType ?? "Validation"; - } - - /// Specifies the timeout for the activity to run. If there is no value specified, it takes the value of TimeSpan.FromDays(7) which is 1 week as default. Type: string (or Expression with resultType string), pattern: ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). - public DataFactoryElement Timeout { get; set; } - /// A delay in seconds between validation attempts. If no value is specified, 10 seconds will be used as the default. Type: integer (or Expression with resultType integer). - public DataFactoryElement Sleep { get; set; } - /// Can be used if dataset points to a file. The file must be greater than or equal in size to the value specified. Type: integer (or Expression with resultType integer). - public DataFactoryElement MinimumSize { get; set; } - /// Can be used if dataset points to a folder. If set to true, the folder must have at least one file. If set to false, the folder must be empty. Type: boolean (or Expression with resultType boolean). - public DataFactoryElement ChildItems { get; set; } - /// Validation activity dataset reference. - public DatasetReference Dataset { get; set; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/VerticaLinkedService.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/VerticaLinkedService.Serialization.cs deleted file mode 100644 index 9e9f90cd..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/VerticaLinkedService.Serialization.cs +++ /dev/null @@ -1,201 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class VerticaLinkedService : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - writer.WritePropertyName("type"u8); - writer.WriteStringValue(LinkedServiceType); - if (Optional.IsDefined(ConnectVia)) - { - writer.WritePropertyName("connectVia"u8); - writer.WriteObjectValue(ConnectVia); - } - if (Optional.IsDefined(Description)) - { - writer.WritePropertyName("description"u8); - writer.WriteStringValue(Description); - } - if (Optional.IsCollectionDefined(Parameters)) - { - writer.WritePropertyName("parameters"u8); - writer.WriteStartObject(); - foreach (var item in Parameters) - { - writer.WritePropertyName(item.Key); - writer.WriteObjectValue(item.Value); - } - writer.WriteEndObject(); - } - if (Optional.IsCollectionDefined(Annotations)) - { - writer.WritePropertyName("annotations"u8); - writer.WriteStartArray(); - foreach (var item in Annotations) - { - if (item == null) - { - writer.WriteNullValue(); - continue; - } -#if NET6_0_OR_GREATER - writer.WriteRawValue(item); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.ToString()).RootElement); -#endif - } - writer.WriteEndArray(); - } - writer.WritePropertyName("typeProperties"u8); - writer.WriteStartObject(); - if (Optional.IsDefined(ConnectionString)) - { - writer.WritePropertyName("connectionString"u8); - JsonSerializer.Serialize(writer, ConnectionString); - } - if (Optional.IsDefined(Password)) - { - writer.WritePropertyName("pwd"u8); - JsonSerializer.Serialize(writer, Password); - } - if (Optional.IsDefined(EncryptedCredential)) - { - writer.WritePropertyName("encryptedCredential"u8); - writer.WriteStringValue(EncryptedCredential); - } - writer.WriteEndObject(); - foreach (var item in AdditionalProperties) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.Value.ToString()).RootElement); -#endif - } - writer.WriteEndObject(); - } - - internal static VerticaLinkedService DeserializeVerticaLinkedService(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - string type = default; - Optional connectVia = default; - Optional description = default; - Optional> parameters = default; - Optional> annotations = default; - Optional> connectionString = default; - Optional password = default; - Optional encryptedCredential = default; - IDictionary> additionalProperties = default; - Dictionary> additionalPropertiesDictionary = new Dictionary>(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("type"u8)) - { - type = property.Value.GetString(); - continue; - } - if (property.NameEquals("connectVia"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - connectVia = IntegrationRuntimeReference.DeserializeIntegrationRuntimeReference(property.Value); - continue; - } - if (property.NameEquals("description"u8)) - { - description = property.Value.GetString(); - continue; - } - if (property.NameEquals("parameters"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - Dictionary dictionary = new Dictionary(); - foreach (var property0 in property.Value.EnumerateObject()) - { - dictionary.Add(property0.Name, EntityParameterSpecification.DeserializeEntityParameterSpecification(property0.Value)); - } - parameters = dictionary; - continue; - } - if (property.NameEquals("annotations"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - if (item.ValueKind == JsonValueKind.Null) - { - array.Add(null); - } - else - { - array.Add(BinaryData.FromString(item.GetRawText())); - } - } - annotations = array; - continue; - } - if (property.NameEquals("typeProperties"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - foreach (var property0 in property.Value.EnumerateObject()) - { - if (property0.NameEquals("connectionString"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - connectionString = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("pwd"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - password = JsonSerializer.Deserialize(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("encryptedCredential"u8)) - { - encryptedCredential = property0.Value.GetString(); - continue; - } - } - continue; - } - additionalPropertiesDictionary.Add(property.Name, JsonSerializer.Deserialize>(property.Value.GetRawText())); - } - additionalProperties = additionalPropertiesDictionary; - return new VerticaLinkedService(type, connectVia.Value, description.Value, Optional.ToDictionary(parameters), Optional.ToList(annotations), additionalProperties, connectionString.Value, password, encryptedCredential.Value); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/VerticaLinkedService.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/VerticaLinkedService.cs deleted file mode 100644 index 2eb8dbbf..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/VerticaLinkedService.cs +++ /dev/null @@ -1,43 +0,0 @@ -// - -#nullable disable - -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// Vertica linked service. - public partial class VerticaLinkedService : DataFactoryLinkedServiceProperties - { - /// Initializes a new instance of VerticaLinkedService. - public VerticaLinkedService() - { - LinkedServiceType = "Vertica"; - } - - /// Initializes a new instance of VerticaLinkedService. - /// Type of linked service. - /// The integration runtime reference. - /// Linked service description. - /// Parameters for linked service. - /// List of tags that can be used for describing the linked service. - /// Additional Properties. - /// An ODBC connection string. Type: string, SecureString or AzureKeyVaultSecretReference. - /// The Azure key vault secret reference of password in connection string. - /// The encrypted credential used for authentication. Credentials are encrypted using the integration runtime credential manager. Type: string. - internal VerticaLinkedService(string linkedServiceType, IntegrationRuntimeReference connectVia, string description, IDictionary parameters, IList annotations, IDictionary> additionalProperties, DataFactoryElement connectionString, DataFactoryKeyVaultSecretReference password, string encryptedCredential) : base(linkedServiceType, connectVia, description, parameters, annotations, additionalProperties) - { - ConnectionString = connectionString; - Password = password; - EncryptedCredential = encryptedCredential; - LinkedServiceType = linkedServiceType ?? "Vertica"; - } - - /// An ODBC connection string. Type: string, SecureString or AzureKeyVaultSecretReference. - public DataFactoryElement ConnectionString { get; set; } - /// The Azure key vault secret reference of password in connection string. - public DataFactoryKeyVaultSecretReference Password { get; set; } - /// The encrypted credential used for authentication. Credentials are encrypted using the integration runtime credential manager. Type: string. - public string EncryptedCredential { get; set; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/VerticaSource.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/VerticaSource.Serialization.cs deleted file mode 100644 index 546eb401..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/VerticaSource.Serialization.cs +++ /dev/null @@ -1,161 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class VerticaSource : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - if (Optional.IsDefined(Query)) - { - writer.WritePropertyName("query"u8); - JsonSerializer.Serialize(writer, Query); - } - if (Optional.IsDefined(QueryTimeout)) - { - writer.WritePropertyName("queryTimeout"u8); - JsonSerializer.Serialize(writer, QueryTimeout); - } - if (Optional.IsDefined(AdditionalColumns)) - { - writer.WritePropertyName("additionalColumns"u8); -#if NET6_0_OR_GREATER - writer.WriteRawValue(AdditionalColumns); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(AdditionalColumns.ToString()).RootElement); -#endif - } - writer.WritePropertyName("type"u8); - writer.WriteStringValue(CopySourceType); - if (Optional.IsDefined(SourceRetryCount)) - { - writer.WritePropertyName("sourceRetryCount"u8); - JsonSerializer.Serialize(writer, SourceRetryCount); - } - if (Optional.IsDefined(SourceRetryWait)) - { - writer.WritePropertyName("sourceRetryWait"u8); - JsonSerializer.Serialize(writer, SourceRetryWait); - } - if (Optional.IsDefined(MaxConcurrentConnections)) - { - writer.WritePropertyName("maxConcurrentConnections"u8); - JsonSerializer.Serialize(writer, MaxConcurrentConnections); - } - if (Optional.IsDefined(DisableMetricsCollection)) - { - writer.WritePropertyName("disableMetricsCollection"u8); - JsonSerializer.Serialize(writer, DisableMetricsCollection); - } - foreach (var item in AdditionalProperties) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.Value.ToString()).RootElement); -#endif - } - writer.WriteEndObject(); - } - - internal static VerticaSource DeserializeVerticaSource(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - Optional> query = default; - Optional> queryTimeout = default; - Optional additionalColumns = default; - string type = default; - Optional> sourceRetryCount = default; - Optional> sourceRetryWait = default; - Optional> maxConcurrentConnections = default; - Optional> disableMetricsCollection = default; - IDictionary> additionalProperties = default; - Dictionary> additionalPropertiesDictionary = new Dictionary>(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("query"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - query = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("queryTimeout"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - queryTimeout = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("additionalColumns"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - additionalColumns = BinaryData.FromString(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("type"u8)) - { - type = property.Value.GetString(); - continue; - } - if (property.NameEquals("sourceRetryCount"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - sourceRetryCount = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("sourceRetryWait"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - sourceRetryWait = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("maxConcurrentConnections"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - maxConcurrentConnections = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("disableMetricsCollection"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - disableMetricsCollection = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - additionalPropertiesDictionary.Add(property.Name, JsonSerializer.Deserialize>(property.Value.GetRawText())); - } - additionalProperties = additionalPropertiesDictionary; - return new VerticaSource(type, sourceRetryCount.Value, sourceRetryWait.Value, maxConcurrentConnections.Value, disableMetricsCollection.Value, additionalProperties, queryTimeout.Value, additionalColumns.Value, query.Value); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/VerticaSource.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/VerticaSource.cs deleted file mode 100644 index 27f7536b..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/VerticaSource.cs +++ /dev/null @@ -1,37 +0,0 @@ -// - -#nullable disable - -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// A copy activity Vertica source. - public partial class VerticaSource : TabularSource - { - /// Initializes a new instance of VerticaSource. - public VerticaSource() - { - CopySourceType = "VerticaSource"; - } - - /// Initializes a new instance of VerticaSource. - /// Copy source type. - /// Source retry count. Type: integer (or Expression with resultType integer). - /// Source retry wait. Type: string (or Expression with resultType string), pattern: ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). - /// The maximum concurrent connection count for the source data store. Type: integer (or Expression with resultType integer). - /// If true, disable data store metrics collection. Default is false. Type: boolean (or Expression with resultType boolean). - /// Additional Properties. - /// 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). - /// A query to retrieve data from source. Type: string (or Expression with resultType string). - internal VerticaSource(string copySourceType, DataFactoryElement sourceRetryCount, DataFactoryElement sourceRetryWait, DataFactoryElement maxConcurrentConnections, DataFactoryElement disableMetricsCollection, IDictionary> additionalProperties, DataFactoryElement queryTimeout, BinaryData additionalColumns, DataFactoryElement query) : base(copySourceType, sourceRetryCount, sourceRetryWait, maxConcurrentConnections, disableMetricsCollection, additionalProperties, queryTimeout, additionalColumns) - { - Query = query; - CopySourceType = copySourceType ?? "VerticaSource"; - } - - /// A query to retrieve data from source. Type: string (or Expression with resultType string). - public DataFactoryElement Query { get; set; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/VerticaTableDataset.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/VerticaTableDataset.Serialization.cs deleted file mode 100644 index 6b76de8c..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/VerticaTableDataset.Serialization.cs +++ /dev/null @@ -1,246 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class VerticaTableDataset : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - writer.WritePropertyName("type"u8); - writer.WriteStringValue(DatasetType); - if (Optional.IsDefined(Description)) - { - writer.WritePropertyName("description"u8); - writer.WriteStringValue(Description); - } - if (Optional.IsDefined(Structure)) - { - writer.WritePropertyName("structure"u8); - JsonSerializer.Serialize(writer, Structure); - } - if (Optional.IsDefined(Schema)) - { - writer.WritePropertyName("schema"u8); - JsonSerializer.Serialize(writer, Schema); - } - writer.WritePropertyName("linkedServiceName"u8); - JsonSerializer.Serialize(writer, LinkedServiceName); if (Optional.IsCollectionDefined(Parameters)) - { - writer.WritePropertyName("parameters"u8); - writer.WriteStartObject(); - foreach (var item in Parameters) - { - writer.WritePropertyName(item.Key); - writer.WriteObjectValue(item.Value); - } - writer.WriteEndObject(); - } - if (Optional.IsCollectionDefined(Annotations)) - { - writer.WritePropertyName("annotations"u8); - writer.WriteStartArray(); - foreach (var item in Annotations) - { - if (item == null) - { - writer.WriteNullValue(); - continue; - } -#if NET6_0_OR_GREATER - writer.WriteRawValue(item); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.ToString()).RootElement); -#endif - } - writer.WriteEndArray(); - } - if (Optional.IsDefined(Folder)) - { - writer.WritePropertyName("folder"u8); - writer.WriteObjectValue(Folder); - } - writer.WritePropertyName("typeProperties"u8); - writer.WriteStartObject(); - if (Optional.IsDefined(TableName)) - { - writer.WritePropertyName("tableName"u8); -#if NET6_0_OR_GREATER - writer.WriteRawValue(TableName); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(TableName.ToString()).RootElement); -#endif - } - if (Optional.IsDefined(Table)) - { - writer.WritePropertyName("table"u8); - JsonSerializer.Serialize(writer, Table); - } - if (Optional.IsDefined(SchemaTypePropertiesSchema)) - { - writer.WritePropertyName("schema"u8); - JsonSerializer.Serialize(writer, SchemaTypePropertiesSchema); - } - writer.WriteEndObject(); - foreach (var item in AdditionalProperties) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.Value.ToString()).RootElement); -#endif - } - writer.WriteEndObject(); - } - - internal static VerticaTableDataset DeserializeVerticaTableDataset(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - string type = default; - Optional description = default; - Optional>> structure = default; - Optional>> schema = default; - DataFactoryLinkedServiceReference linkedServiceName = default; - Optional> parameters = default; - Optional> annotations = default; - Optional folder = default; - Optional tableName = default; - Optional> table = default; - Optional> schema0 = default; - IDictionary> additionalProperties = default; - Dictionary> additionalPropertiesDictionary = new Dictionary>(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("type"u8)) - { - type = property.Value.GetString(); - continue; - } - if (property.NameEquals("description"u8)) - { - description = property.Value.GetString(); - continue; - } - if (property.NameEquals("structure"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - structure = JsonSerializer.Deserialize>>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("schema"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - schema = JsonSerializer.Deserialize>>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("linkedServiceName"u8)) - { - linkedServiceName = JsonSerializer.Deserialize(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("parameters"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - Dictionary dictionary = new Dictionary(); - foreach (var property0 in property.Value.EnumerateObject()) - { - dictionary.Add(property0.Name, EntityParameterSpecification.DeserializeEntityParameterSpecification(property0.Value)); - } - parameters = dictionary; - continue; - } - if (property.NameEquals("annotations"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - if (item.ValueKind == JsonValueKind.Null) - { - array.Add(null); - } - else - { - array.Add(BinaryData.FromString(item.GetRawText())); - } - } - annotations = array; - continue; - } - if (property.NameEquals("folder"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - folder = DatasetFolder.DeserializeDatasetFolder(property.Value); - continue; - } - if (property.NameEquals("typeProperties"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - foreach (var property0 in property.Value.EnumerateObject()) - { - if (property0.NameEquals("tableName"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - tableName = BinaryData.FromString(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("table"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - table = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("schema"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - schema0 = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - } - continue; - } - additionalPropertiesDictionary.Add(property.Name, JsonSerializer.Deserialize>(property.Value.GetRawText())); - } - additionalProperties = additionalPropertiesDictionary; - return new VerticaTableDataset(type, description.Value, structure.Value, schema.Value, linkedServiceName, Optional.ToDictionary(parameters), Optional.ToList(annotations), folder.Value, additionalProperties, tableName.Value, table.Value, schema0.Value); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/VerticaTableDataset.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/VerticaTableDataset.cs deleted file mode 100644 index 94c2fe17..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/VerticaTableDataset.cs +++ /dev/null @@ -1,80 +0,0 @@ -// - -#nullable disable - -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// Vertica dataset. - public partial class VerticaTableDataset : DataFactoryDatasetProperties - { - /// Initializes a new instance of VerticaTableDataset. - /// Linked service reference. - /// is null. - public VerticaTableDataset(DataFactoryLinkedServiceReference linkedServiceName) : base(linkedServiceName) - { - Argument.AssertNotNull(linkedServiceName, nameof(linkedServiceName)); - - DatasetType = "VerticaTable"; - } - - /// Initializes a new instance of VerticaTableDataset. - /// Type of dataset. - /// Dataset description. - /// Columns that define the structure of the dataset. Type: array (or Expression with resultType array), itemType: DatasetDataElement. - /// Columns that define the physical type schema of the dataset. Type: array (or Expression with resultType array), itemType: DatasetSchemaDataElement. - /// Linked service reference. - /// Parameters for dataset. - /// List of tags that can be used for describing the Dataset. - /// The folder that this Dataset is in. If not specified, Dataset will appear at the root level. - /// Additional Properties. - /// This property will be retired. Please consider using schema + table properties instead. - /// The table name of the Vertica. Type: string (or Expression with resultType string). - /// The schema name of the Vertica. Type: string (or Expression with resultType string). - internal VerticaTableDataset(string datasetType, string description, DataFactoryElement> structure, DataFactoryElement> schema, DataFactoryLinkedServiceReference linkedServiceName, IDictionary parameters, IList annotations, DatasetFolder folder, IDictionary> additionalProperties, BinaryData tableName, DataFactoryElement table, DataFactoryElement schemaTypePropertiesSchema) : base(datasetType, description, structure, schema, linkedServiceName, parameters, annotations, folder, additionalProperties) - { - TableName = tableName; - Table = table; - SchemaTypePropertiesSchema = schemaTypePropertiesSchema; - DatasetType = datasetType ?? "VerticaTable"; - } - - /// - /// This property will be retired. Please consider using schema + table properties instead. - /// - /// To assign an object to this property use . - /// - /// - /// To assign an already formated json string to this property use . - /// - /// - /// Examples: - /// - /// - /// BinaryData.FromObjectAsJson("foo") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromString("\"foo\"") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromObjectAsJson(new { key = "value" }) - /// Creates a payload of { "key": "value" }. - /// - /// - /// BinaryData.FromString("{\"key\": \"value\"}") - /// Creates a payload of { "key": "value" }. - /// - /// - /// - /// - public BinaryData TableName { get; set; } - /// The table name of the Vertica. Type: string (or Expression with resultType string). - public DataFactoryElement Table { get; set; } - /// The schema name of the Vertica. Type: string (or Expression with resultType string). - public DataFactoryElement SchemaTypePropertiesSchema { get; set; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/WaitActivity.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/WaitActivity.Serialization.cs deleted file mode 100644 index 4cbf1f91..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/WaitActivity.Serialization.cs +++ /dev/null @@ -1,174 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class WaitActivity : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ActivityType); - if (Optional.IsDefined(Description)) - { - writer.WritePropertyName("description"u8); - writer.WriteStringValue(Description); - } - if (Optional.IsDefined(State)) - { - writer.WritePropertyName("state"u8); - writer.WriteStringValue(State.Value.ToString()); - } - if (Optional.IsDefined(OnInactiveMarkAs)) - { - writer.WritePropertyName("onInactiveMarkAs"u8); - writer.WriteStringValue(OnInactiveMarkAs.Value.ToString()); - } - if (Optional.IsCollectionDefined(DependsOn)) - { - writer.WritePropertyName("dependsOn"u8); - writer.WriteStartArray(); - foreach (var item in DependsOn) - { - writer.WriteObjectValue(item); - } - writer.WriteEndArray(); - } - if (Optional.IsCollectionDefined(UserProperties)) - { - writer.WritePropertyName("userProperties"u8); - writer.WriteStartArray(); - foreach (var item in UserProperties) - { - writer.WriteObjectValue(item); - } - writer.WriteEndArray(); - } - writer.WritePropertyName("typeProperties"u8); - writer.WriteStartObject(); - writer.WritePropertyName("waitTimeInSeconds"u8); - JsonSerializer.Serialize(writer, WaitTimeInSeconds); - writer.WriteEndObject(); - foreach (var item in AdditionalProperties) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.Value.ToString()).RootElement); -#endif - } - writer.WriteEndObject(); - } - - internal static WaitActivity DeserializeWaitActivity(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - string name = default; - string type = default; - Optional description = default; - Optional state = default; - Optional onInactiveMarkAs = default; - Optional> dependsOn = default; - Optional> userProperties = default; - DataFactoryElement waitTimeInSeconds = default; - IDictionary> additionalProperties = default; - Dictionary> additionalPropertiesDictionary = new Dictionary>(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("name"u8)) - { - name = property.Value.GetString(); - continue; - } - if (property.NameEquals("type"u8)) - { - type = property.Value.GetString(); - continue; - } - if (property.NameEquals("description"u8)) - { - description = property.Value.GetString(); - continue; - } - if (property.NameEquals("state"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - state = new PipelineActivityState(property.Value.GetString()); - continue; - } - if (property.NameEquals("onInactiveMarkAs"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - onInactiveMarkAs = new ActivityOnInactiveMarkAs(property.Value.GetString()); - continue; - } - if (property.NameEquals("dependsOn"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - array.Add(PipelineActivityDependency.DeserializePipelineActivityDependency(item)); - } - dependsOn = array; - continue; - } - if (property.NameEquals("userProperties"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - array.Add(PipelineActivityUserProperty.DeserializePipelineActivityUserProperty(item)); - } - userProperties = array; - continue; - } - if (property.NameEquals("typeProperties"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - foreach (var property0 in property.Value.EnumerateObject()) - { - if (property0.NameEquals("waitTimeInSeconds"u8)) - { - waitTimeInSeconds = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - } - continue; - } - additionalPropertiesDictionary.Add(property.Name, JsonSerializer.Deserialize>(property.Value.GetRawText())); - } - additionalProperties = additionalPropertiesDictionary; - return new WaitActivity(name, type, description.Value, Optional.ToNullable(state), Optional.ToNullable(onInactiveMarkAs), Optional.ToList(dependsOn), Optional.ToList(userProperties), additionalProperties, waitTimeInSeconds); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/WaitActivity.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/WaitActivity.cs deleted file mode 100644 index fbabf652..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/WaitActivity.cs +++ /dev/null @@ -1,45 +0,0 @@ -// - -#nullable disable - -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// This activity suspends pipeline execution for the specified interval. - public partial class WaitActivity : ControlActivity - { - /// Initializes a new instance of WaitActivity. - /// Activity name. - /// Duration in seconds. Type: integer (or Expression with resultType integer). - /// or is null. - public WaitActivity(string name, DataFactoryElement waitTimeInSeconds) : base(name) - { - Argument.AssertNotNull(name, nameof(name)); - Argument.AssertNotNull(waitTimeInSeconds, nameof(waitTimeInSeconds)); - - WaitTimeInSeconds = waitTimeInSeconds; - ActivityType = "Wait"; - } - - /// Initializes a new instance of WaitActivity. - /// Activity name. - /// Type of activity. - /// Activity description. - /// Activity state. This is an optional property and if not provided, the state will be Active by default. - /// 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. - /// Activity depends on condition. - /// Activity user properties. - /// Additional Properties. - /// Duration in seconds. Type: integer (or Expression with resultType integer). - internal WaitActivity(string name, string activityType, string description, PipelineActivityState? state, ActivityOnInactiveMarkAs? onInactiveMarkAs, IList dependsOn, IList userProperties, IDictionary> additionalProperties, DataFactoryElement waitTimeInSeconds) : base(name, activityType, description, state, onInactiveMarkAs, dependsOn, userProperties, additionalProperties) - { - WaitTimeInSeconds = waitTimeInSeconds; - ActivityType = activityType ?? "Wait"; - } - - /// Duration in seconds. Type: integer (or Expression with resultType integer). - public DataFactoryElement WaitTimeInSeconds { get; set; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/WebActivity.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/WebActivity.Serialization.cs deleted file mode 100644 index 6402be24..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/WebActivity.Serialization.cs +++ /dev/null @@ -1,337 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class WebActivity : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - if (Optional.IsDefined(LinkedServiceName)) - { - writer.WritePropertyName("linkedServiceName"u8); - JsonSerializer.Serialize(writer, LinkedServiceName); - } - if (Optional.IsDefined(Policy)) - { - writer.WritePropertyName("policy"u8); - writer.WriteObjectValue(Policy); - } - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ActivityType); - if (Optional.IsDefined(Description)) - { - writer.WritePropertyName("description"u8); - writer.WriteStringValue(Description); - } - if (Optional.IsDefined(State)) - { - writer.WritePropertyName("state"u8); - writer.WriteStringValue(State.Value.ToString()); - } - if (Optional.IsDefined(OnInactiveMarkAs)) - { - writer.WritePropertyName("onInactiveMarkAs"u8); - writer.WriteStringValue(OnInactiveMarkAs.Value.ToString()); - } - if (Optional.IsCollectionDefined(DependsOn)) - { - writer.WritePropertyName("dependsOn"u8); - writer.WriteStartArray(); - foreach (var item in DependsOn) - { - writer.WriteObjectValue(item); - } - writer.WriteEndArray(); - } - if (Optional.IsCollectionDefined(UserProperties)) - { - writer.WritePropertyName("userProperties"u8); - writer.WriteStartArray(); - foreach (var item in UserProperties) - { - writer.WriteObjectValue(item); - } - writer.WriteEndArray(); - } - writer.WritePropertyName("typeProperties"u8); - writer.WriteStartObject(); - writer.WritePropertyName("method"u8); - writer.WriteStringValue(Method.ToString()); - writer.WritePropertyName("url"u8); - JsonSerializer.Serialize(writer, Uri); - if (Optional.IsDefined(Headers)) - { - writer.WritePropertyName("headers"u8); - JsonSerializer.Serialize(writer, Headers); - } - if (Optional.IsDefined(Body)) - { - writer.WritePropertyName("body"u8); - JsonSerializer.Serialize(writer, Body); - } - if (Optional.IsDefined(Authentication)) - { - writer.WritePropertyName("authentication"u8); - writer.WriteObjectValue(Authentication); - } - if (Optional.IsDefined(DisableCertValidation)) - { - writer.WritePropertyName("disableCertValidation"u8); - writer.WriteBooleanValue(DisableCertValidation.Value); - } - if (Optional.IsCollectionDefined(Datasets)) - { - writer.WritePropertyName("datasets"u8); - writer.WriteStartArray(); - foreach (var item in Datasets) - { - writer.WriteObjectValue(item); - } - writer.WriteEndArray(); - } - if (Optional.IsCollectionDefined(LinkedServices)) - { - writer.WritePropertyName("linkedServices"u8); - writer.WriteStartArray(); - foreach (var item in LinkedServices) - { - JsonSerializer.Serialize(writer, item); - } - writer.WriteEndArray(); - } - if (Optional.IsDefined(ConnectVia)) - { - writer.WritePropertyName("connectVia"u8); - writer.WriteObjectValue(ConnectVia); - } - writer.WriteEndObject(); - foreach (var item in AdditionalProperties) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.Value.ToString()).RootElement); -#endif - } - writer.WriteEndObject(); - } - - internal static WebActivity DeserializeWebActivity(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - Optional linkedServiceName = default; - Optional policy = default; - string name = default; - string type = default; - Optional description = default; - Optional state = default; - Optional onInactiveMarkAs = default; - Optional> dependsOn = default; - Optional> userProperties = default; - WebActivityMethod method = default; - DataFactoryElement url = default; - Optional>> headers = default; - Optional> body = default; - Optional authentication = default; - Optional disableCertValidation = default; - Optional> datasets = default; - Optional> linkedServices = default; - Optional connectVia = default; - IDictionary> additionalProperties = default; - Dictionary> additionalPropertiesDictionary = new Dictionary>(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("linkedServiceName"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - linkedServiceName = JsonSerializer.Deserialize(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("policy"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - policy = PipelineActivityPolicy.DeserializePipelineActivityPolicy(property.Value); - continue; - } - if (property.NameEquals("name"u8)) - { - name = property.Value.GetString(); - continue; - } - if (property.NameEquals("type"u8)) - { - type = property.Value.GetString(); - continue; - } - if (property.NameEquals("description"u8)) - { - description = property.Value.GetString(); - continue; - } - if (property.NameEquals("state"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - state = new PipelineActivityState(property.Value.GetString()); - continue; - } - if (property.NameEquals("onInactiveMarkAs"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - onInactiveMarkAs = new ActivityOnInactiveMarkAs(property.Value.GetString()); - continue; - } - if (property.NameEquals("dependsOn"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - array.Add(PipelineActivityDependency.DeserializePipelineActivityDependency(item)); - } - dependsOn = array; - continue; - } - if (property.NameEquals("userProperties"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - array.Add(PipelineActivityUserProperty.DeserializePipelineActivityUserProperty(item)); - } - userProperties = array; - continue; - } - if (property.NameEquals("typeProperties"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - foreach (var property0 in property.Value.EnumerateObject()) - { - if (property0.NameEquals("method"u8)) - { - method = new WebActivityMethod(property0.Value.GetString()); - continue; - } - if (property0.NameEquals("url"u8)) - { - url = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("headers"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - headers = JsonSerializer.Deserialize>>(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("body"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - body = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("authentication"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - authentication = WebActivityAuthentication.DeserializeWebActivityAuthentication(property0.Value); - continue; - } - if (property0.NameEquals("disableCertValidation"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - disableCertValidation = property0.Value.GetBoolean(); - continue; - } - if (property0.NameEquals("datasets"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property0.Value.EnumerateArray()) - { - array.Add(DatasetReference.DeserializeDatasetReference(item)); - } - datasets = array; - continue; - } - if (property0.NameEquals("linkedServices"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property0.Value.EnumerateArray()) - { - array.Add(JsonSerializer.Deserialize(item.GetRawText())); - } - linkedServices = array; - continue; - } - if (property0.NameEquals("connectVia"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - connectVia = IntegrationRuntimeReference.DeserializeIntegrationRuntimeReference(property0.Value); - continue; - } - } - continue; - } - additionalPropertiesDictionary.Add(property.Name, JsonSerializer.Deserialize>(property.Value.GetRawText())); - } - additionalProperties = additionalPropertiesDictionary; - return new WebActivity(name, type, description.Value, Optional.ToNullable(state), Optional.ToNullable(onInactiveMarkAs), Optional.ToList(dependsOn), Optional.ToList(userProperties), additionalProperties, linkedServiceName, policy.Value, method, url, headers.Value, body.Value, authentication.Value, Optional.ToNullable(disableCertValidation), Optional.ToList(datasets), Optional.ToList(linkedServices), connectVia.Value); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/WebActivity.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/WebActivity.cs deleted file mode 100644 index 2b2e4a5a..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/WebActivity.cs +++ /dev/null @@ -1,83 +0,0 @@ -// - -#nullable disable - -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// Web activity. - public partial class WebActivity : ExecutionActivity - { - /// Initializes a new instance of WebActivity. - /// Activity name. - /// Rest API method for target endpoint. - /// Web activity target endpoint and path. Type: string (or Expression with resultType string). - /// or is null. - public WebActivity(string name, WebActivityMethod method, DataFactoryElement uri) : base(name) - { - Argument.AssertNotNull(name, nameof(name)); - Argument.AssertNotNull(uri, nameof(uri)); - - Method = method; - Uri = uri; - Datasets = new ChangeTrackingList(); - LinkedServices = new ChangeTrackingList(); - ActivityType = "WebActivity"; - } - - /// Initializes a new instance of WebActivity. - /// Activity name. - /// Type of activity. - /// Activity description. - /// Activity state. This is an optional property and if not provided, the state will be Active by default. - /// 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. - /// Activity depends on condition. - /// Activity user properties. - /// Additional Properties. - /// Linked service reference. - /// Activity policy. - /// Rest API method for target endpoint. - /// Web activity target endpoint and path. Type: string (or Expression with resultType string). - /// 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). - /// 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). - /// Authentication method used for calling the endpoint. - /// When set to true, Certificate validation will be disabled. - /// List of datasets passed to web endpoint. - /// List of linked services passed to web endpoint. - /// The integration runtime reference. - internal WebActivity(string name, string activityType, string description, PipelineActivityState? state, ActivityOnInactiveMarkAs? onInactiveMarkAs, IList dependsOn, IList userProperties, IDictionary> additionalProperties, DataFactoryLinkedServiceReference linkedServiceName, PipelineActivityPolicy policy, WebActivityMethod method, DataFactoryElement uri, Dictionary> headers, DataFactoryElement body, WebActivityAuthentication authentication, bool? disableCertValidation, IList datasets, IList linkedServices, IntegrationRuntimeReference connectVia) : base(name, activityType, description, state, onInactiveMarkAs, dependsOn, userProperties, additionalProperties, linkedServiceName, policy) - { - Method = method; - Uri = uri; - Headers = headers; - Body = body; - Authentication = authentication; - DisableCertValidation = disableCertValidation; - Datasets = datasets; - LinkedServices = linkedServices; - ConnectVia = connectVia; - ActivityType = activityType ?? "WebActivity"; - } - - /// Rest API method for target endpoint. - public WebActivityMethod Method { get; set; } - /// Web activity target endpoint and path. Type: string (or Expression with resultType string). - public DataFactoryElement Uri { get; set; } - /// 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). - public Dictionary> Headers { get; set; } - /// 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). - public DataFactoryElement Body { get; set; } - /// Authentication method used for calling the endpoint. - public WebActivityAuthentication Authentication { get; set; } - /// When set to true, Certificate validation will be disabled. - public bool? DisableCertValidation { get; set; } - /// List of datasets passed to web endpoint. - public IList Datasets { get; } - /// List of linked services passed to web endpoint. - public IList LinkedServices { get; } - /// The integration runtime reference. - public IntegrationRuntimeReference ConnectVia { get; set; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/WebActivityAuthentication.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/WebActivityAuthentication.Serialization.cs deleted file mode 100644 index a87527ac..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/WebActivityAuthentication.Serialization.cs +++ /dev/null @@ -1,132 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class WebActivityAuthentication : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - if (Optional.IsDefined(WebActivityAuthenticationType)) - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(WebActivityAuthenticationType); - } - if (Optional.IsDefined(Pfx)) - { - writer.WritePropertyName("pfx"u8); - JsonSerializer.Serialize(writer, Pfx); - } - if (Optional.IsDefined(Username)) - { - writer.WritePropertyName("username"u8); - JsonSerializer.Serialize(writer, Username); - } - if (Optional.IsDefined(Password)) - { - writer.WritePropertyName("password"u8); - JsonSerializer.Serialize(writer, Password); - } - if (Optional.IsDefined(Resource)) - { - writer.WritePropertyName("resource"u8); - JsonSerializer.Serialize(writer, Resource); - } - if (Optional.IsDefined(UserTenant)) - { - writer.WritePropertyName("userTenant"u8); - JsonSerializer.Serialize(writer, UserTenant); - } - if (Optional.IsDefined(Credential)) - { - writer.WritePropertyName("credential"u8); - writer.WriteObjectValue(Credential); - } - writer.WriteEndObject(); - } - - internal static WebActivityAuthentication DeserializeWebActivityAuthentication(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - Optional type = default; - Optional pfx = default; - Optional> username = default; - Optional password = default; - Optional> resource = default; - Optional> userTenant = default; - Optional credential = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("type"u8)) - { - type = property.Value.GetString(); - continue; - } - if (property.NameEquals("pfx"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - pfx = JsonSerializer.Deserialize(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("username"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - username = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("password"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - password = JsonSerializer.Deserialize(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("resource"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - resource = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("userTenant"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - userTenant = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("credential"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - credential = DataFactoryCredentialReference.DeserializeDataFactoryCredentialReference(property.Value); - continue; - } - } - return new WebActivityAuthentication(type.Value, pfx, username.Value, password, resource.Value, userTenant.Value, credential.Value); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/WebActivityAuthentication.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/WebActivityAuthentication.cs deleted file mode 100644 index 6a9057d9..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/WebActivityAuthentication.cs +++ /dev/null @@ -1,51 +0,0 @@ -// - -#nullable disable - -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// Web activity authentication properties. - public partial class WebActivityAuthentication - { - /// Initializes a new instance of WebActivityAuthentication. - public WebActivityAuthentication() - { - } - - /// Initializes a new instance of WebActivityAuthentication. - /// Web activity authentication (Basic/ClientCertificate/MSI/ServicePrincipal). - /// Base64-encoded contents of a PFX file or Certificate when used for ServicePrincipal. - /// Web activity authentication user name for basic authentication or ClientID when used for ServicePrincipal. Type: string (or Expression with resultType string). - /// Password for the PFX file or basic authentication / Secret when used for ServicePrincipal. - /// Resource for which Azure Auth token will be requested when using MSI Authentication. Type: string (or Expression with resultType string). - /// TenantId for which Azure Auth token will be requested when using ServicePrincipal Authentication. Type: string (or Expression with resultType string). - /// The credential reference containing authentication information. - internal WebActivityAuthentication(string webActivityAuthenticationType, DataFactorySecretBaseDefinition pfx, DataFactoryElement username, DataFactorySecretBaseDefinition password, DataFactoryElement resource, DataFactoryElement userTenant, DataFactoryCredentialReference credential) - { - WebActivityAuthenticationType = webActivityAuthenticationType; - Pfx = pfx; - Username = username; - Password = password; - Resource = resource; - UserTenant = userTenant; - Credential = credential; - } - - /// Web activity authentication (Basic/ClientCertificate/MSI/ServicePrincipal). - public string WebActivityAuthenticationType { get; set; } - /// Base64-encoded contents of a PFX file or Certificate when used for ServicePrincipal. - public DataFactorySecretBaseDefinition Pfx { get; set; } - /// Web activity authentication user name for basic authentication or ClientID when used for ServicePrincipal. Type: string (or Expression with resultType string). - public DataFactoryElement Username { get; set; } - /// Password for the PFX file or basic authentication / Secret when used for ServicePrincipal. - public DataFactorySecretBaseDefinition Password { get; set; } - /// Resource for which Azure Auth token will be requested when using MSI Authentication. Type: string (or Expression with resultType string). - public DataFactoryElement Resource { get; set; } - /// TenantId for which Azure Auth token will be requested when using ServicePrincipal Authentication. Type: string (or Expression with resultType string). - public DataFactoryElement UserTenant { get; set; } - /// The credential reference containing authentication information. - public DataFactoryCredentialReference Credential { get; set; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/WebActivityMethod.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/WebActivityMethod.cs deleted file mode 100644 index 2543bbe2..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/WebActivityMethod.cs +++ /dev/null @@ -1,53 +0,0 @@ -// - -#nullable disable - -using System.ComponentModel; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// The list of HTTP methods supported by a WebActivity. - public readonly partial struct WebActivityMethod : IEquatable - { - private readonly string _value; - - /// Initializes a new instance of . - /// is null. - public WebActivityMethod(string value) - { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } - - private const string GetValue = "GET"; - private const string PostValue = "POST"; - private const string PutValue = "PUT"; - private const string DeleteValue = "DELETE"; - - /// GET. - public static WebActivityMethod Get { get; } = new WebActivityMethod(GetValue); - /// POST. - public static WebActivityMethod Post { get; } = new WebActivityMethod(PostValue); - /// PUT. - public static WebActivityMethod Put { get; } = new WebActivityMethod(PutValue); - /// DELETE. - public static WebActivityMethod Delete { get; } = new WebActivityMethod(DeleteValue); - /// Determines if two values are the same. - public static bool operator ==(WebActivityMethod left, WebActivityMethod right) => left.Equals(right); - /// Determines if two values are not the same. - public static bool operator !=(WebActivityMethod left, WebActivityMethod right) => !left.Equals(right); - /// Converts a string to a . - public static implicit operator WebActivityMethod(string value) => new WebActivityMethod(value); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override bool Equals(object obj) => obj is WebActivityMethod other && Equals(other); - /// - public bool Equals(WebActivityMethod other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override int GetHashCode() => _value?.GetHashCode() ?? 0; - /// - public override string ToString() => _value; - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/WebAnonymousAuthentication.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/WebAnonymousAuthentication.Serialization.cs deleted file mode 100644 index 140767ab..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/WebAnonymousAuthentication.Serialization.cs +++ /dev/null @@ -1,47 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class WebAnonymousAuthentication : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - writer.WritePropertyName("url"u8); - JsonSerializer.Serialize(writer, Uri); - writer.WritePropertyName("authenticationType"u8); - writer.WriteStringValue(AuthenticationType.ToString()); - writer.WriteEndObject(); - } - - internal static WebAnonymousAuthentication DeserializeWebAnonymousAuthentication(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - DataFactoryElement url = default; - WebAuthenticationType authenticationType = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("url"u8)) - { - url = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("authenticationType"u8)) - { - authenticationType = new WebAuthenticationType(property.Value.GetString()); - continue; - } - } - return new WebAnonymousAuthentication(url, authenticationType); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/WebAnonymousAuthentication.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/WebAnonymousAuthentication.cs deleted file mode 100644 index aa86dec3..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/WebAnonymousAuthentication.cs +++ /dev/null @@ -1,31 +0,0 @@ -// - -#nullable disable - -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// A WebLinkedService that uses anonymous authentication to communicate with an HTTP endpoint. - public partial class WebAnonymousAuthentication : WebLinkedServiceTypeProperties - { - /// Initializes a new instance of WebAnonymousAuthentication. - /// The URL of the web service endpoint, e.g. https://www.microsoft.com . Type: string (or Expression with resultType string). - /// is null. - public WebAnonymousAuthentication(DataFactoryElement uri) : base(uri) - { - Argument.AssertNotNull(uri, nameof(uri)); - - AuthenticationType = WebAuthenticationType.Anonymous; - } - - /// Initializes a new instance of WebAnonymousAuthentication. - /// The URL of the web service endpoint, e.g. https://www.microsoft.com . Type: string (or Expression with resultType string). - /// Type of authentication used to connect to the web table source. - internal WebAnonymousAuthentication(DataFactoryElement uri, WebAuthenticationType authenticationType) : base(uri, authenticationType) - { - AuthenticationType = authenticationType; - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/WebAuthenticationType.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/WebAuthenticationType.cs deleted file mode 100644 index 72776163..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/WebAuthenticationType.cs +++ /dev/null @@ -1,50 +0,0 @@ -// - -#nullable disable - -using System.ComponentModel; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// Type of authentication used to connect to the web table source. - internal readonly partial struct WebAuthenticationType : IEquatable - { - private readonly string _value; - - /// Initializes a new instance of . - /// is null. - public WebAuthenticationType(string value) - { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } - - private const string BasicValue = "Basic"; - private const string AnonymousValue = "Anonymous"; - private const string ClientCertificateValue = "ClientCertificate"; - - /// Basic. - public static WebAuthenticationType Basic { get; } = new WebAuthenticationType(BasicValue); - /// Anonymous. - public static WebAuthenticationType Anonymous { get; } = new WebAuthenticationType(AnonymousValue); - /// ClientCertificate. - public static WebAuthenticationType ClientCertificate { get; } = new WebAuthenticationType(ClientCertificateValue); - /// Determines if two values are the same. - public static bool operator ==(WebAuthenticationType left, WebAuthenticationType right) => left.Equals(right); - /// Determines if two values are not the same. - public static bool operator !=(WebAuthenticationType left, WebAuthenticationType right) => !left.Equals(right); - /// Converts a string to a . - public static implicit operator WebAuthenticationType(string value) => new WebAuthenticationType(value); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override bool Equals(object obj) => obj is WebAuthenticationType other && Equals(other); - /// - public bool Equals(WebAuthenticationType other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override int GetHashCode() => _value?.GetHashCode() ?? 0; - /// - public override string ToString() => _value; - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/WebBasicAuthentication.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/WebBasicAuthentication.Serialization.cs deleted file mode 100644 index beda5162..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/WebBasicAuthentication.Serialization.cs +++ /dev/null @@ -1,62 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class WebBasicAuthentication : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - writer.WritePropertyName("username"u8); - JsonSerializer.Serialize(writer, Username); - writer.WritePropertyName("password"u8); - JsonSerializer.Serialize(writer, Password); writer.WritePropertyName("url"u8); - JsonSerializer.Serialize(writer, Uri); - writer.WritePropertyName("authenticationType"u8); - writer.WriteStringValue(AuthenticationType.ToString()); - writer.WriteEndObject(); - } - - internal static WebBasicAuthentication DeserializeWebBasicAuthentication(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - DataFactoryElement username = default; - DataFactorySecretBaseDefinition password = default; - DataFactoryElement url = default; - WebAuthenticationType authenticationType = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("username"u8)) - { - username = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("password"u8)) - { - password = JsonSerializer.Deserialize(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("url"u8)) - { - url = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("authenticationType"u8)) - { - authenticationType = new WebAuthenticationType(property.Value.GetString()); - continue; - } - } - return new WebBasicAuthentication(url, authenticationType, username, password); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/WebBasicAuthentication.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/WebBasicAuthentication.cs deleted file mode 100644 index d8a3f9eb..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/WebBasicAuthentication.cs +++ /dev/null @@ -1,46 +0,0 @@ -// - -#nullable disable - -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// A WebLinkedService that uses basic authentication to communicate with an HTTP endpoint. - public partial class WebBasicAuthentication : WebLinkedServiceTypeProperties - { - /// Initializes a new instance of WebBasicAuthentication. - /// The URL of the web service endpoint, e.g. https://www.microsoft.com . Type: string (or Expression with resultType string). - /// User name for Basic authentication. Type: string (or Expression with resultType string). - /// The password for Basic authentication. - /// , or is null. - public WebBasicAuthentication(DataFactoryElement uri, DataFactoryElement username, DataFactorySecretBaseDefinition password) : base(uri) - { - Argument.AssertNotNull(uri, nameof(uri)); - Argument.AssertNotNull(username, nameof(username)); - Argument.AssertNotNull(password, nameof(password)); - - Username = username; - Password = password; - AuthenticationType = WebAuthenticationType.Basic; - } - - /// Initializes a new instance of WebBasicAuthentication. - /// The URL of the web service endpoint, e.g. https://www.microsoft.com . Type: string (or Expression with resultType string). - /// Type of authentication used to connect to the web table source. - /// User name for Basic authentication. Type: string (or Expression with resultType string). - /// The password for Basic authentication. - internal WebBasicAuthentication(DataFactoryElement uri, WebAuthenticationType authenticationType, DataFactoryElement username, DataFactorySecretBaseDefinition password) : base(uri, authenticationType) - { - Username = username; - Password = password; - AuthenticationType = authenticationType; - } - - /// User name for Basic authentication. Type: string (or Expression with resultType string). - public DataFactoryElement Username { get; set; } - /// The password for Basic authentication. - public DataFactorySecretBaseDefinition Password { get; set; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/WebClientCertificateAuthentication.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/WebClientCertificateAuthentication.Serialization.cs deleted file mode 100644 index 2221dd01..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/WebClientCertificateAuthentication.Serialization.cs +++ /dev/null @@ -1,61 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class WebClientCertificateAuthentication : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - writer.WritePropertyName("pfx"u8); - JsonSerializer.Serialize(writer, Pfx); writer.WritePropertyName("password"u8); - JsonSerializer.Serialize(writer, Password); writer.WritePropertyName("url"u8); - JsonSerializer.Serialize(writer, Uri); - writer.WritePropertyName("authenticationType"u8); - writer.WriteStringValue(AuthenticationType.ToString()); - writer.WriteEndObject(); - } - - internal static WebClientCertificateAuthentication DeserializeWebClientCertificateAuthentication(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - DataFactorySecretBaseDefinition pfx = default; - DataFactorySecretBaseDefinition password = default; - DataFactoryElement url = default; - WebAuthenticationType authenticationType = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("pfx"u8)) - { - pfx = JsonSerializer.Deserialize(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("password"u8)) - { - password = JsonSerializer.Deserialize(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("url"u8)) - { - url = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("authenticationType"u8)) - { - authenticationType = new WebAuthenticationType(property.Value.GetString()); - continue; - } - } - return new WebClientCertificateAuthentication(url, authenticationType, pfx, password); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/WebClientCertificateAuthentication.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/WebClientCertificateAuthentication.cs deleted file mode 100644 index f6494888..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/WebClientCertificateAuthentication.cs +++ /dev/null @@ -1,46 +0,0 @@ -// - -#nullable disable - -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// A WebLinkedService that uses client certificate based authentication to communicate with an HTTP endpoint. This scheme follows mutual authentication; the server must also provide valid credentials to the client. - public partial class WebClientCertificateAuthentication : WebLinkedServiceTypeProperties - { - /// Initializes a new instance of WebClientCertificateAuthentication. - /// The URL of the web service endpoint, e.g. https://www.microsoft.com . Type: string (or Expression with resultType string). - /// Base64-encoded contents of a PFX file. - /// Password for the PFX file. - /// , or is null. - public WebClientCertificateAuthentication(DataFactoryElement uri, DataFactorySecretBaseDefinition pfx, DataFactorySecretBaseDefinition password) : base(uri) - { - Argument.AssertNotNull(uri, nameof(uri)); - Argument.AssertNotNull(pfx, nameof(pfx)); - Argument.AssertNotNull(password, nameof(password)); - - Pfx = pfx; - Password = password; - AuthenticationType = WebAuthenticationType.ClientCertificate; - } - - /// Initializes a new instance of WebClientCertificateAuthentication. - /// The URL of the web service endpoint, e.g. https://www.microsoft.com . Type: string (or Expression with resultType string). - /// Type of authentication used to connect to the web table source. - /// Base64-encoded contents of a PFX file. - /// Password for the PFX file. - internal WebClientCertificateAuthentication(DataFactoryElement uri, WebAuthenticationType authenticationType, DataFactorySecretBaseDefinition pfx, DataFactorySecretBaseDefinition password) : base(uri, authenticationType) - { - Pfx = pfx; - Password = password; - AuthenticationType = authenticationType; - } - - /// Base64-encoded contents of a PFX file. - public DataFactorySecretBaseDefinition Pfx { get; set; } - /// Password for the PFX file. - public DataFactorySecretBaseDefinition Password { get; set; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/WebHookActivity.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/WebHookActivity.Serialization.cs deleted file mode 100644 index 1ad756c7..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/WebHookActivity.Serialization.cs +++ /dev/null @@ -1,253 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class WebHookActivity : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ActivityType); - if (Optional.IsDefined(Description)) - { - writer.WritePropertyName("description"u8); - writer.WriteStringValue(Description); - } - if (Optional.IsDefined(State)) - { - writer.WritePropertyName("state"u8); - writer.WriteStringValue(State.Value.ToString()); - } - if (Optional.IsDefined(OnInactiveMarkAs)) - { - writer.WritePropertyName("onInactiveMarkAs"u8); - writer.WriteStringValue(OnInactiveMarkAs.Value.ToString()); - } - if (Optional.IsCollectionDefined(DependsOn)) - { - writer.WritePropertyName("dependsOn"u8); - writer.WriteStartArray(); - foreach (var item in DependsOn) - { - writer.WriteObjectValue(item); - } - writer.WriteEndArray(); - } - if (Optional.IsCollectionDefined(UserProperties)) - { - writer.WritePropertyName("userProperties"u8); - writer.WriteStartArray(); - foreach (var item in UserProperties) - { - writer.WriteObjectValue(item); - } - writer.WriteEndArray(); - } - writer.WritePropertyName("typeProperties"u8); - writer.WriteStartObject(); - writer.WritePropertyName("method"u8); - writer.WriteStringValue(Method.ToString()); - writer.WritePropertyName("url"u8); - JsonSerializer.Serialize(writer, Uri); - if (Optional.IsDefined(Timeout)) - { - writer.WritePropertyName("timeout"u8); - writer.WriteStringValue(Timeout); - } - if (Optional.IsDefined(Headers)) - { - writer.WritePropertyName("headers"u8); - JsonSerializer.Serialize(writer, Headers); - } - if (Optional.IsDefined(Body)) - { - writer.WritePropertyName("body"u8); - JsonSerializer.Serialize(writer, Body); - } - if (Optional.IsDefined(Authentication)) - { - writer.WritePropertyName("authentication"u8); - writer.WriteObjectValue(Authentication); - } - if (Optional.IsDefined(ReportStatusOnCallBack)) - { - writer.WritePropertyName("reportStatusOnCallBack"u8); - JsonSerializer.Serialize(writer, ReportStatusOnCallBack); - } - writer.WriteEndObject(); - foreach (var item in AdditionalProperties) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.Value.ToString()).RootElement); -#endif - } - writer.WriteEndObject(); - } - - internal static WebHookActivity DeserializeWebHookActivity(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - string name = default; - string type = default; - Optional description = default; - Optional state = default; - Optional onInactiveMarkAs = default; - Optional> dependsOn = default; - Optional> userProperties = default; - WebHookActivityMethod method = default; - DataFactoryElement url = default; - Optional timeout = default; - Optional>> headers = default; - Optional> body = default; - Optional authentication = default; - Optional> reportStatusOnCallBack = default; - IDictionary> additionalProperties = default; - Dictionary> additionalPropertiesDictionary = new Dictionary>(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("name"u8)) - { - name = property.Value.GetString(); - continue; - } - if (property.NameEquals("type"u8)) - { - type = property.Value.GetString(); - continue; - } - if (property.NameEquals("description"u8)) - { - description = property.Value.GetString(); - continue; - } - if (property.NameEquals("state"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - state = new PipelineActivityState(property.Value.GetString()); - continue; - } - if (property.NameEquals("onInactiveMarkAs"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - onInactiveMarkAs = new ActivityOnInactiveMarkAs(property.Value.GetString()); - continue; - } - if (property.NameEquals("dependsOn"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - array.Add(PipelineActivityDependency.DeserializePipelineActivityDependency(item)); - } - dependsOn = array; - continue; - } - if (property.NameEquals("userProperties"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - array.Add(PipelineActivityUserProperty.DeserializePipelineActivityUserProperty(item)); - } - userProperties = array; - continue; - } - if (property.NameEquals("typeProperties"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - foreach (var property0 in property.Value.EnumerateObject()) - { - if (property0.NameEquals("method"u8)) - { - method = new WebHookActivityMethod(property0.Value.GetString()); - continue; - } - if (property0.NameEquals("url"u8)) - { - url = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("timeout"u8)) - { - timeout = property0.Value.GetString(); - continue; - } - if (property0.NameEquals("headers"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - headers = JsonSerializer.Deserialize>>(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("body"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - body = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("authentication"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - authentication = WebActivityAuthentication.DeserializeWebActivityAuthentication(property0.Value); - continue; - } - if (property0.NameEquals("reportStatusOnCallBack"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - reportStatusOnCallBack = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - } - continue; - } - additionalPropertiesDictionary.Add(property.Name, JsonSerializer.Deserialize>(property.Value.GetRawText())); - } - additionalProperties = additionalPropertiesDictionary; - return new WebHookActivity(name, type, description.Value, Optional.ToNullable(state), Optional.ToNullable(onInactiveMarkAs), Optional.ToList(dependsOn), Optional.ToList(userProperties), additionalProperties, method, url, timeout.Value, headers.Value, body.Value, authentication.Value, reportStatusOnCallBack.Value); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/WebHookActivity.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/WebHookActivity.cs deleted file mode 100644 index 9a6b5421..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/WebHookActivity.cs +++ /dev/null @@ -1,71 +0,0 @@ -// - -#nullable disable - -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// WebHook activity. - public partial class WebHookActivity : ControlActivity - { - /// Initializes a new instance of WebHookActivity. - /// Activity name. - /// Rest API method for target endpoint. - /// WebHook activity target endpoint and path. Type: string (or Expression with resultType string). - /// or is null. - public WebHookActivity(string name, WebHookActivityMethod method, DataFactoryElement uri) : base(name) - { - Argument.AssertNotNull(name, nameof(name)); - Argument.AssertNotNull(uri, nameof(uri)); - - Method = method; - Uri = uri; - ActivityType = "WebHook"; - } - - /// Initializes a new instance of WebHookActivity. - /// Activity name. - /// Type of activity. - /// Activity description. - /// Activity state. This is an optional property and if not provided, the state will be Active by default. - /// 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. - /// Activity depends on condition. - /// Activity user properties. - /// Additional Properties. - /// Rest API method for target endpoint. - /// WebHook activity target endpoint and path. Type: string (or Expression with resultType string). - /// The timeout within which the webhook should be called back. If there is no value specified, it defaults to 10 minutes. Type: string. Pattern: ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). - /// 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). - /// 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). - /// Authentication method used for calling the endpoint. - /// When set to true, statusCode, output and error in callback request body will be consumed by activity. The activity can be marked as failed by setting statusCode >= 400 in callback request. Default is false. Type: boolean (or Expression with resultType boolean). - internal WebHookActivity(string name, string activityType, string description, PipelineActivityState? state, ActivityOnInactiveMarkAs? onInactiveMarkAs, IList dependsOn, IList userProperties, IDictionary> additionalProperties, WebHookActivityMethod method, DataFactoryElement uri, string timeout, Dictionary> headers, DataFactoryElement body, WebActivityAuthentication authentication, DataFactoryElement reportStatusOnCallBack) : base(name, activityType, description, state, onInactiveMarkAs, dependsOn, userProperties, additionalProperties) - { - Method = method; - Uri = uri; - Timeout = timeout; - Headers = headers; - Body = body; - Authentication = authentication; - ReportStatusOnCallBack = reportStatusOnCallBack; - ActivityType = activityType ?? "WebHook"; - } - - /// Rest API method for target endpoint. - public WebHookActivityMethod Method { get; set; } - /// WebHook activity target endpoint and path. Type: string (or Expression with resultType string). - public DataFactoryElement Uri { get; set; } - /// The timeout within which the webhook should be called back. If there is no value specified, it defaults to 10 minutes. Type: string. Pattern: ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). - public string Timeout { get; set; } - /// 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). - public Dictionary> Headers { get; set; } - /// 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). - public DataFactoryElement Body { get; set; } - /// Authentication method used for calling the endpoint. - public WebActivityAuthentication Authentication { get; set; } - /// When set to true, statusCode, output and error in callback request body will be consumed by activity. The activity can be marked as failed by setting statusCode >= 400 in callback request. Default is false. Type: boolean (or Expression with resultType boolean). - public DataFactoryElement ReportStatusOnCallBack { get; set; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/WebHookActivityMethod.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/WebHookActivityMethod.cs deleted file mode 100644 index a40013d7..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/WebHookActivityMethod.cs +++ /dev/null @@ -1,44 +0,0 @@ -// - -#nullable disable - -using System.ComponentModel; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// The list of HTTP methods supported by a WebHook activity. - public readonly partial struct WebHookActivityMethod : IEquatable - { - private readonly string _value; - - /// Initializes a new instance of . - /// is null. - public WebHookActivityMethod(string value) - { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } - - private const string PostValue = "POST"; - - /// POST. - public static WebHookActivityMethod Post { get; } = new WebHookActivityMethod(PostValue); - /// Determines if two values are the same. - public static bool operator ==(WebHookActivityMethod left, WebHookActivityMethod right) => left.Equals(right); - /// Determines if two values are not the same. - public static bool operator !=(WebHookActivityMethod left, WebHookActivityMethod right) => !left.Equals(right); - /// Converts a string to a . - public static implicit operator WebHookActivityMethod(string value) => new WebHookActivityMethod(value); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override bool Equals(object obj) => obj is WebHookActivityMethod other && Equals(other); - /// - public bool Equals(WebHookActivityMethod other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override int GetHashCode() => _value?.GetHashCode() ?? 0; - /// - public override string ToString() => _value; - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/WebLinkedService.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/WebLinkedService.Serialization.cs deleted file mode 100644 index 7dc1452c..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/WebLinkedService.Serialization.cs +++ /dev/null @@ -1,153 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class WebLinkedService : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - writer.WritePropertyName("typeProperties"u8); - writer.WriteObjectValue(TypeProperties); - writer.WritePropertyName("type"u8); - writer.WriteStringValue(LinkedServiceType); - if (Optional.IsDefined(ConnectVia)) - { - writer.WritePropertyName("connectVia"u8); - writer.WriteObjectValue(ConnectVia); - } - if (Optional.IsDefined(Description)) - { - writer.WritePropertyName("description"u8); - writer.WriteStringValue(Description); - } - if (Optional.IsCollectionDefined(Parameters)) - { - writer.WritePropertyName("parameters"u8); - writer.WriteStartObject(); - foreach (var item in Parameters) - { - writer.WritePropertyName(item.Key); - writer.WriteObjectValue(item.Value); - } - writer.WriteEndObject(); - } - if (Optional.IsCollectionDefined(Annotations)) - { - writer.WritePropertyName("annotations"u8); - writer.WriteStartArray(); - foreach (var item in Annotations) - { - if (item == null) - { - writer.WriteNullValue(); - continue; - } -#if NET6_0_OR_GREATER - writer.WriteRawValue(item); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.ToString()).RootElement); -#endif - } - writer.WriteEndArray(); - } - foreach (var item in AdditionalProperties) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.Value.ToString()).RootElement); -#endif - } - writer.WriteEndObject(); - } - - internal static WebLinkedService DeserializeWebLinkedService(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - WebLinkedServiceTypeProperties typeProperties = default; - string type = default; - Optional connectVia = default; - Optional description = default; - Optional> parameters = default; - Optional> annotations = default; - IDictionary> additionalProperties = default; - Dictionary> additionalPropertiesDictionary = new Dictionary>(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("typeProperties"u8)) - { - typeProperties = WebLinkedServiceTypeProperties.DeserializeWebLinkedServiceTypeProperties(property.Value); - continue; - } - if (property.NameEquals("type"u8)) - { - type = property.Value.GetString(); - continue; - } - if (property.NameEquals("connectVia"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - connectVia = IntegrationRuntimeReference.DeserializeIntegrationRuntimeReference(property.Value); - continue; - } - if (property.NameEquals("description"u8)) - { - description = property.Value.GetString(); - continue; - } - if (property.NameEquals("parameters"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - Dictionary dictionary = new Dictionary(); - foreach (var property0 in property.Value.EnumerateObject()) - { - dictionary.Add(property0.Name, EntityParameterSpecification.DeserializeEntityParameterSpecification(property0.Value)); - } - parameters = dictionary; - continue; - } - if (property.NameEquals("annotations"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - if (item.ValueKind == JsonValueKind.Null) - { - array.Add(null); - } - else - { - array.Add(BinaryData.FromString(item.GetRawText())); - } - } - annotations = array; - continue; - } - additionalPropertiesDictionary.Add(property.Name, JsonSerializer.Deserialize>(property.Value.GetRawText())); - } - additionalProperties = additionalPropertiesDictionary; - return new WebLinkedService(type, connectVia.Value, description.Value, Optional.ToDictionary(parameters), Optional.ToList(annotations), additionalProperties, typeProperties); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/WebLinkedService.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/WebLinkedService.cs deleted file mode 100644 index ed726f35..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/WebLinkedService.cs +++ /dev/null @@ -1,53 +0,0 @@ -// - -#nullable disable - -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// Web linked service. - public partial class WebLinkedService : DataFactoryLinkedServiceProperties - { - /// Initializes a new instance of WebLinkedService. - /// - /// Web linked service properties. - /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. - /// The available derived classes include , and . - /// - /// is null. - public WebLinkedService(WebLinkedServiceTypeProperties typeProperties) - { - Argument.AssertNotNull(typeProperties, nameof(typeProperties)); - - TypeProperties = typeProperties; - LinkedServiceType = "Web"; - } - - /// Initializes a new instance of WebLinkedService. - /// Type of linked service. - /// The integration runtime reference. - /// Linked service description. - /// Parameters for linked service. - /// List of tags that can be used for describing the linked service. - /// Additional Properties. - /// - /// Web linked service properties. - /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. - /// The available derived classes include , and . - /// - internal WebLinkedService(string linkedServiceType, IntegrationRuntimeReference connectVia, string description, IDictionary parameters, IList annotations, IDictionary> additionalProperties, WebLinkedServiceTypeProperties typeProperties) : base(linkedServiceType, connectVia, description, parameters, annotations, additionalProperties) - { - TypeProperties = typeProperties; - LinkedServiceType = linkedServiceType ?? "Web"; - } - - /// - /// Web linked service properties. - /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. - /// The available derived classes include , and . - /// - public WebLinkedServiceTypeProperties TypeProperties { get; set; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/WebLinkedServiceTypeProperties.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/WebLinkedServiceTypeProperties.Serialization.cs deleted file mode 100644 index 4c4c958a..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/WebLinkedServiceTypeProperties.Serialization.cs +++ /dev/null @@ -1,40 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class WebLinkedServiceTypeProperties : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - writer.WritePropertyName("url"u8); - JsonSerializer.Serialize(writer, Uri); - writer.WritePropertyName("authenticationType"u8); - writer.WriteStringValue(AuthenticationType.ToString()); - writer.WriteEndObject(); - } - - internal static WebLinkedServiceTypeProperties DeserializeWebLinkedServiceTypeProperties(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - if (element.TryGetProperty("authenticationType", out JsonElement discriminator)) - { - switch (discriminator.GetString()) - { - case "Anonymous": return WebAnonymousAuthentication.DeserializeWebAnonymousAuthentication(element); - case "Basic": return WebBasicAuthentication.DeserializeWebBasicAuthentication(element); - case "ClientCertificate": return WebClientCertificateAuthentication.DeserializeWebClientCertificateAuthentication(element); - } - } - return UnknownWebLinkedServiceTypeProperties.DeserializeUnknownWebLinkedServiceTypeProperties(element); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/WebLinkedServiceTypeProperties.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/WebLinkedServiceTypeProperties.cs deleted file mode 100644 index 2f5cc1d1..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/WebLinkedServiceTypeProperties.cs +++ /dev/null @@ -1,41 +0,0 @@ -// - -#nullable disable - -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// - /// Base definition of WebLinkedServiceTypeProperties, this typeProperties is polymorphic based on authenticationType, so not flattened in SDK models. - /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. - /// The available derived classes include , and . - /// - public abstract partial class WebLinkedServiceTypeProperties - { - /// Initializes a new instance of WebLinkedServiceTypeProperties. - /// The URL of the web service endpoint, e.g. https://www.microsoft.com . Type: string (or Expression with resultType string). - /// is null. - protected WebLinkedServiceTypeProperties(DataFactoryElement uri) - { - Argument.AssertNotNull(uri, nameof(uri)); - - Uri = uri; - } - - /// Initializes a new instance of WebLinkedServiceTypeProperties. - /// The URL of the web service endpoint, e.g. https://www.microsoft.com . Type: string (or Expression with resultType string). - /// Type of authentication used to connect to the web table source. - internal WebLinkedServiceTypeProperties(DataFactoryElement uri, WebAuthenticationType authenticationType) - { - Uri = uri; - AuthenticationType = authenticationType; - } - - /// The URL of the web service endpoint, e.g. https://www.microsoft.com . Type: string (or Expression with resultType string). - public DataFactoryElement Uri { get; set; } - /// Type of authentication used to connect to the web table source. - internal WebAuthenticationType AuthenticationType { get; set; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/WebSource.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/WebSource.Serialization.cs deleted file mode 100644 index 6331d279..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/WebSource.Serialization.cs +++ /dev/null @@ -1,131 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class WebSource : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - if (Optional.IsDefined(AdditionalColumns)) - { - writer.WritePropertyName("additionalColumns"u8); -#if NET6_0_OR_GREATER - writer.WriteRawValue(AdditionalColumns); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(AdditionalColumns.ToString()).RootElement); -#endif - } - writer.WritePropertyName("type"u8); - writer.WriteStringValue(CopySourceType); - if (Optional.IsDefined(SourceRetryCount)) - { - writer.WritePropertyName("sourceRetryCount"u8); - JsonSerializer.Serialize(writer, SourceRetryCount); - } - if (Optional.IsDefined(SourceRetryWait)) - { - writer.WritePropertyName("sourceRetryWait"u8); - JsonSerializer.Serialize(writer, SourceRetryWait); - } - if (Optional.IsDefined(MaxConcurrentConnections)) - { - writer.WritePropertyName("maxConcurrentConnections"u8); - JsonSerializer.Serialize(writer, MaxConcurrentConnections); - } - if (Optional.IsDefined(DisableMetricsCollection)) - { - writer.WritePropertyName("disableMetricsCollection"u8); - JsonSerializer.Serialize(writer, DisableMetricsCollection); - } - foreach (var item in AdditionalProperties) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.Value.ToString()).RootElement); -#endif - } - writer.WriteEndObject(); - } - - internal static WebSource DeserializeWebSource(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - Optional additionalColumns = default; - string type = default; - Optional> sourceRetryCount = default; - Optional> sourceRetryWait = default; - Optional> maxConcurrentConnections = default; - Optional> disableMetricsCollection = default; - IDictionary> additionalProperties = default; - Dictionary> additionalPropertiesDictionary = new Dictionary>(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("additionalColumns"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - additionalColumns = BinaryData.FromString(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("type"u8)) - { - type = property.Value.GetString(); - continue; - } - if (property.NameEquals("sourceRetryCount"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - sourceRetryCount = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("sourceRetryWait"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - sourceRetryWait = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("maxConcurrentConnections"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - maxConcurrentConnections = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("disableMetricsCollection"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - disableMetricsCollection = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - additionalPropertiesDictionary.Add(property.Name, JsonSerializer.Deserialize>(property.Value.GetRawText())); - } - additionalProperties = additionalPropertiesDictionary; - return new WebSource(type, sourceRetryCount.Value, sourceRetryWait.Value, maxConcurrentConnections.Value, disableMetricsCollection.Value, additionalProperties, additionalColumns.Value); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/WebSource.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/WebSource.cs deleted file mode 100644 index 3d4e1142..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/WebSource.cs +++ /dev/null @@ -1,64 +0,0 @@ -// - -#nullable disable - -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// A copy activity source for web page table. - public partial class WebSource : CopyActivitySource - { - /// Initializes a new instance of WebSource. - public WebSource() - { - CopySourceType = "WebSource"; - } - - /// Initializes a new instance of WebSource. - /// Copy source type. - /// Source retry count. Type: integer (or Expression with resultType integer). - /// Source retry wait. Type: string (or Expression with resultType string), pattern: ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). - /// The maximum concurrent connection count for the source data store. Type: integer (or Expression with resultType integer). - /// If true, disable data store metrics collection. Default is false. Type: boolean (or Expression with resultType boolean). - /// Additional Properties. - /// Specifies the additional columns to be added to source data. Type: array of objects(AdditionalColumns) (or Expression with resultType array of objects). - internal WebSource(string copySourceType, DataFactoryElement sourceRetryCount, DataFactoryElement sourceRetryWait, DataFactoryElement maxConcurrentConnections, DataFactoryElement disableMetricsCollection, IDictionary> additionalProperties, BinaryData additionalColumns) : base(copySourceType, sourceRetryCount, sourceRetryWait, maxConcurrentConnections, disableMetricsCollection, additionalProperties) - { - AdditionalColumns = additionalColumns; - CopySourceType = copySourceType ?? "WebSource"; - } - - /// - /// Specifies the additional columns to be added to source data. Type: array of objects(AdditionalColumns) (or Expression with resultType array of objects). - /// - /// To assign an object to this property use . - /// - /// - /// To assign an already formated json string to this property use . - /// - /// - /// Examples: - /// - /// - /// BinaryData.FromObjectAsJson("foo") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromString("\"foo\"") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromObjectAsJson(new { key = "value" }) - /// Creates a payload of { "key": "value" }. - /// - /// - /// BinaryData.FromString("{\"key\": \"value\"}") - /// Creates a payload of { "key": "value" }. - /// - /// - /// - /// - public BinaryData AdditionalColumns { get; set; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/WebTableDataset.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/WebTableDataset.Serialization.cs deleted file mode 100644 index 6da2705d..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/WebTableDataset.Serialization.cs +++ /dev/null @@ -1,220 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class WebTableDataset : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - writer.WritePropertyName("type"u8); - writer.WriteStringValue(DatasetType); - if (Optional.IsDefined(Description)) - { - writer.WritePropertyName("description"u8); - writer.WriteStringValue(Description); - } - if (Optional.IsDefined(Structure)) - { - writer.WritePropertyName("structure"u8); - JsonSerializer.Serialize(writer, Structure); - } - if (Optional.IsDefined(Schema)) - { - writer.WritePropertyName("schema"u8); - JsonSerializer.Serialize(writer, Schema); - } - writer.WritePropertyName("linkedServiceName"u8); - JsonSerializer.Serialize(writer, LinkedServiceName); if (Optional.IsCollectionDefined(Parameters)) - { - writer.WritePropertyName("parameters"u8); - writer.WriteStartObject(); - foreach (var item in Parameters) - { - writer.WritePropertyName(item.Key); - writer.WriteObjectValue(item.Value); - } - writer.WriteEndObject(); - } - if (Optional.IsCollectionDefined(Annotations)) - { - writer.WritePropertyName("annotations"u8); - writer.WriteStartArray(); - foreach (var item in Annotations) - { - if (item == null) - { - writer.WriteNullValue(); - continue; - } -#if NET6_0_OR_GREATER - writer.WriteRawValue(item); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.ToString()).RootElement); -#endif - } - writer.WriteEndArray(); - } - if (Optional.IsDefined(Folder)) - { - writer.WritePropertyName("folder"u8); - writer.WriteObjectValue(Folder); - } - writer.WritePropertyName("typeProperties"u8); - writer.WriteStartObject(); - writer.WritePropertyName("index"u8); - JsonSerializer.Serialize(writer, Index); - if (Optional.IsDefined(Path)) - { - writer.WritePropertyName("path"u8); - JsonSerializer.Serialize(writer, Path); - } - writer.WriteEndObject(); - foreach (var item in AdditionalProperties) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.Value.ToString()).RootElement); -#endif - } - writer.WriteEndObject(); - } - - internal static WebTableDataset DeserializeWebTableDataset(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - string type = default; - Optional description = default; - Optional>> structure = default; - Optional>> schema = default; - DataFactoryLinkedServiceReference linkedServiceName = default; - Optional> parameters = default; - Optional> annotations = default; - Optional folder = default; - DataFactoryElement index = default; - Optional> path = default; - IDictionary> additionalProperties = default; - Dictionary> additionalPropertiesDictionary = new Dictionary>(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("type"u8)) - { - type = property.Value.GetString(); - continue; - } - if (property.NameEquals("description"u8)) - { - description = property.Value.GetString(); - continue; - } - if (property.NameEquals("structure"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - structure = JsonSerializer.Deserialize>>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("schema"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - schema = JsonSerializer.Deserialize>>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("linkedServiceName"u8)) - { - linkedServiceName = JsonSerializer.Deserialize(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("parameters"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - Dictionary dictionary = new Dictionary(); - foreach (var property0 in property.Value.EnumerateObject()) - { - dictionary.Add(property0.Name, EntityParameterSpecification.DeserializeEntityParameterSpecification(property0.Value)); - } - parameters = dictionary; - continue; - } - if (property.NameEquals("annotations"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - if (item.ValueKind == JsonValueKind.Null) - { - array.Add(null); - } - else - { - array.Add(BinaryData.FromString(item.GetRawText())); - } - } - annotations = array; - continue; - } - if (property.NameEquals("folder"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - folder = DatasetFolder.DeserializeDatasetFolder(property.Value); - continue; - } - if (property.NameEquals("typeProperties"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - foreach (var property0 in property.Value.EnumerateObject()) - { - if (property0.NameEquals("index"u8)) - { - index = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("path"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - path = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - } - continue; - } - additionalPropertiesDictionary.Add(property.Name, JsonSerializer.Deserialize>(property.Value.GetRawText())); - } - additionalProperties = additionalPropertiesDictionary; - return new WebTableDataset(type, description.Value, structure.Value, schema.Value, linkedServiceName, Optional.ToDictionary(parameters), Optional.ToList(annotations), folder.Value, additionalProperties, index, path.Value); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/WebTableDataset.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/WebTableDataset.cs deleted file mode 100644 index 4c11bccc..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/WebTableDataset.cs +++ /dev/null @@ -1,50 +0,0 @@ -// - -#nullable disable - -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// The dataset points to a HTML table in the web page. - public partial class WebTableDataset : DataFactoryDatasetProperties - { - /// Initializes a new instance of WebTableDataset. - /// Linked service reference. - /// The zero-based index of the table in the web page. Type: integer (or Expression with resultType integer), minimum: 0. - /// or is null. - public WebTableDataset(DataFactoryLinkedServiceReference linkedServiceName, DataFactoryElement index) : base(linkedServiceName) - { - Argument.AssertNotNull(linkedServiceName, nameof(linkedServiceName)); - Argument.AssertNotNull(index, nameof(index)); - - Index = index; - DatasetType = "WebTable"; - } - - /// Initializes a new instance of WebTableDataset. - /// Type of dataset. - /// Dataset description. - /// Columns that define the structure of the dataset. Type: array (or Expression with resultType array), itemType: DatasetDataElement. - /// Columns that define the physical type schema of the dataset. Type: array (or Expression with resultType array), itemType: DatasetSchemaDataElement. - /// Linked service reference. - /// Parameters for dataset. - /// List of tags that can be used for describing the Dataset. - /// The folder that this Dataset is in. If not specified, Dataset will appear at the root level. - /// Additional Properties. - /// The zero-based index of the table in the web page. Type: integer (or Expression with resultType integer), minimum: 0. - /// The relative URL to the web page from the linked service URL. Type: string (or Expression with resultType string). - internal WebTableDataset(string datasetType, string description, DataFactoryElement> structure, DataFactoryElement> schema, DataFactoryLinkedServiceReference linkedServiceName, IDictionary parameters, IList annotations, DatasetFolder folder, IDictionary> additionalProperties, DataFactoryElement index, DataFactoryElement path) : base(datasetType, description, structure, schema, linkedServiceName, parameters, annotations, folder, additionalProperties) - { - Index = index; - Path = path; - DatasetType = datasetType ?? "WebTable"; - } - - /// The zero-based index of the table in the web page. Type: integer (or Expression with resultType integer), minimum: 0. - public DataFactoryElement Index { get; set; } - /// The relative URL to the web page from the linked service URL. Type: string (or Expression with resultType string). - public DataFactoryElement Path { get; set; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/XeroLinkedService.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/XeroLinkedService.Serialization.cs deleted file mode 100644 index d2f31fca..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/XeroLinkedService.Serialization.cs +++ /dev/null @@ -1,280 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class XeroLinkedService : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - writer.WritePropertyName("type"u8); - writer.WriteStringValue(LinkedServiceType); - if (Optional.IsDefined(ConnectVia)) - { - writer.WritePropertyName("connectVia"u8); - writer.WriteObjectValue(ConnectVia); - } - if (Optional.IsDefined(Description)) - { - writer.WritePropertyName("description"u8); - writer.WriteStringValue(Description); - } - if (Optional.IsCollectionDefined(Parameters)) - { - writer.WritePropertyName("parameters"u8); - writer.WriteStartObject(); - foreach (var item in Parameters) - { - writer.WritePropertyName(item.Key); - writer.WriteObjectValue(item.Value); - } - writer.WriteEndObject(); - } - if (Optional.IsCollectionDefined(Annotations)) - { - writer.WritePropertyName("annotations"u8); - writer.WriteStartArray(); - foreach (var item in Annotations) - { - if (item == null) - { - writer.WriteNullValue(); - continue; - } -#if NET6_0_OR_GREATER - writer.WriteRawValue(item); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.ToString()).RootElement); -#endif - } - writer.WriteEndArray(); - } - writer.WritePropertyName("typeProperties"u8); - writer.WriteStartObject(); - if (Optional.IsDefined(ConnectionProperties)) - { - writer.WritePropertyName("connectionProperties"u8); -#if NET6_0_OR_GREATER - writer.WriteRawValue(ConnectionProperties); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(ConnectionProperties.ToString()).RootElement); -#endif - } - if (Optional.IsDefined(Host)) - { - writer.WritePropertyName("host"u8); - JsonSerializer.Serialize(writer, Host); - } - if (Optional.IsDefined(ConsumerKey)) - { - writer.WritePropertyName("consumerKey"u8); - JsonSerializer.Serialize(writer, ConsumerKey); - } - if (Optional.IsDefined(PrivateKey)) - { - writer.WritePropertyName("privateKey"u8); - JsonSerializer.Serialize(writer, PrivateKey); - } - if (Optional.IsDefined(UseEncryptedEndpoints)) - { - writer.WritePropertyName("useEncryptedEndpoints"u8); - JsonSerializer.Serialize(writer, UseEncryptedEndpoints); - } - if (Optional.IsDefined(UseHostVerification)) - { - writer.WritePropertyName("useHostVerification"u8); - JsonSerializer.Serialize(writer, UseHostVerification); - } - if (Optional.IsDefined(UsePeerVerification)) - { - writer.WritePropertyName("usePeerVerification"u8); - JsonSerializer.Serialize(writer, UsePeerVerification); - } - if (Optional.IsDefined(EncryptedCredential)) - { - writer.WritePropertyName("encryptedCredential"u8); - writer.WriteStringValue(EncryptedCredential); - } - writer.WriteEndObject(); - foreach (var item in AdditionalProperties) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.Value.ToString()).RootElement); -#endif - } - writer.WriteEndObject(); - } - - internal static XeroLinkedService DeserializeXeroLinkedService(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - string type = default; - Optional connectVia = default; - Optional description = default; - Optional> parameters = default; - Optional> annotations = default; - Optional connectionProperties = default; - Optional> host = default; - Optional consumerKey = default; - Optional privateKey = default; - Optional> useEncryptedEndpoints = default; - Optional> useHostVerification = default; - Optional> usePeerVerification = default; - Optional encryptedCredential = default; - IDictionary> additionalProperties = default; - Dictionary> additionalPropertiesDictionary = new Dictionary>(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("type"u8)) - { - type = property.Value.GetString(); - continue; - } - if (property.NameEquals("connectVia"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - connectVia = IntegrationRuntimeReference.DeserializeIntegrationRuntimeReference(property.Value); - continue; - } - if (property.NameEquals("description"u8)) - { - description = property.Value.GetString(); - continue; - } - if (property.NameEquals("parameters"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - Dictionary dictionary = new Dictionary(); - foreach (var property0 in property.Value.EnumerateObject()) - { - dictionary.Add(property0.Name, EntityParameterSpecification.DeserializeEntityParameterSpecification(property0.Value)); - } - parameters = dictionary; - continue; - } - if (property.NameEquals("annotations"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - if (item.ValueKind == JsonValueKind.Null) - { - array.Add(null); - } - else - { - array.Add(BinaryData.FromString(item.GetRawText())); - } - } - annotations = array; - continue; - } - if (property.NameEquals("typeProperties"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - foreach (var property0 in property.Value.EnumerateObject()) - { - if (property0.NameEquals("connectionProperties"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - connectionProperties = BinaryData.FromString(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("host"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - host = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("consumerKey"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - consumerKey = JsonSerializer.Deserialize(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("privateKey"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - privateKey = JsonSerializer.Deserialize(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("useEncryptedEndpoints"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - useEncryptedEndpoints = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("useHostVerification"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - useHostVerification = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("usePeerVerification"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - usePeerVerification = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("encryptedCredential"u8)) - { - encryptedCredential = property0.Value.GetString(); - continue; - } - } - continue; - } - additionalPropertiesDictionary.Add(property.Name, JsonSerializer.Deserialize>(property.Value.GetRawText())); - } - additionalProperties = additionalPropertiesDictionary; - return new XeroLinkedService(type, connectVia.Value, description.Value, Optional.ToDictionary(parameters), Optional.ToList(annotations), additionalProperties, connectionProperties.Value, host.Value, consumerKey, privateKey, useEncryptedEndpoints.Value, useHostVerification.Value, usePeerVerification.Value, encryptedCredential.Value); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/XeroLinkedService.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/XeroLinkedService.cs deleted file mode 100644 index d3892a1d..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/XeroLinkedService.cs +++ /dev/null @@ -1,98 +0,0 @@ -// - -#nullable disable - -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// Xero Service linked service. - public partial class XeroLinkedService : DataFactoryLinkedServiceProperties - { - /// Initializes a new instance of XeroLinkedService. - public XeroLinkedService() - { - LinkedServiceType = "Xero"; - } - - /// Initializes a new instance of XeroLinkedService. - /// Type of linked service. - /// The integration runtime reference. - /// Linked service description. - /// Parameters for linked service. - /// List of tags that can be used for describing the linked service. - /// Additional Properties. - /// Properties used to connect to Xero. It is mutually exclusive with any other properties in the linked service. Type: object. - /// The endpoint of the Xero server. (i.e. api.xero.com). - /// The consumer key associated with the Xero application. - /// - /// The private key from the .pem file that was generated for your Xero private application. You must include all the text from the .pem file, including the Unix line endings( - /// ). - /// - /// Specifies whether the data source endpoints are encrypted using HTTPS. The default value is true. - /// 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. - /// Specifies whether to verify the identity of the server when connecting over SSL. The default value is true. - /// The encrypted credential used for authentication. Credentials are encrypted using the integration runtime credential manager. Type: string. - internal XeroLinkedService(string linkedServiceType, IntegrationRuntimeReference connectVia, string description, IDictionary parameters, IList annotations, IDictionary> additionalProperties, BinaryData connectionProperties, DataFactoryElement host, DataFactorySecretBaseDefinition consumerKey, DataFactorySecretBaseDefinition privateKey, DataFactoryElement useEncryptedEndpoints, DataFactoryElement useHostVerification, DataFactoryElement usePeerVerification, string encryptedCredential) : base(linkedServiceType, connectVia, description, parameters, annotations, additionalProperties) - { - ConnectionProperties = connectionProperties; - Host = host; - ConsumerKey = consumerKey; - PrivateKey = privateKey; - UseEncryptedEndpoints = useEncryptedEndpoints; - UseHostVerification = useHostVerification; - UsePeerVerification = usePeerVerification; - EncryptedCredential = encryptedCredential; - LinkedServiceType = linkedServiceType ?? "Xero"; - } - - /// - /// Properties used to connect to Xero. It is mutually exclusive with any other properties in the linked service. Type: object. - /// - /// To assign an object to this property use . - /// - /// - /// To assign an already formated json string to this property use . - /// - /// - /// Examples: - /// - /// - /// BinaryData.FromObjectAsJson("foo") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromString("\"foo\"") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromObjectAsJson(new { key = "value" }) - /// Creates a payload of { "key": "value" }. - /// - /// - /// BinaryData.FromString("{\"key\": \"value\"}") - /// Creates a payload of { "key": "value" }. - /// - /// - /// - /// - public BinaryData ConnectionProperties { get; set; } - /// The endpoint of the Xero server. (i.e. api.xero.com). - public DataFactoryElement Host { get; set; } - /// The consumer key associated with the Xero application. - public DataFactorySecretBaseDefinition ConsumerKey { get; set; } - /// - /// The private key from the .pem file that was generated for your Xero private application. You must include all the text from the .pem file, including the Unix line endings( - /// ). - /// - public DataFactorySecretBaseDefinition PrivateKey { get; set; } - /// Specifies whether the data source endpoints are encrypted using HTTPS. The default value is true. - public DataFactoryElement UseEncryptedEndpoints { get; set; } - /// 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. - public DataFactoryElement UseHostVerification { get; set; } - /// Specifies whether to verify the identity of the server when connecting over SSL. The default value is true. - public DataFactoryElement UsePeerVerification { get; set; } - /// The encrypted credential used for authentication. Credentials are encrypted using the integration runtime credential manager. Type: string. - public string EncryptedCredential { get; set; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/XeroObjectDataset.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/XeroObjectDataset.Serialization.cs deleted file mode 100644 index d9434b7d..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/XeroObjectDataset.Serialization.cs +++ /dev/null @@ -1,212 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class XeroObjectDataset : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - writer.WritePropertyName("type"u8); - writer.WriteStringValue(DatasetType); - if (Optional.IsDefined(Description)) - { - writer.WritePropertyName("description"u8); - writer.WriteStringValue(Description); - } - if (Optional.IsDefined(Structure)) - { - writer.WritePropertyName("structure"u8); - JsonSerializer.Serialize(writer, Structure); - } - if (Optional.IsDefined(Schema)) - { - writer.WritePropertyName("schema"u8); - JsonSerializer.Serialize(writer, Schema); - } - writer.WritePropertyName("linkedServiceName"u8); - JsonSerializer.Serialize(writer, LinkedServiceName); if (Optional.IsCollectionDefined(Parameters)) - { - writer.WritePropertyName("parameters"u8); - writer.WriteStartObject(); - foreach (var item in Parameters) - { - writer.WritePropertyName(item.Key); - writer.WriteObjectValue(item.Value); - } - writer.WriteEndObject(); - } - if (Optional.IsCollectionDefined(Annotations)) - { - writer.WritePropertyName("annotations"u8); - writer.WriteStartArray(); - foreach (var item in Annotations) - { - if (item == null) - { - writer.WriteNullValue(); - continue; - } -#if NET6_0_OR_GREATER - writer.WriteRawValue(item); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.ToString()).RootElement); -#endif - } - writer.WriteEndArray(); - } - if (Optional.IsDefined(Folder)) - { - writer.WritePropertyName("folder"u8); - writer.WriteObjectValue(Folder); - } - writer.WritePropertyName("typeProperties"u8); - writer.WriteStartObject(); - if (Optional.IsDefined(TableName)) - { - writer.WritePropertyName("tableName"u8); - JsonSerializer.Serialize(writer, TableName); - } - writer.WriteEndObject(); - foreach (var item in AdditionalProperties) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.Value.ToString()).RootElement); -#endif - } - writer.WriteEndObject(); - } - - internal static XeroObjectDataset DeserializeXeroObjectDataset(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - string type = default; - Optional description = default; - Optional>> structure = default; - Optional>> schema = default; - DataFactoryLinkedServiceReference linkedServiceName = default; - Optional> parameters = default; - Optional> annotations = default; - Optional folder = default; - Optional> tableName = default; - IDictionary> additionalProperties = default; - Dictionary> additionalPropertiesDictionary = new Dictionary>(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("type"u8)) - { - type = property.Value.GetString(); - continue; - } - if (property.NameEquals("description"u8)) - { - description = property.Value.GetString(); - continue; - } - if (property.NameEquals("structure"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - structure = JsonSerializer.Deserialize>>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("schema"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - schema = JsonSerializer.Deserialize>>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("linkedServiceName"u8)) - { - linkedServiceName = JsonSerializer.Deserialize(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("parameters"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - Dictionary dictionary = new Dictionary(); - foreach (var property0 in property.Value.EnumerateObject()) - { - dictionary.Add(property0.Name, EntityParameterSpecification.DeserializeEntityParameterSpecification(property0.Value)); - } - parameters = dictionary; - continue; - } - if (property.NameEquals("annotations"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - if (item.ValueKind == JsonValueKind.Null) - { - array.Add(null); - } - else - { - array.Add(BinaryData.FromString(item.GetRawText())); - } - } - annotations = array; - continue; - } - if (property.NameEquals("folder"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - folder = DatasetFolder.DeserializeDatasetFolder(property.Value); - continue; - } - if (property.NameEquals("typeProperties"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - foreach (var property0 in property.Value.EnumerateObject()) - { - if (property0.NameEquals("tableName"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - tableName = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - } - continue; - } - additionalPropertiesDictionary.Add(property.Name, JsonSerializer.Deserialize>(property.Value.GetRawText())); - } - additionalProperties = additionalPropertiesDictionary; - return new XeroObjectDataset(type, description.Value, structure.Value, schema.Value, linkedServiceName, Optional.ToDictionary(parameters), Optional.ToList(annotations), folder.Value, additionalProperties, tableName.Value); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/XeroObjectDataset.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/XeroObjectDataset.cs deleted file mode 100644 index c280ce20..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/XeroObjectDataset.cs +++ /dev/null @@ -1,43 +0,0 @@ -// - -#nullable disable - -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// Xero Service dataset. - public partial class XeroObjectDataset : DataFactoryDatasetProperties - { - /// Initializes a new instance of XeroObjectDataset. - /// Linked service reference. - /// is null. - public XeroObjectDataset(DataFactoryLinkedServiceReference linkedServiceName) : base(linkedServiceName) - { - Argument.AssertNotNull(linkedServiceName, nameof(linkedServiceName)); - - DatasetType = "XeroObject"; - } - - /// Initializes a new instance of XeroObjectDataset. - /// Type of dataset. - /// Dataset description. - /// Columns that define the structure of the dataset. Type: array (or Expression with resultType array), itemType: DatasetDataElement. - /// Columns that define the physical type schema of the dataset. Type: array (or Expression with resultType array), itemType: DatasetSchemaDataElement. - /// Linked service reference. - /// Parameters for dataset. - /// List of tags that can be used for describing the Dataset. - /// The folder that this Dataset is in. If not specified, Dataset will appear at the root level. - /// Additional Properties. - /// The table name. Type: string (or Expression with resultType string). - internal XeroObjectDataset(string datasetType, string description, DataFactoryElement> structure, DataFactoryElement> schema, DataFactoryLinkedServiceReference linkedServiceName, IDictionary parameters, IList annotations, DatasetFolder folder, IDictionary> additionalProperties, DataFactoryElement tableName) : base(datasetType, description, structure, schema, linkedServiceName, parameters, annotations, folder, additionalProperties) - { - TableName = tableName; - DatasetType = datasetType ?? "XeroObject"; - } - - /// The table name. Type: string (or Expression with resultType string). - public DataFactoryElement TableName { get; set; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/XeroSource.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/XeroSource.Serialization.cs deleted file mode 100644 index 53afb971..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/XeroSource.Serialization.cs +++ /dev/null @@ -1,161 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class XeroSource : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - if (Optional.IsDefined(Query)) - { - writer.WritePropertyName("query"u8); - JsonSerializer.Serialize(writer, Query); - } - if (Optional.IsDefined(QueryTimeout)) - { - writer.WritePropertyName("queryTimeout"u8); - JsonSerializer.Serialize(writer, QueryTimeout); - } - if (Optional.IsDefined(AdditionalColumns)) - { - writer.WritePropertyName("additionalColumns"u8); -#if NET6_0_OR_GREATER - writer.WriteRawValue(AdditionalColumns); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(AdditionalColumns.ToString()).RootElement); -#endif - } - writer.WritePropertyName("type"u8); - writer.WriteStringValue(CopySourceType); - if (Optional.IsDefined(SourceRetryCount)) - { - writer.WritePropertyName("sourceRetryCount"u8); - JsonSerializer.Serialize(writer, SourceRetryCount); - } - if (Optional.IsDefined(SourceRetryWait)) - { - writer.WritePropertyName("sourceRetryWait"u8); - JsonSerializer.Serialize(writer, SourceRetryWait); - } - if (Optional.IsDefined(MaxConcurrentConnections)) - { - writer.WritePropertyName("maxConcurrentConnections"u8); - JsonSerializer.Serialize(writer, MaxConcurrentConnections); - } - if (Optional.IsDefined(DisableMetricsCollection)) - { - writer.WritePropertyName("disableMetricsCollection"u8); - JsonSerializer.Serialize(writer, DisableMetricsCollection); - } - foreach (var item in AdditionalProperties) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.Value.ToString()).RootElement); -#endif - } - writer.WriteEndObject(); - } - - internal static XeroSource DeserializeXeroSource(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - Optional> query = default; - Optional> queryTimeout = default; - Optional additionalColumns = default; - string type = default; - Optional> sourceRetryCount = default; - Optional> sourceRetryWait = default; - Optional> maxConcurrentConnections = default; - Optional> disableMetricsCollection = default; - IDictionary> additionalProperties = default; - Dictionary> additionalPropertiesDictionary = new Dictionary>(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("query"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - query = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("queryTimeout"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - queryTimeout = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("additionalColumns"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - additionalColumns = BinaryData.FromString(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("type"u8)) - { - type = property.Value.GetString(); - continue; - } - if (property.NameEquals("sourceRetryCount"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - sourceRetryCount = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("sourceRetryWait"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - sourceRetryWait = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("maxConcurrentConnections"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - maxConcurrentConnections = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("disableMetricsCollection"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - disableMetricsCollection = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - additionalPropertiesDictionary.Add(property.Name, JsonSerializer.Deserialize>(property.Value.GetRawText())); - } - additionalProperties = additionalPropertiesDictionary; - return new XeroSource(type, sourceRetryCount.Value, sourceRetryWait.Value, maxConcurrentConnections.Value, disableMetricsCollection.Value, additionalProperties, queryTimeout.Value, additionalColumns.Value, query.Value); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/XeroSource.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/XeroSource.cs deleted file mode 100644 index ecf1c294..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/XeroSource.cs +++ /dev/null @@ -1,37 +0,0 @@ -// - -#nullable disable - -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// A copy activity Xero Service source. - public partial class XeroSource : TabularSource - { - /// Initializes a new instance of XeroSource. - public XeroSource() - { - CopySourceType = "XeroSource"; - } - - /// Initializes a new instance of XeroSource. - /// Copy source type. - /// Source retry count. Type: integer (or Expression with resultType integer). - /// Source retry wait. Type: string (or Expression with resultType string), pattern: ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). - /// The maximum concurrent connection count for the source data store. Type: integer (or Expression with resultType integer). - /// If true, disable data store metrics collection. Default is false. Type: boolean (or Expression with resultType boolean). - /// Additional Properties. - /// 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). - /// A query to retrieve data from source. Type: string (or Expression with resultType string). - internal XeroSource(string copySourceType, DataFactoryElement sourceRetryCount, DataFactoryElement sourceRetryWait, DataFactoryElement maxConcurrentConnections, DataFactoryElement disableMetricsCollection, IDictionary> additionalProperties, DataFactoryElement queryTimeout, BinaryData additionalColumns, DataFactoryElement query) : base(copySourceType, sourceRetryCount, sourceRetryWait, maxConcurrentConnections, disableMetricsCollection, additionalProperties, queryTimeout, additionalColumns) - { - Query = query; - CopySourceType = copySourceType ?? "XeroSource"; - } - - /// A query to retrieve data from source. Type: string (or Expression with resultType string). - public DataFactoryElement Query { get; set; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/XmlDataset.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/XmlDataset.Serialization.cs deleted file mode 100644 index 7b9200bf..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/XmlDataset.Serialization.cs +++ /dev/null @@ -1,257 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class XmlDataset : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - writer.WritePropertyName("type"u8); - writer.WriteStringValue(DatasetType); - if (Optional.IsDefined(Description)) - { - writer.WritePropertyName("description"u8); - writer.WriteStringValue(Description); - } - if (Optional.IsDefined(Structure)) - { - writer.WritePropertyName("structure"u8); - JsonSerializer.Serialize(writer, Structure); - } - if (Optional.IsDefined(Schema)) - { - writer.WritePropertyName("schema"u8); - JsonSerializer.Serialize(writer, Schema); - } - writer.WritePropertyName("linkedServiceName"u8); - JsonSerializer.Serialize(writer, LinkedServiceName); if (Optional.IsCollectionDefined(Parameters)) - { - writer.WritePropertyName("parameters"u8); - writer.WriteStartObject(); - foreach (var item in Parameters) - { - writer.WritePropertyName(item.Key); - writer.WriteObjectValue(item.Value); - } - writer.WriteEndObject(); - } - if (Optional.IsCollectionDefined(Annotations)) - { - writer.WritePropertyName("annotations"u8); - writer.WriteStartArray(); - foreach (var item in Annotations) - { - if (item == null) - { - writer.WriteNullValue(); - continue; - } -#if NET6_0_OR_GREATER - writer.WriteRawValue(item); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.ToString()).RootElement); -#endif - } - writer.WriteEndArray(); - } - if (Optional.IsDefined(Folder)) - { - writer.WritePropertyName("folder"u8); - writer.WriteObjectValue(Folder); - } - writer.WritePropertyName("typeProperties"u8); - writer.WriteStartObject(); - if (Optional.IsDefined(DataLocation)) - { - writer.WritePropertyName("location"u8); - writer.WriteObjectValue(DataLocation); - } - if (Optional.IsDefined(EncodingName)) - { - writer.WritePropertyName("encodingName"u8); - JsonSerializer.Serialize(writer, EncodingName); - } - if (Optional.IsDefined(NullValue)) - { - writer.WritePropertyName("nullValue"u8); - JsonSerializer.Serialize(writer, NullValue); - } - if (Optional.IsDefined(Compression)) - { - writer.WritePropertyName("compression"u8); - writer.WriteObjectValue(Compression); - } - writer.WriteEndObject(); - foreach (var item in AdditionalProperties) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.Value.ToString()).RootElement); -#endif - } - writer.WriteEndObject(); - } - - internal static XmlDataset DeserializeXmlDataset(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - string type = default; - Optional description = default; - Optional>> structure = default; - Optional>> schema = default; - DataFactoryLinkedServiceReference linkedServiceName = default; - Optional> parameters = default; - Optional> annotations = default; - Optional folder = default; - Optional location = default; - Optional> encodingName = default; - Optional> nullValue = default; - Optional compression = default; - IDictionary> additionalProperties = default; - Dictionary> additionalPropertiesDictionary = new Dictionary>(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("type"u8)) - { - type = property.Value.GetString(); - continue; - } - if (property.NameEquals("description"u8)) - { - description = property.Value.GetString(); - continue; - } - if (property.NameEquals("structure"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - structure = JsonSerializer.Deserialize>>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("schema"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - schema = JsonSerializer.Deserialize>>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("linkedServiceName"u8)) - { - linkedServiceName = JsonSerializer.Deserialize(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("parameters"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - Dictionary dictionary = new Dictionary(); - foreach (var property0 in property.Value.EnumerateObject()) - { - dictionary.Add(property0.Name, EntityParameterSpecification.DeserializeEntityParameterSpecification(property0.Value)); - } - parameters = dictionary; - continue; - } - if (property.NameEquals("annotations"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - if (item.ValueKind == JsonValueKind.Null) - { - array.Add(null); - } - else - { - array.Add(BinaryData.FromString(item.GetRawText())); - } - } - annotations = array; - continue; - } - if (property.NameEquals("folder"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - folder = DatasetFolder.DeserializeDatasetFolder(property.Value); - continue; - } - if (property.NameEquals("typeProperties"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - foreach (var property0 in property.Value.EnumerateObject()) - { - if (property0.NameEquals("location"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - location = DatasetLocation.DeserializeDatasetLocation(property0.Value); - continue; - } - if (property0.NameEquals("encodingName"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - encodingName = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("nullValue"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - nullValue = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("compression"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - compression = DatasetCompression.DeserializeDatasetCompression(property0.Value); - continue; - } - } - continue; - } - additionalPropertiesDictionary.Add(property.Name, JsonSerializer.Deserialize>(property.Value.GetRawText())); - } - additionalProperties = additionalPropertiesDictionary; - return new XmlDataset(type, description.Value, structure.Value, schema.Value, linkedServiceName, Optional.ToDictionary(parameters), Optional.ToList(annotations), folder.Value, additionalProperties, location.Value, encodingName.Value, nullValue.Value, compression.Value); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/XmlDataset.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/XmlDataset.cs deleted file mode 100644 index a46a35e0..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/XmlDataset.cs +++ /dev/null @@ -1,63 +0,0 @@ -// - -#nullable disable - -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// Xml dataset. - public partial class XmlDataset : DataFactoryDatasetProperties - { - /// Initializes a new instance of XmlDataset. - /// Linked service reference. - /// is null. - public XmlDataset(DataFactoryLinkedServiceReference linkedServiceName) : base(linkedServiceName) - { - Argument.AssertNotNull(linkedServiceName, nameof(linkedServiceName)); - - DatasetType = "Xml"; - } - - /// Initializes a new instance of XmlDataset. - /// Type of dataset. - /// Dataset description. - /// Columns that define the structure of the dataset. Type: array (or Expression with resultType array), itemType: DatasetDataElement. - /// Columns that define the physical type schema of the dataset. Type: array (or Expression with resultType array), itemType: DatasetSchemaDataElement. - /// Linked service reference. - /// Parameters for dataset. - /// List of tags that can be used for describing the Dataset. - /// The folder that this Dataset is in. If not specified, Dataset will appear at the root level. - /// Additional Properties. - /// - /// The location of the json data storage. - /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. - /// The available derived classes include , , , , , , , , , , , and . - /// - /// The code page name of the preferred encoding. If not specified, the default value is UTF-8, unless BOM denotes another Unicode encoding. Refer to the name column of the table in the following link to set supported values: https://msdn.microsoft.com/library/system.text.encoding.aspx. Type: string (or Expression with resultType string). - /// The null value string. Type: string (or Expression with resultType string). - /// The data compression method used for the json dataset. - internal XmlDataset(string datasetType, string description, DataFactoryElement> structure, DataFactoryElement> schema, DataFactoryLinkedServiceReference linkedServiceName, IDictionary parameters, IList annotations, DatasetFolder folder, IDictionary> additionalProperties, DatasetLocation dataLocation, DataFactoryElement encodingName, DataFactoryElement nullValue, DatasetCompression compression) : base(datasetType, description, structure, schema, linkedServiceName, parameters, annotations, folder, additionalProperties) - { - DataLocation = dataLocation; - EncodingName = encodingName; - NullValue = nullValue; - Compression = compression; - DatasetType = datasetType ?? "Xml"; - } - - /// - /// The location of the json data storage. - /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. - /// The available derived classes include , , , , , , , , , , , and . - /// - public DatasetLocation DataLocation { get; set; } - /// The code page name of the preferred encoding. If not specified, the default value is UTF-8, unless BOM denotes another Unicode encoding. Refer to the name column of the table in the following link to set supported values: https://msdn.microsoft.com/library/system.text.encoding.aspx. Type: string (or Expression with resultType string). - public DataFactoryElement EncodingName { get; set; } - /// The null value string. Type: string (or Expression with resultType string). - public DataFactoryElement NullValue { get; set; } - /// The data compression method used for the json dataset. - public DatasetCompression Compression { get; set; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/XmlReadSettings.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/XmlReadSettings.Serialization.cs deleted file mode 100644 index 40166c9a..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/XmlReadSettings.Serialization.cs +++ /dev/null @@ -1,131 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class XmlReadSettings : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - if (Optional.IsDefined(CompressionProperties)) - { - writer.WritePropertyName("compressionProperties"u8); - writer.WriteObjectValue(CompressionProperties); - } - if (Optional.IsDefined(ValidationMode)) - { - writer.WritePropertyName("validationMode"u8); - JsonSerializer.Serialize(writer, ValidationMode); - } - if (Optional.IsDefined(DetectDataType)) - { - writer.WritePropertyName("detectDataType"u8); - JsonSerializer.Serialize(writer, DetectDataType); - } - if (Optional.IsDefined(Namespaces)) - { - writer.WritePropertyName("namespaces"u8); - JsonSerializer.Serialize(writer, Namespaces); - } - if (Optional.IsDefined(NamespacePrefixes)) - { - writer.WritePropertyName("namespacePrefixes"u8); -#if NET6_0_OR_GREATER - writer.WriteRawValue(NamespacePrefixes); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(NamespacePrefixes.ToString()).RootElement); -#endif - } - writer.WritePropertyName("type"u8); - writer.WriteStringValue(FormatReadSettingsType); - foreach (var item in AdditionalProperties) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.Value.ToString()).RootElement); -#endif - } - writer.WriteEndObject(); - } - - internal static XmlReadSettings DeserializeXmlReadSettings(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - Optional compressionProperties = default; - Optional> validationMode = default; - Optional> detectDataType = default; - Optional> namespaces = default; - Optional namespacePrefixes = default; - string type = default; - IDictionary> additionalProperties = default; - Dictionary> additionalPropertiesDictionary = new Dictionary>(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("compressionProperties"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - compressionProperties = CompressionReadSettings.DeserializeCompressionReadSettings(property.Value); - continue; - } - if (property.NameEquals("validationMode"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - validationMode = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("detectDataType"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - detectDataType = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("namespaces"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - namespaces = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("namespacePrefixes"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - namespacePrefixes = BinaryData.FromString(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("type"u8)) - { - type = property.Value.GetString(); - continue; - } - additionalPropertiesDictionary.Add(property.Name, JsonSerializer.Deserialize>(property.Value.GetRawText())); - } - additionalProperties = additionalPropertiesDictionary; - return new XmlReadSettings(type, additionalProperties, compressionProperties.Value, validationMode.Value, detectDataType.Value, namespaces.Value, namespacePrefixes.Value); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/XmlReadSettings.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/XmlReadSettings.cs deleted file mode 100644 index 5e150c19..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/XmlReadSettings.cs +++ /dev/null @@ -1,84 +0,0 @@ -// - -#nullable disable - -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// Xml read settings. - public partial class XmlReadSettings : FormatReadSettings - { - /// Initializes a new instance of XmlReadSettings. - public XmlReadSettings() - { - FormatReadSettingsType = "XmlReadSettings"; - } - - /// Initializes a new instance of XmlReadSettings. - /// The read setting type. - /// Additional Properties. - /// - /// Compression settings. - /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. - /// The available derived classes include , and . - /// - /// Indicates what validation method is used when reading the xml files. Allowed values: 'none', 'xsd', or 'dtd'. Type: string (or Expression with resultType string). - /// Indicates whether type detection is enabled when reading the xml files. Type: boolean (or Expression with resultType boolean). - /// Indicates whether namespace is enabled when reading the xml files. Type: boolean (or Expression with resultType boolean). - /// Namespace uri to prefix mappings to override the prefixes in column names when namespace is enabled, if no prefix is defined for a namespace uri, the prefix of xml element/attribute name in the xml data file will be used. Example: "{"http://www.example.com/xml":"prefix"}" Type: object (or Expression with resultType object). - internal XmlReadSettings(string formatReadSettingsType, IDictionary> additionalProperties, CompressionReadSettings compressionProperties, DataFactoryElement validationMode, DataFactoryElement detectDataType, DataFactoryElement namespaces, BinaryData namespacePrefixes) : base(formatReadSettingsType, additionalProperties) - { - CompressionProperties = compressionProperties; - ValidationMode = validationMode; - DetectDataType = detectDataType; - Namespaces = namespaces; - NamespacePrefixes = namespacePrefixes; - FormatReadSettingsType = formatReadSettingsType ?? "XmlReadSettings"; - } - - /// - /// Compression settings. - /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. - /// The available derived classes include , and . - /// - public CompressionReadSettings CompressionProperties { get; set; } - /// Indicates what validation method is used when reading the xml files. Allowed values: 'none', 'xsd', or 'dtd'. Type: string (or Expression with resultType string). - public DataFactoryElement ValidationMode { get; set; } - /// Indicates whether type detection is enabled when reading the xml files. Type: boolean (or Expression with resultType boolean). - public DataFactoryElement DetectDataType { get; set; } - /// Indicates whether namespace is enabled when reading the xml files. Type: boolean (or Expression with resultType boolean). - public DataFactoryElement Namespaces { get; set; } - /// - /// Namespace uri to prefix mappings to override the prefixes in column names when namespace is enabled, if no prefix is defined for a namespace uri, the prefix of xml element/attribute name in the xml data file will be used. Example: "{"http://www.example.com/xml":"prefix"}" Type: object (or Expression with resultType object). - /// - /// To assign an object to this property use . - /// - /// - /// To assign an already formated json string to this property use . - /// - /// - /// Examples: - /// - /// - /// BinaryData.FromObjectAsJson("foo") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromString("\"foo\"") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromObjectAsJson(new { key = "value" }) - /// Creates a payload of { "key": "value" }. - /// - /// - /// BinaryData.FromString("{\"key\": \"value\"}") - /// Creates a payload of { "key": "value" }. - /// - /// - /// - /// - public BinaryData NamespacePrefixes { get; set; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/XmlSource.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/XmlSource.Serialization.cs deleted file mode 100644 index 675e9af5..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/XmlSource.Serialization.cs +++ /dev/null @@ -1,161 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class XmlSource : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - if (Optional.IsDefined(StoreSettings)) - { - writer.WritePropertyName("storeSettings"u8); - writer.WriteObjectValue(StoreSettings); - } - if (Optional.IsDefined(FormatSettings)) - { - writer.WritePropertyName("formatSettings"u8); - writer.WriteObjectValue(FormatSettings); - } - if (Optional.IsDefined(AdditionalColumns)) - { - writer.WritePropertyName("additionalColumns"u8); -#if NET6_0_OR_GREATER - writer.WriteRawValue(AdditionalColumns); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(AdditionalColumns.ToString()).RootElement); -#endif - } - writer.WritePropertyName("type"u8); - writer.WriteStringValue(CopySourceType); - if (Optional.IsDefined(SourceRetryCount)) - { - writer.WritePropertyName("sourceRetryCount"u8); - JsonSerializer.Serialize(writer, SourceRetryCount); - } - if (Optional.IsDefined(SourceRetryWait)) - { - writer.WritePropertyName("sourceRetryWait"u8); - JsonSerializer.Serialize(writer, SourceRetryWait); - } - if (Optional.IsDefined(MaxConcurrentConnections)) - { - writer.WritePropertyName("maxConcurrentConnections"u8); - JsonSerializer.Serialize(writer, MaxConcurrentConnections); - } - if (Optional.IsDefined(DisableMetricsCollection)) - { - writer.WritePropertyName("disableMetricsCollection"u8); - JsonSerializer.Serialize(writer, DisableMetricsCollection); - } - foreach (var item in AdditionalProperties) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.Value.ToString()).RootElement); -#endif - } - writer.WriteEndObject(); - } - - internal static XmlSource DeserializeXmlSource(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - Optional storeSettings = default; - Optional formatSettings = default; - Optional additionalColumns = default; - string type = default; - Optional> sourceRetryCount = default; - Optional> sourceRetryWait = default; - Optional> maxConcurrentConnections = default; - Optional> disableMetricsCollection = default; - IDictionary> additionalProperties = default; - Dictionary> additionalPropertiesDictionary = new Dictionary>(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("storeSettings"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - storeSettings = StoreReadSettings.DeserializeStoreReadSettings(property.Value); - continue; - } - if (property.NameEquals("formatSettings"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - formatSettings = XmlReadSettings.DeserializeXmlReadSettings(property.Value); - continue; - } - if (property.NameEquals("additionalColumns"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - additionalColumns = BinaryData.FromString(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("type"u8)) - { - type = property.Value.GetString(); - continue; - } - if (property.NameEquals("sourceRetryCount"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - sourceRetryCount = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("sourceRetryWait"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - sourceRetryWait = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("maxConcurrentConnections"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - maxConcurrentConnections = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("disableMetricsCollection"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - disableMetricsCollection = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - additionalPropertiesDictionary.Add(property.Name, JsonSerializer.Deserialize>(property.Value.GetRawText())); - } - additionalProperties = additionalPropertiesDictionary; - return new XmlSource(type, sourceRetryCount.Value, sourceRetryWait.Value, maxConcurrentConnections.Value, disableMetricsCollection.Value, additionalProperties, storeSettings.Value, formatSettings.Value, additionalColumns.Value); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/XmlSource.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/XmlSource.cs deleted file mode 100644 index 2e57adb4..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/XmlSource.cs +++ /dev/null @@ -1,80 +0,0 @@ -// - -#nullable disable - -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// A copy activity Xml source. - public partial class XmlSource : CopyActivitySource - { - /// Initializes a new instance of XmlSource. - public XmlSource() - { - CopySourceType = "XmlSource"; - } - - /// Initializes a new instance of XmlSource. - /// Copy source type. - /// Source retry count. Type: integer (or Expression with resultType integer). - /// Source retry wait. Type: string (or Expression with resultType string), pattern: ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). - /// The maximum concurrent connection count for the source data store. Type: integer (or Expression with resultType integer). - /// If true, disable data store metrics collection. Default is false. Type: boolean (or Expression with resultType boolean). - /// Additional Properties. - /// - /// Xml store settings. - /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. - /// The available derived classes include , , , , , , , , , , , and . - /// - /// Xml format settings. - /// Specifies the additional columns to be added to source data. Type: array of objects(AdditionalColumns) (or Expression with resultType array of objects). - internal XmlSource(string copySourceType, DataFactoryElement sourceRetryCount, DataFactoryElement sourceRetryWait, DataFactoryElement maxConcurrentConnections, DataFactoryElement disableMetricsCollection, IDictionary> additionalProperties, StoreReadSettings storeSettings, XmlReadSettings formatSettings, BinaryData additionalColumns) : base(copySourceType, sourceRetryCount, sourceRetryWait, maxConcurrentConnections, disableMetricsCollection, additionalProperties) - { - StoreSettings = storeSettings; - FormatSettings = formatSettings; - AdditionalColumns = additionalColumns; - CopySourceType = copySourceType ?? "XmlSource"; - } - - /// - /// Xml store settings. - /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. - /// The available derived classes include , , , , , , , , , , , and . - /// - public StoreReadSettings StoreSettings { get; set; } - /// Xml format settings. - public XmlReadSettings FormatSettings { get; set; } - /// - /// Specifies the additional columns to be added to source data. Type: array of objects(AdditionalColumns) (or Expression with resultType array of objects). - /// - /// To assign an object to this property use . - /// - /// - /// To assign an already formated json string to this property use . - /// - /// - /// Examples: - /// - /// - /// BinaryData.FromObjectAsJson("foo") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromString("\"foo\"") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromObjectAsJson(new { key = "value" }) - /// Creates a payload of { "key": "value" }. - /// - /// - /// BinaryData.FromString("{\"key\": \"value\"}") - /// Creates a payload of { "key": "value" }. - /// - /// - /// - /// - public BinaryData AdditionalColumns { get; set; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/ZendeskAuthenticationType.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/ZendeskAuthenticationType.cs deleted file mode 100644 index b148878a..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/ZendeskAuthenticationType.cs +++ /dev/null @@ -1,47 +0,0 @@ -// - -#nullable disable - -using System.ComponentModel; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// The authentication type to use. - public readonly partial struct ZendeskAuthenticationType : IEquatable - { - private readonly string _value; - - /// Initializes a new instance of . - /// is null. - public ZendeskAuthenticationType(string value) - { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } - - private const string BasicValue = "Basic"; - private const string TokenValue = "Token"; - - /// Basic. - public static ZendeskAuthenticationType Basic { get; } = new ZendeskAuthenticationType(BasicValue); - /// Token. - public static ZendeskAuthenticationType Token { get; } = new ZendeskAuthenticationType(TokenValue); - /// Determines if two values are the same. - public static bool operator ==(ZendeskAuthenticationType left, ZendeskAuthenticationType right) => left.Equals(right); - /// Determines if two values are not the same. - public static bool operator !=(ZendeskAuthenticationType left, ZendeskAuthenticationType right) => !left.Equals(right); - /// Converts a string to a . - public static implicit operator ZendeskAuthenticationType(string value) => new ZendeskAuthenticationType(value); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override bool Equals(object obj) => obj is ZendeskAuthenticationType other && Equals(other); - /// - public bool Equals(ZendeskAuthenticationType other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override int GetHashCode() => _value?.GetHashCode() ?? 0; - /// - public override string ToString() => _value; - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/ZendeskLinkedService.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/ZendeskLinkedService.Serialization.cs deleted file mode 100644 index 94cd1ace..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/ZendeskLinkedService.Serialization.cs +++ /dev/null @@ -1,232 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class ZendeskLinkedService : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - writer.WritePropertyName("type"u8); - writer.WriteStringValue(LinkedServiceType); - if (Optional.IsDefined(ConnectVia)) - { - writer.WritePropertyName("connectVia"u8); - writer.WriteObjectValue(ConnectVia); - } - if (Optional.IsDefined(Description)) - { - writer.WritePropertyName("description"u8); - writer.WriteStringValue(Description); - } - if (Optional.IsCollectionDefined(Parameters)) - { - writer.WritePropertyName("parameters"u8); - writer.WriteStartObject(); - foreach (var item in Parameters) - { - writer.WritePropertyName(item.Key); - writer.WriteObjectValue(item.Value); - } - writer.WriteEndObject(); - } - if (Optional.IsCollectionDefined(Annotations)) - { - writer.WritePropertyName("annotations"u8); - writer.WriteStartArray(); - foreach (var item in Annotations) - { - if (item == null) - { - writer.WriteNullValue(); - continue; - } -#if NET6_0_OR_GREATER - writer.WriteRawValue(item); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.ToString()).RootElement); -#endif - } - writer.WriteEndArray(); - } - writer.WritePropertyName("typeProperties"u8); - writer.WriteStartObject(); - writer.WritePropertyName("authenticationType"u8); - writer.WriteStringValue(AuthenticationType.ToString()); - writer.WritePropertyName("url"u8); - JsonSerializer.Serialize(writer, Uri); - if (Optional.IsDefined(UserName)) - { - writer.WritePropertyName("userName"u8); - JsonSerializer.Serialize(writer, UserName); - } - if (Optional.IsDefined(Password)) - { - writer.WritePropertyName("password"u8); - JsonSerializer.Serialize(writer, Password); - } - if (Optional.IsDefined(ApiToken)) - { - writer.WritePropertyName("apiToken"u8); - JsonSerializer.Serialize(writer, ApiToken); - } - if (Optional.IsDefined(EncryptedCredential)) - { - writer.WritePropertyName("encryptedCredential"u8); - writer.WriteStringValue(EncryptedCredential); - } - writer.WriteEndObject(); - foreach (var item in AdditionalProperties) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.Value.ToString()).RootElement); -#endif - } - writer.WriteEndObject(); - } - - internal static ZendeskLinkedService DeserializeZendeskLinkedService(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - string type = default; - Optional connectVia = default; - Optional description = default; - Optional> parameters = default; - Optional> annotations = default; - ZendeskAuthenticationType authenticationType = default; - DataFactoryElement url = default; - Optional> userName = default; - Optional password = default; - Optional apiToken = default; - Optional encryptedCredential = default; - IDictionary> additionalProperties = default; - Dictionary> additionalPropertiesDictionary = new Dictionary>(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("type"u8)) - { - type = property.Value.GetString(); - continue; - } - if (property.NameEquals("connectVia"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - connectVia = IntegrationRuntimeReference.DeserializeIntegrationRuntimeReference(property.Value); - continue; - } - if (property.NameEquals("description"u8)) - { - description = property.Value.GetString(); - continue; - } - if (property.NameEquals("parameters"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - Dictionary dictionary = new Dictionary(); - foreach (var property0 in property.Value.EnumerateObject()) - { - dictionary.Add(property0.Name, EntityParameterSpecification.DeserializeEntityParameterSpecification(property0.Value)); - } - parameters = dictionary; - continue; - } - if (property.NameEquals("annotations"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - if (item.ValueKind == JsonValueKind.Null) - { - array.Add(null); - } - else - { - array.Add(BinaryData.FromString(item.GetRawText())); - } - } - annotations = array; - continue; - } - if (property.NameEquals("typeProperties"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - foreach (var property0 in property.Value.EnumerateObject()) - { - if (property0.NameEquals("authenticationType"u8)) - { - authenticationType = new ZendeskAuthenticationType(property0.Value.GetString()); - continue; - } - if (property0.NameEquals("url"u8)) - { - url = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("userName"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - userName = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("password"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - password = JsonSerializer.Deserialize(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("apiToken"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - apiToken = JsonSerializer.Deserialize(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("encryptedCredential"u8)) - { - encryptedCredential = property0.Value.GetString(); - continue; - } - } - continue; - } - additionalPropertiesDictionary.Add(property.Name, JsonSerializer.Deserialize>(property.Value.GetRawText())); - } - additionalProperties = additionalPropertiesDictionary; - return new ZendeskLinkedService(type, connectVia.Value, description.Value, Optional.ToDictionary(parameters), Optional.ToList(annotations), additionalProperties, authenticationType, url, userName.Value, password, apiToken, encryptedCredential.Value); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/ZendeskLinkedService.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/ZendeskLinkedService.cs deleted file mode 100644 index 1ceb7357..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/ZendeskLinkedService.cs +++ /dev/null @@ -1,63 +0,0 @@ -// - -#nullable disable - -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// Linked service for Zendesk. - public partial class ZendeskLinkedService : DataFactoryLinkedServiceProperties - { - /// Initializes a new instance of ZendeskLinkedService. - /// The authentication type to use. - /// The url to connect Zendesk source. Type: string (or Expression with resultType string). - /// is null. - public ZendeskLinkedService(ZendeskAuthenticationType authenticationType, DataFactoryElement uri) - { - Argument.AssertNotNull(uri, nameof(uri)); - - AuthenticationType = authenticationType; - Uri = uri; - LinkedServiceType = "Zendesk"; - } - - /// Initializes a new instance of ZendeskLinkedService. - /// Type of linked service. - /// The integration runtime reference. - /// Linked service description. - /// Parameters for linked service. - /// List of tags that can be used for describing the linked service. - /// Additional Properties. - /// The authentication type to use. - /// The url to connect Zendesk source. Type: string (or Expression with resultType string). - /// The username of the Zendesk source. Type: string (or Expression with resultType string). - /// The password of the Zendesk source. - /// The api token for the Zendesk source. - /// The encrypted credential used for authentication. Credentials are encrypted using the integration runtime credential manager. Type: string. - internal ZendeskLinkedService(string linkedServiceType, IntegrationRuntimeReference connectVia, string description, IDictionary parameters, IList annotations, IDictionary> additionalProperties, ZendeskAuthenticationType authenticationType, DataFactoryElement uri, DataFactoryElement userName, DataFactorySecretBaseDefinition password, DataFactorySecretBaseDefinition apiToken, string encryptedCredential) : base(linkedServiceType, connectVia, description, parameters, annotations, additionalProperties) - { - AuthenticationType = authenticationType; - Uri = uri; - UserName = userName; - Password = password; - ApiToken = apiToken; - EncryptedCredential = encryptedCredential; - LinkedServiceType = linkedServiceType ?? "Zendesk"; - } - - /// The authentication type to use. - public ZendeskAuthenticationType AuthenticationType { get; set; } - /// The url to connect Zendesk source. Type: string (or Expression with resultType string). - public DataFactoryElement Uri { get; set; } - /// The username of the Zendesk source. Type: string (or Expression with resultType string). - public DataFactoryElement UserName { get; set; } - /// The password of the Zendesk source. - public DataFactorySecretBaseDefinition Password { get; set; } - /// The api token for the Zendesk source. - public DataFactorySecretBaseDefinition ApiToken { get; set; } - /// The encrypted credential used for authentication. Credentials are encrypted using the integration runtime credential manager. Type: string. - public string EncryptedCredential { get; set; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/ZipDeflateReadSettings.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/ZipDeflateReadSettings.Serialization.cs deleted file mode 100644 index 0608b171..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/ZipDeflateReadSettings.Serialization.cs +++ /dev/null @@ -1,67 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class ZipDeflateReadSettings : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - if (Optional.IsDefined(PreserveZipFileNameAsFolder)) - { - writer.WritePropertyName("preserveZipFileNameAsFolder"u8); - JsonSerializer.Serialize(writer, PreserveZipFileNameAsFolder); - } - writer.WritePropertyName("type"u8); - writer.WriteStringValue(CompressionReadSettingsType); - foreach (var item in AdditionalProperties) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.Value.ToString()).RootElement); -#endif - } - writer.WriteEndObject(); - } - - internal static ZipDeflateReadSettings DeserializeZipDeflateReadSettings(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - Optional> preserveZipFileNameAsFolder = default; - string type = default; - IDictionary> additionalProperties = default; - Dictionary> additionalPropertiesDictionary = new Dictionary>(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("preserveZipFileNameAsFolder"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - preserveZipFileNameAsFolder = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("type"u8)) - { - type = property.Value.GetString(); - continue; - } - additionalPropertiesDictionary.Add(property.Name, JsonSerializer.Deserialize>(property.Value.GetRawText())); - } - additionalProperties = additionalPropertiesDictionary; - return new ZipDeflateReadSettings(type, additionalProperties, preserveZipFileNameAsFolder.Value); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/ZipDeflateReadSettings.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/ZipDeflateReadSettings.cs deleted file mode 100644 index a83545e3..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/ZipDeflateReadSettings.cs +++ /dev/null @@ -1,31 +0,0 @@ -// - -#nullable disable - -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// The ZipDeflate compression read settings. - public partial class ZipDeflateReadSettings : CompressionReadSettings - { - /// Initializes a new instance of ZipDeflateReadSettings. - public ZipDeflateReadSettings() - { - CompressionReadSettingsType = "ZipDeflateReadSettings"; - } - - /// Initializes a new instance of ZipDeflateReadSettings. - /// The Compression setting type. - /// Additional Properties. - /// Preserve the zip file name as folder path. Type: boolean (or Expression with resultType boolean). - internal ZipDeflateReadSettings(string compressionReadSettingsType, IDictionary> additionalProperties, DataFactoryElement preserveZipFileNameAsFolder) : base(compressionReadSettingsType, additionalProperties) - { - PreserveZipFileNameAsFolder = preserveZipFileNameAsFolder; - CompressionReadSettingsType = compressionReadSettingsType ?? "ZipDeflateReadSettings"; - } - - /// Preserve the zip file name as folder path. Type: boolean (or Expression with resultType boolean). - public DataFactoryElement PreserveZipFileNameAsFolder { get; set; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/ZohoLinkedService.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/ZohoLinkedService.Serialization.cs deleted file mode 100644 index 5a0d5bb7..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/ZohoLinkedService.Serialization.cs +++ /dev/null @@ -1,265 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class ZohoLinkedService : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - writer.WritePropertyName("type"u8); - writer.WriteStringValue(LinkedServiceType); - if (Optional.IsDefined(ConnectVia)) - { - writer.WritePropertyName("connectVia"u8); - writer.WriteObjectValue(ConnectVia); - } - if (Optional.IsDefined(Description)) - { - writer.WritePropertyName("description"u8); - writer.WriteStringValue(Description); - } - if (Optional.IsCollectionDefined(Parameters)) - { - writer.WritePropertyName("parameters"u8); - writer.WriteStartObject(); - foreach (var item in Parameters) - { - writer.WritePropertyName(item.Key); - writer.WriteObjectValue(item.Value); - } - writer.WriteEndObject(); - } - if (Optional.IsCollectionDefined(Annotations)) - { - writer.WritePropertyName("annotations"u8); - writer.WriteStartArray(); - foreach (var item in Annotations) - { - if (item == null) - { - writer.WriteNullValue(); - continue; - } -#if NET6_0_OR_GREATER - writer.WriteRawValue(item); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.ToString()).RootElement); -#endif - } - writer.WriteEndArray(); - } - writer.WritePropertyName("typeProperties"u8); - writer.WriteStartObject(); - if (Optional.IsDefined(ConnectionProperties)) - { - writer.WritePropertyName("connectionProperties"u8); -#if NET6_0_OR_GREATER - writer.WriteRawValue(ConnectionProperties); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(ConnectionProperties.ToString()).RootElement); -#endif - } - if (Optional.IsDefined(Endpoint)) - { - writer.WritePropertyName("endpoint"u8); - JsonSerializer.Serialize(writer, Endpoint); - } - if (Optional.IsDefined(AccessToken)) - { - writer.WritePropertyName("accessToken"u8); - JsonSerializer.Serialize(writer, AccessToken); - } - if (Optional.IsDefined(UseEncryptedEndpoints)) - { - writer.WritePropertyName("useEncryptedEndpoints"u8); - JsonSerializer.Serialize(writer, UseEncryptedEndpoints); - } - if (Optional.IsDefined(UseHostVerification)) - { - writer.WritePropertyName("useHostVerification"u8); - JsonSerializer.Serialize(writer, UseHostVerification); - } - if (Optional.IsDefined(UsePeerVerification)) - { - writer.WritePropertyName("usePeerVerification"u8); - JsonSerializer.Serialize(writer, UsePeerVerification); - } - if (Optional.IsDefined(EncryptedCredential)) - { - writer.WritePropertyName("encryptedCredential"u8); - writer.WriteStringValue(EncryptedCredential); - } - writer.WriteEndObject(); - foreach (var item in AdditionalProperties) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.Value.ToString()).RootElement); -#endif - } - writer.WriteEndObject(); - } - - internal static ZohoLinkedService DeserializeZohoLinkedService(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - string type = default; - Optional connectVia = default; - Optional description = default; - Optional> parameters = default; - Optional> annotations = default; - Optional connectionProperties = default; - Optional> endpoint = default; - Optional accessToken = default; - Optional> useEncryptedEndpoints = default; - Optional> useHostVerification = default; - Optional> usePeerVerification = default; - Optional encryptedCredential = default; - IDictionary> additionalProperties = default; - Dictionary> additionalPropertiesDictionary = new Dictionary>(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("type"u8)) - { - type = property.Value.GetString(); - continue; - } - if (property.NameEquals("connectVia"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - connectVia = IntegrationRuntimeReference.DeserializeIntegrationRuntimeReference(property.Value); - continue; - } - if (property.NameEquals("description"u8)) - { - description = property.Value.GetString(); - continue; - } - if (property.NameEquals("parameters"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - Dictionary dictionary = new Dictionary(); - foreach (var property0 in property.Value.EnumerateObject()) - { - dictionary.Add(property0.Name, EntityParameterSpecification.DeserializeEntityParameterSpecification(property0.Value)); - } - parameters = dictionary; - continue; - } - if (property.NameEquals("annotations"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - if (item.ValueKind == JsonValueKind.Null) - { - array.Add(null); - } - else - { - array.Add(BinaryData.FromString(item.GetRawText())); - } - } - annotations = array; - continue; - } - if (property.NameEquals("typeProperties"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - foreach (var property0 in property.Value.EnumerateObject()) - { - if (property0.NameEquals("connectionProperties"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - connectionProperties = BinaryData.FromString(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("endpoint"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - endpoint = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("accessToken"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - accessToken = JsonSerializer.Deserialize(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("useEncryptedEndpoints"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - useEncryptedEndpoints = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("useHostVerification"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - useHostVerification = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("usePeerVerification"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - usePeerVerification = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("encryptedCredential"u8)) - { - encryptedCredential = property0.Value.GetString(); - continue; - } - } - continue; - } - additionalPropertiesDictionary.Add(property.Name, JsonSerializer.Deserialize>(property.Value.GetRawText())); - } - additionalProperties = additionalPropertiesDictionary; - return new ZohoLinkedService(type, connectVia.Value, description.Value, Optional.ToDictionary(parameters), Optional.ToList(annotations), additionalProperties, connectionProperties.Value, endpoint.Value, accessToken, useEncryptedEndpoints.Value, useHostVerification.Value, usePeerVerification.Value, encryptedCredential.Value); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/ZohoLinkedService.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/ZohoLinkedService.cs deleted file mode 100644 index 752c3e66..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/ZohoLinkedService.cs +++ /dev/null @@ -1,88 +0,0 @@ -// - -#nullable disable - -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// Zoho server linked service. - public partial class ZohoLinkedService : DataFactoryLinkedServiceProperties - { - /// Initializes a new instance of ZohoLinkedService. - public ZohoLinkedService() - { - LinkedServiceType = "Zoho"; - } - - /// Initializes a new instance of ZohoLinkedService. - /// Type of linked service. - /// The integration runtime reference. - /// Linked service description. - /// Parameters for linked service. - /// List of tags that can be used for describing the linked service. - /// Additional Properties. - /// Properties used to connect to Zoho. It is mutually exclusive with any other properties in the linked service. Type: object. - /// The endpoint of the Zoho server. (i.e. crm.zoho.com/crm/private). - /// The access token for Zoho authentication. - /// Specifies whether the data source endpoints are encrypted using HTTPS. The default value is true. - /// 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. - /// Specifies whether to verify the identity of the server when connecting over SSL. The default value is true. - /// The encrypted credential used for authentication. Credentials are encrypted using the integration runtime credential manager. Type: string. - internal ZohoLinkedService(string linkedServiceType, IntegrationRuntimeReference connectVia, string description, IDictionary parameters, IList annotations, IDictionary> additionalProperties, BinaryData connectionProperties, DataFactoryElement endpoint, DataFactorySecretBaseDefinition accessToken, DataFactoryElement useEncryptedEndpoints, DataFactoryElement useHostVerification, DataFactoryElement usePeerVerification, string encryptedCredential) : base(linkedServiceType, connectVia, description, parameters, annotations, additionalProperties) - { - ConnectionProperties = connectionProperties; - Endpoint = endpoint; - AccessToken = accessToken; - UseEncryptedEndpoints = useEncryptedEndpoints; - UseHostVerification = useHostVerification; - UsePeerVerification = usePeerVerification; - EncryptedCredential = encryptedCredential; - LinkedServiceType = linkedServiceType ?? "Zoho"; - } - - /// - /// Properties used to connect to Zoho. It is mutually exclusive with any other properties in the linked service. Type: object. - /// - /// To assign an object to this property use . - /// - /// - /// To assign an already formated json string to this property use . - /// - /// - /// Examples: - /// - /// - /// BinaryData.FromObjectAsJson("foo") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromString("\"foo\"") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromObjectAsJson(new { key = "value" }) - /// Creates a payload of { "key": "value" }. - /// - /// - /// BinaryData.FromString("{\"key\": \"value\"}") - /// Creates a payload of { "key": "value" }. - /// - /// - /// - /// - public BinaryData ConnectionProperties { get; set; } - /// The endpoint of the Zoho server. (i.e. crm.zoho.com/crm/private). - public DataFactoryElement Endpoint { get; set; } - /// The access token for Zoho authentication. - public DataFactorySecretBaseDefinition AccessToken { get; set; } - /// Specifies whether the data source endpoints are encrypted using HTTPS. The default value is true. - public DataFactoryElement UseEncryptedEndpoints { get; set; } - /// 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. - public DataFactoryElement UseHostVerification { get; set; } - /// Specifies whether to verify the identity of the server when connecting over SSL. The default value is true. - public DataFactoryElement UsePeerVerification { get; set; } - /// The encrypted credential used for authentication. Credentials are encrypted using the integration runtime credential manager. Type: string. - public string EncryptedCredential { get; set; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/ZohoObjectDataset.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/ZohoObjectDataset.Serialization.cs deleted file mode 100644 index f951c643..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/ZohoObjectDataset.Serialization.cs +++ /dev/null @@ -1,212 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class ZohoObjectDataset : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - writer.WritePropertyName("type"u8); - writer.WriteStringValue(DatasetType); - if (Optional.IsDefined(Description)) - { - writer.WritePropertyName("description"u8); - writer.WriteStringValue(Description); - } - if (Optional.IsDefined(Structure)) - { - writer.WritePropertyName("structure"u8); - JsonSerializer.Serialize(writer, Structure); - } - if (Optional.IsDefined(Schema)) - { - writer.WritePropertyName("schema"u8); - JsonSerializer.Serialize(writer, Schema); - } - writer.WritePropertyName("linkedServiceName"u8); - JsonSerializer.Serialize(writer, LinkedServiceName); if (Optional.IsCollectionDefined(Parameters)) - { - writer.WritePropertyName("parameters"u8); - writer.WriteStartObject(); - foreach (var item in Parameters) - { - writer.WritePropertyName(item.Key); - writer.WriteObjectValue(item.Value); - } - writer.WriteEndObject(); - } - if (Optional.IsCollectionDefined(Annotations)) - { - writer.WritePropertyName("annotations"u8); - writer.WriteStartArray(); - foreach (var item in Annotations) - { - if (item == null) - { - writer.WriteNullValue(); - continue; - } -#if NET6_0_OR_GREATER - writer.WriteRawValue(item); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.ToString()).RootElement); -#endif - } - writer.WriteEndArray(); - } - if (Optional.IsDefined(Folder)) - { - writer.WritePropertyName("folder"u8); - writer.WriteObjectValue(Folder); - } - writer.WritePropertyName("typeProperties"u8); - writer.WriteStartObject(); - if (Optional.IsDefined(TableName)) - { - writer.WritePropertyName("tableName"u8); - JsonSerializer.Serialize(writer, TableName); - } - writer.WriteEndObject(); - foreach (var item in AdditionalProperties) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.Value.ToString()).RootElement); -#endif - } - writer.WriteEndObject(); - } - - internal static ZohoObjectDataset DeserializeZohoObjectDataset(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - string type = default; - Optional description = default; - Optional>> structure = default; - Optional>> schema = default; - DataFactoryLinkedServiceReference linkedServiceName = default; - Optional> parameters = default; - Optional> annotations = default; - Optional folder = default; - Optional> tableName = default; - IDictionary> additionalProperties = default; - Dictionary> additionalPropertiesDictionary = new Dictionary>(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("type"u8)) - { - type = property.Value.GetString(); - continue; - } - if (property.NameEquals("description"u8)) - { - description = property.Value.GetString(); - continue; - } - if (property.NameEquals("structure"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - structure = JsonSerializer.Deserialize>>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("schema"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - schema = JsonSerializer.Deserialize>>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("linkedServiceName"u8)) - { - linkedServiceName = JsonSerializer.Deserialize(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("parameters"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - Dictionary dictionary = new Dictionary(); - foreach (var property0 in property.Value.EnumerateObject()) - { - dictionary.Add(property0.Name, EntityParameterSpecification.DeserializeEntityParameterSpecification(property0.Value)); - } - parameters = dictionary; - continue; - } - if (property.NameEquals("annotations"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - if (item.ValueKind == JsonValueKind.Null) - { - array.Add(null); - } - else - { - array.Add(BinaryData.FromString(item.GetRawText())); - } - } - annotations = array; - continue; - } - if (property.NameEquals("folder"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - folder = DatasetFolder.DeserializeDatasetFolder(property.Value); - continue; - } - if (property.NameEquals("typeProperties"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - foreach (var property0 in property.Value.EnumerateObject()) - { - if (property0.NameEquals("tableName"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - tableName = JsonSerializer.Deserialize>(property0.Value.GetRawText()); - continue; - } - } - continue; - } - additionalPropertiesDictionary.Add(property.Name, JsonSerializer.Deserialize>(property.Value.GetRawText())); - } - additionalProperties = additionalPropertiesDictionary; - return new ZohoObjectDataset(type, description.Value, structure.Value, schema.Value, linkedServiceName, Optional.ToDictionary(parameters), Optional.ToList(annotations), folder.Value, additionalProperties, tableName.Value); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/ZohoObjectDataset.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/ZohoObjectDataset.cs deleted file mode 100644 index 18237cb7..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/ZohoObjectDataset.cs +++ /dev/null @@ -1,43 +0,0 @@ -// - -#nullable disable - -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// Zoho server dataset. - public partial class ZohoObjectDataset : DataFactoryDatasetProperties - { - /// Initializes a new instance of ZohoObjectDataset. - /// Linked service reference. - /// is null. - public ZohoObjectDataset(DataFactoryLinkedServiceReference linkedServiceName) : base(linkedServiceName) - { - Argument.AssertNotNull(linkedServiceName, nameof(linkedServiceName)); - - DatasetType = "ZohoObject"; - } - - /// Initializes a new instance of ZohoObjectDataset. - /// Type of dataset. - /// Dataset description. - /// Columns that define the structure of the dataset. Type: array (or Expression with resultType array), itemType: DatasetDataElement. - /// Columns that define the physical type schema of the dataset. Type: array (or Expression with resultType array), itemType: DatasetSchemaDataElement. - /// Linked service reference. - /// Parameters for dataset. - /// List of tags that can be used for describing the Dataset. - /// The folder that this Dataset is in. If not specified, Dataset will appear at the root level. - /// Additional Properties. - /// The table name. Type: string (or Expression with resultType string). - internal ZohoObjectDataset(string datasetType, string description, DataFactoryElement> structure, DataFactoryElement> schema, DataFactoryLinkedServiceReference linkedServiceName, IDictionary parameters, IList annotations, DatasetFolder folder, IDictionary> additionalProperties, DataFactoryElement tableName) : base(datasetType, description, structure, schema, linkedServiceName, parameters, annotations, folder, additionalProperties) - { - TableName = tableName; - DatasetType = datasetType ?? "ZohoObject"; - } - - /// The table name. Type: string (or Expression with resultType string). - public DataFactoryElement TableName { get; set; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/ZohoSource.Serialization.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/ZohoSource.Serialization.cs deleted file mode 100644 index e71e5812..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/ZohoSource.Serialization.cs +++ /dev/null @@ -1,161 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - public partial class ZohoSource : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - if (Optional.IsDefined(Query)) - { - writer.WritePropertyName("query"u8); - JsonSerializer.Serialize(writer, Query); - } - if (Optional.IsDefined(QueryTimeout)) - { - writer.WritePropertyName("queryTimeout"u8); - JsonSerializer.Serialize(writer, QueryTimeout); - } - if (Optional.IsDefined(AdditionalColumns)) - { - writer.WritePropertyName("additionalColumns"u8); -#if NET6_0_OR_GREATER - writer.WriteRawValue(AdditionalColumns); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(AdditionalColumns.ToString()).RootElement); -#endif - } - writer.WritePropertyName("type"u8); - writer.WriteStringValue(CopySourceType); - if (Optional.IsDefined(SourceRetryCount)) - { - writer.WritePropertyName("sourceRetryCount"u8); - JsonSerializer.Serialize(writer, SourceRetryCount); - } - if (Optional.IsDefined(SourceRetryWait)) - { - writer.WritePropertyName("sourceRetryWait"u8); - JsonSerializer.Serialize(writer, SourceRetryWait); - } - if (Optional.IsDefined(MaxConcurrentConnections)) - { - writer.WritePropertyName("maxConcurrentConnections"u8); - JsonSerializer.Serialize(writer, MaxConcurrentConnections); - } - if (Optional.IsDefined(DisableMetricsCollection)) - { - writer.WritePropertyName("disableMetricsCollection"u8); - JsonSerializer.Serialize(writer, DisableMetricsCollection); - } - foreach (var item in AdditionalProperties) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.Value.ToString()).RootElement); -#endif - } - writer.WriteEndObject(); - } - - internal static ZohoSource DeserializeZohoSource(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - Optional> query = default; - Optional> queryTimeout = default; - Optional additionalColumns = default; - string type = default; - Optional> sourceRetryCount = default; - Optional> sourceRetryWait = default; - Optional> maxConcurrentConnections = default; - Optional> disableMetricsCollection = default; - IDictionary> additionalProperties = default; - Dictionary> additionalPropertiesDictionary = new Dictionary>(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("query"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - query = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("queryTimeout"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - queryTimeout = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("additionalColumns"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - additionalColumns = BinaryData.FromString(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("type"u8)) - { - type = property.Value.GetString(); - continue; - } - if (property.NameEquals("sourceRetryCount"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - sourceRetryCount = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("sourceRetryWait"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - sourceRetryWait = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("maxConcurrentConnections"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - maxConcurrentConnections = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("disableMetricsCollection"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - disableMetricsCollection = JsonSerializer.Deserialize>(property.Value.GetRawText()); - continue; - } - additionalPropertiesDictionary.Add(property.Name, JsonSerializer.Deserialize>(property.Value.GetRawText())); - } - additionalProperties = additionalPropertiesDictionary; - return new ZohoSource(type, sourceRetryCount.Value, sourceRetryWait.Value, maxConcurrentConnections.Value, disableMetricsCollection.Value, additionalProperties, queryTimeout.Value, additionalColumns.Value, query.Value); - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/ZohoSource.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/ZohoSource.cs deleted file mode 100644 index 889ab940..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Models/ZohoSource.cs +++ /dev/null @@ -1,37 +0,0 @@ -// - -#nullable disable - -using Azure.Core.Expressions.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models -{ - /// A copy activity Zoho server source. - public partial class ZohoSource : TabularSource - { - /// Initializes a new instance of ZohoSource. - public ZohoSource() - { - CopySourceType = "ZohoSource"; - } - - /// Initializes a new instance of ZohoSource. - /// Copy source type. - /// Source retry count. Type: integer (or Expression with resultType integer). - /// Source retry wait. Type: string (or Expression with resultType string), pattern: ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). - /// The maximum concurrent connection count for the source data store. Type: integer (or Expression with resultType integer). - /// If true, disable data store metrics collection. Default is false. Type: boolean (or Expression with resultType boolean). - /// Additional Properties. - /// 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). - /// A query to retrieve data from source. Type: string (or Expression with resultType string). - internal ZohoSource(string copySourceType, DataFactoryElement sourceRetryCount, DataFactoryElement sourceRetryWait, DataFactoryElement maxConcurrentConnections, DataFactoryElement disableMetricsCollection, IDictionary> additionalProperties, DataFactoryElement queryTimeout, BinaryData additionalColumns, DataFactoryElement query) : base(copySourceType, sourceRetryCount, sourceRetryWait, maxConcurrentConnections, disableMetricsCollection, additionalProperties, queryTimeout, additionalColumns) - { - Query = query; - CopySourceType = copySourceType ?? "ZohoSource"; - } - - /// A query to retrieve data from source. Type: string (or Expression with resultType string). - public DataFactoryElement Query { get; set; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Pipeline.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/Pipeline.cs deleted file mode 100644 index de3884b9..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/Pipeline.cs +++ /dev/null @@ -1,231 +0,0 @@ -// - -#nullable disable - -using Azure.Core; -using Azure.Core.Expressions.DataFactory; -using AzureDataFactory.TestingFramework.Models; -using Azure.ResourceManager.Models; - -namespace Azure.ResourceManager.DataFactory -{ - /// - /// A class representing the DataFactoryPipeline data model. - /// Pipeline resource type. - /// - public partial class Pipeline : ResourceData - { - /// Initializes a new instance of DataFactoryPipelineData. - public Pipeline() - { - Activities = new ChangeTrackingList(); - Parameters = new ChangeTrackingDictionary(); - Variables = new ChangeTrackingDictionary(); - Annotations = new ChangeTrackingList(); - RunDimensions = new ChangeTrackingDictionary>(); - AdditionalProperties = new ChangeTrackingDictionary>(); - } - - /// Initializes a new instance of DataFactoryPipelineData. - /// The id. - /// The name. - /// The resourceType. - /// The systemData. - /// The description of the pipeline. - /// - /// List of activities in pipeline. - /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. - /// The available derived classes include , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , and . - /// - /// List of parameters for pipeline. - /// List of variables for pipeline. - /// The max number of concurrent runs for the pipeline. - /// List of tags that can be used for describing the Pipeline. - /// Dimensions emitted by Pipeline. - /// The folder that this Pipeline is in. If not specified, Pipeline will appear at the root level. - /// Pipeline Policy. - /// Etag identifies change in the resource. - /// Additional Properties. - internal Pipeline(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, string description, IList activities, IDictionary parameters, IDictionary variables, int? concurrency, IList annotations, IDictionary> runDimensions, PipelineFolder folder, DataFactoryPipelinePolicy policy, ETag? eTag, IDictionary> additionalProperties) : base(id, name, resourceType, systemData) - { - Description = description; - Activities = activities; - Parameters = parameters; - Variables = variables; - Concurrency = concurrency; - Annotations = annotations; - RunDimensions = runDimensions; - Folder = folder; - Policy = policy; - ETag = eTag; - AdditionalProperties = additionalProperties; - } - - /// The description of the pipeline. - public string Description { get; set; } - /// - /// List of activities in pipeline. - /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. - /// The available derived classes include , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , and . - /// - public IList Activities { get; } - /// List of parameters for pipeline. - public IDictionary Parameters { get; } - /// List of variables for pipeline. - public IDictionary Variables { get; } - /// The max number of concurrent runs for the pipeline. - public int? Concurrency { get; set; } - /// - /// List of tags that can be used for describing the Pipeline. - /// - /// To assign an object to the element of this property use . - /// - /// - /// To assign an already formated json string to this property use . - /// - /// - /// Examples: - /// - /// - /// BinaryData.FromObjectAsJson("foo") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromString("\"foo\"") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromObjectAsJson(new { key = "value" }) - /// Creates a payload of { "key": "value" }. - /// - /// - /// BinaryData.FromString("{\"key\": \"value\"}") - /// Creates a payload of { "key": "value" }. - /// - /// - /// - /// - public IList Annotations { get; } - /// - /// Dimensions emitted by Pipeline. - /// - /// To assign an object to the value of this property use . - /// - /// - /// To assign an already formated json string to this property use . - /// - /// - /// Examples: - /// - /// - /// BinaryData.FromObjectAsJson("foo") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromString("\"foo\"") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromObjectAsJson(new { key = "value" }) - /// Creates a payload of { "key": "value" }. - /// - /// - /// BinaryData.FromString("{\"key\": \"value\"}") - /// Creates a payload of { "key": "value" }. - /// - /// - /// - /// - public IDictionary> RunDimensions { get; } - /// The folder that this Pipeline is in. If not specified, Pipeline will appear at the root level. - internal PipelineFolder Folder { get; set; } - /// The name of the folder that this Pipeline is in. - public string FolderName - { - get => Folder is null ? default : Folder.Name; - set - { - if (Folder is null) - Folder = new PipelineFolder(); - Folder.Name = value; - } - } - - /// Pipeline Policy. - internal DataFactoryPipelinePolicy Policy { get; set; } - /// - /// TimeSpan value, after which an Azure Monitoring Metric is fired. - /// - /// To assign an object to this property use . - /// - /// - /// To assign an already formated json string to this property use . - /// - /// - /// Examples: - /// - /// - /// BinaryData.FromObjectAsJson("foo") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromString("\"foo\"") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromObjectAsJson(new { key = "value" }) - /// Creates a payload of { "key": "value" }. - /// - /// - /// BinaryData.FromString("{\"key\": \"value\"}") - /// Creates a payload of { "key": "value" }. - /// - /// - /// - /// - public BinaryData ElapsedTimeMetricDuration - { - get => Policy is null ? default : Policy.ElapsedTimeMetricDuration; - set - { - if (Policy is null) - Policy = new DataFactoryPipelinePolicy(); - Policy.ElapsedTimeMetricDuration = value; - } - } - - /// Etag identifies change in the resource. - public ETag? ETag { get; } - /// - /// Additional Properties - /// - /// To assign an object to the value of this property use . - /// - /// - /// To assign an already formated json string to this property use . - /// - /// - /// Examples: - /// - /// - /// BinaryData.FromObjectAsJson("foo") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromString("\"foo\"") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromObjectAsJson(new { key = "value" }) - /// Creates a payload of { "key": "value" }. - /// - /// - /// BinaryData.FromString("{\"key\": \"value\"}") - /// Creates a payload of { "key": "value" }. - /// - /// - /// - /// - public IDictionary> AdditionalProperties { get; } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/ProviderConstants.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/ProviderConstants.cs deleted file mode 100644 index 4d637a37..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/ProviderConstants.cs +++ /dev/null @@ -1,13 +0,0 @@ -// - -#nullable disable - -using Azure.Core.Pipeline; - -namespace Azure.ResourceManager.DataFactory -{ - internal static class ProviderConstants - { - public static string DefaultProviderNamespace { get; } = ClientDiagnostics.GetResourceProviderNamespace(typeof(ProviderConstants).Assembly); - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/RestOperations/ActivityRunsRestOperations.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/RestOperations/ActivityRunsRestOperations.cs deleted file mode 100644 index 20ea5cf2..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/RestOperations/ActivityRunsRestOperations.cs +++ /dev/null @@ -1,126 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; -using Azure.Core.Pipeline; -using AzureDataFactory.TestingFramework.Models; - -namespace Azure.ResourceManager.DataFactory -{ - internal partial class ActivityRunsRestOperations - { - private readonly TelemetryDetails _userAgent; - private readonly HttpPipeline _pipeline; - private readonly Uri _endpoint; - private readonly string _apiVersion; - - /// Initializes a new instance of ActivityRunsRestOperations. - /// The HTTP pipeline for sending and receiving REST requests and responses. - /// The application id to use for user agent. - /// server parameter. - /// Api Version. - /// or is null. - public ActivityRunsRestOperations(HttpPipeline pipeline, string applicationId, Uri endpoint = null, string apiVersion = default) - { - _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); - _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2018-06-01"; - _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); - } - - internal HttpMessage CreateQueryByPipelineRunRequest(string subscriptionId, string resourceGroupName, string factoryName, string runId, RunFilterContent content) - { - var message = _pipeline.CreateMessage(); - var request = message.Request; - request.Method = RequestMethod.Post; - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendPath("/subscriptions/", false); - uri.AppendPath(subscriptionId, true); - uri.AppendPath("/resourceGroups/", false); - uri.AppendPath(resourceGroupName, true); - uri.AppendPath("/providers/Microsoft.DataFactory/factories/", false); - uri.AppendPath(factoryName, true); - uri.AppendPath("/pipelineruns/", false); - uri.AppendPath(runId, true); - uri.AppendPath("/queryActivityruns", false); - uri.AppendQuery("api-version", _apiVersion, true); - request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - request.Headers.Add("Content-Type", "application/json"); - var content0 = new Utf8JsonRequestContent(); - content0.JsonWriter.WriteObjectValue(content); - request.Content = content0; - _userAgent.Apply(message); - return message; - } - - /// Query activity runs based on input filter conditions. - /// The subscription identifier. - /// The resource group name. - /// The factory name. - /// The pipeline run identifier. - /// Parameters to filter the activity runs. - /// The cancellation token to use. - /// , , , or is null. - /// , , or is an empty string, and was expected to be non-empty. - public async Task> QueryByPipelineRunAsync(string subscriptionId, string resourceGroupName, string factoryName, string runId, RunFilterContent content, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(factoryName, nameof(factoryName)); - Argument.AssertNotNullOrEmpty(runId, nameof(runId)); - Argument.AssertNotNull(content, nameof(content)); - - using var message = CreateQueryByPipelineRunRequest(subscriptionId, resourceGroupName, factoryName, runId, content); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - switch (message.Response.Status) - { - case 200: - { - PipelineActivityRunsResult value = default; - using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = PipelineActivityRunsResult.DeserializePipelineActivityRunsResult(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - - /// Query activity runs based on input filter conditions. - /// The subscription identifier. - /// The resource group name. - /// The factory name. - /// The pipeline run identifier. - /// Parameters to filter the activity runs. - /// The cancellation token to use. - /// , , , or is null. - /// , , or is an empty string, and was expected to be non-empty. - public Response QueryByPipelineRun(string subscriptionId, string resourceGroupName, string factoryName, string runId, RunFilterContent content, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(factoryName, nameof(factoryName)); - Argument.AssertNotNullOrEmpty(runId, nameof(runId)); - Argument.AssertNotNull(content, nameof(content)); - - using var message = CreateQueryByPipelineRunRequest(subscriptionId, resourceGroupName, factoryName, runId, content); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 200: - { - PipelineActivityRunsResult value = default; - using var document = JsonDocument.Parse(message.Response.ContentStream); - value = PipelineActivityRunsResult.DeserializePipelineActivityRunsResult(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/RestOperations/ChangeDataCaptureRestOperations.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/RestOperations/ChangeDataCaptureRestOperations.cs deleted file mode 100644 index d1e24202..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/RestOperations/ChangeDataCaptureRestOperations.cs +++ /dev/null @@ -1,691 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; -using Azure.Core.Pipeline; -using AzureDataFactory.TestingFramework.Models; - -namespace Azure.ResourceManager.DataFactory -{ - internal partial class ChangeDataCaptureRestOperations - { - private readonly TelemetryDetails _userAgent; - private readonly HttpPipeline _pipeline; - private readonly Uri _endpoint; - private readonly string _apiVersion; - - /// Initializes a new instance of ChangeDataCaptureRestOperations. - /// The HTTP pipeline for sending and receiving REST requests and responses. - /// The application id to use for user agent. - /// server parameter. - /// Api Version. - /// or is null. - public ChangeDataCaptureRestOperations(HttpPipeline pipeline, string applicationId, Uri endpoint = null, string apiVersion = default) - { - _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); - _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2018-06-01"; - _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); - } - - internal HttpMessage CreateListByFactoryRequest(string subscriptionId, string resourceGroupName, string factoryName) - { - var message = _pipeline.CreateMessage(); - var request = message.Request; - request.Method = RequestMethod.Get; - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendPath("/subscriptions/", false); - uri.AppendPath(subscriptionId, true); - uri.AppendPath("/resourceGroups/", false); - uri.AppendPath(resourceGroupName, true); - uri.AppendPath("/providers/Microsoft.DataFactory/factories/", false); - uri.AppendPath(factoryName, true); - uri.AppendPath("/adfcdcs", false); - uri.AppendQuery("api-version", _apiVersion, true); - request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - _userAgent.Apply(message); - return message; - } - - /// Lists all resources of type change data capture. - /// The subscription identifier. - /// The resource group name. - /// The factory name. - /// The cancellation token to use. - /// , or is null. - /// , or is an empty string, and was expected to be non-empty. - public async Task> ListByFactoryAsync(string subscriptionId, string resourceGroupName, string factoryName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(factoryName, nameof(factoryName)); - - using var message = CreateListByFactoryRequest(subscriptionId, resourceGroupName, factoryName); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - switch (message.Response.Status) - { - case 200: - { - ChangeDataCaptureListResult value = default; - using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = ChangeDataCaptureListResult.DeserializeChangeDataCaptureListResult(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - - /// Lists all resources of type change data capture. - /// The subscription identifier. - /// The resource group name. - /// The factory name. - /// The cancellation token to use. - /// , or is null. - /// , or is an empty string, and was expected to be non-empty. - public Response ListByFactory(string subscriptionId, string resourceGroupName, string factoryName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(factoryName, nameof(factoryName)); - - using var message = CreateListByFactoryRequest(subscriptionId, resourceGroupName, factoryName); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 200: - { - ChangeDataCaptureListResult value = default; - using var document = JsonDocument.Parse(message.Response.ContentStream); - value = ChangeDataCaptureListResult.DeserializeChangeDataCaptureListResult(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - - internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string resourceGroupName, string factoryName, string changeDataCaptureName, DataFactoryChangeDataCaptureData data, string ifMatch) - { - var message = _pipeline.CreateMessage(); - var request = message.Request; - request.Method = RequestMethod.Put; - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendPath("/subscriptions/", false); - uri.AppendPath(subscriptionId, true); - uri.AppendPath("/resourceGroups/", false); - uri.AppendPath(resourceGroupName, true); - uri.AppendPath("/providers/Microsoft.DataFactory/factories/", false); - uri.AppendPath(factoryName, true); - uri.AppendPath("/adfcdcs/", false); - uri.AppendPath(changeDataCaptureName, true); - uri.AppendQuery("api-version", _apiVersion, true); - request.Uri = uri; - if (ifMatch != null) - { - request.Headers.Add("If-Match", ifMatch); - } - request.Headers.Add("Accept", "application/json"); - request.Headers.Add("Content-Type", "application/json"); - var content = new Utf8JsonRequestContent(); - content.JsonWriter.WriteObjectValue(data); - request.Content = content; - _userAgent.Apply(message); - return message; - } - - /// Creates or updates a change data capture resource. - /// The subscription identifier. - /// The resource group name. - /// The factory name. - /// The change data capture name. - /// Change data capture resource definition. - /// ETag of the change data capture entity. Should only be specified for update, for which it should match existing entity or can be * for unconditional update. - /// The cancellation token to use. - /// , , , or is null. - /// , , or is an empty string, and was expected to be non-empty. - public async Task> CreateOrUpdateAsync(string subscriptionId, string resourceGroupName, string factoryName, string changeDataCaptureName, DataFactoryChangeDataCaptureData data, string ifMatch = null, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(factoryName, nameof(factoryName)); - Argument.AssertNotNullOrEmpty(changeDataCaptureName, nameof(changeDataCaptureName)); - Argument.AssertNotNull(data, nameof(data)); - - using var message = CreateCreateOrUpdateRequest(subscriptionId, resourceGroupName, factoryName, changeDataCaptureName, data, ifMatch); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - switch (message.Response.Status) - { - case 200: - { - DataFactoryChangeDataCaptureData value = default; - using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = DataFactoryChangeDataCaptureData.DeserializeDataFactoryChangeDataCaptureData(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - - /// Creates or updates a change data capture resource. - /// The subscription identifier. - /// The resource group name. - /// The factory name. - /// The change data capture name. - /// Change data capture resource definition. - /// ETag of the change data capture entity. Should only be specified for update, for which it should match existing entity or can be * for unconditional update. - /// The cancellation token to use. - /// , , , or is null. - /// , , or is an empty string, and was expected to be non-empty. - public Response CreateOrUpdate(string subscriptionId, string resourceGroupName, string factoryName, string changeDataCaptureName, DataFactoryChangeDataCaptureData data, string ifMatch = null, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(factoryName, nameof(factoryName)); - Argument.AssertNotNullOrEmpty(changeDataCaptureName, nameof(changeDataCaptureName)); - Argument.AssertNotNull(data, nameof(data)); - - using var message = CreateCreateOrUpdateRequest(subscriptionId, resourceGroupName, factoryName, changeDataCaptureName, data, ifMatch); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 200: - { - DataFactoryChangeDataCaptureData value = default; - using var document = JsonDocument.Parse(message.Response.ContentStream); - value = DataFactoryChangeDataCaptureData.DeserializeDataFactoryChangeDataCaptureData(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - - internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGroupName, string factoryName, string changeDataCaptureName, string ifNoneMatch) - { - var message = _pipeline.CreateMessage(); - var request = message.Request; - request.Method = RequestMethod.Get; - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendPath("/subscriptions/", false); - uri.AppendPath(subscriptionId, true); - uri.AppendPath("/resourceGroups/", false); - uri.AppendPath(resourceGroupName, true); - uri.AppendPath("/providers/Microsoft.DataFactory/factories/", false); - uri.AppendPath(factoryName, true); - uri.AppendPath("/adfcdcs/", false); - uri.AppendPath(changeDataCaptureName, true); - uri.AppendQuery("api-version", _apiVersion, true); - request.Uri = uri; - if (ifNoneMatch != null) - { - request.Headers.Add("If-None-Match", ifNoneMatch); - } - request.Headers.Add("Accept", "application/json"); - _userAgent.Apply(message); - return message; - } - - /// Gets a change data capture. - /// The subscription identifier. - /// The resource group name. - /// The factory name. - /// The change data capture name. - /// ETag of the change data capture entity. Should only be specified for get. If the ETag matches the existing entity tag, or if * was provided, then no content will be returned. - /// The cancellation token to use. - /// , , or is null. - /// , , or is an empty string, and was expected to be non-empty. - public async Task> GetAsync(string subscriptionId, string resourceGroupName, string factoryName, string changeDataCaptureName, string ifNoneMatch = null, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(factoryName, nameof(factoryName)); - Argument.AssertNotNullOrEmpty(changeDataCaptureName, nameof(changeDataCaptureName)); - - using var message = CreateGetRequest(subscriptionId, resourceGroupName, factoryName, changeDataCaptureName, ifNoneMatch); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - switch (message.Response.Status) - { - case 200: - { - DataFactoryChangeDataCaptureData value = default; - using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = DataFactoryChangeDataCaptureData.DeserializeDataFactoryChangeDataCaptureData(document.RootElement); - return Response.FromValue(value, message.Response); - } - case 404: - return Response.FromValue((DataFactoryChangeDataCaptureData)null, message.Response); - default: - throw new RequestFailedException(message.Response); - } - } - - /// Gets a change data capture. - /// The subscription identifier. - /// The resource group name. - /// The factory name. - /// The change data capture name. - /// ETag of the change data capture entity. Should only be specified for get. If the ETag matches the existing entity tag, or if * was provided, then no content will be returned. - /// The cancellation token to use. - /// , , or is null. - /// , , or is an empty string, and was expected to be non-empty. - public Response Get(string subscriptionId, string resourceGroupName, string factoryName, string changeDataCaptureName, string ifNoneMatch = null, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(factoryName, nameof(factoryName)); - Argument.AssertNotNullOrEmpty(changeDataCaptureName, nameof(changeDataCaptureName)); - - using var message = CreateGetRequest(subscriptionId, resourceGroupName, factoryName, changeDataCaptureName, ifNoneMatch); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 200: - { - DataFactoryChangeDataCaptureData value = default; - using var document = JsonDocument.Parse(message.Response.ContentStream); - value = DataFactoryChangeDataCaptureData.DeserializeDataFactoryChangeDataCaptureData(document.RootElement); - return Response.FromValue(value, message.Response); - } - case 404: - return Response.FromValue((DataFactoryChangeDataCaptureData)null, message.Response); - default: - throw new RequestFailedException(message.Response); - } - } - - internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceGroupName, string factoryName, string changeDataCaptureName) - { - var message = _pipeline.CreateMessage(); - var request = message.Request; - request.Method = RequestMethod.Delete; - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendPath("/subscriptions/", false); - uri.AppendPath(subscriptionId, true); - uri.AppendPath("/resourceGroups/", false); - uri.AppendPath(resourceGroupName, true); - uri.AppendPath("/providers/Microsoft.DataFactory/factories/", false); - uri.AppendPath(factoryName, true); - uri.AppendPath("/adfcdcs/", false); - uri.AppendPath(changeDataCaptureName, true); - uri.AppendQuery("api-version", _apiVersion, true); - request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - _userAgent.Apply(message); - return message; - } - - /// Deletes a change data capture. - /// The subscription identifier. - /// The resource group name. - /// The factory name. - /// The change data capture name. - /// The cancellation token to use. - /// , , or is null. - /// , , or is an empty string, and was expected to be non-empty. - public async Task DeleteAsync(string subscriptionId, string resourceGroupName, string factoryName, string changeDataCaptureName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(factoryName, nameof(factoryName)); - Argument.AssertNotNullOrEmpty(changeDataCaptureName, nameof(changeDataCaptureName)); - - using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, factoryName, changeDataCaptureName); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - switch (message.Response.Status) - { - case 200: - case 204: - return message.Response; - default: - throw new RequestFailedException(message.Response); - } - } - - /// Deletes a change data capture. - /// The subscription identifier. - /// The resource group name. - /// The factory name. - /// The change data capture name. - /// The cancellation token to use. - /// , , or is null. - /// , , or is an empty string, and was expected to be non-empty. - public Response Delete(string subscriptionId, string resourceGroupName, string factoryName, string changeDataCaptureName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(factoryName, nameof(factoryName)); - Argument.AssertNotNullOrEmpty(changeDataCaptureName, nameof(changeDataCaptureName)); - - using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, factoryName, changeDataCaptureName); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 200: - case 204: - return message.Response; - default: - throw new RequestFailedException(message.Response); - } - } - - internal HttpMessage CreateStartRequest(string subscriptionId, string resourceGroupName, string factoryName, string changeDataCaptureName) - { - var message = _pipeline.CreateMessage(); - var request = message.Request; - request.Method = RequestMethod.Post; - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendPath("/subscriptions/", false); - uri.AppendPath(subscriptionId, true); - uri.AppendPath("/resourceGroups/", false); - uri.AppendPath(resourceGroupName, true); - uri.AppendPath("/providers/Microsoft.DataFactory/factories/", false); - uri.AppendPath(factoryName, true); - uri.AppendPath("/adfcdcs/", false); - uri.AppendPath(changeDataCaptureName, true); - uri.AppendPath("/start", false); - uri.AppendQuery("api-version", _apiVersion, true); - request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - _userAgent.Apply(message); - return message; - } - - /// Starts a change data capture. - /// The subscription identifier. - /// The resource group name. - /// The factory name. - /// The change data capture name. - /// The cancellation token to use. - /// , , or is null. - /// , , or is an empty string, and was expected to be non-empty. - public async Task StartAsync(string subscriptionId, string resourceGroupName, string factoryName, string changeDataCaptureName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(factoryName, nameof(factoryName)); - Argument.AssertNotNullOrEmpty(changeDataCaptureName, nameof(changeDataCaptureName)); - - using var message = CreateStartRequest(subscriptionId, resourceGroupName, factoryName, changeDataCaptureName); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - switch (message.Response.Status) - { - case 200: - return message.Response; - default: - throw new RequestFailedException(message.Response); - } - } - - /// Starts a change data capture. - /// The subscription identifier. - /// The resource group name. - /// The factory name. - /// The change data capture name. - /// The cancellation token to use. - /// , , or is null. - /// , , or is an empty string, and was expected to be non-empty. - public Response Start(string subscriptionId, string resourceGroupName, string factoryName, string changeDataCaptureName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(factoryName, nameof(factoryName)); - Argument.AssertNotNullOrEmpty(changeDataCaptureName, nameof(changeDataCaptureName)); - - using var message = CreateStartRequest(subscriptionId, resourceGroupName, factoryName, changeDataCaptureName); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 200: - return message.Response; - default: - throw new RequestFailedException(message.Response); - } - } - - internal HttpMessage CreateStopRequest(string subscriptionId, string resourceGroupName, string factoryName, string changeDataCaptureName) - { - var message = _pipeline.CreateMessage(); - var request = message.Request; - request.Method = RequestMethod.Post; - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendPath("/subscriptions/", false); - uri.AppendPath(subscriptionId, true); - uri.AppendPath("/resourceGroups/", false); - uri.AppendPath(resourceGroupName, true); - uri.AppendPath("/providers/Microsoft.DataFactory/factories/", false); - uri.AppendPath(factoryName, true); - uri.AppendPath("/adfcdcs/", false); - uri.AppendPath(changeDataCaptureName, true); - uri.AppendPath("/stop", false); - uri.AppendQuery("api-version", _apiVersion, true); - request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - _userAgent.Apply(message); - return message; - } - - /// Stops a change data capture. - /// The subscription identifier. - /// The resource group name. - /// The factory name. - /// The change data capture name. - /// The cancellation token to use. - /// , , or is null. - /// , , or is an empty string, and was expected to be non-empty. - public async Task StopAsync(string subscriptionId, string resourceGroupName, string factoryName, string changeDataCaptureName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(factoryName, nameof(factoryName)); - Argument.AssertNotNullOrEmpty(changeDataCaptureName, nameof(changeDataCaptureName)); - - using var message = CreateStopRequest(subscriptionId, resourceGroupName, factoryName, changeDataCaptureName); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - switch (message.Response.Status) - { - case 200: - return message.Response; - default: - throw new RequestFailedException(message.Response); - } - } - - /// Stops a change data capture. - /// The subscription identifier. - /// The resource group name. - /// The factory name. - /// The change data capture name. - /// The cancellation token to use. - /// , , or is null. - /// , , or is an empty string, and was expected to be non-empty. - public Response Stop(string subscriptionId, string resourceGroupName, string factoryName, string changeDataCaptureName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(factoryName, nameof(factoryName)); - Argument.AssertNotNullOrEmpty(changeDataCaptureName, nameof(changeDataCaptureName)); - - using var message = CreateStopRequest(subscriptionId, resourceGroupName, factoryName, changeDataCaptureName); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 200: - return message.Response; - default: - throw new RequestFailedException(message.Response); - } - } - - internal HttpMessage CreateStatusRequest(string subscriptionId, string resourceGroupName, string factoryName, string changeDataCaptureName) - { - var message = _pipeline.CreateMessage(); - var request = message.Request; - request.Method = RequestMethod.Get; - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendPath("/subscriptions/", false); - uri.AppendPath(subscriptionId, true); - uri.AppendPath("/resourceGroups/", false); - uri.AppendPath(resourceGroupName, true); - uri.AppendPath("/providers/Microsoft.DataFactory/factories/", false); - uri.AppendPath(factoryName, true); - uri.AppendPath("/adfcdcs/", false); - uri.AppendPath(changeDataCaptureName, true); - uri.AppendPath("/status", false); - uri.AppendQuery("api-version", _apiVersion, true); - request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - _userAgent.Apply(message); - return message; - } - - /// Gets the current status for the change data capture resource. - /// The subscription identifier. - /// The resource group name. - /// The factory name. - /// The change data capture name. - /// The cancellation token to use. - /// , , or is null. - /// , , or is an empty string, and was expected to be non-empty. - public async Task> StatusAsync(string subscriptionId, string resourceGroupName, string factoryName, string changeDataCaptureName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(factoryName, nameof(factoryName)); - Argument.AssertNotNullOrEmpty(changeDataCaptureName, nameof(changeDataCaptureName)); - - using var message = CreateStatusRequest(subscriptionId, resourceGroupName, factoryName, changeDataCaptureName); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - switch (message.Response.Status) - { - case 200: - { - string value = default; - using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = document.RootElement.GetString(); - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - - /// Gets the current status for the change data capture resource. - /// The subscription identifier. - /// The resource group name. - /// The factory name. - /// The change data capture name. - /// The cancellation token to use. - /// , , or is null. - /// , , or is an empty string, and was expected to be non-empty. - public Response Status(string subscriptionId, string resourceGroupName, string factoryName, string changeDataCaptureName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(factoryName, nameof(factoryName)); - Argument.AssertNotNullOrEmpty(changeDataCaptureName, nameof(changeDataCaptureName)); - - using var message = CreateStatusRequest(subscriptionId, resourceGroupName, factoryName, changeDataCaptureName); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 200: - { - string value = default; - using var document = JsonDocument.Parse(message.Response.ContentStream); - value = document.RootElement.GetString(); - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - - internal HttpMessage CreateListByFactoryNextPageRequest(string nextLink, string subscriptionId, string resourceGroupName, string factoryName) - { - var message = _pipeline.CreateMessage(); - var request = message.Request; - request.Method = RequestMethod.Get; - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendRawNextLink(nextLink, false); - request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - _userAgent.Apply(message); - return message; - } - - /// Lists all resources of type change data capture. - /// The URL to the next page of results. - /// The subscription identifier. - /// The resource group name. - /// The factory name. - /// The cancellation token to use. - /// , , or is null. - /// , or is an empty string, and was expected to be non-empty. - public async Task> ListByFactoryNextPageAsync(string nextLink, string subscriptionId, string resourceGroupName, string factoryName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(nextLink, nameof(nextLink)); - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(factoryName, nameof(factoryName)); - - using var message = CreateListByFactoryNextPageRequest(nextLink, subscriptionId, resourceGroupName, factoryName); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - switch (message.Response.Status) - { - case 200: - { - ChangeDataCaptureListResult value = default; - using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = ChangeDataCaptureListResult.DeserializeChangeDataCaptureListResult(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - - /// Lists all resources of type change data capture. - /// The URL to the next page of results. - /// The subscription identifier. - /// The resource group name. - /// The factory name. - /// The cancellation token to use. - /// , , or is null. - /// , or is an empty string, and was expected to be non-empty. - public Response ListByFactoryNextPage(string nextLink, string subscriptionId, string resourceGroupName, string factoryName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(nextLink, nameof(nextLink)); - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(factoryName, nameof(factoryName)); - - using var message = CreateListByFactoryNextPageRequest(nextLink, subscriptionId, resourceGroupName, factoryName); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 200: - { - ChangeDataCaptureListResult value = default; - using var document = JsonDocument.Parse(message.Response.ContentStream); - value = ChangeDataCaptureListResult.DeserializeChangeDataCaptureListResult(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/RestOperations/CredentialRestOperations.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/RestOperations/CredentialRestOperations.cs deleted file mode 100644 index fe07a8ae..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/RestOperations/CredentialRestOperations.cs +++ /dev/null @@ -1,458 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; -using Azure.Core.Pipeline; -using AzureDataFactory.TestingFramework.Models; - -namespace Azure.ResourceManager.DataFactory -{ - internal partial class CredentialRestOperations - { - private readonly TelemetryDetails _userAgent; - private readonly HttpPipeline _pipeline; - private readonly Uri _endpoint; - private readonly string _apiVersion; - - /// Initializes a new instance of CredentialRestOperations. - /// The HTTP pipeline for sending and receiving REST requests and responses. - /// The application id to use for user agent. - /// server parameter. - /// Api Version. - /// or is null. - public CredentialRestOperations(HttpPipeline pipeline, string applicationId, Uri endpoint = null, string apiVersion = default) - { - _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); - _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2018-06-01"; - _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); - } - - internal HttpMessage CreateListByFactoryRequest(string subscriptionId, string resourceGroupName, string factoryName) - { - var message = _pipeline.CreateMessage(); - var request = message.Request; - request.Method = RequestMethod.Get; - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendPath("/subscriptions/", false); - uri.AppendPath(subscriptionId, true); - uri.AppendPath("/resourceGroups/", false); - uri.AppendPath(resourceGroupName, true); - uri.AppendPath("/providers/Microsoft.DataFactory/factories/", false); - uri.AppendPath(factoryName, true); - uri.AppendPath("/credentials", false); - uri.AppendQuery("api-version", _apiVersion, true); - request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - _userAgent.Apply(message); - return message; - } - - /// List credentials. - /// The subscription identifier. - /// The resource group name. - /// The factory name. - /// The cancellation token to use. - /// , or is null. - /// , or is an empty string, and was expected to be non-empty. - public async Task> ListByFactoryAsync(string subscriptionId, string resourceGroupName, string factoryName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(factoryName, nameof(factoryName)); - - using var message = CreateListByFactoryRequest(subscriptionId, resourceGroupName, factoryName); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - switch (message.Response.Status) - { - case 200: - { - DataFactoryCredentialListResult value = default; - using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = DataFactoryCredentialListResult.DeserializeDataFactoryCredentialListResult(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - - /// List credentials. - /// The subscription identifier. - /// The resource group name. - /// The factory name. - /// The cancellation token to use. - /// , or is null. - /// , or is an empty string, and was expected to be non-empty. - public Response ListByFactory(string subscriptionId, string resourceGroupName, string factoryName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(factoryName, nameof(factoryName)); - - using var message = CreateListByFactoryRequest(subscriptionId, resourceGroupName, factoryName); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 200: - { - DataFactoryCredentialListResult value = default; - using var document = JsonDocument.Parse(message.Response.ContentStream); - value = DataFactoryCredentialListResult.DeserializeDataFactoryCredentialListResult(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - - internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string resourceGroupName, string factoryName, string credentialName, DataFactoryManagedIdentityCredentialData data, string ifMatch) - { - var message = _pipeline.CreateMessage(); - var request = message.Request; - request.Method = RequestMethod.Put; - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendPath("/subscriptions/", false); - uri.AppendPath(subscriptionId, true); - uri.AppendPath("/resourceGroups/", false); - uri.AppendPath(resourceGroupName, true); - uri.AppendPath("/providers/Microsoft.DataFactory/factories/", false); - uri.AppendPath(factoryName, true); - uri.AppendPath("/credentials/", false); - uri.AppendPath(credentialName, true); - uri.AppendQuery("api-version", _apiVersion, true); - request.Uri = uri; - if (ifMatch != null) - { - request.Headers.Add("If-Match", ifMatch); - } - request.Headers.Add("Accept", "application/json"); - request.Headers.Add("Content-Type", "application/json"); - var content = new Utf8JsonRequestContent(); - content.JsonWriter.WriteObjectValue(data); - request.Content = content; - _userAgent.Apply(message); - return message; - } - - /// Creates or updates a credential. - /// The subscription identifier. - /// The resource group name. - /// The factory name. - /// Credential name. - /// Credential resource definition. - /// ETag of the credential entity. Should only be specified for update, for which it should match existing entity or can be * for unconditional update. - /// The cancellation token to use. - /// , , , or is null. - /// , , or is an empty string, and was expected to be non-empty. - public async Task> CreateOrUpdateAsync(string subscriptionId, string resourceGroupName, string factoryName, string credentialName, DataFactoryManagedIdentityCredentialData data, string ifMatch = null, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(factoryName, nameof(factoryName)); - Argument.AssertNotNullOrEmpty(credentialName, nameof(credentialName)); - Argument.AssertNotNull(data, nameof(data)); - - using var message = CreateCreateOrUpdateRequest(subscriptionId, resourceGroupName, factoryName, credentialName, data, ifMatch); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - switch (message.Response.Status) - { - case 200: - { - DataFactoryManagedIdentityCredentialData value = default; - using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = DataFactoryManagedIdentityCredentialData.DeserializeDataFactoryManagedIdentityCredentialData(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - - /// Creates or updates a credential. - /// The subscription identifier. - /// The resource group name. - /// The factory name. - /// Credential name. - /// Credential resource definition. - /// ETag of the credential entity. Should only be specified for update, for which it should match existing entity or can be * for unconditional update. - /// The cancellation token to use. - /// , , , or is null. - /// , , or is an empty string, and was expected to be non-empty. - public Response CreateOrUpdate(string subscriptionId, string resourceGroupName, string factoryName, string credentialName, DataFactoryManagedIdentityCredentialData data, string ifMatch = null, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(factoryName, nameof(factoryName)); - Argument.AssertNotNullOrEmpty(credentialName, nameof(credentialName)); - Argument.AssertNotNull(data, nameof(data)); - - using var message = CreateCreateOrUpdateRequest(subscriptionId, resourceGroupName, factoryName, credentialName, data, ifMatch); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 200: - { - DataFactoryManagedIdentityCredentialData value = default; - using var document = JsonDocument.Parse(message.Response.ContentStream); - value = DataFactoryManagedIdentityCredentialData.DeserializeDataFactoryManagedIdentityCredentialData(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - - internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGroupName, string factoryName, string credentialName, string ifNoneMatch) - { - var message = _pipeline.CreateMessage(); - var request = message.Request; - request.Method = RequestMethod.Get; - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendPath("/subscriptions/", false); - uri.AppendPath(subscriptionId, true); - uri.AppendPath("/resourceGroups/", false); - uri.AppendPath(resourceGroupName, true); - uri.AppendPath("/providers/Microsoft.DataFactory/factories/", false); - uri.AppendPath(factoryName, true); - uri.AppendPath("/credentials/", false); - uri.AppendPath(credentialName, true); - uri.AppendQuery("api-version", _apiVersion, true); - request.Uri = uri; - if (ifNoneMatch != null) - { - request.Headers.Add("If-None-Match", ifNoneMatch); - } - request.Headers.Add("Accept", "application/json"); - _userAgent.Apply(message); - return message; - } - - /// Gets a credential. - /// The subscription identifier. - /// The resource group name. - /// The factory name. - /// Credential name. - /// ETag of the credential entity. Should only be specified for get. If the ETag matches the existing entity tag, or if * was provided, then no content will be returned. - /// The cancellation token to use. - /// , , or is null. - /// , , or is an empty string, and was expected to be non-empty. - public async Task> GetAsync(string subscriptionId, string resourceGroupName, string factoryName, string credentialName, string ifNoneMatch = null, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(factoryName, nameof(factoryName)); - Argument.AssertNotNullOrEmpty(credentialName, nameof(credentialName)); - - using var message = CreateGetRequest(subscriptionId, resourceGroupName, factoryName, credentialName, ifNoneMatch); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - switch (message.Response.Status) - { - case 200: - { - DataFactoryManagedIdentityCredentialData value = default; - using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = DataFactoryManagedIdentityCredentialData.DeserializeDataFactoryManagedIdentityCredentialData(document.RootElement); - return Response.FromValue(value, message.Response); - } - case 304: - case 404: - return Response.FromValue((DataFactoryManagedIdentityCredentialData)null, message.Response); - default: - throw new RequestFailedException(message.Response); - } - } - - /// Gets a credential. - /// The subscription identifier. - /// The resource group name. - /// The factory name. - /// Credential name. - /// ETag of the credential entity. Should only be specified for get. If the ETag matches the existing entity tag, or if * was provided, then no content will be returned. - /// The cancellation token to use. - /// , , or is null. - /// , , or is an empty string, and was expected to be non-empty. - public Response Get(string subscriptionId, string resourceGroupName, string factoryName, string credentialName, string ifNoneMatch = null, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(factoryName, nameof(factoryName)); - Argument.AssertNotNullOrEmpty(credentialName, nameof(credentialName)); - - using var message = CreateGetRequest(subscriptionId, resourceGroupName, factoryName, credentialName, ifNoneMatch); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 200: - { - DataFactoryManagedIdentityCredentialData value = default; - using var document = JsonDocument.Parse(message.Response.ContentStream); - value = DataFactoryManagedIdentityCredentialData.DeserializeDataFactoryManagedIdentityCredentialData(document.RootElement); - return Response.FromValue(value, message.Response); - } - case 304: - case 404: - return Response.FromValue((DataFactoryManagedIdentityCredentialData)null, message.Response); - default: - throw new RequestFailedException(message.Response); - } - } - - internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceGroupName, string factoryName, string credentialName) - { - var message = _pipeline.CreateMessage(); - var request = message.Request; - request.Method = RequestMethod.Delete; - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendPath("/subscriptions/", false); - uri.AppendPath(subscriptionId, true); - uri.AppendPath("/resourceGroups/", false); - uri.AppendPath(resourceGroupName, true); - uri.AppendPath("/providers/Microsoft.DataFactory/factories/", false); - uri.AppendPath(factoryName, true); - uri.AppendPath("/credentials/", false); - uri.AppendPath(credentialName, true); - uri.AppendQuery("api-version", _apiVersion, true); - request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - _userAgent.Apply(message); - return message; - } - - /// Deletes a credential. - /// The subscription identifier. - /// The resource group name. - /// The factory name. - /// Credential name. - /// The cancellation token to use. - /// , , or is null. - /// , , or is an empty string, and was expected to be non-empty. - public async Task DeleteAsync(string subscriptionId, string resourceGroupName, string factoryName, string credentialName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(factoryName, nameof(factoryName)); - Argument.AssertNotNullOrEmpty(credentialName, nameof(credentialName)); - - using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, factoryName, credentialName); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - switch (message.Response.Status) - { - case 200: - case 204: - return message.Response; - default: - throw new RequestFailedException(message.Response); - } - } - - /// Deletes a credential. - /// The subscription identifier. - /// The resource group name. - /// The factory name. - /// Credential name. - /// The cancellation token to use. - /// , , or is null. - /// , , or is an empty string, and was expected to be non-empty. - public Response Delete(string subscriptionId, string resourceGroupName, string factoryName, string credentialName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(factoryName, nameof(factoryName)); - Argument.AssertNotNullOrEmpty(credentialName, nameof(credentialName)); - - using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, factoryName, credentialName); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 200: - case 204: - return message.Response; - default: - throw new RequestFailedException(message.Response); - } - } - - internal HttpMessage CreateListByFactoryNextPageRequest(string nextLink, string subscriptionId, string resourceGroupName, string factoryName) - { - var message = _pipeline.CreateMessage(); - var request = message.Request; - request.Method = RequestMethod.Get; - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendRawNextLink(nextLink, false); - request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - _userAgent.Apply(message); - return message; - } - - /// List credentials. - /// The URL to the next page of results. - /// The subscription identifier. - /// The resource group name. - /// The factory name. - /// The cancellation token to use. - /// , , or is null. - /// , or is an empty string, and was expected to be non-empty. - public async Task> ListByFactoryNextPageAsync(string nextLink, string subscriptionId, string resourceGroupName, string factoryName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(nextLink, nameof(nextLink)); - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(factoryName, nameof(factoryName)); - - using var message = CreateListByFactoryNextPageRequest(nextLink, subscriptionId, resourceGroupName, factoryName); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - switch (message.Response.Status) - { - case 200: - { - DataFactoryCredentialListResult value = default; - using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = DataFactoryCredentialListResult.DeserializeDataFactoryCredentialListResult(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - - /// List credentials. - /// The URL to the next page of results. - /// The subscription identifier. - /// The resource group name. - /// The factory name. - /// The cancellation token to use. - /// , , or is null. - /// , or is an empty string, and was expected to be non-empty. - public Response ListByFactoryNextPage(string nextLink, string subscriptionId, string resourceGroupName, string factoryName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(nextLink, nameof(nextLink)); - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(factoryName, nameof(factoryName)); - - using var message = CreateListByFactoryNextPageRequest(nextLink, subscriptionId, resourceGroupName, factoryName); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 200: - { - DataFactoryCredentialListResult value = default; - using var document = JsonDocument.Parse(message.Response.ContentStream); - value = DataFactoryCredentialListResult.DeserializeDataFactoryCredentialListResult(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/RestOperations/DataFlowDebugSessionRestOperations.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/RestOperations/DataFlowDebugSessionRestOperations.cs deleted file mode 100644 index 88b963d1..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/RestOperations/DataFlowDebugSessionRestOperations.cs +++ /dev/null @@ -1,510 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; -using Azure.Core.Pipeline; -using AzureDataFactory.TestingFramework.Models; - -namespace Azure.ResourceManager.DataFactory -{ - internal partial class DataFlowDebugSessionRestOperations - { - private readonly TelemetryDetails _userAgent; - private readonly HttpPipeline _pipeline; - private readonly Uri _endpoint; - private readonly string _apiVersion; - - /// Initializes a new instance of DataFlowDebugSessionRestOperations. - /// The HTTP pipeline for sending and receiving REST requests and responses. - /// The application id to use for user agent. - /// server parameter. - /// Api Version. - /// or is null. - public DataFlowDebugSessionRestOperations(HttpPipeline pipeline, string applicationId, Uri endpoint = null, string apiVersion = default) - { - _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); - _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2018-06-01"; - _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); - } - - internal HttpMessage CreateCreateRequest(string subscriptionId, string resourceGroupName, string factoryName, DataFactoryDataFlowDebugSessionContent content) - { - var message = _pipeline.CreateMessage(); - var request = message.Request; - request.Method = RequestMethod.Post; - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendPath("/subscriptions/", false); - uri.AppendPath(subscriptionId, true); - uri.AppendPath("/resourceGroups/", false); - uri.AppendPath(resourceGroupName, true); - uri.AppendPath("/providers/Microsoft.DataFactory/factories/", false); - uri.AppendPath(factoryName, true); - uri.AppendPath("/createDataFlowDebugSession", false); - uri.AppendQuery("api-version", _apiVersion, true); - request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - request.Headers.Add("Content-Type", "application/json"); - var content0 = new Utf8JsonRequestContent(); - content0.JsonWriter.WriteObjectValue(content); - request.Content = content0; - _userAgent.Apply(message); - return message; - } - - /// Creates a data flow debug session. - /// The subscription identifier. - /// The resource group name. - /// The factory name. - /// Data flow debug session definition. - /// The cancellation token to use. - /// , , or is null. - /// , or is an empty string, and was expected to be non-empty. - public async Task CreateAsync(string subscriptionId, string resourceGroupName, string factoryName, DataFactoryDataFlowDebugSessionContent content, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(factoryName, nameof(factoryName)); - Argument.AssertNotNull(content, nameof(content)); - - using var message = CreateCreateRequest(subscriptionId, resourceGroupName, factoryName, content); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - switch (message.Response.Status) - { - case 200: - case 202: - return message.Response; - default: - throw new RequestFailedException(message.Response); - } - } - - /// Creates a data flow debug session. - /// The subscription identifier. - /// The resource group name. - /// The factory name. - /// Data flow debug session definition. - /// The cancellation token to use. - /// , , or is null. - /// , or is an empty string, and was expected to be non-empty. - public Response Create(string subscriptionId, string resourceGroupName, string factoryName, DataFactoryDataFlowDebugSessionContent content, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(factoryName, nameof(factoryName)); - Argument.AssertNotNull(content, nameof(content)); - - using var message = CreateCreateRequest(subscriptionId, resourceGroupName, factoryName, content); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 200: - case 202: - return message.Response; - default: - throw new RequestFailedException(message.Response); - } - } - - internal HttpMessage CreateQueryByFactoryRequest(string subscriptionId, string resourceGroupName, string factoryName) - { - var message = _pipeline.CreateMessage(); - var request = message.Request; - request.Method = RequestMethod.Post; - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendPath("/subscriptions/", false); - uri.AppendPath(subscriptionId, true); - uri.AppendPath("/resourceGroups/", false); - uri.AppendPath(resourceGroupName, true); - uri.AppendPath("/providers/Microsoft.DataFactory/factories/", false); - uri.AppendPath(factoryName, true); - uri.AppendPath("/queryDataFlowDebugSessions", false); - uri.AppendQuery("api-version", _apiVersion, true); - request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - _userAgent.Apply(message); - return message; - } - - /// Query all active data flow debug sessions. - /// The subscription identifier. - /// The resource group name. - /// The factory name. - /// The cancellation token to use. - /// , or is null. - /// , or is an empty string, and was expected to be non-empty. - public async Task> QueryByFactoryAsync(string subscriptionId, string resourceGroupName, string factoryName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(factoryName, nameof(factoryName)); - - using var message = CreateQueryByFactoryRequest(subscriptionId, resourceGroupName, factoryName); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - switch (message.Response.Status) - { - case 200: - { - DataFlowDebugSessionInfoListResult value = default; - using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = DataFlowDebugSessionInfoListResult.DeserializeDataFlowDebugSessionInfoListResult(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - - /// Query all active data flow debug sessions. - /// The subscription identifier. - /// The resource group name. - /// The factory name. - /// The cancellation token to use. - /// , or is null. - /// , or is an empty string, and was expected to be non-empty. - public Response QueryByFactory(string subscriptionId, string resourceGroupName, string factoryName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(factoryName, nameof(factoryName)); - - using var message = CreateQueryByFactoryRequest(subscriptionId, resourceGroupName, factoryName); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 200: - { - DataFlowDebugSessionInfoListResult value = default; - using var document = JsonDocument.Parse(message.Response.ContentStream); - value = DataFlowDebugSessionInfoListResult.DeserializeDataFlowDebugSessionInfoListResult(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - - internal HttpMessage CreateAddDataFlowRequest(string subscriptionId, string resourceGroupName, string factoryName, DataFactoryDataFlowDebugPackageContent content) - { - var message = _pipeline.CreateMessage(); - var request = message.Request; - request.Method = RequestMethod.Post; - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendPath("/subscriptions/", false); - uri.AppendPath(subscriptionId, true); - uri.AppendPath("/resourceGroups/", false); - uri.AppendPath(resourceGroupName, true); - uri.AppendPath("/providers/Microsoft.DataFactory/factories/", false); - uri.AppendPath(factoryName, true); - uri.AppendPath("/addDataFlowToDebugSession", false); - uri.AppendQuery("api-version", _apiVersion, true); - request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - request.Headers.Add("Content-Type", "application/json"); - var content0 = new Utf8JsonRequestContent(); - content0.JsonWriter.WriteObjectValue(content); - request.Content = content0; - _userAgent.Apply(message); - return message; - } - - /// Add a data flow into debug session. - /// The subscription identifier. - /// The resource group name. - /// The factory name. - /// Data flow debug session definition with debug content. - /// The cancellation token to use. - /// , , or is null. - /// , or is an empty string, and was expected to be non-empty. - public async Task> AddDataFlowAsync(string subscriptionId, string resourceGroupName, string factoryName, DataFactoryDataFlowDebugPackageContent content, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(factoryName, nameof(factoryName)); - Argument.AssertNotNull(content, nameof(content)); - - using var message = CreateAddDataFlowRequest(subscriptionId, resourceGroupName, factoryName, content); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - switch (message.Response.Status) - { - case 200: - { - DataFactoryDataFlowStartDebugSessionResult value = default; - using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = DataFactoryDataFlowStartDebugSessionResult.DeserializeDataFactoryDataFlowStartDebugSessionResult(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - - /// Add a data flow into debug session. - /// The subscription identifier. - /// The resource group name. - /// The factory name. - /// Data flow debug session definition with debug content. - /// The cancellation token to use. - /// , , or is null. - /// , or is an empty string, and was expected to be non-empty. - public Response AddDataFlow(string subscriptionId, string resourceGroupName, string factoryName, DataFactoryDataFlowDebugPackageContent content, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(factoryName, nameof(factoryName)); - Argument.AssertNotNull(content, nameof(content)); - - using var message = CreateAddDataFlowRequest(subscriptionId, resourceGroupName, factoryName, content); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 200: - { - DataFactoryDataFlowStartDebugSessionResult value = default; - using var document = JsonDocument.Parse(message.Response.ContentStream); - value = DataFactoryDataFlowStartDebugSessionResult.DeserializeDataFactoryDataFlowStartDebugSessionResult(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - - internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceGroupName, string factoryName, DeleteDataFlowDebugSessionContent content) - { - var message = _pipeline.CreateMessage(); - var request = message.Request; - request.Method = RequestMethod.Post; - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendPath("/subscriptions/", false); - uri.AppendPath(subscriptionId, true); - uri.AppendPath("/resourceGroups/", false); - uri.AppendPath(resourceGroupName, true); - uri.AppendPath("/providers/Microsoft.DataFactory/factories/", false); - uri.AppendPath(factoryName, true); - uri.AppendPath("/deleteDataFlowDebugSession", false); - uri.AppendQuery("api-version", _apiVersion, true); - request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - request.Headers.Add("Content-Type", "application/json"); - var content0 = new Utf8JsonRequestContent(); - content0.JsonWriter.WriteObjectValue(content); - request.Content = content0; - _userAgent.Apply(message); - return message; - } - - /// Deletes a data flow debug session. - /// The subscription identifier. - /// The resource group name. - /// The factory name. - /// Data flow debug session definition for deletion. - /// The cancellation token to use. - /// , , or is null. - /// , or is an empty string, and was expected to be non-empty. - public async Task DeleteAsync(string subscriptionId, string resourceGroupName, string factoryName, DeleteDataFlowDebugSessionContent content, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(factoryName, nameof(factoryName)); - Argument.AssertNotNull(content, nameof(content)); - - using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, factoryName, content); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - switch (message.Response.Status) - { - case 200: - return message.Response; - default: - throw new RequestFailedException(message.Response); - } - } - - /// Deletes a data flow debug session. - /// The subscription identifier. - /// The resource group name. - /// The factory name. - /// Data flow debug session definition for deletion. - /// The cancellation token to use. - /// , , or is null. - /// , or is an empty string, and was expected to be non-empty. - public Response Delete(string subscriptionId, string resourceGroupName, string factoryName, DeleteDataFlowDebugSessionContent content, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(factoryName, nameof(factoryName)); - Argument.AssertNotNull(content, nameof(content)); - - using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, factoryName, content); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 200: - return message.Response; - default: - throw new RequestFailedException(message.Response); - } - } - - internal HttpMessage CreateExecuteCommandRequest(string subscriptionId, string resourceGroupName, string factoryName, DataFlowDebugCommandContent content) - { - var message = _pipeline.CreateMessage(); - var request = message.Request; - request.Method = RequestMethod.Post; - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendPath("/subscriptions/", false); - uri.AppendPath(subscriptionId, true); - uri.AppendPath("/resourceGroups/", false); - uri.AppendPath(resourceGroupName, true); - uri.AppendPath("/providers/Microsoft.DataFactory/factories/", false); - uri.AppendPath(factoryName, true); - uri.AppendPath("/executeDataFlowDebugCommand", false); - uri.AppendQuery("api-version", _apiVersion, true); - request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - request.Headers.Add("Content-Type", "application/json"); - var content0 = new Utf8JsonRequestContent(); - content0.JsonWriter.WriteObjectValue(content); - request.Content = content0; - _userAgent.Apply(message); - return message; - } - - /// Execute a data flow debug command. - /// The subscription identifier. - /// The resource group name. - /// The factory name. - /// Data flow debug command definition. - /// The cancellation token to use. - /// , , or is null. - /// , or is an empty string, and was expected to be non-empty. - public async Task ExecuteCommandAsync(string subscriptionId, string resourceGroupName, string factoryName, DataFlowDebugCommandContent content, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(factoryName, nameof(factoryName)); - Argument.AssertNotNull(content, nameof(content)); - - using var message = CreateExecuteCommandRequest(subscriptionId, resourceGroupName, factoryName, content); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - switch (message.Response.Status) - { - case 200: - case 202: - return message.Response; - default: - throw new RequestFailedException(message.Response); - } - } - - /// Execute a data flow debug command. - /// The subscription identifier. - /// The resource group name. - /// The factory name. - /// Data flow debug command definition. - /// The cancellation token to use. - /// , , or is null. - /// , or is an empty string, and was expected to be non-empty. - public Response ExecuteCommand(string subscriptionId, string resourceGroupName, string factoryName, DataFlowDebugCommandContent content, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(factoryName, nameof(factoryName)); - Argument.AssertNotNull(content, nameof(content)); - - using var message = CreateExecuteCommandRequest(subscriptionId, resourceGroupName, factoryName, content); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 200: - case 202: - return message.Response; - default: - throw new RequestFailedException(message.Response); - } - } - - internal HttpMessage CreateQueryByFactoryNextPageRequest(string nextLink, string subscriptionId, string resourceGroupName, string factoryName) - { - var message = _pipeline.CreateMessage(); - var request = message.Request; - request.Method = RequestMethod.Get; - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendRawNextLink(nextLink, false); - request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - _userAgent.Apply(message); - return message; - } - - /// Query all active data flow debug sessions. - /// The URL to the next page of results. - /// The subscription identifier. - /// The resource group name. - /// The factory name. - /// The cancellation token to use. - /// , , or is null. - /// , or is an empty string, and was expected to be non-empty. - public async Task> QueryByFactoryNextPageAsync(string nextLink, string subscriptionId, string resourceGroupName, string factoryName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(nextLink, nameof(nextLink)); - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(factoryName, nameof(factoryName)); - - using var message = CreateQueryByFactoryNextPageRequest(nextLink, subscriptionId, resourceGroupName, factoryName); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - switch (message.Response.Status) - { - case 200: - { - DataFlowDebugSessionInfoListResult value = default; - using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = DataFlowDebugSessionInfoListResult.DeserializeDataFlowDebugSessionInfoListResult(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - - /// Query all active data flow debug sessions. - /// The URL to the next page of results. - /// The subscription identifier. - /// The resource group name. - /// The factory name. - /// The cancellation token to use. - /// , , or is null. - /// , or is an empty string, and was expected to be non-empty. - public Response QueryByFactoryNextPage(string nextLink, string subscriptionId, string resourceGroupName, string factoryName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(nextLink, nameof(nextLink)); - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(factoryName, nameof(factoryName)); - - using var message = CreateQueryByFactoryNextPageRequest(nextLink, subscriptionId, resourceGroupName, factoryName); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 200: - { - DataFlowDebugSessionInfoListResult value = default; - using var document = JsonDocument.Parse(message.Response.ContentStream); - value = DataFlowDebugSessionInfoListResult.DeserializeDataFlowDebugSessionInfoListResult(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/RestOperations/DataFlowsRestOperations.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/RestOperations/DataFlowsRestOperations.cs deleted file mode 100644 index 144ca766..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/RestOperations/DataFlowsRestOperations.cs +++ /dev/null @@ -1,456 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; -using Azure.Core.Pipeline; -using AzureDataFactory.TestingFramework.Models; - -namespace Azure.ResourceManager.DataFactory -{ - internal partial class DataFlowsRestOperations - { - private readonly TelemetryDetails _userAgent; - private readonly HttpPipeline _pipeline; - private readonly Uri _endpoint; - private readonly string _apiVersion; - - /// Initializes a new instance of DataFlowsRestOperations. - /// The HTTP pipeline for sending and receiving REST requests and responses. - /// The application id to use for user agent. - /// server parameter. - /// Api Version. - /// or is null. - public DataFlowsRestOperations(HttpPipeline pipeline, string applicationId, Uri endpoint = null, string apiVersion = default) - { - _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); - _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2018-06-01"; - _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); - } - - internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string resourceGroupName, string factoryName, string dataFlowName, DataFactoryDataFlowData data, string ifMatch) - { - var message = _pipeline.CreateMessage(); - var request = message.Request; - request.Method = RequestMethod.Put; - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendPath("/subscriptions/", false); - uri.AppendPath(subscriptionId, true); - uri.AppendPath("/resourceGroups/", false); - uri.AppendPath(resourceGroupName, true); - uri.AppendPath("/providers/Microsoft.DataFactory/factories/", false); - uri.AppendPath(factoryName, true); - uri.AppendPath("/dataflows/", false); - uri.AppendPath(dataFlowName, true); - uri.AppendQuery("api-version", _apiVersion, true); - request.Uri = uri; - if (ifMatch != null) - { - request.Headers.Add("If-Match", ifMatch); - } - request.Headers.Add("Accept", "application/json"); - request.Headers.Add("Content-Type", "application/json"); - var content = new Utf8JsonRequestContent(); - content.JsonWriter.WriteObjectValue(data); - request.Content = content; - _userAgent.Apply(message); - return message; - } - - /// Creates or updates a data flow. - /// The subscription identifier. - /// The resource group name. - /// The factory name. - /// The data flow name. - /// Data flow resource definition. - /// ETag of the data flow entity. Should only be specified for update, for which it should match existing entity or can be * for unconditional update. - /// The cancellation token to use. - /// , , , or is null. - /// , , or is an empty string, and was expected to be non-empty. - public async Task> CreateOrUpdateAsync(string subscriptionId, string resourceGroupName, string factoryName, string dataFlowName, DataFactoryDataFlowData data, string ifMatch = null, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(factoryName, nameof(factoryName)); - Argument.AssertNotNullOrEmpty(dataFlowName, nameof(dataFlowName)); - Argument.AssertNotNull(data, nameof(data)); - - using var message = CreateCreateOrUpdateRequest(subscriptionId, resourceGroupName, factoryName, dataFlowName, data, ifMatch); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - switch (message.Response.Status) - { - case 200: - { - DataFactoryDataFlowData value = default; - using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = DataFactoryDataFlowData.DeserializeDataFactoryDataFlowData(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - - /// Creates or updates a data flow. - /// The subscription identifier. - /// The resource group name. - /// The factory name. - /// The data flow name. - /// Data flow resource definition. - /// ETag of the data flow entity. Should only be specified for update, for which it should match existing entity or can be * for unconditional update. - /// The cancellation token to use. - /// , , , or is null. - /// , , or is an empty string, and was expected to be non-empty. - public Response CreateOrUpdate(string subscriptionId, string resourceGroupName, string factoryName, string dataFlowName, DataFactoryDataFlowData data, string ifMatch = null, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(factoryName, nameof(factoryName)); - Argument.AssertNotNullOrEmpty(dataFlowName, nameof(dataFlowName)); - Argument.AssertNotNull(data, nameof(data)); - - using var message = CreateCreateOrUpdateRequest(subscriptionId, resourceGroupName, factoryName, dataFlowName, data, ifMatch); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 200: - { - DataFactoryDataFlowData value = default; - using var document = JsonDocument.Parse(message.Response.ContentStream); - value = DataFactoryDataFlowData.DeserializeDataFactoryDataFlowData(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - - internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGroupName, string factoryName, string dataFlowName, string ifNoneMatch) - { - var message = _pipeline.CreateMessage(); - var request = message.Request; - request.Method = RequestMethod.Get; - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendPath("/subscriptions/", false); - uri.AppendPath(subscriptionId, true); - uri.AppendPath("/resourceGroups/", false); - uri.AppendPath(resourceGroupName, true); - uri.AppendPath("/providers/Microsoft.DataFactory/factories/", false); - uri.AppendPath(factoryName, true); - uri.AppendPath("/dataflows/", false); - uri.AppendPath(dataFlowName, true); - uri.AppendQuery("api-version", _apiVersion, true); - request.Uri = uri; - if (ifNoneMatch != null) - { - request.Headers.Add("If-None-Match", ifNoneMatch); - } - request.Headers.Add("Accept", "application/json"); - _userAgent.Apply(message); - return message; - } - - /// Gets a data flow. - /// The subscription identifier. - /// The resource group name. - /// The factory name. - /// The data flow name. - /// ETag of the data flow entity. Should only be specified for get. If the ETag matches the existing entity tag, or if * was provided, then no content will be returned. - /// The cancellation token to use. - /// , , or is null. - /// , , or is an empty string, and was expected to be non-empty. - public async Task> GetAsync(string subscriptionId, string resourceGroupName, string factoryName, string dataFlowName, string ifNoneMatch = null, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(factoryName, nameof(factoryName)); - Argument.AssertNotNullOrEmpty(dataFlowName, nameof(dataFlowName)); - - using var message = CreateGetRequest(subscriptionId, resourceGroupName, factoryName, dataFlowName, ifNoneMatch); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - switch (message.Response.Status) - { - case 200: - { - DataFactoryDataFlowData value = default; - using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = DataFactoryDataFlowData.DeserializeDataFactoryDataFlowData(document.RootElement); - return Response.FromValue(value, message.Response); - } - case 404: - return Response.FromValue((DataFactoryDataFlowData)null, message.Response); - default: - throw new RequestFailedException(message.Response); - } - } - - /// Gets a data flow. - /// The subscription identifier. - /// The resource group name. - /// The factory name. - /// The data flow name. - /// ETag of the data flow entity. Should only be specified for get. If the ETag matches the existing entity tag, or if * was provided, then no content will be returned. - /// The cancellation token to use. - /// , , or is null. - /// , , or is an empty string, and was expected to be non-empty. - public Response Get(string subscriptionId, string resourceGroupName, string factoryName, string dataFlowName, string ifNoneMatch = null, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(factoryName, nameof(factoryName)); - Argument.AssertNotNullOrEmpty(dataFlowName, nameof(dataFlowName)); - - using var message = CreateGetRequest(subscriptionId, resourceGroupName, factoryName, dataFlowName, ifNoneMatch); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 200: - { - DataFactoryDataFlowData value = default; - using var document = JsonDocument.Parse(message.Response.ContentStream); - value = DataFactoryDataFlowData.DeserializeDataFactoryDataFlowData(document.RootElement); - return Response.FromValue(value, message.Response); - } - case 404: - return Response.FromValue((DataFactoryDataFlowData)null, message.Response); - default: - throw new RequestFailedException(message.Response); - } - } - - internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceGroupName, string factoryName, string dataFlowName) - { - var message = _pipeline.CreateMessage(); - var request = message.Request; - request.Method = RequestMethod.Delete; - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendPath("/subscriptions/", false); - uri.AppendPath(subscriptionId, true); - uri.AppendPath("/resourceGroups/", false); - uri.AppendPath(resourceGroupName, true); - uri.AppendPath("/providers/Microsoft.DataFactory/factories/", false); - uri.AppendPath(factoryName, true); - uri.AppendPath("/dataflows/", false); - uri.AppendPath(dataFlowName, true); - uri.AppendQuery("api-version", _apiVersion, true); - request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - _userAgent.Apply(message); - return message; - } - - /// Deletes a data flow. - /// The subscription identifier. - /// The resource group name. - /// The factory name. - /// The data flow name. - /// The cancellation token to use. - /// , , or is null. - /// , , or is an empty string, and was expected to be non-empty. - public async Task DeleteAsync(string subscriptionId, string resourceGroupName, string factoryName, string dataFlowName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(factoryName, nameof(factoryName)); - Argument.AssertNotNullOrEmpty(dataFlowName, nameof(dataFlowName)); - - using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, factoryName, dataFlowName); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - switch (message.Response.Status) - { - case 200: - case 204: - return message.Response; - default: - throw new RequestFailedException(message.Response); - } - } - - /// Deletes a data flow. - /// The subscription identifier. - /// The resource group name. - /// The factory name. - /// The data flow name. - /// The cancellation token to use. - /// , , or is null. - /// , , or is an empty string, and was expected to be non-empty. - public Response Delete(string subscriptionId, string resourceGroupName, string factoryName, string dataFlowName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(factoryName, nameof(factoryName)); - Argument.AssertNotNullOrEmpty(dataFlowName, nameof(dataFlowName)); - - using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, factoryName, dataFlowName); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 200: - case 204: - return message.Response; - default: - throw new RequestFailedException(message.Response); - } - } - - internal HttpMessage CreateListByFactoryRequest(string subscriptionId, string resourceGroupName, string factoryName) - { - var message = _pipeline.CreateMessage(); - var request = message.Request; - request.Method = RequestMethod.Get; - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendPath("/subscriptions/", false); - uri.AppendPath(subscriptionId, true); - uri.AppendPath("/resourceGroups/", false); - uri.AppendPath(resourceGroupName, true); - uri.AppendPath("/providers/Microsoft.DataFactory/factories/", false); - uri.AppendPath(factoryName, true); - uri.AppendPath("/dataflows", false); - uri.AppendQuery("api-version", _apiVersion, true); - request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - _userAgent.Apply(message); - return message; - } - - /// Lists data flows. - /// The subscription identifier. - /// The resource group name. - /// The factory name. - /// The cancellation token to use. - /// , or is null. - /// , or is an empty string, and was expected to be non-empty. - public async Task> ListByFactoryAsync(string subscriptionId, string resourceGroupName, string factoryName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(factoryName, nameof(factoryName)); - - using var message = CreateListByFactoryRequest(subscriptionId, resourceGroupName, factoryName); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - switch (message.Response.Status) - { - case 200: - { - DataFactoryDataFlowListResult value = default; - using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = DataFactoryDataFlowListResult.DeserializeDataFactoryDataFlowListResult(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - - /// Lists data flows. - /// The subscription identifier. - /// The resource group name. - /// The factory name. - /// The cancellation token to use. - /// , or is null. - /// , or is an empty string, and was expected to be non-empty. - public Response ListByFactory(string subscriptionId, string resourceGroupName, string factoryName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(factoryName, nameof(factoryName)); - - using var message = CreateListByFactoryRequest(subscriptionId, resourceGroupName, factoryName); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 200: - { - DataFactoryDataFlowListResult value = default; - using var document = JsonDocument.Parse(message.Response.ContentStream); - value = DataFactoryDataFlowListResult.DeserializeDataFactoryDataFlowListResult(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - - internal HttpMessage CreateListByFactoryNextPageRequest(string nextLink, string subscriptionId, string resourceGroupName, string factoryName) - { - var message = _pipeline.CreateMessage(); - var request = message.Request; - request.Method = RequestMethod.Get; - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendRawNextLink(nextLink, false); - request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - _userAgent.Apply(message); - return message; - } - - /// Lists data flows. - /// The URL to the next page of results. - /// The subscription identifier. - /// The resource group name. - /// The factory name. - /// The cancellation token to use. - /// , , or is null. - /// , or is an empty string, and was expected to be non-empty. - public async Task> ListByFactoryNextPageAsync(string nextLink, string subscriptionId, string resourceGroupName, string factoryName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(nextLink, nameof(nextLink)); - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(factoryName, nameof(factoryName)); - - using var message = CreateListByFactoryNextPageRequest(nextLink, subscriptionId, resourceGroupName, factoryName); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - switch (message.Response.Status) - { - case 200: - { - DataFactoryDataFlowListResult value = default; - using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = DataFactoryDataFlowListResult.DeserializeDataFactoryDataFlowListResult(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - - /// Lists data flows. - /// The URL to the next page of results. - /// The subscription identifier. - /// The resource group name. - /// The factory name. - /// The cancellation token to use. - /// , , or is null. - /// , or is an empty string, and was expected to be non-empty. - public Response ListByFactoryNextPage(string nextLink, string subscriptionId, string resourceGroupName, string factoryName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(nextLink, nameof(nextLink)); - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(factoryName, nameof(factoryName)); - - using var message = CreateListByFactoryNextPageRequest(nextLink, subscriptionId, resourceGroupName, factoryName); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 200: - { - DataFactoryDataFlowListResult value = default; - using var document = JsonDocument.Parse(message.Response.ContentStream); - value = DataFactoryDataFlowListResult.DeserializeDataFactoryDataFlowListResult(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/RestOperations/DatasetsRestOperations.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/RestOperations/DatasetsRestOperations.cs deleted file mode 100644 index 6043ad15..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/RestOperations/DatasetsRestOperations.cs +++ /dev/null @@ -1,458 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; -using Azure.Core.Pipeline; -using AzureDataFactory.TestingFramework.Models; - -namespace Azure.ResourceManager.DataFactory -{ - internal partial class DatasetsRestOperations - { - private readonly TelemetryDetails _userAgent; - private readonly HttpPipeline _pipeline; - private readonly Uri _endpoint; - private readonly string _apiVersion; - - /// Initializes a new instance of DatasetsRestOperations. - /// The HTTP pipeline for sending and receiving REST requests and responses. - /// The application id to use for user agent. - /// server parameter. - /// Api Version. - /// or is null. - public DatasetsRestOperations(HttpPipeline pipeline, string applicationId, Uri endpoint = null, string apiVersion = default) - { - _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); - _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2018-06-01"; - _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); - } - - internal HttpMessage CreateListByFactoryRequest(string subscriptionId, string resourceGroupName, string factoryName) - { - var message = _pipeline.CreateMessage(); - var request = message.Request; - request.Method = RequestMethod.Get; - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendPath("/subscriptions/", false); - uri.AppendPath(subscriptionId, true); - uri.AppendPath("/resourceGroups/", false); - uri.AppendPath(resourceGroupName, true); - uri.AppendPath("/providers/Microsoft.DataFactory/factories/", false); - uri.AppendPath(factoryName, true); - uri.AppendPath("/datasets", false); - uri.AppendQuery("api-version", _apiVersion, true); - request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - _userAgent.Apply(message); - return message; - } - - /// Lists datasets. - /// The subscription identifier. - /// The resource group name. - /// The factory name. - /// The cancellation token to use. - /// , or is null. - /// , or is an empty string, and was expected to be non-empty. - public async Task> ListByFactoryAsync(string subscriptionId, string resourceGroupName, string factoryName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(factoryName, nameof(factoryName)); - - using var message = CreateListByFactoryRequest(subscriptionId, resourceGroupName, factoryName); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - switch (message.Response.Status) - { - case 200: - { - DataFactoryDatasetListResult value = default; - using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = DataFactoryDatasetListResult.DeserializeDataFactoryDatasetListResult(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - - /// Lists datasets. - /// The subscription identifier. - /// The resource group name. - /// The factory name. - /// The cancellation token to use. - /// , or is null. - /// , or is an empty string, and was expected to be non-empty. - public Response ListByFactory(string subscriptionId, string resourceGroupName, string factoryName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(factoryName, nameof(factoryName)); - - using var message = CreateListByFactoryRequest(subscriptionId, resourceGroupName, factoryName); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 200: - { - DataFactoryDatasetListResult value = default; - using var document = JsonDocument.Parse(message.Response.ContentStream); - value = DataFactoryDatasetListResult.DeserializeDataFactoryDatasetListResult(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - - internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string resourceGroupName, string factoryName, string datasetName, DataFactoryDatasetData data, string ifMatch) - { - var message = _pipeline.CreateMessage(); - var request = message.Request; - request.Method = RequestMethod.Put; - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendPath("/subscriptions/", false); - uri.AppendPath(subscriptionId, true); - uri.AppendPath("/resourceGroups/", false); - uri.AppendPath(resourceGroupName, true); - uri.AppendPath("/providers/Microsoft.DataFactory/factories/", false); - uri.AppendPath(factoryName, true); - uri.AppendPath("/datasets/", false); - uri.AppendPath(datasetName, true); - uri.AppendQuery("api-version", _apiVersion, true); - request.Uri = uri; - if (ifMatch != null) - { - request.Headers.Add("If-Match", ifMatch); - } - request.Headers.Add("Accept", "application/json"); - request.Headers.Add("Content-Type", "application/json"); - var content = new Utf8JsonRequestContent(); - content.JsonWriter.WriteObjectValue(data); - request.Content = content; - _userAgent.Apply(message); - return message; - } - - /// Creates or updates a dataset. - /// The subscription identifier. - /// The resource group name. - /// The factory name. - /// The dataset name. - /// Dataset resource definition. - /// ETag of the dataset entity. Should only be specified for update, for which it should match existing entity or can be * for unconditional update. - /// The cancellation token to use. - /// , , , or is null. - /// , , or is an empty string, and was expected to be non-empty. - public async Task> CreateOrUpdateAsync(string subscriptionId, string resourceGroupName, string factoryName, string datasetName, DataFactoryDatasetData data, string ifMatch = null, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(factoryName, nameof(factoryName)); - Argument.AssertNotNullOrEmpty(datasetName, nameof(datasetName)); - Argument.AssertNotNull(data, nameof(data)); - - using var message = CreateCreateOrUpdateRequest(subscriptionId, resourceGroupName, factoryName, datasetName, data, ifMatch); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - switch (message.Response.Status) - { - case 200: - { - DataFactoryDatasetData value = default; - using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = DataFactoryDatasetData.DeserializeDataFactoryDatasetData(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - - /// Creates or updates a dataset. - /// The subscription identifier. - /// The resource group name. - /// The factory name. - /// The dataset name. - /// Dataset resource definition. - /// ETag of the dataset entity. Should only be specified for update, for which it should match existing entity or can be * for unconditional update. - /// The cancellation token to use. - /// , , , or is null. - /// , , or is an empty string, and was expected to be non-empty. - public Response CreateOrUpdate(string subscriptionId, string resourceGroupName, string factoryName, string datasetName, DataFactoryDatasetData data, string ifMatch = null, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(factoryName, nameof(factoryName)); - Argument.AssertNotNullOrEmpty(datasetName, nameof(datasetName)); - Argument.AssertNotNull(data, nameof(data)); - - using var message = CreateCreateOrUpdateRequest(subscriptionId, resourceGroupName, factoryName, datasetName, data, ifMatch); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 200: - { - DataFactoryDatasetData value = default; - using var document = JsonDocument.Parse(message.Response.ContentStream); - value = DataFactoryDatasetData.DeserializeDataFactoryDatasetData(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - - internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGroupName, string factoryName, string datasetName, string ifNoneMatch) - { - var message = _pipeline.CreateMessage(); - var request = message.Request; - request.Method = RequestMethod.Get; - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendPath("/subscriptions/", false); - uri.AppendPath(subscriptionId, true); - uri.AppendPath("/resourceGroups/", false); - uri.AppendPath(resourceGroupName, true); - uri.AppendPath("/providers/Microsoft.DataFactory/factories/", false); - uri.AppendPath(factoryName, true); - uri.AppendPath("/datasets/", false); - uri.AppendPath(datasetName, true); - uri.AppendQuery("api-version", _apiVersion, true); - request.Uri = uri; - if (ifNoneMatch != null) - { - request.Headers.Add("If-None-Match", ifNoneMatch); - } - request.Headers.Add("Accept", "application/json"); - _userAgent.Apply(message); - return message; - } - - /// Gets a dataset. - /// The subscription identifier. - /// The resource group name. - /// The factory name. - /// The dataset name. - /// ETag of the dataset entity. Should only be specified for get. If the ETag matches the existing entity tag, or if * was provided, then no content will be returned. - /// The cancellation token to use. - /// , , or is null. - /// , , or is an empty string, and was expected to be non-empty. - public async Task> GetAsync(string subscriptionId, string resourceGroupName, string factoryName, string datasetName, string ifNoneMatch = null, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(factoryName, nameof(factoryName)); - Argument.AssertNotNullOrEmpty(datasetName, nameof(datasetName)); - - using var message = CreateGetRequest(subscriptionId, resourceGroupName, factoryName, datasetName, ifNoneMatch); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - switch (message.Response.Status) - { - case 200: - { - DataFactoryDatasetData value = default; - using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = DataFactoryDatasetData.DeserializeDataFactoryDatasetData(document.RootElement); - return Response.FromValue(value, message.Response); - } - case 304: - case 404: - return Response.FromValue((DataFactoryDatasetData)null, message.Response); - default: - throw new RequestFailedException(message.Response); - } - } - - /// Gets a dataset. - /// The subscription identifier. - /// The resource group name. - /// The factory name. - /// The dataset name. - /// ETag of the dataset entity. Should only be specified for get. If the ETag matches the existing entity tag, or if * was provided, then no content will be returned. - /// The cancellation token to use. - /// , , or is null. - /// , , or is an empty string, and was expected to be non-empty. - public Response Get(string subscriptionId, string resourceGroupName, string factoryName, string datasetName, string ifNoneMatch = null, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(factoryName, nameof(factoryName)); - Argument.AssertNotNullOrEmpty(datasetName, nameof(datasetName)); - - using var message = CreateGetRequest(subscriptionId, resourceGroupName, factoryName, datasetName, ifNoneMatch); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 200: - { - DataFactoryDatasetData value = default; - using var document = JsonDocument.Parse(message.Response.ContentStream); - value = DataFactoryDatasetData.DeserializeDataFactoryDatasetData(document.RootElement); - return Response.FromValue(value, message.Response); - } - case 304: - case 404: - return Response.FromValue((DataFactoryDatasetData)null, message.Response); - default: - throw new RequestFailedException(message.Response); - } - } - - internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceGroupName, string factoryName, string datasetName) - { - var message = _pipeline.CreateMessage(); - var request = message.Request; - request.Method = RequestMethod.Delete; - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendPath("/subscriptions/", false); - uri.AppendPath(subscriptionId, true); - uri.AppendPath("/resourceGroups/", false); - uri.AppendPath(resourceGroupName, true); - uri.AppendPath("/providers/Microsoft.DataFactory/factories/", false); - uri.AppendPath(factoryName, true); - uri.AppendPath("/datasets/", false); - uri.AppendPath(datasetName, true); - uri.AppendQuery("api-version", _apiVersion, true); - request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - _userAgent.Apply(message); - return message; - } - - /// Deletes a dataset. - /// The subscription identifier. - /// The resource group name. - /// The factory name. - /// The dataset name. - /// The cancellation token to use. - /// , , or is null. - /// , , or is an empty string, and was expected to be non-empty. - public async Task DeleteAsync(string subscriptionId, string resourceGroupName, string factoryName, string datasetName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(factoryName, nameof(factoryName)); - Argument.AssertNotNullOrEmpty(datasetName, nameof(datasetName)); - - using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, factoryName, datasetName); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - switch (message.Response.Status) - { - case 200: - case 204: - return message.Response; - default: - throw new RequestFailedException(message.Response); - } - } - - /// Deletes a dataset. - /// The subscription identifier. - /// The resource group name. - /// The factory name. - /// The dataset name. - /// The cancellation token to use. - /// , , or is null. - /// , , or is an empty string, and was expected to be non-empty. - public Response Delete(string subscriptionId, string resourceGroupName, string factoryName, string datasetName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(factoryName, nameof(factoryName)); - Argument.AssertNotNullOrEmpty(datasetName, nameof(datasetName)); - - using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, factoryName, datasetName); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 200: - case 204: - return message.Response; - default: - throw new RequestFailedException(message.Response); - } - } - - internal HttpMessage CreateListByFactoryNextPageRequest(string nextLink, string subscriptionId, string resourceGroupName, string factoryName) - { - var message = _pipeline.CreateMessage(); - var request = message.Request; - request.Method = RequestMethod.Get; - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendRawNextLink(nextLink, false); - request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - _userAgent.Apply(message); - return message; - } - - /// Lists datasets. - /// The URL to the next page of results. - /// The subscription identifier. - /// The resource group name. - /// The factory name. - /// The cancellation token to use. - /// , , or is null. - /// , or is an empty string, and was expected to be non-empty. - public async Task> ListByFactoryNextPageAsync(string nextLink, string subscriptionId, string resourceGroupName, string factoryName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(nextLink, nameof(nextLink)); - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(factoryName, nameof(factoryName)); - - using var message = CreateListByFactoryNextPageRequest(nextLink, subscriptionId, resourceGroupName, factoryName); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - switch (message.Response.Status) - { - case 200: - { - DataFactoryDatasetListResult value = default; - using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = DataFactoryDatasetListResult.DeserializeDataFactoryDatasetListResult(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - - /// Lists datasets. - /// The URL to the next page of results. - /// The subscription identifier. - /// The resource group name. - /// The factory name. - /// The cancellation token to use. - /// , , or is null. - /// , or is an empty string, and was expected to be non-empty. - public Response ListByFactoryNextPage(string nextLink, string subscriptionId, string resourceGroupName, string factoryName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(nextLink, nameof(nextLink)); - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(factoryName, nameof(factoryName)); - - using var message = CreateListByFactoryNextPageRequest(nextLink, subscriptionId, resourceGroupName, factoryName); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 200: - { - DataFactoryDatasetListResult value = default; - using var document = JsonDocument.Parse(message.Response.ContentStream); - value = DataFactoryDatasetListResult.DeserializeDataFactoryDatasetListResult(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/RestOperations/ExposureControlRestOperations.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/RestOperations/ExposureControlRestOperations.cs deleted file mode 100644 index 155f3a04..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/RestOperations/ExposureControlRestOperations.cs +++ /dev/null @@ -1,286 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; -using Azure.Core.Pipeline; -using AzureDataFactory.TestingFramework.Models; - -namespace Azure.ResourceManager.DataFactory -{ - internal partial class ExposureControlRestOperations - { - private readonly TelemetryDetails _userAgent; - private readonly HttpPipeline _pipeline; - private readonly Uri _endpoint; - private readonly string _apiVersion; - - /// Initializes a new instance of ExposureControlRestOperations. - /// The HTTP pipeline for sending and receiving REST requests and responses. - /// The application id to use for user agent. - /// server parameter. - /// Api Version. - /// or is null. - public ExposureControlRestOperations(HttpPipeline pipeline, string applicationId, Uri endpoint = null, string apiVersion = default) - { - _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); - _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2018-06-01"; - _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); - } - - internal HttpMessage CreateGetFeatureValueRequest(string subscriptionId, AzureLocation locationId, ExposureControlContent content) - { - var message = _pipeline.CreateMessage(); - var request = message.Request; - request.Method = RequestMethod.Post; - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendPath("/subscriptions/", false); - uri.AppendPath(subscriptionId, true); - uri.AppendPath("/providers/Microsoft.DataFactory/locations/", false); - uri.AppendPath(locationId, true); - uri.AppendPath("/getFeatureValue", false); - uri.AppendQuery("api-version", _apiVersion, true); - request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - request.Headers.Add("Content-Type", "application/json"); - var content0 = new Utf8JsonRequestContent(); - content0.JsonWriter.WriteObjectValue(content); - request.Content = content0; - _userAgent.Apply(message); - return message; - } - - /// Get exposure control feature for specific location. - /// The subscription identifier. - /// The location identifier. - /// The exposure control request. - /// The cancellation token to use. - /// or is null. - /// is an empty string, and was expected to be non-empty. - public async Task> GetFeatureValueAsync(string subscriptionId, AzureLocation locationId, ExposureControlContent content, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNull(content, nameof(content)); - - using var message = CreateGetFeatureValueRequest(subscriptionId, locationId, content); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - switch (message.Response.Status) - { - case 200: - { - ExposureControlResult value = default; - using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = ExposureControlResult.DeserializeExposureControlResult(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - - /// Get exposure control feature for specific location. - /// The subscription identifier. - /// The location identifier. - /// The exposure control request. - /// The cancellation token to use. - /// or is null. - /// is an empty string, and was expected to be non-empty. - public Response GetFeatureValue(string subscriptionId, AzureLocation locationId, ExposureControlContent content, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNull(content, nameof(content)); - - using var message = CreateGetFeatureValueRequest(subscriptionId, locationId, content); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 200: - { - ExposureControlResult value = default; - using var document = JsonDocument.Parse(message.Response.ContentStream); - value = ExposureControlResult.DeserializeExposureControlResult(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - - internal HttpMessage CreateGetFeatureValueByFactoryRequest(string subscriptionId, string resourceGroupName, string factoryName, ExposureControlContent content) - { - var message = _pipeline.CreateMessage(); - var request = message.Request; - request.Method = RequestMethod.Post; - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendPath("/subscriptions/", false); - uri.AppendPath(subscriptionId, true); - uri.AppendPath("/resourceGroups/", false); - uri.AppendPath(resourceGroupName, true); - uri.AppendPath("/providers/Microsoft.DataFactory/factories/", false); - uri.AppendPath(factoryName, true); - uri.AppendPath("/getFeatureValue", false); - uri.AppendQuery("api-version", _apiVersion, true); - request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - request.Headers.Add("Content-Type", "application/json"); - var content0 = new Utf8JsonRequestContent(); - content0.JsonWriter.WriteObjectValue(content); - request.Content = content0; - _userAgent.Apply(message); - return message; - } - - /// Get exposure control feature for specific factory. - /// The subscription identifier. - /// The resource group name. - /// The factory name. - /// The exposure control request. - /// The cancellation token to use. - /// , , or is null. - /// , or is an empty string, and was expected to be non-empty. - public async Task> GetFeatureValueByFactoryAsync(string subscriptionId, string resourceGroupName, string factoryName, ExposureControlContent content, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(factoryName, nameof(factoryName)); - Argument.AssertNotNull(content, nameof(content)); - - using var message = CreateGetFeatureValueByFactoryRequest(subscriptionId, resourceGroupName, factoryName, content); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - switch (message.Response.Status) - { - case 200: - { - ExposureControlResult value = default; - using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = ExposureControlResult.DeserializeExposureControlResult(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - - /// Get exposure control feature for specific factory. - /// The subscription identifier. - /// The resource group name. - /// The factory name. - /// The exposure control request. - /// The cancellation token to use. - /// , , or is null. - /// , or is an empty string, and was expected to be non-empty. - public Response GetFeatureValueByFactory(string subscriptionId, string resourceGroupName, string factoryName, ExposureControlContent content, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(factoryName, nameof(factoryName)); - Argument.AssertNotNull(content, nameof(content)); - - using var message = CreateGetFeatureValueByFactoryRequest(subscriptionId, resourceGroupName, factoryName, content); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 200: - { - ExposureControlResult value = default; - using var document = JsonDocument.Parse(message.Response.ContentStream); - value = ExposureControlResult.DeserializeExposureControlResult(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - - internal HttpMessage CreateQueryFeatureValuesByFactoryRequest(string subscriptionId, string resourceGroupName, string factoryName, ExposureControlBatchContent content) - { - var message = _pipeline.CreateMessage(); - var request = message.Request; - request.Method = RequestMethod.Post; - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendPath("/subscriptions/", false); - uri.AppendPath(subscriptionId, true); - uri.AppendPath("/resourceGroups/", false); - uri.AppendPath(resourceGroupName, true); - uri.AppendPath("/providers/Microsoft.DataFactory/factories/", false); - uri.AppendPath(factoryName, true); - uri.AppendPath("/queryFeaturesValue", false); - uri.AppendQuery("api-version", _apiVersion, true); - request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - request.Headers.Add("Content-Type", "application/json"); - var content0 = new Utf8JsonRequestContent(); - content0.JsonWriter.WriteObjectValue(content); - request.Content = content0; - _userAgent.Apply(message); - return message; - } - - /// Get list of exposure control features for specific factory. - /// The subscription identifier. - /// The resource group name. - /// The factory name. - /// The exposure control request for list of features. - /// The cancellation token to use. - /// , , or is null. - /// , or is an empty string, and was expected to be non-empty. - public async Task> QueryFeatureValuesByFactoryAsync(string subscriptionId, string resourceGroupName, string factoryName, ExposureControlBatchContent content, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(factoryName, nameof(factoryName)); - Argument.AssertNotNull(content, nameof(content)); - - using var message = CreateQueryFeatureValuesByFactoryRequest(subscriptionId, resourceGroupName, factoryName, content); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - switch (message.Response.Status) - { - case 200: - { - ExposureControlBatchResult value = default; - using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = ExposureControlBatchResult.DeserializeExposureControlBatchResult(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - - /// Get list of exposure control features for specific factory. - /// The subscription identifier. - /// The resource group name. - /// The factory name. - /// The exposure control request for list of features. - /// The cancellation token to use. - /// , , or is null. - /// , or is an empty string, and was expected to be non-empty. - public Response QueryFeatureValuesByFactory(string subscriptionId, string resourceGroupName, string factoryName, ExposureControlBatchContent content, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(factoryName, nameof(factoryName)); - Argument.AssertNotNull(content, nameof(content)); - - using var message = CreateQueryFeatureValuesByFactoryRequest(subscriptionId, resourceGroupName, factoryName, content); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 200: - { - ExposureControlBatchResult value = default; - using var document = JsonDocument.Parse(message.Response.ContentStream); - value = ExposureControlBatchResult.DeserializeExposureControlBatchResult(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/RestOperations/FactoriesRestOperations.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/RestOperations/FactoriesRestOperations.cs deleted file mode 100644 index 48377f20..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/RestOperations/FactoriesRestOperations.cs +++ /dev/null @@ -1,904 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; -using Azure.Core.Pipeline; -using AzureDataFactory.TestingFramework.Models; - -namespace Azure.ResourceManager.DataFactory -{ - internal partial class FactoriesRestOperations - { - private readonly TelemetryDetails _userAgent; - private readonly HttpPipeline _pipeline; - private readonly Uri _endpoint; - private readonly string _apiVersion; - - /// Initializes a new instance of FactoriesRestOperations. - /// The HTTP pipeline for sending and receiving REST requests and responses. - /// The application id to use for user agent. - /// server parameter. - /// Api Version. - /// or is null. - public FactoriesRestOperations(HttpPipeline pipeline, string applicationId, Uri endpoint = null, string apiVersion = default) - { - _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); - _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2018-06-01"; - _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); - } - - internal HttpMessage CreateListRequest(string subscriptionId) - { - var message = _pipeline.CreateMessage(); - var request = message.Request; - request.Method = RequestMethod.Get; - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendPath("/subscriptions/", false); - uri.AppendPath(subscriptionId, true); - uri.AppendPath("/providers/Microsoft.DataFactory/factories", false); - uri.AppendQuery("api-version", _apiVersion, true); - request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - _userAgent.Apply(message); - return message; - } - - /// Lists factories under the specified subscription. - /// The subscription identifier. - /// The cancellation token to use. - /// is null. - /// is an empty string, and was expected to be non-empty. - public async Task> ListAsync(string subscriptionId, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - - using var message = CreateListRequest(subscriptionId); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - switch (message.Response.Status) - { - case 200: - { - DataFactoryListResult value = default; - using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = DataFactoryListResult.DeserializeDataFactoryListResult(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - - /// Lists factories under the specified subscription. - /// The subscription identifier. - /// The cancellation token to use. - /// is null. - /// is an empty string, and was expected to be non-empty. - public Response List(string subscriptionId, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - - using var message = CreateListRequest(subscriptionId); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 200: - { - DataFactoryListResult value = default; - using var document = JsonDocument.Parse(message.Response.ContentStream); - value = DataFactoryListResult.DeserializeDataFactoryListResult(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - - internal HttpMessage CreateConfigureFactoryRepoRequest(string subscriptionId, AzureLocation locationId, FactoryRepoContent content) - { - var message = _pipeline.CreateMessage(); - var request = message.Request; - request.Method = RequestMethod.Post; - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendPath("/subscriptions/", false); - uri.AppendPath(subscriptionId, true); - uri.AppendPath("/providers/Microsoft.DataFactory/locations/", false); - uri.AppendPath(locationId, true); - uri.AppendPath("/configureFactoryRepo", false); - uri.AppendQuery("api-version", _apiVersion, true); - request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - request.Headers.Add("Content-Type", "application/json"); - var content0 = new Utf8JsonRequestContent(); - content0.JsonWriter.WriteObjectValue(content); - request.Content = content0; - _userAgent.Apply(message); - return message; - } - - /// Updates a factory's repo information. - /// The subscription identifier. - /// The location identifier. - /// Update factory repo request definition. - /// The cancellation token to use. - /// or is null. - /// is an empty string, and was expected to be non-empty. - public async Task> ConfigureFactoryRepoAsync(string subscriptionId, AzureLocation locationId, FactoryRepoContent content, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNull(content, nameof(content)); - - using var message = CreateConfigureFactoryRepoRequest(subscriptionId, locationId, content); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - switch (message.Response.Status) - { - case 200: - { - DataFactoryData value = default; - using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = DataFactoryData.DeserializeDataFactoryData(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - - /// Updates a factory's repo information. - /// The subscription identifier. - /// The location identifier. - /// Update factory repo request definition. - /// The cancellation token to use. - /// or is null. - /// is an empty string, and was expected to be non-empty. - public Response ConfigureFactoryRepo(string subscriptionId, AzureLocation locationId, FactoryRepoContent content, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNull(content, nameof(content)); - - using var message = CreateConfigureFactoryRepoRequest(subscriptionId, locationId, content); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 200: - { - DataFactoryData value = default; - using var document = JsonDocument.Parse(message.Response.ContentStream); - value = DataFactoryData.DeserializeDataFactoryData(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - - internal HttpMessage CreateListByResourceGroupRequest(string subscriptionId, string resourceGroupName) - { - var message = _pipeline.CreateMessage(); - var request = message.Request; - request.Method = RequestMethod.Get; - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendPath("/subscriptions/", false); - uri.AppendPath(subscriptionId, true); - uri.AppendPath("/resourceGroups/", false); - uri.AppendPath(resourceGroupName, true); - uri.AppendPath("/providers/Microsoft.DataFactory/factories", false); - uri.AppendQuery("api-version", _apiVersion, true); - request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - _userAgent.Apply(message); - return message; - } - - /// Lists factories. - /// The subscription identifier. - /// The resource group name. - /// The cancellation token to use. - /// or is null. - /// or is an empty string, and was expected to be non-empty. - public async Task> ListByResourceGroupAsync(string subscriptionId, string resourceGroupName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - - using var message = CreateListByResourceGroupRequest(subscriptionId, resourceGroupName); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - switch (message.Response.Status) - { - case 200: - { - DataFactoryListResult value = default; - using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = DataFactoryListResult.DeserializeDataFactoryListResult(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - - /// Lists factories. - /// The subscription identifier. - /// The resource group name. - /// The cancellation token to use. - /// or is null. - /// or is an empty string, and was expected to be non-empty. - public Response ListByResourceGroup(string subscriptionId, string resourceGroupName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - - using var message = CreateListByResourceGroupRequest(subscriptionId, resourceGroupName); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 200: - { - DataFactoryListResult value = default; - using var document = JsonDocument.Parse(message.Response.ContentStream); - value = DataFactoryListResult.DeserializeDataFactoryListResult(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - - internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string resourceGroupName, string factoryName, DataFactoryData data, string ifMatch) - { - var message = _pipeline.CreateMessage(); - var request = message.Request; - request.Method = RequestMethod.Put; - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendPath("/subscriptions/", false); - uri.AppendPath(subscriptionId, true); - uri.AppendPath("/resourceGroups/", false); - uri.AppendPath(resourceGroupName, true); - uri.AppendPath("/providers/Microsoft.DataFactory/factories/", false); - uri.AppendPath(factoryName, true); - uri.AppendQuery("api-version", _apiVersion, true); - request.Uri = uri; - if (ifMatch != null) - { - request.Headers.Add("If-Match", ifMatch); - } - request.Headers.Add("Accept", "application/json"); - request.Headers.Add("Content-Type", "application/json"); - var content = new Utf8JsonRequestContent(); - content.JsonWriter.WriteObjectValue(data); - request.Content = content; - _userAgent.Apply(message); - return message; - } - - /// Creates or updates a factory. - /// The subscription identifier. - /// The resource group name. - /// The factory name. - /// Factory resource definition. - /// ETag of the factory entity. Should only be specified for update, for which it should match existing entity or can be * for unconditional update. - /// The cancellation token to use. - /// , , or is null. - /// , or is an empty string, and was expected to be non-empty. - public async Task> CreateOrUpdateAsync(string subscriptionId, string resourceGroupName, string factoryName, DataFactoryData data, string ifMatch = null, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(factoryName, nameof(factoryName)); - Argument.AssertNotNull(data, nameof(data)); - - using var message = CreateCreateOrUpdateRequest(subscriptionId, resourceGroupName, factoryName, data, ifMatch); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - switch (message.Response.Status) - { - case 200: - { - DataFactoryData value = default; - using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = DataFactoryData.DeserializeDataFactoryData(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - - /// Creates or updates a factory. - /// The subscription identifier. - /// The resource group name. - /// The factory name. - /// Factory resource definition. - /// ETag of the factory entity. Should only be specified for update, for which it should match existing entity or can be * for unconditional update. - /// The cancellation token to use. - /// , , or is null. - /// , or is an empty string, and was expected to be non-empty. - public Response CreateOrUpdate(string subscriptionId, string resourceGroupName, string factoryName, DataFactoryData data, string ifMatch = null, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(factoryName, nameof(factoryName)); - Argument.AssertNotNull(data, nameof(data)); - - using var message = CreateCreateOrUpdateRequest(subscriptionId, resourceGroupName, factoryName, data, ifMatch); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 200: - { - DataFactoryData value = default; - using var document = JsonDocument.Parse(message.Response.ContentStream); - value = DataFactoryData.DeserializeDataFactoryData(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - - internal HttpMessage CreateUpdateRequest(string subscriptionId, string resourceGroupName, string factoryName, DataFactoryPatch patch) - { - var message = _pipeline.CreateMessage(); - var request = message.Request; - request.Method = RequestMethod.Patch; - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendPath("/subscriptions/", false); - uri.AppendPath(subscriptionId, true); - uri.AppendPath("/resourceGroups/", false); - uri.AppendPath(resourceGroupName, true); - uri.AppendPath("/providers/Microsoft.DataFactory/factories/", false); - uri.AppendPath(factoryName, true); - uri.AppendQuery("api-version", _apiVersion, true); - request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - request.Headers.Add("Content-Type", "application/json"); - var content = new Utf8JsonRequestContent(); - content.JsonWriter.WriteObjectValue(patch); - request.Content = content; - _userAgent.Apply(message); - return message; - } - - /// Updates a factory. - /// The subscription identifier. - /// The resource group name. - /// The factory name. - /// The parameters for updating a factory. - /// The cancellation token to use. - /// , , or is null. - /// , or is an empty string, and was expected to be non-empty. - public async Task> UpdateAsync(string subscriptionId, string resourceGroupName, string factoryName, DataFactoryPatch patch, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(factoryName, nameof(factoryName)); - Argument.AssertNotNull(patch, nameof(patch)); - - using var message = CreateUpdateRequest(subscriptionId, resourceGroupName, factoryName, patch); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - switch (message.Response.Status) - { - case 200: - { - DataFactoryData value = default; - using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = DataFactoryData.DeserializeDataFactoryData(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - - /// Updates a factory. - /// The subscription identifier. - /// The resource group name. - /// The factory name. - /// The parameters for updating a factory. - /// The cancellation token to use. - /// , , or is null. - /// , or is an empty string, and was expected to be non-empty. - public Response Update(string subscriptionId, string resourceGroupName, string factoryName, DataFactoryPatch patch, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(factoryName, nameof(factoryName)); - Argument.AssertNotNull(patch, nameof(patch)); - - using var message = CreateUpdateRequest(subscriptionId, resourceGroupName, factoryName, patch); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 200: - { - DataFactoryData value = default; - using var document = JsonDocument.Parse(message.Response.ContentStream); - value = DataFactoryData.DeserializeDataFactoryData(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - - internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGroupName, string factoryName, string ifNoneMatch) - { - var message = _pipeline.CreateMessage(); - var request = message.Request; - request.Method = RequestMethod.Get; - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendPath("/subscriptions/", false); - uri.AppendPath(subscriptionId, true); - uri.AppendPath("/resourceGroups/", false); - uri.AppendPath(resourceGroupName, true); - uri.AppendPath("/providers/Microsoft.DataFactory/factories/", false); - uri.AppendPath(factoryName, true); - uri.AppendQuery("api-version", _apiVersion, true); - request.Uri = uri; - if (ifNoneMatch != null) - { - request.Headers.Add("If-None-Match", ifNoneMatch); - } - request.Headers.Add("Accept", "application/json"); - _userAgent.Apply(message); - return message; - } - - /// Gets a factory. - /// The subscription identifier. - /// The resource group name. - /// The factory name. - /// ETag of the factory entity. Should only be specified for get. If the ETag matches the existing entity tag, or if * was provided, then no content will be returned. - /// The cancellation token to use. - /// , or is null. - /// , or is an empty string, and was expected to be non-empty. - public async Task> GetAsync(string subscriptionId, string resourceGroupName, string factoryName, string ifNoneMatch = null, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(factoryName, nameof(factoryName)); - - using var message = CreateGetRequest(subscriptionId, resourceGroupName, factoryName, ifNoneMatch); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - switch (message.Response.Status) - { - case 200: - { - DataFactoryData value = default; - using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = DataFactoryData.DeserializeDataFactoryData(document.RootElement); - return Response.FromValue(value, message.Response); - } - case 304: - case 404: - return Response.FromValue((DataFactoryData)null, message.Response); - default: - throw new RequestFailedException(message.Response); - } - } - - /// Gets a factory. - /// The subscription identifier. - /// The resource group name. - /// The factory name. - /// ETag of the factory entity. Should only be specified for get. If the ETag matches the existing entity tag, or if * was provided, then no content will be returned. - /// The cancellation token to use. - /// , or is null. - /// , or is an empty string, and was expected to be non-empty. - public Response Get(string subscriptionId, string resourceGroupName, string factoryName, string ifNoneMatch = null, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(factoryName, nameof(factoryName)); - - using var message = CreateGetRequest(subscriptionId, resourceGroupName, factoryName, ifNoneMatch); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 200: - { - DataFactoryData value = default; - using var document = JsonDocument.Parse(message.Response.ContentStream); - value = DataFactoryData.DeserializeDataFactoryData(document.RootElement); - return Response.FromValue(value, message.Response); - } - case 304: - case 404: - return Response.FromValue((DataFactoryData)null, message.Response); - default: - throw new RequestFailedException(message.Response); - } - } - - internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceGroupName, string factoryName) - { - var message = _pipeline.CreateMessage(); - var request = message.Request; - request.Method = RequestMethod.Delete; - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendPath("/subscriptions/", false); - uri.AppendPath(subscriptionId, true); - uri.AppendPath("/resourceGroups/", false); - uri.AppendPath(resourceGroupName, true); - uri.AppendPath("/providers/Microsoft.DataFactory/factories/", false); - uri.AppendPath(factoryName, true); - uri.AppendQuery("api-version", _apiVersion, true); - request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - _userAgent.Apply(message); - return message; - } - - /// Deletes a factory. - /// The subscription identifier. - /// The resource group name. - /// The factory name. - /// The cancellation token to use. - /// , or is null. - /// , or is an empty string, and was expected to be non-empty. - public async Task DeleteAsync(string subscriptionId, string resourceGroupName, string factoryName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(factoryName, nameof(factoryName)); - - using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, factoryName); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - switch (message.Response.Status) - { - case 200: - case 204: - return message.Response; - default: - throw new RequestFailedException(message.Response); - } - } - - /// Deletes a factory. - /// The subscription identifier. - /// The resource group name. - /// The factory name. - /// The cancellation token to use. - /// , or is null. - /// , or is an empty string, and was expected to be non-empty. - public Response Delete(string subscriptionId, string resourceGroupName, string factoryName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(factoryName, nameof(factoryName)); - - using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, factoryName); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 200: - case 204: - return message.Response; - default: - throw new RequestFailedException(message.Response); - } - } - - internal HttpMessage CreateGetGitHubAccessTokenRequest(string subscriptionId, string resourceGroupName, string factoryName, GitHubAccessTokenContent content) - { - var message = _pipeline.CreateMessage(); - var request = message.Request; - request.Method = RequestMethod.Post; - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendPath("/subscriptions/", false); - uri.AppendPath(subscriptionId, true); - uri.AppendPath("/resourceGroups/", false); - uri.AppendPath(resourceGroupName, true); - uri.AppendPath("/providers/Microsoft.DataFactory/factories/", false); - uri.AppendPath(factoryName, true); - uri.AppendPath("/getGitHubAccessToken", false); - uri.AppendQuery("api-version", _apiVersion, true); - request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - request.Headers.Add("Content-Type", "application/json"); - var content0 = new Utf8JsonRequestContent(); - content0.JsonWriter.WriteObjectValue(content); - request.Content = content0; - _userAgent.Apply(message); - return message; - } - - /// Get GitHub Access Token. - /// The subscription identifier. - /// The resource group name. - /// The factory name. - /// Get GitHub access token request definition. - /// The cancellation token to use. - /// , , or is null. - /// , or is an empty string, and was expected to be non-empty. - public async Task> GetGitHubAccessTokenAsync(string subscriptionId, string resourceGroupName, string factoryName, GitHubAccessTokenContent content, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(factoryName, nameof(factoryName)); - Argument.AssertNotNull(content, nameof(content)); - - using var message = CreateGetGitHubAccessTokenRequest(subscriptionId, resourceGroupName, factoryName, content); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - switch (message.Response.Status) - { - case 200: - { - GitHubAccessTokenResult value = default; - using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = GitHubAccessTokenResult.DeserializeGitHubAccessTokenResult(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - - /// Get GitHub Access Token. - /// The subscription identifier. - /// The resource group name. - /// The factory name. - /// Get GitHub access token request definition. - /// The cancellation token to use. - /// , , or is null. - /// , or is an empty string, and was expected to be non-empty. - public Response GetGitHubAccessToken(string subscriptionId, string resourceGroupName, string factoryName, GitHubAccessTokenContent content, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(factoryName, nameof(factoryName)); - Argument.AssertNotNull(content, nameof(content)); - - using var message = CreateGetGitHubAccessTokenRequest(subscriptionId, resourceGroupName, factoryName, content); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 200: - { - GitHubAccessTokenResult value = default; - using var document = JsonDocument.Parse(message.Response.ContentStream); - value = GitHubAccessTokenResult.DeserializeGitHubAccessTokenResult(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - - internal HttpMessage CreateGetDataPlaneAccessRequest(string subscriptionId, string resourceGroupName, string factoryName, DataFactoryDataPlaneUserAccessPolicy policy) - { - var message = _pipeline.CreateMessage(); - var request = message.Request; - request.Method = RequestMethod.Post; - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendPath("/subscriptions/", false); - uri.AppendPath(subscriptionId, true); - uri.AppendPath("/resourceGroups/", false); - uri.AppendPath(resourceGroupName, true); - uri.AppendPath("/providers/Microsoft.DataFactory/factories/", false); - uri.AppendPath(factoryName, true); - uri.AppendPath("/getDataPlaneAccess", false); - uri.AppendQuery("api-version", _apiVersion, true); - request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - request.Headers.Add("Content-Type", "application/json"); - var content = new Utf8JsonRequestContent(); - content.JsonWriter.WriteObjectValue(policy); - request.Content = content; - _userAgent.Apply(message); - return message; - } - - /// Get Data Plane access. - /// The subscription identifier. - /// The resource group name. - /// The factory name. - /// Data Plane user access policy definition. - /// The cancellation token to use. - /// , , or is null. - /// , or is an empty string, and was expected to be non-empty. - public async Task> GetDataPlaneAccessAsync(string subscriptionId, string resourceGroupName, string factoryName, DataFactoryDataPlaneUserAccessPolicy policy, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(factoryName, nameof(factoryName)); - Argument.AssertNotNull(policy, nameof(policy)); - - using var message = CreateGetDataPlaneAccessRequest(subscriptionId, resourceGroupName, factoryName, policy); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - switch (message.Response.Status) - { - case 200: - { - DataFactoryDataPlaneAccessPolicyResult value = default; - using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = DataFactoryDataPlaneAccessPolicyResult.DeserializeDataFactoryDataPlaneAccessPolicyResult(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - - /// Get Data Plane access. - /// The subscription identifier. - /// The resource group name. - /// The factory name. - /// Data Plane user access policy definition. - /// The cancellation token to use. - /// , , or is null. - /// , or is an empty string, and was expected to be non-empty. - public Response GetDataPlaneAccess(string subscriptionId, string resourceGroupName, string factoryName, DataFactoryDataPlaneUserAccessPolicy policy, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(factoryName, nameof(factoryName)); - Argument.AssertNotNull(policy, nameof(policy)); - - using var message = CreateGetDataPlaneAccessRequest(subscriptionId, resourceGroupName, factoryName, policy); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 200: - { - DataFactoryDataPlaneAccessPolicyResult value = default; - using var document = JsonDocument.Parse(message.Response.ContentStream); - value = DataFactoryDataPlaneAccessPolicyResult.DeserializeDataFactoryDataPlaneAccessPolicyResult(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - - internal HttpMessage CreateListNextPageRequest(string nextLink, string subscriptionId) - { - var message = _pipeline.CreateMessage(); - var request = message.Request; - request.Method = RequestMethod.Get; - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendRawNextLink(nextLink, false); - request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - _userAgent.Apply(message); - return message; - } - - /// Lists factories under the specified subscription. - /// The URL to the next page of results. - /// The subscription identifier. - /// The cancellation token to use. - /// or is null. - /// is an empty string, and was expected to be non-empty. - public async Task> ListNextPageAsync(string nextLink, string subscriptionId, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(nextLink, nameof(nextLink)); - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - - using var message = CreateListNextPageRequest(nextLink, subscriptionId); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - switch (message.Response.Status) - { - case 200: - { - DataFactoryListResult value = default; - using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = DataFactoryListResult.DeserializeDataFactoryListResult(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - - /// Lists factories under the specified subscription. - /// The URL to the next page of results. - /// The subscription identifier. - /// The cancellation token to use. - /// or is null. - /// is an empty string, and was expected to be non-empty. - public Response ListNextPage(string nextLink, string subscriptionId, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(nextLink, nameof(nextLink)); - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - - using var message = CreateListNextPageRequest(nextLink, subscriptionId); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 200: - { - DataFactoryListResult value = default; - using var document = JsonDocument.Parse(message.Response.ContentStream); - value = DataFactoryListResult.DeserializeDataFactoryListResult(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - - internal HttpMessage CreateListByResourceGroupNextPageRequest(string nextLink, string subscriptionId, string resourceGroupName) - { - var message = _pipeline.CreateMessage(); - var request = message.Request; - request.Method = RequestMethod.Get; - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendRawNextLink(nextLink, false); - request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - _userAgent.Apply(message); - return message; - } - - /// Lists factories. - /// The URL to the next page of results. - /// The subscription identifier. - /// The resource group name. - /// The cancellation token to use. - /// , or is null. - /// or is an empty string, and was expected to be non-empty. - public async Task> ListByResourceGroupNextPageAsync(string nextLink, string subscriptionId, string resourceGroupName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(nextLink, nameof(nextLink)); - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - - using var message = CreateListByResourceGroupNextPageRequest(nextLink, subscriptionId, resourceGroupName); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - switch (message.Response.Status) - { - case 200: - { - DataFactoryListResult value = default; - using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = DataFactoryListResult.DeserializeDataFactoryListResult(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - - /// Lists factories. - /// The URL to the next page of results. - /// The subscription identifier. - /// The resource group name. - /// The cancellation token to use. - /// , or is null. - /// or is an empty string, and was expected to be non-empty. - public Response ListByResourceGroupNextPage(string nextLink, string subscriptionId, string resourceGroupName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(nextLink, nameof(nextLink)); - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - - using var message = CreateListByResourceGroupNextPageRequest(nextLink, subscriptionId, resourceGroupName); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 200: - { - DataFactoryListResult value = default; - using var document = JsonDocument.Parse(message.Response.ContentStream); - value = DataFactoryListResult.DeserializeDataFactoryListResult(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/RestOperations/GlobalParametersRestOperations.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/RestOperations/GlobalParametersRestOperations.cs deleted file mode 100644 index 53c03d9e..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/RestOperations/GlobalParametersRestOperations.cs +++ /dev/null @@ -1,444 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; -using Azure.Core.Pipeline; -using AzureDataFactory.TestingFramework.Models; - -namespace Azure.ResourceManager.DataFactory -{ - internal partial class GlobalParametersRestOperations - { - private readonly TelemetryDetails _userAgent; - private readonly HttpPipeline _pipeline; - private readonly Uri _endpoint; - private readonly string _apiVersion; - - /// Initializes a new instance of GlobalParametersRestOperations. - /// The HTTP pipeline for sending and receiving REST requests and responses. - /// The application id to use for user agent. - /// server parameter. - /// Api Version. - /// or is null. - public GlobalParametersRestOperations(HttpPipeline pipeline, string applicationId, Uri endpoint = null, string apiVersion = default) - { - _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); - _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2018-06-01"; - _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); - } - - internal HttpMessage CreateListByFactoryRequest(string subscriptionId, string resourceGroupName, string factoryName) - { - var message = _pipeline.CreateMessage(); - var request = message.Request; - request.Method = RequestMethod.Get; - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendPath("/subscriptions/", false); - uri.AppendPath(subscriptionId, true); - uri.AppendPath("/resourceGroups/", false); - uri.AppendPath(resourceGroupName, true); - uri.AppendPath("/providers/Microsoft.DataFactory/factories/", false); - uri.AppendPath(factoryName, true); - uri.AppendPath("/globalParameters", false); - uri.AppendQuery("api-version", _apiVersion, true); - request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - _userAgent.Apply(message); - return message; - } - - /// Lists Global parameters. - /// The subscription identifier. - /// The resource group name. - /// The factory name. - /// The cancellation token to use. - /// , or is null. - /// , or is an empty string, and was expected to be non-empty. - public async Task> ListByFactoryAsync(string subscriptionId, string resourceGroupName, string factoryName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(factoryName, nameof(factoryName)); - - using var message = CreateListByFactoryRequest(subscriptionId, resourceGroupName, factoryName); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - switch (message.Response.Status) - { - case 200: - { - DataFactoryGlobalParameterListResult value = default; - using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = DataFactoryGlobalParameterListResult.DeserializeDataFactoryGlobalParameterListResult(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - - /// Lists Global parameters. - /// The subscription identifier. - /// The resource group name. - /// The factory name. - /// The cancellation token to use. - /// , or is null. - /// , or is an empty string, and was expected to be non-empty. - public Response ListByFactory(string subscriptionId, string resourceGroupName, string factoryName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(factoryName, nameof(factoryName)); - - using var message = CreateListByFactoryRequest(subscriptionId, resourceGroupName, factoryName); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 200: - { - DataFactoryGlobalParameterListResult value = default; - using var document = JsonDocument.Parse(message.Response.ContentStream); - value = DataFactoryGlobalParameterListResult.DeserializeDataFactoryGlobalParameterListResult(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - - internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGroupName, string factoryName, string globalParameterName) - { - var message = _pipeline.CreateMessage(); - var request = message.Request; - request.Method = RequestMethod.Get; - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendPath("/subscriptions/", false); - uri.AppendPath(subscriptionId, true); - uri.AppendPath("/resourceGroups/", false); - uri.AppendPath(resourceGroupName, true); - uri.AppendPath("/providers/Microsoft.DataFactory/factories/", false); - uri.AppendPath(factoryName, true); - uri.AppendPath("/globalParameters/", false); - uri.AppendPath(globalParameterName, true); - uri.AppendQuery("api-version", _apiVersion, true); - request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - _userAgent.Apply(message); - return message; - } - - /// Gets a Global parameter. - /// The subscription identifier. - /// The resource group name. - /// The factory name. - /// The global parameter name. - /// The cancellation token to use. - /// , , or is null. - /// , , or is an empty string, and was expected to be non-empty. - public async Task> GetAsync(string subscriptionId, string resourceGroupName, string factoryName, string globalParameterName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(factoryName, nameof(factoryName)); - Argument.AssertNotNullOrEmpty(globalParameterName, nameof(globalParameterName)); - - using var message = CreateGetRequest(subscriptionId, resourceGroupName, factoryName, globalParameterName); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - switch (message.Response.Status) - { - case 200: - { - DataFactoryGlobalParameterData value = default; - using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = DataFactoryGlobalParameterData.DeserializeDataFactoryGlobalParameterData(document.RootElement); - return Response.FromValue(value, message.Response); - } - case 404: - return Response.FromValue((DataFactoryGlobalParameterData)null, message.Response); - default: - throw new RequestFailedException(message.Response); - } - } - - /// Gets a Global parameter. - /// The subscription identifier. - /// The resource group name. - /// The factory name. - /// The global parameter name. - /// The cancellation token to use. - /// , , or is null. - /// , , or is an empty string, and was expected to be non-empty. - public Response Get(string subscriptionId, string resourceGroupName, string factoryName, string globalParameterName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(factoryName, nameof(factoryName)); - Argument.AssertNotNullOrEmpty(globalParameterName, nameof(globalParameterName)); - - using var message = CreateGetRequest(subscriptionId, resourceGroupName, factoryName, globalParameterName); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 200: - { - DataFactoryGlobalParameterData value = default; - using var document = JsonDocument.Parse(message.Response.ContentStream); - value = DataFactoryGlobalParameterData.DeserializeDataFactoryGlobalParameterData(document.RootElement); - return Response.FromValue(value, message.Response); - } - case 404: - return Response.FromValue((DataFactoryGlobalParameterData)null, message.Response); - default: - throw new RequestFailedException(message.Response); - } - } - - internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string resourceGroupName, string factoryName, string globalParameterName, DataFactoryGlobalParameterData data) - { - var message = _pipeline.CreateMessage(); - var request = message.Request; - request.Method = RequestMethod.Put; - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendPath("/subscriptions/", false); - uri.AppendPath(subscriptionId, true); - uri.AppendPath("/resourceGroups/", false); - uri.AppendPath(resourceGroupName, true); - uri.AppendPath("/providers/Microsoft.DataFactory/factories/", false); - uri.AppendPath(factoryName, true); - uri.AppendPath("/globalParameters/", false); - uri.AppendPath(globalParameterName, true); - uri.AppendQuery("api-version", _apiVersion, true); - request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - request.Headers.Add("Content-Type", "application/json"); - var content = new Utf8JsonRequestContent(); - content.JsonWriter.WriteObjectValue(data); - request.Content = content; - _userAgent.Apply(message); - return message; - } - - /// Creates or updates a Global parameter. - /// The subscription identifier. - /// The resource group name. - /// The factory name. - /// The global parameter name. - /// Global parameter resource definition. - /// The cancellation token to use. - /// , , , or is null. - /// , , or is an empty string, and was expected to be non-empty. - public async Task> CreateOrUpdateAsync(string subscriptionId, string resourceGroupName, string factoryName, string globalParameterName, DataFactoryGlobalParameterData data, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(factoryName, nameof(factoryName)); - Argument.AssertNotNullOrEmpty(globalParameterName, nameof(globalParameterName)); - Argument.AssertNotNull(data, nameof(data)); - - using var message = CreateCreateOrUpdateRequest(subscriptionId, resourceGroupName, factoryName, globalParameterName, data); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - switch (message.Response.Status) - { - case 200: - { - DataFactoryGlobalParameterData value = default; - using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = DataFactoryGlobalParameterData.DeserializeDataFactoryGlobalParameterData(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - - /// Creates or updates a Global parameter. - /// The subscription identifier. - /// The resource group name. - /// The factory name. - /// The global parameter name. - /// Global parameter resource definition. - /// The cancellation token to use. - /// , , , or is null. - /// , , or is an empty string, and was expected to be non-empty. - public Response CreateOrUpdate(string subscriptionId, string resourceGroupName, string factoryName, string globalParameterName, DataFactoryGlobalParameterData data, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(factoryName, nameof(factoryName)); - Argument.AssertNotNullOrEmpty(globalParameterName, nameof(globalParameterName)); - Argument.AssertNotNull(data, nameof(data)); - - using var message = CreateCreateOrUpdateRequest(subscriptionId, resourceGroupName, factoryName, globalParameterName, data); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 200: - { - DataFactoryGlobalParameterData value = default; - using var document = JsonDocument.Parse(message.Response.ContentStream); - value = DataFactoryGlobalParameterData.DeserializeDataFactoryGlobalParameterData(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - - internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceGroupName, string factoryName, string globalParameterName) - { - var message = _pipeline.CreateMessage(); - var request = message.Request; - request.Method = RequestMethod.Delete; - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendPath("/subscriptions/", false); - uri.AppendPath(subscriptionId, true); - uri.AppendPath("/resourceGroups/", false); - uri.AppendPath(resourceGroupName, true); - uri.AppendPath("/providers/Microsoft.DataFactory/factories/", false); - uri.AppendPath(factoryName, true); - uri.AppendPath("/globalParameters/", false); - uri.AppendPath(globalParameterName, true); - uri.AppendQuery("api-version", _apiVersion, true); - request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - _userAgent.Apply(message); - return message; - } - - /// Deletes a Global parameter. - /// The subscription identifier. - /// The resource group name. - /// The factory name. - /// The global parameter name. - /// The cancellation token to use. - /// , , or is null. - /// , , or is an empty string, and was expected to be non-empty. - public async Task DeleteAsync(string subscriptionId, string resourceGroupName, string factoryName, string globalParameterName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(factoryName, nameof(factoryName)); - Argument.AssertNotNullOrEmpty(globalParameterName, nameof(globalParameterName)); - - using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, factoryName, globalParameterName); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - switch (message.Response.Status) - { - case 200: - case 204: - return message.Response; - default: - throw new RequestFailedException(message.Response); - } - } - - /// Deletes a Global parameter. - /// The subscription identifier. - /// The resource group name. - /// The factory name. - /// The global parameter name. - /// The cancellation token to use. - /// , , or is null. - /// , , or is an empty string, and was expected to be non-empty. - public Response Delete(string subscriptionId, string resourceGroupName, string factoryName, string globalParameterName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(factoryName, nameof(factoryName)); - Argument.AssertNotNullOrEmpty(globalParameterName, nameof(globalParameterName)); - - using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, factoryName, globalParameterName); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 200: - case 204: - return message.Response; - default: - throw new RequestFailedException(message.Response); - } - } - - internal HttpMessage CreateListByFactoryNextPageRequest(string nextLink, string subscriptionId, string resourceGroupName, string factoryName) - { - var message = _pipeline.CreateMessage(); - var request = message.Request; - request.Method = RequestMethod.Get; - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendRawNextLink(nextLink, false); - request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - _userAgent.Apply(message); - return message; - } - - /// Lists Global parameters. - /// The URL to the next page of results. - /// The subscription identifier. - /// The resource group name. - /// The factory name. - /// The cancellation token to use. - /// , , or is null. - /// , or is an empty string, and was expected to be non-empty. - public async Task> ListByFactoryNextPageAsync(string nextLink, string subscriptionId, string resourceGroupName, string factoryName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(nextLink, nameof(nextLink)); - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(factoryName, nameof(factoryName)); - - using var message = CreateListByFactoryNextPageRequest(nextLink, subscriptionId, resourceGroupName, factoryName); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - switch (message.Response.Status) - { - case 200: - { - DataFactoryGlobalParameterListResult value = default; - using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = DataFactoryGlobalParameterListResult.DeserializeDataFactoryGlobalParameterListResult(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - - /// Lists Global parameters. - /// The URL to the next page of results. - /// The subscription identifier. - /// The resource group name. - /// The factory name. - /// The cancellation token to use. - /// , , or is null. - /// , or is an empty string, and was expected to be non-empty. - public Response ListByFactoryNextPage(string nextLink, string subscriptionId, string resourceGroupName, string factoryName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(nextLink, nameof(nextLink)); - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(factoryName, nameof(factoryName)); - - using var message = CreateListByFactoryNextPageRequest(nextLink, subscriptionId, resourceGroupName, factoryName); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 200: - { - DataFactoryGlobalParameterListResult value = default; - using var document = JsonDocument.Parse(message.Response.ContentStream); - value = DataFactoryGlobalParameterListResult.DeserializeDataFactoryGlobalParameterListResult(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/RestOperations/IntegrationRuntimeNodesRestOperations.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/RestOperations/IntegrationRuntimeNodesRestOperations.cs deleted file mode 100644 index 7693ffad..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/RestOperations/IntegrationRuntimeNodesRestOperations.cs +++ /dev/null @@ -1,394 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; -using Azure.Core.Pipeline; -using AzureDataFactory.TestingFramework.Models; - -namespace Azure.ResourceManager.DataFactory -{ - internal partial class IntegrationRuntimeNodesRestOperations - { - private readonly TelemetryDetails _userAgent; - private readonly HttpPipeline _pipeline; - private readonly Uri _endpoint; - private readonly string _apiVersion; - - /// Initializes a new instance of IntegrationRuntimeNodesRestOperations. - /// The HTTP pipeline for sending and receiving REST requests and responses. - /// The application id to use for user agent. - /// server parameter. - /// Api Version. - /// or is null. - public IntegrationRuntimeNodesRestOperations(HttpPipeline pipeline, string applicationId, Uri endpoint = null, string apiVersion = default) - { - _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); - _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2018-06-01"; - _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); - } - - internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGroupName, string factoryName, string integrationRuntimeName, string nodeName) - { - var message = _pipeline.CreateMessage(); - var request = message.Request; - request.Method = RequestMethod.Get; - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendPath("/subscriptions/", false); - uri.AppendPath(subscriptionId, true); - uri.AppendPath("/resourceGroups/", false); - uri.AppendPath(resourceGroupName, true); - uri.AppendPath("/providers/Microsoft.DataFactory/factories/", false); - uri.AppendPath(factoryName, true); - uri.AppendPath("/integrationRuntimes/", false); - uri.AppendPath(integrationRuntimeName, true); - uri.AppendPath("/nodes/", false); - uri.AppendPath(nodeName, true); - uri.AppendQuery("api-version", _apiVersion, true); - request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - _userAgent.Apply(message); - return message; - } - - /// Gets a self-hosted integration runtime node. - /// The subscription identifier. - /// The resource group name. - /// The factory name. - /// The integration runtime name. - /// The integration runtime node name. - /// The cancellation token to use. - /// , , , or is null. - /// , , , or is an empty string, and was expected to be non-empty. - public async Task> GetAsync(string subscriptionId, string resourceGroupName, string factoryName, string integrationRuntimeName, string nodeName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(factoryName, nameof(factoryName)); - Argument.AssertNotNullOrEmpty(integrationRuntimeName, nameof(integrationRuntimeName)); - Argument.AssertNotNullOrEmpty(nodeName, nameof(nodeName)); - - using var message = CreateGetRequest(subscriptionId, resourceGroupName, factoryName, integrationRuntimeName, nodeName); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - switch (message.Response.Status) - { - case 200: - { - SelfHostedIntegrationRuntimeNode value = default; - using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = SelfHostedIntegrationRuntimeNode.DeserializeSelfHostedIntegrationRuntimeNode(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - - /// Gets a self-hosted integration runtime node. - /// The subscription identifier. - /// The resource group name. - /// The factory name. - /// The integration runtime name. - /// The integration runtime node name. - /// The cancellation token to use. - /// , , , or is null. - /// , , , or is an empty string, and was expected to be non-empty. - public Response Get(string subscriptionId, string resourceGroupName, string factoryName, string integrationRuntimeName, string nodeName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(factoryName, nameof(factoryName)); - Argument.AssertNotNullOrEmpty(integrationRuntimeName, nameof(integrationRuntimeName)); - Argument.AssertNotNullOrEmpty(nodeName, nameof(nodeName)); - - using var message = CreateGetRequest(subscriptionId, resourceGroupName, factoryName, integrationRuntimeName, nodeName); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 200: - { - SelfHostedIntegrationRuntimeNode value = default; - using var document = JsonDocument.Parse(message.Response.ContentStream); - value = SelfHostedIntegrationRuntimeNode.DeserializeSelfHostedIntegrationRuntimeNode(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - - internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceGroupName, string factoryName, string integrationRuntimeName, string nodeName) - { - var message = _pipeline.CreateMessage(); - var request = message.Request; - request.Method = RequestMethod.Delete; - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendPath("/subscriptions/", false); - uri.AppendPath(subscriptionId, true); - uri.AppendPath("/resourceGroups/", false); - uri.AppendPath(resourceGroupName, true); - uri.AppendPath("/providers/Microsoft.DataFactory/factories/", false); - uri.AppendPath(factoryName, true); - uri.AppendPath("/integrationRuntimes/", false); - uri.AppendPath(integrationRuntimeName, true); - uri.AppendPath("/nodes/", false); - uri.AppendPath(nodeName, true); - uri.AppendQuery("api-version", _apiVersion, true); - request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - _userAgent.Apply(message); - return message; - } - - /// Deletes a self-hosted integration runtime node. - /// The subscription identifier. - /// The resource group name. - /// The factory name. - /// The integration runtime name. - /// The integration runtime node name. - /// The cancellation token to use. - /// , , , or is null. - /// , , , or is an empty string, and was expected to be non-empty. - public async Task DeleteAsync(string subscriptionId, string resourceGroupName, string factoryName, string integrationRuntimeName, string nodeName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(factoryName, nameof(factoryName)); - Argument.AssertNotNullOrEmpty(integrationRuntimeName, nameof(integrationRuntimeName)); - Argument.AssertNotNullOrEmpty(nodeName, nameof(nodeName)); - - using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, factoryName, integrationRuntimeName, nodeName); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - switch (message.Response.Status) - { - case 200: - case 204: - return message.Response; - default: - throw new RequestFailedException(message.Response); - } - } - - /// Deletes a self-hosted integration runtime node. - /// The subscription identifier. - /// The resource group name. - /// The factory name. - /// The integration runtime name. - /// The integration runtime node name. - /// The cancellation token to use. - /// , , , or is null. - /// , , , or is an empty string, and was expected to be non-empty. - public Response Delete(string subscriptionId, string resourceGroupName, string factoryName, string integrationRuntimeName, string nodeName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(factoryName, nameof(factoryName)); - Argument.AssertNotNullOrEmpty(integrationRuntimeName, nameof(integrationRuntimeName)); - Argument.AssertNotNullOrEmpty(nodeName, nameof(nodeName)); - - using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, factoryName, integrationRuntimeName, nodeName); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 200: - case 204: - return message.Response; - default: - throw new RequestFailedException(message.Response); - } - } - - internal HttpMessage CreateUpdateRequest(string subscriptionId, string resourceGroupName, string factoryName, string integrationRuntimeName, string nodeName, UpdateIntegrationRuntimeNodeContent content) - { - var message = _pipeline.CreateMessage(); - var request = message.Request; - request.Method = RequestMethod.Patch; - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendPath("/subscriptions/", false); - uri.AppendPath(subscriptionId, true); - uri.AppendPath("/resourceGroups/", false); - uri.AppendPath(resourceGroupName, true); - uri.AppendPath("/providers/Microsoft.DataFactory/factories/", false); - uri.AppendPath(factoryName, true); - uri.AppendPath("/integrationRuntimes/", false); - uri.AppendPath(integrationRuntimeName, true); - uri.AppendPath("/nodes/", false); - uri.AppendPath(nodeName, true); - uri.AppendQuery("api-version", _apiVersion, true); - request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - request.Headers.Add("Content-Type", "application/json"); - var content0 = new Utf8JsonRequestContent(); - content0.JsonWriter.WriteObjectValue(content); - request.Content = content0; - _userAgent.Apply(message); - return message; - } - - /// Updates a self-hosted integration runtime node. - /// The subscription identifier. - /// The resource group name. - /// The factory name. - /// The integration runtime name. - /// The integration runtime node name. - /// The parameters for updating an integration runtime node. - /// The cancellation token to use. - /// , , , , or is null. - /// , , , or is an empty string, and was expected to be non-empty. - public async Task> UpdateAsync(string subscriptionId, string resourceGroupName, string factoryName, string integrationRuntimeName, string nodeName, UpdateIntegrationRuntimeNodeContent content, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(factoryName, nameof(factoryName)); - Argument.AssertNotNullOrEmpty(integrationRuntimeName, nameof(integrationRuntimeName)); - Argument.AssertNotNullOrEmpty(nodeName, nameof(nodeName)); - Argument.AssertNotNull(content, nameof(content)); - - using var message = CreateUpdateRequest(subscriptionId, resourceGroupName, factoryName, integrationRuntimeName, nodeName, content); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - switch (message.Response.Status) - { - case 200: - { - SelfHostedIntegrationRuntimeNode value = default; - using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = SelfHostedIntegrationRuntimeNode.DeserializeSelfHostedIntegrationRuntimeNode(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - - /// Updates a self-hosted integration runtime node. - /// The subscription identifier. - /// The resource group name. - /// The factory name. - /// The integration runtime name. - /// The integration runtime node name. - /// The parameters for updating an integration runtime node. - /// The cancellation token to use. - /// , , , , or is null. - /// , , , or is an empty string, and was expected to be non-empty. - public Response Update(string subscriptionId, string resourceGroupName, string factoryName, string integrationRuntimeName, string nodeName, UpdateIntegrationRuntimeNodeContent content, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(factoryName, nameof(factoryName)); - Argument.AssertNotNullOrEmpty(integrationRuntimeName, nameof(integrationRuntimeName)); - Argument.AssertNotNullOrEmpty(nodeName, nameof(nodeName)); - Argument.AssertNotNull(content, nameof(content)); - - using var message = CreateUpdateRequest(subscriptionId, resourceGroupName, factoryName, integrationRuntimeName, nodeName, content); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 200: - { - SelfHostedIntegrationRuntimeNode value = default; - using var document = JsonDocument.Parse(message.Response.ContentStream); - value = SelfHostedIntegrationRuntimeNode.DeserializeSelfHostedIntegrationRuntimeNode(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - - internal HttpMessage CreateGetIPAddressRequest(string subscriptionId, string resourceGroupName, string factoryName, string integrationRuntimeName, string nodeName) - { - var message = _pipeline.CreateMessage(); - var request = message.Request; - request.Method = RequestMethod.Post; - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendPath("/subscriptions/", false); - uri.AppendPath(subscriptionId, true); - uri.AppendPath("/resourceGroups/", false); - uri.AppendPath(resourceGroupName, true); - uri.AppendPath("/providers/Microsoft.DataFactory/factories/", false); - uri.AppendPath(factoryName, true); - uri.AppendPath("/integrationRuntimes/", false); - uri.AppendPath(integrationRuntimeName, true); - uri.AppendPath("/nodes/", false); - uri.AppendPath(nodeName, true); - uri.AppendPath("/ipAddress", false); - uri.AppendQuery("api-version", _apiVersion, true); - request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - _userAgent.Apply(message); - return message; - } - - /// Get the IP address of self-hosted integration runtime node. - /// The subscription identifier. - /// The resource group name. - /// The factory name. - /// The integration runtime name. - /// The integration runtime node name. - /// The cancellation token to use. - /// , , , or is null. - /// , , , or is an empty string, and was expected to be non-empty. - public async Task> GetIPAddressAsync(string subscriptionId, string resourceGroupName, string factoryName, string integrationRuntimeName, string nodeName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(factoryName, nameof(factoryName)); - Argument.AssertNotNullOrEmpty(integrationRuntimeName, nameof(integrationRuntimeName)); - Argument.AssertNotNullOrEmpty(nodeName, nameof(nodeName)); - - using var message = CreateGetIPAddressRequest(subscriptionId, resourceGroupName, factoryName, integrationRuntimeName, nodeName); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - switch (message.Response.Status) - { - case 200: - { - IntegrationRuntimeNodeIPAddress value = default; - using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = IntegrationRuntimeNodeIPAddress.DeserializeIntegrationRuntimeNodeIPAddress(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - - /// Get the IP address of self-hosted integration runtime node. - /// The subscription identifier. - /// The resource group name. - /// The factory name. - /// The integration runtime name. - /// The integration runtime node name. - /// The cancellation token to use. - /// , , , or is null. - /// , , , or is an empty string, and was expected to be non-empty. - public Response GetIPAddress(string subscriptionId, string resourceGroupName, string factoryName, string integrationRuntimeName, string nodeName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(factoryName, nameof(factoryName)); - Argument.AssertNotNullOrEmpty(integrationRuntimeName, nameof(integrationRuntimeName)); - Argument.AssertNotNullOrEmpty(nodeName, nameof(nodeName)); - - using var message = CreateGetIPAddressRequest(subscriptionId, resourceGroupName, factoryName, integrationRuntimeName, nodeName); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 200: - { - IntegrationRuntimeNodeIPAddress value = default; - using var document = JsonDocument.Parse(message.Response.ContentStream); - value = IntegrationRuntimeNodeIPAddress.DeserializeIntegrationRuntimeNodeIPAddress(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/RestOperations/IntegrationRuntimeObjectMetadataRestOperations.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/RestOperations/IntegrationRuntimeObjectMetadataRestOperations.cs deleted file mode 100644 index 7124888d..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/RestOperations/IntegrationRuntimeObjectMetadataRestOperations.cs +++ /dev/null @@ -1,204 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; -using Azure.Core.Pipeline; -using AzureDataFactory.TestingFramework.Models; - -namespace Azure.ResourceManager.DataFactory -{ - internal partial class IntegrationRuntimeObjectMetadataRestOperations - { - private readonly TelemetryDetails _userAgent; - private readonly HttpPipeline _pipeline; - private readonly Uri _endpoint; - private readonly string _apiVersion; - - /// Initializes a new instance of IntegrationRuntimeObjectMetadataRestOperations. - /// The HTTP pipeline for sending and receiving REST requests and responses. - /// The application id to use for user agent. - /// server parameter. - /// Api Version. - /// or is null. - public IntegrationRuntimeObjectMetadataRestOperations(HttpPipeline pipeline, string applicationId, Uri endpoint = null, string apiVersion = default) - { - _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); - _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2018-06-01"; - _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); - } - - internal HttpMessage CreateRefreshRequest(string subscriptionId, string resourceGroupName, string factoryName, string integrationRuntimeName) - { - var message = _pipeline.CreateMessage(); - var request = message.Request; - request.Method = RequestMethod.Post; - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendPath("/subscriptions/", false); - uri.AppendPath(subscriptionId, true); - uri.AppendPath("/resourceGroups/", false); - uri.AppendPath(resourceGroupName, true); - uri.AppendPath("/providers/Microsoft.DataFactory/factories/", false); - uri.AppendPath(factoryName, true); - uri.AppendPath("/integrationRuntimes/", false); - uri.AppendPath(integrationRuntimeName, true); - uri.AppendPath("/refreshObjectMetadata", false); - uri.AppendQuery("api-version", _apiVersion, true); - request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - _userAgent.Apply(message); - return message; - } - - /// Refresh a SSIS integration runtime object metadata. - /// The subscription identifier. - /// The resource group name. - /// The factory name. - /// The integration runtime name. - /// The cancellation token to use. - /// , , or is null. - /// , , or is an empty string, and was expected to be non-empty. - public async Task RefreshAsync(string subscriptionId, string resourceGroupName, string factoryName, string integrationRuntimeName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(factoryName, nameof(factoryName)); - Argument.AssertNotNullOrEmpty(integrationRuntimeName, nameof(integrationRuntimeName)); - - using var message = CreateRefreshRequest(subscriptionId, resourceGroupName, factoryName, integrationRuntimeName); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - switch (message.Response.Status) - { - case 200: - case 202: - return message.Response; - default: - throw new RequestFailedException(message.Response); - } - } - - /// Refresh a SSIS integration runtime object metadata. - /// The subscription identifier. - /// The resource group name. - /// The factory name. - /// The integration runtime name. - /// The cancellation token to use. - /// , , or is null. - /// , , or is an empty string, and was expected to be non-empty. - public Response Refresh(string subscriptionId, string resourceGroupName, string factoryName, string integrationRuntimeName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(factoryName, nameof(factoryName)); - Argument.AssertNotNullOrEmpty(integrationRuntimeName, nameof(integrationRuntimeName)); - - using var message = CreateRefreshRequest(subscriptionId, resourceGroupName, factoryName, integrationRuntimeName); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 200: - case 202: - return message.Response; - default: - throw new RequestFailedException(message.Response); - } - } - - internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGroupName, string factoryName, string integrationRuntimeName, GetSsisObjectMetadataContent content) - { - var message = _pipeline.CreateMessage(); - var request = message.Request; - request.Method = RequestMethod.Post; - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendPath("/subscriptions/", false); - uri.AppendPath(subscriptionId, true); - uri.AppendPath("/resourceGroups/", false); - uri.AppendPath(resourceGroupName, true); - uri.AppendPath("/providers/Microsoft.DataFactory/factories/", false); - uri.AppendPath(factoryName, true); - uri.AppendPath("/integrationRuntimes/", false); - uri.AppendPath(integrationRuntimeName, true); - uri.AppendPath("/getObjectMetadata", false); - uri.AppendQuery("api-version", _apiVersion, true); - request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - if (content != null) - { - request.Headers.Add("Content-Type", "application/json"); - var content0 = new Utf8JsonRequestContent(); - content0.JsonWriter.WriteObjectValue(content); - request.Content = content0; - } - _userAgent.Apply(message); - return message; - } - - /// Get a SSIS integration runtime object metadata by specified path. The return is pageable metadata list. - /// The subscription identifier. - /// The resource group name. - /// The factory name. - /// The integration runtime name. - /// The parameters for getting a SSIS object metadata. - /// The cancellation token to use. - /// , , or is null. - /// , , or is an empty string, and was expected to be non-empty. - public async Task> GetAsync(string subscriptionId, string resourceGroupName, string factoryName, string integrationRuntimeName, GetSsisObjectMetadataContent content = null, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(factoryName, nameof(factoryName)); - Argument.AssertNotNullOrEmpty(integrationRuntimeName, nameof(integrationRuntimeName)); - - using var message = CreateGetRequest(subscriptionId, resourceGroupName, factoryName, integrationRuntimeName, content); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - switch (message.Response.Status) - { - case 200: - { - SsisObjectMetadataListResult value = default; - using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = SsisObjectMetadataListResult.DeserializeSsisObjectMetadataListResult(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - - /// Get a SSIS integration runtime object metadata by specified path. The return is pageable metadata list. - /// The subscription identifier. - /// The resource group name. - /// The factory name. - /// The integration runtime name. - /// The parameters for getting a SSIS object metadata. - /// The cancellation token to use. - /// , , or is null. - /// , , or is an empty string, and was expected to be non-empty. - public Response Get(string subscriptionId, string resourceGroupName, string factoryName, string integrationRuntimeName, GetSsisObjectMetadataContent content = null, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(factoryName, nameof(factoryName)); - Argument.AssertNotNullOrEmpty(integrationRuntimeName, nameof(integrationRuntimeName)); - - using var message = CreateGetRequest(subscriptionId, resourceGroupName, factoryName, integrationRuntimeName, content); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 200: - { - SsisObjectMetadataListResult value = default; - using var document = JsonDocument.Parse(message.Response.ContentStream); - value = SsisObjectMetadataListResult.DeserializeSsisObjectMetadataListResult(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/RestOperations/IntegrationRuntimesRestOperations.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/RestOperations/IntegrationRuntimesRestOperations.cs deleted file mode 100644 index c671b170..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/RestOperations/IntegrationRuntimesRestOperations.cs +++ /dev/null @@ -1,1548 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; -using Azure.Core.Pipeline; -using AzureDataFactory.TestingFramework.Models; - -namespace Azure.ResourceManager.DataFactory -{ - internal partial class IntegrationRuntimesRestOperations - { - private readonly TelemetryDetails _userAgent; - private readonly HttpPipeline _pipeline; - private readonly Uri _endpoint; - private readonly string _apiVersion; - - /// Initializes a new instance of IntegrationRuntimesRestOperations. - /// The HTTP pipeline for sending and receiving REST requests and responses. - /// The application id to use for user agent. - /// server parameter. - /// Api Version. - /// or is null. - public IntegrationRuntimesRestOperations(HttpPipeline pipeline, string applicationId, Uri endpoint = null, string apiVersion = default) - { - _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); - _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2018-06-01"; - _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); - } - - internal HttpMessage CreateListByFactoryRequest(string subscriptionId, string resourceGroupName, string factoryName) - { - var message = _pipeline.CreateMessage(); - var request = message.Request; - request.Method = RequestMethod.Get; - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendPath("/subscriptions/", false); - uri.AppendPath(subscriptionId, true); - uri.AppendPath("/resourceGroups/", false); - uri.AppendPath(resourceGroupName, true); - uri.AppendPath("/providers/Microsoft.DataFactory/factories/", false); - uri.AppendPath(factoryName, true); - uri.AppendPath("/integrationRuntimes", false); - uri.AppendQuery("api-version", _apiVersion, true); - request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - _userAgent.Apply(message); - return message; - } - - /// Lists integration runtimes. - /// The subscription identifier. - /// The resource group name. - /// The factory name. - /// The cancellation token to use. - /// , or is null. - /// , or is an empty string, and was expected to be non-empty. - public async Task> ListByFactoryAsync(string subscriptionId, string resourceGroupName, string factoryName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(factoryName, nameof(factoryName)); - - using var message = CreateListByFactoryRequest(subscriptionId, resourceGroupName, factoryName); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - switch (message.Response.Status) - { - case 200: - { - DataFactoryIntegrationRuntimeListResult value = default; - using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = DataFactoryIntegrationRuntimeListResult.DeserializeDataFactoryIntegrationRuntimeListResult(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - - /// Lists integration runtimes. - /// The subscription identifier. - /// The resource group name. - /// The factory name. - /// The cancellation token to use. - /// , or is null. - /// , or is an empty string, and was expected to be non-empty. - public Response ListByFactory(string subscriptionId, string resourceGroupName, string factoryName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(factoryName, nameof(factoryName)); - - using var message = CreateListByFactoryRequest(subscriptionId, resourceGroupName, factoryName); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 200: - { - DataFactoryIntegrationRuntimeListResult value = default; - using var document = JsonDocument.Parse(message.Response.ContentStream); - value = DataFactoryIntegrationRuntimeListResult.DeserializeDataFactoryIntegrationRuntimeListResult(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - - internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string resourceGroupName, string factoryName, string integrationRuntimeName, DataFactoryIntegrationRuntimeData data, string ifMatch) - { - var message = _pipeline.CreateMessage(); - var request = message.Request; - request.Method = RequestMethod.Put; - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendPath("/subscriptions/", false); - uri.AppendPath(subscriptionId, true); - uri.AppendPath("/resourceGroups/", false); - uri.AppendPath(resourceGroupName, true); - uri.AppendPath("/providers/Microsoft.DataFactory/factories/", false); - uri.AppendPath(factoryName, true); - uri.AppendPath("/integrationRuntimes/", false); - uri.AppendPath(integrationRuntimeName, true); - uri.AppendQuery("api-version", _apiVersion, true); - request.Uri = uri; - if (ifMatch != null) - { - request.Headers.Add("If-Match", ifMatch); - } - request.Headers.Add("Accept", "application/json"); - request.Headers.Add("Content-Type", "application/json"); - var content = new Utf8JsonRequestContent(); - content.JsonWriter.WriteObjectValue(data); - request.Content = content; - _userAgent.Apply(message); - return message; - } - - /// Creates or updates an integration runtime. - /// The subscription identifier. - /// The resource group name. - /// The factory name. - /// The integration runtime name. - /// Integration runtime resource definition. - /// ETag of the integration runtime entity. Should only be specified for update, for which it should match existing entity or can be * for unconditional update. - /// The cancellation token to use. - /// , , , or is null. - /// , , or is an empty string, and was expected to be non-empty. - public async Task> CreateOrUpdateAsync(string subscriptionId, string resourceGroupName, string factoryName, string integrationRuntimeName, DataFactoryIntegrationRuntimeData data, string ifMatch = null, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(factoryName, nameof(factoryName)); - Argument.AssertNotNullOrEmpty(integrationRuntimeName, nameof(integrationRuntimeName)); - Argument.AssertNotNull(data, nameof(data)); - - using var message = CreateCreateOrUpdateRequest(subscriptionId, resourceGroupName, factoryName, integrationRuntimeName, data, ifMatch); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - switch (message.Response.Status) - { - case 200: - { - DataFactoryIntegrationRuntimeData value = default; - using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = DataFactoryIntegrationRuntimeData.DeserializeDataFactoryIntegrationRuntimeData(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - - /// Creates or updates an integration runtime. - /// The subscription identifier. - /// The resource group name. - /// The factory name. - /// The integration runtime name. - /// Integration runtime resource definition. - /// ETag of the integration runtime entity. Should only be specified for update, for which it should match existing entity or can be * for unconditional update. - /// The cancellation token to use. - /// , , , or is null. - /// , , or is an empty string, and was expected to be non-empty. - public Response CreateOrUpdate(string subscriptionId, string resourceGroupName, string factoryName, string integrationRuntimeName, DataFactoryIntegrationRuntimeData data, string ifMatch = null, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(factoryName, nameof(factoryName)); - Argument.AssertNotNullOrEmpty(integrationRuntimeName, nameof(integrationRuntimeName)); - Argument.AssertNotNull(data, nameof(data)); - - using var message = CreateCreateOrUpdateRequest(subscriptionId, resourceGroupName, factoryName, integrationRuntimeName, data, ifMatch); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 200: - { - DataFactoryIntegrationRuntimeData value = default; - using var document = JsonDocument.Parse(message.Response.ContentStream); - value = DataFactoryIntegrationRuntimeData.DeserializeDataFactoryIntegrationRuntimeData(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - - internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGroupName, string factoryName, string integrationRuntimeName, string ifNoneMatch) - { - var message = _pipeline.CreateMessage(); - var request = message.Request; - request.Method = RequestMethod.Get; - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendPath("/subscriptions/", false); - uri.AppendPath(subscriptionId, true); - uri.AppendPath("/resourceGroups/", false); - uri.AppendPath(resourceGroupName, true); - uri.AppendPath("/providers/Microsoft.DataFactory/factories/", false); - uri.AppendPath(factoryName, true); - uri.AppendPath("/integrationRuntimes/", false); - uri.AppendPath(integrationRuntimeName, true); - uri.AppendQuery("api-version", _apiVersion, true); - request.Uri = uri; - if (ifNoneMatch != null) - { - request.Headers.Add("If-None-Match", ifNoneMatch); - } - request.Headers.Add("Accept", "application/json"); - _userAgent.Apply(message); - return message; - } - - /// Gets an integration runtime. - /// The subscription identifier. - /// The resource group name. - /// The factory name. - /// The integration runtime name. - /// ETag of the integration runtime entity. Should only be specified for get. If the ETag matches the existing entity tag, or if * was provided, then no content will be returned. - /// The cancellation token to use. - /// , , or is null. - /// , , or is an empty string, and was expected to be non-empty. - public async Task> GetAsync(string subscriptionId, string resourceGroupName, string factoryName, string integrationRuntimeName, string ifNoneMatch = null, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(factoryName, nameof(factoryName)); - Argument.AssertNotNullOrEmpty(integrationRuntimeName, nameof(integrationRuntimeName)); - - using var message = CreateGetRequest(subscriptionId, resourceGroupName, factoryName, integrationRuntimeName, ifNoneMatch); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - switch (message.Response.Status) - { - case 200: - { - DataFactoryIntegrationRuntimeData value = default; - using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = DataFactoryIntegrationRuntimeData.DeserializeDataFactoryIntegrationRuntimeData(document.RootElement); - return Response.FromValue(value, message.Response); - } - case 304: - case 404: - return Response.FromValue((DataFactoryIntegrationRuntimeData)null, message.Response); - default: - throw new RequestFailedException(message.Response); - } - } - - /// Gets an integration runtime. - /// The subscription identifier. - /// The resource group name. - /// The factory name. - /// The integration runtime name. - /// ETag of the integration runtime entity. Should only be specified for get. If the ETag matches the existing entity tag, or if * was provided, then no content will be returned. - /// The cancellation token to use. - /// , , or is null. - /// , , or is an empty string, and was expected to be non-empty. - public Response Get(string subscriptionId, string resourceGroupName, string factoryName, string integrationRuntimeName, string ifNoneMatch = null, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(factoryName, nameof(factoryName)); - Argument.AssertNotNullOrEmpty(integrationRuntimeName, nameof(integrationRuntimeName)); - - using var message = CreateGetRequest(subscriptionId, resourceGroupName, factoryName, integrationRuntimeName, ifNoneMatch); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 200: - { - DataFactoryIntegrationRuntimeData value = default; - using var document = JsonDocument.Parse(message.Response.ContentStream); - value = DataFactoryIntegrationRuntimeData.DeserializeDataFactoryIntegrationRuntimeData(document.RootElement); - return Response.FromValue(value, message.Response); - } - case 304: - case 404: - return Response.FromValue((DataFactoryIntegrationRuntimeData)null, message.Response); - default: - throw new RequestFailedException(message.Response); - } - } - - internal HttpMessage CreateUpdateRequest(string subscriptionId, string resourceGroupName, string factoryName, string integrationRuntimeName, DataFactoryIntegrationRuntimePatch patch) - { - var message = _pipeline.CreateMessage(); - var request = message.Request; - request.Method = RequestMethod.Patch; - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendPath("/subscriptions/", false); - uri.AppendPath(subscriptionId, true); - uri.AppendPath("/resourceGroups/", false); - uri.AppendPath(resourceGroupName, true); - uri.AppendPath("/providers/Microsoft.DataFactory/factories/", false); - uri.AppendPath(factoryName, true); - uri.AppendPath("/integrationRuntimes/", false); - uri.AppendPath(integrationRuntimeName, true); - uri.AppendQuery("api-version", _apiVersion, true); - request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - request.Headers.Add("Content-Type", "application/json"); - var content = new Utf8JsonRequestContent(); - content.JsonWriter.WriteObjectValue(patch); - request.Content = content; - _userAgent.Apply(message); - return message; - } - - /// Updates an integration runtime. - /// The subscription identifier. - /// The resource group name. - /// The factory name. - /// The integration runtime name. - /// The parameters for updating an integration runtime. - /// The cancellation token to use. - /// , , , or is null. - /// , , or is an empty string, and was expected to be non-empty. - public async Task> UpdateAsync(string subscriptionId, string resourceGroupName, string factoryName, string integrationRuntimeName, DataFactoryIntegrationRuntimePatch patch, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(factoryName, nameof(factoryName)); - Argument.AssertNotNullOrEmpty(integrationRuntimeName, nameof(integrationRuntimeName)); - Argument.AssertNotNull(patch, nameof(patch)); - - using var message = CreateUpdateRequest(subscriptionId, resourceGroupName, factoryName, integrationRuntimeName, patch); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - switch (message.Response.Status) - { - case 200: - { - DataFactoryIntegrationRuntimeData value = default; - using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = DataFactoryIntegrationRuntimeData.DeserializeDataFactoryIntegrationRuntimeData(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - - /// Updates an integration runtime. - /// The subscription identifier. - /// The resource group name. - /// The factory name. - /// The integration runtime name. - /// The parameters for updating an integration runtime. - /// The cancellation token to use. - /// , , , or is null. - /// , , or is an empty string, and was expected to be non-empty. - public Response Update(string subscriptionId, string resourceGroupName, string factoryName, string integrationRuntimeName, DataFactoryIntegrationRuntimePatch patch, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(factoryName, nameof(factoryName)); - Argument.AssertNotNullOrEmpty(integrationRuntimeName, nameof(integrationRuntimeName)); - Argument.AssertNotNull(patch, nameof(patch)); - - using var message = CreateUpdateRequest(subscriptionId, resourceGroupName, factoryName, integrationRuntimeName, patch); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 200: - { - DataFactoryIntegrationRuntimeData value = default; - using var document = JsonDocument.Parse(message.Response.ContentStream); - value = DataFactoryIntegrationRuntimeData.DeserializeDataFactoryIntegrationRuntimeData(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - - internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceGroupName, string factoryName, string integrationRuntimeName) - { - var message = _pipeline.CreateMessage(); - var request = message.Request; - request.Method = RequestMethod.Delete; - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendPath("/subscriptions/", false); - uri.AppendPath(subscriptionId, true); - uri.AppendPath("/resourceGroups/", false); - uri.AppendPath(resourceGroupName, true); - uri.AppendPath("/providers/Microsoft.DataFactory/factories/", false); - uri.AppendPath(factoryName, true); - uri.AppendPath("/integrationRuntimes/", false); - uri.AppendPath(integrationRuntimeName, true); - uri.AppendQuery("api-version", _apiVersion, true); - request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - _userAgent.Apply(message); - return message; - } - - /// Deletes an integration runtime. - /// The subscription identifier. - /// The resource group name. - /// The factory name. - /// The integration runtime name. - /// The cancellation token to use. - /// , , or is null. - /// , , or is an empty string, and was expected to be non-empty. - public async Task DeleteAsync(string subscriptionId, string resourceGroupName, string factoryName, string integrationRuntimeName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(factoryName, nameof(factoryName)); - Argument.AssertNotNullOrEmpty(integrationRuntimeName, nameof(integrationRuntimeName)); - - using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, factoryName, integrationRuntimeName); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - switch (message.Response.Status) - { - case 200: - case 204: - return message.Response; - default: - throw new RequestFailedException(message.Response); - } - } - - /// Deletes an integration runtime. - /// The subscription identifier. - /// The resource group name. - /// The factory name. - /// The integration runtime name. - /// The cancellation token to use. - /// , , or is null. - /// , , or is an empty string, and was expected to be non-empty. - public Response Delete(string subscriptionId, string resourceGroupName, string factoryName, string integrationRuntimeName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(factoryName, nameof(factoryName)); - Argument.AssertNotNullOrEmpty(integrationRuntimeName, nameof(integrationRuntimeName)); - - using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, factoryName, integrationRuntimeName); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 200: - case 204: - return message.Response; - default: - throw new RequestFailedException(message.Response); - } - } - - internal HttpMessage CreateGetStatusRequest(string subscriptionId, string resourceGroupName, string factoryName, string integrationRuntimeName) - { - var message = _pipeline.CreateMessage(); - var request = message.Request; - request.Method = RequestMethod.Post; - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendPath("/subscriptions/", false); - uri.AppendPath(subscriptionId, true); - uri.AppendPath("/resourceGroups/", false); - uri.AppendPath(resourceGroupName, true); - uri.AppendPath("/providers/Microsoft.DataFactory/factories/", false); - uri.AppendPath(factoryName, true); - uri.AppendPath("/integrationRuntimes/", false); - uri.AppendPath(integrationRuntimeName, true); - uri.AppendPath("/getStatus", false); - uri.AppendQuery("api-version", _apiVersion, true); - request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - _userAgent.Apply(message); - return message; - } - - /// Gets detailed status information for an integration runtime. - /// The subscription identifier. - /// The resource group name. - /// The factory name. - /// The integration runtime name. - /// The cancellation token to use. - /// , , or is null. - /// , , or is an empty string, and was expected to be non-empty. - public async Task> GetStatusAsync(string subscriptionId, string resourceGroupName, string factoryName, string integrationRuntimeName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(factoryName, nameof(factoryName)); - Argument.AssertNotNullOrEmpty(integrationRuntimeName, nameof(integrationRuntimeName)); - - using var message = CreateGetStatusRequest(subscriptionId, resourceGroupName, factoryName, integrationRuntimeName); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - switch (message.Response.Status) - { - case 200: - { - DataFactoryIntegrationRuntimeStatusResult value = default; - using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = DataFactoryIntegrationRuntimeStatusResult.DeserializeDataFactoryIntegrationRuntimeStatusResult(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - - /// Gets detailed status information for an integration runtime. - /// The subscription identifier. - /// The resource group name. - /// The factory name. - /// The integration runtime name. - /// The cancellation token to use. - /// , , or is null. - /// , , or is an empty string, and was expected to be non-empty. - public Response GetStatus(string subscriptionId, string resourceGroupName, string factoryName, string integrationRuntimeName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(factoryName, nameof(factoryName)); - Argument.AssertNotNullOrEmpty(integrationRuntimeName, nameof(integrationRuntimeName)); - - using var message = CreateGetStatusRequest(subscriptionId, resourceGroupName, factoryName, integrationRuntimeName); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 200: - { - DataFactoryIntegrationRuntimeStatusResult value = default; - using var document = JsonDocument.Parse(message.Response.ContentStream); - value = DataFactoryIntegrationRuntimeStatusResult.DeserializeDataFactoryIntegrationRuntimeStatusResult(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - - internal HttpMessage CreateListOutboundNetworkDependenciesEndpointsRequest(string subscriptionId, string resourceGroupName, string factoryName, string integrationRuntimeName) - { - var message = _pipeline.CreateMessage(); - var request = message.Request; - request.Method = RequestMethod.Get; - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendPath("/subscriptions/", false); - uri.AppendPath(subscriptionId, true); - uri.AppendPath("/resourceGroups/", false); - uri.AppendPath(resourceGroupName, true); - uri.AppendPath("/providers/Microsoft.DataFactory/factories/", false); - uri.AppendPath(factoryName, true); - uri.AppendPath("/integrationRuntimes/", false); - uri.AppendPath(integrationRuntimeName, true); - uri.AppendPath("/outboundNetworkDependenciesEndpoints", false); - uri.AppendQuery("api-version", _apiVersion, true); - request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - _userAgent.Apply(message); - return message; - } - - /// Gets the list of outbound network dependencies for a given Azure-SSIS integration runtime. - /// The subscription identifier. - /// The resource group name. - /// The factory name. - /// The integration runtime name. - /// The cancellation token to use. - /// , , or is null. - /// , , or is an empty string, and was expected to be non-empty. - public async Task> ListOutboundNetworkDependenciesEndpointsAsync(string subscriptionId, string resourceGroupName, string factoryName, string integrationRuntimeName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(factoryName, nameof(factoryName)); - Argument.AssertNotNullOrEmpty(integrationRuntimeName, nameof(integrationRuntimeName)); - - using var message = CreateListOutboundNetworkDependenciesEndpointsRequest(subscriptionId, resourceGroupName, factoryName, integrationRuntimeName); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - switch (message.Response.Status) - { - case 200: - { - IntegrationRuntimeOutboundNetworkDependenciesResult value = default; - using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = IntegrationRuntimeOutboundNetworkDependenciesResult.DeserializeIntegrationRuntimeOutboundNetworkDependenciesResult(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - - /// Gets the list of outbound network dependencies for a given Azure-SSIS integration runtime. - /// The subscription identifier. - /// The resource group name. - /// The factory name. - /// The integration runtime name. - /// The cancellation token to use. - /// , , or is null. - /// , , or is an empty string, and was expected to be non-empty. - public Response ListOutboundNetworkDependenciesEndpoints(string subscriptionId, string resourceGroupName, string factoryName, string integrationRuntimeName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(factoryName, nameof(factoryName)); - Argument.AssertNotNullOrEmpty(integrationRuntimeName, nameof(integrationRuntimeName)); - - using var message = CreateListOutboundNetworkDependenciesEndpointsRequest(subscriptionId, resourceGroupName, factoryName, integrationRuntimeName); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 200: - { - IntegrationRuntimeOutboundNetworkDependenciesResult value = default; - using var document = JsonDocument.Parse(message.Response.ContentStream); - value = IntegrationRuntimeOutboundNetworkDependenciesResult.DeserializeIntegrationRuntimeOutboundNetworkDependenciesResult(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - - internal HttpMessage CreateGetConnectionInfoRequest(string subscriptionId, string resourceGroupName, string factoryName, string integrationRuntimeName) - { - var message = _pipeline.CreateMessage(); - var request = message.Request; - request.Method = RequestMethod.Post; - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendPath("/subscriptions/", false); - uri.AppendPath(subscriptionId, true); - uri.AppendPath("/resourceGroups/", false); - uri.AppendPath(resourceGroupName, true); - uri.AppendPath("/providers/Microsoft.DataFactory/factories/", false); - uri.AppendPath(factoryName, true); - uri.AppendPath("/integrationRuntimes/", false); - uri.AppendPath(integrationRuntimeName, true); - uri.AppendPath("/getConnectionInfo", false); - uri.AppendQuery("api-version", _apiVersion, true); - request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - _userAgent.Apply(message); - return message; - } - - /// Gets the on-premises integration runtime connection information for encrypting the on-premises data source credentials. - /// The subscription identifier. - /// The resource group name. - /// The factory name. - /// The integration runtime name. - /// The cancellation token to use. - /// , , or is null. - /// , , or is an empty string, and was expected to be non-empty. - public async Task> GetConnectionInfoAsync(string subscriptionId, string resourceGroupName, string factoryName, string integrationRuntimeName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(factoryName, nameof(factoryName)); - Argument.AssertNotNullOrEmpty(integrationRuntimeName, nameof(integrationRuntimeName)); - - using var message = CreateGetConnectionInfoRequest(subscriptionId, resourceGroupName, factoryName, integrationRuntimeName); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - switch (message.Response.Status) - { - case 200: - { - IntegrationRuntimeConnectionInfo value = default; - using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = IntegrationRuntimeConnectionInfo.DeserializeIntegrationRuntimeConnectionInfo(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - - /// Gets the on-premises integration runtime connection information for encrypting the on-premises data source credentials. - /// The subscription identifier. - /// The resource group name. - /// The factory name. - /// The integration runtime name. - /// The cancellation token to use. - /// , , or is null. - /// , , or is an empty string, and was expected to be non-empty. - public Response GetConnectionInfo(string subscriptionId, string resourceGroupName, string factoryName, string integrationRuntimeName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(factoryName, nameof(factoryName)); - Argument.AssertNotNullOrEmpty(integrationRuntimeName, nameof(integrationRuntimeName)); - - using var message = CreateGetConnectionInfoRequest(subscriptionId, resourceGroupName, factoryName, integrationRuntimeName); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 200: - { - IntegrationRuntimeConnectionInfo value = default; - using var document = JsonDocument.Parse(message.Response.ContentStream); - value = IntegrationRuntimeConnectionInfo.DeserializeIntegrationRuntimeConnectionInfo(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - - internal HttpMessage CreateRegenerateAuthKeyRequest(string subscriptionId, string resourceGroupName, string factoryName, string integrationRuntimeName, IntegrationRuntimeRegenerateKeyContent content) - { - var message = _pipeline.CreateMessage(); - var request = message.Request; - request.Method = RequestMethod.Post; - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendPath("/subscriptions/", false); - uri.AppendPath(subscriptionId, true); - uri.AppendPath("/resourceGroups/", false); - uri.AppendPath(resourceGroupName, true); - uri.AppendPath("/providers/Microsoft.DataFactory/factories/", false); - uri.AppendPath(factoryName, true); - uri.AppendPath("/integrationRuntimes/", false); - uri.AppendPath(integrationRuntimeName, true); - uri.AppendPath("/regenerateAuthKey", false); - uri.AppendQuery("api-version", _apiVersion, true); - request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - request.Headers.Add("Content-Type", "application/json"); - var content0 = new Utf8JsonRequestContent(); - content0.JsonWriter.WriteObjectValue(content); - request.Content = content0; - _userAgent.Apply(message); - return message; - } - - /// Regenerates the authentication key for an integration runtime. - /// The subscription identifier. - /// The resource group name. - /// The factory name. - /// The integration runtime name. - /// The parameters for regenerating integration runtime authentication key. - /// The cancellation token to use. - /// , , , or is null. - /// , , or is an empty string, and was expected to be non-empty. - public async Task> RegenerateAuthKeyAsync(string subscriptionId, string resourceGroupName, string factoryName, string integrationRuntimeName, IntegrationRuntimeRegenerateKeyContent content, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(factoryName, nameof(factoryName)); - Argument.AssertNotNullOrEmpty(integrationRuntimeName, nameof(integrationRuntimeName)); - Argument.AssertNotNull(content, nameof(content)); - - using var message = CreateRegenerateAuthKeyRequest(subscriptionId, resourceGroupName, factoryName, integrationRuntimeName, content); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - switch (message.Response.Status) - { - case 200: - { - IntegrationRuntimeAuthKeys value = default; - using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = IntegrationRuntimeAuthKeys.DeserializeIntegrationRuntimeAuthKeys(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - - /// Regenerates the authentication key for an integration runtime. - /// The subscription identifier. - /// The resource group name. - /// The factory name. - /// The integration runtime name. - /// The parameters for regenerating integration runtime authentication key. - /// The cancellation token to use. - /// , , , or is null. - /// , , or is an empty string, and was expected to be non-empty. - public Response RegenerateAuthKey(string subscriptionId, string resourceGroupName, string factoryName, string integrationRuntimeName, IntegrationRuntimeRegenerateKeyContent content, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(factoryName, nameof(factoryName)); - Argument.AssertNotNullOrEmpty(integrationRuntimeName, nameof(integrationRuntimeName)); - Argument.AssertNotNull(content, nameof(content)); - - using var message = CreateRegenerateAuthKeyRequest(subscriptionId, resourceGroupName, factoryName, integrationRuntimeName, content); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 200: - { - IntegrationRuntimeAuthKeys value = default; - using var document = JsonDocument.Parse(message.Response.ContentStream); - value = IntegrationRuntimeAuthKeys.DeserializeIntegrationRuntimeAuthKeys(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - - internal HttpMessage CreateListAuthKeysRequest(string subscriptionId, string resourceGroupName, string factoryName, string integrationRuntimeName) - { - var message = _pipeline.CreateMessage(); - var request = message.Request; - request.Method = RequestMethod.Post; - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendPath("/subscriptions/", false); - uri.AppendPath(subscriptionId, true); - uri.AppendPath("/resourceGroups/", false); - uri.AppendPath(resourceGroupName, true); - uri.AppendPath("/providers/Microsoft.DataFactory/factories/", false); - uri.AppendPath(factoryName, true); - uri.AppendPath("/integrationRuntimes/", false); - uri.AppendPath(integrationRuntimeName, true); - uri.AppendPath("/listAuthKeys", false); - uri.AppendQuery("api-version", _apiVersion, true); - request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - _userAgent.Apply(message); - return message; - } - - /// Retrieves the authentication keys for an integration runtime. - /// The subscription identifier. - /// The resource group name. - /// The factory name. - /// The integration runtime name. - /// The cancellation token to use. - /// , , or is null. - /// , , or is an empty string, and was expected to be non-empty. - public async Task> ListAuthKeysAsync(string subscriptionId, string resourceGroupName, string factoryName, string integrationRuntimeName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(factoryName, nameof(factoryName)); - Argument.AssertNotNullOrEmpty(integrationRuntimeName, nameof(integrationRuntimeName)); - - using var message = CreateListAuthKeysRequest(subscriptionId, resourceGroupName, factoryName, integrationRuntimeName); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - switch (message.Response.Status) - { - case 200: - { - IntegrationRuntimeAuthKeys value = default; - using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = IntegrationRuntimeAuthKeys.DeserializeIntegrationRuntimeAuthKeys(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - - /// Retrieves the authentication keys for an integration runtime. - /// The subscription identifier. - /// The resource group name. - /// The factory name. - /// The integration runtime name. - /// The cancellation token to use. - /// , , or is null. - /// , , or is an empty string, and was expected to be non-empty. - public Response ListAuthKeys(string subscriptionId, string resourceGroupName, string factoryName, string integrationRuntimeName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(factoryName, nameof(factoryName)); - Argument.AssertNotNullOrEmpty(integrationRuntimeName, nameof(integrationRuntimeName)); - - using var message = CreateListAuthKeysRequest(subscriptionId, resourceGroupName, factoryName, integrationRuntimeName); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 200: - { - IntegrationRuntimeAuthKeys value = default; - using var document = JsonDocument.Parse(message.Response.ContentStream); - value = IntegrationRuntimeAuthKeys.DeserializeIntegrationRuntimeAuthKeys(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - - internal HttpMessage CreateStartRequest(string subscriptionId, string resourceGroupName, string factoryName, string integrationRuntimeName) - { - var message = _pipeline.CreateMessage(); - var request = message.Request; - request.Method = RequestMethod.Post; - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendPath("/subscriptions/", false); - uri.AppendPath(subscriptionId, true); - uri.AppendPath("/resourceGroups/", false); - uri.AppendPath(resourceGroupName, true); - uri.AppendPath("/providers/Microsoft.DataFactory/factories/", false); - uri.AppendPath(factoryName, true); - uri.AppendPath("/integrationRuntimes/", false); - uri.AppendPath(integrationRuntimeName, true); - uri.AppendPath("/start", false); - uri.AppendQuery("api-version", _apiVersion, true); - request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - _userAgent.Apply(message); - return message; - } - - /// Starts a ManagedReserved type integration runtime. - /// The subscription identifier. - /// The resource group name. - /// The factory name. - /// The integration runtime name. - /// The cancellation token to use. - /// , , or is null. - /// , , or is an empty string, and was expected to be non-empty. - public async Task StartAsync(string subscriptionId, string resourceGroupName, string factoryName, string integrationRuntimeName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(factoryName, nameof(factoryName)); - Argument.AssertNotNullOrEmpty(integrationRuntimeName, nameof(integrationRuntimeName)); - - using var message = CreateStartRequest(subscriptionId, resourceGroupName, factoryName, integrationRuntimeName); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - switch (message.Response.Status) - { - case 200: - case 202: - return message.Response; - default: - throw new RequestFailedException(message.Response); - } - } - - /// Starts a ManagedReserved type integration runtime. - /// The subscription identifier. - /// The resource group name. - /// The factory name. - /// The integration runtime name. - /// The cancellation token to use. - /// , , or is null. - /// , , or is an empty string, and was expected to be non-empty. - public Response Start(string subscriptionId, string resourceGroupName, string factoryName, string integrationRuntimeName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(factoryName, nameof(factoryName)); - Argument.AssertNotNullOrEmpty(integrationRuntimeName, nameof(integrationRuntimeName)); - - using var message = CreateStartRequest(subscriptionId, resourceGroupName, factoryName, integrationRuntimeName); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 200: - case 202: - return message.Response; - default: - throw new RequestFailedException(message.Response); - } - } - - internal HttpMessage CreateStopRequest(string subscriptionId, string resourceGroupName, string factoryName, string integrationRuntimeName) - { - var message = _pipeline.CreateMessage(); - var request = message.Request; - request.Method = RequestMethod.Post; - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendPath("/subscriptions/", false); - uri.AppendPath(subscriptionId, true); - uri.AppendPath("/resourceGroups/", false); - uri.AppendPath(resourceGroupName, true); - uri.AppendPath("/providers/Microsoft.DataFactory/factories/", false); - uri.AppendPath(factoryName, true); - uri.AppendPath("/integrationRuntimes/", false); - uri.AppendPath(integrationRuntimeName, true); - uri.AppendPath("/stop", false); - uri.AppendQuery("api-version", _apiVersion, true); - request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - _userAgent.Apply(message); - return message; - } - - /// Stops a ManagedReserved type integration runtime. - /// The subscription identifier. - /// The resource group name. - /// The factory name. - /// The integration runtime name. - /// The cancellation token to use. - /// , , or is null. - /// , , or is an empty string, and was expected to be non-empty. - public async Task StopAsync(string subscriptionId, string resourceGroupName, string factoryName, string integrationRuntimeName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(factoryName, nameof(factoryName)); - Argument.AssertNotNullOrEmpty(integrationRuntimeName, nameof(integrationRuntimeName)); - - using var message = CreateStopRequest(subscriptionId, resourceGroupName, factoryName, integrationRuntimeName); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - switch (message.Response.Status) - { - case 200: - case 202: - return message.Response; - default: - throw new RequestFailedException(message.Response); - } - } - - /// Stops a ManagedReserved type integration runtime. - /// The subscription identifier. - /// The resource group name. - /// The factory name. - /// The integration runtime name. - /// The cancellation token to use. - /// , , or is null. - /// , , or is an empty string, and was expected to be non-empty. - public Response Stop(string subscriptionId, string resourceGroupName, string factoryName, string integrationRuntimeName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(factoryName, nameof(factoryName)); - Argument.AssertNotNullOrEmpty(integrationRuntimeName, nameof(integrationRuntimeName)); - - using var message = CreateStopRequest(subscriptionId, resourceGroupName, factoryName, integrationRuntimeName); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 200: - case 202: - return message.Response; - default: - throw new RequestFailedException(message.Response); - } - } - - internal HttpMessage CreateSyncCredentialsRequest(string subscriptionId, string resourceGroupName, string factoryName, string integrationRuntimeName) - { - var message = _pipeline.CreateMessage(); - var request = message.Request; - request.Method = RequestMethod.Post; - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendPath("/subscriptions/", false); - uri.AppendPath(subscriptionId, true); - uri.AppendPath("/resourceGroups/", false); - uri.AppendPath(resourceGroupName, true); - uri.AppendPath("/providers/Microsoft.DataFactory/factories/", false); - uri.AppendPath(factoryName, true); - uri.AppendPath("/integrationRuntimes/", false); - uri.AppendPath(integrationRuntimeName, true); - uri.AppendPath("/syncCredentials", false); - uri.AppendQuery("api-version", _apiVersion, true); - request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - _userAgent.Apply(message); - return message; - } - - /// Force the integration runtime to synchronize credentials across integration runtime nodes, and this will override the credentials across all worker nodes with those available on the dispatcher node. If you already have the latest credential backup file, you should manually import it (preferred) on any self-hosted integration runtime node than using this API directly. - /// The subscription identifier. - /// The resource group name. - /// The factory name. - /// The integration runtime name. - /// The cancellation token to use. - /// , , or is null. - /// , , or is an empty string, and was expected to be non-empty. - public async Task SyncCredentialsAsync(string subscriptionId, string resourceGroupName, string factoryName, string integrationRuntimeName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(factoryName, nameof(factoryName)); - Argument.AssertNotNullOrEmpty(integrationRuntimeName, nameof(integrationRuntimeName)); - - using var message = CreateSyncCredentialsRequest(subscriptionId, resourceGroupName, factoryName, integrationRuntimeName); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - switch (message.Response.Status) - { - case 200: - return message.Response; - default: - throw new RequestFailedException(message.Response); - } - } - - /// Force the integration runtime to synchronize credentials across integration runtime nodes, and this will override the credentials across all worker nodes with those available on the dispatcher node. If you already have the latest credential backup file, you should manually import it (preferred) on any self-hosted integration runtime node than using this API directly. - /// The subscription identifier. - /// The resource group name. - /// The factory name. - /// The integration runtime name. - /// The cancellation token to use. - /// , , or is null. - /// , , or is an empty string, and was expected to be non-empty. - public Response SyncCredentials(string subscriptionId, string resourceGroupName, string factoryName, string integrationRuntimeName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(factoryName, nameof(factoryName)); - Argument.AssertNotNullOrEmpty(integrationRuntimeName, nameof(integrationRuntimeName)); - - using var message = CreateSyncCredentialsRequest(subscriptionId, resourceGroupName, factoryName, integrationRuntimeName); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 200: - return message.Response; - default: - throw new RequestFailedException(message.Response); - } - } - - internal HttpMessage CreateGetMonitoringDataRequest(string subscriptionId, string resourceGroupName, string factoryName, string integrationRuntimeName) - { - var message = _pipeline.CreateMessage(); - var request = message.Request; - request.Method = RequestMethod.Post; - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendPath("/subscriptions/", false); - uri.AppendPath(subscriptionId, true); - uri.AppendPath("/resourceGroups/", false); - uri.AppendPath(resourceGroupName, true); - uri.AppendPath("/providers/Microsoft.DataFactory/factories/", false); - uri.AppendPath(factoryName, true); - uri.AppendPath("/integrationRuntimes/", false); - uri.AppendPath(integrationRuntimeName, true); - uri.AppendPath("/monitoringData", false); - uri.AppendQuery("api-version", _apiVersion, true); - request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - _userAgent.Apply(message); - return message; - } - - /// Get the integration runtime monitoring data, which includes the monitor data for all the nodes under this integration runtime. - /// The subscription identifier. - /// The resource group name. - /// The factory name. - /// The integration runtime name. - /// The cancellation token to use. - /// , , or is null. - /// , , or is an empty string, and was expected to be non-empty. - public async Task> GetMonitoringDataAsync(string subscriptionId, string resourceGroupName, string factoryName, string integrationRuntimeName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(factoryName, nameof(factoryName)); - Argument.AssertNotNullOrEmpty(integrationRuntimeName, nameof(integrationRuntimeName)); - - using var message = CreateGetMonitoringDataRequest(subscriptionId, resourceGroupName, factoryName, integrationRuntimeName); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - switch (message.Response.Status) - { - case 200: - { - IntegrationRuntimeMonitoringData value = default; - using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = IntegrationRuntimeMonitoringData.DeserializeIntegrationRuntimeMonitoringData(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - - /// Get the integration runtime monitoring data, which includes the monitor data for all the nodes under this integration runtime. - /// The subscription identifier. - /// The resource group name. - /// The factory name. - /// The integration runtime name. - /// The cancellation token to use. - /// , , or is null. - /// , , or is an empty string, and was expected to be non-empty. - public Response GetMonitoringData(string subscriptionId, string resourceGroupName, string factoryName, string integrationRuntimeName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(factoryName, nameof(factoryName)); - Argument.AssertNotNullOrEmpty(integrationRuntimeName, nameof(integrationRuntimeName)); - - using var message = CreateGetMonitoringDataRequest(subscriptionId, resourceGroupName, factoryName, integrationRuntimeName); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 200: - { - IntegrationRuntimeMonitoringData value = default; - using var document = JsonDocument.Parse(message.Response.ContentStream); - value = IntegrationRuntimeMonitoringData.DeserializeIntegrationRuntimeMonitoringData(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - - internal HttpMessage CreateUpgradeRequest(string subscriptionId, string resourceGroupName, string factoryName, string integrationRuntimeName) - { - var message = _pipeline.CreateMessage(); - var request = message.Request; - request.Method = RequestMethod.Post; - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendPath("/subscriptions/", false); - uri.AppendPath(subscriptionId, true); - uri.AppendPath("/resourceGroups/", false); - uri.AppendPath(resourceGroupName, true); - uri.AppendPath("/providers/Microsoft.DataFactory/factories/", false); - uri.AppendPath(factoryName, true); - uri.AppendPath("/integrationRuntimes/", false); - uri.AppendPath(integrationRuntimeName, true); - uri.AppendPath("/upgrade", false); - uri.AppendQuery("api-version", _apiVersion, true); - request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - _userAgent.Apply(message); - return message; - } - - /// Upgrade self-hosted integration runtime to latest version if availability. - /// The subscription identifier. - /// The resource group name. - /// The factory name. - /// The integration runtime name. - /// The cancellation token to use. - /// , , or is null. - /// , , or is an empty string, and was expected to be non-empty. - public async Task UpgradeAsync(string subscriptionId, string resourceGroupName, string factoryName, string integrationRuntimeName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(factoryName, nameof(factoryName)); - Argument.AssertNotNullOrEmpty(integrationRuntimeName, nameof(integrationRuntimeName)); - - using var message = CreateUpgradeRequest(subscriptionId, resourceGroupName, factoryName, integrationRuntimeName); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - switch (message.Response.Status) - { - case 200: - return message.Response; - default: - throw new RequestFailedException(message.Response); - } - } - - /// Upgrade self-hosted integration runtime to latest version if availability. - /// The subscription identifier. - /// The resource group name. - /// The factory name. - /// The integration runtime name. - /// The cancellation token to use. - /// , , or is null. - /// , , or is an empty string, and was expected to be non-empty. - public Response Upgrade(string subscriptionId, string resourceGroupName, string factoryName, string integrationRuntimeName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(factoryName, nameof(factoryName)); - Argument.AssertNotNullOrEmpty(integrationRuntimeName, nameof(integrationRuntimeName)); - - using var message = CreateUpgradeRequest(subscriptionId, resourceGroupName, factoryName, integrationRuntimeName); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 200: - return message.Response; - default: - throw new RequestFailedException(message.Response); - } - } - - internal HttpMessage CreateRemoveLinksRequest(string subscriptionId, string resourceGroupName, string factoryName, string integrationRuntimeName, LinkedIntegrationRuntimeContent content) - { - var message = _pipeline.CreateMessage(); - var request = message.Request; - request.Method = RequestMethod.Post; - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendPath("/subscriptions/", false); - uri.AppendPath(subscriptionId, true); - uri.AppendPath("/resourceGroups/", false); - uri.AppendPath(resourceGroupName, true); - uri.AppendPath("/providers/Microsoft.DataFactory/factories/", false); - uri.AppendPath(factoryName, true); - uri.AppendPath("/integrationRuntimes/", false); - uri.AppendPath(integrationRuntimeName, true); - uri.AppendPath("/removeLinks", false); - uri.AppendQuery("api-version", _apiVersion, true); - request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - request.Headers.Add("Content-Type", "application/json"); - var content0 = new Utf8JsonRequestContent(); - content0.JsonWriter.WriteObjectValue(content); - request.Content = content0; - _userAgent.Apply(message); - return message; - } - - /// Remove all linked integration runtimes under specific data factory in a self-hosted integration runtime. - /// The subscription identifier. - /// The resource group name. - /// The factory name. - /// The integration runtime name. - /// The data factory name for the linked integration runtime. - /// The cancellation token to use. - /// , , , or is null. - /// , , or is an empty string, and was expected to be non-empty. - public async Task RemoveLinksAsync(string subscriptionId, string resourceGroupName, string factoryName, string integrationRuntimeName, LinkedIntegrationRuntimeContent content, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(factoryName, nameof(factoryName)); - Argument.AssertNotNullOrEmpty(integrationRuntimeName, nameof(integrationRuntimeName)); - Argument.AssertNotNull(content, nameof(content)); - - using var message = CreateRemoveLinksRequest(subscriptionId, resourceGroupName, factoryName, integrationRuntimeName, content); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - switch (message.Response.Status) - { - case 200: - return message.Response; - default: - throw new RequestFailedException(message.Response); - } - } - - /// Remove all linked integration runtimes under specific data factory in a self-hosted integration runtime. - /// The subscription identifier. - /// The resource group name. - /// The factory name. - /// The integration runtime name. - /// The data factory name for the linked integration runtime. - /// The cancellation token to use. - /// , , , or is null. - /// , , or is an empty string, and was expected to be non-empty. - public Response RemoveLinks(string subscriptionId, string resourceGroupName, string factoryName, string integrationRuntimeName, LinkedIntegrationRuntimeContent content, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(factoryName, nameof(factoryName)); - Argument.AssertNotNullOrEmpty(integrationRuntimeName, nameof(integrationRuntimeName)); - Argument.AssertNotNull(content, nameof(content)); - - using var message = CreateRemoveLinksRequest(subscriptionId, resourceGroupName, factoryName, integrationRuntimeName, content); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 200: - return message.Response; - default: - throw new RequestFailedException(message.Response); - } - } - - internal HttpMessage CreateCreateLinkedIntegrationRuntimeRequest(string subscriptionId, string resourceGroupName, string factoryName, string integrationRuntimeName, CreateLinkedIntegrationRuntimeContent content) - { - var message = _pipeline.CreateMessage(); - var request = message.Request; - request.Method = RequestMethod.Post; - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendPath("/subscriptions/", false); - uri.AppendPath(subscriptionId, true); - uri.AppendPath("/resourceGroups/", false); - uri.AppendPath(resourceGroupName, true); - uri.AppendPath("/providers/Microsoft.DataFactory/factories/", false); - uri.AppendPath(factoryName, true); - uri.AppendPath("/integrationRuntimes/", false); - uri.AppendPath(integrationRuntimeName, true); - uri.AppendPath("/linkedIntegrationRuntime", false); - uri.AppendQuery("api-version", _apiVersion, true); - request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - request.Headers.Add("Content-Type", "application/json"); - var content0 = new Utf8JsonRequestContent(); - content0.JsonWriter.WriteObjectValue(content); - request.Content = content0; - _userAgent.Apply(message); - return message; - } - - /// Create a linked integration runtime entry in a shared integration runtime. - /// The subscription identifier. - /// The resource group name. - /// The factory name. - /// The integration runtime name. - /// The linked integration runtime properties. - /// The cancellation token to use. - /// , , , or is null. - /// , , or is an empty string, and was expected to be non-empty. - public async Task> CreateLinkedIntegrationRuntimeAsync(string subscriptionId, string resourceGroupName, string factoryName, string integrationRuntimeName, CreateLinkedIntegrationRuntimeContent content, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(factoryName, nameof(factoryName)); - Argument.AssertNotNullOrEmpty(integrationRuntimeName, nameof(integrationRuntimeName)); - Argument.AssertNotNull(content, nameof(content)); - - using var message = CreateCreateLinkedIntegrationRuntimeRequest(subscriptionId, resourceGroupName, factoryName, integrationRuntimeName, content); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - switch (message.Response.Status) - { - case 200: - { - DataFactoryIntegrationRuntimeStatusResult value = default; - using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = DataFactoryIntegrationRuntimeStatusResult.DeserializeDataFactoryIntegrationRuntimeStatusResult(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - - /// Create a linked integration runtime entry in a shared integration runtime. - /// The subscription identifier. - /// The resource group name. - /// The factory name. - /// The integration runtime name. - /// The linked integration runtime properties. - /// The cancellation token to use. - /// , , , or is null. - /// , , or is an empty string, and was expected to be non-empty. - public Response CreateLinkedIntegrationRuntime(string subscriptionId, string resourceGroupName, string factoryName, string integrationRuntimeName, CreateLinkedIntegrationRuntimeContent content, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(factoryName, nameof(factoryName)); - Argument.AssertNotNullOrEmpty(integrationRuntimeName, nameof(integrationRuntimeName)); - Argument.AssertNotNull(content, nameof(content)); - - using var message = CreateCreateLinkedIntegrationRuntimeRequest(subscriptionId, resourceGroupName, factoryName, integrationRuntimeName, content); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 200: - { - DataFactoryIntegrationRuntimeStatusResult value = default; - using var document = JsonDocument.Parse(message.Response.ContentStream); - value = DataFactoryIntegrationRuntimeStatusResult.DeserializeDataFactoryIntegrationRuntimeStatusResult(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - - internal HttpMessage CreateListByFactoryNextPageRequest(string nextLink, string subscriptionId, string resourceGroupName, string factoryName) - { - var message = _pipeline.CreateMessage(); - var request = message.Request; - request.Method = RequestMethod.Get; - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendRawNextLink(nextLink, false); - request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - _userAgent.Apply(message); - return message; - } - - /// Lists integration runtimes. - /// The URL to the next page of results. - /// The subscription identifier. - /// The resource group name. - /// The factory name. - /// The cancellation token to use. - /// , , or is null. - /// , or is an empty string, and was expected to be non-empty. - public async Task> ListByFactoryNextPageAsync(string nextLink, string subscriptionId, string resourceGroupName, string factoryName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(nextLink, nameof(nextLink)); - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(factoryName, nameof(factoryName)); - - using var message = CreateListByFactoryNextPageRequest(nextLink, subscriptionId, resourceGroupName, factoryName); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - switch (message.Response.Status) - { - case 200: - { - DataFactoryIntegrationRuntimeListResult value = default; - using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = DataFactoryIntegrationRuntimeListResult.DeserializeDataFactoryIntegrationRuntimeListResult(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - - /// Lists integration runtimes. - /// The URL to the next page of results. - /// The subscription identifier. - /// The resource group name. - /// The factory name. - /// The cancellation token to use. - /// , , or is null. - /// , or is an empty string, and was expected to be non-empty. - public Response ListByFactoryNextPage(string nextLink, string subscriptionId, string resourceGroupName, string factoryName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(nextLink, nameof(nextLink)); - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(factoryName, nameof(factoryName)); - - using var message = CreateListByFactoryNextPageRequest(nextLink, subscriptionId, resourceGroupName, factoryName); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 200: - { - DataFactoryIntegrationRuntimeListResult value = default; - using var document = JsonDocument.Parse(message.Response.ContentStream); - value = DataFactoryIntegrationRuntimeListResult.DeserializeDataFactoryIntegrationRuntimeListResult(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/RestOperations/LinkedServicesRestOperations.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/RestOperations/LinkedServicesRestOperations.cs deleted file mode 100644 index 33e8c614..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/RestOperations/LinkedServicesRestOperations.cs +++ /dev/null @@ -1,458 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; -using Azure.Core.Pipeline; -using AzureDataFactory.TestingFramework.Models; - -namespace Azure.ResourceManager.DataFactory -{ - internal partial class LinkedServicesRestOperations - { - private readonly TelemetryDetails _userAgent; - private readonly HttpPipeline _pipeline; - private readonly Uri _endpoint; - private readonly string _apiVersion; - - /// Initializes a new instance of LinkedServicesRestOperations. - /// The HTTP pipeline for sending and receiving REST requests and responses. - /// The application id to use for user agent. - /// server parameter. - /// Api Version. - /// or is null. - public LinkedServicesRestOperations(HttpPipeline pipeline, string applicationId, Uri endpoint = null, string apiVersion = default) - { - _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); - _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2018-06-01"; - _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); - } - - internal HttpMessage CreateListByFactoryRequest(string subscriptionId, string resourceGroupName, string factoryName) - { - var message = _pipeline.CreateMessage(); - var request = message.Request; - request.Method = RequestMethod.Get; - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendPath("/subscriptions/", false); - uri.AppendPath(subscriptionId, true); - uri.AppendPath("/resourceGroups/", false); - uri.AppendPath(resourceGroupName, true); - uri.AppendPath("/providers/Microsoft.DataFactory/factories/", false); - uri.AppendPath(factoryName, true); - uri.AppendPath("/linkedservices", false); - uri.AppendQuery("api-version", _apiVersion, true); - request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - _userAgent.Apply(message); - return message; - } - - /// Lists linked services. - /// The subscription identifier. - /// The resource group name. - /// The factory name. - /// The cancellation token to use. - /// , or is null. - /// , or is an empty string, and was expected to be non-empty. - public async Task> ListByFactoryAsync(string subscriptionId, string resourceGroupName, string factoryName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(factoryName, nameof(factoryName)); - - using var message = CreateListByFactoryRequest(subscriptionId, resourceGroupName, factoryName); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - switch (message.Response.Status) - { - case 200: - { - DataFactoryLinkedServiceListResult value = default; - using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = DataFactoryLinkedServiceListResult.DeserializeDataFactoryLinkedServiceListResult(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - - /// Lists linked services. - /// The subscription identifier. - /// The resource group name. - /// The factory name. - /// The cancellation token to use. - /// , or is null. - /// , or is an empty string, and was expected to be non-empty. - public Response ListByFactory(string subscriptionId, string resourceGroupName, string factoryName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(factoryName, nameof(factoryName)); - - using var message = CreateListByFactoryRequest(subscriptionId, resourceGroupName, factoryName); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 200: - { - DataFactoryLinkedServiceListResult value = default; - using var document = JsonDocument.Parse(message.Response.ContentStream); - value = DataFactoryLinkedServiceListResult.DeserializeDataFactoryLinkedServiceListResult(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - - internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string resourceGroupName, string factoryName, string linkedServiceName, DataFactoryLinkedServiceData data, string ifMatch) - { - var message = _pipeline.CreateMessage(); - var request = message.Request; - request.Method = RequestMethod.Put; - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendPath("/subscriptions/", false); - uri.AppendPath(subscriptionId, true); - uri.AppendPath("/resourceGroups/", false); - uri.AppendPath(resourceGroupName, true); - uri.AppendPath("/providers/Microsoft.DataFactory/factories/", false); - uri.AppendPath(factoryName, true); - uri.AppendPath("/linkedservices/", false); - uri.AppendPath(linkedServiceName, true); - uri.AppendQuery("api-version", _apiVersion, true); - request.Uri = uri; - if (ifMatch != null) - { - request.Headers.Add("If-Match", ifMatch); - } - request.Headers.Add("Accept", "application/json"); - request.Headers.Add("Content-Type", "application/json"); - var content = new Utf8JsonRequestContent(); - content.JsonWriter.WriteObjectValue(data); - request.Content = content; - _userAgent.Apply(message); - return message; - } - - /// Creates or updates a linked service. - /// The subscription identifier. - /// The resource group name. - /// The factory name. - /// The linked service name. - /// Linked service resource definition. - /// ETag of the linkedService entity. Should only be specified for update, for which it should match existing entity or can be * for unconditional update. - /// The cancellation token to use. - /// , , , or is null. - /// , , or is an empty string, and was expected to be non-empty. - public async Task> CreateOrUpdateAsync(string subscriptionId, string resourceGroupName, string factoryName, string linkedServiceName, DataFactoryLinkedServiceData data, string ifMatch = null, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(factoryName, nameof(factoryName)); - Argument.AssertNotNullOrEmpty(linkedServiceName, nameof(linkedServiceName)); - Argument.AssertNotNull(data, nameof(data)); - - using var message = CreateCreateOrUpdateRequest(subscriptionId, resourceGroupName, factoryName, linkedServiceName, data, ifMatch); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - switch (message.Response.Status) - { - case 200: - { - DataFactoryLinkedServiceData value = default; - using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = DataFactoryLinkedServiceData.DeserializeDataFactoryLinkedServiceData(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - - /// Creates or updates a linked service. - /// The subscription identifier. - /// The resource group name. - /// The factory name. - /// The linked service name. - /// Linked service resource definition. - /// ETag of the linkedService entity. Should only be specified for update, for which it should match existing entity or can be * for unconditional update. - /// The cancellation token to use. - /// , , , or is null. - /// , , or is an empty string, and was expected to be non-empty. - public Response CreateOrUpdate(string subscriptionId, string resourceGroupName, string factoryName, string linkedServiceName, DataFactoryLinkedServiceData data, string ifMatch = null, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(factoryName, nameof(factoryName)); - Argument.AssertNotNullOrEmpty(linkedServiceName, nameof(linkedServiceName)); - Argument.AssertNotNull(data, nameof(data)); - - using var message = CreateCreateOrUpdateRequest(subscriptionId, resourceGroupName, factoryName, linkedServiceName, data, ifMatch); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 200: - { - DataFactoryLinkedServiceData value = default; - using var document = JsonDocument.Parse(message.Response.ContentStream); - value = DataFactoryLinkedServiceData.DeserializeDataFactoryLinkedServiceData(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - - internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGroupName, string factoryName, string linkedServiceName, string ifNoneMatch) - { - var message = _pipeline.CreateMessage(); - var request = message.Request; - request.Method = RequestMethod.Get; - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendPath("/subscriptions/", false); - uri.AppendPath(subscriptionId, true); - uri.AppendPath("/resourceGroups/", false); - uri.AppendPath(resourceGroupName, true); - uri.AppendPath("/providers/Microsoft.DataFactory/factories/", false); - uri.AppendPath(factoryName, true); - uri.AppendPath("/linkedservices/", false); - uri.AppendPath(linkedServiceName, true); - uri.AppendQuery("api-version", _apiVersion, true); - request.Uri = uri; - if (ifNoneMatch != null) - { - request.Headers.Add("If-None-Match", ifNoneMatch); - } - request.Headers.Add("Accept", "application/json"); - _userAgent.Apply(message); - return message; - } - - /// Gets a linked service. - /// The subscription identifier. - /// The resource group name. - /// The factory name. - /// The linked service name. - /// ETag of the linked service entity. Should only be specified for get. If the ETag matches the existing entity tag, or if * was provided, then no content will be returned. - /// The cancellation token to use. - /// , , or is null. - /// , , or is an empty string, and was expected to be non-empty. - public async Task> GetAsync(string subscriptionId, string resourceGroupName, string factoryName, string linkedServiceName, string ifNoneMatch = null, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(factoryName, nameof(factoryName)); - Argument.AssertNotNullOrEmpty(linkedServiceName, nameof(linkedServiceName)); - - using var message = CreateGetRequest(subscriptionId, resourceGroupName, factoryName, linkedServiceName, ifNoneMatch); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - switch (message.Response.Status) - { - case 200: - { - DataFactoryLinkedServiceData value = default; - using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = DataFactoryLinkedServiceData.DeserializeDataFactoryLinkedServiceData(document.RootElement); - return Response.FromValue(value, message.Response); - } - case 304: - case 404: - return Response.FromValue((DataFactoryLinkedServiceData)null, message.Response); - default: - throw new RequestFailedException(message.Response); - } - } - - /// Gets a linked service. - /// The subscription identifier. - /// The resource group name. - /// The factory name. - /// The linked service name. - /// ETag of the linked service entity. Should only be specified for get. If the ETag matches the existing entity tag, or if * was provided, then no content will be returned. - /// The cancellation token to use. - /// , , or is null. - /// , , or is an empty string, and was expected to be non-empty. - public Response Get(string subscriptionId, string resourceGroupName, string factoryName, string linkedServiceName, string ifNoneMatch = null, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(factoryName, nameof(factoryName)); - Argument.AssertNotNullOrEmpty(linkedServiceName, nameof(linkedServiceName)); - - using var message = CreateGetRequest(subscriptionId, resourceGroupName, factoryName, linkedServiceName, ifNoneMatch); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 200: - { - DataFactoryLinkedServiceData value = default; - using var document = JsonDocument.Parse(message.Response.ContentStream); - value = DataFactoryLinkedServiceData.DeserializeDataFactoryLinkedServiceData(document.RootElement); - return Response.FromValue(value, message.Response); - } - case 304: - case 404: - return Response.FromValue((DataFactoryLinkedServiceData)null, message.Response); - default: - throw new RequestFailedException(message.Response); - } - } - - internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceGroupName, string factoryName, string linkedServiceName) - { - var message = _pipeline.CreateMessage(); - var request = message.Request; - request.Method = RequestMethod.Delete; - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendPath("/subscriptions/", false); - uri.AppendPath(subscriptionId, true); - uri.AppendPath("/resourceGroups/", false); - uri.AppendPath(resourceGroupName, true); - uri.AppendPath("/providers/Microsoft.DataFactory/factories/", false); - uri.AppendPath(factoryName, true); - uri.AppendPath("/linkedservices/", false); - uri.AppendPath(linkedServiceName, true); - uri.AppendQuery("api-version", _apiVersion, true); - request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - _userAgent.Apply(message); - return message; - } - - /// Deletes a linked service. - /// The subscription identifier. - /// The resource group name. - /// The factory name. - /// The linked service name. - /// The cancellation token to use. - /// , , or is null. - /// , , or is an empty string, and was expected to be non-empty. - public async Task DeleteAsync(string subscriptionId, string resourceGroupName, string factoryName, string linkedServiceName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(factoryName, nameof(factoryName)); - Argument.AssertNotNullOrEmpty(linkedServiceName, nameof(linkedServiceName)); - - using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, factoryName, linkedServiceName); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - switch (message.Response.Status) - { - case 200: - case 204: - return message.Response; - default: - throw new RequestFailedException(message.Response); - } - } - - /// Deletes a linked service. - /// The subscription identifier. - /// The resource group name. - /// The factory name. - /// The linked service name. - /// The cancellation token to use. - /// , , or is null. - /// , , or is an empty string, and was expected to be non-empty. - public Response Delete(string subscriptionId, string resourceGroupName, string factoryName, string linkedServiceName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(factoryName, nameof(factoryName)); - Argument.AssertNotNullOrEmpty(linkedServiceName, nameof(linkedServiceName)); - - using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, factoryName, linkedServiceName); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 200: - case 204: - return message.Response; - default: - throw new RequestFailedException(message.Response); - } - } - - internal HttpMessage CreateListByFactoryNextPageRequest(string nextLink, string subscriptionId, string resourceGroupName, string factoryName) - { - var message = _pipeline.CreateMessage(); - var request = message.Request; - request.Method = RequestMethod.Get; - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendRawNextLink(nextLink, false); - request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - _userAgent.Apply(message); - return message; - } - - /// Lists linked services. - /// The URL to the next page of results. - /// The subscription identifier. - /// The resource group name. - /// The factory name. - /// The cancellation token to use. - /// , , or is null. - /// , or is an empty string, and was expected to be non-empty. - public async Task> ListByFactoryNextPageAsync(string nextLink, string subscriptionId, string resourceGroupName, string factoryName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(nextLink, nameof(nextLink)); - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(factoryName, nameof(factoryName)); - - using var message = CreateListByFactoryNextPageRequest(nextLink, subscriptionId, resourceGroupName, factoryName); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - switch (message.Response.Status) - { - case 200: - { - DataFactoryLinkedServiceListResult value = default; - using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = DataFactoryLinkedServiceListResult.DeserializeDataFactoryLinkedServiceListResult(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - - /// Lists linked services. - /// The URL to the next page of results. - /// The subscription identifier. - /// The resource group name. - /// The factory name. - /// The cancellation token to use. - /// , , or is null. - /// , or is an empty string, and was expected to be non-empty. - public Response ListByFactoryNextPage(string nextLink, string subscriptionId, string resourceGroupName, string factoryName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(nextLink, nameof(nextLink)); - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(factoryName, nameof(factoryName)); - - using var message = CreateListByFactoryNextPageRequest(nextLink, subscriptionId, resourceGroupName, factoryName); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 200: - { - DataFactoryLinkedServiceListResult value = default; - using var document = JsonDocument.Parse(message.Response.ContentStream); - value = DataFactoryLinkedServiceListResult.DeserializeDataFactoryLinkedServiceListResult(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/RestOperations/ManagedPrivateEndpointsRestOperations.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/RestOperations/ManagedPrivateEndpointsRestOperations.cs deleted file mode 100644 index 44a7e09e..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/RestOperations/ManagedPrivateEndpointsRestOperations.cs +++ /dev/null @@ -1,484 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; -using Azure.Core.Pipeline; -using AzureDataFactory.TestingFramework.Models; - -namespace Azure.ResourceManager.DataFactory -{ - internal partial class ManagedPrivateEndpointsRestOperations - { - private readonly TelemetryDetails _userAgent; - private readonly HttpPipeline _pipeline; - private readonly Uri _endpoint; - private readonly string _apiVersion; - - /// Initializes a new instance of ManagedPrivateEndpointsRestOperations. - /// The HTTP pipeline for sending and receiving REST requests and responses. - /// The application id to use for user agent. - /// server parameter. - /// Api Version. - /// or is null. - public ManagedPrivateEndpointsRestOperations(HttpPipeline pipeline, string applicationId, Uri endpoint = null, string apiVersion = default) - { - _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); - _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2018-06-01"; - _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); - } - - internal HttpMessage CreateListByFactoryRequest(string subscriptionId, string resourceGroupName, string factoryName, string managedVirtualNetworkName) - { - var message = _pipeline.CreateMessage(); - var request = message.Request; - request.Method = RequestMethod.Get; - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendPath("/subscriptions/", false); - uri.AppendPath(subscriptionId, true); - uri.AppendPath("/resourceGroups/", false); - uri.AppendPath(resourceGroupName, true); - uri.AppendPath("/providers/Microsoft.DataFactory/factories/", false); - uri.AppendPath(factoryName, true); - uri.AppendPath("/managedVirtualNetworks/", false); - uri.AppendPath(managedVirtualNetworkName, true); - uri.AppendPath("/managedPrivateEndpoints", false); - uri.AppendQuery("api-version", _apiVersion, true); - request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - _userAgent.Apply(message); - return message; - } - - /// Lists managed private endpoints. - /// The subscription identifier. - /// The resource group name. - /// The factory name. - /// Managed virtual network name. - /// The cancellation token to use. - /// , , or is null. - /// , , or is an empty string, and was expected to be non-empty. - public async Task> ListByFactoryAsync(string subscriptionId, string resourceGroupName, string factoryName, string managedVirtualNetworkName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(factoryName, nameof(factoryName)); - Argument.AssertNotNullOrEmpty(managedVirtualNetworkName, nameof(managedVirtualNetworkName)); - - using var message = CreateListByFactoryRequest(subscriptionId, resourceGroupName, factoryName, managedVirtualNetworkName); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - switch (message.Response.Status) - { - case 200: - { - DataFactoryPrivateEndpointListResult value = default; - using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = DataFactoryPrivateEndpointListResult.DeserializeDataFactoryPrivateEndpointListResult(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - - /// Lists managed private endpoints. - /// The subscription identifier. - /// The resource group name. - /// The factory name. - /// Managed virtual network name. - /// The cancellation token to use. - /// , , or is null. - /// , , or is an empty string, and was expected to be non-empty. - public Response ListByFactory(string subscriptionId, string resourceGroupName, string factoryName, string managedVirtualNetworkName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(factoryName, nameof(factoryName)); - Argument.AssertNotNullOrEmpty(managedVirtualNetworkName, nameof(managedVirtualNetworkName)); - - using var message = CreateListByFactoryRequest(subscriptionId, resourceGroupName, factoryName, managedVirtualNetworkName); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 200: - { - DataFactoryPrivateEndpointListResult value = default; - using var document = JsonDocument.Parse(message.Response.ContentStream); - value = DataFactoryPrivateEndpointListResult.DeserializeDataFactoryPrivateEndpointListResult(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - - internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string resourceGroupName, string factoryName, string managedVirtualNetworkName, string managedPrivateEndpointName, DataFactoryPrivateEndpointData data, string ifMatch) - { - var message = _pipeline.CreateMessage(); - var request = message.Request; - request.Method = RequestMethod.Put; - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendPath("/subscriptions/", false); - uri.AppendPath(subscriptionId, true); - uri.AppendPath("/resourceGroups/", false); - uri.AppendPath(resourceGroupName, true); - uri.AppendPath("/providers/Microsoft.DataFactory/factories/", false); - uri.AppendPath(factoryName, true); - uri.AppendPath("/managedVirtualNetworks/", false); - uri.AppendPath(managedVirtualNetworkName, true); - uri.AppendPath("/managedPrivateEndpoints/", false); - uri.AppendPath(managedPrivateEndpointName, true); - uri.AppendQuery("api-version", _apiVersion, true); - request.Uri = uri; - if (ifMatch != null) - { - request.Headers.Add("If-Match", ifMatch); - } - request.Headers.Add("Accept", "application/json"); - request.Headers.Add("Content-Type", "application/json"); - var content = new Utf8JsonRequestContent(); - content.JsonWriter.WriteObjectValue(data); - request.Content = content; - _userAgent.Apply(message); - return message; - } - - /// Creates or updates a managed private endpoint. - /// The subscription identifier. - /// The resource group name. - /// The factory name. - /// Managed virtual network name. - /// Managed private endpoint name. - /// Managed private endpoint resource definition. - /// ETag of the managed private endpoint entity. Should only be specified for update, for which it should match existing entity or can be * for unconditional update. - /// The cancellation token to use. - /// , , , , or is null. - /// , , , or is an empty string, and was expected to be non-empty. - public async Task> CreateOrUpdateAsync(string subscriptionId, string resourceGroupName, string factoryName, string managedVirtualNetworkName, string managedPrivateEndpointName, DataFactoryPrivateEndpointData data, string ifMatch = null, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(factoryName, nameof(factoryName)); - Argument.AssertNotNullOrEmpty(managedVirtualNetworkName, nameof(managedVirtualNetworkName)); - Argument.AssertNotNullOrEmpty(managedPrivateEndpointName, nameof(managedPrivateEndpointName)); - Argument.AssertNotNull(data, nameof(data)); - - using var message = CreateCreateOrUpdateRequest(subscriptionId, resourceGroupName, factoryName, managedVirtualNetworkName, managedPrivateEndpointName, data, ifMatch); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - switch (message.Response.Status) - { - case 200: - { - DataFactoryPrivateEndpointData value = default; - using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = DataFactoryPrivateEndpointData.DeserializeDataFactoryPrivateEndpointData(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - - /// Creates or updates a managed private endpoint. - /// The subscription identifier. - /// The resource group name. - /// The factory name. - /// Managed virtual network name. - /// Managed private endpoint name. - /// Managed private endpoint resource definition. - /// ETag of the managed private endpoint entity. Should only be specified for update, for which it should match existing entity or can be * for unconditional update. - /// The cancellation token to use. - /// , , , , or is null. - /// , , , or is an empty string, and was expected to be non-empty. - public Response CreateOrUpdate(string subscriptionId, string resourceGroupName, string factoryName, string managedVirtualNetworkName, string managedPrivateEndpointName, DataFactoryPrivateEndpointData data, string ifMatch = null, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(factoryName, nameof(factoryName)); - Argument.AssertNotNullOrEmpty(managedVirtualNetworkName, nameof(managedVirtualNetworkName)); - Argument.AssertNotNullOrEmpty(managedPrivateEndpointName, nameof(managedPrivateEndpointName)); - Argument.AssertNotNull(data, nameof(data)); - - using var message = CreateCreateOrUpdateRequest(subscriptionId, resourceGroupName, factoryName, managedVirtualNetworkName, managedPrivateEndpointName, data, ifMatch); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 200: - { - DataFactoryPrivateEndpointData value = default; - using var document = JsonDocument.Parse(message.Response.ContentStream); - value = DataFactoryPrivateEndpointData.DeserializeDataFactoryPrivateEndpointData(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - - internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGroupName, string factoryName, string managedVirtualNetworkName, string managedPrivateEndpointName, string ifNoneMatch) - { - var message = _pipeline.CreateMessage(); - var request = message.Request; - request.Method = RequestMethod.Get; - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendPath("/subscriptions/", false); - uri.AppendPath(subscriptionId, true); - uri.AppendPath("/resourceGroups/", false); - uri.AppendPath(resourceGroupName, true); - uri.AppendPath("/providers/Microsoft.DataFactory/factories/", false); - uri.AppendPath(factoryName, true); - uri.AppendPath("/managedVirtualNetworks/", false); - uri.AppendPath(managedVirtualNetworkName, true); - uri.AppendPath("/managedPrivateEndpoints/", false); - uri.AppendPath(managedPrivateEndpointName, true); - uri.AppendQuery("api-version", _apiVersion, true); - request.Uri = uri; - if (ifNoneMatch != null) - { - request.Headers.Add("If-None-Match", ifNoneMatch); - } - request.Headers.Add("Accept", "application/json"); - _userAgent.Apply(message); - return message; - } - - /// Gets a managed private endpoint. - /// The subscription identifier. - /// The resource group name. - /// The factory name. - /// Managed virtual network name. - /// Managed private endpoint name. - /// ETag of the managed private endpoint entity. Should only be specified for get. If the ETag matches the existing entity tag, or if * was provided, then no content will be returned. - /// The cancellation token to use. - /// , , , or is null. - /// , , , or is an empty string, and was expected to be non-empty. - public async Task> GetAsync(string subscriptionId, string resourceGroupName, string factoryName, string managedVirtualNetworkName, string managedPrivateEndpointName, string ifNoneMatch = null, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(factoryName, nameof(factoryName)); - Argument.AssertNotNullOrEmpty(managedVirtualNetworkName, nameof(managedVirtualNetworkName)); - Argument.AssertNotNullOrEmpty(managedPrivateEndpointName, nameof(managedPrivateEndpointName)); - - using var message = CreateGetRequest(subscriptionId, resourceGroupName, factoryName, managedVirtualNetworkName, managedPrivateEndpointName, ifNoneMatch); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - switch (message.Response.Status) - { - case 200: - { - DataFactoryPrivateEndpointData value = default; - using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = DataFactoryPrivateEndpointData.DeserializeDataFactoryPrivateEndpointData(document.RootElement); - return Response.FromValue(value, message.Response); - } - case 404: - return Response.FromValue((DataFactoryPrivateEndpointData)null, message.Response); - default: - throw new RequestFailedException(message.Response); - } - } - - /// Gets a managed private endpoint. - /// The subscription identifier. - /// The resource group name. - /// The factory name. - /// Managed virtual network name. - /// Managed private endpoint name. - /// ETag of the managed private endpoint entity. Should only be specified for get. If the ETag matches the existing entity tag, or if * was provided, then no content will be returned. - /// The cancellation token to use. - /// , , , or is null. - /// , , , or is an empty string, and was expected to be non-empty. - public Response Get(string subscriptionId, string resourceGroupName, string factoryName, string managedVirtualNetworkName, string managedPrivateEndpointName, string ifNoneMatch = null, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(factoryName, nameof(factoryName)); - Argument.AssertNotNullOrEmpty(managedVirtualNetworkName, nameof(managedVirtualNetworkName)); - Argument.AssertNotNullOrEmpty(managedPrivateEndpointName, nameof(managedPrivateEndpointName)); - - using var message = CreateGetRequest(subscriptionId, resourceGroupName, factoryName, managedVirtualNetworkName, managedPrivateEndpointName, ifNoneMatch); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 200: - { - DataFactoryPrivateEndpointData value = default; - using var document = JsonDocument.Parse(message.Response.ContentStream); - value = DataFactoryPrivateEndpointData.DeserializeDataFactoryPrivateEndpointData(document.RootElement); - return Response.FromValue(value, message.Response); - } - case 404: - return Response.FromValue((DataFactoryPrivateEndpointData)null, message.Response); - default: - throw new RequestFailedException(message.Response); - } - } - - internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceGroupName, string factoryName, string managedVirtualNetworkName, string managedPrivateEndpointName) - { - var message = _pipeline.CreateMessage(); - var request = message.Request; - request.Method = RequestMethod.Delete; - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendPath("/subscriptions/", false); - uri.AppendPath(subscriptionId, true); - uri.AppendPath("/resourceGroups/", false); - uri.AppendPath(resourceGroupName, true); - uri.AppendPath("/providers/Microsoft.DataFactory/factories/", false); - uri.AppendPath(factoryName, true); - uri.AppendPath("/managedVirtualNetworks/", false); - uri.AppendPath(managedVirtualNetworkName, true); - uri.AppendPath("/managedPrivateEndpoints/", false); - uri.AppendPath(managedPrivateEndpointName, true); - uri.AppendQuery("api-version", _apiVersion, true); - request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - _userAgent.Apply(message); - return message; - } - - /// Deletes a managed private endpoint. - /// The subscription identifier. - /// The resource group name. - /// The factory name. - /// Managed virtual network name. - /// Managed private endpoint name. - /// The cancellation token to use. - /// , , , or is null. - /// , , , or is an empty string, and was expected to be non-empty. - public async Task DeleteAsync(string subscriptionId, string resourceGroupName, string factoryName, string managedVirtualNetworkName, string managedPrivateEndpointName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(factoryName, nameof(factoryName)); - Argument.AssertNotNullOrEmpty(managedVirtualNetworkName, nameof(managedVirtualNetworkName)); - Argument.AssertNotNullOrEmpty(managedPrivateEndpointName, nameof(managedPrivateEndpointName)); - - using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, factoryName, managedVirtualNetworkName, managedPrivateEndpointName); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - switch (message.Response.Status) - { - case 200: - case 204: - return message.Response; - default: - throw new RequestFailedException(message.Response); - } - } - - /// Deletes a managed private endpoint. - /// The subscription identifier. - /// The resource group name. - /// The factory name. - /// Managed virtual network name. - /// Managed private endpoint name. - /// The cancellation token to use. - /// , , , or is null. - /// , , , or is an empty string, and was expected to be non-empty. - public Response Delete(string subscriptionId, string resourceGroupName, string factoryName, string managedVirtualNetworkName, string managedPrivateEndpointName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(factoryName, nameof(factoryName)); - Argument.AssertNotNullOrEmpty(managedVirtualNetworkName, nameof(managedVirtualNetworkName)); - Argument.AssertNotNullOrEmpty(managedPrivateEndpointName, nameof(managedPrivateEndpointName)); - - using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, factoryName, managedVirtualNetworkName, managedPrivateEndpointName); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 200: - case 204: - return message.Response; - default: - throw new RequestFailedException(message.Response); - } - } - - internal HttpMessage CreateListByFactoryNextPageRequest(string nextLink, string subscriptionId, string resourceGroupName, string factoryName, string managedVirtualNetworkName) - { - var message = _pipeline.CreateMessage(); - var request = message.Request; - request.Method = RequestMethod.Get; - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendRawNextLink(nextLink, false); - request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - _userAgent.Apply(message); - return message; - } - - /// Lists managed private endpoints. - /// The URL to the next page of results. - /// The subscription identifier. - /// The resource group name. - /// The factory name. - /// Managed virtual network name. - /// The cancellation token to use. - /// , , , or is null. - /// , , or is an empty string, and was expected to be non-empty. - public async Task> ListByFactoryNextPageAsync(string nextLink, string subscriptionId, string resourceGroupName, string factoryName, string managedVirtualNetworkName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(nextLink, nameof(nextLink)); - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(factoryName, nameof(factoryName)); - Argument.AssertNotNullOrEmpty(managedVirtualNetworkName, nameof(managedVirtualNetworkName)); - - using var message = CreateListByFactoryNextPageRequest(nextLink, subscriptionId, resourceGroupName, factoryName, managedVirtualNetworkName); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - switch (message.Response.Status) - { - case 200: - { - DataFactoryPrivateEndpointListResult value = default; - using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = DataFactoryPrivateEndpointListResult.DeserializeDataFactoryPrivateEndpointListResult(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - - /// Lists managed private endpoints. - /// The URL to the next page of results. - /// The subscription identifier. - /// The resource group name. - /// The factory name. - /// Managed virtual network name. - /// The cancellation token to use. - /// , , , or is null. - /// , , or is an empty string, and was expected to be non-empty. - public Response ListByFactoryNextPage(string nextLink, string subscriptionId, string resourceGroupName, string factoryName, string managedVirtualNetworkName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(nextLink, nameof(nextLink)); - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(factoryName, nameof(factoryName)); - Argument.AssertNotNullOrEmpty(managedVirtualNetworkName, nameof(managedVirtualNetworkName)); - - using var message = CreateListByFactoryNextPageRequest(nextLink, subscriptionId, resourceGroupName, factoryName, managedVirtualNetworkName); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 200: - { - DataFactoryPrivateEndpointListResult value = default; - using var document = JsonDocument.Parse(message.Response.ContentStream); - value = DataFactoryPrivateEndpointListResult.DeserializeDataFactoryPrivateEndpointListResult(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/RestOperations/ManagedVirtualNetworksRestOperations.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/RestOperations/ManagedVirtualNetworksRestOperations.cs deleted file mode 100644 index 776289cf..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/RestOperations/ManagedVirtualNetworksRestOperations.cs +++ /dev/null @@ -1,380 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; -using Azure.Core.Pipeline; -using AzureDataFactory.TestingFramework.Models; - -namespace Azure.ResourceManager.DataFactory -{ - internal partial class ManagedVirtualNetworksRestOperations - { - private readonly TelemetryDetails _userAgent; - private readonly HttpPipeline _pipeline; - private readonly Uri _endpoint; - private readonly string _apiVersion; - - /// Initializes a new instance of ManagedVirtualNetworksRestOperations. - /// The HTTP pipeline for sending and receiving REST requests and responses. - /// The application id to use for user agent. - /// server parameter. - /// Api Version. - /// or is null. - public ManagedVirtualNetworksRestOperations(HttpPipeline pipeline, string applicationId, Uri endpoint = null, string apiVersion = default) - { - _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); - _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2018-06-01"; - _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); - } - - internal HttpMessage CreateListByFactoryRequest(string subscriptionId, string resourceGroupName, string factoryName) - { - var message = _pipeline.CreateMessage(); - var request = message.Request; - request.Method = RequestMethod.Get; - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendPath("/subscriptions/", false); - uri.AppendPath(subscriptionId, true); - uri.AppendPath("/resourceGroups/", false); - uri.AppendPath(resourceGroupName, true); - uri.AppendPath("/providers/Microsoft.DataFactory/factories/", false); - uri.AppendPath(factoryName, true); - uri.AppendPath("/managedVirtualNetworks", false); - uri.AppendQuery("api-version", _apiVersion, true); - request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - _userAgent.Apply(message); - return message; - } - - /// Lists managed Virtual Networks. - /// The subscription identifier. - /// The resource group name. - /// The factory name. - /// The cancellation token to use. - /// , or is null. - /// , or is an empty string, and was expected to be non-empty. - public async Task> ListByFactoryAsync(string subscriptionId, string resourceGroupName, string factoryName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(factoryName, nameof(factoryName)); - - using var message = CreateListByFactoryRequest(subscriptionId, resourceGroupName, factoryName); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - switch (message.Response.Status) - { - case 200: - { - DataFactoryManagedVirtualNetworkListResult value = default; - using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = DataFactoryManagedVirtualNetworkListResult.DeserializeDataFactoryManagedVirtualNetworkListResult(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - - /// Lists managed Virtual Networks. - /// The subscription identifier. - /// The resource group name. - /// The factory name. - /// The cancellation token to use. - /// , or is null. - /// , or is an empty string, and was expected to be non-empty. - public Response ListByFactory(string subscriptionId, string resourceGroupName, string factoryName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(factoryName, nameof(factoryName)); - - using var message = CreateListByFactoryRequest(subscriptionId, resourceGroupName, factoryName); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 200: - { - DataFactoryManagedVirtualNetworkListResult value = default; - using var document = JsonDocument.Parse(message.Response.ContentStream); - value = DataFactoryManagedVirtualNetworkListResult.DeserializeDataFactoryManagedVirtualNetworkListResult(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - - internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string resourceGroupName, string factoryName, string managedVirtualNetworkName, DataFactoryManagedVirtualNetworkData data, string ifMatch) - { - var message = _pipeline.CreateMessage(); - var request = message.Request; - request.Method = RequestMethod.Put; - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendPath("/subscriptions/", false); - uri.AppendPath(subscriptionId, true); - uri.AppendPath("/resourceGroups/", false); - uri.AppendPath(resourceGroupName, true); - uri.AppendPath("/providers/Microsoft.DataFactory/factories/", false); - uri.AppendPath(factoryName, true); - uri.AppendPath("/managedVirtualNetworks/", false); - uri.AppendPath(managedVirtualNetworkName, true); - uri.AppendQuery("api-version", _apiVersion, true); - request.Uri = uri; - if (ifMatch != null) - { - request.Headers.Add("If-Match", ifMatch); - } - request.Headers.Add("Accept", "application/json"); - request.Headers.Add("Content-Type", "application/json"); - var content = new Utf8JsonRequestContent(); - content.JsonWriter.WriteObjectValue(data); - request.Content = content; - _userAgent.Apply(message); - return message; - } - - /// Creates or updates a managed Virtual Network. - /// The subscription identifier. - /// The resource group name. - /// The factory name. - /// Managed virtual network name. - /// Managed Virtual Network resource definition. - /// ETag of the managed Virtual Network entity. Should only be specified for update, for which it should match existing entity or can be * for unconditional update. - /// The cancellation token to use. - /// , , , or is null. - /// , , or is an empty string, and was expected to be non-empty. - public async Task> CreateOrUpdateAsync(string subscriptionId, string resourceGroupName, string factoryName, string managedVirtualNetworkName, DataFactoryManagedVirtualNetworkData data, string ifMatch = null, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(factoryName, nameof(factoryName)); - Argument.AssertNotNullOrEmpty(managedVirtualNetworkName, nameof(managedVirtualNetworkName)); - Argument.AssertNotNull(data, nameof(data)); - - using var message = CreateCreateOrUpdateRequest(subscriptionId, resourceGroupName, factoryName, managedVirtualNetworkName, data, ifMatch); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - switch (message.Response.Status) - { - case 200: - { - DataFactoryManagedVirtualNetworkData value = default; - using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = DataFactoryManagedVirtualNetworkData.DeserializeDataFactoryManagedVirtualNetworkData(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - - /// Creates or updates a managed Virtual Network. - /// The subscription identifier. - /// The resource group name. - /// The factory name. - /// Managed virtual network name. - /// Managed Virtual Network resource definition. - /// ETag of the managed Virtual Network entity. Should only be specified for update, for which it should match existing entity or can be * for unconditional update. - /// The cancellation token to use. - /// , , , or is null. - /// , , or is an empty string, and was expected to be non-empty. - public Response CreateOrUpdate(string subscriptionId, string resourceGroupName, string factoryName, string managedVirtualNetworkName, DataFactoryManagedVirtualNetworkData data, string ifMatch = null, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(factoryName, nameof(factoryName)); - Argument.AssertNotNullOrEmpty(managedVirtualNetworkName, nameof(managedVirtualNetworkName)); - Argument.AssertNotNull(data, nameof(data)); - - using var message = CreateCreateOrUpdateRequest(subscriptionId, resourceGroupName, factoryName, managedVirtualNetworkName, data, ifMatch); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 200: - { - DataFactoryManagedVirtualNetworkData value = default; - using var document = JsonDocument.Parse(message.Response.ContentStream); - value = DataFactoryManagedVirtualNetworkData.DeserializeDataFactoryManagedVirtualNetworkData(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - - internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGroupName, string factoryName, string managedVirtualNetworkName, string ifNoneMatch) - { - var message = _pipeline.CreateMessage(); - var request = message.Request; - request.Method = RequestMethod.Get; - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendPath("/subscriptions/", false); - uri.AppendPath(subscriptionId, true); - uri.AppendPath("/resourceGroups/", false); - uri.AppendPath(resourceGroupName, true); - uri.AppendPath("/providers/Microsoft.DataFactory/factories/", false); - uri.AppendPath(factoryName, true); - uri.AppendPath("/managedVirtualNetworks/", false); - uri.AppendPath(managedVirtualNetworkName, true); - uri.AppendQuery("api-version", _apiVersion, true); - request.Uri = uri; - if (ifNoneMatch != null) - { - request.Headers.Add("If-None-Match", ifNoneMatch); - } - request.Headers.Add("Accept", "application/json"); - _userAgent.Apply(message); - return message; - } - - /// Gets a managed Virtual Network. - /// The subscription identifier. - /// The resource group name. - /// The factory name. - /// Managed virtual network name. - /// ETag of the managed Virtual Network entity. Should only be specified for get. If the ETag matches the existing entity tag, or if * was provided, then no content will be returned. - /// The cancellation token to use. - /// , , or is null. - /// , , or is an empty string, and was expected to be non-empty. - public async Task> GetAsync(string subscriptionId, string resourceGroupName, string factoryName, string managedVirtualNetworkName, string ifNoneMatch = null, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(factoryName, nameof(factoryName)); - Argument.AssertNotNullOrEmpty(managedVirtualNetworkName, nameof(managedVirtualNetworkName)); - - using var message = CreateGetRequest(subscriptionId, resourceGroupName, factoryName, managedVirtualNetworkName, ifNoneMatch); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - switch (message.Response.Status) - { - case 200: - { - DataFactoryManagedVirtualNetworkData value = default; - using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = DataFactoryManagedVirtualNetworkData.DeserializeDataFactoryManagedVirtualNetworkData(document.RootElement); - return Response.FromValue(value, message.Response); - } - case 404: - return Response.FromValue((DataFactoryManagedVirtualNetworkData)null, message.Response); - default: - throw new RequestFailedException(message.Response); - } - } - - /// Gets a managed Virtual Network. - /// The subscription identifier. - /// The resource group name. - /// The factory name. - /// Managed virtual network name. - /// ETag of the managed Virtual Network entity. Should only be specified for get. If the ETag matches the existing entity tag, or if * was provided, then no content will be returned. - /// The cancellation token to use. - /// , , or is null. - /// , , or is an empty string, and was expected to be non-empty. - public Response Get(string subscriptionId, string resourceGroupName, string factoryName, string managedVirtualNetworkName, string ifNoneMatch = null, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(factoryName, nameof(factoryName)); - Argument.AssertNotNullOrEmpty(managedVirtualNetworkName, nameof(managedVirtualNetworkName)); - - using var message = CreateGetRequest(subscriptionId, resourceGroupName, factoryName, managedVirtualNetworkName, ifNoneMatch); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 200: - { - DataFactoryManagedVirtualNetworkData value = default; - using var document = JsonDocument.Parse(message.Response.ContentStream); - value = DataFactoryManagedVirtualNetworkData.DeserializeDataFactoryManagedVirtualNetworkData(document.RootElement); - return Response.FromValue(value, message.Response); - } - case 404: - return Response.FromValue((DataFactoryManagedVirtualNetworkData)null, message.Response); - default: - throw new RequestFailedException(message.Response); - } - } - - internal HttpMessage CreateListByFactoryNextPageRequest(string nextLink, string subscriptionId, string resourceGroupName, string factoryName) - { - var message = _pipeline.CreateMessage(); - var request = message.Request; - request.Method = RequestMethod.Get; - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendRawNextLink(nextLink, false); - request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - _userAgent.Apply(message); - return message; - } - - /// Lists managed Virtual Networks. - /// The URL to the next page of results. - /// The subscription identifier. - /// The resource group name. - /// The factory name. - /// The cancellation token to use. - /// , , or is null. - /// , or is an empty string, and was expected to be non-empty. - public async Task> ListByFactoryNextPageAsync(string nextLink, string subscriptionId, string resourceGroupName, string factoryName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(nextLink, nameof(nextLink)); - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(factoryName, nameof(factoryName)); - - using var message = CreateListByFactoryNextPageRequest(nextLink, subscriptionId, resourceGroupName, factoryName); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - switch (message.Response.Status) - { - case 200: - { - DataFactoryManagedVirtualNetworkListResult value = default; - using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = DataFactoryManagedVirtualNetworkListResult.DeserializeDataFactoryManagedVirtualNetworkListResult(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - - /// Lists managed Virtual Networks. - /// The URL to the next page of results. - /// The subscription identifier. - /// The resource group name. - /// The factory name. - /// The cancellation token to use. - /// , , or is null. - /// , or is an empty string, and was expected to be non-empty. - public Response ListByFactoryNextPage(string nextLink, string subscriptionId, string resourceGroupName, string factoryName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(nextLink, nameof(nextLink)); - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(factoryName, nameof(factoryName)); - - using var message = CreateListByFactoryNextPageRequest(nextLink, subscriptionId, resourceGroupName, factoryName); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 200: - { - DataFactoryManagedVirtualNetworkListResult value = default; - using var document = JsonDocument.Parse(message.Response.ContentStream); - value = DataFactoryManagedVirtualNetworkListResult.DeserializeDataFactoryManagedVirtualNetworkListResult(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/RestOperations/PipelineRunsRestOperations.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/RestOperations/PipelineRunsRestOperations.cs deleted file mode 100644 index daa4537c..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/RestOperations/PipelineRunsRestOperations.cs +++ /dev/null @@ -1,285 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; -using Azure.Core.Pipeline; -using AzureDataFactory.TestingFramework.Models; - -namespace Azure.ResourceManager.DataFactory -{ - internal partial class PipelineRunsRestOperations - { - private readonly TelemetryDetails _userAgent; - private readonly HttpPipeline _pipeline; - private readonly Uri _endpoint; - private readonly string _apiVersion; - - /// Initializes a new instance of PipelineRunsRestOperations. - /// The HTTP pipeline for sending and receiving REST requests and responses. - /// The application id to use for user agent. - /// server parameter. - /// Api Version. - /// or is null. - public PipelineRunsRestOperations(HttpPipeline pipeline, string applicationId, Uri endpoint = null, string apiVersion = default) - { - _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); - _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2018-06-01"; - _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); - } - - internal HttpMessage CreateQueryByFactoryRequest(string subscriptionId, string resourceGroupName, string factoryName, RunFilterContent content) - { - var message = _pipeline.CreateMessage(); - var request = message.Request; - request.Method = RequestMethod.Post; - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendPath("/subscriptions/", false); - uri.AppendPath(subscriptionId, true); - uri.AppendPath("/resourceGroups/", false); - uri.AppendPath(resourceGroupName, true); - uri.AppendPath("/providers/Microsoft.DataFactory/factories/", false); - uri.AppendPath(factoryName, true); - uri.AppendPath("/queryPipelineRuns", false); - uri.AppendQuery("api-version", _apiVersion, true); - request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - request.Headers.Add("Content-Type", "application/json"); - var content0 = new Utf8JsonRequestContent(); - content0.JsonWriter.WriteObjectValue(content); - request.Content = content0; - _userAgent.Apply(message); - return message; - } - - /// Query pipeline runs in the factory based on input filter conditions. - /// The subscription identifier. - /// The resource group name. - /// The factory name. - /// Parameters to filter the pipeline run. - /// The cancellation token to use. - /// , , or is null. - /// , or is an empty string, and was expected to be non-empty. - public async Task> QueryByFactoryAsync(string subscriptionId, string resourceGroupName, string factoryName, RunFilterContent content, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(factoryName, nameof(factoryName)); - Argument.AssertNotNull(content, nameof(content)); - - using var message = CreateQueryByFactoryRequest(subscriptionId, resourceGroupName, factoryName, content); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - switch (message.Response.Status) - { - case 200: - { - DataFactoryPipelineRunsQueryResult value = default; - using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = DataFactoryPipelineRunsQueryResult.DeserializeDataFactoryPipelineRunsQueryResult(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - - /// Query pipeline runs in the factory based on input filter conditions. - /// The subscription identifier. - /// The resource group name. - /// The factory name. - /// Parameters to filter the pipeline run. - /// The cancellation token to use. - /// , , or is null. - /// , or is an empty string, and was expected to be non-empty. - public Response QueryByFactory(string subscriptionId, string resourceGroupName, string factoryName, RunFilterContent content, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(factoryName, nameof(factoryName)); - Argument.AssertNotNull(content, nameof(content)); - - using var message = CreateQueryByFactoryRequest(subscriptionId, resourceGroupName, factoryName, content); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 200: - { - DataFactoryPipelineRunsQueryResult value = default; - using var document = JsonDocument.Parse(message.Response.ContentStream); - value = DataFactoryPipelineRunsQueryResult.DeserializeDataFactoryPipelineRunsQueryResult(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - - internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGroupName, string factoryName, string runId) - { - var message = _pipeline.CreateMessage(); - var request = message.Request; - request.Method = RequestMethod.Get; - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendPath("/subscriptions/", false); - uri.AppendPath(subscriptionId, true); - uri.AppendPath("/resourceGroups/", false); - uri.AppendPath(resourceGroupName, true); - uri.AppendPath("/providers/Microsoft.DataFactory/factories/", false); - uri.AppendPath(factoryName, true); - uri.AppendPath("/pipelineruns/", false); - uri.AppendPath(runId, true); - uri.AppendQuery("api-version", _apiVersion, true); - request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - _userAgent.Apply(message); - return message; - } - - /// Get a pipeline run by its run ID. - /// The subscription identifier. - /// The resource group name. - /// The factory name. - /// The pipeline run identifier. - /// The cancellation token to use. - /// , , or is null. - /// , , or is an empty string, and was expected to be non-empty. - public async Task> GetAsync(string subscriptionId, string resourceGroupName, string factoryName, string runId, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(factoryName, nameof(factoryName)); - Argument.AssertNotNullOrEmpty(runId, nameof(runId)); - - using var message = CreateGetRequest(subscriptionId, resourceGroupName, factoryName, runId); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - switch (message.Response.Status) - { - case 200: - { - DataFactoryPipelineRunInfo value = default; - using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = DataFactoryPipelineRunInfo.DeserializeDataFactoryPipelineRunInfo(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - - /// Get a pipeline run by its run ID. - /// The subscription identifier. - /// The resource group name. - /// The factory name. - /// The pipeline run identifier. - /// The cancellation token to use. - /// , , or is null. - /// , , or is an empty string, and was expected to be non-empty. - public Response Get(string subscriptionId, string resourceGroupName, string factoryName, string runId, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(factoryName, nameof(factoryName)); - Argument.AssertNotNullOrEmpty(runId, nameof(runId)); - - using var message = CreateGetRequest(subscriptionId, resourceGroupName, factoryName, runId); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 200: - { - DataFactoryPipelineRunInfo value = default; - using var document = JsonDocument.Parse(message.Response.ContentStream); - value = DataFactoryPipelineRunInfo.DeserializeDataFactoryPipelineRunInfo(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - - internal HttpMessage CreateCancelRequest(string subscriptionId, string resourceGroupName, string factoryName, string runId, bool? isRecursive) - { - var message = _pipeline.CreateMessage(); - var request = message.Request; - request.Method = RequestMethod.Post; - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendPath("/subscriptions/", false); - uri.AppendPath(subscriptionId, true); - uri.AppendPath("/resourceGroups/", false); - uri.AppendPath(resourceGroupName, true); - uri.AppendPath("/providers/Microsoft.DataFactory/factories/", false); - uri.AppendPath(factoryName, true); - uri.AppendPath("/pipelineruns/", false); - uri.AppendPath(runId, true); - uri.AppendPath("/cancel", false); - if (isRecursive != null) - { - uri.AppendQuery("isRecursive", isRecursive.Value, true); - } - uri.AppendQuery("api-version", _apiVersion, true); - request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - _userAgent.Apply(message); - return message; - } - - /// Cancel a pipeline run by its run ID. - /// The subscription identifier. - /// The resource group name. - /// The factory name. - /// The pipeline run identifier. - /// If true, cancel all the Child pipelines that are triggered by the current pipeline. - /// The cancellation token to use. - /// , , or is null. - /// , , or is an empty string, and was expected to be non-empty. - public async Task CancelAsync(string subscriptionId, string resourceGroupName, string factoryName, string runId, bool? isRecursive = null, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(factoryName, nameof(factoryName)); - Argument.AssertNotNullOrEmpty(runId, nameof(runId)); - - using var message = CreateCancelRequest(subscriptionId, resourceGroupName, factoryName, runId, isRecursive); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - switch (message.Response.Status) - { - case 200: - return message.Response; - default: - throw new RequestFailedException(message.Response); - } - } - - /// Cancel a pipeline run by its run ID. - /// The subscription identifier. - /// The resource group name. - /// The factory name. - /// The pipeline run identifier. - /// If true, cancel all the Child pipelines that are triggered by the current pipeline. - /// The cancellation token to use. - /// , , or is null. - /// , , or is an empty string, and was expected to be non-empty. - public Response Cancel(string subscriptionId, string resourceGroupName, string factoryName, string runId, bool? isRecursive = null, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(factoryName, nameof(factoryName)); - Argument.AssertNotNullOrEmpty(runId, nameof(runId)); - - using var message = CreateCancelRequest(subscriptionId, resourceGroupName, factoryName, runId, isRecursive); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 200: - return message.Response; - default: - throw new RequestFailedException(message.Response); - } - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/RestOperations/PipelinesRestOperations.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/RestOperations/PipelinesRestOperations.cs deleted file mode 100644 index 7a99d5ce..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/RestOperations/PipelinesRestOperations.cs +++ /dev/null @@ -1,592 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; -using Azure.Core.Expressions.DataFactory; -using Azure.Core.Pipeline; -using AzureDataFactory.TestingFramework.Models; - -namespace Azure.ResourceManager.DataFactory -{ - internal partial class PipelinesRestOperations - { - private readonly TelemetryDetails _userAgent; - private readonly HttpPipeline _pipeline; - private readonly Uri _endpoint; - private readonly string _apiVersion; - - /// Initializes a new instance of PipelinesRestOperations. - /// The HTTP pipeline for sending and receiving REST requests and responses. - /// The application id to use for user agent. - /// server parameter. - /// Api Version. - /// or is null. - public PipelinesRestOperations(HttpPipeline pipeline, string applicationId, Uri endpoint = null, string apiVersion = default) - { - _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); - _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2018-06-01"; - _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); - } - - internal HttpMessage CreateListByFactoryRequest(string subscriptionId, string resourceGroupName, string factoryName) - { - var message = _pipeline.CreateMessage(); - var request = message.Request; - request.Method = RequestMethod.Get; - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendPath("/subscriptions/", false); - uri.AppendPath(subscriptionId, true); - uri.AppendPath("/resourceGroups/", false); - uri.AppendPath(resourceGroupName, true); - uri.AppendPath("/providers/Microsoft.DataFactory/factories/", false); - uri.AppendPath(factoryName, true); - uri.AppendPath("/pipelines", false); - uri.AppendQuery("api-version", _apiVersion, true); - request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - _userAgent.Apply(message); - return message; - } - - /// Lists pipelines. - /// The subscription identifier. - /// The resource group name. - /// The factory name. - /// The cancellation token to use. - /// , or is null. - /// , or is an empty string, and was expected to be non-empty. - public async Task> ListByFactoryAsync(string subscriptionId, string resourceGroupName, string factoryName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(factoryName, nameof(factoryName)); - - using var message = CreateListByFactoryRequest(subscriptionId, resourceGroupName, factoryName); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - switch (message.Response.Status) - { - case 200: - { - DataFactoryPipelineListResult value = default; - using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = DataFactoryPipelineListResult.DeserializeDataFactoryPipelineListResult(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - - /// Lists pipelines. - /// The subscription identifier. - /// The resource group name. - /// The factory name. - /// The cancellation token to use. - /// , or is null. - /// , or is an empty string, and was expected to be non-empty. - public Response ListByFactory(string subscriptionId, string resourceGroupName, string factoryName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(factoryName, nameof(factoryName)); - - using var message = CreateListByFactoryRequest(subscriptionId, resourceGroupName, factoryName); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 200: - { - DataFactoryPipelineListResult value = default; - using var document = JsonDocument.Parse(message.Response.ContentStream); - value = DataFactoryPipelineListResult.DeserializeDataFactoryPipelineListResult(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - - internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string resourceGroupName, string factoryName, string pipelineName, Pipeline data, string ifMatch) - { - var message = _pipeline.CreateMessage(); - var request = message.Request; - request.Method = RequestMethod.Put; - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendPath("/subscriptions/", false); - uri.AppendPath(subscriptionId, true); - uri.AppendPath("/resourceGroups/", false); - uri.AppendPath(resourceGroupName, true); - uri.AppendPath("/providers/Microsoft.DataFactory/factories/", false); - uri.AppendPath(factoryName, true); - uri.AppendPath("/pipelines/", false); - uri.AppendPath(pipelineName, true); - uri.AppendQuery("api-version", _apiVersion, true); - request.Uri = uri; - if (ifMatch != null) - { - request.Headers.Add("If-Match", ifMatch); - } - request.Headers.Add("Accept", "application/json"); - request.Headers.Add("Content-Type", "application/json"); - var content = new Utf8JsonRequestContent(); - content.JsonWriter.WriteObjectValue(data); - request.Content = content; - _userAgent.Apply(message); - return message; - } - - /// Creates or updates a pipeline. - /// The subscription identifier. - /// The resource group name. - /// The factory name. - /// The pipeline name. - /// Pipeline resource definition. - /// ETag of the pipeline entity. Should only be specified for update, for which it should match existing entity or can be * for unconditional update. - /// The cancellation token to use. - /// , , , or is null. - /// , , or is an empty string, and was expected to be non-empty. - public async Task> CreateOrUpdateAsync(string subscriptionId, string resourceGroupName, string factoryName, string pipelineName, Pipeline data, string ifMatch = null, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(factoryName, nameof(factoryName)); - Argument.AssertNotNullOrEmpty(pipelineName, nameof(pipelineName)); - Argument.AssertNotNull(data, nameof(data)); - - using var message = CreateCreateOrUpdateRequest(subscriptionId, resourceGroupName, factoryName, pipelineName, data, ifMatch); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - switch (message.Response.Status) - { - case 200: - { - Pipeline value = default; - using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = Pipeline.DeserializeDataFactoryPipelineData(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - - /// Creates or updates a pipeline. - /// The subscription identifier. - /// The resource group name. - /// The factory name. - /// The pipeline name. - /// Pipeline resource definition. - /// ETag of the pipeline entity. Should only be specified for update, for which it should match existing entity or can be * for unconditional update. - /// The cancellation token to use. - /// , , , or is null. - /// , , or is an empty string, and was expected to be non-empty. - public Response CreateOrUpdate(string subscriptionId, string resourceGroupName, string factoryName, string pipelineName, Pipeline data, string ifMatch = null, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(factoryName, nameof(factoryName)); - Argument.AssertNotNullOrEmpty(pipelineName, nameof(pipelineName)); - Argument.AssertNotNull(data, nameof(data)); - - using var message = CreateCreateOrUpdateRequest(subscriptionId, resourceGroupName, factoryName, pipelineName, data, ifMatch); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 200: - { - Pipeline value = default; - using var document = JsonDocument.Parse(message.Response.ContentStream); - value = Pipeline.DeserializeDataFactoryPipelineData(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - - internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGroupName, string factoryName, string pipelineName, string ifNoneMatch) - { - var message = _pipeline.CreateMessage(); - var request = message.Request; - request.Method = RequestMethod.Get; - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendPath("/subscriptions/", false); - uri.AppendPath(subscriptionId, true); - uri.AppendPath("/resourceGroups/", false); - uri.AppendPath(resourceGroupName, true); - uri.AppendPath("/providers/Microsoft.DataFactory/factories/", false); - uri.AppendPath(factoryName, true); - uri.AppendPath("/pipelines/", false); - uri.AppendPath(pipelineName, true); - uri.AppendQuery("api-version", _apiVersion, true); - request.Uri = uri; - if (ifNoneMatch != null) - { - request.Headers.Add("If-None-Match", ifNoneMatch); - } - request.Headers.Add("Accept", "application/json"); - _userAgent.Apply(message); - return message; - } - - /// Gets a pipeline. - /// The subscription identifier. - /// The resource group name. - /// The factory name. - /// The pipeline name. - /// ETag of the pipeline entity. Should only be specified for get. If the ETag matches the existing entity tag, or if * was provided, then no content will be returned. - /// The cancellation token to use. - /// , , or is null. - /// , , or is an empty string, and was expected to be non-empty. - public async Task> GetAsync(string subscriptionId, string resourceGroupName, string factoryName, string pipelineName, string ifNoneMatch = null, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(factoryName, nameof(factoryName)); - Argument.AssertNotNullOrEmpty(pipelineName, nameof(pipelineName)); - - using var message = CreateGetRequest(subscriptionId, resourceGroupName, factoryName, pipelineName, ifNoneMatch); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - switch (message.Response.Status) - { - case 200: - { - Pipeline value = default; - using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = Pipeline.DeserializeDataFactoryPipelineData(document.RootElement); - return Response.FromValue(value, message.Response); - } - case 304: - case 404: - return Response.FromValue((Pipeline)null, message.Response); - default: - throw new RequestFailedException(message.Response); - } - } - - /// Gets a pipeline. - /// The subscription identifier. - /// The resource group name. - /// The factory name. - /// The pipeline name. - /// ETag of the pipeline entity. Should only be specified for get. If the ETag matches the existing entity tag, or if * was provided, then no content will be returned. - /// The cancellation token to use. - /// , , or is null. - /// , , or is an empty string, and was expected to be non-empty. - public Response Get(string subscriptionId, string resourceGroupName, string factoryName, string pipelineName, string ifNoneMatch = null, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(factoryName, nameof(factoryName)); - Argument.AssertNotNullOrEmpty(pipelineName, nameof(pipelineName)); - - using var message = CreateGetRequest(subscriptionId, resourceGroupName, factoryName, pipelineName, ifNoneMatch); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 200: - { - Pipeline value = default; - using var document = JsonDocument.Parse(message.Response.ContentStream); - value = Pipeline.DeserializeDataFactoryPipelineData(document.RootElement); - return Response.FromValue(value, message.Response); - } - case 304: - case 404: - return Response.FromValue((Pipeline)null, message.Response); - default: - throw new RequestFailedException(message.Response); - } - } - - internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceGroupName, string factoryName, string pipelineName) - { - var message = _pipeline.CreateMessage(); - var request = message.Request; - request.Method = RequestMethod.Delete; - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendPath("/subscriptions/", false); - uri.AppendPath(subscriptionId, true); - uri.AppendPath("/resourceGroups/", false); - uri.AppendPath(resourceGroupName, true); - uri.AppendPath("/providers/Microsoft.DataFactory/factories/", false); - uri.AppendPath(factoryName, true); - uri.AppendPath("/pipelines/", false); - uri.AppendPath(pipelineName, true); - uri.AppendQuery("api-version", _apiVersion, true); - request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - _userAgent.Apply(message); - return message; - } - - /// Deletes a pipeline. - /// The subscription identifier. - /// The resource group name. - /// The factory name. - /// The pipeline name. - /// The cancellation token to use. - /// , , or is null. - /// , , or is an empty string, and was expected to be non-empty. - public async Task DeleteAsync(string subscriptionId, string resourceGroupName, string factoryName, string pipelineName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(factoryName, nameof(factoryName)); - Argument.AssertNotNullOrEmpty(pipelineName, nameof(pipelineName)); - - using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, factoryName, pipelineName); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - switch (message.Response.Status) - { - case 200: - case 204: - return message.Response; - default: - throw new RequestFailedException(message.Response); - } - } - - /// Deletes a pipeline. - /// The subscription identifier. - /// The resource group name. - /// The factory name. - /// The pipeline name. - /// The cancellation token to use. - /// , , or is null. - /// , , or is an empty string, and was expected to be non-empty. - public Response Delete(string subscriptionId, string resourceGroupName, string factoryName, string pipelineName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(factoryName, nameof(factoryName)); - Argument.AssertNotNullOrEmpty(pipelineName, nameof(pipelineName)); - - using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, factoryName, pipelineName); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 200: - case 204: - return message.Response; - default: - throw new RequestFailedException(message.Response); - } - } - - internal HttpMessage CreateCreateRunRequest(string subscriptionId, string resourceGroupName, string factoryName, string pipelineName, IDictionary> parameterValueSpecification, string referencePipelineRunId, bool? isRecovery, string startActivityName, bool? startFromFailure) - { - var message = _pipeline.CreateMessage(); - var request = message.Request; - request.Method = RequestMethod.Post; - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendPath("/subscriptions/", false); - uri.AppendPath(subscriptionId, true); - uri.AppendPath("/resourceGroups/", false); - uri.AppendPath(resourceGroupName, true); - uri.AppendPath("/providers/Microsoft.DataFactory/factories/", false); - uri.AppendPath(factoryName, true); - uri.AppendPath("/pipelines/", false); - uri.AppendPath(pipelineName, true); - uri.AppendPath("/createRun", false); - uri.AppendQuery("api-version", _apiVersion, true); - if (referencePipelineRunId != null) - { - uri.AppendQuery("referencePipelineRunId", referencePipelineRunId, true); - } - if (isRecovery != null) - { - uri.AppendQuery("isRecovery", isRecovery.Value, true); - } - if (startActivityName != null) - { - uri.AppendQuery("startActivityName", startActivityName, true); - } - if (startFromFailure != null) - { - uri.AppendQuery("startFromFailure", startFromFailure.Value, true); - } - request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - if (parameterValueSpecification != null) - { - request.Headers.Add("Content-Type", "application/json"); - var content = new Utf8JsonRequestContent(); - content.JsonWriter.WriteStartObject(); - foreach (var item in parameterValueSpecification) - { - content.JsonWriter.WritePropertyName(item.Key); - if (item.Value == null) - { - content.JsonWriter.WriteNullValue(); - continue; - } -#if NET6_0_OR_GREATER - content.JsonWriter.WriteRawValue(item.Value); -#else - JsonSerializer.Serialize(content.JsonWriter, JsonDocument.Parse(item.Value.ToString()).RootElement); -#endif - } - content.JsonWriter.WriteEndObject(); - request.Content = content; - } - _userAgent.Apply(message); - return message; - } - - /// Creates a run of a pipeline. - /// The subscription identifier. - /// The resource group name. - /// The factory name. - /// The pipeline name. - /// Parameters of the pipeline run. These parameters will be used only if the runId is not specified. - /// The pipeline run identifier. If run ID is specified the parameters of the specified run will be used to create a new run. - /// Recovery mode flag. If recovery mode is set to true, the specified referenced pipeline run and the new run will be grouped under the same groupId. - /// In recovery mode, the rerun will start from this activity. If not specified, all activities will run. - /// 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. - /// The cancellation token to use. - /// , , or is null. - /// , , or is an empty string, and was expected to be non-empty. - public async Task> CreateRunAsync(string subscriptionId, string resourceGroupName, string factoryName, string pipelineName, IDictionary> parameterValueSpecification = null, string referencePipelineRunId = null, bool? isRecovery = null, string startActivityName = null, bool? startFromFailure = null, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(factoryName, nameof(factoryName)); - Argument.AssertNotNullOrEmpty(pipelineName, nameof(pipelineName)); - - using var message = CreateCreateRunRequest(subscriptionId, resourceGroupName, factoryName, pipelineName, parameterValueSpecification, referencePipelineRunId, isRecovery, startActivityName, startFromFailure); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - switch (message.Response.Status) - { - case 200: - { - PipelineCreateRunResult value = default; - using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = PipelineCreateRunResult.DeserializePipelineCreateRunResult(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - - /// Creates a run of a pipeline. - /// The subscription identifier. - /// The resource group name. - /// The factory name. - /// The pipeline name. - /// Parameters of the pipeline run. These parameters will be used only if the runId is not specified. - /// The pipeline run identifier. If run ID is specified the parameters of the specified run will be used to create a new run. - /// Recovery mode flag. If recovery mode is set to true, the specified referenced pipeline run and the new run will be grouped under the same groupId. - /// In recovery mode, the rerun will start from this activity. If not specified, all activities will run. - /// 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. - /// The cancellation token to use. - /// , , or is null. - /// , , or is an empty string, and was expected to be non-empty. - public Response CreateRun(string subscriptionId, string resourceGroupName, string factoryName, string pipelineName, IDictionary> parameterValueSpecification = null, string referencePipelineRunId = null, bool? isRecovery = null, string startActivityName = null, bool? startFromFailure = null, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(factoryName, nameof(factoryName)); - Argument.AssertNotNullOrEmpty(pipelineName, nameof(pipelineName)); - - using var message = CreateCreateRunRequest(subscriptionId, resourceGroupName, factoryName, pipelineName, parameterValueSpecification, referencePipelineRunId, isRecovery, startActivityName, startFromFailure); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 200: - { - PipelineCreateRunResult value = default; - using var document = JsonDocument.Parse(message.Response.ContentStream); - value = PipelineCreateRunResult.DeserializePipelineCreateRunResult(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - - internal HttpMessage CreateListByFactoryNextPageRequest(string nextLink, string subscriptionId, string resourceGroupName, string factoryName) - { - var message = _pipeline.CreateMessage(); - var request = message.Request; - request.Method = RequestMethod.Get; - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendRawNextLink(nextLink, false); - request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - _userAgent.Apply(message); - return message; - } - - /// Lists pipelines. - /// The URL to the next page of results. - /// The subscription identifier. - /// The resource group name. - /// The factory name. - /// The cancellation token to use. - /// , , or is null. - /// , or is an empty string, and was expected to be non-empty. - public async Task> ListByFactoryNextPageAsync(string nextLink, string subscriptionId, string resourceGroupName, string factoryName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(nextLink, nameof(nextLink)); - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(factoryName, nameof(factoryName)); - - using var message = CreateListByFactoryNextPageRequest(nextLink, subscriptionId, resourceGroupName, factoryName); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - switch (message.Response.Status) - { - case 200: - { - DataFactoryPipelineListResult value = default; - using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = DataFactoryPipelineListResult.DeserializeDataFactoryPipelineListResult(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - - /// Lists pipelines. - /// The URL to the next page of results. - /// The subscription identifier. - /// The resource group name. - /// The factory name. - /// The cancellation token to use. - /// , , or is null. - /// , or is an empty string, and was expected to be non-empty. - public Response ListByFactoryNextPage(string nextLink, string subscriptionId, string resourceGroupName, string factoryName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(nextLink, nameof(nextLink)); - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(factoryName, nameof(factoryName)); - - using var message = CreateListByFactoryNextPageRequest(nextLink, subscriptionId, resourceGroupName, factoryName); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 200: - { - DataFactoryPipelineListResult value = default; - using var document = JsonDocument.Parse(message.Response.ContentStream); - value = DataFactoryPipelineListResult.DeserializeDataFactoryPipelineListResult(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/RestOperations/PrivateEndPointConnectionsRestOperations.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/RestOperations/PrivateEndPointConnectionsRestOperations.cs deleted file mode 100644 index 6dde8a79..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/RestOperations/PrivateEndPointConnectionsRestOperations.cs +++ /dev/null @@ -1,188 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; -using Azure.Core.Pipeline; -using AzureDataFactory.TestingFramework.Models; - -namespace Azure.ResourceManager.DataFactory -{ - internal partial class PrivateEndPointConnectionsRestOperations - { - private readonly TelemetryDetails _userAgent; - private readonly HttpPipeline _pipeline; - private readonly Uri _endpoint; - private readonly string _apiVersion; - - /// Initializes a new instance of PrivateEndPointConnectionsRestOperations. - /// The HTTP pipeline for sending and receiving REST requests and responses. - /// The application id to use for user agent. - /// server parameter. - /// Api Version. - /// or is null. - public PrivateEndPointConnectionsRestOperations(HttpPipeline pipeline, string applicationId, Uri endpoint = null, string apiVersion = default) - { - _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); - _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2018-06-01"; - _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); - } - - internal HttpMessage CreateListByFactoryRequest(string subscriptionId, string resourceGroupName, string factoryName) - { - var message = _pipeline.CreateMessage(); - var request = message.Request; - request.Method = RequestMethod.Get; - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendPath("/subscriptions/", false); - uri.AppendPath(subscriptionId, true); - uri.AppendPath("/resourceGroups/", false); - uri.AppendPath(resourceGroupName, true); - uri.AppendPath("/providers/Microsoft.DataFactory/factories/", false); - uri.AppendPath(factoryName, true); - uri.AppendPath("/privateEndPointConnections", false); - uri.AppendQuery("api-version", _apiVersion, true); - request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - _userAgent.Apply(message); - return message; - } - - /// Lists Private endpoint connections. - /// The subscription identifier. - /// The resource group name. - /// The factory name. - /// The cancellation token to use. - /// , or is null. - /// , or is an empty string, and was expected to be non-empty. - public async Task> ListByFactoryAsync(string subscriptionId, string resourceGroupName, string factoryName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(factoryName, nameof(factoryName)); - - using var message = CreateListByFactoryRequest(subscriptionId, resourceGroupName, factoryName); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - switch (message.Response.Status) - { - case 200: - { - DataFactoryPrivateEndpointConnectionListResult value = default; - using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = DataFactoryPrivateEndpointConnectionListResult.DeserializeDataFactoryPrivateEndpointConnectionListResult(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - - /// Lists Private endpoint connections. - /// The subscription identifier. - /// The resource group name. - /// The factory name. - /// The cancellation token to use. - /// , or is null. - /// , or is an empty string, and was expected to be non-empty. - public Response ListByFactory(string subscriptionId, string resourceGroupName, string factoryName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(factoryName, nameof(factoryName)); - - using var message = CreateListByFactoryRequest(subscriptionId, resourceGroupName, factoryName); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 200: - { - DataFactoryPrivateEndpointConnectionListResult value = default; - using var document = JsonDocument.Parse(message.Response.ContentStream); - value = DataFactoryPrivateEndpointConnectionListResult.DeserializeDataFactoryPrivateEndpointConnectionListResult(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - - internal HttpMessage CreateListByFactoryNextPageRequest(string nextLink, string subscriptionId, string resourceGroupName, string factoryName) - { - var message = _pipeline.CreateMessage(); - var request = message.Request; - request.Method = RequestMethod.Get; - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendRawNextLink(nextLink, false); - request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - _userAgent.Apply(message); - return message; - } - - /// Lists Private endpoint connections. - /// The URL to the next page of results. - /// The subscription identifier. - /// The resource group name. - /// The factory name. - /// The cancellation token to use. - /// , , or is null. - /// , or is an empty string, and was expected to be non-empty. - public async Task> ListByFactoryNextPageAsync(string nextLink, string subscriptionId, string resourceGroupName, string factoryName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(nextLink, nameof(nextLink)); - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(factoryName, nameof(factoryName)); - - using var message = CreateListByFactoryNextPageRequest(nextLink, subscriptionId, resourceGroupName, factoryName); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - switch (message.Response.Status) - { - case 200: - { - DataFactoryPrivateEndpointConnectionListResult value = default; - using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = DataFactoryPrivateEndpointConnectionListResult.DeserializeDataFactoryPrivateEndpointConnectionListResult(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - - /// Lists Private endpoint connections. - /// The URL to the next page of results. - /// The subscription identifier. - /// The resource group name. - /// The factory name. - /// The cancellation token to use. - /// , , or is null. - /// , or is an empty string, and was expected to be non-empty. - public Response ListByFactoryNextPage(string nextLink, string subscriptionId, string resourceGroupName, string factoryName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(nextLink, nameof(nextLink)); - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(factoryName, nameof(factoryName)); - - using var message = CreateListByFactoryNextPageRequest(nextLink, subscriptionId, resourceGroupName, factoryName); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 200: - { - DataFactoryPrivateEndpointConnectionListResult value = default; - using var document = JsonDocument.Parse(message.Response.ContentStream); - value = DataFactoryPrivateEndpointConnectionListResult.DeserializeDataFactoryPrivateEndpointConnectionListResult(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/RestOperations/PrivateEndpointConnectionRestOperations.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/RestOperations/PrivateEndpointConnectionRestOperations.cs deleted file mode 100644 index fc7af3d8..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/RestOperations/PrivateEndpointConnectionRestOperations.cs +++ /dev/null @@ -1,301 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; -using Azure.Core.Pipeline; -using AzureDataFactory.TestingFramework.Models; - -namespace Azure.ResourceManager.DataFactory -{ - internal partial class PrivateEndpointConnectionRestOperations - { - private readonly TelemetryDetails _userAgent; - private readonly HttpPipeline _pipeline; - private readonly Uri _endpoint; - private readonly string _apiVersion; - - /// Initializes a new instance of PrivateEndpointConnectionRestOperations. - /// The HTTP pipeline for sending and receiving REST requests and responses. - /// The application id to use for user agent. - /// server parameter. - /// Api Version. - /// or is null. - public PrivateEndpointConnectionRestOperations(HttpPipeline pipeline, string applicationId, Uri endpoint = null, string apiVersion = default) - { - _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); - _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2018-06-01"; - _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); - } - - internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string resourceGroupName, string factoryName, string privateEndpointConnectionName, DataFactoryPrivateEndpointConnectionCreateOrUpdateContent content, string ifMatch) - { - var message = _pipeline.CreateMessage(); - var request = message.Request; - request.Method = RequestMethod.Put; - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendPath("/subscriptions/", false); - uri.AppendPath(subscriptionId, true); - uri.AppendPath("/resourceGroups/", false); - uri.AppendPath(resourceGroupName, true); - uri.AppendPath("/providers/Microsoft.DataFactory/factories/", false); - uri.AppendPath(factoryName, true); - uri.AppendPath("/privateEndpointConnections/", false); - uri.AppendPath(privateEndpointConnectionName, true); - uri.AppendQuery("api-version", _apiVersion, true); - request.Uri = uri; - if (ifMatch != null) - { - request.Headers.Add("If-Match", ifMatch); - } - request.Headers.Add("Accept", "application/json"); - request.Headers.Add("Content-Type", "application/json"); - var content0 = new Utf8JsonRequestContent(); - content0.JsonWriter.WriteObjectValue(content); - request.Content = content0; - _userAgent.Apply(message); - return message; - } - - /// Approves or rejects a private endpoint connection. - /// The subscription identifier. - /// The resource group name. - /// The factory name. - /// The private endpoint connection name. - /// The DataFactoryPrivateEndpointConnectionCreateOrUpdateContent to use. - /// ETag of the private endpoint connection entity. Should only be specified for update, for which it should match existing entity or can be * for unconditional update. - /// The cancellation token to use. - /// , , , or is null. - /// , , or is an empty string, and was expected to be non-empty. - public async Task> CreateOrUpdateAsync(string subscriptionId, string resourceGroupName, string factoryName, string privateEndpointConnectionName, DataFactoryPrivateEndpointConnectionCreateOrUpdateContent content, string ifMatch = null, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(factoryName, nameof(factoryName)); - Argument.AssertNotNullOrEmpty(privateEndpointConnectionName, nameof(privateEndpointConnectionName)); - Argument.AssertNotNull(content, nameof(content)); - - using var message = CreateCreateOrUpdateRequest(subscriptionId, resourceGroupName, factoryName, privateEndpointConnectionName, content, ifMatch); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - switch (message.Response.Status) - { - case 200: - { - DataFactoryPrivateEndpointConnectionData value = default; - using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = DataFactoryPrivateEndpointConnectionData.DeserializeDataFactoryPrivateEndpointConnectionData(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - - /// Approves or rejects a private endpoint connection. - /// The subscription identifier. - /// The resource group name. - /// The factory name. - /// The private endpoint connection name. - /// The DataFactoryPrivateEndpointConnectionCreateOrUpdateContent to use. - /// ETag of the private endpoint connection entity. Should only be specified for update, for which it should match existing entity or can be * for unconditional update. - /// The cancellation token to use. - /// , , , or is null. - /// , , or is an empty string, and was expected to be non-empty. - public Response CreateOrUpdate(string subscriptionId, string resourceGroupName, string factoryName, string privateEndpointConnectionName, DataFactoryPrivateEndpointConnectionCreateOrUpdateContent content, string ifMatch = null, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(factoryName, nameof(factoryName)); - Argument.AssertNotNullOrEmpty(privateEndpointConnectionName, nameof(privateEndpointConnectionName)); - Argument.AssertNotNull(content, nameof(content)); - - using var message = CreateCreateOrUpdateRequest(subscriptionId, resourceGroupName, factoryName, privateEndpointConnectionName, content, ifMatch); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 200: - { - DataFactoryPrivateEndpointConnectionData value = default; - using var document = JsonDocument.Parse(message.Response.ContentStream); - value = DataFactoryPrivateEndpointConnectionData.DeserializeDataFactoryPrivateEndpointConnectionData(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - - internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGroupName, string factoryName, string privateEndpointConnectionName, string ifNoneMatch) - { - var message = _pipeline.CreateMessage(); - var request = message.Request; - request.Method = RequestMethod.Get; - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendPath("/subscriptions/", false); - uri.AppendPath(subscriptionId, true); - uri.AppendPath("/resourceGroups/", false); - uri.AppendPath(resourceGroupName, true); - uri.AppendPath("/providers/Microsoft.DataFactory/factories/", false); - uri.AppendPath(factoryName, true); - uri.AppendPath("/privateEndpointConnections/", false); - uri.AppendPath(privateEndpointConnectionName, true); - uri.AppendQuery("api-version", _apiVersion, true); - request.Uri = uri; - if (ifNoneMatch != null) - { - request.Headers.Add("If-None-Match", ifNoneMatch); - } - request.Headers.Add("Accept", "application/json"); - _userAgent.Apply(message); - return message; - } - - /// Gets a private endpoint connection. - /// The subscription identifier. - /// The resource group name. - /// The factory name. - /// The private endpoint connection name. - /// ETag of the private endpoint connection entity. Should only be specified for get. If the ETag matches the existing entity tag, or if * was provided, then no content will be returned. - /// The cancellation token to use. - /// , , or is null. - /// , , or is an empty string, and was expected to be non-empty. - public async Task> GetAsync(string subscriptionId, string resourceGroupName, string factoryName, string privateEndpointConnectionName, string ifNoneMatch = null, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(factoryName, nameof(factoryName)); - Argument.AssertNotNullOrEmpty(privateEndpointConnectionName, nameof(privateEndpointConnectionName)); - - using var message = CreateGetRequest(subscriptionId, resourceGroupName, factoryName, privateEndpointConnectionName, ifNoneMatch); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - switch (message.Response.Status) - { - case 200: - { - DataFactoryPrivateEndpointConnectionData value = default; - using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = DataFactoryPrivateEndpointConnectionData.DeserializeDataFactoryPrivateEndpointConnectionData(document.RootElement); - return Response.FromValue(value, message.Response); - } - case 404: - return Response.FromValue((DataFactoryPrivateEndpointConnectionData)null, message.Response); - default: - throw new RequestFailedException(message.Response); - } - } - - /// Gets a private endpoint connection. - /// The subscription identifier. - /// The resource group name. - /// The factory name. - /// The private endpoint connection name. - /// ETag of the private endpoint connection entity. Should only be specified for get. If the ETag matches the existing entity tag, or if * was provided, then no content will be returned. - /// The cancellation token to use. - /// , , or is null. - /// , , or is an empty string, and was expected to be non-empty. - public Response Get(string subscriptionId, string resourceGroupName, string factoryName, string privateEndpointConnectionName, string ifNoneMatch = null, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(factoryName, nameof(factoryName)); - Argument.AssertNotNullOrEmpty(privateEndpointConnectionName, nameof(privateEndpointConnectionName)); - - using var message = CreateGetRequest(subscriptionId, resourceGroupName, factoryName, privateEndpointConnectionName, ifNoneMatch); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 200: - { - DataFactoryPrivateEndpointConnectionData value = default; - using var document = JsonDocument.Parse(message.Response.ContentStream); - value = DataFactoryPrivateEndpointConnectionData.DeserializeDataFactoryPrivateEndpointConnectionData(document.RootElement); - return Response.FromValue(value, message.Response); - } - case 404: - return Response.FromValue((DataFactoryPrivateEndpointConnectionData)null, message.Response); - default: - throw new RequestFailedException(message.Response); - } - } - - internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceGroupName, string factoryName, string privateEndpointConnectionName) - { - var message = _pipeline.CreateMessage(); - var request = message.Request; - request.Method = RequestMethod.Delete; - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendPath("/subscriptions/", false); - uri.AppendPath(subscriptionId, true); - uri.AppendPath("/resourceGroups/", false); - uri.AppendPath(resourceGroupName, true); - uri.AppendPath("/providers/Microsoft.DataFactory/factories/", false); - uri.AppendPath(factoryName, true); - uri.AppendPath("/privateEndpointConnections/", false); - uri.AppendPath(privateEndpointConnectionName, true); - uri.AppendQuery("api-version", _apiVersion, true); - request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - _userAgent.Apply(message); - return message; - } - - /// Deletes a private endpoint connection. - /// The subscription identifier. - /// The resource group name. - /// The factory name. - /// The private endpoint connection name. - /// The cancellation token to use. - /// , , or is null. - /// , , or is an empty string, and was expected to be non-empty. - public async Task DeleteAsync(string subscriptionId, string resourceGroupName, string factoryName, string privateEndpointConnectionName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(factoryName, nameof(factoryName)); - Argument.AssertNotNullOrEmpty(privateEndpointConnectionName, nameof(privateEndpointConnectionName)); - - using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, factoryName, privateEndpointConnectionName); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - switch (message.Response.Status) - { - case 200: - case 204: - return message.Response; - default: - throw new RequestFailedException(message.Response); - } - } - - /// Deletes a private endpoint connection. - /// The subscription identifier. - /// The resource group name. - /// The factory name. - /// The private endpoint connection name. - /// The cancellation token to use. - /// , , or is null. - /// , , or is an empty string, and was expected to be non-empty. - public Response Delete(string subscriptionId, string resourceGroupName, string factoryName, string privateEndpointConnectionName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(factoryName, nameof(factoryName)); - Argument.AssertNotNullOrEmpty(privateEndpointConnectionName, nameof(privateEndpointConnectionName)); - - using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, factoryName, privateEndpointConnectionName); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 200: - case 204: - return message.Response; - default: - throw new RequestFailedException(message.Response); - } - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/RestOperations/PrivateLinkResourcesRestOperations.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/RestOperations/PrivateLinkResourcesRestOperations.cs deleted file mode 100644 index dfd032f4..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/RestOperations/PrivateLinkResourcesRestOperations.cs +++ /dev/null @@ -1,112 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; -using Azure.Core.Pipeline; -using AzureDataFactory.TestingFramework.Models; - -namespace Azure.ResourceManager.DataFactory -{ - internal partial class PrivateLinkResourcesRestOperations - { - private readonly TelemetryDetails _userAgent; - private readonly HttpPipeline _pipeline; - private readonly Uri _endpoint; - private readonly string _apiVersion; - - /// Initializes a new instance of PrivateLinkResourcesRestOperations. - /// The HTTP pipeline for sending and receiving REST requests and responses. - /// The application id to use for user agent. - /// server parameter. - /// Api Version. - /// or is null. - public PrivateLinkResourcesRestOperations(HttpPipeline pipeline, string applicationId, Uri endpoint = null, string apiVersion = default) - { - _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); - _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2018-06-01"; - _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); - } - - internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGroupName, string factoryName) - { - var message = _pipeline.CreateMessage(); - var request = message.Request; - request.Method = RequestMethod.Get; - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendPath("/subscriptions/", false); - uri.AppendPath(subscriptionId, true); - uri.AppendPath("/resourceGroups/", false); - uri.AppendPath(resourceGroupName, true); - uri.AppendPath("/providers/Microsoft.DataFactory/factories/", false); - uri.AppendPath(factoryName, true); - uri.AppendPath("/privateLinkResources", false); - uri.AppendQuery("api-version", _apiVersion, true); - request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - _userAgent.Apply(message); - return message; - } - - /// Gets the private link resources. - /// The subscription identifier. - /// The resource group name. - /// The factory name. - /// The cancellation token to use. - /// , or is null. - /// , or is an empty string, and was expected to be non-empty. - public async Task> GetAsync(string subscriptionId, string resourceGroupName, string factoryName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(factoryName, nameof(factoryName)); - - using var message = CreateGetRequest(subscriptionId, resourceGroupName, factoryName); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - switch (message.Response.Status) - { - case 200: - { - PrivateLinkResourcesWrapper value = default; - using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = PrivateLinkResourcesWrapper.DeserializePrivateLinkResourcesWrapper(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - - /// Gets the private link resources. - /// The subscription identifier. - /// The resource group name. - /// The factory name. - /// The cancellation token to use. - /// , or is null. - /// , or is an empty string, and was expected to be non-empty. - public Response Get(string subscriptionId, string resourceGroupName, string factoryName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(factoryName, nameof(factoryName)); - - using var message = CreateGetRequest(subscriptionId, resourceGroupName, factoryName); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 200: - { - PrivateLinkResourcesWrapper value = default; - using var document = JsonDocument.Parse(message.Response.ContentStream); - value = PrivateLinkResourcesWrapper.DeserializePrivateLinkResourcesWrapper(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/RestOperations/TriggerRunsRestOperations.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/RestOperations/TriggerRunsRestOperations.cs deleted file mode 100644 index 0974e81a..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/RestOperations/TriggerRunsRestOperations.cs +++ /dev/null @@ -1,282 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; -using Azure.Core.Pipeline; -using AzureDataFactory.TestingFramework.Models; - -namespace Azure.ResourceManager.DataFactory -{ - internal partial class TriggerRunsRestOperations - { - private readonly TelemetryDetails _userAgent; - private readonly HttpPipeline _pipeline; - private readonly Uri _endpoint; - private readonly string _apiVersion; - - /// Initializes a new instance of TriggerRunsRestOperations. - /// The HTTP pipeline for sending and receiving REST requests and responses. - /// The application id to use for user agent. - /// server parameter. - /// Api Version. - /// or is null. - public TriggerRunsRestOperations(HttpPipeline pipeline, string applicationId, Uri endpoint = null, string apiVersion = default) - { - _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); - _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2018-06-01"; - _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); - } - - internal HttpMessage CreateRerunRequest(string subscriptionId, string resourceGroupName, string factoryName, string triggerName, string runId) - { - var message = _pipeline.CreateMessage(); - var request = message.Request; - request.Method = RequestMethod.Post; - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendPath("/subscriptions/", false); - uri.AppendPath(subscriptionId, true); - uri.AppendPath("/resourceGroups/", false); - uri.AppendPath(resourceGroupName, true); - uri.AppendPath("/providers/Microsoft.DataFactory/factories/", false); - uri.AppendPath(factoryName, true); - uri.AppendPath("/triggers/", false); - uri.AppendPath(triggerName, true); - uri.AppendPath("/triggerRuns/", false); - uri.AppendPath(runId, true); - uri.AppendPath("/rerun", false); - uri.AppendQuery("api-version", _apiVersion, true); - request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - _userAgent.Apply(message); - return message; - } - - /// Rerun single trigger instance by runId. - /// The subscription identifier. - /// The resource group name. - /// The factory name. - /// The trigger name. - /// The pipeline run identifier. - /// The cancellation token to use. - /// , , , or is null. - /// , , , or is an empty string, and was expected to be non-empty. - public async Task RerunAsync(string subscriptionId, string resourceGroupName, string factoryName, string triggerName, string runId, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(factoryName, nameof(factoryName)); - Argument.AssertNotNullOrEmpty(triggerName, nameof(triggerName)); - Argument.AssertNotNullOrEmpty(runId, nameof(runId)); - - using var message = CreateRerunRequest(subscriptionId, resourceGroupName, factoryName, triggerName, runId); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - switch (message.Response.Status) - { - case 200: - return message.Response; - default: - throw new RequestFailedException(message.Response); - } - } - - /// Rerun single trigger instance by runId. - /// The subscription identifier. - /// The resource group name. - /// The factory name. - /// The trigger name. - /// The pipeline run identifier. - /// The cancellation token to use. - /// , , , or is null. - /// , , , or is an empty string, and was expected to be non-empty. - public Response Rerun(string subscriptionId, string resourceGroupName, string factoryName, string triggerName, string runId, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(factoryName, nameof(factoryName)); - Argument.AssertNotNullOrEmpty(triggerName, nameof(triggerName)); - Argument.AssertNotNullOrEmpty(runId, nameof(runId)); - - using var message = CreateRerunRequest(subscriptionId, resourceGroupName, factoryName, triggerName, runId); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 200: - return message.Response; - default: - throw new RequestFailedException(message.Response); - } - } - - internal HttpMessage CreateCancelRequest(string subscriptionId, string resourceGroupName, string factoryName, string triggerName, string runId) - { - var message = _pipeline.CreateMessage(); - var request = message.Request; - request.Method = RequestMethod.Post; - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendPath("/subscriptions/", false); - uri.AppendPath(subscriptionId, true); - uri.AppendPath("/resourceGroups/", false); - uri.AppendPath(resourceGroupName, true); - uri.AppendPath("/providers/Microsoft.DataFactory/factories/", false); - uri.AppendPath(factoryName, true); - uri.AppendPath("/triggers/", false); - uri.AppendPath(triggerName, true); - uri.AppendPath("/triggerRuns/", false); - uri.AppendPath(runId, true); - uri.AppendPath("/cancel", false); - uri.AppendQuery("api-version", _apiVersion, true); - request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - _userAgent.Apply(message); - return message; - } - - /// Cancel a single trigger instance by runId. - /// The subscription identifier. - /// The resource group name. - /// The factory name. - /// The trigger name. - /// The pipeline run identifier. - /// The cancellation token to use. - /// , , , or is null. - /// , , , or is an empty string, and was expected to be non-empty. - public async Task CancelAsync(string subscriptionId, string resourceGroupName, string factoryName, string triggerName, string runId, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(factoryName, nameof(factoryName)); - Argument.AssertNotNullOrEmpty(triggerName, nameof(triggerName)); - Argument.AssertNotNullOrEmpty(runId, nameof(runId)); - - using var message = CreateCancelRequest(subscriptionId, resourceGroupName, factoryName, triggerName, runId); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - switch (message.Response.Status) - { - case 200: - return message.Response; - default: - throw new RequestFailedException(message.Response); - } - } - - /// Cancel a single trigger instance by runId. - /// The subscription identifier. - /// The resource group name. - /// The factory name. - /// The trigger name. - /// The pipeline run identifier. - /// The cancellation token to use. - /// , , , or is null. - /// , , , or is an empty string, and was expected to be non-empty. - public Response Cancel(string subscriptionId, string resourceGroupName, string factoryName, string triggerName, string runId, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(factoryName, nameof(factoryName)); - Argument.AssertNotNullOrEmpty(triggerName, nameof(triggerName)); - Argument.AssertNotNullOrEmpty(runId, nameof(runId)); - - using var message = CreateCancelRequest(subscriptionId, resourceGroupName, factoryName, triggerName, runId); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 200: - return message.Response; - default: - throw new RequestFailedException(message.Response); - } - } - - internal HttpMessage CreateQueryByFactoryRequest(string subscriptionId, string resourceGroupName, string factoryName, RunFilterContent content) - { - var message = _pipeline.CreateMessage(); - var request = message.Request; - request.Method = RequestMethod.Post; - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendPath("/subscriptions/", false); - uri.AppendPath(subscriptionId, true); - uri.AppendPath("/resourceGroups/", false); - uri.AppendPath(resourceGroupName, true); - uri.AppendPath("/providers/Microsoft.DataFactory/factories/", false); - uri.AppendPath(factoryName, true); - uri.AppendPath("/queryTriggerRuns", false); - uri.AppendQuery("api-version", _apiVersion, true); - request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - request.Headers.Add("Content-Type", "application/json"); - var content0 = new Utf8JsonRequestContent(); - content0.JsonWriter.WriteObjectValue(content); - request.Content = content0; - _userAgent.Apply(message); - return message; - } - - /// Query trigger runs. - /// The subscription identifier. - /// The resource group name. - /// The factory name. - /// Parameters to filter the pipeline run. - /// The cancellation token to use. - /// , , or is null. - /// , or is an empty string, and was expected to be non-empty. - public async Task> QueryByFactoryAsync(string subscriptionId, string resourceGroupName, string factoryName, RunFilterContent content, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(factoryName, nameof(factoryName)); - Argument.AssertNotNull(content, nameof(content)); - - using var message = CreateQueryByFactoryRequest(subscriptionId, resourceGroupName, factoryName, content); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - switch (message.Response.Status) - { - case 200: - { - DataFactoryTriggerRunsQueryResult value = default; - using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = DataFactoryTriggerRunsQueryResult.DeserializeDataFactoryTriggerRunsQueryResult(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - - /// Query trigger runs. - /// The subscription identifier. - /// The resource group name. - /// The factory name. - /// Parameters to filter the pipeline run. - /// The cancellation token to use. - /// , , or is null. - /// , or is an empty string, and was expected to be non-empty. - public Response QueryByFactory(string subscriptionId, string resourceGroupName, string factoryName, RunFilterContent content, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(factoryName, nameof(factoryName)); - Argument.AssertNotNull(content, nameof(content)); - - using var message = CreateQueryByFactoryRequest(subscriptionId, resourceGroupName, factoryName, content); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 200: - { - DataFactoryTriggerRunsQueryResult value = default; - using var document = JsonDocument.Parse(message.Response.ContentStream); - value = DataFactoryTriggerRunsQueryResult.DeserializeDataFactoryTriggerRunsQueryResult(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Generated/RestOperations/TriggersRestOperations.cs b/src/dotnet/AzureDataFactory.TestingFramework/Generated/RestOperations/TriggersRestOperations.cs deleted file mode 100644 index 1e2c0c42..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Generated/RestOperations/TriggersRestOperations.cs +++ /dev/null @@ -1,934 +0,0 @@ -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; -using Azure.Core.Pipeline; -using AzureDataFactory.TestingFramework.Models; - -namespace Azure.ResourceManager.DataFactory -{ - internal partial class TriggersRestOperations - { - private readonly TelemetryDetails _userAgent; - private readonly HttpPipeline _pipeline; - private readonly Uri _endpoint; - private readonly string _apiVersion; - - /// Initializes a new instance of TriggersRestOperations. - /// The HTTP pipeline for sending and receiving REST requests and responses. - /// The application id to use for user agent. - /// server parameter. - /// Api Version. - /// or is null. - public TriggersRestOperations(HttpPipeline pipeline, string applicationId, Uri endpoint = null, string apiVersion = default) - { - _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); - _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2018-06-01"; - _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); - } - - internal HttpMessage CreateListByFactoryRequest(string subscriptionId, string resourceGroupName, string factoryName) - { - var message = _pipeline.CreateMessage(); - var request = message.Request; - request.Method = RequestMethod.Get; - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendPath("/subscriptions/", false); - uri.AppendPath(subscriptionId, true); - uri.AppendPath("/resourceGroups/", false); - uri.AppendPath(resourceGroupName, true); - uri.AppendPath("/providers/Microsoft.DataFactory/factories/", false); - uri.AppendPath(factoryName, true); - uri.AppendPath("/triggers", false); - uri.AppendQuery("api-version", _apiVersion, true); - request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - _userAgent.Apply(message); - return message; - } - - /// Lists triggers. - /// The subscription identifier. - /// The resource group name. - /// The factory name. - /// The cancellation token to use. - /// , or is null. - /// , or is an empty string, and was expected to be non-empty. - public async Task> ListByFactoryAsync(string subscriptionId, string resourceGroupName, string factoryName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(factoryName, nameof(factoryName)); - - using var message = CreateListByFactoryRequest(subscriptionId, resourceGroupName, factoryName); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - switch (message.Response.Status) - { - case 200: - { - DataFactoryTriggerListResult value = default; - using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = DataFactoryTriggerListResult.DeserializeDataFactoryTriggerListResult(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - - /// Lists triggers. - /// The subscription identifier. - /// The resource group name. - /// The factory name. - /// The cancellation token to use. - /// , or is null. - /// , or is an empty string, and was expected to be non-empty. - public Response ListByFactory(string subscriptionId, string resourceGroupName, string factoryName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(factoryName, nameof(factoryName)); - - using var message = CreateListByFactoryRequest(subscriptionId, resourceGroupName, factoryName); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 200: - { - DataFactoryTriggerListResult value = default; - using var document = JsonDocument.Parse(message.Response.ContentStream); - value = DataFactoryTriggerListResult.DeserializeDataFactoryTriggerListResult(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - - internal HttpMessage CreateQueryByFactoryRequest(string subscriptionId, string resourceGroupName, string factoryName, TriggerFilterContent content) - { - var message = _pipeline.CreateMessage(); - var request = message.Request; - request.Method = RequestMethod.Post; - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendPath("/subscriptions/", false); - uri.AppendPath(subscriptionId, true); - uri.AppendPath("/resourceGroups/", false); - uri.AppendPath(resourceGroupName, true); - uri.AppendPath("/providers/Microsoft.DataFactory/factories/", false); - uri.AppendPath(factoryName, true); - uri.AppendPath("/querytriggers", false); - uri.AppendQuery("api-version", _apiVersion, true); - request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - request.Headers.Add("Content-Type", "application/json"); - var content0 = new Utf8JsonRequestContent(); - content0.JsonWriter.WriteObjectValue(content); - request.Content = content0; - _userAgent.Apply(message); - return message; - } - - /// Query triggers. - /// The subscription identifier. - /// The resource group name. - /// The factory name. - /// Parameters to filter the triggers. - /// The cancellation token to use. - /// , , or is null. - /// , or is an empty string, and was expected to be non-empty. - public async Task> QueryByFactoryAsync(string subscriptionId, string resourceGroupName, string factoryName, TriggerFilterContent content, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(factoryName, nameof(factoryName)); - Argument.AssertNotNull(content, nameof(content)); - - using var message = CreateQueryByFactoryRequest(subscriptionId, resourceGroupName, factoryName, content); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - switch (message.Response.Status) - { - case 200: - { - DataFactoryTriggerQueryResult value = default; - using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = DataFactoryTriggerQueryResult.DeserializeDataFactoryTriggerQueryResult(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - - /// Query triggers. - /// The subscription identifier. - /// The resource group name. - /// The factory name. - /// Parameters to filter the triggers. - /// The cancellation token to use. - /// , , or is null. - /// , or is an empty string, and was expected to be non-empty. - public Response QueryByFactory(string subscriptionId, string resourceGroupName, string factoryName, TriggerFilterContent content, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(factoryName, nameof(factoryName)); - Argument.AssertNotNull(content, nameof(content)); - - using var message = CreateQueryByFactoryRequest(subscriptionId, resourceGroupName, factoryName, content); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 200: - { - DataFactoryTriggerQueryResult value = default; - using var document = JsonDocument.Parse(message.Response.ContentStream); - value = DataFactoryTriggerQueryResult.DeserializeDataFactoryTriggerQueryResult(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - - internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string resourceGroupName, string factoryName, string triggerName, DataFactoryTriggerData data, string ifMatch) - { - var message = _pipeline.CreateMessage(); - var request = message.Request; - request.Method = RequestMethod.Put; - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendPath("/subscriptions/", false); - uri.AppendPath(subscriptionId, true); - uri.AppendPath("/resourceGroups/", false); - uri.AppendPath(resourceGroupName, true); - uri.AppendPath("/providers/Microsoft.DataFactory/factories/", false); - uri.AppendPath(factoryName, true); - uri.AppendPath("/triggers/", false); - uri.AppendPath(triggerName, true); - uri.AppendQuery("api-version", _apiVersion, true); - request.Uri = uri; - if (ifMatch != null) - { - request.Headers.Add("If-Match", ifMatch); - } - request.Headers.Add("Accept", "application/json"); - request.Headers.Add("Content-Type", "application/json"); - var content = new Utf8JsonRequestContent(); - content.JsonWriter.WriteObjectValue(data); - request.Content = content; - _userAgent.Apply(message); - return message; - } - - /// Creates or updates a trigger. - /// The subscription identifier. - /// The resource group name. - /// The factory name. - /// The trigger name. - /// Trigger resource definition. - /// ETag of the trigger entity. Should only be specified for update, for which it should match existing entity or can be * for unconditional update. - /// The cancellation token to use. - /// , , , or is null. - /// , , or is an empty string, and was expected to be non-empty. - public async Task> CreateOrUpdateAsync(string subscriptionId, string resourceGroupName, string factoryName, string triggerName, DataFactoryTriggerData data, string ifMatch = null, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(factoryName, nameof(factoryName)); - Argument.AssertNotNullOrEmpty(triggerName, nameof(triggerName)); - Argument.AssertNotNull(data, nameof(data)); - - using var message = CreateCreateOrUpdateRequest(subscriptionId, resourceGroupName, factoryName, triggerName, data, ifMatch); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - switch (message.Response.Status) - { - case 200: - { - DataFactoryTriggerData value = default; - using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = DataFactoryTriggerData.DeserializeDataFactoryTriggerData(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - - /// Creates or updates a trigger. - /// The subscription identifier. - /// The resource group name. - /// The factory name. - /// The trigger name. - /// Trigger resource definition. - /// ETag of the trigger entity. Should only be specified for update, for which it should match existing entity or can be * for unconditional update. - /// The cancellation token to use. - /// , , , or is null. - /// , , or is an empty string, and was expected to be non-empty. - public Response CreateOrUpdate(string subscriptionId, string resourceGroupName, string factoryName, string triggerName, DataFactoryTriggerData data, string ifMatch = null, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(factoryName, nameof(factoryName)); - Argument.AssertNotNullOrEmpty(triggerName, nameof(triggerName)); - Argument.AssertNotNull(data, nameof(data)); - - using var message = CreateCreateOrUpdateRequest(subscriptionId, resourceGroupName, factoryName, triggerName, data, ifMatch); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 200: - { - DataFactoryTriggerData value = default; - using var document = JsonDocument.Parse(message.Response.ContentStream); - value = DataFactoryTriggerData.DeserializeDataFactoryTriggerData(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - - internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGroupName, string factoryName, string triggerName, string ifNoneMatch) - { - var message = _pipeline.CreateMessage(); - var request = message.Request; - request.Method = RequestMethod.Get; - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendPath("/subscriptions/", false); - uri.AppendPath(subscriptionId, true); - uri.AppendPath("/resourceGroups/", false); - uri.AppendPath(resourceGroupName, true); - uri.AppendPath("/providers/Microsoft.DataFactory/factories/", false); - uri.AppendPath(factoryName, true); - uri.AppendPath("/triggers/", false); - uri.AppendPath(triggerName, true); - uri.AppendQuery("api-version", _apiVersion, true); - request.Uri = uri; - if (ifNoneMatch != null) - { - request.Headers.Add("If-None-Match", ifNoneMatch); - } - request.Headers.Add("Accept", "application/json"); - _userAgent.Apply(message); - return message; - } - - /// Gets a trigger. - /// The subscription identifier. - /// The resource group name. - /// The factory name. - /// The trigger name. - /// ETag of the trigger entity. Should only be specified for get. If the ETag matches the existing entity tag, or if * was provided, then no content will be returned. - /// The cancellation token to use. - /// , , or is null. - /// , , or is an empty string, and was expected to be non-empty. - public async Task> GetAsync(string subscriptionId, string resourceGroupName, string factoryName, string triggerName, string ifNoneMatch = null, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(factoryName, nameof(factoryName)); - Argument.AssertNotNullOrEmpty(triggerName, nameof(triggerName)); - - using var message = CreateGetRequest(subscriptionId, resourceGroupName, factoryName, triggerName, ifNoneMatch); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - switch (message.Response.Status) - { - case 200: - { - DataFactoryTriggerData value = default; - using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = DataFactoryTriggerData.DeserializeDataFactoryTriggerData(document.RootElement); - return Response.FromValue(value, message.Response); - } - case 304: - case 404: - return Response.FromValue((DataFactoryTriggerData)null, message.Response); - default: - throw new RequestFailedException(message.Response); - } - } - - /// Gets a trigger. - /// The subscription identifier. - /// The resource group name. - /// The factory name. - /// The trigger name. - /// ETag of the trigger entity. Should only be specified for get. If the ETag matches the existing entity tag, or if * was provided, then no content will be returned. - /// The cancellation token to use. - /// , , or is null. - /// , , or is an empty string, and was expected to be non-empty. - public Response Get(string subscriptionId, string resourceGroupName, string factoryName, string triggerName, string ifNoneMatch = null, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(factoryName, nameof(factoryName)); - Argument.AssertNotNullOrEmpty(triggerName, nameof(triggerName)); - - using var message = CreateGetRequest(subscriptionId, resourceGroupName, factoryName, triggerName, ifNoneMatch); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 200: - { - DataFactoryTriggerData value = default; - using var document = JsonDocument.Parse(message.Response.ContentStream); - value = DataFactoryTriggerData.DeserializeDataFactoryTriggerData(document.RootElement); - return Response.FromValue(value, message.Response); - } - case 304: - case 404: - return Response.FromValue((DataFactoryTriggerData)null, message.Response); - default: - throw new RequestFailedException(message.Response); - } - } - - internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceGroupName, string factoryName, string triggerName) - { - var message = _pipeline.CreateMessage(); - var request = message.Request; - request.Method = RequestMethod.Delete; - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendPath("/subscriptions/", false); - uri.AppendPath(subscriptionId, true); - uri.AppendPath("/resourceGroups/", false); - uri.AppendPath(resourceGroupName, true); - uri.AppendPath("/providers/Microsoft.DataFactory/factories/", false); - uri.AppendPath(factoryName, true); - uri.AppendPath("/triggers/", false); - uri.AppendPath(triggerName, true); - uri.AppendQuery("api-version", _apiVersion, true); - request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - _userAgent.Apply(message); - return message; - } - - /// Deletes a trigger. - /// The subscription identifier. - /// The resource group name. - /// The factory name. - /// The trigger name. - /// The cancellation token to use. - /// , , or is null. - /// , , or is an empty string, and was expected to be non-empty. - public async Task DeleteAsync(string subscriptionId, string resourceGroupName, string factoryName, string triggerName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(factoryName, nameof(factoryName)); - Argument.AssertNotNullOrEmpty(triggerName, nameof(triggerName)); - - using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, factoryName, triggerName); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - switch (message.Response.Status) - { - case 200: - case 204: - return message.Response; - default: - throw new RequestFailedException(message.Response); - } - } - - /// Deletes a trigger. - /// The subscription identifier. - /// The resource group name. - /// The factory name. - /// The trigger name. - /// The cancellation token to use. - /// , , or is null. - /// , , or is an empty string, and was expected to be non-empty. - public Response Delete(string subscriptionId, string resourceGroupName, string factoryName, string triggerName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(factoryName, nameof(factoryName)); - Argument.AssertNotNullOrEmpty(triggerName, nameof(triggerName)); - - using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, factoryName, triggerName); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 200: - case 204: - return message.Response; - default: - throw new RequestFailedException(message.Response); - } - } - - internal HttpMessage CreateSubscribeToEventsRequest(string subscriptionId, string resourceGroupName, string factoryName, string triggerName) - { - var message = _pipeline.CreateMessage(); - var request = message.Request; - request.Method = RequestMethod.Post; - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendPath("/subscriptions/", false); - uri.AppendPath(subscriptionId, true); - uri.AppendPath("/resourceGroups/", false); - uri.AppendPath(resourceGroupName, true); - uri.AppendPath("/providers/Microsoft.DataFactory/factories/", false); - uri.AppendPath(factoryName, true); - uri.AppendPath("/triggers/", false); - uri.AppendPath(triggerName, true); - uri.AppendPath("/subscribeToEvents", false); - uri.AppendQuery("api-version", _apiVersion, true); - request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - _userAgent.Apply(message); - return message; - } - - /// Subscribe event trigger to events. - /// The subscription identifier. - /// The resource group name. - /// The factory name. - /// The trigger name. - /// The cancellation token to use. - /// , , or is null. - /// , , or is an empty string, and was expected to be non-empty. - public async Task SubscribeToEventsAsync(string subscriptionId, string resourceGroupName, string factoryName, string triggerName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(factoryName, nameof(factoryName)); - Argument.AssertNotNullOrEmpty(triggerName, nameof(triggerName)); - - using var message = CreateSubscribeToEventsRequest(subscriptionId, resourceGroupName, factoryName, triggerName); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - switch (message.Response.Status) - { - case 200: - case 202: - return message.Response; - default: - throw new RequestFailedException(message.Response); - } - } - - /// Subscribe event trigger to events. - /// The subscription identifier. - /// The resource group name. - /// The factory name. - /// The trigger name. - /// The cancellation token to use. - /// , , or is null. - /// , , or is an empty string, and was expected to be non-empty. - public Response SubscribeToEvents(string subscriptionId, string resourceGroupName, string factoryName, string triggerName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(factoryName, nameof(factoryName)); - Argument.AssertNotNullOrEmpty(triggerName, nameof(triggerName)); - - using var message = CreateSubscribeToEventsRequest(subscriptionId, resourceGroupName, factoryName, triggerName); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 200: - case 202: - return message.Response; - default: - throw new RequestFailedException(message.Response); - } - } - - internal HttpMessage CreateGetEventSubscriptionStatusRequest(string subscriptionId, string resourceGroupName, string factoryName, string triggerName) - { - var message = _pipeline.CreateMessage(); - var request = message.Request; - request.Method = RequestMethod.Post; - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendPath("/subscriptions/", false); - uri.AppendPath(subscriptionId, true); - uri.AppendPath("/resourceGroups/", false); - uri.AppendPath(resourceGroupName, true); - uri.AppendPath("/providers/Microsoft.DataFactory/factories/", false); - uri.AppendPath(factoryName, true); - uri.AppendPath("/triggers/", false); - uri.AppendPath(triggerName, true); - uri.AppendPath("/getEventSubscriptionStatus", false); - uri.AppendQuery("api-version", _apiVersion, true); - request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - _userAgent.Apply(message); - return message; - } - - /// Get a trigger's event subscription status. - /// The subscription identifier. - /// The resource group name. - /// The factory name. - /// The trigger name. - /// The cancellation token to use. - /// , , or is null. - /// , , or is an empty string, and was expected to be non-empty. - public async Task> GetEventSubscriptionStatusAsync(string subscriptionId, string resourceGroupName, string factoryName, string triggerName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(factoryName, nameof(factoryName)); - Argument.AssertNotNullOrEmpty(triggerName, nameof(triggerName)); - - using var message = CreateGetEventSubscriptionStatusRequest(subscriptionId, resourceGroupName, factoryName, triggerName); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - switch (message.Response.Status) - { - case 200: - { - DataFactoryTriggerSubscriptionOperationResult value = default; - using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = DataFactoryTriggerSubscriptionOperationResult.DeserializeDataFactoryTriggerSubscriptionOperationResult(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - - /// Get a trigger's event subscription status. - /// The subscription identifier. - /// The resource group name. - /// The factory name. - /// The trigger name. - /// The cancellation token to use. - /// , , or is null. - /// , , or is an empty string, and was expected to be non-empty. - public Response GetEventSubscriptionStatus(string subscriptionId, string resourceGroupName, string factoryName, string triggerName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(factoryName, nameof(factoryName)); - Argument.AssertNotNullOrEmpty(triggerName, nameof(triggerName)); - - using var message = CreateGetEventSubscriptionStatusRequest(subscriptionId, resourceGroupName, factoryName, triggerName); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 200: - { - DataFactoryTriggerSubscriptionOperationResult value = default; - using var document = JsonDocument.Parse(message.Response.ContentStream); - value = DataFactoryTriggerSubscriptionOperationResult.DeserializeDataFactoryTriggerSubscriptionOperationResult(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - - internal HttpMessage CreateUnsubscribeFromEventsRequest(string subscriptionId, string resourceGroupName, string factoryName, string triggerName) - { - var message = _pipeline.CreateMessage(); - var request = message.Request; - request.Method = RequestMethod.Post; - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendPath("/subscriptions/", false); - uri.AppendPath(subscriptionId, true); - uri.AppendPath("/resourceGroups/", false); - uri.AppendPath(resourceGroupName, true); - uri.AppendPath("/providers/Microsoft.DataFactory/factories/", false); - uri.AppendPath(factoryName, true); - uri.AppendPath("/triggers/", false); - uri.AppendPath(triggerName, true); - uri.AppendPath("/unsubscribeFromEvents", false); - uri.AppendQuery("api-version", _apiVersion, true); - request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - _userAgent.Apply(message); - return message; - } - - /// Unsubscribe event trigger from events. - /// The subscription identifier. - /// The resource group name. - /// The factory name. - /// The trigger name. - /// The cancellation token to use. - /// , , or is null. - /// , , or is an empty string, and was expected to be non-empty. - public async Task UnsubscribeFromEventsAsync(string subscriptionId, string resourceGroupName, string factoryName, string triggerName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(factoryName, nameof(factoryName)); - Argument.AssertNotNullOrEmpty(triggerName, nameof(triggerName)); - - using var message = CreateUnsubscribeFromEventsRequest(subscriptionId, resourceGroupName, factoryName, triggerName); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - switch (message.Response.Status) - { - case 200: - case 202: - return message.Response; - default: - throw new RequestFailedException(message.Response); - } - } - - /// Unsubscribe event trigger from events. - /// The subscription identifier. - /// The resource group name. - /// The factory name. - /// The trigger name. - /// The cancellation token to use. - /// , , or is null. - /// , , or is an empty string, and was expected to be non-empty. - public Response UnsubscribeFromEvents(string subscriptionId, string resourceGroupName, string factoryName, string triggerName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(factoryName, nameof(factoryName)); - Argument.AssertNotNullOrEmpty(triggerName, nameof(triggerName)); - - using var message = CreateUnsubscribeFromEventsRequest(subscriptionId, resourceGroupName, factoryName, triggerName); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 200: - case 202: - return message.Response; - default: - throw new RequestFailedException(message.Response); - } - } - - internal HttpMessage CreateStartRequest(string subscriptionId, string resourceGroupName, string factoryName, string triggerName) - { - var message = _pipeline.CreateMessage(); - var request = message.Request; - request.Method = RequestMethod.Post; - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendPath("/subscriptions/", false); - uri.AppendPath(subscriptionId, true); - uri.AppendPath("/resourceGroups/", false); - uri.AppendPath(resourceGroupName, true); - uri.AppendPath("/providers/Microsoft.DataFactory/factories/", false); - uri.AppendPath(factoryName, true); - uri.AppendPath("/triggers/", false); - uri.AppendPath(triggerName, true); - uri.AppendPath("/start", false); - uri.AppendQuery("api-version", _apiVersion, true); - request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - _userAgent.Apply(message); - return message; - } - - /// Starts a trigger. - /// The subscription identifier. - /// The resource group name. - /// The factory name. - /// The trigger name. - /// The cancellation token to use. - /// , , or is null. - /// , , or is an empty string, and was expected to be non-empty. - public async Task StartAsync(string subscriptionId, string resourceGroupName, string factoryName, string triggerName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(factoryName, nameof(factoryName)); - Argument.AssertNotNullOrEmpty(triggerName, nameof(triggerName)); - - using var message = CreateStartRequest(subscriptionId, resourceGroupName, factoryName, triggerName); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - switch (message.Response.Status) - { - case 200: - return message.Response; - default: - throw new RequestFailedException(message.Response); - } - } - - /// Starts a trigger. - /// The subscription identifier. - /// The resource group name. - /// The factory name. - /// The trigger name. - /// The cancellation token to use. - /// , , or is null. - /// , , or is an empty string, and was expected to be non-empty. - public Response Start(string subscriptionId, string resourceGroupName, string factoryName, string triggerName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(factoryName, nameof(factoryName)); - Argument.AssertNotNullOrEmpty(triggerName, nameof(triggerName)); - - using var message = CreateStartRequest(subscriptionId, resourceGroupName, factoryName, triggerName); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 200: - return message.Response; - default: - throw new RequestFailedException(message.Response); - } - } - - internal HttpMessage CreateStopRequest(string subscriptionId, string resourceGroupName, string factoryName, string triggerName) - { - var message = _pipeline.CreateMessage(); - var request = message.Request; - request.Method = RequestMethod.Post; - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendPath("/subscriptions/", false); - uri.AppendPath(subscriptionId, true); - uri.AppendPath("/resourceGroups/", false); - uri.AppendPath(resourceGroupName, true); - uri.AppendPath("/providers/Microsoft.DataFactory/factories/", false); - uri.AppendPath(factoryName, true); - uri.AppendPath("/triggers/", false); - uri.AppendPath(triggerName, true); - uri.AppendPath("/stop", false); - uri.AppendQuery("api-version", _apiVersion, true); - request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - _userAgent.Apply(message); - return message; - } - - /// Stops a trigger. - /// The subscription identifier. - /// The resource group name. - /// The factory name. - /// The trigger name. - /// The cancellation token to use. - /// , , or is null. - /// , , or is an empty string, and was expected to be non-empty. - public async Task StopAsync(string subscriptionId, string resourceGroupName, string factoryName, string triggerName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(factoryName, nameof(factoryName)); - Argument.AssertNotNullOrEmpty(triggerName, nameof(triggerName)); - - using var message = CreateStopRequest(subscriptionId, resourceGroupName, factoryName, triggerName); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - switch (message.Response.Status) - { - case 200: - return message.Response; - default: - throw new RequestFailedException(message.Response); - } - } - - /// Stops a trigger. - /// The subscription identifier. - /// The resource group name. - /// The factory name. - /// The trigger name. - /// The cancellation token to use. - /// , , or is null. - /// , , or is an empty string, and was expected to be non-empty. - public Response Stop(string subscriptionId, string resourceGroupName, string factoryName, string triggerName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(factoryName, nameof(factoryName)); - Argument.AssertNotNullOrEmpty(triggerName, nameof(triggerName)); - - using var message = CreateStopRequest(subscriptionId, resourceGroupName, factoryName, triggerName); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 200: - return message.Response; - default: - throw new RequestFailedException(message.Response); - } - } - - internal HttpMessage CreateListByFactoryNextPageRequest(string nextLink, string subscriptionId, string resourceGroupName, string factoryName) - { - var message = _pipeline.CreateMessage(); - var request = message.Request; - request.Method = RequestMethod.Get; - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendRawNextLink(nextLink, false); - request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - _userAgent.Apply(message); - return message; - } - - /// Lists triggers. - /// The URL to the next page of results. - /// The subscription identifier. - /// The resource group name. - /// The factory name. - /// The cancellation token to use. - /// , , or is null. - /// , or is an empty string, and was expected to be non-empty. - public async Task> ListByFactoryNextPageAsync(string nextLink, string subscriptionId, string resourceGroupName, string factoryName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(nextLink, nameof(nextLink)); - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(factoryName, nameof(factoryName)); - - using var message = CreateListByFactoryNextPageRequest(nextLink, subscriptionId, resourceGroupName, factoryName); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - switch (message.Response.Status) - { - case 200: - { - DataFactoryTriggerListResult value = default; - using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = DataFactoryTriggerListResult.DeserializeDataFactoryTriggerListResult(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - - /// Lists triggers. - /// The URL to the next page of results. - /// The subscription identifier. - /// The resource group name. - /// The factory name. - /// The cancellation token to use. - /// , , or is null. - /// , or is an empty string, and was expected to be non-empty. - public Response ListByFactoryNextPage(string nextLink, string subscriptionId, string resourceGroupName, string factoryName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(nextLink, nameof(nextLink)); - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(factoryName, nameof(factoryName)); - - using var message = CreateListByFactoryNextPageRequest(nextLink, subscriptionId, resourceGroupName, factoryName); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 200: - { - DataFactoryTriggerListResult value = default; - using var document = JsonDocument.Parse(message.Response.ContentStream); - value = DataFactoryTriggerListResult.DeserializeDataFactoryTriggerListResult(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Models/Activities/Base/ActivityEnumerator.cs b/src/dotnet/AzureDataFactory.TestingFramework/Models/Activities/Base/ActivityEnumerator.cs deleted file mode 100644 index a5f37a2a..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Models/Activities/Base/ActivityEnumerator.cs +++ /dev/null @@ -1,47 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -using AzureDataFactory.TestingFramework.Exceptions; - -namespace AzureDataFactory.TestingFramework.Models.Activities.Base; - -public class ActivityEnumerator -{ - private readonly IEnumerator _enumerator; - - /// - /// Initializes a new instance of the class. Can be used to easily iterate over a list of activities one by one. - /// - /// - public ActivityEnumerator(IEnumerable activities) - { - _enumerator = activities.GetEnumerator(); - } - - /// - /// Moves the enumerator to the next activity and returns it. - /// - /// The next activity - /// If there are no more activities available for evaluation - public PipelineActivity GetNext() - { - if (_enumerator.MoveNext()) - return _enumerator.Current!; - - throw new ActivityEnumeratorException("No more activities to evaluate"); - } - - /// - /// Moves the enumerator to the next activity and returns it. - /// - /// The next activity - /// If there are no more activities available for evaluation - /// If the returned activity is of a different type than requested - public TActivityType GetNext() where TActivityType : PipelineActivity - { - if (_enumerator.MoveNext()) - return _enumerator.Current as TActivityType ?? throw new ActivityEnumeratorTypeMismatchException($"Expected activity of type {typeof(TActivityType).Name} but found activity of type {_enumerator.Current?.GetType().Name}"); - - throw new ActivityEnumeratorException("No more activities to evaluate"); - } -} \ No newline at end of file diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Models/Activities/Base/IPipelineActivityResult.cs b/src/dotnet/AzureDataFactory.TestingFramework/Models/Activities/Base/IPipelineActivityResult.cs deleted file mode 100644 index 0abea1d6..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Models/Activities/Base/IPipelineActivityResult.cs +++ /dev/null @@ -1,11 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -namespace AzureDataFactory.TestingFramework.Models.Activities.Base; - -public interface IPipelineActivityResult -{ - public string Name { get; } - public DependencyCondition? Status { get; } - public object Output { get; } -} \ No newline at end of file diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Models/Activities/Base/PipelineActivity.cs b/src/dotnet/AzureDataFactory.TestingFramework/Models/Activities/Base/PipelineActivity.cs deleted file mode 100644 index aa664c17..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Models/Activities/Base/PipelineActivity.cs +++ /dev/null @@ -1,53 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -using System.Collections; -using Azure.Core.Expressions.DataFactory; -using AzureDataFactory.TestingFramework.Models.Activities.Base; -using AzureDataFactory.TestingFramework.Models.Base; -using AzureDataFactory.TestingFramework.Models.Pipelines; - -namespace AzureDataFactory.TestingFramework.Models; - -public partial class PipelineActivity : DataFactoryEntity, IPipelineActivityResult -{ - public DependencyCondition? Status { get; protected set; } - public object? Output { get; private set; } - - public PipelineActivity() - { - } - - public override DataFactoryEntity Evaluate(PipelineRunState state) - { - base.Evaluate(state); - - Status ??= DependencyCondition.Succeeded; - - return this; - } - - public bool AreDependencyConditionMet(PipelineRunState state) - { - foreach (var dependency in DependsOn) - { - var dependencyActivity = state.ScopedPipelineActivityResults.SingleOrDefault(a => a.Name == dependency.Activity); - - // If dependency is not yet evaluated, conditions are not met - if (dependencyActivity == null) - return false; - - // If dependency is evaluated, but the result is not as expected, conditions are not met - if (dependency.DependencyConditions.All(condition => condition != dependencyActivity.Status)) - return false; - } - - return true; - } - - public void SetResult(DependencyCondition status, TResult output) - { - Status = status; - Output = output; - } -} \ No newline at end of file diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Models/Activities/ControlActivity/ControlActivity.cs b/src/dotnet/AzureDataFactory.TestingFramework/Models/Activities/ControlActivity/ControlActivity.cs deleted file mode 100644 index f1676d5d..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Models/Activities/ControlActivity/ControlActivity.cs +++ /dev/null @@ -1,17 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -using AzureDataFactory.TestingFramework.Models.Activities.Base; -using AzureDataFactory.TestingFramework.Models.Pipelines; - -namespace AzureDataFactory.TestingFramework.Models; - -public partial class ControlActivity -{ - internal delegate IEnumerable EvaluateActivitiesDelegate(List activities, PipelineRunState state); - internal virtual IEnumerable EvaluateControlActivityIterations(PipelineRunState state, EvaluateActivitiesDelegate evaluateActivities) - { - // Note: unfortunately cannot use abstract method - return new List(); - } -} \ No newline at end of file diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Models/Activities/ControlActivity/ExecutePipelineActivity.cs b/src/dotnet/AzureDataFactory.TestingFramework/Models/Activities/ControlActivity/ExecutePipelineActivity.cs deleted file mode 100644 index fb02242b..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Models/Activities/ControlActivity/ExecutePipelineActivity.cs +++ /dev/null @@ -1,17 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -using AzureDataFactory.TestingFramework.Models.Base; -using AzureDataFactory.TestingFramework.Models.Pipelines; - -namespace AzureDataFactory.TestingFramework.Models; - -public partial class ExecutePipelineActivity : IIterationActivity -{ - internal List GetChildRunParameters(PipelineRunState state) - { - var parameters = state.Parameters.Where(p => p.Type == ParameterType.Global).ToList(); - parameters.AddRange(Parameters.Select(p => new RunParameter(ParameterType.Pipeline, p.Key, p.Value))); - return parameters; - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Models/Activities/ControlActivity/ForEachActivity.cs b/src/dotnet/AzureDataFactory.TestingFramework/Models/Activities/ControlActivity/ForEachActivity.cs deleted file mode 100644 index c236508a..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Models/Activities/ControlActivity/ForEachActivity.cs +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -using AzureDataFactory.TestingFramework.Models.Activities.Base; -using AzureDataFactory.TestingFramework.Models.Base; -using AzureDataFactory.TestingFramework.Models.Pipelines; - -namespace AzureDataFactory.TestingFramework.Models; - -public partial class ForEachActivity : IIterationActivity -{ - private List? _items; - public List IterationItems => _items ?? throw new InvalidOperationException("Items have not been evaluated yet."); - public override DataFactoryEntity Evaluate(PipelineRunState state) - { - _items = Items.Evaluate>(state); - - return base.Evaluate(state); - } - - internal override IEnumerable EvaluateControlActivityIterations(PipelineRunState state, EvaluateActivitiesDelegate evaluateActivities) - { - // Note: using enumerator to support yield return in foreach - using var enumerator = IterationItems.GetEnumerator(); - while (enumerator.MoveNext()) - { - var scopedState = state.CreateIterationScope(enumerator.Current); - foreach (var activity in evaluateActivities(Activities.ToList(), scopedState)) - yield return activity; - - state.AddScopedActivityResultsFromScopedState(scopedState); - } - } -} \ No newline at end of file diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Models/Activities/ControlActivity/IIterationActivity.cs b/src/dotnet/AzureDataFactory.TestingFramework/Models/Activities/ControlActivity/IIterationActivity.cs deleted file mode 100644 index 2ff2efee..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Models/Activities/ControlActivity/IIterationActivity.cs +++ /dev/null @@ -1,9 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -namespace AzureDataFactory.TestingFramework.Models; - -public interface IIterationActivity -{ - -} \ No newline at end of file diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Models/Activities/ControlActivity/IfConditionActivity.cs b/src/dotnet/AzureDataFactory.TestingFramework/Models/Activities/ControlActivity/IfConditionActivity.cs deleted file mode 100644 index 27d31e95..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Models/Activities/ControlActivity/IfConditionActivity.cs +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -using AzureDataFactory.TestingFramework.Models.Activities.Base; -using AzureDataFactory.TestingFramework.Models.Base; -using AzureDataFactory.TestingFramework.Models.Pipelines; - -namespace AzureDataFactory.TestingFramework.Models; - -public partial class IfConditionActivity : IIterationActivity -{ - private bool? _evaluatedExpression; - public bool EvaluatedExpression => _evaluatedExpression ?? throw new InvalidOperationException("Expression has not been evaluated yet."); - public override DataFactoryEntity Evaluate(PipelineRunState state) - { - base.Evaluate(state); - - _evaluatedExpression = Expression.Evaluate(state); - - return this; - } - - internal override IEnumerable EvaluateControlActivityIterations(PipelineRunState state, EvaluateActivitiesDelegate evaluateActivities) - { - var scopedState = state.CreateIterationScope(null); - var activities = EvaluatedExpression ? IfTrueActivities.ToList() : IfFalseActivities.ToList(); - foreach (var activity in evaluateActivities(activities, scopedState)) - yield return activity; - - state.AddScopedActivityResultsFromScopedState(scopedState); - } -} \ No newline at end of file diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Models/Activities/ControlActivity/UntilActivity.cs b/src/dotnet/AzureDataFactory.TestingFramework/Models/Activities/ControlActivity/UntilActivity.cs deleted file mode 100644 index b6421d99..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Models/Activities/ControlActivity/UntilActivity.cs +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -using AzureDataFactory.TestingFramework.Models.Activities.Base; -using AzureDataFactory.TestingFramework.Models.Pipelines; - -namespace AzureDataFactory.TestingFramework.Models; - -public partial class UntilActivity : IIterationActivity -{ - internal override IEnumerable EvaluateControlActivityIterations(PipelineRunState state, EvaluateActivitiesDelegate evaluateActivities) - { - do - { - var scopedState = state.CreateIterationScope(null); - foreach (var child in evaluateActivities(Activities.ToList(), scopedState)) - yield return child; - - state.AddScopedActivityResultsFromScopedState(scopedState); - } while (!Expression.Evaluate(state)); - } -} \ No newline at end of file diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Models/Activities/SetVariableActivity.cs b/src/dotnet/AzureDataFactory.TestingFramework/Models/Activities/SetVariableActivity.cs deleted file mode 100644 index 38d1f218..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Models/Activities/SetVariableActivity.cs +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -using AzureDataFactory.TestingFramework.Exceptions; -using AzureDataFactory.TestingFramework.Models.Pipelines; - -namespace AzureDataFactory.TestingFramework.Models; - -public partial class SetVariableActivity -{ - public override PipelineActivity Evaluate(PipelineRunState state) - { - base.Evaluate(state); - - // If SetVariable is used for setting return values, local variables are ignored - if (VariableName == "pipelineReturnValue") - return this; - - var existingVariable = state.Variables.SingleOrDefault(variable => variable.Name == VariableName) ?? - throw new VariableBeingEvaluatedDoesNotExistException(VariableName); - - var result = Value.Evaluate(state); - if (existingVariable is PipelineRunVariable existingStringVariable) - existingStringVariable.Value = result; - else if (existingVariable is PipelineRunVariable existingBoolVariable) - existingBoolVariable.Value = bool.Parse(result); - else - throw new Exception($"Unknown variable type: {existingVariable.GetType().Name}"); - - return this; - } -} \ No newline at end of file diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Models/Base/ParameterType.cs b/src/dotnet/AzureDataFactory.TestingFramework/Models/Base/ParameterType.cs deleted file mode 100644 index 853c5be6..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Models/Base/ParameterType.cs +++ /dev/null @@ -1,6 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -namespace AzureDataFactory.TestingFramework.Models.Base; - -public enum ParameterType { Pipeline, Global, Dataset, LinkedService } \ No newline at end of file diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Models/Base/RunParameter.cs b/src/dotnet/AzureDataFactory.TestingFramework/Models/Base/RunParameter.cs deleted file mode 100644 index a1f67106..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Models/Base/RunParameter.cs +++ /dev/null @@ -1,40 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -namespace AzureDataFactory.TestingFramework.Models.Base; - -public interface IRunParameter -{ - public string Name { get; } - public ParameterType Type { get; } -} -public class RunParameter : IRunParameter -{ - /// - /// Initializes a new instance of the class. Can be passed to a pipeline evaluation run. - /// - /// The type of the parameter (e.g. parameter, global, dataset, LinkedService). - /// The name of the parameter. Must match the name of the parameter in the pipeline being targeted. - /// The value of the parameter - public RunParameter(ParameterType type, string name, TValueType value) - { - Name = name; - Type = type; - Value = value; - } - - /// - /// The name of the parameter. Must match the name of the parameter in the pipeline being targeted. - /// - public string Name { get; } - - /// - /// The type of the parameter (e.g. parameter, global, dataset, LinkedService). - /// - public ParameterType Type { get; } - - /// - /// The value of the parameter - /// - public TValueType Value { get; } -} \ No newline at end of file diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Models/Base/RunState.cs b/src/dotnet/AzureDataFactory.TestingFramework/Models/Base/RunState.cs deleted file mode 100644 index 3aadee5a..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Models/Base/RunState.cs +++ /dev/null @@ -1,21 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -namespace AzureDataFactory.TestingFramework.Models.Base; - -public class RunState -{ - /// - /// Initializes a new instance of the class. Can be used to purely evaluate an activity in a non-pipeline context. - /// - /// The name of the parameter. Must match the name of the parameter in the pipeline being targeted. - public RunState(List parameters) - { - Parameters = parameters; - } - - /// - /// The name of the parameter. Must match the name of the parameter in the pipeline being targeted. - /// - public List Parameters { get; } -} \ No newline at end of file diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Models/DataFactoryEntity.cs b/src/dotnet/AzureDataFactory.TestingFramework/Models/DataFactoryEntity.cs deleted file mode 100644 index 9e99d804..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Models/DataFactoryEntity.cs +++ /dev/null @@ -1,84 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -using System.Collections; -using Azure.Core.Expressions.DataFactory; -using AzureDataFactory.TestingFramework.Models.Pipelines; - -namespace AzureDataFactory.TestingFramework.Models.Base; - -public abstract class DataFactoryEntity -{ - /// - /// Used to evaluate all the DataFactoryElements in the object graph. - /// - /// The pipeline state to be used for evaluating the expressions. - /// Reference to itself. - public virtual DataFactoryEntity Evaluate(PipelineRunState state) - { - EvaluateProperties(this, state, new List()); - - return this; - } - - private static void EvaluateProperties(object currentObject, PipelineRunState state, List visited) - { - if (visited.Contains(currentObject)) - return; - - visited.Add(currentObject); - - if (currentObject is string or DataFactoryExpression || currentObject.GetType().IsPrimitive) - return; - - // Loop through all properties of the type properties, evaluate them and loop through child properties - foreach (var property in currentObject.GetType().GetProperties()) - { - if (property.PropertyType.IsPrimitive || property.PropertyType == typeof(string) || property.PropertyType == typeof(List)) - continue; - - var propertyValue = property.GetValue(currentObject); - - if (propertyValue is null) - continue; - - if (propertyValue is DataFactoryElement stringDataFactoryElement) - { - stringDataFactoryElement.Evaluate(state); - continue; - } - - if (propertyValue is DataFactoryElement intDataFactoryElement) - { - intDataFactoryElement.Evaluate(state); - continue; - } - - if (propertyValue is DataFactoryElement boolDataFactoryElement) - { - boolDataFactoryElement.Evaluate(state); - continue; - } - - if (propertyValue is Dictionary dictionary) - { - foreach (var item in dictionary) - EvaluateProperties(item.Value, state, visited); - } - else if (propertyValue is IEnumerable enumerable) - { - foreach (var item in enumerable) - { - if (item is DataFactoryEntity) - continue; - - EvaluateProperties(item, state, visited); - } - } - else - { - EvaluateProperties(propertyValue, state, visited); - } - } - } -} \ No newline at end of file diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Models/DataFactoryExpression.cs b/src/dotnet/AzureDataFactory.TestingFramework/Models/DataFactoryExpression.cs deleted file mode 100644 index 0d2bff9e..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Models/DataFactoryExpression.cs +++ /dev/null @@ -1,21 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -using AzureDataFactory.TestingFramework.Functions; -using AzureDataFactory.TestingFramework.Models.Pipelines; - -namespace AzureDataFactory.TestingFramework.Models; - -public partial class DataFactoryExpression -{ - /// - /// Evaluates the expression by replacing all parameters and variables with their values and then evaluating the expression. - /// - /// The pipeline state to be used for evaluating the expressions. - /// The type of the expression result. Can be string, bool, int and long. - /// The evaluated result of the expression. - public TType Evaluate(PipelineRunState state) - { - return FunctionPart.Parse(Value).Evaluate(state); - } -} \ No newline at end of file diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Models/Pipelines/Pipeline.cs b/src/dotnet/AzureDataFactory.TestingFramework/Models/Pipelines/Pipeline.cs deleted file mode 100644 index fb341bcd..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Models/Pipelines/Pipeline.cs +++ /dev/null @@ -1,42 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -using AzureDataFactory.TestingFramework.Exceptions; -using AzureDataFactory.TestingFramework.Models; -using AzureDataFactory.TestingFramework.Models.Activities.Base; -using AzureDataFactory.TestingFramework.Models.Base; -using AzureDataFactory.TestingFramework.Models.Pipelines; - -namespace Azure.ResourceManager.DataFactory; - -public partial class Pipeline -{ - /// - /// Gets the activity by name. - /// - /// Name of the activity as described in `name` field of the activity - /// - /// Thrown if activity name cannot be found - public PipelineActivity GetActivityByName(string activityName) - { - return Activities.SingleOrDefault(activity => activity.Name == activityName) ?? throw new ActivityNotFoundException(activityName); - } - - /// - /// Validates whether the list of parameters are complete and not duplicate. - /// - /// - /// Thrown if a required pipeline parameter is not required - /// Thrown if a pipeline parameter is provided more than once - internal void ValidateParameters(List parameters) - { - //Check if all parameters are provided - foreach (var parameter in Parameters.Where(parameter => parameters.All(p => p.Name != parameter.Key))) - throw new PipelineParameterNotProvidedException($"Parameter {parameter.Key} is not provided"); - - // Check if no duplicate parameters are provided - var duplicateParameters = parameters.GroupBy(x => new { x.Name, x.Type }).Where(g => g.Count() > 1).Select(y => y.Key).ToList(); - if (duplicateParameters.Any()) - throw new PipelineDuplicateParameterProvidedException($"Duplicate parameters provided: {string.Join(", ", duplicateParameters.Select(x => $"{x.Name} ({x.Type})"))}"); - } -} \ No newline at end of file diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Models/Pipelines/PipelineFactory.cs b/src/dotnet/AzureDataFactory.TestingFramework/Models/Pipelines/PipelineFactory.cs deleted file mode 100644 index 5634d0b5..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Models/Pipelines/PipelineFactory.cs +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -using System.Text.Json; -using Azure.ResourceManager.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models.Pipelines; - -public static class PipelineFactory -{ - /// - /// Parses the pipeline entity from a file. - /// - /// The path to the resource json file - /// A deserialized pipeline that can be evaluated for assertions - public static Pipeline ParseFromFile(string pipelineResourceJson) - { - var pipelineJson = File.ReadAllText(pipelineResourceJson); - var pipelineJsonElement = JsonSerializer.Deserialize(pipelineJson); - return Pipeline.DeserializeDataFactoryPipelineData(pipelineJsonElement); - } -} \ No newline at end of file diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Models/Pipelines/PipelineRunState.cs b/src/dotnet/AzureDataFactory.TestingFramework/Models/Pipelines/PipelineRunState.cs deleted file mode 100644 index e26874e0..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Models/Pipelines/PipelineRunState.cs +++ /dev/null @@ -1,116 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -using Azure; -using AzureDataFactory.TestingFramework.Models.Activities.Base; -using AzureDataFactory.TestingFramework.Models.Base; - -namespace AzureDataFactory.TestingFramework.Models.Pipelines; - -/// -/// The pipeline run state stores the state of the pipeline run just like Azure Data Factory would do. It stores the parameters and variables and the results of the activities. -/// -public class PipelineRunState : RunState -{ - /// - /// The variables of a pipeline run. Can be set upon creation of the state or during the evaluation of the SetVariable activities. - /// - public List Variables { get; } - - /// - /// The current item() of a ForEach activity. - /// - public string? IterationItem { get; set; } - - /// - /// The complete list of activity results of the pipeline run so far. - /// - public List PipelineActivityResults { get; } - - /// - /// The scoped list of activity results of the pipeline run so far. A scope is created for each ControlActivity like ForEach, If and Until activities. - /// - public List ScopedPipelineActivityResults { get; } - - /// - /// Initializes a new instance of the class. - /// - /// The global and regular parameters to be used for evaluating expressions. - /// The initial variables specification to use for the pipeline run. - public PipelineRunState(List parameters, IDictionary variables) : base(parameters) - { - Variables = variables.Select(variable => - { - if (variable.Value.VariableType == PipelineVariableType.String) - return new PipelineRunVariable(variable.Key, variable.Value.DefaultValue?.ToString()); - - if (variable.Value.VariableType == PipelineVariableType.Bool) - return new PipelineRunVariable(variable.Key, variable.Value.DefaultValue != null && bool.Parse(variable.Value.DefaultValue.ToString())); - - // TODO: better arrays support - if (variable.Value.VariableType == PipelineVariableType.Array) - return (IPipelineRunVariable)new PipelineRunVariable(variable.Key, variable.Value.DefaultValue?.ToString()); - - throw new NotImplementedException($"Unknown variable type: {variable.Value.VariableType}"); - }).ToList(); - PipelineActivityResults = new List(); - ScopedPipelineActivityResults = new List(); - IterationItem = null; - } - - /// - /// Initializes a new instance of the class. - /// - /// The global and regular parameters to be used for evaluating expressions. - /// The initial variables specification to use for the pipeline run. - /// The results of previous activities to use for validating dependencyConditions and evaluating expressions (i.e. activity('activityName').output) - /// The current item() of a ForEach activity. - public PipelineRunState(List parameters, List variables, List activityResults, string? iterationItem) : base(parameters) - { - Variables = variables; - PipelineActivityResults = new List(); - PipelineActivityResults.AddRange(activityResults); - ScopedPipelineActivityResults = new List(); - IterationItem = iterationItem; - } - - /// - /// Initializes a new instance of the class. - /// - public PipelineRunState() : base(new List()) - { - Variables = new List(); - PipelineActivityResults = new List(); - ScopedPipelineActivityResults = new List(); - IterationItem = null; - } - - /// - /// Registers the result of an activity to the pipeline run state. - /// - /// The results of previous activities to use for validating dependencyConditions and evaluating expressions (i.e. activity('activityName').output) - public void AddActivityResult(IPipelineActivityResult pipelineActivityResult) - { - ScopedPipelineActivityResults.Add(pipelineActivityResult); - PipelineActivityResults.Add(pipelineActivityResult); - } - - /// - /// Registers all the activity results of a childScope into the current state. - /// - /// The scoped childState - public void AddScopedActivityResultsFromScopedState(PipelineRunState scopedState) - { - PipelineActivityResults.AddRange(scopedState.ScopedPipelineActivityResults); - } - - /// - /// Used to create a new scope for a ControlActivity like ForEach, If and Until activities. - /// - /// Should only be set for ForEach activities - /// - public PipelineRunState CreateIterationScope(string? iterationItem) - { - return new PipelineRunState(Parameters, Variables, PipelineActivityResults, iterationItem); - } -} \ No newline at end of file diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Models/Pipelines/PipelineRunVariable.cs b/src/dotnet/AzureDataFactory.TestingFramework/Models/Pipelines/PipelineRunVariable.cs deleted file mode 100644 index 27cb8685..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Models/Pipelines/PipelineRunVariable.cs +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -namespace AzureDataFactory.TestingFramework.Models.Pipelines; - -public interface IPipelineRunVariable -{ - public string Name { get; } -} -public class PipelineRunVariable : IPipelineRunVariable -{ - /// - /// Initializes a new instance of the class. To be used for defining initial state of variables for a pipeline run. - /// - /// Name of the variable - /// Initial value to set for this variable - public PipelineRunVariable(string name, TType? defaultValue = default) - { - Name = name; - Value = defaultValue; - } - - /// - /// The name of the variable as defined in the pipeline. - /// - public string Name { get; } - - /// - /// The value of the variable. Can be set during the evaluation of the SetVariable activity. - /// - public TType? Value { get; set; } -} \ No newline at end of file diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Models/Repositories/DataFactoryRepository.cs b/src/dotnet/AzureDataFactory.TestingFramework/Models/Repositories/DataFactoryRepository.cs deleted file mode 100644 index 31260cce..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Models/Repositories/DataFactoryRepository.cs +++ /dev/null @@ -1,47 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -using Azure.ResourceManager.DataFactory; -using AzureDataFactory.TestingFramework.Exceptions; - -namespace AzureDataFactory.TestingFramework.Models.Repositories; - -public class DataFactoryRepository -{ - /// - /// Initializes the repository with pipelines, linkedServices, datasets and triggers which will be used to evaluate child entities upon pipeline evaluation - /// - /// List of deserialized pipelines - /// List of deserialized linkedServices - /// List of deserialized datasets - /// List of deserialized triggers - public DataFactoryRepository(List pipelines, List linkedServices, List datasets, List triggers) - { - Pipelines = pipelines; - LinkedServices = linkedServices; - Datasets = datasets; - Triggers = triggers; - } - - public DataFactoryRepository() - { - Pipelines = new List(); - LinkedServices = new List(); - Datasets = new List(); - Triggers = new List(); - } - - public List Pipelines { get; private set; } - public List LinkedServices { get; private set; } - public List Datasets { get; private set; } - public List Triggers { get; private set; } - - public Pipeline GetPipelineByName(string name) - { - var pipeline = Pipelines.SingleOrDefault(pipeline => pipeline.Name == name); - if (pipeline == null) - throw new PipelineNotFoundException(name); - - return pipeline; - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Models/Repositories/DataFactoryRepositoryFactory.cs b/src/dotnet/AzureDataFactory.TestingFramework/Models/Repositories/DataFactoryRepositoryFactory.cs deleted file mode 100644 index 70bc8c8a..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Models/Repositories/DataFactoryRepositoryFactory.cs +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -using System.Text.Json; -using Azure.ResourceManager.DataFactory; - -namespace AzureDataFactory.TestingFramework.Models.Repositories; - -public static class DataFactoryRepositoryFactory -{ - public static DataFactoryRepository ParseFromFolder(string folderPath) - { - var pipelines = GetDataFactoryEntitiesByFolderPath(Path.Combine(folderPath, "pipeline"), Pipeline.DeserializeDataFactoryPipelineData); - var linkedServices = GetDataFactoryEntitiesByFolderPath(Path.Combine(folderPath, "linkedService"), DataFactoryLinkedServiceData.DeserializeDataFactoryLinkedServiceData); - var datasets = GetDataFactoryEntitiesByFolderPath(Path.Combine(folderPath, "dataset"), DataFactoryDatasetData.DeserializeDataFactoryDatasetData); - var triggers = GetDataFactoryEntitiesByFolderPath(Path.Combine(folderPath, "trigger"), DataFactoryTriggerData.DeserializeDataFactoryTriggerData); - - return new DataFactoryRepository(pipelines, linkedServices, datasets, triggers); - } - - private static List GetDataFactoryEntitiesByFolderPath(string folderPath, Func deserialize) where TType : class - { - if (!Directory.Exists(folderPath)) - return new List(); - - return Directory.GetFiles(folderPath, "*.json") - .Select(File.ReadAllText) - .Select(json => JsonSerializer.Deserialize(json)) - .Select(deserialize) - .ToList(); - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Models/TestActivityResult.cs b/src/dotnet/AzureDataFactory.TestingFramework/Models/TestActivityResult.cs deleted file mode 100644 index 7f9495bc..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Models/TestActivityResult.cs +++ /dev/null @@ -1,49 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -using AzureDataFactory.TestingFramework.Models; -using AzureDataFactory.TestingFramework.Models.Activities.Base; - -namespace AzureDataFactory.TestingFramework; - -public class TestActivityResult : IPipelineActivityResult -{ - public string Name { get; } - public DependencyCondition? Status { get; } - public object Output { get; } - - /// - /// Initializes a new instance of the class with a default status of Succeeded. - /// - /// Name of the activity being represented - public TestActivityResult(string name) - { - Name = name; - Status = DependencyCondition.Succeeded; - Output = new Dictionary(); - } - - /// - /// Initializes a new instance of the class with a default status of Succeeded. - /// - /// Name of the activity being represented - /// The output of the activity which will be used when referred to from other activities - public TestActivityResult(string name, object output) - { - Name = name; - Status = DependencyCondition.Succeeded; - Output = output; - } - - /// - /// Initializes a new instance of the class. - /// - /// Name of the activity being represented - /// The status outcome of the activity, which will be used to determine execution eligibility of other activities. - public TestActivityResult(string name, DependencyCondition status) - { - Name = name; - Status = status; - Output = new Dictionary(); - } -} \ No newline at end of file diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Models/TestFramework.cs b/src/dotnet/AzureDataFactory.TestingFramework/Models/TestFramework.cs deleted file mode 100644 index ea4f3e7b..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Models/TestFramework.cs +++ /dev/null @@ -1,114 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -using Azure.ResourceManager.DataFactory; -using AzureDataFactory.TestingFramework.Exceptions; -using AzureDataFactory.TestingFramework.Models.Activities.Base; -using AzureDataFactory.TestingFramework.Models.Base; -using AzureDataFactory.TestingFramework.Models.Pipelines; -using AzureDataFactory.TestingFramework.Models.Repositories; - -namespace AzureDataFactory.TestingFramework.Models; - -public class TestFramework -{ - private readonly bool _shouldEvaluateChildPipelines; - public DataFactoryRepository Repository { get; } - - public TestFramework(string? dataFactoryFolderPath = null, bool shouldEvaluateChildPipelines = false) - { - Repository = dataFactoryFolderPath != null ? DataFactoryRepositoryFactory.ParseFromFolder(dataFactoryFolderPath) : new DataFactoryRepository(); - _shouldEvaluateChildPipelines = shouldEvaluateChildPipelines; - } - - /// - /// Get an enumerator to yield the evaluation of the pipeline activities one by one using the provided parameters. The order of activity execution is simulated based on the dependencies. Any expression part of the activity is evaluated based on the state of the pipeline. - /// - /// The pipeline to evaluate. - /// The global and regular parameters to be used for evaluating expressions. - /// - /// Thrown if a required pipeline parameter is not required - /// Thrown if a pipeline parameter is provided more than once - public IEnumerable Evaluate(Pipeline pipeline, List parameters) - { - pipeline.ValidateParameters(parameters); - var state = new PipelineRunState(parameters, pipeline.Variables); - return Evaluate(pipeline.Activities.ToList(), state); - } - - public ActivityEnumerator EvaluateWithEnumerator(Pipeline pipeline, List parameters) - { - return new ActivityEnumerator(Evaluate(pipeline, parameters)); - } - - /// - /// Evaluates all pipeline activities using the provided parameters. The order of activity execution is simulated based on the dependencies. Any expression part of the activity is evaluated based on the state of the pipeline. - /// - /// The pipeline to evaluate. - /// The global and regular parameters to be used for evaluating expressions. - /// A list of evaluated pipeline activities - /// Thrown if a required pipeline parameter is not required - /// Thrown if a pipeline parameter is provided more than once - public List EvaluateAll(Pipeline pipeline, List parameters) - { - return Evaluate(pipeline, parameters).ToList(); - } - - /// - /// Evaluates a single activity given a state. Any expression part of the activity is evaluated based on the state of the pipeline. - /// - /// The activity to evaluate - /// The state which will be used to evaluate the expressions - /// A list of evaluated pipelines, which can be more than 1 due to possible child activities. - public IEnumerable Evaluate(PipelineActivity activity, PipelineRunState state) - { - return Evaluate(new List { activity }, state); - } - - /// - /// Evaluates all given activities using the provided parameters. The order of activity execution is simulated based on the dependencies. Any expression part of the activity is evaluated based on the state of the pipeline. - /// - /// The activities to evaluate - /// The state which will be used to evaluate the expressions - /// A list of evaluated pipelines - public IEnumerable Evaluate(List activities, PipelineRunState state) - { - while (state.ScopedPipelineActivityResults.Count != activities.Count) - { - var anyActivityEvaluated = false; - foreach (var activity in activities - .Where(activity => !state.ScopedPipelineActivityResults.Contains(activity)) - .Where(activity => activity.AreDependencyConditionMet(state))) - { - var evaluatedActivity = (PipelineActivity)activity.Evaluate(state); - if (evaluatedActivity is not IIterationActivity || (evaluatedActivity is ExecutePipelineActivity && !_shouldEvaluateChildPipelines)) - yield return evaluatedActivity; - - anyActivityEvaluated = true; - state.AddActivityResult(activity); - - if (activity is IIterationActivity) - { - if (activity is ExecutePipelineActivity executePipelineActivity && _shouldEvaluateChildPipelines) - { - var pipeline = Repository.GetPipelineByName(executePipelineActivity.Pipeline.ReferenceName); - - // Evaluate the pipeline with its own scope - foreach (var childActivity in Evaluate(pipeline, executePipelineActivity.GetChildRunParameters(state))) - yield return childActivity; - } - else if (activity is ControlActivity controlActivity) - { - foreach (var childActivity in controlActivity.EvaluateControlActivityIterations(state, Evaluate)) - yield return childActivity; - } - } - } - - if (!anyActivityEvaluated) - { - throw new ActivitiesEvaluatorInvalidDependencyException("Validate that there are no circular dependencies or whether activity results were not set correctly."); - } - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Shared/DataFactoryElement.cs b/src/dotnet/AzureDataFactory.TestingFramework/Shared/DataFactoryElement.cs deleted file mode 100644 index 15030650..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Shared/DataFactoryElement.cs +++ /dev/null @@ -1,207 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -using System.ComponentModel; -using System.Text.Json.Serialization; -using AzureDataFactory.TestingFramework.Functions; -using AzureDataFactory.TestingFramework.Models.Pipelines; - -namespace Azure.Core.Expressions.DataFactory -{ - /// - /// A class representing either a literal value, a masked literal value (also known as a SecureString), an expression, or a Key Vault reference. - /// For details on DataFactoryExpressions see https://learn.microsoft.com/en-us/azure/data-factory/control-flow-expression-language-functions#expressions. - /// - /// Can be one of , , , , , - /// , , , where TElement has a defined, - /// or . -#pragma warning disable SA1649 // File name should match first type name - [JsonConverter(typeof(DataFactoryElementJsonConverter))] - public sealed class DataFactoryElement -#pragma warning restore SA1649 // File name should match first type name - { - private readonly T? _literal; - private readonly DataFactoryElementKind _kind; - internal DataFactorySecretBaseDefinition? Secret { get; } - internal string? ExpressionString { get; } - private T? _expressionValue; - - public DataFactoryElement(T? literal) - { - _kind = DataFactoryElementKind.Literal; - _literal = literal; - } - - /// - /// Gets the kind of the element. - /// - public DataFactoryElementKind Kind => _kind; - - /// - /// Gets the literal value if the element has a of . - /// - /// is not . - public T? Literal - { - get - { - if (_kind == DataFactoryElementKind.Literal) - return _literal; - throw new InvalidOperationException("Cannot get value from non-literal."); - } - } - - public T Value - { - get - { - if (_kind == DataFactoryElementKind.Literal) - return _literal!; - - if (_kind == DataFactoryElementKind.Expression) - return _expressionValue ?? throw new ExpressionNotEvaluatedException(); - - if (_kind == DataFactoryElementKind.SecretString) - return (T)(object)((DataFactorySecretString)Secret!).Value; - - if (_kind == DataFactoryElementKind.KeyVaultSecretReference) - return (T)(object)((DataFactoryKeyVaultSecretReference)Secret!).SecretName.ToString(); - - throw new InvalidOperationException("Cannot get value from non-literal."); - } - } - - public DataFactoryElement(string? expressionString, DataFactoryElementKind kind) - { - _kind = kind; - ExpressionString = expressionString; - } - - public DataFactoryElement(DataFactorySecretBaseDefinition secret, DataFactoryElementKind kind) - { - _kind = kind; - Secret = secret; - } - - /// - public override string? ToString() - { - if (_kind == DataFactoryElementKind.Literal) - { - return _literal?.ToString(); - } - if (_kind == DataFactoryElementKind.SecretString) - { - return ((DataFactorySecretString)Secret!).Value; - } - if (_kind == DataFactoryElementKind.KeyVaultSecretReference) - { - // TODO should this include the version and the Reference name? - return ((DataFactoryKeyVaultSecretReference)Secret!).SecretName.ToString(); - } - - return ExpressionString; - } - - /// - /// Converts a literal value into a representing that value. - /// - /// The literal value. - public static implicit operator DataFactoryElement(T literal) => new DataFactoryElement(literal); - - /// - /// Converts a into an evaluated or literal value. - /// - /// - /// - public static implicit operator T(DataFactoryElement element) => element.Value; - - /// - /// Creates a new instance of using the expression value. - /// - /// The expression value. -#pragma warning disable CA1000 // Do not declare static members on generic types - public static DataFactoryElement FromExpression(string expression) -#pragma warning restore CA1000 // Do not declare static members on generic types - { - return new DataFactoryElement(expression, DataFactoryElementKind.Expression); - } - - /// - /// Creates a new instance of using the KeyVaultSecretReference value. - /// - /// The key vault secret reference value. -#pragma warning disable CA1000 // Do not declare static members on generic types - public static DataFactoryElement FromKeyVaultSecretReference(DataFactoryKeyVaultSecretReference keyVaultSecretReference) -#pragma warning restore CA1000 // Do not declare static members on generic types - { - return new DataFactoryElement(keyVaultSecretReference, DataFactoryElementKind.KeyVaultSecretReference); - } - - /// - /// Creates a new instance of using the KeyVaultSecretReference value. - /// - /// The unmasked string value. -#pragma warning disable CA1000 // Do not declare static members on generic types - public static DataFactoryElement FromSecretString(DataFactorySecretString secretString) -#pragma warning restore CA1000 // Do not declare static members on generic types - { - return new DataFactoryElement(secretString, DataFactoryElementKind.SecretString); - } - - /// - /// Creates a new instance of using the KeyVaultSecretReference value. - /// - /// The unmasked string value. -#pragma warning disable CA1000 // Do not declare static members on generic types - internal static DataFactoryElement FromSecretBase(DataFactorySecretBaseDefinition secretBase) -#pragma warning restore CA1000 // Do not declare static members on generic types - { - throw new NotImplementedException(); - //return new DataFactoryElement(secretBase, new DataFactoryElementKind(secretBase.SecretBaseType!)); - } - - /// - /// Creates a new instance of using the literal value. - /// - /// The literal value. -#pragma warning disable CA1000 // Do not declare static members on generic types - public static DataFactoryElement FromLiteral(T? literal) -#pragma warning restore CA1000 // Do not declare static members on generic types - { - return new DataFactoryElement(literal); - } - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override bool Equals(object? obj) - { - return base.Equals(obj); - } - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override int GetHashCode() - { - return base.GetHashCode(); - } - - public T Evaluate(PipelineRunState state) - { - if (Kind == DataFactoryElementKind.Expression && ExpressionString != null) - { - _expressionValue = FunctionPart.Parse(ExpressionString).Evaluate(state); - return _expressionValue; - } - - return Literal; - } - } - - public class ExpressionNotEvaluatedException : Exception - { - public ExpressionNotEvaluatedException() - { - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Shared/DataFactoryElementJsonConverter.cs b/src/dotnet/AzureDataFactory.TestingFramework/Shared/DataFactoryElementJsonConverter.cs deleted file mode 100644 index e15f8769..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Shared/DataFactoryElementJsonConverter.cs +++ /dev/null @@ -1,364 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -using System.Reflection; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Azure.Core.Expressions.DataFactory -{ - internal class DataFactoryElementJsonConverter : JsonConverter - { - public override bool CanConvert(Type typeToConvert) - { - return typeToConvert == typeof(DataFactoryElement) || - typeToConvert == typeof(DataFactoryElement) || - typeToConvert == typeof(DataFactoryElement) || - typeToConvert == typeof(DataFactoryElement) || - typeToConvert == typeof(DataFactoryElement) || - typeToConvert == typeof(DataFactoryElement) || - typeToConvert == typeof(DataFactoryElement) || - typeToConvert == typeof(DataFactoryElement) || - typeToConvert == typeof(DataFactoryElement) || - typeToConvert == typeof(DataFactoryElement) || - typeToConvert == typeof(DataFactoryElement) || - typeToConvert == typeof(DataFactoryElement) || - typeToConvert == typeof(DataFactoryElement>) || - typeToConvert == typeof(DataFactoryElement>) || - TryGetGenericDataFactoryList(typeToConvert, out _); - } - - public override object? Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) - { - using var document = JsonDocument.ParseValue(ref reader); - if (typeToConvert == typeof(DataFactoryElement)) - return Deserialize(document.RootElement); - if (typeToConvert == typeof(DataFactoryElement) || typeToConvert == typeof(DataFactoryElement)) - return Deserialize(document.RootElement); - if (typeToConvert == typeof(DataFactoryElement) || typeToConvert == typeof(DataFactoryElement)) - return Deserialize(document.RootElement); - if (typeToConvert == typeof(DataFactoryElement) || typeToConvert == typeof(DataFactoryElement)) - return Deserialize(document.RootElement); - if (typeToConvert == typeof(DataFactoryElement) || typeToConvert == typeof(DataFactoryElement)) - return Deserialize(document.RootElement); - if (typeToConvert == typeof(DataFactoryElement) || typeToConvert == typeof(DataFactoryElement)) - return Deserialize(document.RootElement); - if (typeToConvert == typeof(DataFactoryElement)) - return Deserialize(document.RootElement); - if (typeToConvert == typeof(DataFactoryElement>)) - return Deserialize>(document.RootElement); - if (typeToConvert == typeof(DataFactoryElement>)) - return Deserialize>(document.RootElement); - if (TryGetGenericDataFactoryList(typeToConvert, out Type? genericListType)) - { - var methodInfo = GetGenericSerializationMethod(genericListType!, nameof(DeserializeGenericList)); - return methodInfo!.Invoke(null, new object[] { document.RootElement })!; - } - - throw new InvalidOperationException($"Unable to convert {typeToConvert.Name} into a DataFactoryElement"); - } - - public override void Write(Utf8JsonWriter writer, object? value, JsonSerializerOptions options) - { - switch (value) - { - case null: - writer.WriteNullValue(); - break; - case DataFactoryElement stringElement: - Serialize(writer, stringElement); - break; - case DataFactoryElement intElement: - Serialize(writer, intElement); - break; - case DataFactoryElement nullableIntElement: - Serialize(writer, nullableIntElement); - break; - case DataFactoryElement doubleElement: - Serialize(writer, doubleElement); - break; - case DataFactoryElement nullableDoubleElement: - Serialize(writer, nullableDoubleElement); - break; - case DataFactoryElement boolElement: - Serialize(writer, boolElement); - break; - case DataFactoryElement nullableBoolElement: - Serialize(writer, nullableBoolElement); - break; - case DataFactoryElement dtoElement: - Serialize(writer, dtoElement); - break; - case DataFactoryElement nullableDtoElement: - Serialize(writer, nullableDtoElement); - break; - case DataFactoryElement timespanElement: - Serialize(writer, timespanElement); - break; - case DataFactoryElement nullableTimespanElement: - Serialize(writer, nullableTimespanElement); - break; - case DataFactoryElement uriElement: - Serialize(writer, uriElement); - break; - case DataFactoryElement?> stringListElement: - Serialize?>(writer, stringListElement); - break; - case DataFactoryElement?> keyValuePairElement: - Serialize(writer, keyValuePairElement); - break; - default: - { - if (TryGetGenericDataFactoryList(value.GetType(), out Type? genericListType)) - { - var methodInfo = GetGenericSerializationMethod(genericListType!, nameof(SerializeGenericList)); - methodInfo!.Invoke(null, new object[] { writer, value }); - } - else - { - throw new InvalidOperationException($"Unable to convert {value.GetType().Name} into a DataFactoryExpression"); - } - - break; - } - } - } - - private static MethodInfo GetGenericSerializationMethod(Type typeToConvert, string methodName) - { - return typeof(DataFactoryElementJsonConverter) - .GetMethod( - methodName, - BindingFlags.Static | BindingFlags.NonPublic)! - .MakeGenericMethod(typeToConvert.GenericTypeArguments[0].GenericTypeArguments[0]); - } - - private static bool TryGetGenericDataFactoryList(Type type, out Type? genericType) - { - genericType = null; - - if (!type.IsGenericType || type.GetGenericTypeDefinition() != typeof(DataFactoryElement<>)) - return false; - - Type firstGeneric = type.GenericTypeArguments[0]; - - if (!firstGeneric.IsGenericType || !IsGenericListType(type.GenericTypeArguments[0].GetGenericTypeDefinition())) - return false; - - Type secondGeneric = type.GenericTypeArguments[0].GenericTypeArguments[0]; - - if (secondGeneric.GetCustomAttributes().Any(a => a.GetType() == typeof(JsonConverterAttribute))) - { - genericType = type; - return true; - } - - return false; - } - - private static bool IsGenericListType(Type type) => type == typeof(IList<>); - - private static void Serialize(Utf8JsonWriter writer, DataFactoryElement element) - { - if (element.Kind == DataFactoryElementKind.Literal) - { - switch (element.Literal) - { - case TimeSpan timeSpan: - writer.WriteStringValue(timeSpan, "c"); - break; - case Uri uri: - writer.WriteStringValue(uri.AbsoluteUri); - break; - case IList stringList: - writer.WriteStartArray(); - foreach (string? item in stringList) - { - writer.WriteStringValue(item); - } - writer.WriteEndArray(); - break; - case IDictionary dictionary: - writer.WriteStartObject(); - foreach (KeyValuePair pair in dictionary) - { - writer.WritePropertyName(pair.Key); - writer.WriteStringValue(pair.Value); - } - writer.WriteEndObject(); - break; - default: - writer.WriteObjectValue(element.Literal!); - break; - } - } - else if (element.Kind == DataFactoryElementKind.Expression) - { - SerializeExpression(writer, element.ExpressionString!); - } - else - { - writer.WriteObjectValue(element.Secret!); - } - } - - private static void SerializeGenericList(Utf8JsonWriter writer, DataFactoryElement?> element) - { - if (element.Kind == DataFactoryElementKind.Literal) - { - if (element.Literal == null) - { - writer.WriteNullValue(); - return; - } - - writer.WriteStartArray(); - foreach (T? elem in element.Literal!) - { - // underlying T must have a JsonConverter defined - JsonSerializer.Serialize(writer, elem!); - } - writer.WriteEndArray(); - } - else if (element.Kind == DataFactoryElementKind.Expression) - { - SerializeExpression(writer, element.ExpressionString!); - } - else - { - writer.WriteObjectValue(element.Secret!); - } - } - - private static void SerializeExpression(Utf8JsonWriter writer, string value) - { - writer.WriteStartObject(); - writer.WritePropertyName("type"); - writer.WriteStringValue("Expression"); - writer.WritePropertyName("value"); - writer.WriteStringValue(value); - writer.WriteEndObject(); - } - - private static DataFactoryElement?> DeserializeGenericList(JsonElement json) - { - if (json.ValueKind == JsonValueKind.Array) - { - var list = new List(); - foreach (var item in json.EnumerateArray()) - { - list.Add(item.ValueKind == JsonValueKind.Null ? default : JsonSerializer.Deserialize(item.GetRawText()!)); - } - - return new DataFactoryElement?>(list); - } - - // Expression, SecretString, and AzureKeyVaultReference handling - if (TryGetNonLiteral(json, out DataFactoryElement?>? element)) - { - return element!; - } - - throw new InvalidOperationException($"Cannot deserialize an {json.ValueKind} as a list."); - } - - internal static DataFactoryElement? Deserialize(JsonElement json) - { - T? value = default; - - if (json.ValueKind == JsonValueKind.Null) - { - return null; - } - - // Expression, SecretString, and AzureKeyVaultReference handling - if (TryGetNonLiteral(json, out DataFactoryElement? element)) - { - return element; - } - - // Literal handling - if (json.ValueKind == JsonValueKind.Object && typeof(T) == typeof(IDictionary)) - { - var dictionary = new Dictionary(); - foreach (var item in json.EnumerateObject()) - { - dictionary.Add(item.Name, item.Value.GetString()!); - } - - return new DataFactoryElement((T)(object)dictionary); - } - - if (json.ValueKind == JsonValueKind.Array && typeof(T) == typeof(IList)) - { - var list = new List(); - foreach (var item in json.EnumerateArray()) - { - list.Add(item.ValueKind == JsonValueKind.Null ? default : JsonSerializer.Deserialize(item.GetRawText()!)); - } - - return new DataFactoryElement((T)(object)list); - } - - if (typeof(T) == typeof(DateTimeOffset)) - { - return new DataFactoryElement((T)(object)json.GetDateTimeOffset("O")); - } - - if (typeof(T) == typeof(TimeSpan) || typeof(T) == typeof(TimeSpan?)) - { - return new DataFactoryElement((T)(object)json.GetTimeSpan("c")); - } - - if (typeof(T) == typeof(Uri)) - { - return new DataFactoryElement((T)(object)new Uri(json.GetString()!)); - } - - var obj = json.GetObject(); - if (obj is not null) - value = (T)obj; - - return new DataFactoryElement(value); - } - - private static bool TryGetNonLiteral(JsonElement json, out DataFactoryElement? element) - { - element = null; - if (json.ValueKind == JsonValueKind.Object && json.TryGetProperty("type", out JsonElement typeValue)) - { - if (typeValue.ValueEquals("Expression")) - { - if (json.EnumerateObject().Count() != 2) - { - // Expression should only have two properties: type and value - return false; - } - - string expressionValue = null; - if (json.TryGetProperty("value", out var value)) - { - expressionValue = value.GetString(); - } - else if (json.TryGetProperty("content", out var content)) - { - expressionValue = content.GetString(); - } - else - { - throw new JsonException("Expression object does not have a value or content property."); - } - - element = new DataFactoryElement(expressionValue, DataFactoryElementKind.Expression); - } - else - { - throw new NotImplementedException(); - //element = DataFactoryElement.FromSecretBase(DataFactorySecretBaseDefinition.DeserializeDataFactorySecretBaseDefinition(json)!); - } - } - - return element != null; - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Shared/DataFactoryElementKind.cs b/src/dotnet/AzureDataFactory.TestingFramework/Shared/DataFactoryElementKind.cs deleted file mode 100644 index fe0f1bdc..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Shared/DataFactoryElementKind.cs +++ /dev/null @@ -1,82 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -using System; - -namespace Azure.Core.Expressions.DataFactory -{ - /// - /// Represents the kind of data factory element. - /// - public readonly struct DataFactoryElementKind : IEquatable - { - private readonly string _kind; - - /// - /// A literal element. - /// - public static DataFactoryElementKind Literal { get; } = new DataFactoryElementKind("Literal"); - - /// - /// An expression element. - /// - public static DataFactoryElementKind Expression { get; } = new DataFactoryElementKind("Expression"); - - /// - /// A Secret string element. - /// - public static DataFactoryElementKind SecretString { get; } = new DataFactoryElementKind("SecureString"); - - /// - /// A KeyVaultSecretReference element. - /// - public static DataFactoryElementKind KeyVaultSecretReference { get; } = new DataFactoryElementKind("AzureKeyVaultSecret"); - - /// - /// Creates an instance of . - /// - /// The element kind. - public DataFactoryElementKind(string kind) - { - Argument.AssertNotNull(kind, nameof(kind)); - - _kind = kind; - } - - /// - public bool Equals(DataFactoryElementKind other) - { - return string.Equals(_kind, other._kind, StringComparison.Ordinal); - } - - /// - public override bool Equals(object? obj) - => (obj is DataFactoryElementKind other && Equals(other)) || - (obj is string str && str.Equals(_kind, StringComparison.Ordinal)); - - /// - public override int GetHashCode() - => _kind?.GetHashCode() ?? 0; - - /// - /// Compares equality of two instances. - /// - /// The kind to compare. - /// The kind to compare against. - /// true if values are equal for and , otherwise false. - public static bool operator ==(DataFactoryElementKind left, DataFactoryElementKind right) - => left.Equals(right); - - /// - /// Compares inequality of two instances. - /// - /// The kind to compare. - /// The kind to compare against. - /// true if values are equal for and , otherwise false. - public static bool operator !=(DataFactoryElementKind left, DataFactoryElementKind right) - => !left.Equals(right); - - /// - public override string ToString() => _kind ?? ""; - } -} \ No newline at end of file diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Shared/Management/ManagedServiceIdentityTypeV3Converter.cs b/src/dotnet/AzureDataFactory.TestingFramework/Shared/Management/ManagedServiceIdentityTypeV3Converter.cs deleted file mode 100644 index 43fa1782..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Shared/Management/ManagedServiceIdentityTypeV3Converter.cs +++ /dev/null @@ -1,52 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -#nullable disable - -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Azure.ResourceManager.Models -{ - /// JsonConverter for managed service identity type v3. - internal class ManagedServiceIdentityTypeV3Converter : JsonConverter - { - internal const string SystemAssignedUserAssignedV3Value = "SystemAssigned,UserAssigned"; - - /// Serialize managed service identity type to v3 format. - /// The writer. - /// The ManagedServiceIdentityType model which is v4. - /// The options for JsonSerializer. - public override void Write(Utf8JsonWriter writer, ManagedServiceIdentityType model, JsonSerializerOptions options) - { - writer.WritePropertyName("type"); - if (model == ManagedServiceIdentityType.SystemAssignedUserAssigned) - { - writer.WriteStringValue(SystemAssignedUserAssignedV3Value); - } - else - { - writer.WriteStringValue(model.ToString()); - } - } - - /// Deserialize managed service identity type from v3 format. - /// The reader. - /// The type to convert - /// The options for JsonSerializer. - public override ManagedServiceIdentityType Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) - { - using var document = JsonDocument.ParseValue(ref reader); - foreach (var property in document.RootElement.EnumerateObject()) - { - var typeValue = property.Value.GetString(); - if (typeValue.Equals(SystemAssignedUserAssignedV3Value, StringComparison.OrdinalIgnoreCase)) - { - return ManagedServiceIdentityType.SystemAssignedUserAssigned; - } - return new ManagedServiceIdentityType(typeValue); - } - return null; - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/Shared/Management/SharedExtensions.cs b/src/dotnet/AzureDataFactory.TestingFramework/Shared/Management/SharedExtensions.cs deleted file mode 100644 index 50d631e7..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/Shared/Management/SharedExtensions.cs +++ /dev/null @@ -1,78 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -#nullable enable - -using Azure.Core; - -namespace Azure.ResourceManager -{ - /// - /// helper class - /// - internal static class SharedExtensions - { - /// - /// Collects the segments in a resource identifier into a string - /// - /// the resource identifier - /// - public static string SubstringAfterProviderNamespace(this ResourceIdentifier resourceId) - { - const string providersKey = "/providers/"; - var rawId = resourceId.ToString(); - var indexOfProviders = rawId.LastIndexOf(providersKey, StringComparison.InvariantCultureIgnoreCase); - if (indexOfProviders < 0) - return string.Empty; - var whateverRemains = rawId.Substring(indexOfProviders + providersKey.Length); - var firstSlashIndex = whateverRemains.IndexOf('/'); - if (firstSlashIndex < 0) - return string.Empty; - return whateverRemains.Substring(firstSlashIndex + 1); - } - - /// - /// An extension method for supporting replacing one dictionary content with another one. - /// This is used to support resource tags. - /// - /// The destination dictionary in which the content will be replaced. - /// The source dictionary from which the content is copied from. - /// The destination dictionary that has been altered. - public static IDictionary ReplaceWith(this IDictionary dest, IDictionary src) - { - dest.Clear(); - foreach (var kv in src) - { - dest.Add(kv); - } - - return dest; - } - - public static async Task FirstOrDefaultAsync( - this AsyncPageable source, - Func predicate, - CancellationToken token = default) - where TSource : notnull - { - if (source == null) - throw new ArgumentNullException(nameof(source)); - if (predicate == null) - throw new ArgumentNullException(nameof(predicate)); - - token.ThrowIfCancellationRequested(); - - await foreach (var item in source.ConfigureAwait(false)) - { - token.ThrowIfCancellationRequested(); - - if (predicate(item)) - { - return item; - } - } - - return default; - } - } -} diff --git a/src/dotnet/AzureDataFactory.TestingFramework/autorest-config.yaml b/src/dotnet/AzureDataFactory.TestingFramework/autorest-config.yaml deleted file mode 100644 index 79c2afd2..00000000 --- a/src/dotnet/AzureDataFactory.TestingFramework/autorest-config.yaml +++ /dev/null @@ -1,271 +0,0 @@ -azure-arm: false -generate-model-factory: true -csharp: true -library-name: DataFactory -namespace: AzureDataFactory.TestingFramework.Models -require: https://github.com/Azure/azure-rest-api-specs/blob/cd06d327e115cdb55f8e7c9fd1b23fa551b5b750/specification/datafactory/resource-manager/readme.md -output-folder: $(this-folder)/Generated -clear-output-folder: true -skip-csproj: false -modelerfour: - flatten-payloads: false - -#mgmt-debug: -# show-serialized-names: true - -format-by-name-rules: - 'tenantId': 'uuid' - 'ETag': 'etag' - 'location': 'azure-location' - '*Uri': 'Uri' - '*Uris': 'Uri' - 'PurviewResourceId': 'arm-id' - 'runId': 'uuid' - 'activityRunId': 'uuid' - 'pipelineRunId': 'uuid' - 'sessionId': 'uuid' - 'encryptedCredential': 'any' - 'dataFactoryLocation': 'azure-location' - -rename-rules: - CPU: Cpu - CPUs: Cpus - Os: OS - Ip: IP - Ips: IPs|ips - ID: Id - IDs: Ids - VM: Vm - VMs: Vms - VMScaleSet: VmScaleSet - DNS: Dns - VPN: Vpn - NAT: Nat - WAN: Wan - Ipv4: IPv4|ipv4 - Ipv6: IPv6|ipv6 - Ipsec: IPsec|ipsec - SSO: Sso - URI: Uri - MWS: Mws - Etag: ETag|etag - Db: DB|db - CMK: Cmk - ASC: Asc - ETA: Eta - GET: Get - PUT: Put - GZip: Gzip - Pwd: Password - -rename-mapping: - # Property - ActivityRun.activityRunEnd: EndOn - CassandraSourceReadConsistencyLevels.ALL: All - CassandraSourceReadConsistencyLevels.ONE: One - CassandraSourceReadConsistencyLevels.TWO: Two - CassandraSourceReadConsistencyLevels.LOCAL_ONE: LocalOne - CreateDataFlowDebugSessionRequest.timeToLive: TimeToLiveInMinutes - DataFlowDebugSessionInfo.startTime: StartOn - DataFlowDebugSessionInfo.timeToLiveInMinutes: TimeToLiveInMinutes - DataFlowDebugSessionInfo.lastActivityTime: LastActivityOn - DatasetDataElement.name: ColumnName - DatasetDataElement.type: columnType - DatasetSchemaDataElement.name: schemaColumnName - DatasetSchemaDataElement.type: schemaColumnType - DatasetCompression.type: datasetCompressionType - ExposureControlBatchResponse.exposureControlResponses: ExposureControlResults - FactoryRepoUpdate.factoryResourceId: -|arm-id - HDInsightOnDemandLinkedService.typeProperties.timeToLive: TimeToLiveExpression - IntegrationRuntimeCustomerVirtualNetwork.subnetId: SubnetId|arm-id - IntegrationRuntimeDataFlowProperties.timeToLive: TimeToLiveInMinutes - IntegrationRuntimeNodeIpAddress.ipAddress: IPAddress|ip-address - IntegrationRuntimeVNetProperties.vNetId: VnetId|uuid - IntegrationRuntimeVNetProperties.subnetId: SubnetId|arm-id - Factory.properties.createTime: CreatedOn - LinkedIntegrationRuntime.createTime: CreatedOn - ManagedIntegrationRuntimeStatus.typeProperties.createTime: CreatedOn - ManagedVirtualNetwork.vNetId: VnetId|uuid - ManagedPrivateEndpoint.privateLinkResourceId: -|arm-id - Office365Source.endTime: EndOn - Office365Source.startTime: StartOn - SelfHostedIntegrationRuntimeStatus.typeProperties.createTime: CreatedOn - ScriptActivityParameterType.Timespan: TimeSpan - SelfHostedIntegrationRuntimeNode.expiryTime: ExpireOn - SelfHostedIntegrationRuntimeStatus.typeProperties.taskQueueId: -|uuid - SelfHostedIntegrationRuntimeStatus.typeProperties.serviceUrls: serviceUris - ActivityPolicy.secureInput: EnableSecureInput - ActivityPolicy.secureOutput: EnableSecureOutput - ExecutePipelineActivityPolicy.secureInput: EnableSecureInput - SsisParameter.required: IsRequired - SsisParameter.sensitive: IsSensitive - SsisParameter.valueSet: HasValueSet - SsisVariable.sensitive: IsSensitive - AvroDataset.typeProperties.location: DataLocation - BinaryDataset.typeProperties.location: DataLocation - DelimitedTextDataset.typeProperties.location: DataLocation - ExcelDataset.typeProperties.location: DataLocation - JsonDataset.typeProperties.location: DataLocation - OrcDataset.typeProperties.location: DataLocation - ParquetDataset.typeProperties.location: DataLocation - XmlDataset.typeProperties.location: DataLocation - IntegrationRuntimeDataFlowProperties.cleanup: ShouldCleanupAfterTtl - SsisPackageLocationType.SSISDB: SsisDB - # Factory - Factory: DataFactory - FactoryListResponse: DataFactoryListResult - # Dataset - Dataset: DataFactoryDatasetDefinition - DatasetResource: DataFactoryDataset - HttpDataset: DataFactoryHttpDataset - AvroFormat: DatasetAvroFormat - JsonFormat: DatasetJsonFormat - OrcFormat: DatasetOrcFormat - ParquetFormat: DatasetParquetFormat - TextFormat: DatasetTextFormat - # DataFlow - DataFlow: DataFactoryDataFlowDefinition - DataFlowResource: DataFactoryDataFlow - Flowlet: DataFactoryFlowletDefinition - MappingDataFlow: DataFactoryMappingDataFlowDefinition - WranglingDataFlow: DataFactoryWranglingDataFlowDefinition - Transformation: DataFlowTransformation - # Data source - BlobSink: DataFactoryBlobSink - BlobSource: DataFactoryBlobSource - # Debug resource - AddDataFlowToDebugSessionResponse: DataFactoryDataFlowStartDebugSessionResult - CreateDataFlowDebugSessionRequest: DataFactoryDataFlowDebugSessionContent - CreateDataFlowDebugSessionResponse: DataFactoryDataFlowCreateDebugSessionResult - DataFlowDebugResource: DataFactoryDataFlowDebugInfo - DataFlowDebugCommandResponse: DataFactoryDataFlowDebugCommandResult - DataFlowDebugPackage: DataFactoryDataFlowDebugPackageContent - DatasetDebugResource: DataFactoryDatasetDebugInfo - IntegrationRuntimeDebugResource: DataFactoryIntegrationRuntimeDebugInfo - LinkedServiceDebugResource: DataFactoryLinkedServiceDebugInfo - SubResourceDebugResource: DataFactoryDebugInfo - # GlobalParameter - GlobalParameterResource: DataFactoryGlobalParameter - GlobalParameterSpecification: DataFactoryGlobalParameterSpecification - GlobalParameterType: DataFactoryGlobalParameterType - ParameterSpecification: EntityParameterSpecification - ParameterDefinitionSpecification: EntityParameterDefinitionSpecification - ParameterType: EntityParameterType - # IntegrationRuntime - IntegrationRuntime: DataFactoryIntegrationRuntimeDefinition - IntegrationRuntimeResource: DataFactoryIntegrationRuntime - IntegrationRuntimeStatusResponse: DataFactoryIntegrationRuntimeStatusResult - PackageStore: DataFactoryPackageStore - # LinkedService - LinkedService: DataFactoryLinkedServiceDefinition - LinkedServiceResource: DataFactoryLinkedService - LinkedServiceReference: DataFactoryLinkedServiceReference - LinkedServiceReferenceType: DataFactoryLinkedServiceReferenceType - # Network - ManagedVirtualNetworkResource: DataFactoryManagedVirtualNetwork - PublicNetworkAccess: DataFactoryPublicNetworkAccess - # Pipeline - PipelineResource: DataFactoryPipeline - PipelineListResponse: DataFactoryPipelineListResult - PipelinePolicy: DataFactoryPipelinePolicy - PipelineReference: DataFactoryPipelineReference - PipelineReferenceType: DataFactoryPipelineReferenceType - PipelineRun: DataFactoryPipelineRunInfo - PipelineRunInvokedBy: DataFactoryPipelineRunEntityInfo - PipelineRunsQueryResponse: DataFactoryPipelineRunsQueryResult - Activity: DataFactoryActivity - ActivityRun: DataFactoryActivityRunInfo - ActivityRunsQueryResponse: DataFactoryActivityRunsResult - CopySource: CopyActivitySource - CreateRunResponse: PipelineCreateRunResult - Expression: DataFactoryExpressionDefinition - ExpressionType: DataFactoryExpressionType - GetMetadataActivity: GetDatasetMetadataActivity - SwitchCase: SwitchCaseActivity - UserProperty: ActivityUserProperty - VariableSpecification: PipelineVariableSpecification - VariableType: PipelineVariableType - # Private link - ManagedPrivateEndpointResource: DataFactoryPrivateEndpoint - RemotePrivateEndpointConnection: DataFactoryPrivateEndpointProperties - PrivateEndpointConnectionResource: DataFactoryPrivateEndpointConnection - PrivateLinkResource: DataFactoryPrivateLinkResource - PrivateLinkResourceProperties: DataFactoryPrivateLinkResourceProperties - # Trigger - BlobEventsTrigger: DataFactoryBlobEventsTrigger - BlobEventTypes: DataFactoryBlobEventType - BlobTrigger: DataFactoryBlobTrigger - TriggerResource: DataFactoryTrigger - Trigger: DataFactoryTriggerDefinition - TriggerListResponse: DataFactoryTriggerListResult - TriggerQueryResponse: DataFactoryTriggerQueryResult - TriggerReference: DataFactoryTriggerReference - TriggerReferenceType: DataFactoryTriggerReferenceType - TriggerRun: DataFactoryTriggerRun - TriggerRunsQueryResponse: DataFactoryTriggerRunsQueryResult - TriggerRunStatus: DataFactoryTriggerRunStatus - TriggerRuntimeState: DataFactoryTriggerRuntimeState - TriggerSubscriptionOperationStatus: DataFactoryTriggerSubscriptionOperationResult - # Others - UserAccessPolicy: DataFactoryDataPlaneUserAccessPolicy - AccessPolicyResponse: DataFactoryDataPlaneAccessPolicyResult - CredentialReference: DataFactoryCredentialReference - CredentialReferenceType: DataFactoryCredentialReferenceType - DaysOfWeek: DataFactoryDayOfWeek - EncryptionConfiguration: DataFactoryEncryptionConfiguration - ExposureControlBatchResponse: ExposureControlBatchResult - ExposureControlResponse: ExposureControlResult - ExposureControlRequest: ExposureControlContent - HDInsightActivityDebugInfoOption: HDInsightActivityDebugInfoOptionSetting - GitHubAccessTokenResponse: GitHubAccessTokenResult - HttpSource: DataFactoryHttpFileSource - MetadataItem: DataFactoryMetadataItemInfo - PurviewConfiguration: DataFactoryPurviewConfiguration - RunFilterParameters: RunFilterContent - SecretBase: DataFactorySecretBaseDefinition - SecureString: DataFactorySecretString - SsisObjectMetadataStatusResponse: SsisObjectMetadataStatusResult - SsisParameter: SsisParameterInfo - IntegrationRuntimeOutboundNetworkDependenciesEndpointsResponse: IntegrationRuntimeOutboundNetworkDependenciesResult - ManagedIdentityCredential: DataFactoryManagedIdentityCredentialDefinition - ManagedIdentityCredentialResource: DataFactoryManagedIdentityCredential - -override-operation-name: - ActivityRuns_QueryByPipelineRun: GetActivityRun - PipelineRuns_QueryByFactory: GetPipelineRuns - TriggerRuns_QueryByFactory: GetTriggerRuns - DataFlowDebugSession_QueryByFactory: GetDataFlowDebugSessions - Triggers_QueryByFactory: GetTriggers - Factories_ConfigureFactoryRepo: ConfigureFactoryRepoInformation - DataFlowDebugSession_AddDataFlow: AddDataFlowToDebugSession - DataFlowDebugSession_ExecuteCommand: ExecuteDataFlowDebugSessionCommand - ExposureControl_GetFeatureValueByFactory: GetExposureControlFeature - ExposureControl_QueryFeatureValuesByFactory: GetExposureControlFeatures - IntegrationRuntimes_ListOutboundNetworkDependenciesEndpoints: GetOutboundNetworkDependencies - -directive: - - from: datafactory.json - where: $.parameters - transform: > - $.locationId['x-ms-format'] = 'azure-location'; - - from: datafactory.json - where: $.definitions - transform: > - $.DataFlowDebugSessionInfo.properties.lastActivityTime['format'] = 'date-time'; - $.UpdateIntegrationRuntimeRequest.properties.updateDelayOffset['format'] = 'duration'; - $.LinkedServiceReference.properties.type['x-ms-enum']['name'] = 'LinkedServiceReferenceType'; -# - from: Pipeline.json -# where: $.definitions -# transform: > -# $.PipelineElapsedTimeMetricPolicy.properties.duration['type'] = 'string'; -# $.PipelineElapsedTimeMetricPolicy.properties.duration['format'] = 'duration'; - - from: IntegrationRuntime.json - where: $.definitions - transform: > - $.SelfHostedIntegrationRuntimeStatusTypeProperties.properties.updateDelayOffset['format'] = 'duration'; - $.SelfHostedIntegrationRuntimeStatusTypeProperties.properties.localTimeZoneOffset['format'] = 'duration'; - # The definition of userAssignedIdentities is not same as the ManagedServiceIdentity, but the actual json text is same, so remove this property here to normalize with shared ManagedServiceIdentity. - - from: datafactory.json - where: $.definitions - transform: > - delete $.FactoryIdentity.properties.userAssignedIdentities; \ No newline at end of file diff --git a/src/dotnet/nuget.config b/src/dotnet/nuget.config deleted file mode 100644 index 40f5bd08..00000000 --- a/src/dotnet/nuget.config +++ /dev/null @@ -1,12 +0,0 @@ - - - - - - - - - - - - \ No newline at end of file diff --git a/tests/__init__.py b/tests/__init__.py new file mode 100644 index 00000000..e69de29b diff --git a/tests/functional/__init__.py b/tests/functional/__init__.py new file mode 100644 index 00000000..e69de29b diff --git a/tests/functional/activity_outputs/item.metadata.json b/tests/functional/activity_outputs/item.metadata.json new file mode 100644 index 00000000..d462369f --- /dev/null +++ b/tests/functional/activity_outputs/item.metadata.json @@ -0,0 +1,4 @@ +{ + "type": "Pipeline", + "displayName": "set_version" +} \ No newline at end of file diff --git a/tests/functional/activity_outputs/pipeline-content.json b/tests/functional/activity_outputs/pipeline-content.json new file mode 100644 index 00000000..c35c6863 --- /dev/null +++ b/tests/functional/activity_outputs/pipeline-content.json @@ -0,0 +1,58 @@ +{ + "name": "set_version", + "properties": { + "activities": [ + { + "name": "SetVersion", + "description": "", + "type": "SetVariable", + "state": "Active", + "onInactiveMarkAs": "Succeeded", + "dependsOn": [ + { + "activity": "GetVersion", + "dependencyConditions": [ + "Succeeded" + ] + } + ], + "policy": { + "secureOutput": false, + "secureInput": false + }, + "typeProperties": { + "variableName": "version", + "value": { + "value": "@activity('GetVersion').output.version", + "type": "Expression" + } + } + }, + { + "name": "GetVersion", + "type": "WebActivity", + "dependsOn": [], + "policy": { + "timeout": "0.12:00:00", + "retry": 0, + "retryIntervalInSeconds": 30, + "secureOutput": false, + "secureInput": false + }, + "typeProperties": { + "relativeUrl": "version", + "method": "GET" + }, + "externalReferences": { + "connection": "6d70b649-d684-439b-a9c2-d2bb5241cd39" + } + } + ], + "variables": { + "version": { + "type": "String" + } + }, + "annotations": [] + } +} \ No newline at end of file diff --git a/tests/functional/activity_outputs/test_set_activity_output.py b/tests/functional/activity_outputs/test_set_activity_output.py new file mode 100644 index 00000000..115334ac --- /dev/null +++ b/tests/functional/activity_outputs/test_set_activity_output.py @@ -0,0 +1,39 @@ +import pytest +from data_factory_testing_framework.state.dependency_condition import DependencyCondition +from data_factory_testing_framework.test_framework import TestFramework, TestFrameworkType + + +def test_execute_pipeline_activity_child_activities_executed(request: pytest.FixtureRequest) -> None: + # Arrange + test_framework = TestFramework( + framework_type=TestFrameworkType.Fabric, + root_folder_path=request.fspath.dirname, + should_evaluate_child_pipelines=True, + ) + pipeline = test_framework.repository.get_pipeline_by_name("set_version") + + # Act + activities = test_framework.evaluate_pipeline( + pipeline, + [], + ) + activity = next(activities) + + # Assert + assert activity is not None + assert activity.name == "GetVersion" + assert activity.type == "WebActivity" + assert activity.type_properties["relativeUrl"] == "version" + assert activity.type_properties["method"] == "GET" + assert activity.all_properties["externalReferences"]["connection"] == "6d70b649-d684-439b-a9c2-d2bb5241cd39" + activity.set_result(DependencyCondition.Succeeded, {"version": "1.2.3"}) + + activity = next(activities) + assert activity is not None + assert activity.name == "SetVersion" + assert activity.type == "SetVariable" + assert activity.type_properties["variableName"] == "version" + assert activity.type_properties["value"].value == "1.2.3" + + with pytest.raises(StopIteration): + next(activities) diff --git a/tests/functional/append_variable_pipeline/item.metadata.json b/tests/functional/append_variable_pipeline/item.metadata.json new file mode 100644 index 00000000..1987685b --- /dev/null +++ b/tests/functional/append_variable_pipeline/item.metadata.json @@ -0,0 +1,4 @@ +{ + "type": "Pipeline", + "displayName": "append-variable-test" +} \ No newline at end of file diff --git a/tests/functional/append_variable_pipeline/pipeline-content.json b/tests/functional/append_variable_pipeline/pipeline-content.json new file mode 100644 index 00000000..299e2290 --- /dev/null +++ b/tests/functional/append_variable_pipeline/pipeline-content.json @@ -0,0 +1,58 @@ +{ + "name": "append-variable-test", + "properties": { + "activities": [ + { + "name": "Append variable1", + "type": "AppendVariable", + "dependsOn": [ + { + "activity": "Set variable1", + "dependencyConditions": [ + "Succeeded" + ] + } + ], + "typeProperties": { + "variableName": "values", + "value": { + "value": "@pipeline().parameters.appended_value", + "type": "Expression" + } + } + }, + { + "name": "Set variable1", + "type": "SetVariable", + "dependsOn": [], + "policy": { + "secureOutput": false, + "secureInput": false + }, + "typeProperties": { + "variableName": "values", + "value": { + "value": "@pipeline().parameters.initial_value", + "type": "Expression" + } + } + } + ], + "parameters": { + "initial_value": { + "type": "array", + "defaultValue": [] + }, + "appended_value": { + "type": "int" + } + }, + "variables": { + "values": { + "type": "Array", + "defaultValue": [] + } + }, + "annotations": [] + } +} \ No newline at end of file diff --git a/tests/functional/append_variable_pipeline/test_append_variable_activity_pipeline.py b/tests/functional/append_variable_pipeline/test_append_variable_activity_pipeline.py new file mode 100644 index 00000000..9b61002c --- /dev/null +++ b/tests/functional/append_variable_pipeline/test_append_variable_activity_pipeline.py @@ -0,0 +1,45 @@ +from typing import List + +import pytest +from data_factory_testing_framework.models.activities.append_variable_activity import AppendVariableActivity +from data_factory_testing_framework.models.activities.set_variable_activity import SetVariableActivity +from data_factory_testing_framework.state import RunParameter, RunParameterType +from data_factory_testing_framework.test_framework import TestFramework, TestFrameworkType + + +@pytest.mark.parametrize( + "initial_value,appended_value,expected_value", + [ + ([1, 2], 3, [1, 2, 3]), + ([], 1, [1]), + ([4], 5, [4, 5]), + ], +) +def test_append_variable_activity( + initial_value: List[int], appended_value: int, expected_value: List[int], request: pytest.FixtureRequest +) -> None: + # Arrange + test_framework = TestFramework( + framework_type=TestFrameworkType.Fabric, + root_folder_path=request.fspath.dirname, + should_evaluate_child_pipelines=True, + ) + pipeline = test_framework.repository.get_pipeline_by_name("append-variable-test") + + # Act + activities = test_framework.evaluate_pipeline( + pipeline, + [ + RunParameter(RunParameterType.Pipeline, "initial_value", initial_value), + RunParameter(RunParameterType.Pipeline, "appended_value", appended_value), + ], + ) + + # Assert + activity: SetVariableActivity = next(activities) + assert activity.type == "SetVariable" + assert activity.value.value == initial_value + + activity: AppendVariableActivity = next(activities) + assert activity.type == "AppendVariable" + assert activity.value.value == appended_value diff --git a/src/dotnet/AzureDataFactory.TestingFramework.Tests/Functional/Pipelines/Child/pipeline/child.json b/tests/functional/execute_child_pipeline/pipeline/child.json similarity index 100% rename from src/dotnet/AzureDataFactory.TestingFramework.Tests/Functional/Pipelines/Child/pipeline/child.json rename to tests/functional/execute_child_pipeline/pipeline/child.json diff --git a/src/dotnet/AzureDataFactory.TestingFramework.Tests/Functional/Pipelines/Child/pipeline/main.json b/tests/functional/execute_child_pipeline/pipeline/main.json similarity index 100% rename from src/dotnet/AzureDataFactory.TestingFramework.Tests/Functional/Pipelines/Child/pipeline/main.json rename to tests/functional/execute_child_pipeline/pipeline/main.json diff --git a/tests/functional/execute_child_pipeline/test_execute_pipeline_activity.py b/tests/functional/execute_child_pipeline/test_execute_pipeline_activity.py new file mode 100644 index 00000000..3ef6ef46 --- /dev/null +++ b/tests/functional/execute_child_pipeline/test_execute_pipeline_activity.py @@ -0,0 +1,60 @@ +import pytest +from data_factory_testing_framework.exceptions.pipeline_not_found_error import PipelineNotFoundError +from data_factory_testing_framework.state import RunParameter, RunParameterType +from data_factory_testing_framework.test_framework import TestFramework, TestFrameworkType + + +def test_execute_pipeline_activity_child_activities_executed(request: pytest.FixtureRequest) -> None: + # Arrange + test_framework = TestFramework( + framework_type=TestFrameworkType.DataFactory, + root_folder_path=request.fspath.dirname, + should_evaluate_child_pipelines=True, + ) + pipeline = test_framework.repository.get_pipeline_by_name("main") + + # Act + activities = test_framework.evaluate_pipeline( + pipeline, + [ + RunParameter(RunParameterType.Pipeline, "Url", "https://example.com"), + RunParameter(RunParameterType.Pipeline, "Body", '{ "key": "value" }'), + ], + ) + child_web_activity = next(activities) + + # Assert + assert child_web_activity is not None + assert child_web_activity.name == "API Call" + assert child_web_activity.type_properties["url"].value == "https://example.com" + assert child_web_activity.type_properties["body"].value == '{ "key": "value" }' + + with pytest.raises(StopIteration): + next(activities) + + +def test_execute_pipeline_activity_evaluate_child_pipelines_child_pipeline_not_known_exception_thrown( + request: pytest.FixtureRequest +) -> None: + # Arrange + test_framework = TestFramework( + framework_type=TestFrameworkType.DataFactory, + root_folder_path=request.fspath.dirname, + should_evaluate_child_pipelines=True, + ) + test_framework.repository.pipelines.remove(test_framework.repository.get_pipeline_by_name("child")) + pipeline = test_framework.repository.get_pipeline_by_name("main") + + # Act & Assert + with pytest.raises(PipelineNotFoundError) as exception_info: + next( + test_framework.evaluate_pipeline( + pipeline, + [ + RunParameter(RunParameterType.Pipeline, "Url", "https://example.com"), + RunParameter(RunParameterType.Pipeline, "Body", '{ "key": "value" }'), + ], + ), + ) + + assert exception_info.value.args[0] == "Pipeline with name Pipeline with name child not found not found" diff --git a/tests/functional/filter_activity_pipeline/item.metadata.json b/tests/functional/filter_activity_pipeline/item.metadata.json new file mode 100644 index 00000000..85976989 --- /dev/null +++ b/tests/functional/filter_activity_pipeline/item.metadata.json @@ -0,0 +1,4 @@ +{ + "type": "Pipeline", + "displayName": "filter-test" +} \ No newline at end of file diff --git a/tests/functional/filter_activity_pipeline/pipeline-content.json b/tests/functional/filter_activity_pipeline/pipeline-content.json new file mode 100644 index 00000000..14d63985 --- /dev/null +++ b/tests/functional/filter_activity_pipeline/pipeline-content.json @@ -0,0 +1,63 @@ +{ + "name": "filter-test", + "properties": { + "activities": [ + { + "name": "Filter1", + "type": "Filter", + "dependsOn": [], + "typeProperties": { + "items": { + "value": "@pipeline().parameters.input_values", + "type": "Expression" + }, + "condition": { + "value": "@lessOrEquals(item(), 3)", + "type": "Expression" + } + } + }, + { + "name": "Set variable1", + "type": "SetVariable", + "dependsOn": [ + { + "activity": "Filter1", + "dependencyConditions": [ + "Succeeded" + ] + } + ], + "policy": { + "secureOutput": false, + "secureInput": false + }, + "typeProperties": { + "variableName": "filtered_values", + "value": { + "value": "@activity('Filter1').output.value", + "type": "Expression" + } + } + } + ], + "parameters": { + "input_values": { + "type": "array", + "defaultValue": [ + 1, + 2, + 3, + 4, + 5 + ] + } + }, + "variables": { + "filtered_values": { + "type": "Array" + } + }, + "annotations": [] + } +} \ No newline at end of file diff --git a/tests/functional/filter_activity_pipeline/test_filter_activity_pipeline.py b/tests/functional/filter_activity_pipeline/test_filter_activity_pipeline.py new file mode 100644 index 00000000..4ad374fb --- /dev/null +++ b/tests/functional/filter_activity_pipeline/test_filter_activity_pipeline.py @@ -0,0 +1,44 @@ +import pytest +from data_factory_testing_framework.models.activities.activity import Activity +from data_factory_testing_framework.models.activities.filter_activity import FilterActivity +from data_factory_testing_framework.state import RunParameter, RunParameterType +from data_factory_testing_framework.test_framework import TestFramework, TestFrameworkType + + +@pytest.mark.parametrize( + "input_values,expected_filtered_values", + [ + ([1, 2, 3, 4, 5], [1, 2, 3]), + ([], []), + ([4], []), + ([3, 4, 5, 6], [3]), + ([4, 5, 6], []), + ([-1, 3, 4], [-1, 3]), + ], +) +def test_filter_activity(input_values: [], expected_filtered_values: [], request: pytest.FixtureRequest) -> None: + # Arrange + test_framework = TestFramework( + framework_type=TestFrameworkType.Fabric, + root_folder_path=request.fspath.dirname, + should_evaluate_child_pipelines=True, + ) + pipeline = test_framework.repository.get_pipeline_by_name("filter-test") + + # Act + activities = test_framework.evaluate_pipeline( + pipeline, + [ + RunParameter(RunParameterType.Pipeline, "input_values", input_values), + ], + ) + + # Assert + activity: FilterActivity = next(activities) + assert activity.type == "Filter" + assert activity.items.value == input_values + assert activity.output["value"] == expected_filtered_values + + activity: Activity = next(activities) + assert activity.type == "SetVariable" + assert activity.type_properties["value"].value == expected_filtered_values diff --git a/tests/functional/switch_activity_pipeline/item.metadata.json b/tests/functional/switch_activity_pipeline/item.metadata.json new file mode 100644 index 00000000..d3aca3f1 --- /dev/null +++ b/tests/functional/switch_activity_pipeline/item.metadata.json @@ -0,0 +1,4 @@ +{ + "type": "Pipeline", + "displayName": "switchtest" +} \ No newline at end of file diff --git a/tests/functional/switch_activity_pipeline/pipeline-content.json b/tests/functional/switch_activity_pipeline/pipeline-content.json new file mode 100644 index 00000000..178caac1 --- /dev/null +++ b/tests/functional/switch_activity_pipeline/pipeline-content.json @@ -0,0 +1,86 @@ +{ + "name": "switchtest", + "objectId": "4e66b9d6-d1b9-4d2b-9b89-4101def23c9a", + "properties": { + "activities": [ + { + "name": "Switch1", + "type": "Switch", + "dependsOn": [], + "typeProperties": { + "on": { + "value": "@pipeline().parameters.current_value", + "type": "Expression" + }, + "cases": [ + { + "value": "case_1", + "activities": [ + { + "name": "Set variable2", + "type": "SetVariable", + "dependsOn": [], + "policy": { + "secureOutput": false, + "secureInput": false + }, + "typeProperties": { + "variableName": "case_hit", + "value": "case_1_hit" + } + } + ] + }, + { + "value": "case_2", + "activities": [ + { + "name": "Set variable3", + "type": "SetVariable", + "dependsOn": [], + "policy": { + "secureOutput": false, + "secureInput": false + }, + "typeProperties": { + "variableName": "case_hit", + "value": "case_2_hit" + } + } + ] + } + ], + "defaultActivities": [ + { + "name": "Set variable1", + "type": "SetVariable", + "dependsOn": [], + "policy": { + "secureOutput": false, + "secureInput": false + }, + "typeProperties": { + "variableName": "case_hit", + "value": "default_hit" + } + } + ] + } + } + ], + "parameters": { + "current_value": { + "type": "string", + "defaultValue": "1" + } + }, + "variables": { + "case_hit": { + "type": "String" + } + }, + "annotations": [], + "lastModifiedByObjectId": "80311eb5-b33b-4d7f-bfa3-879f8c8261c1", + "lastPublishTime": "2023-11-23T08:44:44Z" + } +} \ No newline at end of file diff --git a/tests/functional/switch_activity_pipeline/test_switch_activity_pipeline.py b/tests/functional/switch_activity_pipeline/test_switch_activity_pipeline.py new file mode 100644 index 00000000..359a9b8e --- /dev/null +++ b/tests/functional/switch_activity_pipeline/test_switch_activity_pipeline.py @@ -0,0 +1,36 @@ +import pytest +from data_factory_testing_framework.state import RunParameter, RunParameterType +from data_factory_testing_framework.test_framework import TestFramework, TestFrameworkType + + +@pytest.mark.parametrize( + "on_value,expected_outcome", + [ + ("case_1", "case_1_hit"), + ("case_2", "case_2_hit"), + ("case_3", "default_hit"), + ("case_4", "default_hit"), + ("case_anything", "default_hit"), + ], +) +def test_switch_activity(on_value: str, expected_outcome: str, request: pytest.FixtureRequest) -> None: + # Arrange + test_framework = TestFramework( + framework_type=TestFrameworkType.Fabric, + root_folder_path=request.fspath.dirname, + should_evaluate_child_pipelines=True, + ) + pipeline = test_framework.repository.get_pipeline_by_name("switchtest") + + # Act + activities = test_framework.evaluate_pipeline( + pipeline, + [ + RunParameter(RunParameterType.Pipeline, "current_value", on_value), + ], + ) + + # Assert + activity = next(activities) + assert activity.type == "SetVariable" + assert activity.type_properties["value"] == expected_outcome diff --git a/tests/test_test_framework.py b/tests/test_test_framework.py new file mode 100644 index 00000000..723bc1e1 --- /dev/null +++ b/tests/test_test_framework.py @@ -0,0 +1,111 @@ +import pytest +from data_factory_testing_framework.exceptions.pipeline_activities_circular_dependency_error import ( + PipelineActivitiesCircularDependencyError, +) +from data_factory_testing_framework.models.activities.fail_activity import FailActivity +from data_factory_testing_framework.models.activities.set_variable_activity import SetVariableActivity +from data_factory_testing_framework.models.data_factory_element import DataFactoryElement +from data_factory_testing_framework.models.pipeline import Pipeline +from data_factory_testing_framework.test_framework import TestFramework, TestFrameworkType + + +def test_circular_dependency_between_activities_should_throw_error() -> None: + # Arrange + test_framework = TestFramework(TestFrameworkType.Fabric) + pipeline = Pipeline( + name="main", + parameters={}, + variables={}, + activities=[ + SetVariableActivity( + name="setVariable1", + variable_name="variable", + typeProperties={ + "variableName": "variable", + "value": DataFactoryElement("'1'"), + }, + dependsOn=[ + { + "activity": "setVariable2", + "dependencyConditions": [ + "Succeeded", + ], + } + ], + ), + SetVariableActivity( + name="setVariable2", + variable_name="variable", + typeProperties={ + "variableName": "variable", + "value": DataFactoryElement("'1'"), + }, + dependsOn=[ + { + "activity": "setVariable1", + "dependencyConditions": [ + "Succeeded", + ], + } + ], + ), + ], + ) + test_framework.repository.pipelines.append(pipeline) + + # Act & Assert + with pytest.raises(PipelineActivitiesCircularDependencyError): + next(test_framework.evaluate_pipeline(pipeline, [])) + + +def test_fail_activity_halts_further_evaluation() -> None: + # Arrange + test_framework = TestFramework(TestFrameworkType.Fabric) + pipeline = Pipeline( + name="main", + parameters={}, + variables={}, + activities=[ + SetVariableActivity( + name="setVariable1", + variable_name="variable", + typeProperties={ + "variableName": "variable", + "value": DataFactoryElement("'1'"), + }, + dependsOn=[ + { + "activity": "failActivity", + "dependencyConditions": [ + "Succeeded", + ], + } + ], + ), + FailActivity( + name="failActivity", + typeProperties={ + "message": DataFactoryElement("@concat('Error code: ', '500')"), + "errorCode": "500", + }, + dependsOn=[], + ), + ], + ) + test_framework.repository.pipelines.append(pipeline) + + # Act + activities = test_framework.evaluate_pipeline(pipeline, []) + + # Assert + activity = next(activities) + assert activity is not None + assert activity.name == "failActivity" + assert activity.type == "Fail" + assert activity.status == "Failed" + assert activity.type_properties["message"].value == "Error code: 500" + assert activity.type_properties["errorCode"] == "500" + + # Assert that there are no more activities + with pytest.raises(StopIteration): + next(activities) diff --git a/tests/unit/functions/test_expression_evaluator.py b/tests/unit/functions/test_expression_evaluator.py new file mode 100644 index 00000000..a7940a7d --- /dev/null +++ b/tests/unit/functions/test_expression_evaluator.py @@ -0,0 +1,846 @@ +from typing import Union + +import pytest +from data_factory_testing_framework.exceptions.activity_not_found_error import ActivityNotFoundError +from data_factory_testing_framework.exceptions.dataset_parameter_not_found_error import ( + DatasetParameterNotFoundError, +) +from data_factory_testing_framework.exceptions.expression_parameter_not_found_error import ( + ExpressionParameterNotFoundError, +) +from data_factory_testing_framework.exceptions.linked_service_parameter_not_found_error import ( + LinkedServiceParameterNotFoundError, +) +from data_factory_testing_framework.exceptions.state_iteration_item_not_set_error import ( + StateIterationItemNotSetError, +) +from data_factory_testing_framework.exceptions.variable_not_found_error import VariableNotFoundError +from data_factory_testing_framework.functions.expression_evaluator import ExpressionEvaluator +from data_factory_testing_framework.state.dependency_condition import DependencyCondition +from data_factory_testing_framework.state.pipeline_run_state import PipelineRunState +from data_factory_testing_framework.state.pipeline_run_variable import PipelineRunVariable +from data_factory_testing_framework.state.run_parameter import RunParameter +from data_factory_testing_framework.state.run_parameter_type import RunParameterType +from freezegun import freeze_time +from lark import Token, Tree +from pytest import param as p + + +@pytest.mark.parametrize( + ["expression", "expected"], + [ + p("value", Tree(Token("RULE", "literal_evaluation"), [Token("LITERAL_LETTER", "value")]), id="string_literal"), + p( + " value ", + Tree(Token("RULE", "literal_evaluation"), [Token("LITERAL_LETTER", "value")]), + id="string_with_ws_literal", + marks=pytest.mark.skip(""), + ), + p("11", Tree(Token("RULE", "literal_evaluation"), [Token("LITERAL_INT", "11")]), id="integer_literal"), + p( + "@pipeline().parameters.parameter", + Tree( + Token("RULE", "expression_evaluation"), + [ + Tree( + Token("RULE", "expression_pipeline_reference"), + [ + Token("EXPRESSION_PIPELINE_PROPERTY", "parameters"), + Token("EXPRESSION_PARAMETER_NAME", "parameter"), + ], + ), + Tree(Token("RULE", "expression_array_indices"), [None]), + ], + ), + id="pipeline_parameters_reference", + ), + p( + "@pipeline().globalParameters.parameter", + Tree( + Token("RULE", "expression_evaluation"), + [ + Tree( + Token("RULE", "expression_pipeline_reference"), + [ + Token("EXPRESSION_PIPELINE_PROPERTY", "globalParameters"), + Token("EXPRESSION_PARAMETER_NAME", "parameter"), + ], + ), + Tree(Token("RULE", "expression_array_indices"), [None]), + ], + ), + id="pipeline_global_parameters_reference", + ), + p( + "@variables('variable')", + Tree( + Token("RULE", "expression_evaluation"), + [ + Tree( + Token("RULE", "expression_variable_reference"), + [Token("EXPRESSION_VARIABLE_NAME", "'variable'")], + ), + Tree(Token("RULE", "expression_array_indices"), [None]), + ], + ), + id="variables_reference", + ), + p( + "@activity('activityName').output.outputName", + Tree( + Token("RULE", "expression_evaluation"), + [ + Tree( + Token("RULE", "expression_activity_reference"), + [ + Token("EXPRESSION_ACTIVITY_NAME", "'activityName'"), + Token("EXPRESSION_PARAMETER_NAME", "output"), + Token("EXPRESSION_PARAMETER_NAME", "outputName"), + ], + ), + Tree(Token("RULE", "expression_array_indices"), [None]), + ], + ), + id="activity_reference", + ), + p( + "@dataset('datasetName')", + Tree( + Token("RULE", "expression_evaluation"), + [ + Tree( + Token("RULE", "expression_dataset_reference"), + [Token("EXPRESSION_DATASET_NAME", "'datasetName'")], + ), + Tree(Token("RULE", "expression_array_indices"), [None]), + ], + ), + id="dataset_reference", + ), + p( + "@linkedService('linkedServiceName')", + Tree( + Token("RULE", "expression_evaluation"), + [ + Tree( + Token("RULE", "expression_linked_service_reference"), + [Token("EXPRESSION_LINKED_SERVICE_NAME", "'linkedServiceName'")], + ), + Tree(Token("RULE", "expression_array_indices"), [None]), + ], + ), + id="linked_service_reference", + ), + p( + "@item()", + Tree( + Token("RULE", "expression_evaluation"), + [ + Tree(Token("RULE", "expression_item_reference"), []), + Tree(Token("RULE", "expression_array_indices"), [None]), + ], + ), + id="item_reference", + ), + p( + "@concat('a', 'b' )", + Tree( + Token("RULE", "expression_evaluation"), + [ + Tree( + Token("RULE", "expression_function_call"), + [ + Token("EXPRESSION_FUNCTION_NAME", "concat"), + Tree( + Token("RULE", "expression_function_parameters"), + [ + Tree(Token("RULE", "expression_parameter"), [Token("EXPRESSION_STRING", "'a'")]), + Tree( + Token("RULE", "expression_parameter"), + [ + Token("EXPRESSION_WS", " "), + Token("EXPRESSION_STRING", "'b'"), + Token("EXPRESSION_WS", " "), + ], + ), + ], + ), + ], + ), + Tree(Token("RULE", "expression_array_indices"), [None]), + ], + ), + id="function_call", + ), + p( + "@concat('a', 'b' )", + Tree( + Token("RULE", "expression_evaluation"), + [ + Tree( + Token("RULE", "expression_function_call"), + [ + Token("EXPRESSION_FUNCTION_NAME", "concat"), + Tree( + Token("RULE", "expression_function_parameters"), + [ + Tree(Token("RULE", "expression_parameter"), [Token("EXPRESSION_STRING", "'a'")]), + Tree( + Token("RULE", "expression_parameter"), + [ + Token("EXPRESSION_WS", " "), + Token("EXPRESSION_STRING", "'b'"), + Token("EXPRESSION_WS", " "), + ], + ), + ], + ), + ], + ), + Tree(Token("RULE", "expression_array_indices"), [None]), + ], + ), + id="function_call", + ), + p( + "@concat('https://example.com/jobs/', '123''', concat('&', 'abc,'))", + Tree( + Token("RULE", "expression_evaluation"), + [ + Tree( + Token("RULE", "expression_function_call"), + [ + Token("EXPRESSION_FUNCTION_NAME", "concat"), + Tree( + Token("RULE", "expression_function_parameters"), + [ + Tree( + Token("RULE", "expression_parameter"), + [Token("EXPRESSION_STRING", "'https://example.com/jobs/'")], + ), + Tree( + Token("RULE", "expression_parameter"), + [Token("EXPRESSION_WS", " "), Token("EXPRESSION_STRING", "'123'''")], + ), + Tree( + Token("RULE", "expression_parameter"), + [ + Token("EXPRESSION_WS", " "), + Tree( + Token("RULE", "expression_evaluation"), + [ + Tree( + Token("RULE", "expression_function_call"), + [ + Token("EXPRESSION_FUNCTION_NAME", "concat"), + Tree( + Token("RULE", "expression_function_parameters"), + [ + Tree( + Token("RULE", "expression_parameter"), + [Token("EXPRESSION_STRING", "'&'")], + ), + Tree( + Token("RULE", "expression_parameter"), + [ + Token("EXPRESSION_WS", " "), + Token("EXPRESSION_STRING", "'abc,'"), + ], + ), + ], + ), + ], + ), + Tree(Token("RULE", "expression_array_indices"), [None]), + ], + ), + ], + ), + ], + ), + ], + ), + Tree(Token("RULE", "expression_array_indices"), [None]), + ], + ), + id="function_call_with_nested_function_and_single_quote", + ), + p( + "concat('https://example.com/jobs/', '123''', variables('abc'), pipeline().parameters.abc, activity('abc').output.abc)", + Tree( + Token("RULE", "literal_evaluation"), + [ + Token( + "LITERAL_LETTER", + "concat('https://example.com/jobs/', '123''', variables('abc'), pipeline().parameters.abc, activity('abc').output.abc)", + ) + ], + ), + id="literal_function_call_with_nested_function_and_single_quote", + ), + p( + "@concat('https://example.com/jobs/', '123''', variables('abc'), pipeline().parameters.abc, activity('abc').output.abc)", + Tree( + Token("RULE", "expression_evaluation"), + [ + Tree( + Token("RULE", "expression_function_call"), + [ + Token("EXPRESSION_FUNCTION_NAME", "concat"), + Tree( + Token("RULE", "expression_function_parameters"), + [ + Tree( + Token("RULE", "expression_parameter"), + [Token("EXPRESSION_STRING", "'https://example.com/jobs/'")], + ), + Tree( + Token("RULE", "expression_parameter"), + [Token("EXPRESSION_WS", " "), Token("EXPRESSION_STRING", "'123'''")], + ), + Tree( + Token("RULE", "expression_parameter"), + [ + Token("EXPRESSION_WS", " "), + Tree( + Token("RULE", "expression_evaluation"), + [ + Tree( + Token("RULE", "expression_variable_reference"), + [Token("EXPRESSION_VARIABLE_NAME", "'abc'")], + ), + Tree(Token("RULE", "expression_array_indices"), [None]), + ], + ), + ], + ), + Tree( + Token("RULE", "expression_parameter"), + [ + Token("EXPRESSION_WS", " "), + Tree( + Token("RULE", "expression_evaluation"), + [ + Tree( + Token("RULE", "expression_pipeline_reference"), + [ + Token("EXPRESSION_PIPELINE_PROPERTY", "parameters"), + Token("EXPRESSION_PARAMETER_NAME", "abc"), + ], + ), + Tree(Token("RULE", "expression_array_indices"), [None]), + ], + ), + ], + ), + Tree( + Token("RULE", "expression_parameter"), + [ + Token("EXPRESSION_WS", " "), + Tree( + Token("RULE", "expression_evaluation"), + [ + Tree( + Token("RULE", "expression_activity_reference"), + [ + Token("EXPRESSION_ACTIVITY_NAME", "'abc'"), + Token("EXPRESSION_PARAMETER_NAME", "output"), + Token("EXPRESSION_PARAMETER_NAME", "abc"), + ], + ), + Tree(Token("RULE", "expression_array_indices"), [None]), + ], + ), + ], + ), + ], + ), + ], + ), + Tree(Token("RULE", "expression_array_indices"), [None]), + ], + ), + id="function_call_with_adf_native_functions", + ), + p( + "@createArray('a', createArray('a', 'b'))[1][1]", + Tree( + Token("RULE", "expression_evaluation"), + [ + Tree( + Token("RULE", "expression_function_call"), + [ + Token("EXPRESSION_FUNCTION_NAME", "createArray"), + Tree( + Token("RULE", "expression_function_parameters"), + [ + Tree(Token("RULE", "expression_parameter"), [Token("EXPRESSION_STRING", "'a'")]), + Tree( + Token("RULE", "expression_parameter"), + [ + Token("EXPRESSION_WS", " "), + Tree( + Token("RULE", "expression_evaluation"), + [ + Tree( + Token("RULE", "expression_function_call"), + [ + Token("EXPRESSION_FUNCTION_NAME", "createArray"), + Tree( + Token("RULE", "expression_function_parameters"), + [ + Tree( + Token("RULE", "expression_parameter"), + [Token("EXPRESSION_STRING", "'a'")], + ), + Tree( + Token("RULE", "expression_parameter"), + [ + Token("EXPRESSION_WS", " "), + Token("EXPRESSION_STRING", "'b'"), + ], + ), + ], + ), + ], + ), + Tree(Token("RULE", "expression_array_indices"), [None]), + ], + ), + ], + ), + ], + ), + ], + ), + Tree( + Token("RULE", "expression_array_indices"), + [Token("EXPRESSION_ARRAY_INDEX", "[1]"), Token("EXPRESSION_ARRAY_INDEX", "[1]")], + ), + ], + ), + id="function_call_with_nested_array_index", + ), + p( + "/repos/@{pipeline().globalParameters.OpsPrincipalClientId}/", + Tree( + Token("RULE", "literal_interpolation"), + [ + Token("LITERAL_LETTER", "/repos/"), + Tree( + Token("RULE", "expression_evaluation"), + [ + Tree( + Token("RULE", "expression_pipeline_reference"), + [ + Token("EXPRESSION_PIPELINE_PROPERTY", "globalParameters"), + Token("EXPRESSION_PARAMETER_NAME", "OpsPrincipalClientId"), + ], + ), + Tree(Token("RULE", "expression_array_indices"), [None]), + ], + ), + Token("LITERAL_LETTER", "/"), + ], + ), + id="string_interpolation", + ), + p( + "/repos/@{pipeline().globalParameters.OpsPrincipalClientId}/@{pipeline().parameters.SubPath}", + Tree( + Token("RULE", "literal_interpolation"), + [ + Token("LITERAL_LETTER", "/repos/"), + Tree( + Token("RULE", "expression_evaluation"), + [ + Tree( + Token("RULE", "expression_pipeline_reference"), + [ + Token("EXPRESSION_PIPELINE_PROPERTY", "globalParameters"), + Token("EXPRESSION_PARAMETER_NAME", "OpsPrincipalClientId"), + ], + ), + Tree(Token("RULE", "expression_array_indices"), [None]), + ], + ), + Token("LITERAL_LETTER", "/"), + Tree( + Token("RULE", "expression_evaluation"), + [ + Tree( + Token("RULE", "expression_pipeline_reference"), + [ + Token("EXPRESSION_PIPELINE_PROPERTY", "parameters"), + Token("EXPRESSION_PARAMETER_NAME", "SubPath"), + ], + ), + Tree(Token("RULE", "expression_array_indices"), [None]), + ], + ), + ], + ), + id="string_interpolation_multiple_expressions", + ), + ], +) +def test_parse(expression: str, expected: Tree[Token]) -> None: + # Arrange + evaluator = ExpressionEvaluator() + + # Act + actual = evaluator.parse(expression) + + # Assert + assert actual == expected + + +@pytest.mark.parametrize( + ["expression", "state", "expected"], + [ + p("value", PipelineRunState(), "value", id="string_literal"), + p(" value ", PipelineRunState(), " value ", id="string_with_ws_literal"), + p("11", PipelineRunState(), 11, id="integer_literal"), + p( + "@pipeline().parameters.parameter", + PipelineRunState( + parameters=[ + RunParameter(RunParameterType.Pipeline, "parameter", "value"), + ] + ), + "value", + id="pipeline_parameters_reference", + ), + p( + "@pipeline().parameters.parameter", + PipelineRunState( + parameters=[ + RunParameter(RunParameterType.Pipeline, "parameter", 1), + ] + ), + 1, + id="pipeline_parameters_reference", + ), + p( + "@pipeline().globalParameters.parameter", + PipelineRunState( + parameters=[ + RunParameter(RunParameterType.Global, "parameter", "value"), + ] + ), + "value", + id="pipeline_global_parameters_reference", + ), + p( + "@variables('variable')", + PipelineRunState( + variables=[ + PipelineRunVariable(name="variable", default_value="value"), + ] + ), + "value", + id="variables_reference", + ), + p( + "@activity('activityName').output.outputName", + PipelineRunState( + pipeline_activity_results={ + "activityName": { + "output": { + "outputName": "value", + }, + "status": DependencyCondition.SUCCEEDED, + } + } + ), + "value", + id="activity_reference", + ), + p( + "@dataset('datasetName')", + PipelineRunState(parameters=[RunParameter(RunParameterType.Dataset, "datasetName", "datasetNameValue")]), + "datasetNameValue", + id="dataset_reference", + ), + p( + "@linkedService('linkedServiceName')", + PipelineRunState( + parameters=[RunParameter(RunParameterType.LinkedService, "linkedServiceName", "linkedServiceNameValue")] + ), + "linkedServiceNameValue", + id="linked_service_reference", + ), + p("@item()", PipelineRunState(iteration_item="value"), "value", id="item_reference"), + p("@concat('a', 'b' )", PipelineRunState(), "ab", id="function_call"), + p( + "concat('https://example.com/jobs/', '123''', concat('&', 'abc,'))", + PipelineRunState(), + "concat('https://example.com/jobs/', '123''', concat('&', 'abc,'))", + id="literal_function_call_with_nested_function_and_single_quote", + ), + p( + "@concat('https://example.com/jobs/', '123''', concat('&', 'abc,'))", + PipelineRunState(), + "https://example.com/jobs/123'&abc,", + id="function_call_with_nested_function_and_single_quote", + ), + p( + "@activity('activityName').output.outputName", + PipelineRunState( + pipeline_activity_results={ + "activityName": { + "output": { + "outputName": 1, + }, + "status": DependencyCondition.SUCCEEDED, + } + } + ), + 1, + id="activity_reference", + ), + p( + "@activity('activityName').output.pipelineReturnValue.test", + PipelineRunState( + pipeline_activity_results={ + "activityName": { + "output": { + "pipelineReturnValue": { + "test": "value", + }, + }, + "status": DependencyCondition.SUCCEEDED, + } + } + ), + "value", + id="activity_reference_with_nested_property", + ), + p("@createArray('a', 'b')", PipelineRunState(), ["a", "b"], id="function_call_array_result"), + p("@createArray('a', 'b')[1]", PipelineRunState(), "b", id="function_call_with_array_index"), + p( + "@createArray('a', createArray('b', 'c'))[1][0]", + PipelineRunState(), + "b", + id="function_call_with_nested_array_index", + ), + p( + "@concat( 'x1' , \n 'x2','x3' )", + PipelineRunState(), + "x1x2x3", + id="function_call_with_ws_and_newline", + ), + p( + "@concat(activity('Sample').output.float, 'test')", + PipelineRunState( + pipeline_activity_results={ + "Sample": { + "output": { + "float": 0.016666666666666666, + }, + "status": DependencyCondition.SUCCEEDED, + } + } + ), + "0.016666666666666666test", + id="function_call_with_nested_property", + marks=pytest.mark.xfail( + reason="We do not support automatic type conversion yet. Here float is passed to concat (which expects str)." + ), + ), + p( + "@activity('Sample').output.billingReference.billableDuration[0].duration", + PipelineRunState( + pipeline_activity_results={ + "Sample": { + "output": { + "billingReference": { + "activityType": "ExternalActivity", + "billableDuration": [ + {"meterType": "AzureIR", "duration": 0.016666666666666666, "unit": "Hours"} + ], + } + }, + "status": DependencyCondition.SUCCEEDED, + } + } + ), + 0.016666666666666666, + id="activity_reference_with_nested_property_and_array_index", + ), + p( + "@utcNow()", + PipelineRunState(), + "2021-11-24T12:11:49.753132Z", + id="function_call_with_zero_parameters", + ), + p( + "@coalesce(null)", + PipelineRunState(), + None, + id="function_call_with_null_parameter", + ), + p( + "@{pipeline().globalParameters.OpsPrincipalClientId}", + PipelineRunState(parameters=[RunParameter(RunParameterType.Global, "OpsPrincipalClientId", "dummyId")]), + "dummyId", + id="string_interpolation_with_no_surrounding_literals", + ), + p( + "/Repos/@{pipeline().globalParameters.OpsPrincipalClientId}/", + PipelineRunState(parameters=[RunParameter(RunParameterType.Global, "OpsPrincipalClientId", "dummyId")]), + "/Repos/dummyId/", + id="string_interpolation_with_literals", + ), + p( + "/Repos/@{pipeline().globalParameters.OpsPrincipalClientId}/@{pipeline().parameters.SubPath}", + PipelineRunState( + parameters=[ + RunParameter(RunParameterType.Global, "OpsPrincipalClientId", "dummyId"), + RunParameter(RunParameterType.Pipeline, "SubPath", "dummyPath"), + ] + ), + "/Repos/dummyId/dummyPath", + id="string_interpolation_with_multiple_expressions", + ), + ], +) +@freeze_time("2021-11-24 12:11:49.753132") +def test_evaluate(expression: str, state: PipelineRunState, expected: Union[str, int, bool, float]) -> None: + # Arrange + evaluator = ExpressionEvaluator() + + # Act + actual = evaluator.evaluate(expression, state) + + # Assert + assert actual == expected + + +def test_evaluate_raises_exception_when_pipeline_parameter_not_found() -> None: + # Arrange + expression = "@pipeline().parameters.parameter" + evaluator = ExpressionEvaluator() + state = PipelineRunState() + + # Act + with pytest.raises(ExpressionParameterNotFoundError) as exinfo: + evaluator.evaluate(expression, state) + + # Assert + assert str(exinfo.value) == "Parameter 'parameter' not found" + + +def test_evaluate_raises_exception_when_pipeline_global_parameter_not_found() -> None: + # Arrange + expression = "@pipeline().globalParameters.parameter" + evaluator = ExpressionEvaluator() + state = PipelineRunState() + + # Act + with pytest.raises(ExpressionParameterNotFoundError) as exinfo: + evaluator.evaluate(expression, state) + + # Assert + assert str(exinfo.value) == "Parameter 'parameter' not found" + + +def test_evaluate_raises_exception_when_variable_not_found() -> None: + # Arrange + expression = "@variables('variable')" + evaluator = ExpressionEvaluator() + state = PipelineRunState() + + # Act + with pytest.raises(VariableNotFoundError) as exinfo: + evaluator.evaluate(expression, state) + + # Assert + assert str(exinfo.value) == "Variable 'variable' not found" + + +def test_evaluate_raises_exception_when_dataset_not_found() -> None: + # Arrange + expression = "@dataset('datasetName')" + evaluator = ExpressionEvaluator() + state = PipelineRunState() + + # Act + with pytest.raises(DatasetParameterNotFoundError) as exinfo: + evaluator.evaluate(expression, state) + + # Assert + assert str(exinfo.value) == "Dataset parameter: 'datasetName' not found" + + +def test_evaluate_raises_exception_when_linked_service_not_found() -> None: + # Arrange + expression = "@linkedService('linkedServiceName')" + evaluator = ExpressionEvaluator() + state = PipelineRunState() + + # Act + with pytest.raises(LinkedServiceParameterNotFoundError) as exinfo: + evaluator.evaluate(expression, state) + + # Assert + assert str(exinfo.value) == "LinkedService parameter: 'linkedServiceName' not found" + + +def test_evaluate_raises_exception_when_activity_not_found() -> None: + # Arrange + expression = "@activity('activityName').output.outputName" + evaluator = ExpressionEvaluator() + state = PipelineRunState() + + # Act + with pytest.raises(ActivityNotFoundError) as exinfo: + evaluator.evaluate(expression, state) + + # Assert + assert str(exinfo.value) == "Activity with name 'activityName' not found" + + +def test_evaluate_raises_exception_when_state_iteration_item_not_set() -> None: + # Arrange + expression = "@item()" + evaluator = ExpressionEvaluator() + state = PipelineRunState() + + # Act + with pytest.raises(StateIterationItemNotSetError) as exinfo: + evaluator.evaluate(expression, state) + + # Assert + assert str(exinfo.value) == "Iteration item not set." + + +def test_evaluate_system_variable() -> None: + # Arrange + expression = "@pipeline().RunId" + evaluator = ExpressionEvaluator() + state = PipelineRunState( + parameters=[ + RunParameter(RunParameterType.System, "RunId", "123"), + ] + ) + + # Act + actual = evaluator.evaluate(expression, state) + + # Assert + assert actual == "123" + + +def test_evaluate_system_variable_raises_exception_when_parameter_not_set() -> None: + # Arrange + expression = "@pipeline().RunId" + evaluator = ExpressionEvaluator() + state = PipelineRunState() + + # Act + with pytest.raises(ExpressionParameterNotFoundError) as exinfo: + evaluator.evaluate(expression, state) + + # Assert + assert str(exinfo.value) == "Parameter 'RunId' not found" diff --git a/tests/unit/functions/test_function_repository.py b/tests/unit/functions/test_function_repository.py new file mode 100644 index 00000000..9822a222 --- /dev/null +++ b/tests/unit/functions/test_function_repository.py @@ -0,0 +1,14 @@ +from unittest.mock import Mock + +from data_factory_testing_framework.functions.functions_repository import FunctionsRepository + + +def test_function_registration() -> None: + # Arrange + function_spy = Mock() + + # Act + FunctionsRepository.register("function_name", function_spy) + + # Assert + assert FunctionsRepository.functions["function_name"] == function_spy diff --git a/tests/unit/functions/test_functions_collection_implementation.py b/tests/unit/functions/test_functions_collection_implementation.py new file mode 100644 index 00000000..119f9e1a --- /dev/null +++ b/tests/unit/functions/test_functions_collection_implementation.py @@ -0,0 +1,181 @@ +from typing import Any, Union + +import data_factory_testing_framework.functions.functions_collection_implementation as collection_functions +import pytest +from pytest import param + + +@pytest.mark.parametrize( + ["collection", "value", "expected"], + [ + param("abcdef", "cd", True, id="str_contains"), + param("abcdef", "CD", False, id="str_contains_case_sensitive"), + param( + "abc8ef", 8, True, id="str_contains", marks=pytest.mark.xfail(raises=TypeError) + ), # TODO: Should this work, and if so what with list and dict? + param(["a", "b", "c"], "b", True, id="list_contains"), + param(["a", "b", "c"], "B", False, id="list_contains_case_sensitive"), + param({"a": 1, "b": 2, "c": 3}, "b", True, id="dict_contains"), + param({"a": 1, "b": 2, "c": 3}, "B", False, id="dict_contains_case_sensitive"), + ], +) +def test_contains(collection: Union[str, list, dict], value: Any, expected: bool) -> None: # noqa: ANN401 + # Act + actual = collection_functions.contains(collection, value) + + # Assert + assert actual == expected + + +@pytest.mark.parametrize( + ["collection", "expected"], + [ + param("abcdef", False, id="str_empty"), + param("", True, id="str_empty"), + param(["a", "b", "c"], False, id="list_empty"), + param([], True, id="list_empty"), + ], +) +def test_empty(collection: Union[str, list], expected: bool) -> None: + # Act + actual = collection_functions.empty(collection) + + # Assert + assert actual == expected + + +@pytest.mark.parametrize( + ["collection", "expected"], + [ + param(["a", "b", "c"], "a", id="list_first"), + param("abcdef", "a", id="str_first"), + param([1, 2, 3], 1, id="list_first_int"), + param([], None, id="list_first_empty"), + param("", None, id="str_first_empty"), + ], +) +def test_first(collection: Union[str, list], expected: Any) -> None: # noqa: ANN401 + # Act + actual = collection_functions.first(collection) + + # Assert + assert actual == expected + + +@pytest.mark.parametrize( + ["collections", "expected"], + [ + param([["a", "b", "c"], ["b", "c", "d"]], ["b", "c"], id="list_intersection"), + param(["abcdef", "cdefgh"], "cdef", id="str_intersection"), + ], +) +def test_intersection(collections: list[Union[str, list]], expected: Union[str, list]) -> None: + # Act + actual = collection_functions.intersection(*collections) + + # Assert + assert actual == expected + + +@pytest.mark.parametrize( + ["collection", "delimiter", "expected"], + [ + param(["a", "b", "c"], ",", "a,b,c", id="list_join"), + param(["a", "b", "c"], "", "abc", id="list_join_empty_delimiter"), + param(["a", "b", "c"], " ", "a b c", id="list_join_space_delimiter"), + ], +) +def test_join(collection: list, delimiter: str, expected: str) -> None: + # Act + actual = collection_functions.join(collection, delimiter) + + # Assert + assert actual == expected + + +@pytest.mark.parametrize( + ["collection", "expected"], + [ + param(["a", "b", "c"], "c", id="list_last"), + param("abcdef", "f", id="str_last"), + param([1, 2, 3], 3, id="list_last_int"), + param([], None, id="list_last_empty"), + param("", None, id="str_last_empty"), + ], +) +def test_last(collection: Union[str, list], expected: Any) -> None: # noqa: ANN401 + # Act + actual = collection_functions.last(collection) + + # Assert + assert actual == expected + + +@pytest.mark.parametrize( + ["collection", "expected"], + [ + param(["a", "b", "c"], 3, id="list_length"), + param("abcdef", 6, id="str_length"), + param([], 0, id="list_length_empty"), + param("", 0, id="str_length_empty"), + param(None, 0, id="str_length_none"), + ], +) +def test_length(collection: Union[str, list], expected: int) -> None: # noqa: ANN401 + # Act + actual = collection_functions.length(collection) + + # Assert + assert actual == expected + + +@pytest.mark.parametrize( + ["collection", "count", "expected"], + [ + param(["a", "b", "c"], 2, ["c"], id="list_skip"), + param([], 2, [], id="list_skip_empty", marks=pytest.mark.xfail(raises=IndexError)), + param(None, 2, None, id="str_skip_none", marks=pytest.mark.xfail(raises=ValueError)), + ], +) +def test_skip(collection: list, count: int, expected: list) -> None: + # Act + actual = collection_functions.skip(collection, count) + + # Assert + assert actual == expected + + +@pytest.mark.parametrize( + ["collection", "count", "expected"], + [ + param(["a", "b", "c"], 2, ["a", "b"], id="list_take"), + param([], 2, [], id="list_take_empty", marks=pytest.mark.xfail(raises=IndexError)), + param(None, 2, None, id="str_take_none", marks=pytest.mark.xfail(raises=ValueError)), + ], +) +def test_take(collection: Union[str, list], count: int, expected: list) -> None: + # Act + actual = collection_functions.take(collection, count) + + # Assert + assert actual == expected + + +@pytest.mark.parametrize( + ["collections", "expected"], + [ + param([["a", "b", "c"], ["b", "c", "d"]], ["a", "b", "c", "d"], id="list_union"), + param( + [["a", "b", "c"], ["b", "c", "d"], ["a", "b", "c", "d"]], ["a", "b", "c", "d"], id="list_union_duplicates" + ), + param([["c", "b", "a"], ["d", "c", "b"]], ["c", "b", "a", "d"], id="list_union_order"), + param([[1, 2, 3], [1, 2, 10, 101]], [1, 2, 3, 10, 101], id="list_union_int"), + param([[1, 1, 1], [2, 3, 4]], [1, 2, 3, 4], id="list_union_int_duplicates"), + ], +) +def test_union(collections: list[list], expected: Any) -> None: # noqa: ANN401 + # Act + actual = collection_functions.union(*collections) + + # Assert + assert actual == expected diff --git a/tests/unit/functions/test_functions_conversion_functions.py b/tests/unit/functions/test_functions_conversion_functions.py new file mode 100644 index 00000000..04e98bf3 --- /dev/null +++ b/tests/unit/functions/test_functions_conversion_functions.py @@ -0,0 +1,460 @@ +from typing import Any, Union + +import data_factory_testing_framework.functions.functions_conversion_implementation as conversion_functions +import pytest +from lxml import etree +from pytest import param + + +@pytest.mark.parametrize( + ["value", "expected"], + [ + param("hello", ["hello"]), + ], +) +def test_array(value: str, expected: list) -> None: + # Act + actual = conversion_functions.array(value) + + # Assert + assert actual == expected + + +@pytest.mark.parametrize( + ["value", "expected"], + [ + param("hello", "aGVsbG8="), + ], +) +def test_base64(value: str, expected: str) -> None: + # Act + actual = conversion_functions.base64(value) + + # Assert + assert actual == expected + + +@pytest.mark.parametrize( + ["value", "expected"], + [ + param("aGVsbG8=", "0110000101000111010101100111001101100010010001110011100000111101"), + ], +) +def test_base64_to_binary(value: str, expected: bytes) -> None: + # Act + actual = conversion_functions.base64_to_binary(value) + + # Assert + assert actual == expected + + +@pytest.mark.parametrize( + ["value", "expected"], + [ + param("aGVsbG8=", "hello"), + ], +) +def test_base64_to_string(value: str, expected: str) -> None: + # Act + actual = conversion_functions.base64_to_string(value) + + # Assert + assert actual == expected + + +@pytest.mark.parametrize( + ["value", "expected"], + [ + param("hello", "0110100001100101011011000110110001101111"), + ], +) +def test_binary(value: str, expected: str) -> None: + # Act + actual = conversion_functions.binary(value) + + # Assert + assert actual == expected + + +@pytest.mark.parametrize( + ["value", "expected"], + [ + param(1, True), + param(0, False), + ], +) +def test_bool(value: Any, expected: bool) -> None: # noqa: ANN401 + # Act + actual = conversion_functions.bool_(value) + + # Assert + assert actual == expected + + +@pytest.mark.parametrize( + ["objects", "expected"], + [ + param([None, True, False], True), + param([None, "hello", "world"], "hello"), + param([None, None, None], None), + ], +) +def test_coalesce(objects: list[Any], expected: Any) -> None: # noqa: ANN401 + # Act + actual = conversion_functions.coalesce(*objects) + + # Assert + assert actual == expected + + +@pytest.mark.parametrize( + ["objects", "expected"], + [ + param(["h", "e", "l", "l", "o"], ["h", "e", "l", "l", "o"]), + ], +) +def test_create_array(objects: list[Any], expected: Any) -> None: # noqa: ANN401 + # Act + actual = conversion_functions.create_array(*objects) + + # Assert + assert actual == expected + + +@pytest.mark.parametrize( + ["value", "expected"], + [ + param("hello", "data:text/plain;charset=utf-8;base64,aGVsbG8="), + ], +) +def test_data_uri(value: str, expected: str) -> None: + # Act + actual = conversion_functions.data_uri(value) + + # Assert + assert actual == expected + + +@pytest.mark.parametrize( + ["value", "expected"], + [ + param( + "data:text/plain;charset=utf-8;base64,aGVsbG8=", + ( + "01100100011000010111010001100001001110100111010001100101011110000111010000101111011100000" + "1101100011000010110100101101110001110110110001101101000011000010111001001110011011001010111" + "0100001111010111010101110100011001100010110100111000001110110110001001100001011100110110010" + "10011011000110100001011000110000101000111010101100111001101100010010001110011100000111101" + ), + ), + ], +) +def test_data_uri_to_binary(value: str, expected: str) -> None: + # Act + actual = conversion_functions.data_uri_to_binary(value) + + # Assert + assert actual == expected + + +@pytest.mark.parametrize( + ["value", "expected"], + [ + param("data:text/plain;charset=utf-8;base64,aGVsbG8=", "hello"), + ], +) +def test_data_uri_to_string(value: str, expected: str) -> None: + # Act + actual = conversion_functions.data_uri_to_string(value) + + # Assert + assert actual == expected + + +@pytest.mark.parametrize( + ["value", "expected"], + [ + param("aGVsbG8=", "hello"), + ], +) +def test_decode_base64(value: str, expected: str) -> None: + # Act + actual = conversion_functions.decode_base64(value) + + # Assert + assert actual == expected + + +@pytest.mark.parametrize( + ["value", "expected"], + [ + param( + "data:text/plain;charset=utf-8;base64,aGVsbG8=", + ( + "01100100011000010111010001100001001110100111010001100101011110000111010000101111011100000" + "1101100011000010110100101101110001110110110001101101000011000010111001001110011011001010111" + "0100001111010111010101110100011001100010110100111000001110110110001001100001011100110110010" + "10011011000110100001011000110000101000111010101100111001101100010010001110011100000111101" + ), + ), + ], +) +def test_decode_data_uri(value: str, expected: str) -> None: + # Act + actual = conversion_functions.decode_data_uri(value) + + # Assert + assert actual == expected + + +@pytest.mark.parametrize( + ["value", "expected"], + [ + param("http%3A%2F%2Fcontoso.com", "http://contoso.com"), + ], +) +def test_decode_uri_component(value: str, expected: str) -> None: + # Act + actual = conversion_functions.decode_uri_component(value) + + # Assert + assert actual == expected + + +@pytest.mark.parametrize( + ["value", "expected"], + [ + param("http://contoso.com", "http%3A%2F%2Fcontoso.com"), + ], +) +def test_encode_uri_component(value: str, expected: str) -> None: + # Act + actual = conversion_functions.encode_uri_component(value) + + # Assert + assert actual == expected + + +@pytest.mark.parametrize( + ["value", "expected"], + [ + param("10.333", 10.333), + ], +) +def test_float(value: str, expected: float) -> None: + # Act + actual = conversion_functions.float_(value) + + # Assert + assert actual == expected + + +@pytest.mark.parametrize( + ["value", "expected"], + [ + param("10", 10), + ], +) +def test_int(value: str, expected: int) -> None: + # Act + actual = conversion_functions.int_(value) + + # Assert + assert actual == expected + + +@pytest.mark.parametrize( + ["value", "expected"], + [ + param( + "[1, 2, 3]", + [1, 2, 3], + marks=pytest.mark.xfail( + reason="TODO: json to array conversion not supported as we do not support complex types" + ), + ), + param( + '{"fullName": "Sophia Owen"}', + {"fullName": "Sophia Owen"}, + marks=pytest.mark.xfail( + reason="TODO: json to object conversion not supported as we do not support complex types" + ), + ), + param( + etree.fromstring( + ' ' + "Sophia Owen Engineer " + ), + { + "?xml": {"@version": "1.0"}, + "root": {"person": [{"@id": "1", "name": "Sophia Owen", "occupation": "Engineer"}]}, + }, + marks=pytest.mark.xfail(reason="TODO: xml to json conversion implementation does not fully match yet"), + ), + ], +) +def test_json(value: Union[str, etree.fromstring], expected: object) -> None: + # TODO: really unclear how we handle json objects (as no 'json' type exists in python) + # Act + actual = conversion_functions.json(value) + + # Assert + assert actual == expected + + +@pytest.mark.parametrize( + ["value", "expected"], + [ + param(10, "10"), + param( + {"name": "Sophie Owen"}, + '{ \\"name\\": \\"Sophie Owen\\" }', + marks=pytest.mark.xfail(reason="TODO: objects to string do not match yet"), + ), + ], +) +def test_string(value: Any, expected: str) -> None: # noqa: ANN401 + # Act + actual = conversion_functions.string(value) + + # Assert + assert actual == expected + + +@pytest.mark.parametrize( + ["value", "expected"], + [ + param("http://contoso.com", "http%3A%2F%2Fcontoso.com"), + ], +) +def test_uri_component(value: str, expected: str) -> None: + # Act + actual = conversion_functions.uri_component(value) + + # Assert + assert actual == expected + + +@pytest.mark.parametrize( + ["value", "expected"], + [ + param( + "http%3A%2F%2Fcontoso.com", + ( + "001000100110100001110100011101000111000000100101001100" + "11010000010010010100110010010001100010010100110010010001" + "10011000110110111101101110011101000110111101110011011011" + "110010111001100011011011110110110100100010" + ), + ), + ], +) +def test_uri_component_to_binary(value: str, expected: str) -> None: + # Act + actual = conversion_functions.uri_component_to_binary(value) + + # Assert + assert actual == expected + + +@pytest.mark.parametrize( + ["value", "expected"], + [ + param("http%3A%2F%2Fcontoso.com", "http://contoso.com"), + ], +) +def test_uri_component_to_string(value: str, expected: str) -> None: + # Act + actual = conversion_functions.uri_component_to_string(value) + + # Assert + assert actual == expected + + +@pytest.mark.parametrize( + ["value", "expected"], + [ + param( + ' ' + "Sophia Owen Engineer ", + etree.fromstring( + ( + ' ' + "Sophia Owen Engineer " + ) + ), + ), + ], +) +def test_xml(value: object, expected: etree.Element) -> None: + # Act + actual = conversion_functions.xml(value) + + # Assert + assert etree.tostring(actual) == etree.tostring(expected) + + +@pytest.mark.parametrize( + ["xml", "xpath", "expected"], + [ + param( + etree.fromstring( + ' Sophia Owen Engineer ' + ), + "root/person/name", + "Sophia Owen", + marks=pytest.mark.xfail( + reason="TODO: xpath implementation does work yet due to different xml capabilities" + ), + ), + param( + etree.fromstring( + ( + ' ' + " 1 Apple " + " 2 Orange " + " 3 Banana " + "" + ) + ), + "sum(/produce/item/count)", + 6.0, # TODO: this is a float, yet expressions return something else + ), + param( + etree.fromstring( + (' Paris ') + ), + '/*[name()="file"]/*[name()="location"]', + 'Paris', + marks=pytest.mark.xfail( + reason="TODO: xpath implementation does work yet due to different xml capabilities" + ), + ), + param( + etree.fromstring( + (' Paris ') + ), + '/*[local-name()="file" and namespace-uri()="http://contoso.com"]/*[local-name()="location"]', + 'Paris', + marks=pytest.mark.xfail( + reason="TODO: xpath implementation does work yet due to different xml capabilities" + ), + ), + param( + etree.fromstring( + (' Paris ') + ), + '/*[local-name()="file"]/*[local-name()="location"]', + 'string(/*[name()="file"]/*[name()="location"])', + marks=pytest.mark.xfail( + reason="TODO: xpath implementation does work yet due to different xml capabilities" + ), + ), + ], +) +def test_xpath(xml: etree.Element, xpath: str, expected: Union[object, list]) -> None: + # Act + actual = conversion_functions.xpath(xml, xpath) + + # Assert + assert actual == expected diff --git a/tests/unit/functions/test_functions_date_functions.py b/tests/unit/functions/test_functions_date_functions.py new file mode 100644 index 00000000..87e419eb --- /dev/null +++ b/tests/unit/functions/test_functions_date_functions.py @@ -0,0 +1,279 @@ +import data_factory_testing_framework.functions.functions_date_implementation as date_functions +import pytest +from _pytest.mark import param +from freezegun import freeze_time + + +@freeze_time("2023-11-24T12:11:54.753132") +def test_utcnow() -> None: + # Act + actual = date_functions.utcnow() + + # Assert + assert actual == "2023-11-24T12:11:54.753132Z" + + +@pytest.mark.parametrize( + "date_time_str, expected_ticks", + [ + param("2023-11-24T12:11:54.753132", 638364247147531320, id="ticks"), + param("2023-11-24T00:00:00", 638363808000000000, id="ticks_without_microseconds"), + ], +) +def test_ticks(date_time_str: str, expected_ticks: int) -> None: + # Act + actual = date_functions.ticks(date_time_str) + + # Assert + assert actual == expected_ticks + + +@pytest.mark.parametrize( + "seconds, expected", + [ + param(-5, "2023-11-24T12:11:44.753132Z", id="negative"), + param(125, "2023-11-24T12:13:54.753132Z", id="positive"), + param(3601, "2023-11-24T13:11:50.753132Z", id="positive_one_hour"), + param(3600 * 24, "2023-11-25T12:11:49.753132Z", id="positive_one_day"), + ], +) +def test_add_seconds(seconds: int, expected: str) -> None: + result: str = date_functions.add_seconds("2023-11-24T12:11:49.753132Z", seconds) + assert result == expected + + +@pytest.mark.parametrize( + "minutes, expected", + [ + param(-5, "2023-11-24T12:06:49.753132Z", id="negative"), + param(125, "2023-11-24T14:16:49.753132Z", id="positive"), + ], +) +def test_add_minutes(minutes: int, expected: str) -> None: + result: str = date_functions.add_minutes("2023-11-24T12:11:49.753132Z", minutes) + assert result == expected + + +@pytest.mark.parametrize( + "hours, expected", + [ + param(-2, "2023-11-24T10:11:49.753132Z", id="negative"), + param(3, "2023-11-24T15:11:49.753132Z", id="positive"), + ], +) +def test_add_hours(hours: int, expected: str) -> None: + result: str = date_functions.add_hours("2023-11-24T12:11:49.753132Z", hours) + assert result == expected + + +@pytest.mark.parametrize( + "days, expected", + [ + param(-1, "2023-11-23T12:11:49.753132Z", id="negative"), + param(2, "2023-11-26T12:11:49.753132Z", id="positive"), + param(30, "2023-12-24T12:11:49.753132Z", id="month"), + ], +) +def test_add_days(days: int, expected: str) -> None: + result: str = date_functions.add_days("2023-11-24T12:11:49.753132Z", days) + assert result == expected + + +@pytest.mark.parametrize( + "interval, time_unit, expected", + [ + param(-1, "Second", "2023-11-24T12:11:48.753132Z", id="negative-second"), + param(-1, "Minute", "2023-11-24T12:10:49.753132Z", id="negative-minute"), + param(-1, "Hour", "2023-11-24T11:11:49.753132Z", id="negative-hour"), + param(-1, "Day", "2023-11-23T12:11:49.753132Z", id="negative-day"), + param(-1, "Week", "2023-11-17T12:11:49.753132Z", id="negative-week"), + param(-1, "Month", "2023-10-24T12:11:49.753132Z", id="negative-month"), + param(-1, "Year", "2022-11-24T12:11:49.753132Z", id="negative-year"), + param(5, "Second", "2023-11-24T12:11:54.753132Z", id="positive-second"), + param(5, "Minute", "2023-11-24T12:16:49.753132Z", id="positive-minute"), + param(5, "Hour", "2023-11-24T17:11:49.753132Z", id="positive-hour"), + param(5, "Day", "2023-11-29T12:11:49.753132Z", id="positive-day"), + param(5, "Week", "2023-12-29T12:11:49.753132Z", id="positive-week"), + param(5, "Month", "2024-04-24T12:11:49.753132Z", id="positive-month"), + param(5, "Year", "2028-11-24T12:11:49.753132Z", id="positive-year"), + ], +) +def test_add_to_time(interval: int, time_unit: str, expected: str) -> None: + result: str = date_functions.add_to_time("2023-11-24T12:11:49.753132Z", interval, time_unit) + assert result == expected + + +def test_add_to_time_unknown_interval_throws_error() -> None: + with pytest.raises(ValueError): + date_functions.add_to_time("2023-11-24T12:11:49.753132Z", 5, "Unknown") + + +@pytest.mark.parametrize( + "interval, time_unit, expected", + [ + param(-1, "Second", "2023-11-24T12:11:48.753132Z", id="negative-second"), + param(-1, "Minute", "2023-11-24T12:10:49.753132Z", id="negative-minute"), + param(-1, "Hour", "2023-11-24T11:11:49.753132Z", id="negative-hour"), + param(-1, "Day", "2023-11-23T12:11:49.753132Z", id="negative-day"), + param(-1, "Week", "2023-11-17T12:11:49.753132Z", id="negative-week"), + param(-1, "Month", "2023-10-24T12:11:49.753132Z", id="negative-month"), + param(-1, "Year", "2022-11-24T12:11:49.753132Z", id="negative-year"), + param(5, "Second", "2023-11-24T12:11:54.753132Z", id="positive-second"), + param(5, "Minute", "2023-11-24T12:16:49.753132Z", id="positive-minute"), + param(5, "Hour", "2023-11-24T17:11:49.753132Z", id="positive-hour"), + param(5, "Day", "2023-11-29T12:11:49.753132Z", id="positive-day"), + param(5, "Week", "2023-12-29T12:11:49.753132Z", id="positive-week"), + param(5, "Month", "2024-04-24T12:11:49.753132Z", id="positive-month"), + param(5, "Year", "2028-11-24T12:11:49.753132Z", id="positive-year"), + ], +) +@freeze_time("2023-11-24T12:11:49.753132Z") +def test_get_future_time(interval: int, time_unit: str, expected: str) -> None: + result: str = date_functions.get_future_time(interval, time_unit) + assert result == expected + + +@pytest.mark.parametrize( + "interval, time_unit, expected", + [ + param(1, "Second", "2023-11-24T12:11:48.753132Z", id="negative-second"), + param(1, "Minute", "2023-11-24T12:10:49.753132Z", id="negative-minute"), + param(1, "Hour", "2023-11-24T11:11:49.753132Z", id="negative-hour"), + param(1, "Day", "2023-11-23T12:11:49.753132Z", id="negative-day"), + param(1, "Week", "2023-11-17T12:11:49.753132Z", id="negative-week"), + param(1, "Month", "2023-10-24T12:11:49.753132Z", id="negative-month"), + param(1, "Year", "2022-11-24T12:11:49.753132Z", id="negative-year"), + param(-5, "Second", "2023-11-24T12:11:54.753132Z", id="positive-second"), + param(-5, "Minute", "2023-11-24T12:16:49.753132Z", id="positive-minute"), + param(-5, "Hour", "2023-11-24T17:11:49.753132Z", id="positive-hour"), + param(-5, "Day", "2023-11-29T12:11:49.753132Z", id="positive-day"), + param(-5, "Week", "2023-12-29T12:11:49.753132Z", id="positive-week"), + param(-5, "Month", "2024-04-24T12:11:49.753132Z", id="positive-month"), + param(-5, "Year", "2028-11-24T12:11:49.753132Z", id="positive-year"), + ], +) +def test_subtract_to_time(interval: int, time_unit: str, expected: str) -> None: + result: str = date_functions.subtract_from_time("2023-11-24T12:11:49.753132Z", interval, time_unit) + assert result == expected + + +@pytest.mark.parametrize( + "interval, time_unit, expected", + [ + param(1, "Second", "2023-11-24T12:11:48.753132Z", id="negative-second"), + param(1, "Minute", "2023-11-24T12:10:49.753132Z", id="negative-minute"), + param(1, "Hour", "2023-11-24T11:11:49.753132Z", id="negative-hour"), + param(1, "Day", "2023-11-23T12:11:49.753132Z", id="negative-day"), + param(1, "Week", "2023-11-17T12:11:49.753132Z", id="negative-week"), + param(1, "Month", "2023-10-24T12:11:49.753132Z", id="negative-month"), + param(1, "Year", "2022-11-24T12:11:49.753132Z", id="negative-year"), + param(-5, "Second", "2023-11-24T12:11:54.753132Z", id="positive-second"), + param(-5, "Minute", "2023-11-24T12:16:49.753132Z", id="positive-minute"), + param(-5, "Hour", "2023-11-24T17:11:49.753132Z", id="positive-hour"), + param(-5, "Day", "2023-11-29T12:11:49.753132Z", id="positive-day"), + param(-5, "Week", "2023-12-29T12:11:49.753132Z", id="positive-week"), + param(-5, "Month", "2024-04-24T12:11:49.753132Z", id="positive-month"), + param(-5, "Year", "2028-11-24T12:11:49.753132Z", id="positive-year"), + ], +) +@freeze_time("2023-11-24T12:11:49.753132Z") +def test_get_past_time(interval: int, time_unit: str, expected: str) -> None: + result: str = date_functions.get_past_time(interval, time_unit) + assert result == expected + + +@pytest.mark.parametrize( + "timestamp, expected", + [ + param("2023-11-24T12:11:49.753132Z", "2023-11-24T00:00:00.000000Z"), + param("2024-01-05T23:59:49.753132Z", "2024-01-05T00:00:00.000000Z"), + ], +) +def test_start_of_day(timestamp: str, expected: str) -> None: + result: str = date_functions.start_of_day(timestamp) + assert result == expected + + +@pytest.mark.parametrize( + "timestamp, expected", + [ + param("2023-11-24T12:11:49.753132Z", "2023-11-24T12:00:00.000000Z"), + param("2024-01-05T23:59:49.753132Z", "2024-01-05T23:00:00.000000Z"), + ], +) +def test_start_of_hour(timestamp: str, expected: str) -> None: + result: str = date_functions.start_of_hour(timestamp) + assert result == expected + + +@pytest.mark.parametrize( + "timestamp, expected", + [ + param("2023-11-24T12:11:49.753132Z", "2023-11-01T00:00:00.000000Z"), + param("2024-01-05T23:59:49.753132Z", "2024-01-01T00:00:00.000000Z"), + ], +) +def test_start_of_month(timestamp: str, expected: str) -> None: + result: str = date_functions.start_of_month(timestamp) + assert result == expected + + +def test_format_date_time() -> None: + result: str = date_functions.format_date_time("2023-11-24T12:11:49.753132") + assert result == "2023-11-24T12:11:49.753132Z" + + +def test_convert_from_utc() -> None: + result: str = date_functions.convert_from_utc("2023-11-24T12:11:49.753132Z", "Central Standard Time") + assert result == "2023-11-24T12:11:49.753132Z" + + +def test_convert_time_zone() -> None: + result: str = date_functions.convert_time_zone( + "2023-11-24T12:11:49.753132Z", "Central Standard Time", "Central Standard Time" + ) + assert result == "2023-11-24T12:11:49.753132Z" + + +def test_convert_to_utc() -> None: + result: str = date_functions.convert_to_utc("2023-11-24T12:11:49.753132Z", "Central Standard Time") + assert result == "2023-11-24T12:11:49.753132Z" + + +@pytest.mark.parametrize( + "timestamp, expected", + [ + param("2023-11-24T12:11:49.753132Z", 5), + param("2024-01-04T23:59:49.753132Z", 4), + param("2024-05-17T23:59:49.753132Z", 5), + ], +) +def test_day_of_week(timestamp: str, expected: int) -> None: + result: int = date_functions.day_of_week(timestamp) + assert result == expected + + +@pytest.mark.parametrize( + "timestamp, expected", + [ + param("2023-11-24T12:11:49.753132Z", 24), + param("2024-01-04T23:59:49.753132Z", 4), + param("2024-05-17T23:59:49.753132Z", 17), + ], +) +def test_day_of_month(timestamp: str, expected: int) -> None: + result: int = date_functions.day_of_month(timestamp) + assert result == expected + + +@pytest.mark.parametrize( + "timestamp, expected", + [ + param("2023-11-24T12:11:49.753132Z", 328), + param("2024-01-04T23:59:49.753132Z", 4), + param("2024-05-17T23:59:49.753132Z", 138), + ], +) +def test_day_of_year(timestamp: str, expected: int) -> None: + result: int = date_functions.day_of_year(timestamp) + assert result == expected diff --git a/tests/unit/functions/test_functions_logical_implementation.py b/tests/unit/functions/test_functions_logical_implementation.py new file mode 100644 index 00000000..f07cacc1 --- /dev/null +++ b/tests/unit/functions/test_functions_logical_implementation.py @@ -0,0 +1,153 @@ +from typing import Any, Union + +import data_factory_testing_framework.functions.functions_logical_implementation as logical_functions +import pytest +from pytest import param + + +@pytest.mark.parametrize( + "expression1, expression_2, expected", + [ + (True, True, True), + (True, False, False), + (False, True, False), + (False, False, False), + ], +) +def test_and(expression1: bool, expression_2: bool, expected: bool) -> None: + # Act + actual = logical_functions.and_(expression1, expression_2) + + # Assert + assert actual == expected + + +@pytest.mark.parametrize( + "object1, object2, expected", + [ + (True, 1, True), + ("abc", "abcd", False), + ], +) +def test_equals(object1: Any, object2: Any, expected: bool) -> None: # noqa: ANN401 + # Act + actual = logical_functions.equals(object1, object2) + + # Assert + assert actual == expected + + +@pytest.mark.parametrize( + ["value", "compare_to", "expected"], + [ + param(10, 5, True), + param("apple", "banana", False), + ], +) +def test_greater(value: Any, compare_to: Any, expected: bool) -> None: # noqa: ANN401 + # Act + actual = logical_functions.greater(value, compare_to) + + # Assert + assert actual == expected + + +@pytest.mark.parametrize( + ["value", "compare_to", "expected"], + [ + param(10, 5, True), + param(5, 10, False), + param(5, 5, True), + ], +) +def test_greater_or_equals(value: Any, compare_to: Any, expected: bool) -> None: # noqa: ANN401 + # Act + actual = logical_functions.greater_or_equals(value, compare_to) + + # Assert + assert actual == expected + + +@pytest.mark.parametrize( + ["expression", "value_if_true", "value_if_false", "expected"], + [ + param(True, "yes", "no", "yes"), + param(False, "yes", "no", "no"), + ], +) +def test_if(expression: bool, value_if_true: Any, value_if_false: Any, expected: Any) -> None: # noqa: ANN401 + # Act + actual = logical_functions.if_(expression, value_if_true, value_if_false) + + # Assert + assert actual == expected + + +@pytest.mark.parametrize( + ["value", "compare_to", "expected"], + [ + param(5, 10, True), + param(10, 5, False), + param(10, 10, False), + param("apple", "banana", True), + param("banana", "apple", False), + param("apple", "apple", False), + ], +) +def test_less(value: Union[int, float, str], compare_to: Union[int, float, str], expected: bool) -> None: # noqa: ANN401 + # Act + actual = logical_functions.less(value, compare_to) + + # Assert + assert actual == expected + + +@pytest.mark.parametrize( + ["value", "compare_to", "expected"], + [ + param(5, 10, True), + param(10, 5, False), + param(10, 10, True), + param("apple", "banana", True), + param("banana", "apple", False), + param("apple", "apple", True), + ], +) +def test_less_or_equals(value: Union[int, float, str], compare_to: Union[int, float, str], expected: bool) -> None: # noqa: ANN401 + # Act + actual = logical_functions.less_or_equals(value, compare_to) + + # Assert + assert actual == expected + + +@pytest.mark.parametrize( + ["expression", "expected"], + [ + param(True, False), + param(False, True), + ], +) +def test_not(expression: bool, expected: bool) -> None: # noqa: ANN401 + # Act + actual = logical_functions.not_(expression) + + # Assert + assert actual == expected + + +@pytest.mark.parametrize( + ["expression1", "expression2", "expected"], + [ + param(True, True, True), + param(True, False, True), + param(False, True, True), + param(False, False, False), + ], +) +def test_or(expression1: bool, expression2: bool, expected: bool) -> None: # noqa: ANN401 + # Act + actual = logical_functions.or_(expression1, expression2) + + # Assert + assert actual == expected diff --git a/tests/unit/functions/test_functions_math_implementation.py b/tests/unit/functions/test_functions_math_implementation.py new file mode 100644 index 00000000..4dba1c76 --- /dev/null +++ b/tests/unit/functions/test_functions_math_implementation.py @@ -0,0 +1,358 @@ +import random +from typing import Union + +import data_factory_testing_framework.functions.functions_math_implementation as math_functions +import pytest + + +@pytest.mark.parametrize( + ["summand_1", "summand_2", "expected"], + [ + (1, 1.5, 2.5), + (-5, 2, -3), + (1, 4, 5), + ], +) +def test_add( + summand_1: Union[int, float], + summand_2: Union[int, float], + expected: Union[int, float], +) -> None: + # Act + actual = math_functions.add(summand_1, summand_2) + + # Assert + assert actual == expected + + +@pytest.mark.parametrize( + ["summand_1", "summand_2"], + [ + (None, 1), + ], +) +def test_add_with_typeerror( + summand_1: Union[int, float], + summand_2: Union[int, float], +) -> None: + # Assert + with pytest.raises(TypeError): + math_functions.add(summand_1, summand_2) + + +@pytest.mark.parametrize( + ["dividend", "divisor", "expected"], + [ + (10, 5, 2), + (11, 5, 2), + (5.5, 5, 1.1), + (4.5, 1.5, 3), + (4.8, 2.1, 2.2857142857142856), + ], +) +def test_div( + dividend: Union[int, float], + divisor: Union[int, float], + expected: Union[int, float], +) -> None: + # Act + actual = math_functions.div(dividend, divisor) + + # Assert + assert actual == expected + + +@pytest.mark.parametrize( + ["dividend", "divisor"], + [ + (5, 0), + ], +) +def test_div_with_zerodivisionerror( + dividend: Union[int, float], + divisor: Union[int, float], +) -> None: + # Assert + with pytest.raises(ZeroDivisionError): + math_functions.div(dividend, divisor) + + +@pytest.mark.parametrize( + ["dividend", "divisor"], + [ + (None, 1), + ], +) +def test_div_with_typeerror( + dividend: Union[int, float], + divisor: Union[int, float], +) -> None: + # Assert + with pytest.raises(TypeError): + math_functions.div(dividend, divisor) + + +@pytest.mark.parametrize( + ["arg1", "args", "expected"], + [ + ([1, 2, 3], (), 3), + ([1, 2.4, 3.6], (), 3.6), + ([-1], (), -1), + (1, (2, 3.5), 3.5), + (1, (), 1), + ], +) +def test_max( + arg1: Union[list, int, float], + args: tuple, + expected: Union[int, float], +) -> None: + # Act + actual = math_functions.max_(arg1, *args) + + # Assert + assert actual == expected + + +@pytest.mark.xfail +@pytest.mark.parametrize( + ["arg1", "args"], + [ + (None, ()), + ([None], ()), + ], +) +def test_max_with_typeerror(arg1: Union[list, int, float], args: tuple) -> None: + # Assert + with pytest.raises(TypeError): + math_functions.max_(arg1, *args) + + +@pytest.mark.parametrize( + ["arg1", "args", "expected"], + [([1, 2, 3], (), 1), ([1.2, 2.4, 3.6], (), 1.2), ([-1], (), -1), (1, (2, 3.5), 1), (1, (), 1)], +) +def test_min( + arg1: Union[list, int, float], + args: tuple, + expected: Union[int, float], +) -> None: + # Act + actual = math_functions.min_(arg1, *args) + + # Assert + assert actual == expected + + +@pytest.mark.xfail +@pytest.mark.parametrize( + ["arg1", "args"], + [ + (None, ()), + ([None], ()), + ], +) +def test_min_with_typeerror(arg1: Union[list, int, float], args: tuple) -> None: + # Assert + with pytest.raises(TypeError): + math_functions.min_(arg1, *args) + + +@pytest.mark.parametrize( + ["dividend", "divisor", "expected"], + [ + (-3, 2, 1), + (3.5, 2.4, 1.1), + (3.5, 2, 1.5), + (0, 2, 0), + ], +) +def test_mod( + dividend: Union[int, float], + divisor: Union[int, float], + expected: Union[int, float], +) -> None: + # Act + actual = math_functions.mod(dividend, divisor) + + # Assert + assert actual == expected + + +@pytest.mark.parametrize( + ["dividend", "divisor"], + [ + (5, 0), + (2.5, 0), + ], +) +def test_mod_with_zerodivisionerror( + dividend: Union[int, float], + divisor: Union[int, float], +) -> None: + # Assert + with pytest.raises(ZeroDivisionError): + math_functions.mod(dividend, divisor) + + +@pytest.mark.parametrize( + ["dividend", "divisor"], + [ + (None, 1), + (1, None), + (None, None), + ], +) +def test_mod_with_typeerror( + dividend: Union[int, float], + divisor: Union[int, float], +) -> None: + # Assert + with pytest.raises(TypeError): + math_functions.mod(dividend, divisor) + + +@pytest.mark.parametrize( + ["multiplicand1", "multiplicand2", "expected"], + [ + (3, 2, 6), + (3.5, 2.4, 8.4), + (3.5, -2, -7), + (0, 2, 0), + ], +) +def test_mul( + multiplicand1: Union[int, float], + multiplicand2: Union[int, float], + expected: Union[int, float], +) -> None: + # Act + actual = math_functions.mul(multiplicand1, multiplicand2) + + # Assert + assert actual == expected + + +@pytest.mark.parametrize( + ["multiplicand1", "multiplicand2"], + [ + (None, 1), + (1, None), + (None, None), + ], +) +def test_mul_with_typeerror( + multiplicand1: Union[int, float], + multiplicand2: Union[int, float], +) -> None: + # Assert + with pytest.raises(TypeError): + math_functions.mul(multiplicand1, multiplicand2) + + +@pytest.mark.parametrize( + ["min_value", "max_value", "expected"], + [ + (2, 8, 3), + ], +) +def test_rand( + min_value: Union[int, float], + max_value: Union[int, float], + expected: Union[int, float], +) -> None: + # Act + random.seed(1) + actual = math_functions.rand(min_value, max_value) + + # Assert + assert actual == expected + + +@pytest.mark.parametrize( + ["min_value", "max_value"], + [ + (None, 1), + (1, None), + (None, None), + ], +) +def test_rand_with_typeerror( + min_value: Union[int, float], + max_value: Union[int, float], +) -> None: + # Assert + with pytest.raises(TypeError): + math_functions.rand(min_value, max_value) + + +@pytest.mark.parametrize( + ["start_index", "count", "expected"], + [ + (5, 3, [5, 6, 7]), + (-1, 3, [-1, 0, 1]), + ], +) +def test_range( + start_index: Union[int, float], + count: Union[int, float], + expected: Union[int, float], +) -> None: + # Act + actual = math_functions.range_(start_index, count) + + # Assert + assert actual == expected + + +@pytest.mark.parametrize( + ["start_index", "count"], + [ + (None, 1), + (1, None), + (None, None), + ], +) +def test_range_with_typeerror( + start_index: Union[int, float], + count: Union[int, float], +) -> None: + # Assert + with pytest.raises(TypeError): + math_functions.range_(start_index, count) + + +@pytest.mark.parametrize( + ["minuend", "subtrahend", "expected"], + [ + (5, 3, 2), + (-1, 3.5, -4.5), + ], +) +def test_sub( + minuend: Union[int, float], + subtrahend: Union[int, float], + expected: Union[int, float], +) -> None: + # Act + actual = math_functions.sub(minuend, subtrahend) + + # Assert + assert actual == expected + + +@pytest.mark.parametrize( + ["minuend", "subtrahend"], + [ + (None, 1), + (1, None), + (None, None), + ], +) +def test_sub_with_typeerror( + minuend: Union[int, float], + subtrahend: Union[int, float], +) -> None: + # Assert + with pytest.raises(TypeError): + math_functions.sub(minuend, subtrahend) diff --git a/tests/unit/functions/test_functions_string_implementation.py b/tests/unit/functions/test_functions_string_implementation.py new file mode 100644 index 00000000..a5f42b53 --- /dev/null +++ b/tests/unit/functions/test_functions_string_implementation.py @@ -0,0 +1,238 @@ +import data_factory_testing_framework.functions.functions_string_implementation as string_functions +import pytest + + +@pytest.mark.parametrize( + ["args", "expected"], + [ + (["a", "b", "c"], "abc"), + (["a", "b", "c", "d"], "abcd"), + ], +) +def test_concat( + args: list[str], + expected: str, +) -> None: + # Act + actual = string_functions.concat(*args) + + # Assert + assert actual == expected + + +@pytest.mark.parametrize( + ["text", "search_text", "expected"], + [ + ("abc", "a", False), + ("abc", "c", True), + ("abc", "b", False), + ("abc", "C", True), + ("abc", "d", False), + ("abcabc", "Bc", True), + ], +) +def test_ends_with(text: str, search_text: str, expected: bool) -> None: + # Act + actual = string_functions.ends_with(text, search_text) + + # Assert + assert actual == expected + + +@pytest.mark.parametrize( + ["uuid_format", "expected"], + [ + (None, "0b79217c-c85d-4f19-8c37-56a15b8143ba"), + ("", "0b79217c-c85d-4f19-8c37-56a15b8143ba"), + ("N", "0b79217cc85d4f198c3756a15b8143ba"), + ("D", "0b79217c-c85d-4f19-8c37-56a15b8143ba"), + ("B", "{0b79217c-c85d-4f19-8c37-56a15b8143ba}"), + ("P", "(0b79217c-c85d-4f19-8c37-56a15b8143ba)"), + ("X", "{0x0b79217c,0xc85d,0x4f19,{0x8c,0x37,0x56,0xa1,0x5b,0x81,0x43,0xba}}"), + ], +) +def test_guid(uuid_format: str, expected: str, monkeypatch: pytest.MonkeyPatch) -> None: + # Arrange + import uuid + + uuid_mock = uuid.UUID("0b79217c-c85d-4f19-8c37-56a15b8143ba") + + monkeypatch.setattr(uuid, "uuid4", lambda: uuid_mock) + + # Act + actual = string_functions.guid(uuid_format) + + # Assert + assert expected == actual + + +@pytest.mark.parametrize( + ["text", "search_text", "expected"], + [ + ("abc", "c", 2), + ("abc", "b", 1), + ("abc", "C", 2), + ("abc", "d", -1), + ("abcabc", "a", 0), + ], +) +def test_index_of(text: str, search_text: str, expected: int) -> None: + # Act + actual = string_functions.index_of(text, search_text) + + # Assert + assert actual == expected + + +@pytest.mark.parametrize( + ["text", "search_text", "expected"], + [ + ("abc", "c", 2), + ("abc", "b", 1), + ("abc", "C", 2), + ("abc", "d", -1), + ("abcabc", "a", 3), + ], +) +def test_last_index_of(text: str, search_text: str, expected: int) -> None: + # Act + actual = string_functions.last_index_of(text, search_text) + + # Assert + assert actual == expected + + +@pytest.mark.parametrize( + ["text", "old_text", "new_text", "expected"], + [ + ("abc", "c", "d", "abd"), + ("abc", "b", "d", "adc"), + ("abc", "C", "d", "abc"), + ("abc", "d", "e", "abc"), + ("abcabc", "a", "d", "dbcdbc"), + ], +) +def test_replace(text: str, old_text: str, new_text: str, expected: str) -> None: + # Act + actual = string_functions.replace(text, old_text, new_text) + + # Assert + assert actual == expected + + +@pytest.mark.parametrize( + ["text", "delimiter", "expected"], + [ + ("abc", "c", ["ab", ""]), + ("abc", "b", ["a", "c"]), + ("abc", "C", ["abc"]), + ("abc", "d", ["abc"]), + ("abcabc", "a", ["", "bc", "bc"]), + ], +) +def test_split(text: str, delimiter: str, expected: list[str]) -> None: + # Act + actual = string_functions.split(text, delimiter) + + # Assert + assert actual == expected + + +@pytest.mark.parametrize( + ["text", "search_text", "expected"], + [ + ("abc", "a", True), + ("abc", "c", False), + ("abc", "b", False), + ("abc", "C", False), + ("abc", "d", False), + ("Abcabc", "Ab", True), + ], +) +def test_starts_with(text: str, search_text: str, expected: bool) -> None: + # Act + actual = string_functions.starts_with(text, search_text) + + # Assert + assert actual == expected + + +@pytest.mark.parametrize( + ["text", "start_index", "length", "expected"], + [ + ("abc", 0, 1, "a"), + ("abc", 0, 2, "ab"), + ("abc", 0, 3, "abc"), + ("abc", 1, 1, "b"), + ("abc", 1, 2, "bc"), + ("abc", 2, 1, "c"), + ("abc", 2, 2, "c"), + ("abc", 3, 1, ""), + ("abc", 4, 1, ""), + ("abc", 0, 0, ""), + ("abc", 1, 0, ""), + ("abc", 2, 0, ""), + ("abc", 3, 0, ""), + ("abc", 4, 0, ""), + ], +) +def test_substring(text: str, start_index: int, length: int, expected: str) -> None: + # Act + actual = string_functions.substring(text, start_index, length) + + # Assert + assert actual == expected + + +@pytest.mark.parametrize( + ["text", "expected"], + [ + ("abc", "abc"), + ("ABC", "abc"), + ("AbC", "abc"), + ("$AbC", "$abc"), + ("A&C", "a&c"), + ], +) +def test_to_lower(text: str, expected: str) -> None: + # Act + actual = string_functions.to_lower(text) + + # Assert + assert actual == expected + + +@pytest.mark.parametrize( + ["text", "expected"], + [ + ("abc", "ABC"), + ("ABC", "ABC"), + ("AbC", "ABC"), + ("$AbC", "$ABC"), + ("a7c", "A7C"), + ], +) +def test_to_upper(text: str, expected: str) -> None: + # Act + actual = string_functions.to_upper(text) + + # Assert + assert actual == expected + + +@pytest.mark.parametrize( + ["text", "expected"], + [ + ("abc", "abc"), + (" abc", "abc"), + ("abc ", "abc"), + (" abc ", "abc"), + (" abc ", "abc"), + ], +) +def test_trim(text: str, expected: str) -> None: + # Act + actual = string_functions.trim(text) + + # Assert + assert actual == expected diff --git a/tests/unit/models/activities/base/test_activity.py b/tests/unit/models/activities/base/test_activity.py new file mode 100644 index 00000000..b801262b --- /dev/null +++ b/tests/unit/models/activities/base/test_activity.py @@ -0,0 +1,89 @@ +import pytest +from data_factory_testing_framework.models.activities.activity import Activity +from data_factory_testing_framework.models.activities.execute_pipeline_activity import ExecutePipelineActivity +from data_factory_testing_framework.models.data_factory_element import DataFactoryElement +from data_factory_testing_framework.state import PipelineRunState, RunParameterType +from data_factory_testing_framework.state.dependency_condition import DependencyCondition +from data_factory_testing_framework.state.run_parameter import RunParameter +from data_factory_testing_framework.test_framework import TestFramework, TestFrameworkType + +TestFramework(framework_type=TestFrameworkType.Fabric) + + +@pytest.mark.parametrize( + "required_condition, actual_condition, expected", + [ + ("Succeeded", "Succeeded", True), + ("Failed", "Succeeded", False), + ("Skipped", "Succeeded", False), + ("Completed", "Succeeded", False), + ("Failed", "Failed", True), + ("Skipped", "Failed", False), + ("Completed", "Failed", False), + ("Skipped", "Skipped", True), + ("Completed", "Skipped", False), + ("Completed", "Completed", True), + ], +) +def test_dependency_conditions_when_called_returns_expected( + required_condition: str, + actual_condition: str, + expected: bool, +) -> None: + # Arrange + pipeline_activity = Activity( + name="activity", + type="WebActivity", + dependsOn=[ + { + "activity": "otherActivity", + "dependencyConditions": [required_condition], + } + ], + ) + + state = PipelineRunState() + state.add_activity_result("otherActivity", actual_condition) + + # Act + result = pipeline_activity.are_dependency_condition_met(state) + + # Assert + assert result == expected + + +def test_evaluate_when_no_status_is_set_should_set_status_to_succeeded() -> None: + # Arrange + pipeline_activity = Activity(name="activity", type="WebActivity", dependsOn=[]) + state = PipelineRunState() + + # Act + pipeline_activity.evaluate(state) + + # Assert + assert pipeline_activity.status == DependencyCondition.Succeeded + + +def test_evaluate_is_evaluating_expressions_inside_dict() -> None: + # Arrange + pipeline_activity = ExecutePipelineActivity( + name="activity", + typeProperties={ + "pipeline": {"referenceName": "dummy"}, + "parameters": { + "url": DataFactoryElement("@pipeline().parameters.url"), + }, + }, + depends_on=[], + ) + state = PipelineRunState( + parameters=[ + RunParameter(RunParameterType.Pipeline, "url", "example.com"), + ], + ) + + # Act + pipeline_activity.evaluate(state) + + # Assert + assert pipeline_activity.type_properties["parameters"]["url"].value == "example.com" diff --git a/tests/unit/models/activities/control_activities/test_filter_activity.py b/tests/unit/models/activities/control_activities/test_filter_activity.py new file mode 100644 index 00000000..da6c705f --- /dev/null +++ b/tests/unit/models/activities/control_activities/test_filter_activity.py @@ -0,0 +1,55 @@ +import pytest +from data_factory_testing_framework.models.activities.filter_activity import FilterActivity +from data_factory_testing_framework.models.data_factory_element import DataFactoryElement +from data_factory_testing_framework.models.pipeline import Pipeline +from data_factory_testing_framework.state import RunParameter, RunParameterType +from data_factory_testing_framework.test_framework import TestFramework, TestFrameworkType + + +@pytest.mark.parametrize( + "input_values,expected_filtered_values", + [ + ([1, 2, 3, 4, 5], [1, 2, 3]), + ([], []), + ([4], []), + ([3, 4, 5, 6], [3]), + ([4, 5, 6], []), + ([-1, 3, 4], [-1, 3]), + ], +) +def test_filter_activity_on_range_of_values(input_values: [], expected_filtered_values: []) -> None: + # Arrange + test_framework = TestFramework(framework_type=TestFrameworkType.Fabric) + pipeline = Pipeline( + name="pipeline", + parameters={ + "input_values": { + "type": "Array", + "defaultValue": [], + }, + }, + variables={}, + activities=[ + FilterActivity( + name="FilterActivity", + typeProperties={ + "items": DataFactoryElement("@pipeline().parameters.input_values"), + "condition": DataFactoryElement("@lessOrEquals(item(), 3)"), + }, + ), + ], + ) + + # Act + activities = test_framework.evaluate_pipeline( + pipeline, + [ + RunParameter(RunParameterType.Pipeline, "input_values", input_values), + ], + ) + + # Assert + activity = next(activities) + assert activity.type == "Filter" + assert activity.type_properties["items"].value == input_values + assert activity.output["value"] == expected_filtered_values diff --git a/tests/unit/models/activities/control_activities/test_for_each_activity.py b/tests/unit/models/activities/control_activities/test_for_each_activity.py new file mode 100644 index 00000000..8efe0bc3 --- /dev/null +++ b/tests/unit/models/activities/control_activities/test_for_each_activity.py @@ -0,0 +1,56 @@ +import pytest +from data_factory_testing_framework.models.activities.for_each_activity import ForEachActivity +from data_factory_testing_framework.models.activities.set_variable_activity import SetVariableActivity +from data_factory_testing_framework.models.data_factory_element import DataFactoryElement +from data_factory_testing_framework.state import PipelineRunState, PipelineRunVariable +from data_factory_testing_framework.test_framework import TestFramework + + +def test_when_evaluate_child_activities_then_should_return_the_activity_with_item_expression_evaluated() -> None: + # Arrange + test_framework = TestFramework("Fabric") + for_each_activity = ForEachActivity( + name="ForEachActivity", + typeProperties={ + "items": DataFactoryElement("@split('a,b,c', ',')"), + }, + activities=[ + SetVariableActivity( + name="setVariable", + typeProperties={ + "variableName": "variable", + "value": DataFactoryElement[str]("@item()"), + }, + depends_on=[], + ), + ], + depends_on=[], + ) + state = PipelineRunState( + variables=[ + PipelineRunVariable(name="variable", default_value=""), + ], + ) + + # Act + activities = test_framework.evaluate_activity(for_each_activity, state) + + # Assert + set_variable_activity: SetVariableActivity = next(activities) + assert set_variable_activity is not None + assert set_variable_activity.name == "setVariable" + assert set_variable_activity.type_properties["value"].value == "a" + + set_variable_activity = next(activities) + assert set_variable_activity is not None + assert set_variable_activity.name == "setVariable" + assert set_variable_activity.type_properties["value"].value == "b" + + set_variable_activity = next(activities) + assert set_variable_activity is not None + assert set_variable_activity.name == "setVariable" + assert set_variable_activity.type_properties["value"].value == "c" + + # Assert that there are no more activities + with pytest.raises(StopIteration): + next(activities) diff --git a/tests/unit/models/activities/control_activities/test_if_condition_activity.py b/tests/unit/models/activities/control_activities/test_if_condition_activity.py new file mode 100644 index 00000000..ee8570ef --- /dev/null +++ b/tests/unit/models/activities/control_activities/test_if_condition_activity.py @@ -0,0 +1,72 @@ +import pytest +from data_factory_testing_framework.models.activities.if_condition_activity import IfConditionActivity +from data_factory_testing_framework.models.activities.set_variable_activity import SetVariableActivity +from data_factory_testing_framework.models.data_factory_element import DataFactoryElement +from data_factory_testing_framework.state import PipelineRunState, PipelineRunVariable +from data_factory_testing_framework.test_framework import TestFramework, TestFrameworkType + + +def test_when_evaluated_should_evaluate_expression() -> None: + # Arrange + activity = IfConditionActivity( + name="IfConditionActivity", + if_true_activities=[], + if_false_activities=[], + typeProperties={"expression": DataFactoryElement("@equals(1, 1)")}, + ) + + # Act + activity.evaluate(PipelineRunState()) + + # Assert + assert activity.expression.value + + +@pytest.mark.parametrize( + "expression_outcome,expected_activity_name", + [(True, "setVariableActivity1"), (False, "setVariableActivity2")], +) +def test_when_evaluated_should_evaluate_correct_child_activities( + expression_outcome: bool, + expected_activity_name: str, +) -> None: + # Arrange + test_framework = TestFramework(framework_type=TestFrameworkType.Fabric) + expression = "@equals(1, 1)" if expression_outcome else "@equals(1, 2)" + activity = IfConditionActivity( + name="IfConditionActivity", + typeProperties={ + "expression": DataFactoryElement(expression), + }, + if_true_activities=[ + SetVariableActivity( + name="setVariableActivity1", + typeProperties={ + "variableName": "variable", + "value": DataFactoryElement("dummy"), + }, + ), + ], + if_false_activities=[ + SetVariableActivity( + name="setVariableActivity2", + typeProperties={ + "variableName": "variable", + "value": DataFactoryElement("dummy"), + }, + ), + ], + ) + + state = PipelineRunState( + variables=[ + PipelineRunVariable(name="variable", default_value=""), + ], + ) + + # Act + child_activities = list(test_framework.evaluate_activity(activity, state)) + + # Assert + assert len(child_activities) == 1 + assert child_activities[0].name == expected_activity_name diff --git a/tests/unit/models/activities/control_activities/test_switch_activity.py b/tests/unit/models/activities/control_activities/test_switch_activity.py new file mode 100644 index 00000000..05713491 --- /dev/null +++ b/tests/unit/models/activities/control_activities/test_switch_activity.py @@ -0,0 +1,89 @@ +import pytest +from data_factory_testing_framework.models.activities.set_variable_activity import SetVariableActivity +from data_factory_testing_framework.models.activities.switch_activity import SwitchActivity +from data_factory_testing_framework.models.data_factory_element import DataFactoryElement +from data_factory_testing_framework.models.pipeline import Pipeline +from data_factory_testing_framework.state import PipelineRunState +from data_factory_testing_framework.test_framework import TestFramework, TestFrameworkType + + +def test_when_evaluated_should_evaluate_expression() -> None: + # Arrange + activity = SwitchActivity( + name="SwitchActivity", + default_activities=[], + cases_activities={}, + typeProperties={"on": DataFactoryElement("@concat('case_', '1')")}, + ) + + # Act + activity.evaluate(PipelineRunState()) + + # Assert + assert activity.on.value == "case_1" + + +@pytest.mark.parametrize( + "on_value,expected_outcome", + [ + ("case_1", "case_1_hit"), + ("case_2", "case_2_hit"), + ("case_3", "default_hit"), + ("case_4", "default_hit"), + ("case_anything", "default_hit"), + ], +) +def test_correct_case_evaluated(on_value: str, expected_outcome: str) -> None: + # Arrange + test_framework = TestFramework(framework_type=TestFrameworkType.Fabric) + pipeline = Pipeline( + name="pipeline", + variables={ + "variable": { + "type": "String", + "defaultValue": "", + }, + }, + activities=[ + SwitchActivity( + name="SwitchActivity", + default_activities=[ + SetVariableActivity( + name="setVariableActivity1", + typeProperties={ + "variableName": "variable", + "value": "default_hit", + }, + ), + ], + cases_activities={ + "case_1": [ + SetVariableActivity( + name="setVariableActivity2", + typeProperties={ + "variableName": "variable", + "value": "case_1_hit", + }, + ), + ], + "case_2": [ + SetVariableActivity( + name="setVariableActivity3", + typeProperties={ + "variableName": "variable", + "value": "case_2_hit", + }, + ), + ], + }, + typeProperties={"on": DataFactoryElement(on_value)}, + ) + ], + ) + + # Act + activity = next(test_framework.evaluate_pipeline(pipeline, [])) + + # Assert + assert activity.type == "SetVariable" + assert activity.type_properties["value"] == expected_outcome diff --git a/tests/unit/models/activities/control_activities/test_until_activity.py b/tests/unit/models/activities/control_activities/test_until_activity.py new file mode 100644 index 00000000..145bad61 --- /dev/null +++ b/tests/unit/models/activities/control_activities/test_until_activity.py @@ -0,0 +1,53 @@ +import pytest +from data_factory_testing_framework.models.activities.set_variable_activity import SetVariableActivity +from data_factory_testing_framework.models.activities.until_activity import UntilActivity +from data_factory_testing_framework.models.data_factory_element import DataFactoryElement +from data_factory_testing_framework.state import PipelineRunState, PipelineRunVariable +from data_factory_testing_framework.test_framework import TestFramework, TestFrameworkType + + +def test_when_evaluate_until_activity_should_repeat_until_expression_is_true() -> None: + # Arrange + test_framework = TestFramework(framework_type=TestFrameworkType.Fabric) + until_activity = UntilActivity( + name="UntilActivity", + typeProperties={ + "expression": DataFactoryElement("@equals(1, 1)"), + }, + activities=[ + SetVariableActivity( + name="setVariable", + typeProperties={ + "variableName": "variable", + "value": DataFactoryElement("'1'"), + }, + depends_on=[], + ), + ], + depends_on=[], + ) + + state = PipelineRunState( + variables=[ + PipelineRunVariable(name="variable", default_value=""), + ], + ) + + # Act + until_activity.expression.evaluate = lambda state: False + activities = test_framework.evaluate_activity(until_activity, state) + + # Assert + set_variable_activity = next(activities) + assert set_variable_activity is not None + assert set_variable_activity.name == "setVariable" + + set_variable_activity = next(activities) + assert set_variable_activity is not None + assert set_variable_activity.name == "setVariable" + + until_activity.expression.evaluate = lambda state: True + + # Assert that there are no more activities + with pytest.raises(StopIteration): + next(activities) diff --git a/tests/unit/models/activities/test_append_variable_activity.py b/tests/unit/models/activities/test_append_variable_activity.py new file mode 100644 index 00000000..3147c272 --- /dev/null +++ b/tests/unit/models/activities/test_append_variable_activity.py @@ -0,0 +1,66 @@ +from typing import List + +import pytest +from data_factory_testing_framework.exceptions.variable_being_evaluated_does_not_exist_error import ( + VariableBeingEvaluatedDoesNotExistError, +) +from data_factory_testing_framework.models.activities.append_variable_activity import AppendVariableActivity +from data_factory_testing_framework.models.data_factory_element import DataFactoryElement +from data_factory_testing_framework.state import PipelineRunState, PipelineRunVariable +from data_factory_testing_framework.test_framework import TestFramework, TestFrameworkType + + +@pytest.mark.parametrize( + "initial_value,appended_value,expected_value", + [ + ([1, 2], 3, [1, 2, 3]), + ([], 1, [1]), + ([4], 5, [4, 5]), + ], +) +def test_when_int_variable_appended_then_state_variable_should_be_set( + initial_value: List[int], appended_value: int, expected_value: List[int] +) -> None: + # Arrange + TestFramework(framework_type=TestFrameworkType.Fabric) + variable_name = "TestVariable" + set_variable_activity = AppendVariableActivity( + name="AppendVariableActivity", + typeProperties={ + "variableName": variable_name, + "value": DataFactoryElement(str(appended_value)), + }, + ) + state = PipelineRunState( + variables=[ + PipelineRunVariable(name=variable_name, default_value=initial_value), + ], + ) + + # Act + set_variable_activity.evaluate(state) + + # Assert + variable = state.get_variable_by_name(variable_name) + assert variable.value == expected_value + + +def test_when_unknown_variable_evaluated_then_should_raise_exception() -> None: + # Arrange + TestFramework(framework_type=TestFrameworkType.Fabric) + variable_name = "TestVariable" + set_variable_activity = AppendVariableActivity( + name="AppendVariableActivity", + typeProperties={ + "variableName": variable_name, + "value": DataFactoryElement("TestValue"), + }, + ) + state = PipelineRunState() + + # Act + with pytest.raises(VariableBeingEvaluatedDoesNotExistError) as exception_info: + set_variable_activity.evaluate(state) + + # Assert + assert exception_info.value.args[0] == "Variable being evaluated does not exist: TestVariable" diff --git a/tests/unit/models/activities/test_fail_activity.py b/tests/unit/models/activities/test_fail_activity.py new file mode 100644 index 00000000..15d38a99 --- /dev/null +++ b/tests/unit/models/activities/test_fail_activity.py @@ -0,0 +1,28 @@ +from data_factory_testing_framework.models.activities.fail_activity import FailActivity +from data_factory_testing_framework.models.data_factory_element import DataFactoryElement +from data_factory_testing_framework.state import PipelineRunState +from data_factory_testing_framework.state.dependency_condition import DependencyCondition + + +def test_fail_activity_evaluates_to_failed_result() -> None: + # Arrange + fail_activity = FailActivity( + name="FailActivity", + typeProperties={ + "message": DataFactoryElement("@concat('Error code: ', '500')"), + "errorCode": "500", + }, + depends_on=[], + ) + + state = PipelineRunState() + + # Act + activity = fail_activity.evaluate(state) + + # Assert + assert activity is not None + assert activity.name == "FailActivity" + assert activity.status == DependencyCondition.FAILED + assert activity.type_properties["message"].value == "Error code: 500" + assert activity.type_properties["errorCode"] == "500" diff --git a/tests/unit/models/activities/test_set_variable_activity.py b/tests/unit/models/activities/test_set_variable_activity.py new file mode 100644 index 00000000..ace64e0e --- /dev/null +++ b/tests/unit/models/activities/test_set_variable_activity.py @@ -0,0 +1,54 @@ +import pytest +from data_factory_testing_framework.exceptions.variable_being_evaluated_does_not_exist_error import ( + VariableBeingEvaluatedDoesNotExistError, +) +from data_factory_testing_framework.models.activities.set_variable_activity import SetVariableActivity +from data_factory_testing_framework.models.data_factory_element import DataFactoryElement +from data_factory_testing_framework.state import PipelineRunState, PipelineRunVariable +from data_factory_testing_framework.test_framework import TestFramework, TestFrameworkType + + +def test_when_string_variable_evaluated_then_state_variable_should_be_set() -> None: + # Arrange + TestFramework(framework_type=TestFrameworkType.Fabric) + variable_name = "TestVariable" + set_variable_activity = SetVariableActivity( + name="SetVariableActivity", + typeProperties={ + "variableName": variable_name, + "value": DataFactoryElement("TestValue"), + }, + ) + state = PipelineRunState( + variables=[ + PipelineRunVariable(name=variable_name, default_value=""), + ], + ) + + # Act + set_variable_activity.evaluate(state) + + # Assert + variable = state.get_variable_by_name(variable_name) + assert variable.value == "TestValue" + + +def test_when_unknown_variable_evaluated_then_should_raise_exception() -> None: + # Arrange + TestFramework(framework_type=TestFrameworkType.Fabric) + variable_name = "TestVariable" + set_variable_activity = SetVariableActivity( + name="SetVariableActivity", + typeProperties={ + "variableName": variable_name, + "value": DataFactoryElement("TestValue"), + }, + ) + state = PipelineRunState() + + # Act + with pytest.raises(VariableBeingEvaluatedDoesNotExistError) as exception_info: + set_variable_activity.evaluate(state) + + # Assert + assert exception_info.value.args[0] == "Variable being evaluated does not exist: TestVariable" diff --git a/tests/unit/models/pipelines/test_pipeline_resource.py b/tests/unit/models/pipelines/test_pipeline_resource.py new file mode 100644 index 00000000..cfc8e6c6 --- /dev/null +++ b/tests/unit/models/pipelines/test_pipeline_resource.py @@ -0,0 +1,105 @@ +import pytest +from data_factory_testing_framework.models.pipeline import Pipeline +from data_factory_testing_framework.state import RunParameterType +from data_factory_testing_framework.state.run_parameter import RunParameter + + +def test_when_validate_parameters_is_accurate_should_pass() -> None: + # Arrange + pipeline = Pipeline( + name="pipeline", + activities=[], + parameters={ + "pipelineParameterName": { + "type": "String", + }, + "pipelineParameterName2": { + "type": "String", + }, + "pipelineParameterName3": { + "type": "String", + "defaultValue": "pipelineParameterValue3", + }, + }, + ) + + # Act + parameters = pipeline.validate_and_append_default_parameters( + [ + RunParameter(RunParameterType.Pipeline, "pipelineParameterName", "pipelineParameterValue"), + RunParameter(RunParameterType.Pipeline, "pipelineParameterName2", "pipelineParameterValue2"), + ], + ) + + # Assert + assert len(parameters) == 3 + assert parameters[0].name == "pipelineParameterName" + assert parameters[0].value == "pipelineParameterValue" + assert parameters[1].name == "pipelineParameterName2" + assert parameters[1].value == "pipelineParameterValue2" + assert parameters[2].name == "pipelineParameterName3" + assert parameters[2].value == "pipelineParameterValue3" + + +def test_when_validate_parameters_is_missing_run_parameter_should_throw_error() -> None: + # Arrange + pipeline = Pipeline( + name="pipeline", + activities=[], + parameters={ + "pipelineParameterName": { + "type": "String", + }, + "pipelineParameterName2": { + "type": "String", + }, + }, + ) + pipeline.name = "pipeline" + + # Act + with pytest.raises(ValueError) as exception_info: + pipeline.validate_and_append_default_parameters( + [ + RunParameter(RunParameterType.Pipeline, "pipelineParameterName", "pipelineParameterValue"), + ], + ) + + # Assert + assert ( + exception_info.value.args[0] + == "Parameter with name 'pipelineParameterName2' and type 'RunParameterType.Pipeline' not found in pipeline 'pipeline'" + ) + + +def test_when_duplicate_parameters_supplied_should_throw_error() -> None: + # Arrange + pipeline = Pipeline( + name="pipeline", + activities=[], + parameters={ + "pipelineParameterName": { + "type": "String", + }, + "pipelineParameterName2": { + "type": "String", + }, + }, + ) + pipeline.name = "pipeline" + + # Act + with pytest.raises(ValueError) as exception_info: + pipeline.validate_and_append_default_parameters( + [ + RunParameter(RunParameterType.Pipeline, "pipelineParameterName", "pipelineParameterValue"), + RunParameter(RunParameterType.Pipeline, "pipelineParameterName", "pipelineParameterValue"), + RunParameter(RunParameterType.Pipeline, "pipelineParameterName2", "pipelineParameterValue2"), + ], + ) + + # Assert + assert ( + exception_info.value.args[0] + == "Duplicate parameter with name 'pipelineParameterName' and type 'RunParameterType.Pipeline' found in pipeline 'pipeline'" + )